Better HN
topnewbestaskshowjobs
Log inSign up

cyco130

624 karma · joined Jun 24, 2021 (5y ago) · 160 submissions

Developer, musician, and occasionally other things. Creator of Rakkas, Hattip, and vavite.
Submissions

comment 1mo ago · link · parent

Almost all of the trending repos on GitHub are _about_ AI: zillion of harnesses and similar AI orchestration tools. So most of the extra efficiency gained by AI usage seems to be spent on building more AI tools and not software for end users or libraries for AIs and humans to build such software.

comment 1mo ago · link · parent

I think researching things that have little internet footprint is an underrated use of LLMs. Most recently, I did quite an extensive research on a card game called "king", variants of which are played in Turkey, Portugal, Brazil, Belgium, France, Russia, Italy, Poland (under the name "Kierki"), and several other countries (but seemingly not known in English speaking countries, despite the English name). It allowed me to uncover scoring patterns that tie various versions together and reconstruct its possible origins and development, however speculative.

comment 4mo ago · link · parent

I've heard of it, of course! And of course they're years ahead of my little hobby project.

But there's an important difference: They run on the browser via WebAssembly, the project is in Rust. Sfotty Pie is pure TypeScript, so, hopefully, easier to hack for a greater number of people. Also harder to make performant but why do we have all this CPU power if not to emulate 1.79 MHz machines using high-level languages :)

4.

Show HN: Sfotty Pie – A browser-based Atari 8-bit emulator in TypeScript(a8.aygun.me ↗)

2 points · by cyco130 · 4mo ago · 2 comments

comment 6mo ago · link · parent

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.

6.

An AI system to help scientists write expert-level empirical software(arxiv.org ↗)

2 points · by cyco130 · 6mo ago · discuss

7.

Tailwind: Suffering from Success(blog.sebin-nyshkim.net ↗)

3 points · by cyco130 · 6mo ago · discuss

comment 6mo ago · link · parent

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.

comment 7mo ago · link · parent

tanh is a very pleasant sounding overdrive function for audio, for example.

comment 7mo ago · link · parent

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.

comment 7mo ago · link · parent

Axios has maxContentLength and maxBodyLength options. I would probably go with undici nowadays though (it also has maxResponseSize).

comment 7mo ago · link · parent

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.

comment 9mo ago · link · parent

Thanks for the articles, great sources.

comment 9mo ago · link · parent

> 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.

comment 9mo ago · link · parent

Anecdotal evidence from my own singing at 20 compared to 40 seems to point to the opposite.

comment 10mo ago · link · parent

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.

comment 10mo ago · link · parent

If history is any indication, it would only mean more passengers in the plane.

comment 10mo ago · link · parent

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.

comment 11mo ago · link · parent

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/

comment 11mo ago · link · parent

Not the gp but I can't live without co/ci/br now.

comment 11mo ago · link · parent

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/

comment 11mo ago · link · parent

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

23.

Compiler Design Lectures [video](youtube.com ↗)

1 points · by cyco130 · 11mo ago · 1 comment

comment 11mo ago · link · parent

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

comment 11mo ago · link · parent

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.

comment 11mo ago · link · parent

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.

comment 11mo ago · link · parent

First time I see it being a net positive that someone didn't know about Vite: Bun wouldn't exist otherwise.

comment 12mo ago · link · parent

What a respectfully and humbly written comparison page. Ditto for their Supabase comparison. I can't rate the objectivity since I know very little about TrailBase but they got my attention now. It brings me such joy to see such a writeup in a world where humility is perceived as weakness. Kudos.

comment 12mo ago · link · parent

As a person who knows next to nothing about how the brain or the genes that configure it work, I tend to think of this in terms of 80s video games like River Raid. The level data for these games, if stored naively, would fill the computer's available memory many times over. So they just store a pseudorandom number generator seed along with a few other parameters. Coupled with a few rules to make the level playable, it can generate a seemingly impossible number of levels with very little stored data.

Maybe the genes just encode a few crucial rules and the rest just emerge from that.

Oh, and I know even less about how the universe works. But I tend to think of it in the same terms: Emergent phenomena stemming from simple rules à la Game of Life.

123456