#development

1 messages · Page 5 of 1

storm berry
#

dict.get(key) returns false if the value for the key is false-y

silk eagle
#

this is dict.get()

storm berry
#

like None, 0, or False

silk eagle
#

and then this is supposedly what makes "key in dict" work, I'm poking around to figure out what this means

#

prolly this

storm berry
#

you can benchmark the python code if you really care

bitter edge
silk eagle
#

vs code

bitter edge
#

damn what plugins

silk eagle
#

alright if dict.get(key) is 0.77% slower (im not a scientist though) than if key in dict, which kind of lines up with the extra couple lines in the cpython source

#

but I bet if I ran the tests, itd be incredibly different so im just gonna not look into that

empty sentinel
#

Does VS have a WYSIWYG GUI editor?

storm berry
empty sentinel
#

I’m looking to replace AdminScriptEditor

silk eagle
storm berry
#

dict.get(key) is used to actually get the value, key in dict checks if the dict contains the key

#

using if dict.get(key) looks like you're trying to check if the dict contains the key, but will evaluate to false for some values even when the dict contains the key

silk eagle
#

I do like the readability of key in dict too

silk eagle
storm berry
#
>>> x = {}
>>> x[1] = None
>>> print(x)
{1: None}
>>> if x.get(1):
...     print('hello')
>>> if 1 in x:
...     print('hello')
hello
silk eagle
#

that is actually really interesting and probably couldve caused me headache at some point

peak acorn
#

well of course

#

none is like false so that first one wont print

coral kelp
#

Senior developer?

tough zodiac
#

*Co-Owner you potato

coral kelp
#

Yeah my bad

#

Thanks for correcting me, it made it good

tough zodiac
#

I've been programming since before you where born

coral kelp
#

I'm older than you

tough zodiac
#

i...

#

no

silk eagle
#

migitino is 65 bro

sly marten
#

it rarely is good when the only thing a commit message says is "Made it good" shy

storm berry
#

Anyone know why I get asset protocol not configured to allow the path: when I try to load files from my local disk with tauri?

silk eagle
sly marten
#

yeah, I don't mind indeed msncool

spring cradle
#

On your first day at the new job, squash every commit from the repo into a single commit with message "Legacy code" and force-push to master.

#

getting this kinda energy

silk eagle
sly marten
#

don't think this channel is meant for recruitment lol

silk eagle
#

exposure to some money in my pocket

midnight wind
#

wdym by signup page

#

like a website signup?

#

I don't understand

#

what's the purpose

#

websites for that already exist

#

like evite

twin remnant
#

Is there anyone that is beginner or just starting to learn programming? I’m looking for someone to learn with or help stay on track

#

I know html and starting js

rancid nimbus
#

Js is reasonably capable.

hollow basalt
thick sequoia
#

hi i want some help with docker

thick sequoia
#

please help

celest junco
thick sequoia
#

thx

#

wasted 2.5 hrs just because of db

celest junco
#

That’s how it is sometimes

iron python
#

Is there a better way? I have been running this version of code from Windows 7, so i assume there must be a faster command?

#

"for /F %%a in ('mountvol ^| find ":"') do (
dir %%a 1>nul 2>nul
if not ErrorLevel 1 (
del /s /f %%a*.log
)"

#

i then have it repeat for different extensions (eg .mdmp .old etc)

