HN user

benwilber0

1,356 karma
Posts22
Comments216
View on HN
benwilber.github.io 5mo ago

Code Is A Commodity

benwilber0
2pts0
www.earth.com 1y ago

A lithium deposit valued at $1.5T discovered in the US state of Oregon

benwilber0
3pts2
benwilber.github.io 1y ago

SQLite is great for what it is: a small, embedded SQL database. But nothing more

benwilber0
3pts1
tinysse.com 1y ago

TinySSE – A Programmable Server for Server-Sent Events in Rust and Lua

benwilber0
2pts0
benwilber.github.io 1y ago

Never enable 2FA for accounts that you actually care about (2023)

benwilber0
10pts58
github.com 5y ago

Show HN: Boltstream – Self-hosted full end-to-end live video streaming platform

benwilber0
510pts93
github.com 5y ago

Show HN: OpenResty buildpack for Heroku (and compatibles like Dokku)

benwilber0
1pts0
benwilber.github.io 7y ago

Building a live video streaming website – Part 3 – DRM

benwilber0
86pts21
benwilber.github.io 7y ago

Building a live video streaming website – Part 2 – The Application

benwilber0
4pts0
news.ycombinator.com 8y ago

Ask HN: How to protect your dotfiles from being stolen by nefarious scripts?

benwilber0
2pts4
news.ycombinator.com 9y ago

Ask HN: Why don't cloud providers have regions in France?

benwilber0
1pts1
benwilber.github.io 9y ago

Implementing Stream Keys with Nginx-Rtmp and Django

benwilber0
2pts0
benwilber.github.io 10y ago

HLS video hotlink protection with Nginx and Varnish

benwilber0
2pts0
benwilber.github.io 10y ago

How I built Sinklog.com – combine your log outputs into a single stream

benwilber0
2pts2
benwilber.github.io 10y ago

How I built Sinklog.com, combine your log outputs into a single stream

benwilber0
2pts0
benwilber.github.io 10y ago

How I built ghit.me, hit count badges for GitHub

benwilber0
55pts18
ghit.me 10y ago

Show HN: Ghit.me – hit counter badges for GitHub

benwilber0
7pts5
benwilber.github.io 10y ago

How I built ghit.me

benwilber0
1pts0
benwilber.github.io 10y ago

Unified Endpoints in Nginx-push-stream

benwilber0
1pts0
benwilber.github.io 10y ago

Show HN: Hitcount.me – Live Website Popularity

benwilber0
67pts10
benwilber.github.io 10y ago

Dynamic log formats in Nginx

benwilber0
1pts0
benwilber.net 12y ago

Realtime pixel tracking with nginx, syslog-ng, and Redis

benwilber0
125pts27

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.

Lua for Elixir 1 year ago

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

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.

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)

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.

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.

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.

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.

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.

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.

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.

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"

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

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

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