HackerLangs
TopNewTrendsCommentsPastAskShowJobs

cyco130

no profile record

Submissions

An AI system to help scientists write expert-level empirical software

arxiv.org
2 points·by cyco130·2 เดือนที่ผ่านมา·0 comments

Tailwind: Suffering from Success

blog.sebin-nyshkim.net
3 points·by cyco130·2 เดือนที่ผ่านมา·0 comments

Compiler Design Lectures [video]

youtube.com
1 points·by cyco130·7 เดือนที่ผ่านมา·1 comments

comments

cyco130
·2 เดือนที่ผ่านมา·discuss
I can see where the arguments for React's alternatives like Preact, Vue, Svelte, Solid, etc. come from. All of them are better than React at least in one aspect and React's dominance is mostly due to inertia: Developers (and now LLMs) know it better and the ecosystem is richer.

But having built websites and apps since before jQuery times, I strongly disagree with manual DOM manipulation as an alternative. Declarative, component-based approach won for a reason. These frameworks allow you to tell how the UI should look based on the state and manages the transition (either via virtual DOM diffing or fine-grained reactivity) for you. DOM manipulation requires you to write some code for every single state transition (instead of every _state_). And, in practice, it becomes unmanageable very fast, and you give up, and start writing code like `element.innerHTML = ...`, causing problems with focus and event management. It's fine for small widgets, even enjoyable, but only until you need to manage a complex UI. Then, you end up with a mess of code that is hard to maintain and debug.

I know some still feel web is not the right platform for building complex UIs but that battle was lost more than two decades ago. Web is good. It comes with accessibility features (like zooming) and works everywhere. As someone with age-related farsightedness, I hate native apps that don't allow me to zoom in with a passion (which is, almost all of them). Of course I hate websites that don't allow me to zoom even more because they had to go out of their way to disable a basic browser feature. But getting decent accessibility is harder with native apps. You basically have to build everything yourself. Web gets you 90% there for free.

React might not be the best out there and might be, one day, replaced by one of the competitors or something new. But declarative, component-based UI development is not going anywhere.
cyco130
·2 เดือนที่ผ่านมา·discuss
And this is Railway, a big enough name to top the HN main page and presumably find someone from Google to intervene at some point. I would have zero recourse if it was some little product that I built.
cyco130
·3 เดือนที่ผ่านมา·discuss
tanh is a very pleasant sounding overdrive function for audio, for example.
cyco130
·3 เดือนที่ผ่านมา·discuss
One neat trick for TypeScript branded types is to use { "~brand": "SOME BRAND" } instead of { __brand: "SOME BRAND" }. __brand shows up at the top of the autocomplete keys where "~brand" shows at the bottom.
cyco130
·3 เดือนที่ผ่านมา·discuss
Axios has maxContentLength and maxBodyLength options. I would probably go with undici nowadays though (it also has maxResponseSize).
cyco130
·3 เดือนที่ผ่านมา·discuss
I'm not sure fetch is a good server-side API. The typical fetch-based code snippet `fetch(API_URL).then(r => r.json())` has no response body size limit and can potentially bring down a server due to memory exhaustion if the endpoint at API_URL malfunctions for some reason. Fine in the browser but to me it should be a no-no on the server.
cyco130
·5 เดือนที่ผ่านมา·discuss
Thanks for the articles, great sources.
cyco130
·5 เดือนที่ผ่านมา·discuss
> Current literature does not distinguish between head voice and falsetto.

Hmm, are you sure about this? I thought chest voice and head voice were understood to be a single register called the modal register. And falsetto was fundamentally different.
cyco130
·5 เดือนที่ผ่านมา·discuss
Anecdotal evidence from my own singing at 20 compared to 40 seems to point to the opposite.
cyco130
·6 เดือนที่ผ่านมา·discuss
It is indeed part of the standard. It says "Within a structure object, the non-bit-field members and the units in which bit-fields reside have addresses that increase in the order in which they are declared"[1] which doesn't allow implementations to reorder fields, at least according to my understanding.

[1] https://open-std.org/JTC1/SC22/WG14/www/docs/n3220.pdf section 6.7.3.2, paragraph 17.
cyco130
·6 เดือนที่ผ่านมา·discuss
If history is any indication, it would only mean more passengers in the plane.
cyco130
·6 เดือนที่ผ่านมา·discuss
Natural languages are much more complex.

Complex for humans: I can learn a new programming language in an afternoon and be reasonably productive in it within a week or two. I wish I could say the same for natural languages.

Complex for computers: We’ve had good compilers since the 50s. Satisfactory language models are less than five years old.
cyco130
·7 เดือนที่ผ่านมา·discuss
My very first open source project[1] aimed to solve the same problem. Nice to see it still has quite a few weekly downloads.

[1] https://sourceforge.net/projects/bin2c/
cyco130
·7 เดือนที่ผ่านมา·discuss
Not the gp but I can't live without co/ci/br now.
cyco130
·7 เดือนที่ผ่านมา·discuss
I celebrated my 25th year on stage almost three years ago. Mostly playing covers in bars.

There was a time when we were hoping to “make it” and we did release an album but it wasn’t very successful, of course. That band broke up a few years later but I kept going with different bands.

I can’t do it every week anymore, let alone every night. It’s very physically demanding, so once a month is plenty in my age.

But it’s still fun. A lot of fun. I can’t imagine ever stopping it until I can’t physically do it. It’s part of who I am. Long live rock’n roll \m/
cyco130
·7 เดือนที่ผ่านมา·discuss
I've watched the SSA-related parts of these lectures and, despite the low video quality, I've found the quality of the content to be very high. Lecture notes can be found here: https://nptel.ac.in/courses/106108052
cyco130
·7 เดือนที่ผ่านมา·discuss
These instructions were not intentionally designed and put in there in secret. They're simply an unintended consequence of the "don't care" states of the instruction decoding logic.

The decoder is the part of the CPU that maps instruction opcodes to a set of control signals. For example "LDA absolute" (opcode 0xA5) would activate the "put the result in A" signal on its last cycle while "LDX absolute" (opcode 0xA6) would activate the "put the result in X" signal. The undocumented "LAX absolute" (opcode 0xA7) simply activates both because of the decoder logic's internal wiring, causing the result to be put in both registers. For other undocumented opcodes, the "do both of these things" logic is less recognizable but it's always there. Specifically disallowing these illegal states (to make them NOPs or raise an exception, for instance) would require more die space and push the price up.

See here[1] for example to get a sense of how opcode bits form certain patterns when arranged in a specific way.

  [1] https://www.nesdev.org/wiki/CPU_unofficial_opcodes
cyco130
·7 เดือนที่ผ่านมา·discuss
That’s where link-time optimization enters the picture. It’s expensive but tolerable for production builds of small projects and feasible for mid-sized ones.
cyco130
·7 เดือนที่ผ่านมา·discuss
It would but it's harder to trigger. Here, it's not safe because they're public functions and the standard would require `add_v1 != add_v2` (I think).

If you declare them as static, it eliminates the functions and the calls completely: https://aoco.compiler-explorer.com/z/soPqe7eYx

I'm sure it could also perform definition merging like you suggest but I can't think of a way of triggering it at the moment without also triggering their complete elision.
cyco130
·7 เดือนที่ผ่านมา·discuss
First time I see it being a net positive that someone didn't know about Vite: Bun wouldn't exist otherwise.