silk eagle
#
for /F %%a in ('mountvol ^| find ":"') do (
dir %%a 1>nul 2>nul
if not ErrorLevel 1 (
del /s /f %%a*.log
)
vital musk
#

GM all, Any FE Devs here?

peak acorn
#

What

silk eagle
#

oh that means frontend

#

i thought that was gonna be something crazy

#

and yes there are a lotta fronties here

sly marten
silk eagle
#

maybe theyre looking for likeminded individuals to discuss rounded stuff

peak acorn
#

I'm round

vital musk
#

Nice, But looking for someone skilled in the following......

#
  • Javascript ES6+
  • React.js proficiency
  • HTML
  • CSS & SCSS
  • Understanding of Websockets
  • Electron.js experience (Understanding the IPC/Renderer workflow)
  • Application Architecture Design (Understanding the most performant ways to structure Electron apps)
  • Core understanding of how Web Browsers work (Chromium especially, V8 JS Engine, Rendering, Processes & Threads)
  • A great attention to detail from designs
  • The want to create innovative and game changing products!
  • An interest in online privacy is a plus
  • Must be fluent in English
#

There is a bounty for the successful referral. Thanks anyway. DM me if anyone should need more info. Thanks.

silk eagle
#

does inline css count as css

#

because I only do inline css

vital musk
sly marten
#

Good luck on the bounty hunting anyway! 🙂

wind horizon
#

I once worked some place that did referral links that never expired, it was hilarious. Ppl would just spam the links online and get unlimited referral bonuses from random strangers that applied to openings.

misty thorn
#

Blender's default Color Grid texture remastered into a game-ready developer tiles texture, .0625 measurements

vital musk
#

🤝 👍

sly marten
storm berry
#

Is it bad practice to use a dom element to store data

#

Like if I use a list in html to store names and read the list to get them back

lament cave
#

wouldn’t it be easier to just store it in a variable

sly marten
sly marten
#

Anyone have any tips for me disabling zoom on websites?

I've understood that browsers tend to prevent you from doing such on websites. Which makes sense, considering it's a feature for a user's convenience, and by taking it away from them, you fuck with their accessibility...

However, in apps that aren't really websites, but more like desktop apps built in a browser engine (such as Discord for example), it might make more sense to prevent zooming...

vital musk
#

I am the community Manager for MASQ.ai We are looking to add another member to the Dev team. Bounty on a referral that leads to successful employment. 🍻

sly marten
storm berry
#

but I ended up just having a separate set that I keep track of alongside the html where I stored the actual names

sly marten
wind horizon
#

But when they are using their browser / browser engine I don’t think you get any control. 🤔

sly marten
wind horizon
#

Maybe could do some CSS trickery with measuring the browser on first render, then making everything in app fixed size. So if they zoom in / out then it’ll stay the that fixed size? Idk if that’ll even work out just trying to brainstorm. Lol

wind horizon
sly marten
#

yeah, meta viewport is supposed to work, but apparently no browser respects the no scale option 😒

peak acorn
#

AAAAAAAAAAAA

#

trying to compile lzma tools from scratch. I barely even know how to write a makefile

celest junco
#

You don’t need to know how to write a make file to build a project

peak acorn
#

Figured it out

#

I did need to do my own makefile, the source code is open src from somewhere but stripped down to go onto embedded os. And need a new makefile to build on desktop so I dont need to emulator all the time

#

turned out to be simpler than i thought it was gonna be

vestal trellis
#

(AMD SYSTEM TESTED ONLY) So guys If anyone Having trouble disabling driver virtual singutrue and tried everything possible in bios ... and when shift click the restart button the modified system. boot to disable it is frozen .. I found out that a clock overclock is causing this issue disable it to default.

undone parcel
#

hi folks

#

good night hi someone used APISIX gateway before ?

silk eagle
#

python modules are depressing

late cypress
#

pythons' performance is very acceptable to python users

rancid nimbus
#

I recently got a LicheeRV Dock development board. I tried to use a generic allwinner d1 boot media but it failed to boot. When I plugged the power cable into my laptop I noticed a USB device titles something like "allwinner usb flasher". I didn't copy that string but when I looked it up it suggested to use some USB flasher to flash some firmware to it. Where would the firmware be and how would I flash it? I had found a tool to flash the d1 chip, but no firmware. Would I need to flash the firmware to boot from the SD card?

lament bridge
#

Is it a bad idea to do API calls within useEffect in React?

wind horizon
#

If you want a lib that wraps it up for you all nice with caching react-query is pretty awesome, esp when paired with Axios which auto parses json and throws on not ok. Granted those are pretty easy tasks to make a fetch wrapper do and just call that wrapper. Feel like I may have suggested that lib to you in the past though. 🤔😅

lament bridge
#

I tried to follow an infinite scroll for my "pagination", but for the "since" I get no normal value return, which is why my scrolls not working.
https://coolhead.in/create-infinite-scroll-in-react

The first would be the since and the second is the limit, which returns 20.

Of course, I also added the query according to the backend API like bla bla LIMIT since, limit

If sharing the whole could would help more, I can also do that, but I don't want to be a big pain

#

By not working, I mean, I keep seeing my "loading" text and nothing happens even if scrolling, which I believe is because of the since isn't correct, so the query is not working

lament bridge
#

Edit: Solved this, now the only problem is that, it keeps going into a loop, so it adds +X to since everytime until things overload.

verbal gale
#

So Ive had issues with Grammarly(Im not here for tech support don't worry) and from what I understand it isn't optimised for macOS in any browser. So my question is why? like does MacOs have a x86 translation thing built in and its not like they just haven't developed it properly for safari as its about as bad in chrome too. So does anyone understand why enough to explain it with my at best year 10 computer science class knowledge of programming.

midnight wind
#

can't find anything online about it

verbal gale
#

it legit consumes 4-6GB of ram

#

and I've reimaged my laptop twice

midnight wind
#

there's a suspected reason

verbal gale
#

ok so basically cant do anything but uninstall quite annoying. I probably also need to with actually just spelling correctly but me trusting it moved be from an A to a B in a recent assessment.

#

thanks for the help though

#

interesting to see for something thats not free and seems to have a huge marketing budget they cant redevelopment the extension but that could be a bit nieve of me

midnight wind
#

even when you are paying thousands

verbal gale
#

yeah I've head it gets MUCH worse in when buying software for a company. I've heard some real horror stories of companies charging heaps, moving on to developing and supporting their new product and then not supporting a product their still happy to charge millions to a company.

frozen berry
#

was watching reviews Microsoft developer kit 2023 volterra anyone using it for daily use?

#

review comming on shorcicruit

#

?

gleaming basin
#

any reason this prints absolutely random values that are not in the array at all? if i manually enter a number in place of the i it returns the proper value from that element in the array.

#

beginning to think it might be a hardware issue at this point with the arduino but everything else works perfectly on it (it is primarily a geiger counter)

hollow basalt
#

Not really

gleaming basin
#

Made a new arduino sketch with only the array and reading out the elements to serial and there I get expected results

#

Weird af (running on same hardware)

gleaming basin
#

wait no it still happens and seems to happen only in progmem

#

yeah didnt realise the intricacies of arduino progmem weird that it seemed to work normally when outside a for loop tho

spring cradle
#

it looks like out of bounds shenanigans? is it def populated at that index?

gleaming basin
#

I forgot to use pgm_read_byte_near

#

I have no idea how it was reading values normally outside of loops tho

#

The relief when it just works lol

#

(and yes the thing counts geigers too)

acoustic pine
#

Javascript ultra noob here
I wanna make multipage site with a single HTML
And my current js solution is rather crude and takes a lot of code

Each button has its own function and the function just sets the intended element to translateX(0px) and other page either translateX(500px) or translateX(-500px) depending on the page location to have proper transition.
I need a way to shorten this

#

And opacity for intended element to 1 with the rest to 0

acoustic pine
#

Yeahh like a week experience of javascript KEKW

sly marten
acoustic pine
#

I need to learn HTML CSS and JS for
School

#

Web project

hollow basalt
#

Then use the typical multiple files and hyperlinks instead of that clunky codebase you have right now

#

You must first walk before you can run

#

Go with multiple files and master the 3 before fiddling with that kind of "changing the page using scripts" code

nocturne galleon
#

No web application in this world ever has several pages on one site directory

acoustic pine
#

my teacher kinda don't give an eff on shitty code anyway
just need the web looks good

nocturne galleon
#

Wym a good transition

acoustic pine
#

dynamic looking stuff

hollow basalt
#

wdym dynamic looking stuff

acoustic pine
#

like fluent looking site with animations
not static monotone ones

next cipher
midnight wind
#

which is out of your scope

#

plus I personally hate websites with lots of animations

acoustic pine
#

Problem is teacher want that

#

Like aesthetic over functionality

midnight wind
#

the hack I've seen done is make an animation to a white screen

#

then when the other page loads make animation from white screen to website

median flame
#

Does anyone have experience setting up an build system for large projects? Currently we are using threadrippers with Proxmox running multiple vms, each vm is dedicated to a single development branch in order to maximize cpu usage. However I feel that this is not as cost effective as building multiple i7 builds

acoustic pine
#

well i got my solution

#

using swup
thanks youtube

storm berry
#

it's also probably not worth buying new systems before the threadrippers have earned their worth

summer pine
#

i hate java compiling i just spent an hour and a half debugging on a missing semicollon

frank narwhal
#

Hi. I can't remember if the binary operation where you change the 1's with 0's and the 0's with 1's has a name? For example 0101 would result in 1010, or 0000 would result in 1111?

peak acorn
#

Unary negation I guess

#

Or xor with all 1's

spring cradle
#

bitwise not?

silk eagle
#

switcharoo

storm berry
#

also the code looks interesting, what does it do? 👀

median flame
proven orbit
#

Anyone who knows visual studio code, I hid the "run" button on accident I have Code Runner installed, I cannot for the life of me figure out how to get it back

hollow basalt
#

You can no longer run

#

accept your fate

proven orbit
#

Fair

summer pine
sly marten
hollow basalt
summer pine
summer pine
sly marten
#

oh, I see, makes sense then - was just curious fwiw 🙂

sly marten
#

Anyone happen to know RAM consumption differences between SQL Management Studio and DataGrip? My work compute has 16GB RAM, and I seem to always consume 80-100% of the RAM while using DataGrip + Firefox eek

Is 16GB RAM just not enough for these kinds of things?

hollow basalt
sly marten
hollow basalt
#

but my ram usage doesn't go below 10GB all day long

sly marten
#

this is the result after restarting pretty much, so surely it'll be much higher after a bit of work

hollow basalt
#

Ah yea, that's why I usually don't go with 2 Jetbrains Software.

#

i go with using "power save" mode in one when using the other

#

their "intelligence" simply is too heavy to be running at the same time

sly marten
#

ahh, guess I don't have to have both running at once - just out of convenience so I can switch back and forth as I please, instead of opening and closing it all the time 😛

#

and my PC at home has 64GB RAM, so at home I really never have issues with this kind of stuff

#

I guess it's fine, until I want to index a database, or whatever it does, that takes an eternity to do eek

hollow basalt
#

Yea that's fair. I would do that too if there won't be a perofmance limit

#

In my current tasks, where we have different databases that with the same content.
indexing is just PIA

#

why would I need to index the same schema to run 2-3 select/updates

sly marten
#

yeah, I sometimes have many databases, same structure, but different content

hollow basalt
#

Yea I meant same schemas but different data

sly marten
#

so I tend to want to hide the ones I'm not working in, and deciding to show some other ones, I have to wait for it to index or whatever lol

#

ahh yeah

#

SSMS is better in that regard, but I don't think SSMS indexes ahead of time, like DataGrip does(?)

hollow basalt
#

Yea like most IDE vs Jetbrains.

#

jetbrains does the heavy lifting at the start to provide the seamless exp

#

ssms is better when I need to do simple things

sly marten
#

yeah, so it's fairly quick after it has done the heavy lifting

#

yeah, I just find myself getting much more value from DataGrip than SSMS, in terms of convenience - especially with editing data in tables

#

in SSMS it's easiest to just write update/insert queries lol, and that's so annoying compared to just add/edit a row in a table

#

also in DataGrip you can run a select query, then edit the data in the result table, but I can't do that in SSMS 😦

hollow basalt
#

Yea DataGrip is better in Development overall

#

Although not true, I created a bias where
creating script = ssms
r&d = datagrip

If I need to change something quickly datagrip would be the way to go,

sly marten
#

yeah, they both have their areas to shine 😛

#

just like Visual Studio vs Rider - although I believe Visual Studio has gotten a lot better now that it's 64 bit support as well

hollow basalt
#

All of the devs in the company I know uses VS. I use rider

#

I don't follow company tradition

sly marten
#

haha yeah, I tried using Rider in my last job, but the project just wouldn't work in Rider (codebase was really old though, like 10 years or so)

#

also TFS integration (since we used that instead of Git) wasn't particularly good in Rider 😛

hollow basalt
#

IDK. the current project just wasn't build for rider but it kinda works

#

and yes no TFS integration. but that's price to pay

sly marten
#

yeah, now I don't work as a developer anymore, and the times I do touch code, it's new projects written from the ground up by me - for better or worse 😛

hollow basalt
#

yeah. this is my first job as a fulltime dev

sly marten
#

ahh, nice ^^ how are you liking it?

#

I had my first full time dev job in 2017-2019, as a fullstack developer on a proprietary CMS solution written in PHP

#

then I was a fullstack developer on a proprietary eCommerce solution written in C#/ASP.NET from 2019-2020

hollow basalt
#

Indeed
you were a fullstack developer

sly marten
#

that's good! I was very conflicted personally haha

#

some projects/tasks I enjoyed A LOT, and others just burnt me out

sly marten
dense cloak
#

Anyone experienced with Pandas here? I have a dataset with some missing rows (all rows where a particular column would be 0), and I want to backfill those.

More specifically, that is exactly what I'm trying to find out about that dataset - which rows were omitted.

Example data:

city | dealership | quarter | car     | units_sold
1    | 1          | 1       | civic   | 10
1    | 2          | 1       | corolla | 5

In this example, the missing data tells me that dealership 1 sold 0 corollas, and dealership 2 sold 0 civics.

#

This is not the actual dataset, by the way. The actual dataset comes from a 1.5GB CSV with 26 columns and 5 million rows

hollow basalt
#

unclear question

dense cloak
#

what part wasn't clear?

sly marten
#

it's very confusing when we can't see more of "the picture"

young elbow
#

correct me if I'm wrong @dense cloak, I think what he meant was:

  • every dealer sells all car, but when he sells none of a specific type of car, the row is omitted.
    Exemple, the entry in the csv
city | dealership | quarter | car     | units_sold
1    | 1          | 1       | civic   | 10
1    | 2          | 1       | corolla | 5

Represent:

city | dealership | quarter | car     | units_sold
1    | 1          | 1       | civic   | 10
1    | 1          | 1       | corolla | 0
1    | 2          | 1       | corolla | 5
1    | 2          | 1       | civic   | 0

And the question would be, how to add the omitted row?

dense cloak
#

exactly @young elbow

#

Actually, I think I just got this working!

First I created a new column that represents the unique combination of city, dealership and quarter (just a string concatenating the three, split by -).

Then I created a MultiIndex from_product between this new column and the name of the car.

Finally I called set_index on the dataset, followed by reindex with fill_value=0

spring cradle
#

is protobuf similar to a less readable/more efficient json?

peak acorn
#
#0  MyAlloc (size=65536) at src/Alloc.c:44
#1  0x000055555555efbb in RangeEnc_Alloc (p=0x555558765720, p=0x555558765720, alloc=0x555555562d70 <g_Alloc>)
    at src/LzmaEnc.c:545
#2  LzmaEnc_Alloc (allocBig=<optimized out>, alloc=0x555555562d70 <g_Alloc>, keepWindowSize=<optimized out>,
    p=0x5555587656b0) at src/LzmaEnc.c:2561
#3  LzmaEnc_AllocAndInit (p=0x5555587656b0, keepWindowSize=0, alloc=0x555555562d70 <g_Alloc>,
    allocBig=0x555555562d70 <g_Alloc>) at src/LzmaEnc.c:2717
#4  0x000055555555f2a7 in LzmaEnc_Prepare (allocBig=<optimized out>, alloc=<optimized out>, inStream=0x555558765560,
    outStream=0x0, pp=0x5555587656b0) at src/LzmaEnc.c:2733
