HN user

leontrolski

2,189 karma

https://leontrolski.github.io/

Posts45
Comments64
View on HN
www.stephendiehl.com 24d ago

Prism: An Impure Functional Language with Typed Effects

leontrolski
6pts0
leontrolski.github.io 2mo ago

Generalised plusequals

leontrolski
16pts11
calpaterson.com 3mo ago

“Disregard That” Attacks

leontrolski
129pts94
www.aldodevos.nl 4mo ago

Aldo's Game of Music

leontrolski
1pts0
en.wikipedia.org 6mo ago

National Raisin Reserve

leontrolski
6pts0
leontrolski.github.io 8mo ago

Show HN: I 3D printed a running buggy

leontrolski
1pts0
leontrolski.github.io 9mo ago

Using Python 3.14 template strings to write Python

leontrolski
3pts1
leontrolski.github.io 1y ago

Cheeky Python Shell Script

leontrolski
3pts1
www.youtube.com 1y ago

Senior Engineer tries Vibe Coding [video]

leontrolski
2pts0
github.com 1y ago

Show HN: trolskgen – Ergonomic Codegen for Python

leontrolski
2pts1
leontrolski.github.io 1y ago

My dream thermostat (2024)

leontrolski
48pts68
github.com 1y ago

Show HN: Tkintergalactic - Declarative Tcl/Tk UI Library for Python

leontrolski
86pts10
leontrolski.github.io 1y ago

My Dream Thermostat

leontrolski
27pts26
buttondown.com 1y ago

Unusual Raku Features

leontrolski
274pts157
leontrolski.github.io 1y ago

Stop Using Pytest Fixtures

leontrolski
2pts0
leontrolski.github.io 1y ago

Adding syntax to the CPython interpreter

leontrolski
161pts57
arxiv.org 1y ago

OpenIVM: A SQL-to-SQL Compiler for Incremental Computations

leontrolski
2pts0
leontrolski.github.io 1y ago

Weeding out flakey database tests

leontrolski
1pts0
davidwhittingham.com 2y ago

Map Hopping Made Easy

leontrolski
3pts0
leontrolski.github.io 2y ago

Weenie Lisp interpreter in nice typed Python

leontrolski
1pts0
leontrolski.github.io 2y ago

Avoiding npm hell with swc

leontrolski
2pts0
devina.io 2y ago

devina.io – 76 advanced tools for developers, designers and content editors

leontrolski
8pts0
github.com 2y ago

ocdiff – Fast and simple side-by-side diff library for Python

leontrolski
1pts0
leontrolski.github.io 2y ago

Postgres locks explorer

leontrolski
130pts9
blog.codinghorror.com 2y ago

Showstopper Review – lessons from building NT

leontrolski
6pts1
leontrolski.github.io 2y ago

Postgres as queue

leontrolski
224pts119
leontrolski.github.io 2y ago

SQLAlchemy Relationship Loading Techniques

leontrolski
2pts0
leontrolski.github.io 3y ago

The CMD-Click Manifesto

leontrolski
3pts0
www.cyclestreets.net 3y ago

CycleStreets route planner – how it works

leontrolski
1pts1
leontrolski.github.io 4y ago

Lambda calculus succinctly in modern JavaScript

leontrolski
1pts0

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]

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

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.

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

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?

I plan on using it for semi throw away UIs for things where I don't want the user to have to spin up a Web server. Right now there's no canvas support, but there is that kind of thing in the Tk/Tcl docs (linked in the project). I probably need to add a way to reference a specific Widget so you can access the raw name and run taw Tcl against it.

If like me, you've ignored poetry and friends and stuck with pip-tools (congrats!), uv (used by rye internally) is a drop in replacement.

IMHO pip-tools was always the far nicer design than poetry, pipenv etc as it was orthogonal to both pip and virtualenv (both of which have been baked into Python for many years now). I would argue Rye is the iterative, standards compliant approach winning out.

Beyond the speedups from Rust, it's nice to have some opinionated takes on where to put virtualenvs (.venv) and how to install different Python versions. It sounds small, but since wheels fixed numpy installs, sane defaults for these and a baked in pip-tools is basically all that was missing. Talking of which, what has been the point of anaconda since binary wheels became a thing?

I'm always excited by the idea of rendering jsx from Python in the same process. Mostly as a bridge between eg. an existing Django app and full SPA React land. You'd swap out the scrappy Django string templating with jsx, then once a page passes some frontend interaction complexity threshold shift it over entirely (with shared components between both). Could this project help achieve this or are imports/build processes etc too much of an impediment?

Postgres as queue 2 years ago

Thanks for the comprehensive reply, does the following argument stand up at all? (Going on the assumption that LISTEN is one more concept and one less concept is a good thing).

If I have say 50 workers polling the db, either it’s quiet and there's no tasks to do - in which case I don't particularly care about the polling load. Or, it's busy and when they query for work, there's always a task ready to process - in this case the LISTEN is constantly pinging, which is equivalent to constantly polling and finding work.

Regardless, is there a resource (blog or otherwise) you'd reccomend for integrating LISTEN with the backend?

Ahh, I see you're a cofounder at feldera :)

I have a couple of dbsp questions if you're feeling generous and have 10mins free - reach out ojhrussell at gmail

I didn't - I wanted to build something I could understand, and the rust implementation comes with a load of (reasonable) complexity, some resulting from the execution model, some from performance requirements.

stepping has 3 Zset implementations - in memory, sqlite and postgres. Currently considering whether to write a small rust one.

There's some more details here: https://stepping.site/docs/internals/how-it-works/

I've been playing around with writing an application-orientated Incremental View Maintenance library along these lines:

https://stepping.site

It's based off of the DBSP paper, which counts Materialize's Frank McSherry as an author. Definitely not ready for the prime time, but any feeback welcome!

  It has been pointed out that this is apparently similar to Djikstra's algorithm although when it was written the author wasn't aware of that.

  The inspiration for the algorithm comes from a solution to a problem set in a mid 1980s edition of A&B Computing magazine.

A really nice collection of examples in their original and their refactored form - nice work. I'm similarly in two minds about the feature, it's cute, but is it worth it?

I think it's indicative that the nicest use is in AST processing. As someone that works on the occasional parser-y side project it looks pretty cool, but also, 97% of professional Python development is in data-science/application development. I suspect this is a case of the core language devs having a bias towards features that are useful to them as opposed to the community as a whole.