Readit News logoReadit News
foxmoss commented on Replacing My Window Manager with Google Chrome   foxmoss.com/blog/dote/... · Posted by u/foxmoss
yokljo · 19 days ago
I strongly suspect I know what that does because I worked with Svelte 4 for years (you no longer have to do this in Svelte 5. I can recommend Svelte 5, it's nice).

Basically, assigning a state to itself tells it to signal that that state has changed and update anything that is listening to it. The `state` object is actually a JS Proxy returned by createState [0], which allows intercepting the assignment to the `windows` property and emit signals. Usually you dont have to do that, but in this case, the proxy doesn't notice that `state.windows.push(X)` is a mutation. Only assignments directly to the state object count as mutations.

TLDR, `state.windows = state.windows` tells the framework that `windows` changed.

[0]: https://github.com/MercuryWorkshop/dreamlandjs/blob/1e7a34a1...

foxmoss · 19 days ago
I was drafting a reply when you sent this, this is the correct interpretation and why I did it.
foxmoss commented on Two truths of software development still valid in the age of AI   espen.wtf/articles/2025/1... · Posted by u/ingve
foxmoss · 23 days ago
Yeah as I've dabbled with AI models more and more it's become clear to me how much my mental model is valuable to the programming process. It's easier to debug code I wrote myself then to comb through some AI's mistakes when it eventually gets to a problem too hard for the model to debug.
foxmoss commented on How I block all 26M of your curl requests   foxmoss.com/blog/packet-f... · Posted by u/foxmoss
fn-mote · 3 months ago
Sorry, all that stuff might be true but this whole process is nuts.

The code segment containing that code looks like a no-op.

The rest of the post seems sane and well informed, so my theory is that this is a C / packet filtering idiom I’m not aware of, working far from that field.

Otherwise I’m already freaked out by treating a 32 bit field as a pointer… even if you extend it to first.

foxmoss · 3 months ago
> Otherwise I’m already freaked out by treating a 32 bit field as a pointer… even if you extend it to first.

The cast from a 32 bit pointer to a 64 bit pointer is in fact an eBPF oddity. So what's happening here is that the virtual machine is just giving us a fake memory address just to use in the program and when the read actually needs to happen the kernel just rewrites the virtual addresses to the real ones. I'm assuming this is just a byproduct of the memory separation that eBPF does to prevent filters from accidentally reading kernel memory.

Also yes the double cast is just to keep the compiler from throwing a warning.

foxmoss commented on Resurrecting flip phone typing as a Linux driver   github.com/FoxMoss/libt9... · Posted by u/foxmoss
jmbwell · 6 months ago
I figured other way around… Kids These Days might be more likely to have heard of a “flip phone” than “t9” and thus “engage” with this “content”
foxmoss · 6 months ago
I had not heard of T9 before starting the project and getting interested, I'm too young to have experienced owning a pre-touch screen phone. I don't know if the average HN reader knows what T9 is, so I went with a term that I was fairly certain most people would be familiar with. Is that so people engage with my work? I certainly found the project fascinating, I made the library to share that fascination. If I can get more people to implement and use T9 and alike systems I think my work has has been a success.
foxmoss commented on Resurrecting flip phone typing as a Linux driver   github.com/FoxMoss/libt9... · Posted by u/foxmoss
jauntywundrkind · 6 months ago
How does the web demo work? I can enter numbers but where do we see resolved words? https://foxmoss.github.io/libt9/
foxmoss · 6 months ago
Please submit an issue on the Github repo! This is a bug, it should automatically show with words as you type. Include platform details, console logs, etc. I am unable to test every platform alone sadly.
foxmoss commented on Is "MIT Software License but No AI" Possible?    · Posted by u/derwoojer
foxmoss · 6 months ago
I mean thinking about students as actors of pure bad faith, a student could easily copy and paste any instructions given to them into a LLM and bypass any required training data. Even if an AI company respects the license and the source does not end up in the training set, model knowledge tends to be generalizable to a given area. The only way I could see making a language that is intentionally obtuse to write in (brainfuck or really any other esolang seems to work), but that fails at being a good introductory programming language.

u/foxmoss

KarmaCake day197January 29, 2024
About
https://foxmoss.com/
View Original