#5  LzmaEnc_Encode (pp=pp@entry=0x5555587656b0, outStream=outStream@entry=0x7fffffffdb40,
    inStream=inStream@entry=0x7fffffffdb20, progress=progress@entry=0x0, alloc=<optimized out>,
    allocBig=<optimized out>) at src/LzmaEnc.c:2904
#6  0x000055555555794f in Encode (fileSize=<optimized out>, inStream=0x7fffffffdb20, outStream=0x7fffffffdb40)
    at src/lzma_api.c:248
#7  lzma_run (inputStream=inputStream@entry=0x555555557280 <inputCallback>,
    inputContext=inputContext@entry=0x7fffffffdc80, outputStream=outputStream@entry=0x5555555572e0 <outputCallback>,
    outputContext=outputContext@entry=0x7fffffffdc80, compress=compress@entry=true) at src/lzma_api.c:286
#8  0x0000555555557a3d in lzmaCompress (inData=<optimized out>, inLen=<optimized out>, outData=0x7fffffffdcf8,
    outLen=0x7fffffffdd00) at src/lzma_api.c:305
#9  0x000055555555f6a0 in doThing () at main.c:26
#10 0x00005555555551a7 in main () at main.c:37
``` this is so true
#

very easy to understand so simple

silk eagle
#

what am i looking at

peak acorn
#

stacktraces of LZMA library

silk eagle
#

that makes sense, understandable

peak acorn
#

I have to remove all dynamic memory allocations

twilit beacon
#

would it be possible to write a whole app for android in c++ or c? i know people mostly use kotlin and java for that, but the c languages?

#

i dont see why not but the languages arent that used for mobile developing so there must be a reason

bright geode
# twilit beacon would it be possible to write a whole app for android in c++ or c? i know people...

There's an NDK so it's possible, and you still need their studio thing to do it (https://hackaday.com/2020/05/13/writing-android-apps-in-c-no-java-required/). While there are some technical reasons why writing entire apps in C++ may not be ideal (such as JNI switching overhead without workaround, portability challenges, etc), it's mostly avoided just because there's so much native support for Java, which has been blessed by Google as "preferred" with their SDK. With that said, C++ is still often utilized in the form of libraries, especially for mobile games. (at least, that's my understanding. Take this all with a grain of salt; I have no experience with android dev)

hollow basalt
bright geode
twilit beacon
bright geode
#

In a sense, but backwards. The execution path needs to leave the JVM and execute on the native hardware. That often requires moving around a lot of resources. Sort of, but not exactly like, having the JVM on a desktop launch a native application.

#

But as I mentioned; mostly the reason for people using Java et al is their official support. I think the NDK has a limited subset of the regular Java API available to it, and none of the frameworks obviously. Another friction point is that beyond just the technical lack of support, there's also a lack of community support. If you run into problems, it will be quite difficult to find resources to help you out since the rest of the ecosystem is all written in the preferred languages

cloud knot
#

there is no JVM, nor Java on Android. The primary reason for not doing stuff in NDK is because it makes mostly no sense. Yes, you can code whole app in NDK, but why would you

bright geode
#

ah correction, i was thinking of Dalvik (DVM), but it seems my information is ancient
thanks!

cloud knot
#

it's complicated, but the point is that Java/Kotlin code is compiled into Dex/ART bytecode; native code is, well, native code. You still need to have the classic stuff like Android Manifest etc, but for most use cases, it makes no sense to code the whole application in something like C/C++; more often than not it is best to do huge parts of application in Java/Kotlin code and only performance parts would be in native code. You don't want to waste your time in doing stuff like "main game menu" in native code if you don't have to.

#

or to be more specific 🙂
Java/Kotlin is compiled to Dex (interpreted bytecode), which is compiled into ART (native code for specific platform). So if you are fine with feature set of the Java/Kotlin code and expense of some stuff like handling garbage collection, you just ignore native code

hollow basalt
#

yes

simple harness
#

time to get back into some assembly coding 🙂

peak acorn
#

yuck!

hollow basalt
#

Imagine

umbral dove
nocturne galleon
#

bro writing assembly but still using a python script to build

#

bro please just use sh/bat or something

midnight wind
#

It is used a lot nowadays

#

Ansible is an example

grave jasper
cloud knot
hollow basalt
#

drag & drop is nice. until it doesn't work and can't fix it using the tool used

#

then you regret your decision and just go back to doing it programmatically

silk eagle
#

before I go out and start spending my free time relearning RoR, is there anything that is preferred over rails nowadays? (regardless of lang)

grave jasper
#

if you need more performance golang, rust or elixir might be a better choice. If you want to do machine learning Python makes more sense. Enterprise world still widely uses Java/Kotlin and C#, sometimes node.js. And of course most of the web runs on PHP, so that's the most popular choice

#

and if you mean another framework for Ruby then Hanami got a little bit of traction, but not enough to mention it yet

silk eagle
#

I guess a better wording wouldve been 'what alternatives are there' but that's exactly the kind of answer I was looking for, thank you.

next cipher
#

one of my colleagues has actually been doing some work w/ custom editor panels/controls in unity for drag-and-drop scripting of things like level interactions/missions

#

it's a great time saver for stuff that works well as visual diagrams

#

but only because we all understand and can write the underlying scripts/level definitions, and have no problem dropping back to that as needed

ornate summit
#

Does anyone know much about reverse engineering Unity games?

misty thorn
#
--  03:10:18.872   ▶ 2 seconds lagging. (x3)  -  Server - Ping:23
--  03:10:22.888  NobleBuild loaded successfully.  -  Server - ExperienceMain:9
--  03:10:24.904  4 seconds lagging.  -  Server - Ping:23
``` got lag detect and pingin' finally working *not
glass iron
#

Hey guys anyone know some c# to help with my assignment? I'm so lost and idk where to begin

#

here is a screenshot

#

A hint on where to start would go a long way its due tomorrow and I'm panicking

glass iron
#

yes

#

no idk where to begin w this

#

yeah but ever1 comes from foundation year or previously learnt c# this is new to me
all we learnt were concepts and exercises never a question like this

#

things like basically completing a code or finding the mistake

#

That would be appreciated

#

we are gonna learn gui but haven't yet

#

my teacher said to create a method and use a while loop that checks the player's answer

#

but I still have no idea how to

#

its morning

#

but i have class in 1hr

#

ill dm u when i get back sounds good?

#

Thanks again for the help

arctic tusk
simple harness
rigid gust
#

i'd rather write python than sh tbh

slim bluff
#

ive been working with a mysql database, trying to encrypt the data i store in it. But for this you need a key, which you of course want to store safely. Storing this in another database with encryption raises an issue however, since you will need to save those keys as well and that just dumps me into a rabbithole of keys. What is the industry standard in this?

rigid gust
#

hashicorp vault also exists

slim bluff
#

ahh so its stored differently than just yeeting it into a db

#

that would make more sense than whatever i was thinking for sure

rigid gust
#

the reality is you are going to need to have the unencrypted secret accessible somewhere, you just have to put proper permissions and safety in place

rigid gust
slim bluff
#

Yeah its already locked behind admin permissions and locally hosted without any opened ports or anything, so i think its already safer than ill ever get

slim bluff
rigid gust
#

i was using this when working with kubernetes lol

#

and nixos containers

slim bluff
#

Its more complex than i need, i think creating a small algorithm to code and decode a couple thousand keys internally will suffice

rigid gust
#

wait

slim bluff
#

The db is only accessible through the admin route, so anything done will inadvertedly return the data unencrypted anyways

rigid gust
#

how do you plan to encrypt the data?

slim bluff
#

AES_EN/DECRYPT

#

in mysql i should mention

storm berry
glass iron
rigid gust
#

im dying from quartus

fervent thicket
next cipher
#

well you probably should start with the logo on the left, then some text, and on hover you move the logo out and move the arrow in... that's my idea

#

or are you just looking for someone to do your homework for you 🤣

silk eagle
#

ill stick with my transform scale(1.04) buttons

fervent thicket
next cipher
#

fair enough, sorry for assuming (a lot of people show up in here trying to get homework help)

#

CSS transitions provide a way to control animation speed when changing CSS properties. Instead of having property changes take effect immediately, you can cause the changes in a property to take place over a period of time. For example, if you change the color of an element from white to black, usually the change is instantaneous. With CSS trans...

#

read up on how transitions/animations work in this scenario

hybrid mesa
#

So, I have this project model that has an owner, which can be either a User or a Team

