HNHacker News
TopNewBestAskShowJobs

emmanueloga_

2,861 karma · joined November 16, 2013

Software Engineer @ Crunchyroll

https://emmanueloga.com

https://lobste.rs/~emmanueloga

https://mastodon.gamedev.place/@EmmanuelOga

https://bsky.app/profile/emmanuel-oga.bsky.social

submissionscomments
emmanueloga_··on Uv's killer feature is making ad-hoc environments easy
Fun fact: pixi uses uv as a library to install pypi packages!
emmanueloga_··on Why I Chose Common Lisp
https://www.youtube.com/watch?v=a0YrCABCOEY
emmanueloga_··on The Aging Programmer [video]
Slides:

https://github.com/CppNorth/CppNorth_Slides/blob/main/2024/K...

emmanueloga_··on SAT Solver Etudes I
Also MiniZinc, Gecode and OR-Tools are 3 ways of using SAT solvers that include good documentation and walkthroughs.
emmanueloga_··on Ask HN: Have you ever seen a pathfinding algorithm of this type?
Hey there, it is a little bit ambiguous what you mean by "find an algorithm that performs better". Do you mean in terms of runtime, or in the "quality" of the path?

Sooner or later, someone will link to Amit's pages, so it may as well be me :-). Since you are talking about ray casting, perhaps your "performance" question is about the shape/quality of the path. From Amit's: "The most common question I get when people run pathfinding on a grid is why don’t my paths look straight?" [0]

I also recall a video by the 8-Bit Guy [1] where he discussed his pathfinding hacks for Planet X16. Due to hardware limitations, he had to get creative with his path finding. Probably not super-relevant to your project, both could be fun/inspiring in the sense of finding a less traditional way of doing things that really fits your project needs.

--

0: https://www.redblobgames.com/pathfinding/a-star/implementati...

1: https://youtu.be/HP4ObKlCe6w?feature=shared&t=360

emmanueloga_··on When will we fix the tools that run the world?
This is still funny and true about the software profession at many levels, but specifically about electronic voting, I recently listened to this podcast about Venezuela's last election [0], which highlights how computer voting can be done so safely that people were able to (clandestinely!) use the system to double-check the election results.

--

1: https://www.thisamericanlife.org/848/transcript

emmanueloga_··on Triptych Proposals
In the meanwhile, I found that enabling page transitions is a progressive enhancement tweak that can go a long way in making HTML replacement unnecessary in a lot of cases.

1) Add this to your css:

    @view-transition { navigation: auto; }
2) Profit.

Well, not so fast haha. There are a few details that you should know [1].

* Firefox has not implemented this yet but it seems likey they are working on it.

* All your static assets need to be properly cached to make the best use of the browser cache.

Also, prefetching some links on hover, like those on a navbar, is helpful.

Add a css class "prefetch" to the links you want to prefetch, then use something like this:

    document.addEventListener("mouseover", ({target}) => {
      if (target.tagName !== "A" || !target.classList.contains("prefetch")) return;
      target.classList.remove("prefetch");

      const linkElement = document.createElement("link");
      linkElement.rel = "prefetch";
      linkElement.href = target.getAttribute("href");
      document.head.appendChild(linkElement);
    })
There's more work on prefetching/prerendering going on but it is a lil green (experimental) at the moment [2].

--

1: https://developer.mozilla.org/en-US/docs/Web/CSS/@view-trans...

2: https://developer.mozilla.org/en-US/docs/Web/API/Speculation...

emmanueloga_··on Show HN: Struggle with CSS Flexbox? This Playground Is for You
Chrome/Edge has a nice feature that I don't think Firefox includes. It allows you to quickly toggle between flex modes [1].

--

1: https://imgur.com/a/17iy1eN

emmanueloga_··on Lucy: A concise language for describing Finite State Machines
xstate and other libraries like it implement Harel's statecharts, which are an extension of FMSs with different semantics and composability (a.k.a. "hierarchy", where machines can embed other machines), so the relationship with regular expressions may not be that useful.

"Classic state diagrams require the creation of distinct nodes for every valid combination of parameters. For all but the simplest of systems, this can lead to a very large number of nodes and transitions between nodes (state and transition explosion), which reduces the readability of the state diagram." [1]

