ImgurRefugee114

joined 11 months ago
[–] ImgurRefugee114@reddthat.com 8 points 14 hours ago

Yeah, that would do it...

[–] ImgurRefugee114@reddthat.com 2 points 14 hours ago* (last edited 14 hours ago)

I recently made a lua framework that constructs callable tables to be used as functions that take a table as a dictionary of named argument. The function declares a schema of parameters with associated required/default/optional policies that put their respective values through a transform and validation pipeline. A similar pipeline can also be put on the result to make explicit guarantees. Can also configure whether argument errors/violations should throw or return results,error shape

The wrapped function recieves a table of processed arguments in a known state, while keeping that noise separate from the business logic. Also configurable at runtime with introspection, and param pipelines are immutable so they can be composed.

If that sounds like it introduces a lot of overhead, you're right! But 1) it's Lua and 2) omg is it so worth it when used properly. The UX is great; the callsite ergonomics, maintainability, and self-documenting nature is always what I felt was missing. Ships with & plays pretty well with type annotations too.


Anyways, that all makes it really convenient to know what's responsible for what, and encourages pretty safe designs.

[–] ImgurRefugee114@reddthat.com 57 points 14 hours ago* (last edited 14 hours ago) (3 children)

It's not a glass, it's the

hydrationContainerManagerObjectFactory

Not to be confused with the

hydrationContainerManagerTypeFactory

Which is the template

[–] ImgurRefugee114@reddthat.com 2 points 16 hours ago

No, not to my nixos configuration. In fact I don't even have a global / system / user-wide Python interpreter. I rely on nix shells and package closures; no imperative use of python.

I'm not a big python dev; my meaningful experience is with systems languages. But for a release or project i intend to be consumed outside of nix, I'll use venvs and a requirements file because that's just the right way to do things.

But what I meant was that I'd use a nix shell or build package that uses py libs that are already packaged for nix, or package the ones that aren't myself, and just use the nix closure as my venv; no regular venv or pip workflow.

Devenv seems to let you just point at a requirements file and it builds the venv for you. Very clean for portability beyond nix consumers that way. But most of my Python projects are personal utilities and can target nix exclusively.

[–] ImgurRefugee114@reddthat.com 19 points 1 day ago* (last edited 1 day ago) (2 children)

Yeah. Believe it or not, when I saw him last, he was leaning left.

[–] ImgurRefugee114@reddthat.com 34 points 1 day ago (5 children)

Really proud of him for toning down the rhetoric. Guy hasn't said a racist thing since he last went viral.

[–] ImgurRefugee114@reddthat.com 8 points 1 day ago* (last edited 1 day ago)

... I'll be living in a bunker, if anyone needs me. Ring the bell twice when it's over.

[–] ImgurRefugee114@reddthat.com 4 points 1 day ago* (last edited 1 day ago)

Lots of things are, but the right doesn't usually care. In fact, they don't seem to account for reality much at all.

[–] ImgurRefugee114@reddthat.com 8 points 1 day ago (1 children)

Okay I hadn't heard that before; I lol'd in the traditional meaning

[–] ImgurRefugee114@reddthat.com 122 points 1 day ago* (last edited 1 day ago) (3 children)

America is speedrunning its descent to become the first 5th world country, but- WOAH! THERE'S RUSSIA WITH A STEEL CHAIR

Yes the nix catgirls sure are sloppy mmmm

 

Kazimir Malevich's "Black Square" painting, 1915

view more: next ›