const projectSchema = new Schema<IProject>({
    projectName: { 
        type: String, 
        required: true 
    },
    description: {
        type: String,
        required: false
    },
    site: { 
        type: String, 
        required: false
    },
    owner: { 
        type: Schema.Types.ObjectId, 
        required: true,
        refPath: 'ownerModel'
    },
    ownerModel: {
        type: String,
        required: true,
        enum: ['Team', 'User']
    },
    slug: { 
        type: String, 
        required: true,
        unique: true,
        dropDups: true 
    },
    keywords: { 
        type: [String], 
        required: true 
    }
})```

The problem I'm having is when the owner is a team, because teams can have multiple owners, like this
```ts
const teamSchema = new Schema<ITeam>({
  teamName: { 
    type: String, 
    required: true
  },
  owner: { 
    type: [Schema.Types.ObjectId], 
    required: true,
    ref: 'User' 
  },
  slug: { 
    type: String, 
    required: true,
    unique: true
  },
  bio: { 
    type: String, 
    required: false 
  },
  verified: { 
    type: Boolean, 
    required: true,
    default: false 
  },
  quote: { 
    type: String, 
    required:false
  },
  members: [{ 
    member: {
      type: Schema.Types.ObjectId,
      ref: 'User',
      required: true
    },
    status: {
      type: String,
      required: true,
      enum: ["accepted", "pending"]
    },
    type: {
      type: String,
      required: true,
      enum: ["admin", "coworker"]
    }
  }],
  followers: { 
    type: Number, 
    required: true 
  },
  logo: { 
    type: String, 
    required: false 
  },
  type: { 
    type: String, 
    required: true 
  },
})```

And while I got to populate the owner field of the project (aka loading the team), I can't for the life of me make the owner of the team neither the members of it load via populate.

I tried owner.owner, tried altering the model to not use an array, tried using deepPopulate plugin but got a type error. Nothing worked
#

Does anyone have a suggestion?

rose ravine
#

take a look at the actual database schema, i'm going to bet that it's only going to allow users to be referenced. What's the stack you're currently using?

whole wigeon
#

hey can anyone explain how can I do this table in excel ?

#

sorry if the question is off topic

chilly raptor
#

Select multiple cells and select merge & center under alignment.

whole wigeon
#

tried that but the issue is that merge and alignment is disabled for some reason

chilly raptor
#

The table tool is a bit finicky, so you may have to merge first, then format as table.

whole wigeon
#

i see

#

thanks

ornate summit
#

Do any of you guys have ideas for remote development jobs I could apply for?

hollow basalt
#

You should know what you want

fossil eagle
#

Hi I know the basics of html and css, but I want to get somewhat more in depth of it, does someone knows a good guide or tutorials that could help?

rancid nimbus
fossil eagle
#

great ty

ornate summit
#

Every position I apply for is a no, so I guess I'm just screwed and need to work a crappy job forever.

silk eagle
#

how many did you apply to

#

took me 60+ applications and 12 interviews to get my first entry level position earlier in the year

#

no hs diploma no degree

#

just keep applying, build ur skills while doing so, if you get an interview and it doesn't go well, ask why it didnt go well. if they tell you that you aren't qualified for a position, ask if they have any other open positions that you would be qualified for, etc. interviews are where u dont have to be a resume in a chrome tab.

#

they're where you have to be code in a chrome tab Plight

spring cradle
#

is polling or event based joystick more useful for game programming?

peak acorn
#

Probably polling for most things youd wanna do

peak acorn
# silk eagle no hs diploma no degree

Idk if I got extremely lucky. But when i started searching for internships, after only 2 applications, the first one had gotten back to me and ended up hiring me. Now they gave me a pretty sweet job offer.

That said, I'm looking to move away from that company and having some struggles, so maybe im not so epic awsomly programmer as current company thinks

silk eagle
#

I'm convinced that recruiters go through a ton of candidates just to be like "hey guys im finding the best people, it'll take a while". job security

ornate summit
#

I've applied to over 100 positions and never got an interview, I've been programming for over a decade.

silk eagle
#

programming for a decade, but how long have you been applying for

ornate summit
#

Over a year.

hollow basalt
#

applying for a year, but how long have you been trying

sick inlet
# silk eagle I'm convinced that recruiters go through a ton of candidates just to be like "he...

You just need to learn to catch their interest. If you read the job listing you'll see what they specifically look for, tailor your application to that.

Do you know how many people just apply and don't even bother catering the application to the specific company in question or don't even read the listing at all? Also if the recruitment company is using an online portal it's specifically to easily filter out people who don't meet the basic requirements.

#

Or you don't have the skills they're looking for? What programming have you done for over a decade?

wind horizon
#

I’d deff take a step back and analyze what your applying to, your skills, and your resume. If you have been programming for over a decade, applied to programming jobs for over a year and over 100 positions with 0 interviews then something sounds very off.

#

When you say over a decade are you saying professionally / as a full time job or has a hobby / side gigs? Those at every different things and may help set the context and what type of role you should try applying to.

restive ore
#

I'm being offered a previously owned fujitsu U757 fujitsu laptop. it has this processor (the weaker one)
https://cpu.userbenchmark.com/Compare/Intel-Core-i7-8550U-vs-Intel-Core-i5-7300U/m320742vsm223355
but it has a single slot 8GB of memory that I may be able to upgrade to a double slot of 8GB (16GB total). My currently laptop is a Lenovo with the i7 above but only 8GB of RAM. Would it be worse switching for the weaker processor even with the extra RAM? I'm in uni but I have one subject that Spring in Java + ReactJS, which tends to take some time to compile.

cloud knot
restive ore
#

oh crap I forgot to check core count yeah

cloud knot
#

what is your current laptop model ?

restive ore
#

Lenovo ideapad 320-15IKB bought in 2018

#

Wish my teacher at the time hadn't said 8GB was enough

cloud knot
#

well

#

you could upgrade it to 16GB module if you really wanted

#

see the Maintenance section:

After removing the numerous screws, the cover can be removed relatively easily with a little skill and a suitable lever.

#

you just remove the original memory module and put in a 16GB module, they cost around 50-60 euros for a 16GB module ?

stone marlin
#

I am creating a new database and related schema to be able to monitor an experiment and multiple samples of data. I am thinking of creating a table for every experiment run, and then having a many-to-one relationship of another table (samples) and having a key in the samples table relating to the experiment created in the experiment table.

Because the samples taken happen almost immediately after the experiment is started and an experiment record is created, I am wondering what the best way to keep track of the ROWID pk (sqlite3) key would be so that I could insert this as part of the sample record created. Is it appropriate to do something like SELECT MAX(ROWID) FROM experiment LIMIT 1; and set the result to a global to share with the rest of the program?

restive ore
#

My model has 2 slots, and an amd gpu

cloud knot
#

so while 4+16GB is not perfect, it is better than being RAM limited

storm berry
peak acorn
#

I really doubt that dropping half your cores for more ram is gonna be faster

rancid nimbus
#

I switched from using 4 cores (really threads) to using 1 core (really thread) and on some large project to build in one hour instead of not being able to build in 12+ hours.

hollow basalt
#

oh much, really thread

waxen river
halcyon lintel
#

so i have created a little html site with a button which plays an audio when clicked. but, when i run the code via the html file rather than through VS Code, the audio doesnt play
can anyone tell me why?

#

nvm it started working

spring cradle
#

got a controller working in terminal ui, now to actually start making a game with it haha

peak acorn
#

🤨

#

Is that thru ncurses or smth, how u displaying?

spring cradle
#

tcell

#

i couldnt find any library that split a char into 2 pixels

#

i mean there was termloop but thats old

#

i think ppl recommended tcell over termbox based stuff

peak acorn
#

Cool

spring cradle
#

now draws a line between locations of the analog sticks

silk eagle
#

will buy for $70 when it releases

spring cradle
#

its alive!

peak acorn
#

twin stick shooter?

spring cradle
#

possibly? top down

twilit beacon
#

what would be the quickes way of filling a char array with chars first and then adding another special char every so often (like every 10 times or so). I thought of iterating it but there has to be a better, faster way, no?

sly marten
#

You can however split a string into a char array

twilit beacon
twilit beacon
#

isnt it just a char array?

sly marten
#

It does depend on the language you use and where you’re getting the characters to fill the char array with

#

I have no idea about C or C++, but I also didn’t see you mention your language anywhere

twilit beacon
#

i forgor

sly marten
twilit beacon
#

c is a very goofy language

midnight wind
twilit beacon
#

its just that im not used to seeing a string that is defined as an array of chars (even though thats what it actually is in reality)

midnight wind
#

c is lower level than other languages

#

more direct

twilit beacon
#

i know, i just said it just isnt something im used to looking at

#

can anyone tell me the most efficient way of adding a char every so often (every 10 lines) but in a way of pushing the right hand chars for 1 index to the right/ just squeezing a value in

#

as in 1 1 1 1 1 1 and then 1 1 1 . 1 1 1 so we squeezed a . there

weak rain
#

for (int i{0}; i < array.size(); i++)
{
if (i%10 != 0)
{ array[i] = 'a'; }
else
{ array[i] = 'b'; }
}

rigid gust
storm berry
rigid gust
heady lagoon
#

Anyone use Dreamweaver with FTP? Mine won't connect and I can't figure out why 😠

hollow basalt
#

dreamweaver

bright geode
# twilit beacon what would be the quickes way of filling a char array with chars first and then ...

Fundamentally, the operation must require iteration at some point if the number of bytes you need to write is larger than what the architecture can move into memory in one go. Even most memcpy implementations just do a while assignment loop https://stackoverflow.com/questions/19187562/understanding-the-implementation-of-memcpy

However, iterating over char sized elements can be wasteful when most architectures are capable of moving much more than a single byte at a time.

There are some complexities and caveats here about different languages and their object models etc. (especially in the case of C++, avoiding undefined behavior can be tricky). But the simplest terms: if the memory is sufficiently aligned and divisible by a larger unit, you can treat the underlying buffer as said larger unit, such as a 64 bit unsigned integer, and assign 8 bytes at a time instead of 1. The optimizer and processors are pretty smart and can do a lot of heavy lifting, but in some cases it can be illegal to perform certain optimizations depending on the code you write. If you can control the sizes involved, you can see some "significant"* improvements just by doing a simple hack like this. If you add further constraints, such as compiler specific behavior, or platform specific instructions; you can get even more performance by using some extensions and inline assembly.

Regardless; I'd probably fill it with junk first, then go back and insert your special values. In most cases, that will keep the operation predictable and cache hot. But really, what's optimal will change based on the length, access patterns, and locality.

  • Which brings me to the fact that everything i mentioned here is a micro-optimization, and often premature optimization. I write code for time and resource constrained systems where that speed often matters, but it may not for you. The only way to know, and know which optimizations actually matter is to measure it.
hollow basalt
#

development

silk eagle
#

what up #development, having an existential crisis, can someone tell me new things that are happening in software engineering

#

most recent things I can think of that are like long-term grand-scheme cool are containerization, blockchain was a cool concept, then it was like the internet or something before that, but im starting to feel like my code is going to replace me.

#

are holograms out yet

next cipher
#

i think we have very different ideas of what constitutes a meaningful advancement in the grand scheme of things... for my money, large language models are probably the next big thing

#

not that i think most of the hype is justified... a lot of people don't understand the implications and what machine learning actually does

#

but there are some interesting use cases

celest junco
rigid gust
#

it doesnt but not to the same extent

celest junco
#

C still maps pretty closely to underlying assembly

#

In asm the memory model is still flat and instructions are still thought to be executed in sequence

weak rain
#

can map to hardware is not the same as always maps to hardware... assembly is inconvenient cuz its closer to the latter than most languages

#

c++ is the language which is best at doing both hardware and humanfriendly abstraction, additionally it's 0 overhead in its abstractions, which makes it faster than assembly

ornate summit
#

What in the world was that GL function that allows you to batch a bunch of GL commands together into a single call?

ornate summit
red mulch
red mulch
wind horizon
# silk eagle most recent things I can think of that are like long-term grand-scheme cool are ...

A lot of meaningful advancements happen over time built on much smaller ones. Also it is hard to say what is a meaningful advancement to one person vs another, since it kind of depends what your field is.

If your in the web space I’d deff keep an eye on wasm + Rust, I think that can unlock some very interesting things we can do on the browser. Especially with the work being done for wasi which should unlock some IO access for wasm.

We have already seen video games and entire video editors put in the web with wasm, the future could be very interesting if your browser can run many applications that had to be installed.

#

Ofc it doesn’t have to be Rust for wasm, but I enjoy Rust and it’s having really good community support in wasm right now. Who knows how it’ll shake out in 5 years or so though.

mint tide
#

so im trying to use Mediapipe pose to run FBT in VR, it connects to Steam VR but im getting error 138 and a pose attribute error, idk what to do from here... it runs on python IIRC. Ik the TCP is a communication error but i have no idea how to solve it

restive ore
#

Does anyone know of Somewhere you can find examples of using win32 IDesktopWallpaper in C++?
Couldn't find examples by searching for both the import of the header and for IDesktopWallpaper.

#

Wanna test something with IDesktopWallpaper::AdvanceSlideshow function but having issues calling it (never programmed c++, have programmed in others)

rancid nimbus
#

Why do programs try to read from /dev/null? I see no reason as to why right now.

bright geode
rancid nimbus
#

So then why would an init program create three fds for /dev/null? Just because they are writing nowhere or maybe something else?

bright geode
rancid nimbus
#

So, I looked at readlink /proc/1/fd/* and found 3 instances of /dev/null the flags are 0100002

#

I think I would have to SRE the binary to figure out what it is trying to do there.

#

Wait, 0, 1, 2 are stdin, stdout, and stderr.

#

That means no output and no input.

#

That makes sense now. If it doesn't have an input then there isn't an fd 0, which would display as /dev/null!

bright geode
# restive ore Does anyone know of Somewhere you can find examples of using win32 IDesktopWallp...

I threw together a small example for you. https://pastebin.com/szY2nMB0

When you run the program, it should advance the wallpaper forward (because the first parameter is NULL: if you have multiple monitors, it will advance whichever is next in line to change).

Since you're also new to C++, this may be a bit daunting, but I decided to make it more like what you'll see in modern C++ rather than most of the older C style win32 COM examples that you may find out there.

Working with OS code is always a bit weird, and the COM API is even less beginner friendly than that. AdvanceSlideshow is a method for an object but the only way to create that object is to first initialize COM on the executing thread and then call a function which talks to the service and returns a pointer to the object via an out parameter. When you're done, you need to clean up these resources by calling the Release method on the object and then 'uninitialize' COM. Because of this, my example has an emphasis on using object lifetimes to automate resource clean-up in a safe way (referred to as the 'RAII' principle https://en.cppreference.com/w/cpp/language/raii)

I didn't comment any of the fundamental language syntax, so if you're confused about anything please let me know.

restive ore
# bright geode I threw together a small example for you. <https://pastebin.com/szY2nMB0> When ...

forgot to responde here but ty, it worked.
I compiled it on visual studio btw. I managed to change it so I can set my own timer to advanceslideshow, using sleep. One thing this made me realize is that I will stay the hell away from c++ for the future. Already had a bad time with C and it seems to be worse, but that's also because I'm used to more object oriented languages that have garbage collector like java, kotlin, python

hollow basalt
#

next time try

#

c++ V2

bright geode
# restive ore forgot to responde here but ty, it worked. I compiled it on visual studio btw. I...

Glad to hear it helped :D

If you were to do this in C (sans error checking) it would look more like...```c
CoInitializeEx(COINIT_APARTMENTTHREADED, tag)
IDesktopWallpaper* our_new_resource;
CoCreateInstance(
CLSID_DesktopWallpaper,
NULL,
CLSCTX_LOCAL_SERVER,
IID_IDesktopWallpaper,
(void**)&our_new_resource);

