HackerTrans
TopNewTrendsCommentsPastAskShowJobs

leontrolski

no profile record

Submissions

Prism: An Impure Functional Language with Typed Effects

stephendiehl.com
6 points·by leontrolski·il y a 16 jours·0 comments

Generalised plusequals

leontrolski.github.io
16 points·by leontrolski·il y a 3 mois·11 comments

“Disregard That” Attacks

calpaterson.com
129 points·by leontrolski·il y a 4 mois·94 comments

Aldo's Game of Music

aldodevos.nl
1 points·by leontrolski·il y a 4 mois·0 comments

National Raisin Reserve

en.wikipedia.org
6 points·by leontrolski·il y a 7 mois·0 comments

Show HN: I 3D printed a running buggy

leontrolski.github.io
1 points·by leontrolski·il y a 8 mois·0 comments

Using Python 3.14 template strings to write Python

leontrolski.github.io
3 points·by leontrolski·il y a 9 mois·1 comments

comments

leontrolski
·il y a 22 jours·discuss
Similarly - 80 line LISP interpreter with integers, lexical scope, first class functions

https://leontrolski.github.io/interpreter.html
leontrolski
·il y a 2 mois·discuss
Neat.

I'm trying to compress recipes into little schematics https://leontrolski.github.io/recipes.html
leontrolski
·il y a 3 mois·discuss
What would be the equivalent to this in Haskell (with or without lens):

    cat = Cat(age=3)
    l = [1, [2, cat], 4]
    alt l[1][1].age.=9
That would give us l equal to:

    [1, [2, Cat(age=9)], 4]
leontrolski
·il y a 3 mois·discuss
This is surprising to me:

  l[1][1].age:9
  # (1,(2,{"age":9}),4)
How come it doesn't return just:

  {"age":9}
Or is there something totally different going on with references here? As in, how is this different to:

  l_inner = l[1][1]
  l_inner.age:9
leontrolski
·il y a 4 mois·discuss
Yes, AI or no AI, tell me about something actually interesting that you're working on.

Currently it feels a bit like everyone is talking about what new editor they're using. I don't care about that type of developer tooling very much. AI isn't coming up with some exciting new database, type system, etc etc.

"Look at how I'm able to web dev x% faster" because of LLMs is boring.
leontrolski
·il y a 8 mois·discuss
Ditto, another Upset blog post - https://leontrolski.github.io/upset.html
leontrolski
·il y a 10 mois·discuss
Lovely writeup!

> Pascal did not have sum types because Wirth thought they were less flexible than untagged unions

I'm not sure whether my dream language would have tagged or untagged unions (Scala 3 has both it seems). I'd be interested if anyone has any further points of comparison beyond:

Tagged unions, eg. in Rust: enum Tagged {A(i64), B(String), C(f64)} Untagged unions, eg. in typed Python: Tagged = int | str | float

Tagged unions are better as you can represent duplicated types and types with no data, eg: enum Tagged {A, B(f64), C(f64)}

Untagged unions are better as you can willy nilly create new subsets and intersections of types. I find often in AST-ish work I want to express eg: def f(x: A | B | C) -> A | B
leontrolski
·l’année dernière·discuss
> also fast when transactions are held open

In my linked example, on getting the item from the queue, you immediately set the status to something that you're not polling for - does Postgres still have to skip past these tuples (even in an index) until they're vacuumed up?
leontrolski
·l’année dernière·discuss
I'd be interested as to how dumb-ol' polling would compare here (the FOR UPDATE SKIP LOCKED method https://leontrolski.github.io/postgres-as-queue.html). One day I will set up some benchmarks as this is the kind of thing people argue about a lot without much evidence either way.

Wasn't aware of this AccessExclusiveLock behaviour - a reminder (and shameless plug 2) of how Postgres locks interact: https://leontrolski.github.io/pglockpy.html