"What's missing in the traditional state machines is the mechanism for factoring out the common behavior in order to share it across many states. UML state machines address exactly this shortcoming of the conventional FSMs. They provide a number of features for eliminating the repetitions so that the complexity of a UML state machine no longer explodes..." [2]

--

1: https://en.wikipedia.org/wiki/State_diagram#Harel_statechart

2: https://en.wikipedia.org/wiki/UML_state_machine#UML_extensio...

emmanueloga_··on Lua is so underrated
Both Terra and Extempore [1] implement the same basic idea, which is provide a way to generate performant machine code on the fly but keeping a language surface that feels like you are working with a dynamic language (Lua or Scheme correspondingly). I think Scopes [2] could be mentioned here too. The concept is really cool and different from JIT compiling in that the developer is given the tools to generate machine code, as opposed to some "magic" JIT compiling happening opaquely behind the scenes.

That being said, I don't think either of these languages is practical for real world projects for several reasons: lack of (or low quality) documentation, bus factor (lack of developers), tiny communities, lack of tools, lack of libraries, etc etc etc.

--

1: https://extemporelang.github.io/

2: https://sr.ht/~duangle/scopes/

emmanueloga_··on Ask HN: Which courses/classes are you excited about in 2025?
Just curious, is this with some particular dance company or studio/instructor?
emmanueloga_··on Blackcandy: Self hosted music streaming server
Not a bad idea! Maybe you could create a GH page with some public domain music for a demo.
emmanueloga_··on Blackcandy: Self hosted music streaming server
Thanks for the pointer!

From the "outside" this looks like such a strange product. The landing page is very obscure and, together with the name of the service, I would automatically think this is a super old school product (being generous) or some sort of weird scam (being overly critical). There are no docs or pictures or any further description of what the product looks like, I guess the authors expect people to sign up to see (it is free! :-).

Other than that, I wonder how they address their costs [0]. It seems free accounts have unlimited uploads. Anyway, I guess I'll have to give this a try to learn more about it.

EDIT: I found some pics by clicking in their facebook page, which in turn links to a news page [1] (...).

EDIT: This product is fascinating. Seems like they've been around for 12 years, have a bunch of loyal users, and support their product (?) via reddit (at minimal approve of the reddit channel since they link to it themselves!). I wish we could know more about the team behind it. Related: [2].

--

0: https://www.ibroadcast.com/premium/

1: https://ibroadcast.com/news/

2: https://www.reddit.com/r/ibroadcast/comments/1d1iaht/is_ibro...

emmanueloga_··on Blackcandy: Self hosted music streaming server
Storage is tricky... I know how to self-host software and get storage but I find it too much of a hassle to do it for me only, so I just have a folder in a google drive, which I need to migrate from soonish.

Why do you think a Plex competitor would not be sustainable?

emmanueloga_··on Blackcandy: Self hosted music streaming server
I’ve been searching for services that host personal music collections, but there doesn’t seem to be much available. I came across a product called Vox [1], which I might try. There are also plenty of self-hosted projects of varying quality (but I hadn’t seen Black Candy before).

I'd like a service where I can upload a large folder of MP3s, and it would help organize them into albums, perform useful processing like ReplayGain normalization, BPM and key analysis, etc. It should also have a good playlist manager and player for desktop and mobile.

Some existing services allow you to add your own music files, like MP3s, but this often feels like a second-class citizen. Services like SoundCloud are focused more on social interactions, which I don’t really need.

Have I missed any services like this?

There's some growing dissatisfaction around algorithm-driven music services like Spotify. Also, these services carry the risk of music disappearing for various reasons. I think a service allowing curation of own MP3 collections could appeal a significant fraction of all music lovers out there.

--

1: https://vox.rocks/

emmanueloga_··on Server-Sent Events (SSE) Are Underrated
It’s funny how HN has a mix of people who think AGI is just around the corner, people trying to build/sell stuff that uses LLMs, and others who can’t stand LLM-generated content. Makes me wonder how much overlap there is between these groups.
emmanueloga_··on Embedding Lua in Sqleibniz with Rust
Nice project! I was recently exploring LSPs for SQL. I have an idea to extend their functionality beyond static analysis into runtime data assistance, blending both static and runtime checks.

For example, given these files:

    -- file1.sql
    INSERT INTO authors (id, name) VALUES (42, 'Lolo'), (43, 'Tony');
    
    -- file2.sql
    INSERT INTO posts (id, title, content) VALUES (17, 'Post Title', 'Post Content');
    
    -- file3.sql
    INSERT INTO author_posts (author_id, post_id) VALUES (42, 17);