AdvanceSlideshow(our_new_resource, NULL, DSD_FORWARD);

// now cleanup
Release(our_new_resource);
CoUninitialize();```

but in C++, we can utilize object destructors to clean up our resources automatically when we leave scope. C++ can be a giant headache due to the complexities; but with abstraction we can write code that's both safer and more expressive.

const raii_com com; // com and wallpaper are both error-checked
const auto wallpaper{ desktop_wallpaper_factory(com) };
wallpaper->AdvanceSlideshow(NULL, DSD_FORWARD);```

What's scaring you is all the noise of setting up those objects...

When you really get going with modern C++, like using the STL containers, ranges, and algorithms; you can start to really see where it can be more high level than C and more like what you're familiar with (no more writing linked lists by hand :P )
peak acorn
#

I don't 🙂

hollow basalt
#

He dont

real palm
#

I am 15 years old and I am into development and coding for about 2 years, I want to learn backend, is there a roadmap or course you can recommend?

distant wadi
#

anyone who can help on varnish?

hollow basalt
cinder ibex
vestal spire
#

which one is better in taking notes/writing coding docs?
plain markdown or notion?

bitter edge
#

anyone know anything about resistors

cinder ibex
#

Also sorry if I left pings on 😅

bitter edge
#

it's fine

#

do u know how to calculate what resistor I should use

cinder ibex
#

Do you know the supply voltage in your country/state?

bitter edge
#

uh no

cinder ibex
#

I think you can find that on Google, where do you live?

bitter edge
cinder ibex
#

Yea that’s cool

#

And what other parameters do u have? Like current, power anything?

bitter edge
#

lemme read the datasheets hold on

cinder ibex
#

For like whatever you’re making

bitter edge
#

for the uh usbs

#

and this is for the usb-c

#

and this is what I have

cinder ibex
# bitter edge

Your peak current can be 1.5 x 1.414 so theoretically around 2.25 A

bitter edge
cinder ibex
#

And if your supply gives 120V then you will ideally need a resistance of 120/2.25 ohms

#

But however this can vary practically so it’s always best to seek a resistor of a slightly higher resistance

bitter edge
cinder ibex
#

You’ll be using a battery?

bitter edge
#

it's gonna go into my phone so I can have a keyboard and mouse :))

cinder ibex
#

That goes too far beyond my knowledge sorry!

bitter edge
#

well damn ;- ;

cinder ibex
#

Because multiple sources leads to multiple complications like orientation, biasing on your circuit’s transistor etc.

bitter edge
#

well do you think it'll need a resistor it do you think it can handle itself

cinder ibex
#

It will definitely need a resistor as a circuit with 0 ohms draws no current

bitter edge
#

i mean my phone can't give out that much power i know that

cinder ibex
#

The fans in your PC maybe have no resistance of their own, but the plugin to your power supply adds a resistance to complete the corcuit

bitter edge
#

corcuit

bitter edge
cinder ibex
#

No idea what happens to voltages outside of direct wall power

bitter edge
#

damn

cinder ibex
#

Your phone’s power delivery circuitry is probably quite more complex than a the simple AC or DC source in your wall

bitter edge
#

i'm going to have to learn about resistors and capacitators now

cinder ibex
#

Well AC wall sources are never DC

bitter edge
#

i usually just have 2 parts and wires running through them

#

Fan powered by phone

#

Can't show phone bc I had to take a picture

bitter edge
#

@thorny cypress

import random

while True:
    print("Lets play a game...")
    num1 = random.randint(1, 500)
    num2 = random.randint(1, 500)
    print("What is " + str(num1) + " + " + str(num2) + "?")
    answer = input("Your Answer : ")
    if answer == num1 + num2:
        print("Correct! The answer is " + str(num1 + num2) + "!")
        con = input("Do you wish to continue? (Yes or No) : ")
        if con == "Yes":
            print("Ok trying again!")
            continue
        elif con == "No":
            print("Ok closing...")
            quit()
    else:
        print("Wrong ! The correct answer is " + str(num1 + num2) + "!")
        con = input("Do you wish to continue? (Yes or No) : ")
        if con == "Yes":
            print("Ok trying again!")
            continue
        elif con == "No":
            print("Ok closing...")
            quit()
``` What's the next challenge you have for me
twilit beacon
#

finished the base of my rendering engine. completely vanilla c libraries. the text beneath says whether or not the point is seen and some coords and stuffs. tomorrow ill add some other stuff but in the end i hope itll become a full 3d game. the perspective is lagging alot, unfortunately my laptops bad but its a start nonetheless

#

will add optimisations later, as of now its ~90 lines with comments and spaces

twilit beacon
#

yo cool

bitter edge
#

no it's not

#

it's like 40 lines of code

silk eagle
#

gotta start somewhere bro

twilit beacon
bitter edge
twilit beacon
twilit beacon
#

in python?

bitter edge
#

yep python

twilit beacon
#

ah yeah

bitter edge
#

@thorny cypress

smoky shore
#

delete
from emp
where sal in (select sal from ( Select sal from emp e where sal < (select avg(sal) from emp where e.ndep = ndep group by ndep))x)
[21:28]
my solution to a query that i have to delete every employee that receives less than their department average
[21:28]
it works
[21:28]
but i have to disable foreing keys
[21:28]
or delete them from the database
[21:28]
and i dont know if i can do this because my teacher never talked about foreing keys

thorny cypress
# bitter edge <@265344440715968515>

Look into learning how to define functions, learn to manipulate lists, then look into how to read and write files. From there things open up. I’m not a professor or anything, so I can’t tell you what’ll teach you the best.
You should really make sure you understand the concepts before you move on, though. You’ll have a rough time loading image recognition libraries if you’re still having to grapple with syntax.
And finally, perhaps most importantly, learn to look stuff up. The big secret among programmers as to how we remember so many different instructions is that we don’t, we understand the concepts and how to implement things and google the specific syntax. Understanding the logic is a lot more important than memorizing the exact intricacies of the map() function.

#

If you want a specific exercise, easy-ish one that you can do with just while loops is a number guessing game where you guess a number and it’ll tell you if it’s higher or lower until you get it right. Then, learn lists, and see if you can’t make hangman or tic tac toe. Don’t worry about dealing with graphics, again, low level stuff is a lot more important.

hollow basalt
#

👍

ionic olive
hollow basalt
#

then jsut use VSC

lament cave
silk eagle
#

sometimes you can just tell who was a hawk in a past life

bitter edge
#

bc I gotta question

hollow basalt
violet surge
#

Is anyone familiar with .m3g files? Old 3d model file developed for nokia for mobile games. Trying to convert it into a different format so other programs can open it. Found no success trying it myself.

bitter edge
#
import random
import tkinter.messagebox
from tkinter import *

window = Tk()
window.geometry('400x200')
window.configure(bg="black")
startMsg = Label(text="PyGame", font=('Times', 40), bg="black", fg="white")
startMsg.pack()


def gameWindow():
    game = Tk()
    game.title("PyGame")
    game.geometry('400x200')
    game.configure(background="black")
    num1 = random.randint(1, 50000)
    num2 = random.randint(1, 50000)
    sum_num = num1 + num2
    startMSg = Label(text="Lets play a game...", font=('Times', 40), bg="black", fg="white")
    question = Label(text="What's " + str(num1) + " + " + str(num2) + " ?", font=('Times', 30), bg="black", fg="white")
    answer = Entry(width=50, bg="black", fg="white", font=('Times', 20))

    def onclicksubmit():
        if not answer.get().isdigit():
            tkinter.messagebox.showinfo(title="Error!", message="You can only use numbers!")
        else:
            if int(answer.get()) == int(sum_num):
                tkinter.messagebox.showinfo(title="Correct!", message=f"The answer was {sum_num} !")
                yesOrNo = tkinter.messagebox.askyesno(title="Continue?", message="Do you wish to play the game again?")
                if yesOrNo:
                    gameWindow()
                game.quit()
            else:
                tkinter.messagebox.showinfo(title="Wrong!", message=f"The correct answer is {sum_num}!")
                yesOrNo = tkinter.messagebox.askyesno(title="Continue?", message="Do you wish to play the game again?")
                if yesOrNo:
                    gameWindow()
                game.quit()
    submit = Button(text="Submit Answer", background="gray", fg="white", font=('Times', 15), command=onclicksubmit)
    startMSg.pack()
    question.pack()
    answer.pack()
    submit.pack()
    game.mainloop()


def startgame():
    window.destroy()
    gameWindow()


button = Button(window, text="Start!", activebackground="lightblue", bg="grey", command=startgame, fg="white",
                font=('Times', 20))

button.pack()
window.mainloop()

so I have this code and for the most part it works fine

#

but when yesOrNo is true it creates itself inside an existing window and opens a blank one up

nocturne galleon
#

No clue sorry

bitter edge
#

basically this is what it does

spring cradle
#

are you creating a new tk when you call stuff? i thought you pass around the result of Tk() to functions

spring cradle
# bitter edge wdym by that

like, a window is created by calling Tk(), so arent you creating a new tk window every time Tk() is called? which is whenever you enter the true part of the yesorno

hybrid walrus
#

seems like u are trying to make a game in tkinter.
For simple game dev in python i would just recommend pygame since its extremely easy and all the window management is pretty much already taken care of.
Tkinter isnt known as the best for application dev, especially game dev

#

game loops and everything in pygame would make ur code so much easier and readable

#

if you dont want to use pygame, there is also PyQt (probably the best for applications in my opinion)

bitter edge
#

it's just this but with gui

import random

while True:
    print("Lets play a game...")
    num1 = random.randint(1, 500)
    num2 = random.randint(1, 500)
    print("What is " + str(num1) + " + " + str(num2) + "?")
    answer = input("Your Answer : ")
    if answer == num1 + num2:
        print("Correct! The answer is " + str(num1 + num2) + "!")
        con = input("Do you wish to continue? (Yes or No) : ")
        if con == "Yes":
            print("Ok trying again!")
            continue
        elif con == "No":
            print("Ok closing...")
            quit()
    else:
        print("Wrong ! The correct answer is " + str(num1 + num2) + "!")
        con = input("Do you wish to continue? (Yes or No) : ")
        if con == "Yes":
            print("Ok trying again!")
            continue
        elif con == "No":
            print("Ok closing...")
            quit()```
bright geode
# bitter edge ```py import random import tkinter.messagebox from tkinter import * window = Tk...

I'm not too sure what's going on with your screenshot, because when I run your code i get multiple root windows rather than it duplicating like that. But anyways, you're not calling game.destroy() when you call gameWindow(). I'd recommend putting it above the if yesOrNos, since the window gets destroyed either way.

As a side note: that variable name is a bit odd. I'd probably use something like playAgain. You can also restructure that if answer == num1 + num2 to eliminate the duplicated code because the behavior and logic is identical for both branches; only the strings change. Also, Ideally, you would redesign this with a more object-oriented style to more easily do all of this within the same root window (only calling Tk once); but how you currently have it is fine for simple stuff & learning purposes.

thorny cypress
lilac pebble
#

any idea how I could decode a json file like this?

#

I want to get subtrees of each node

silk eagle
#

in what language

silk eagle
#

Yes, you can decode JSON in a lot of languages but I was wondering if they had one they preferred to use

#

anyway, @lilac pebble something like this in Python, probably:

import json

class Node:
    def __init__(self, nodeId: int, subs: list = None, isRoot = False) -> None:
        self.id = nodeId
        self.subs = subs
        self.isRoot = isRoot

def GenerateSubs(subNodes: list):
    newNodes = []
    for node in subNodes:
        newNode = Node(
            nodeId = node["nodeId"],
            isRoot = node["root"] if node.get("root") is not None else False
        )
        if node.get("subs") is not None:
            newNode.subs = GenerateSubs(node["subs"])
        newNodes.append(newNode)
    return newNodes
            
def IterateSubs(node: Node) -> list:
    nodeIds = []
    for subNode in node.subs:
        if subNode.subs is not None:
            for x in IterateSubs(subNode):
                nodeIds.append(x)
        nodeIds.append(subNode.id)
    return nodeIds

if __name__ == "__main__":
    with open("test.json", "r") as jsonData:
        nodeData = json.loads(jsonData.read())
    
    node = Node(
        nodeId = nodeData["nodeId"],
        subs = GenerateSubs(nodeData["subs"]),
        isRoot = nodeData["root"] if nodeData.get("root") is not None else False
    )
    
    print(IterateSubs(node))
bitter edge
silk eagle
#

(barely tested)

lilac pebble
#

I can get by name, but I don't understand getting by subsection

lilac pebble
midnight wind
#

Arduino isn't a language

lilac pebble
#

yeah C/C++, but I'm using the ArduinoJson library

midnight wind
#

You can probably just find a lightweight json Libra

midnight wind
silk eagle
#

i'm just happy to participate in things so I probably wouldve shared my python version of the solution regardless of whether c/c++ was specified

#

gives me a good opportunity to possibly get criticisms n stuff

stark saffron
#

Hi, I am doing application in java and I want to build like "chessboard" not generated but every block of it need to have address like in excel "A15, B5 ....", and in each of them I put image or button and others..... For example program called "Railroad & TrainController" has this feature.
I am using swing and awt for beginning. If I need to use javaFX I can use it. But I am not sure how to do it (the feature what I need), if there is existing library.

silk eagle
peak acorn
#

Recursion counting game :)

bitter edge
# thorny cypress If you want a specific exercise, easy-ish one that you can do with just while lo...
import random

while True:
    number = random.randint(0, 10)
    print("Can you guess the number?")
    answer = input("Guess : ")

    if answer.isdigit():
        if int(answer) < number:
            print("Sorry! But " + str(answer) + " is to low.")
        elif int(answer) > number:
            print("Sorry! But " + str(answer) + " is to high.")
        elif int(answer) == number:
            print("Correct! " + str(answer) + " was the answer!")
    else:
        print("The guess needs to be a number!")
        continue

so I have the base code but how do I stop it from generating a new number if you get it wrong?

silk eagle
bitter edge
silk eagle
#

no

bitter edge
#

I want something like that

#

when the loop restarts a new number is generated

silk eagle
#

have you learned functions yet?

bitter edge
silk eagle
# bitter edge

in this one if you go into generateNumber() and put return number at the bottom, then above the while True put number = generateNumber() it'd work, but my advice without giving you the entire solution is... you can have 2 while loops, for example... while guess != num:

twilit beacon
# bitter edge

please just make a plan first. Say "ok firstly i need to make the window, then x function needs to start, after that y function etc." and build the game on that. when you are going to be making bigger projects, that blueprint will help you a lot

bitter edge
twilit beacon
bitter edge
#

I don't plan on making it my career

twilit beacon
#

in neither case its a good practice

deep flicker
bright geode
# bitter edge I don't plan on making it my career

