Hacker Newsnew | past | comments | ask | show | jobs | submit | more rekwah's commentslogin

If a selling point is run from "one file", that's quite difficult to do in python. There are things like pyinstaller but you end up shipping the entire interpreter in the bundle.


The pex tool lets you build single file python executables which are well suited for server deployments.


How big is a python3 runtime when pex has packaged it up? And do you happen to know what the output binary is linked to?


As I recall, pex doesn't package up the runtime. It essentially packages up your venv, code, and resources and runs them under an installed runtime. It makes use of a relatively unknown bit of python functionality, which is that CPython will try to treat a zip file as a valid python script.


oh wow thanks i didn't know about this. in that case it would be super simple for me to wrap up a FastAPI server with SQLite or even some in-memory database that runs elsewhere, deliver as a single file!


Yeah this kind of thing was common when I worked at Twitter (where AFAIK pex/pants was developed) on an infrastructure team. It's a cool tool that few outside of Twitter seem to be aware of.


You could also just use Docker to wrap anything


Reminds me of Zach Holman's post "Double Shipping".

https://zachholman.com/posts/double-shipping


I haven't seen this before, this is great! Wow:

The result? The dozens of hours of preparation I put into the talk for the 200 people in the room ends up getting viewed by hundreds of thousands of people online.


As the author of a popular ULID implementation in python[1], the spec has no stewardship anymore. The specification repo[2] has plenty of open issues and no real guidance or communication beyond language implementation authors discussing corner cases and the gaps in the spec. The monotonic functionality is ambiguous (at best), doesn't consider distributed id generation, and is implemented differently per-language [3].

Functionally, UUIDv7 might be the _same_ but the hope would be for a more rigid specification for interoperability.

[1]: https://github.com/ahawker/ulid

[2]: https://github.com/ulid/spec

[3]: https://github.com/ulid/spec/issues/11


I've bee using ULIDs in python for about a year now and so far have been super happy with them, so a) thank you for maintaining this! b) I always felt a bit uneasy about the way the spec describes the monotonicity component. Personally I just rely on the random aspect as I am fortunate enough to say that two events in the same millisecond are effectively simultaneous.

At that point, it's basically just UUID7 with Crockford base32 encoding, more or less.

IMHO the in-process monotonically increasing feature of ULID is misguided. As you mention, distributed ids are a pain. The instant you start talking distributed, monotonic counters or orderable events (two threads count as distributed in this case), you need to talk things like Lamport clocks or other hybrid clock strategies. It's better to reach for the right tools in this case, vs half-baked monotonic-only-in-this-process vague guarantee.


Thank you, I've been using ULID for a while now, and it serves my purposes. But I have long term support concerns.

UUIDv7 really seems like the sweet spot between pure INT/BIGINT auto incrementing PKs and universally sortable universal ids.


We do this in the United States as well. We're still building tanks the military doesn't even want.


I know https://github.com/bytebuilders/vue-openapi-form exists but no first hand experience with it.

There's also a number of them out there that generate a form from json schema. I'm most familiar with https://github.com/formschema/native which we use/extend at https://routegy.com for microapps.


PLP. I had this for awhile (20-30-20) with the Dell U3011 back when that was a large monitor.

I have PL now with an ultra-wide but still think about trying to include a third monitor, I miss that setup.


SQLModel is a glue/shim layer for defining models that are both pydantic & SA compatible so you don't have to duplicate the effort.


This makes me of Melancholia[0] although the outcome may or may not be different (#nospoilers)

[0]https://www.imdb.com/title/tt1527186/


https://4dayweek.io/ is a job board for positions like this.

Original Show HN is https://news.ycombinator.com/item?id=26900533


Thinking of https://4dayweek.io/, perhaps?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: