29 karma · joined January 27, 2021
Technically, apply myself more to projects at my job, learn how to fit in our flow better. I've been using AI to program some goofy projects, and I've found a good medium between vibe-coding and auto-complete, where I make it draw up a plan for every commit, and then I ask it to implement it, and if the generated code is wrong I undo the changes and revise the plan to be more precise. It's relatively easy to verify the plan, not as easy to verify the code, but it's still easy to debug the code and figure out what's wrong.
The burden shifts more to creating small modules with stable interfaces.
#IF __cplusplus==202302LDo you distinguish between writing a compiler and writing an optimizing compiler, and if so, how is writing an optimizing compiler an extinct art?
Equality saturation, domination graphs, chordal register allocation, hardware-software codesign, etc there are many new avenues of research for compilers, and these are just the ones on the top of my head that are relevant to my work. Most optimization work is R&D and much of it is left unimplemented at scale, and things like the phase-ordering problem and IR validation are hard to do in practice, even given ample resources and time.
An asker asks for things, absolutely everything, and the giver must choose what they can give.
A guesser must choose what they can ask for, and only ask when they're quite sure it can be given, so the giver has less responsibility for the transfer or service, and most asks can be assumed to be reasonable.
A Persian cannot ask for anything. They must wait for it to be offered, and even then, they must insist that they are quite alright, and that they would rather do without, and only through reciprocal insistence from the giver can they consider whether it would be rude to take them up on the offer.
Presumably, one can judge the giver's underlying intent by the quality of their reciprocal insistence (does it seem like they're just doing the bare minimum of insistence upon their offering, or do they truly wish for me to take them up on it?)
In the Taarof system, an offeree actually has more data, rather than a simpler Asker-scenarion "no", and even more data than the shared values in a Guesser household, this allows for a quick negotiation of values by the immediate and well-practiced cultural norms around the quality of insistence, even for people across different households.
I wrap that in FlatDB, which is an opinionated flat cache for the files with metadata inline, used for very fast searches (searching 150k messages in less than 20ms on my 4 year old phone). This handles a lot of tricky cases, like accidental cache modification, and editing the database in different tabs.
There's even a sync algorithm that synchronizes notes across devices. https://github.com/kasrasadeghi/pipeline-js/blob/main/assets...
How do you manage sync? Mine is a WebApp so I use indexedDB, and that's nice so that it works on my computer browser, but I don't want multiple tab synchronization on my phone and it's tricky to handle. I've built something that works, but I'd love to explore other designs.
You said React Native, so there might be a regular app sort of data store to disk.
The later ones are reasonable, as they map more closely to the music notation that has become standard, but for classical music of different cultures, notes don't often lie on a single place, but swing from one pitch to another, with blips and arcs in their paths from one place to another.
The staff-based notations lose the first-hand flow of the notation in space. I wonder what could be done with color.
The fundamental query I usually use is substring search. The only contents is text, because I believe in the primacy of plaintext. The notes for the last 4 years of my life takes up 60 megs, and it takes half a second on a 5 year old android phone to parse all of it, and less than 50ms to search through all of it, so I can do it on every keystroke/ incrementally.
[0] Pipeline Notes: https://github.com/kasrasadeghi/pipeline-js
I'm not a web developer by trade, so if anyone has any feedback on security/UI/service workers, please let me know!
I've written all of that from scratch because I got tired of maintaining node.js
But when splitting up the js file into pieces and using es6 modules, say 12 different files, Chrome makes 8 TCP connections on 8 different sockets, and each connection has its own TCP handshake (and TLS handshake for https). How do you bundle things without using a build system or a bundler? Import maps help, and it's not difficult to simply hash the page and copy the asset to a "dist/" folder with the hash appended, but it's still slow on first page load.
I'm not a web developer professionally (or network engineer), so I'm learning about web networking myself for the first time. It might be helpful to add a section about "traffic shaping"? I've smacked together a service worker that does the work of caching well-enough for now, but I'm definitely doing something rather strange and reinventing something. My page loaded significantly faster when it was just 1 JS file, no caching needed.
I like the style, and although it's a bit more anxiety inducing than I would like to put into the world, it is very gripping. Perhaps being gripping, building suspense, is an alright form of anxiety. It certainly makes for compelling writing.
The subject matter feels well covered, but I am not a frequent TikTok user, only peering in the periphery of YouTube shorts when I allow my once-in-a-blue-moon dosage of hyper-modernity.
I've implemented something similar for a pet project, trying to make a very concise http(s) server with raw python.
It works with bytes for speed and handles a lot of tricky edge cases I couldn't find in other implementations (like request paths that were over 16k bytes long) that I needed for my frontend. It has microsecond-level logging, a packet proxy, and a supervisor, all as separate binaries that interact.
server lib: https://github.com/kasrasadeghi/pipeline-js/blob/main/kazhtt...
Used here: https://github.com/kasrasadeghi/pipeline-js/blob/main/simple...
I seem to have some kind of issue with ssl_shutdown, I wrote a packet-level proxy in c++ but I still can't figure out the correct incantation to shutdown on both sides correctly. The Python SSL socket shutdown() function doesn't seem to return anything, so we can't tell if it's finished yet.
I wrote this as an alternative to socketserver.py from the standard library, as I didn't like all of the customization points and indirection.
Also one thing to note is that doing .recv(1024) makes it so that the first line of your http request must be less than 1024 bytes long, which (if you have a lot of query parameters, like I do on some requests) might require you to do some slightly stranger loop shenanigans like I do. It was tricky to figure out, and I don't think it's a completely generalizable solution, but I heavily recommend something like it for anyone dealing with the same problem.
I'd assume webview apps could be more accessible rather easily, and it would take care and attention to make a native wasm app accessible.
"DOJ vs Google evidence releases, which evidence judge calls embarrassing"
It's fairly unused in spoken Farsi.
Instead of criticizing what your kid is doing on the computer, spend time engaging with them and participate in their hobbies with them. At 18, the kid will leave the house soon, and if you have things to talk about/do together over the internet, you might have a better relationship with your child.