It's not just about being a better programmer or planning for a career. It's basic problem solving and design. Those same thought processes can be applied to many areas of life, just like logical and critical thinking. Ultimately, by practicing this, you'll be saving yourself (and potentially others) a lot of time and headaches. To draw an analogy: just because you're playing a videogame "only for fun" doesn't mean you're limited to button-mashing; strategize and think things thru. You'll probably end up having even more fun.

super high-level / abstract pseudocode may be a useful tool here.

vital tulip
hollow basalt
#

No

bright geode
#

or at least, learning to know what you're doing.

hollow basalt
#

Yea

twilit beacon
twilit beacon
lone tree
#

im trying to look at things i can do with my time to make money, where could i start with web development? Im wary of just googling this because im sure im just gonna get bombarded with ads about the best platform and then just lose interest

bright geode
bitter edge
#

@copper ravine do u think this'll work

copper ravine
bitter edge
copper ravine
#

I don't think that's going to work. Do you know what the pinout of the USB connector is?

copper ravine
#

VCC and ground are the "outer" of the 4 pins

bitter edge
#

ik

copper ravine
#

you should not have any connections on pin 2-3

bitter edge
#

uh for some reason the led has pins for d+ and d-

copper ravine
#

really?

#

are they RGB leds?

bitter edge
bitter edge
copper ravine
#

ok, I2C

bitter edge
#

uh what

copper ravine
#

those are not at all the same signals as USB D+/D-

#

can you link the data sheet for the leds?

bitter edge
#

i mean it's data input and output

copper ravine
#

D+/D- are not data in and out.. they are a differential data pair (so USB)

bitter edge
#

so am I gonna need like a physical button or smth

copper ravine
#

way more than that

#

those leds are controlled via an I2C bus, so a completely different connection from USB

bitter edge
#

oh great things are now getting complcated

copper ravine
#

more so than you probably think tbh

bitter edge
copper ravine
#

you'd need to maybe put a microcontroller on the board that has USB support and maybe write some firmware to control the LEDs (I think it's a shift register or something actually)

bitter edge
#

alr u got me at write firmware

#

time to switch to normal leds

bitter edge
# copper ravine you'd need to maybe put a microcontroller on the board that has USB support and ...
copper ravine
#

no, you will always need at least a resistor with a basic LED

bitter edge
#

uh do you know uh what resistance I'll need

#

I have no idea how to do this math

midnight wind
#

V=IR

#

Figure out resistance needed based on 5v and desired current

#

Found this

copper ravine
zinc swift
#

hey does anyone know any good gui libraries for python?

#

i tried customtkinter but it's eh

worthy cloak
# vital tulip programming is only fun when u know what u doing, i agree 100%

It's frustrating as hell, frankly. It's one thing to know the syntax of any specific language. It's quite another to express what it is you're trying to do in a "best practice" approach. Given multitude of ways to accomplish the same task/goal within the same language, more often than not it's poorly thought-out and constructed.

I respect people that code for a living, but knowing what I've seen in IT over the last 20+ years, hell no, programming isn't for me. I'll stick with basic scripting 🙂

vital tulip
rancid nimbus
#

I was re-working some code that was written inefficiently and somehow the more efficient code runs at nearly the same performance. The limiting factor is still the read speeds of the database (SQLite).

silk eagle
#

🥹

rancid nimbus
#

it reminds me of when I tried to save memory by pulling from the database as it is needed, but when I checked I found it doesn't use any less memory. Thank you caching + overhead of an interpreted language.

humble mirage
#

i wonder, do you think luke or at least one of the floatplane devs do advent of code

hollow basalt
#

why

humble mirage
#

because it's fun (and I would like to see what their code's like)

bitter edge
#

@copper ravine so I'm wondering if you know how to just connect things to gnd

#

in easyeda

halcyon lintel
#

so im creating a function that should run again and again until the condition in while is fulfilled, but it keeps printing a statement infinitely when the condition is the same as while condition

