HNHacker News
TopNewBestAskShowJobs

nhumrich

1,785 karma · joined April 19, 2015

@nhumrich

[ my public key: https://keybase.io/nhumrich; my proof: https://keybase.io/nhumrich/sigs/IYE1k9gKJH3d5VAUTw6pMBufyQIVsGQ62UeqYINWi9Y ]

submissionscomments
nhumrich··on Redis is fast – I'll cache in Postgres
I use pg cron for this. But I don't have a need for TTL to be to the minute accurate, or even to the hour.
nhumrich··on Do YC after you graduate: Early decision for students
Phase-2 being what? demo day?
nhumrich··on Do YC after you graduate: Early decision for students
Except that all acceptance via YC is actually done remotely. They don't meet you in person until after they have already wired the money.
nhumrich··on Libghostty is coming
I have heard this from a lot of people, yet here I am, using a terminal that supports this, and have yet to ever do it. Can you help me understand what workflows you depend on Ctrl+f for? I wonder if I am missing something big.
nhumrich··on iPhone Air
> there is nowhere to go with phones than thinner

Umm, smaller? We don't need thinner, we need smaller.

nhumrich··on Immich – High performance self-hosted photo and video management
I have a raspi sitting idle and would love to use it to run this! What are common solutions for backups? I would hate to lose all my photos. Is buying a Synology the only option?
nhumrich··on Stop writing CLI validation. Parse it right the first time
So, typer than
nhumrich··on What happens when 10k AI agents are left to self-govern in a virtual world?
Let me try: "outdated and groundless"
nhumrich··on Notion releases offline mode
Joplin
nhumrich··on Design patterns you should unlearn in Python
CPython core devs. Specifically talking about the CPython code base. Hence, the namespace comment, which doesn't really make sense in a purely python context.
nhumrich··on PYX: The next step in Python packaging
GPU/c-bindings.

Python packaging for for Python only modules has never been a problem. When people say they hate python packaging they are usually talking about being able to successfully install dependencies without much thinking. But, the biggest reason that doesn't work is because of the dependencies that have to be compiled. Which brings it's own problems. Have you ever had a c dependency on node or ruby on a system that wasn't the same system they built it with? Turns out it sucks in all the languages. It's just that the amount of c-level packages in python is quite larger than say ruby. The likelihood of a problem is significantly larger.

Especially in the GPU accelerated space.

nhumrich··on Design patterns you should unlearn in Python
People misunderstand the target audience and code base for the zen of python
nhumrich··on Postgres LISTEN/NOTIFY does not scale
You can setup notify to run as a trigger on an events table. The job that listens shouldn't need a pool, it's a long lived connection anyway. Now you can keep using pgbouncer everywhere else.
nhumrich··on Containerization is a Swift package for running Linux containers on macOS
Since this is touching Linux, and Linux is copy left, they _have_ to do this.
nhumrich··on The Myth of Developer Obsolescence
> code is not an asset—it's a liability

Yes, this. 100% this. The goal is for a program to serve a goal/purpose with the least a amount of code possible. AI does the exact opposite. Now that code generation is easy, there is no more natural constraint preventing too much liability.

nhumrich··on The Windows Subsystem for Linux is now open source
WSL is so incredible. But support for it from 3rd party dev tools is so terrible.
nhumrich··on Static as a Server
This model already has a name: pre-rendered.
nhumrich··on OpenAI reaches agreement to buy Windsurf for $3B
Try out Junie
nhumrich··on Python’s new t-strings
This looks like a performance nightmare, and would likely never have IDE integration. So I guess I was wrong. It could be a library. But will be much better supported officially.
nhumrich··on Python’s new t-strings
You should check out PEP 787
nhumrich··on Python's new t-strings
We're at a point where the current generation of programmers weren't even _alive_ when that happened.
nhumrich··on Python’s new t-strings
Yep. Probably worth it. You could also do this with a monkeypatch method to "opt in" to this change.
nhumrich··on Python's new t-strings
It's for SQL, HTML, and shell. But idk how solving injection, a top on the OWASP list forever is considered "overkill".
nhumrich··on Python's new t-strings
No. F-strings should still be the default. T-strings aren't usable directly, and don't have a `str` like API, so they aren't even compatible, intentionally.
nhumrich··on Python’s new t-strings
I for one think python has never been better.
nhumrich··on Python's new t-strings
I suggest you read the PEP, there is a section on i18n. Short version is it's not designed for this use case.

As for variables and arbitrary code/lambdas, yes: t-strings can do that, just like f-strings

nhumrich··on Python’s new t-strings
This feature actually can't be a library. It needs to be able to preserve the string before the variables are passed in, which a library would be unable to do because f-strings immediately replace all the values. The whole premise of t-strings is to know which values where "hard coded" and which ones are variables. A library can't possibly know that. And a function call wouldn't have access to the local variables. The only way to do this without language support is to pass `locals()` into every function call.
nhumrich··on Python’s new t-strings
For me, this is the best feature to land in python for 6 years. JS has had this and it allows my code to be completely safe from SQL injection, which is an absolutely incredible feature, given SQL injection has been the #1 vulnerability for a long time.
nhumrich··on Python’s new t-strings
This was the original proposed idea in the PEP (750), but it changed overtime. There is a section in the PEP to explain why it changed to t-strings if you are interested.
nhumrich··on Python's new t-strings
The PEP was initially proposed this way. But due to various reasons, making it an open namespace was considered to overcomplicate the language (read: understanding coffee when reading it). Alternatively, there doesn't really seem to be much loss of ability with t-strings. Libraries can require a template as it's accepted type, instead of having to invent their own custom type and named template.
← PreviousPage 3 of 24Next →