Imagine an LSPd that scans files, parses incomplete or broken SQL, and suggests data in real-time. For instance, while typing `VALUES (` in file3.sql, it would auto-complete `(42, 'Lolo') or (43, 'Tony')`, inferred from file1.sql.

There are a lot of caveats (like handling insertions, deletions, or the order of operations), but even partially reliable, plausible suggestions would provide enough value.

In my current project, I generate TypeScript for static checks and validate insertions at build time. However, an LSP like this could streamline the data insertion process and reduce the need for admin dashboards.

I’m not aware of any existing LSP servers that function this way. I’m interested in exploring this concept for Kuzu/Cypher since my project data is graph-like, but the idea should be applicable to any data store.

emmanueloga_··on Ergo Chat – A modern IRC server written in Go
I guess I did not make the scope of the project clear. Both Matrix and XMPP specs add up to 100s of pages, 500 or so give or take. IRCv3 seems to be over 100 pages too. In comparison, Gemini is about 10 pages long or so.

A bunch of people here talk about setting up a small server for family and friends, so I think a smaller protocol, akin to Gemini in size, could be a lot of fun to work with for small scale deployments.

emmanueloga_··on Ergo Chat – A modern IRC server written in Go
IRC is often romanticized, but after working with its protocol spec, I found it rather unsavory. Its unstructured message format looks like this:

    :User1 PRIVMSG User2 :Hello, are you receiving this message?
While this might look fine at first glance, the lack of more regular structure caused issues. Some messages are easier to parse than others. Each implementation introduced quirks and variations, creating countless edge cases and hairy parsing code. To be fair, IRC _was_ a product of its time... but s-expressions were invented in the 1950s, so adding more structure and rigor to the messages wasn't out of reach.

My memories are from a long time ago so I may be overreacting... perhaps the Ergo authors can comment on their experiences if they are around here! I heard about IRCv3 but I doubt that effort solved most of my main gripes with the protocol.

If I were to work on a messaging app today, I'd look elsewhere for inspiration. From a quick search, it seems there's room for a modern and _simple_ protocol for chat, simpler than XMPP or Matrix. Essentially, we need a protocol that is for messaging what Gemini is for HTTP. Stretch: squinting a bit, the NATS client protocol looks close to a starting point for something like that [1].

--

1: https://docs.nats.io/reference/reference-protocols/nats-prot...

emmanueloga_··on Ruby Video – On a mission to index all Ruby conferences
It is similar, but try this:

* Open https://pyvideo.org/speakers.html and scroll down to the bottom.

* Open https://www.rubyvideo.dev/speakers and do the same thing.

The Python page loads instantly, while the Ruby page makes several requests before fully loading. Ironically, it seems to be utilizing a rails feature called "turbo streams".

emmanueloga_··on New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required
* Grab A, some software that can be compiled to Java bytecode [1].

* Grab B, some software that can run wasm [2].

* Run A on B.

Just one example, since this "algorithm" can generate endless combinations! You could create some game logic in Kotlin, Clojure or Scala, compile it to WASM, and run it on Taca [3] (a runtime for multimedia wasm apps that runs native and in browsers).

--

1: from TeaVM front page: "the source code is not required to be Java, so TeaVM successfully compiles Kotlin and Scala"

2: There are many projects out there embedding some WASM runtime, not just browsers.

3: https://github.com/contextfreeinfo/taca

emmanueloga_··on Luon programming language
Amazing project!

I get the appeal to write an IDE from scratch, especially if you are already an expert in writing GUIs with your framework of choice! I wonder if it would make more sense to spend that time writing a language server protocol daemon. That way, you could make your language available in any IDEs your users like that support LSP.

emmanueloga_··on How to Become a 37 Year Old Broke Loser [video]
I think he mentioned $700 a month or something like that
emmanueloga_··on How to Become a 37 Year Old Broke Loser [video]
A struggling guy, with a tech degree from Waterloo U, tried freelancing for years, but his income has always been inconsistent, with shady clients and projects that never went anywhere.

He has a looming eviction coming and spends some time talking about "renovictions" in Canada rent-controlled buildings. He’s decided to double down on YouTube as his best shot at stability, even though it’s been a rough ride overall.