#
        int Am;
        Boolean withdraw = false; 
        System.out.println("Enter the amount to withdraw: ");
        Scanner Withdraw = new Scanner(System.in);
        Am = Withdraw.nextInt();
        do {
            if (Amount >= Am) {
                Amount = Amount - Am;
                System.out.println("'Rs" + Am + "' Has Been Withdrawn!");
                withdraw = true;
                System.out.println("Remaining Balance is: 'Rs" + Amount + "'");
            } else {
                System.out.println("Insufficient Amount... Please Try Requesting Less Amount.");
            }
        }
        while (!withdraw);
    }```
#

heres the code

#

i just realized i started the do while loop after the input code, so thats why the code was running in an infinite loop after being false

hollow basalt
#

Yup

halcyon lintel
#

i swear, i always try to fix a code for like 20-30 mins and wont understand the problem

#

ask for help and i'd notice the mistake within 5 mins

bright geode
#

In software engineering, rubber duck debugging (or rubberducking) is a method of debugging code by articulating a problem in spoken or written natural language. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, l...

copper ravine
torn sail
#

Hi Guys, I wrote a simple excel vba for the user to retrieve some data from SQL database. Me and my team can run it successfully and get the data. However, the user got an error, anyone know what cause the error? (the user is using the same exact excel version with my team--Office 365) (The highlighted row is the error row)

rancid nimbus
#

MS SQL?

torn sail
#

yes

hollow basalt
#

yes

red mulch
#

probably needs ODBC setup

torn sail
#

at first, I thought so too. However, some other excel works (with the same connection to the database, only retrieve other info)

#

Also, I tried with other method to open the connection and it stuck when it's trying to open the recordset

red mulch
#

look, honestly VB and ODBC is super fragile and I hate it with the power of a thousand suns

bitter edge
#

and use the gnd thing will and convert it will it still be connected to ground?

midnight wind
#

in a schematic just show the ground symbol

#

the actual circuit layout will be different

copper ravine
bitter edge
#

@copper ravine what do you think of this so far

copper ravine
#
  • Don't assume VDD18, VDD33 and VDD5 are connected internally to the chip
  • The crystal might need loading capacitors; refer to its data sheet
  • You haven't yet, but don't connect the USB shields directly to ground (use a small value cap, maybe 0.1uF. Do directly connect all the USB shields together.
#

Pretty decent for a first shot though

bitter edge
#

It gives an example schematic

copper ravine
#

What's the part number for the crystal you used?

bitter edge
#

Uhh

#

Hold on I'm on a phone rn

bitter edge
bitter edge
#

Time to find the part

#

C2826824

copper ravine
#

Yeah, you need to follow the clock circuit exactly:

bitter edge
#

I'm not using the ti controller anymore

copper ravine
#

oh

bitter edge
#

SL2.1 A is the controller I'm using

copper ravine
#

hmm, I can only find a rather basic and useless datasheet for it

bitter edge
#

Also do I just hook those up like this into my schematic?

copper ravine
#

yup, if that's the reference circuit, follow that

bitter edge
#

Alr

bitter edge
copper ravine
#

HAND -> USB shield I'm pretty sure

bitter edge
copper ravine
#

HAND == EH

bitter edge
#

Alr

bitter edge
copper ravine
#

That looks reasonable

bitter edge
bitter edge
#

This is what I have rn

copper ravine
#

You want to put capacitors close to the component they are filtering for starters.

copper ravine
#

uhm, the upstream port is the wrong type

bitter edge
copper ravine
#

nope

bitter edge
#

Because in the scenatic it shows something that looks like a USB a male

copper ravine
#

I mean, yes. The spec says so. To plug that device into another device with a cable (which you are required to use to connect two devices) you would need a USB extension, which is not strictly allowed.

copper ravine
#

You can't use the visual symbol in the schematic to infer the component. The component type should be indicated with a part number or name explicitly.

bitter edge
#

So it has to be a cable?

copper ravine
#

yes

bitter edge
#

And if it isn't a cable

copper ravine
#

use a usb-b connector

bitter edge
#

bruh what

#

Where am I gonna plug that into

#

Cable it is then

copper ravine
#

This:

bitter edge
bitter edge
copper ravine
#

Why do you need a male connector?

bitter edge
#

Uh to plug it into things?

copper ravine
#

Ok, you're going to have a hard time if you don't understand how the USB spec works. Good luck.

bitter edge
#

Why would I switch the male port with this female one

misty thorn
#

Bump it to type c

#

That type c be reversible lol

bitter edge
bitter edge
#

@copper ravine

#

is everything good

peak acorn
#

we making a usb hub or smth

bitter edge
peak acorn
#

We

#

:-)

rancid nimbus
bitter edge
#

oh u mean this

rancid nimbus
#

And the vcc on the right is also connected to vcc voltage?

bitter edge
bitter edge
#

but I have no idea how to get vcc voltage

midnight wind
#

You would have a power supply circuit

bitter edge
#

but I don't

midnight wind
#

You need to add one

rancid nimbus
#

The USB B's vcc is connected to the vcc/vbus along with the vcc/vbus on the other side right? Or are you doing voltage stuff to make it a clean signal?

midnight wind
#

Or are you just getting it from the input usb

bitter edge
midnight wind
#

Schematics often don't show the whole circuit just sections

bitter edge
rancid nimbus
#

How will the USB devices connected to the USB get USB power? As of the last full schematic you are missing a vcc on the left.

midnight wind
#

Joe Barnard has a good video on circuit and pcb design

#

You often have one pcb layerr be ground and another be vcc

#

And it's just connected via vias

bitter edge
#

so

#

do I just set the bottom layer to vcc?

#

and top to gnd?

midnight wind
bitter edge
midnight wind
bitter edge
midnight wind
#

ok so you are already making the routing already

bitter edge
#

I've already finished the schematic I'm just making sure that I have everything correct

bitter edge
#

I just wanna know if it will work as intended

midnight wind
#

but you said you don't know where to get VCC before?

bitter edge
#

but I think I'll skip a power supply and let the usb do all the work

rancid nimbus
# bitter edge

From this image, what supplied the voltage on the left? It doesn't appear to be the host port on the right. It doesn't look like USB ports on the left are powered by the hub chip since only the data lines are connected.

bitter edge
#

so should I have a layer gnd and 1 layer vcc

rancid nimbus
#

What am I missing?

bitter edge
rancid nimbus
#

What is powering the bottom layer then?

bitter edge
#

this is the example schematic so I'm assuming that it knows everything

rancid nimbus
#

The vbus on the USB to computer and USB out do not appear to be connected. Are they connected?

rancid nimbus
bitter edge
rancid nimbus
#

Ok, where does the USB in's vbus connect to the vbus layer?

#

Is this kicad?

bitter edge
bitter edge
midnight wind
bitter edge
#

like this bs

#

or this bs

bitter edge
rancid nimbus
#

The Close up of the USB B looks like vbus should be connected since they both have the same net ID, but it doesn't look connected.

rancid nimbus
bitter edge
#

also the check shows that everything is fine

#

even this

rancid nimbus
#

If you look at the image it says u1_11 on the vbus and USB vbus, but they are not connected.

bitter edge
#

uh @copper ravine can you shed some light on this

rancid nimbus
#

I only count 16 nets if the two vbus are connected.

#

I might just be missing something.

copper ravine
#

Make the pcb layers separate to make it easy to follow please

copper ravine
#

just take screen shots of them or something

bitter edge
#

uh gnd

#

and vcc

#

and combined

#

the hub

bitter edge
#

or is there something i'm missing

copper ravine
#

In your schematic, you need to add the "VCC" symbol to the upstream USB VCC pin/wire in your schematic. Right now, the VCC of the downstream ports is not connected to the upstream port

#

so no power to anything you plug into the hub

copper ravine
#

yup

bitter edge
#

so now i'm done

#

i got a working usb hub

#

i can't even imagine tryna do this without that helpful schematic

copper ravine
#

Well, assuming you got the reference design from the datasheet correct, yeah, it might work

rancid nimbus
#

Same problem as I was noticing.

#

Interestingly enough there isn't an EEPROM on your design.

bitter edge
rancid nimbus
#

An EEPOROM is a little memory chip. The USB chips I seen use it to configure the VID and PID which are identifiers of the vendor and product. Windows uses it to download the correct firmware for the device.

copper ravine
#

I don't think he is using a TUSB2046 anymore. It is some rando chip from china iirc

bitter edge
#

i don't think ti has any usb chips with only 16 pins

rancid nimbus
#

Yes. That link is me just trying to find a reference design for USB to compare against since I don't know what chip that is.

bitter edge
#

and I just wanna make smth that isn't so complicated but does something useful

rancid nimbus
#

Oops didn't read the USB part.

bitter edge
#

since u guys helped u get to pick the pcb color

#

except green/blue

#

because no

rancid nimbus
#

Why no green?

bitter edge
#

it's to basic

#

imma just make it red if you don't wanna pick a color

copper ravine
#

red or purple are awesome

bitter edge
rancid nimbus
#

I have been working on a keypad. I have a working set of software and are trying to build a printed circuit board. Where does a surface mount LED go on a cherry switch?

bitter edge
rancid nimbus
#

On the layout where does it go.

rocky drum
#

Got bored and made a very basic fork bomb in rust, my laptop is quite upset with me

#

like literally instantly it just couldn't even open task manager

nocturne galleon
slim bluff
#

I have an idea, I'd love to have you guys and girls look at.

With the release of the new streamdeck+ with its knobs, I would like to look into making a small panel of knobs like the bottom of the streamdeck+, but with my own interface if possible. I have multiple years of development experience so writing custom software for this will be possible, I'm just curious if there are any resources you could recommend me for creating projects like this

rancid nimbus
#
.global _start
_start:
    /* write */
    ADDI a7, zero, 64
    ADDI a0, zero, 1
    la a1, msg
    la a2, len
    ecall
    bne a0, a2, exit_error
start_loop:
    /* write */
    ADDI a7, zero, 64
    ADDI a0, zero, 1
    la a1, guess
    la a2, guess_len
    ecall
    bne a0, a2, exit_error
    
    /* write */
    ADDI a7, zero, 64
    ADDI a0, zero, 1
    la a1, yes
    la a2, yes_len
    ecall
    bne a0, a2, exit_error
   
    /* exit */
    ADDI a0, zero, 0
    ADDI a7, zero, 93
    ecall
exit_error:
    /* exit */
    ADDI a0, zero, 1
    ADDI a7, zero, 93
    ecall

.data
msg:
    .ascii "Hello World!\n"
len = . - msg
    .ascii "\0"
guess:
    .ascii "Guess the number.\n"
guess_len = . - guess
    .ascii "\0"
yes:
    .ascii "yes"
yes_len = . - yes
    .ascii "\0"
#

I am trying to get it to print all three strings one at a time and for some reason it only prints the first string. The error is because the second and probably the third write statement are flawed and the address to the string is not loaded. What is different making the second string not run?

rancid nimbus
#
   100ec:       00001597                auipc   a1,0x1           
   100f0:       06c58593                addi    a1,a1,108 # 11158 <__DATA_BEGIN__>
#

VS

1010c:       80e18593                addi    a1,gp,-2034 # 11166 <guess>
rancid nimbus
#

I think i figured it out...

#

I want to understand the explanation before I try to explain it to all who are interested.

rancid nimbus
#

The problem was that the data labels were not aligned properly. When the program compiled the code it had one string starting right after the last. This isn't desired because the linker or assembler cannot figure out how to align the data itself nor can it figure out how to set the pointer register the correct way.

dim drift
#

I was trying to find a problem to an issue I have been having and I used the site luke brought up. the open AI, and the chat gave me very legit sounding answers, but they were wrong

#

very confidentially incorrect. So be careful using it as a source of truth

silk eagle
#

thats what makes it realistic

dim drift
#

I continued the WAN show and Luke hit on the nose

slim bluff
peak acorn
#

not too hard to design a little PCB to handle multiple rotary encoders

jolly adder
#

anyone into VR development or perhaps ML/AI/generative art who has hardware opinions relating to building a PC?

hollow basalt
#

Opinion: it must have a processor

silk eagle
humble mirage
#

idk how big your data sets are but maybe you're the target audience for a used RTX 3090 since it has a somewhat good VRAM size to money ratio

peak acorn
#

Buzzword salad

silk eagle
# peak acorn Buzzword salad

anyone into Virtual Reality, Web 3.0, Machine Learning, Computer Vision, Artificial Intelligence, Decentralized Computing, Kubernetes, Tensors, CI/CD, SaaS, Autonomous Vehicles, Fast Paced Exciting Work Environment, or Binary Search Trees?

#

or Self-Starter

spring cradle
#

ci/cd is p cool tho

silk eagle
#

all buzzwords are cool, at least to employers

worldly pine
rancid nimbus
#

I made a number guessing game in assembly. It turns out, you still are not allowed to write to address 0x00 when running under application mode (user space). I can share the code if anyone is interested.

celest junco
#

Why would you try writing to address 0 anyways?

rancid nimbus
#

It was unintentional.

spring cradle
#

npe

rancid nimbus
#

I looked into what it was doing in the assembly and found that I was attempting to store the program counter in the third register I gave it then loads data at a relative offset. That third register I set to x0 or zero. This is a dedicated register that always returns zero.

peak acorn
#

anyone working on interestring stuff in their free time

silk eagle
#

ive been growing a garlic but its winter so I think its not doing too well

peak acorn
#

Didn't mean anything like that but thats kinda neat

bitter edge
peak acorn
#

nice

rancid nimbus
spring cradle
#

what would yall do with a tomu if you had one

#

i wanna get one but i wouldnt know what to do with it

peak acorn
#

What is that

spring cradle
#

its an ARM microcontroller computer thing that fits in a usb

peak acorn
#

hm

hollow basalt
#

hm

peak acorn
#

whats teh point tho

spring cradle
#

its cute

#

and programmable

peak acorn
#

so is my computer tho 👺

silk eagle
#

i would have it calculate heads or tails

bitter edge
#

@copper ravine where do I find a usb that looks like this

#

most of them are like this

#

also when I look at this I have no idea what that symbol in the bottom right is

nocturne galleon
#

it's a gnd

#

chassis ground specifically, likely representing the board itself here

copper ravine
#

Yea but since it is connected to what I am guessing is usb, that is likely the usb shield

bitter edge
#

bc I don't see how

copper ravine
#

should be with all the other power symbols

bitter edge
copper ravine
#

You don't really need to assign a symbol to it, as long as it is wired correctly

bitter edge
copper ravine
copper ravine
#

I guess... what does the datasheet say? That sounds like something that would be in the datahsheet

bitter edge
#

also if you ask I'm using 2 two port chips because the 4 port chip isn't available for me

bitter edge
#

this is only for the upstream port 😢 and it's still not done

rancid nimbus
#

There is a USB type "a" standard for 3.0

bitter edge
bitter edge
copper ravine
bitter edge
copper ravine
#

You can place dots manually and they will be if you need that (not in this case)

bitter edge
#

i'll do this and then there will be the dots

copper ravine
#

Yes; if you drag a wire end and stop on another wire, it will usually connect them (make a dot)

bitter edge
#

oh I'm dumb

#

it u connect them to the wire directly not to the pad thing

bitter edge
copper ravine
#

No, 1000pf is 1uf

#

Er

bitter edge
copper ravine
#

Wait no; 1000pf is 1nf, so 0.001uf yeah

bitter edge
#

alr thx

bitter edge
bitter edge
#

this was supposed to be chassis gnd

#

still only upsteam

copper ravine
# bitter edge

You need to have the tx pins of the upstream routed to the rx pins on the downstream and vice versa. You also need those capacitors on all tx/rx lines between the two controllers

#

But that looks good for the moment

#

You will also need to route the tx/rx/d pairs so they are impedance matched to 90ohm. The data sheet also says to ensure the pairs have at least 5 times the trace width between pairs

bitter edge