News for hackers. Stuff that matters.

benwilber0

Re:Fast Lua runtime written in Rust on Monday November 24, 2025 @11:09AM (#46035600)
The "runtime" word is very confusing in this case.

It's a web application server written in Rust (Axum/Tokio), that has hooks into Lua bindings (mlua) so that application behaviors can be implemented in Lua.

Re:Fast Lua runtime written in Rust on Monday November 24, 2025 @10:21AM (#46035050)
Looks neat. I built a programmable server for Server-Sent Events using a similar stack (Rust/mlua/axum) [1]. I think the Rust/Lua interop story is pretty good.

[1] https://github.com/benwilber/tinysse

Re:Lua for Elixir on Thursday May 15, 2025 @12:57PM (#43996949)
> I am surprised more projects don’t provide a Lua scripting layer.

Completely agree. I've been adding Lua scripting support to pretty much everything I make now. Most recently my programmable SSE server [1]. It's extended the functionality far beyond anything that I would have had the time and patience to do myself. Lua is such a treat.

[1] https://github.com/benwilber/tinysse

Github was a "social network" from its very beginning. The whole premise was geared around git hosting and "social coding". I don't think it became enshittified later since that was the entire value proposition from day 1.
Re:Redis is open source again on Thursday May 01, 2025 @12:59PM (#43860348)
But why are they spending any time switching away from Redis at all unless they are a hosting provider offering Redis-as-a-service?

I wasn't aware the license had any negative affect on private internal use.

Re:Redis is open source again on Thursday May 01, 2025 @12:20PM (#43859802)
Your company invested hundreds of engineering hours switching from Redis to a clean fork of Redis?
Re:Linux Kernel Exploitation: CVE-2025-21756 on Wednesday April 30, 2025 @05:48PM (#43851075)
> I probably would have gone for turning the UaF into an type confusion style attack

I'm aware that Linux is nearly 40 years old at this point, and C is even decades older. But it is mind-boggling to me that we're still talking about UAFs and jumping from dangling pointers to get privileged executions in the 21st century.

(rewrite it in Rust)

Re:A single line of code cost $8000 on Tuesday April 29, 2025 @11:03AM (#43833646)
> their software also downloaded a 250MB update file every five minutes

How on earth is a screen recording app 250 megabytes

Re:My takeaways from DjangoCon EU 2025 on Monday April 28, 2025 @08:38PM (#43827589)
> contention slowdowns caused by having a primary key that needs a lock (incrementing key)

This kind of problem only exists in unsophisticated databases like SQLite. Postgres reserves whole ranges of IDs at once so there is never any contention for the next ID in a serial sequence.

Re:My takeaways from DjangoCon EU 2025 on Monday April 28, 2025 @08:34PM (#43827576)
You use a regular bigint/bigserial for internal table relations and a UUID as an application-level identifier and natural key.
Re:My takeaways from DjangoCon EU 2025 on Monday April 28, 2025 @06:20PM (#43826749)
> Always use a BigInt (64 bits) or UUID for primary keys.

Use bigint, never UUID. UUIDs are massive (2x a bigint) and now your DBMS has to copy that enormous value to every side of a relation.

It will bloat your table and indexes 2x for no good reason whatsoever.

Never use UUIDs as your primary keys.

Re:Migrating Away from Rust on Monday April 28, 2025 @05:47PM (#43826497)
Tokio + Axum + SQLx has been a total game-changer for me for web dev. It's by far the most productive I've been with any backend web stack.
Americans in the market for a "premium" shower head are clearly not looking for the cheapest thing on the market. So it's obvious that they would be willing to spend more for the added feel-good of a domestic product.
Re:Blog hosted on a Nintendo Wii on Monday April 21, 2025 @02:57PM (#43755243)
got hugged.

Maybe the next post will say "Blog is hosted on a Nintendo Wii (running Varnish)"

Re:A new form of verification on Bluesky on Monday April 21, 2025 @02:47PM (#43755137)
My initial thought is about GPG's "Web of Trust" system for trusting strangers' keys. But I don't know if that's a very good example since it always seemed somewhat esoteric and maybe not very successful in general.
Re:A new form of verification on Bluesky on Monday April 21, 2025 @02:26PM (#43754927)
I'm guessing because users will just "verify" themselves, and then the whole thing is meaningless.
Re:Python's new t-strings on Monday April 21, 2025 @10:42AM (#43752563)
The first mistake we're going to see a library developer make is:

    def execute(query: Union[str, Template]):

Maybe because they want their execute function to be backwards compatible, or just because they really do want to allow either raw strings are a template string.
Re:Python's new t-strings on Monday April 21, 2025 @10:12AM (#43752231)
the {name} parameter is in the locals() dict like it always is
Re:Python's new t-strings on Monday April 21, 2025 @10:06AM (#43752173)
Aren't there other benefits to server-side parameter binding besides just SQL-injection safety? For instance, using PG's extended protocol (binary) instead of just raw SQL strings. Caching parameterized prepared statements, etc.

Also:

    db.execute(t"QUERY WHERE name = {name}")
Is dangerously close to:

    db.execute(f"QUERY WHERE name = {name}")

A single character difference and now you've just made yourself trivially injectible.

I don't think this new format specifier is in any way applicable to SQL queries.

Re:Getting Forked by Microsoft on Monday April 21, 2025 @07:23AM (#43750656)
Don't use one of the most permissive licenses in existence and certainly not one that doesn't provide copyleft. This is all very well established at this point and yet somehow the GPL seems to have gone out of vogue.
> when we tried to use them in production at scale

Debian and Ubuntu have been using them in production and "at scale" for decades. What are the "sharp edges" that you're trying to solve?

What is an example of something that would require "distributed signing"?
Maybe I'm wrong, but aren't apt repositories just files in a web root? There are many scripts in the Debian ecosystem to generate and maintain such web directories. Maybe the actual package building would be interesting, but I don't know about just "we'll host your .deb files and keep the index updated"
Re:Why Fennel? on Sunday April 13, 2025 @02:20PM (#43674741)
I love seeing new languages targeting the Lua runtime. I've been adding Lua scripting support to pretty much everything I make now. I recently made my SSE server programmable with Lua and it's extended the functionality far beyond what I would have had the patience and time to do myself. Highly recommend Lua with mlua-rs Rust bindings.

[0] https://tinysse.com

[1] https://github.com/benwilber/tinysse

[2] https://github.com/mlua-rs/mlua

Re:Roo or Cline? We're building a superset on Saturday April 12, 2025 @03:05PM (#43667088)
Yeah. RooCode intentionally uses one of the most permissive licenses in existence and even formally declares in the README of the project that they are not responsible for the usage or output of the software whatsoever.

And yet people will still get upset when the software isn't used like the way they want it to be used...

Re:You might not need WebSockets on Saturday April 12, 2025 @02:41PM (#43666913)
"just works" in the sense that this is a complete SSE client application:

    while true; do
        curl example.com/sse | handle-messages.sh
    done


Because it's just text-over-http. This isn't possible with websockets without some kind of custom client and layer 7 protocol stack.
Re:You might not need WebSockets on Saturday April 12, 2025 @12:52PM (#43666042)
I pretty much always prefer SSE over websockets just because of the simplicity end-to-end. It's "just HTTP", so all the HTTP-based tech and tools apply out-of-the-box without any really special configuration that is required for WS. Curl (or even netcat) "just works", no special client. I don't have to do any special CDN configuration to proxy connections or terminate SSL aside from just turning off buffering.

Websockets requires almost a completely new L7 stack and tons of special configuration to handle Upgrade, text or data frames, etc. And once you're out of "HTTP mode" you now have to implement the primitive mechanics of basically everything yourself, like auth, redirects, sessions, etc.

It's why I originally made Tiny SSE which is a purpose-built SSE server written in Rust and programmable with Lua.

https://tinysse.com

https://github.com/benwilber/tinysse

Older »