emmanueloga_··on How to Become a 37 Year Old Broke Loser [video]
I’ve seen this type of extreme self-deprecating personal branding before, and I wonder if it actually benefits anyone. I get the author is trying to be honest and likely venting built-up frustrations.

I skimmed the video, and I understand one of the key points is about realizing how many random variables may destabilize your career, even if you start from a good place.

Perhaps there’s a more effective way to reframe a challenging situation like theirs.

emmanueloga_··on Show HN: DataFuel.dev – Turn websites into LLM-ready data
Some ideas:

Highlight the advantages of your service over DIY solutions prominently on your marketing site. The site looks great! but I think it could better focus on convincing developers to adopt your product vs just listing features.

Consider reaching out to clients to quantify the time saved using your service. Emphasize how it eliminates the hassle of setting up custom background job processes, proxies, and other complexities that can snowball into a full-fledged project.

Good luck on your journey!

emmanueloga_··on Show HN: DataFuel.dev – Turn websites into LLM-ready data
I thought this might be interesting to share and potentially useful for the author of Datafuel as a comparison. I recently built something similar for a small app [1].

I use Bun.js's fetch to crawl pages, process them with Mozilla’s Readability (via JSDOM), and convert the cleaned content to Markdown using Turndown. I also strip href attributes from links since they’re unnecessary for my use case, and I don't recurse links. My implementation is basic, with minimal error handling and pretty dumb content trimming to stay within prompt tokens limit which could use improvements! I also found this Python library that seems a lot fancier than what I need, but also a lot more powerful [2].

I’m curious where a solution like Datafuel excels, especially since it already has customers? From the top of my head, the real complexity in scraping appears when processing a sizable number or URLS regularly and becomes more of a background processing / scheduling problem.

I feel like something like Datafuel could become more adopted if it was a nicely put together as a library to crawl locally, and then if you find yourself crawling regularly and want to delegate the scheduling of those crawls, you could buy into the service: "ping me back when these 10_000 URLs are done crawling", or something like that.

--

1: https://github.com/EmmanuelOga/plangs2/blob/main/packages/ai...

2: https://github.com/adbar/trafilatura

emmanueloga_··on Show HN: Kubernetes Spec Explorer
The most frustrating part of Kubernetes (and I like k8s) is its data schema story:

* Go types are converted to Protobuf via go-to-protobuf.

* Protobuf generates OpenAPI specs and JSONSchemas via kube-openapi.

* Users rely on tools and DSLs to manage the complexity of YAML manifests.

This pipeline prioritizes some convenience for the core team over simplicity for end users. In the end, that minimal convenience transmutes into layers of convoluted code generators to maintain for the core team, and unwieldy, tens-of-thousands-of-lines schemas for the end users.

Also, does Kubernetes really benefit enough from Protobuf to justify the complexity? k8s IPC and network traffic likely account for a small fraction of overall app traffic. Perhaps JSON and schemas for validation could be enough.

The proliferation of tools to manage YAML manifests is a sign of room for improvement. Perhaps a "k8s 2.0" could start with JSONSchemas: this could encourage minimal, flat, simple, and user-friendly schemas, and hopefully a more coherent internal pipeline.

emmanueloga_··on What Would Revolutionize EdTech? Seeking Ideas and Feedback
I think this approach would need adaptation for a classroom of younger students.

"Younger learners" reminds me of the Montessori method: "self-directed exploration driven by children’s natural interests". A knowledge graph could serve as a playground for exploration. While boxes and arrows might work for children learning to read, I'm sure there must be many other engaging ways to present this information to younger students.

Spaced repetition traditionally uses flashcards to test recall, but it could evolve into task-based learning. Instead of just recalling facts, learners could complete tasks as proxies for understanding. For example, solving a physics problem could indicate mastery, while struggling might signal a need for review. Designing these tasks would require collaboration between educators and developers. Teaching students how to self-assess and decide what to learn or refresh next would be invaluable.

Anyway, I think of this stuff often since I always have a huge backlog of things to learn myself, but I haven’t spent a lot of time thinking of how to adapt these things for children, so I'm sure I'm missing many important details.

emmanueloga_··on What Would Revolutionize EdTech? Seeking Ideas and Feedback
I made a relevant comment a bit ago, linking here to avoid spamming the same stuff :-)

--

https://news.ycombinator.com/item?id=42294690

← PreviousPage 3 of 34Next →