[-] noli@programming.dev 4 points 7 months ago

We had one who pulled up the pdf of the textbook to read it word by word

[-] noli@programming.dev 4 points 7 months ago

Hey, cis straight guy in a relationship with a trans girl here and I wanted to chip in with my experience.

Yeah, early stages of the relationship are tough because you come from completely different backgrounds. With enough time and most importantly good communication however, that challenge can certainly be overcome.

[-] noli@programming.dev 4 points 7 months ago

Isn't that more sweet iced tea?

Disclaimer: I'm an ignorant european :p

[-] noli@programming.dev 3 points 9 months ago

Is that just like the shared memory model of parallel computing or are there any added complications? Have you done this before? Please do share your experiences if so cause now I'm interested :p

[-] noli@programming.dev 5 points 10 months ago

Dot in dutch is punt

[-] noli@programming.dev 4 points 10 months ago

Isn't that still the same exact process as a normal compiler except in the case of embedded systems your OS is like a couple kilobytes large and just compiled along with the rest of your code?

As in, are those "crazy optimizations" not just standard compiler techniques, except applied to the entire OS+applications?

[-] noli@programming.dev 4 points 11 months ago

LLVM is designed in a very modular way and the LLVM IR allows you to specify e.g. if memory management should be manual/garbage collected.

You could make a frontend (design a language) for LLVM that exposes those options through some compiler directives.

In general I'd heavily recommend looking into LLVM's documentation.

[-] noli@programming.dev 4 points 1 year ago

Look at the profile picture.

[-] noli@programming.dev 4 points 1 year ago

How did a bug with something like that never pop up in unit tests?

[-] noli@programming.dev 5 points 1 year ago

Also being able to analyze any program and guarantee it will stop

[-] noli@programming.dev 5 points 1 year ago* (last edited 1 year ago)

I am dumb. The more things I need to think about when reading code that is not the logic of the code, the worse it is. Any time I have to spend thinking about the peculiarities of the way the language handles something is time wasted.

I'll give a very simple example, think like you're trying to find a bug. Assume we're in a dynamic language that allows implicit conversion like this. We can write our code very "cleanly" as follows:

if(!someVar) doSomething();

-> ok, now we gotta check where someVar's value is last set to know what type of data this is. Then I need to remember or look up how those specific types are coerced into a bool.

When trying the same code in a statically typed language that doesn't do implicit coercion that code will fail to run/compile so probably you'll have something like this:

if(someVar.length() == 0) doSomething();

-> this time I can just look at the type of someVar to see it's a string and it's clear what the condition actually means.

The second option is both easier to read and less bug prone even without the type system. It takes maybe 3 seconds longer to type, but if your productivity in coding is that limited by typing speed then I envy you

[-] noli@programming.dev 5 points 1 year ago* (last edited 1 year ago)

I know they are used in google's BigTable. All data there is stored in seperate SSTables and you can specify that a locality group should have bloom filters generated for its SSTables. Apparently cassandra has them too.

Both are the same general application though and you already mentioned databases.

I did think about using them at some point for authentication purposes in a webservice. The idea being to check for double uses of a refresh token. This way the user database would need to store only a small amount of extra storage to check for the reuse of a refresh token and if you set the parameters accordingly, the false positives are kind of a benefit in that users cannot infinitely refresh and they actually have to reauthenticate sometimes.

Edit to add: I also read a paper recently that uses a datastructure called a collage that is closely related to bloom filters to perform in-network calculations in a sensor network. If I understand correctly, the basic idea there is that every node in the network adds a bit to the datastructure while it is in transit, so data from the entire network is aggregated. The result can then be fed to a classifier ML model. (Source: Oostvogels, J., Michiels, S., & Hughes, D. (2022). One-Take: Gathering Distributed Sensor Data Through Dominant Symbols for Fast Classification. )

view more: ‹ prev next ›

noli

joined 1 year ago