Better HN
topnewbestaskshowjobs
Log inSign up

chrisrodrigue

50 karma · joined Aug 24, 2024 (2y ago) · 15 submissions

https://github.com/chrisrodrigue
Submissions

comment 1y ago · link · parent

Web browsers are just glorified JavaScript interpreters. Making Python a first-class citizen in the browser would be sweet.

comment 1y ago · link · parent

Zig hits on a lot of Zen of Python.

> Beautiful is better than ugly.

> Explicit is better than implicit.

> Simple is better than complex.

> Readability counts.

What really sets Zig apart from the usual suspects (C, C++, Rust) is that it has first class compile-time reflection capabilities built into the language (comptime, @field, @typeInfo, etc.) rather than bolted on as macros or templates.

comment 1y ago · link · parent

Pretty awesome if you ask me.

Why even use Unity if this exists? Why even install an app if you could feasibly run a full-blown game with 3D physics in the browser on your iPhone at 60 FPS? Where in the world are all the browser-based games?

comment 1y ago · link · parent

...isn't that what templates were made for? Template metaprogramming in C++ is Turing-complete.

5.

Ask HN: What tiny LLMs are you getting the best results from?

4 points · by chrisrodrigue · 1y ago · 1 comment

comment 1y ago · link · parent

We have a handful of ways to create strings now.

Meanwhile, pytest is still not part of the standard library.

comment 1y ago · link · parent

That seems extraordinarily affordable for a permanent, life-altering operation that needs 30 medics and takes 17 hours.

For a comparison, check out what a 1-month supply of a biologic drug costs: https://www.goodrx.com/stelara

comment 1y ago · link · parent

From https://github.com/python/cpython/issues/99108#issue-1436673...:

> As evidenced by the recent SHA3 buffer overflow, cryptographic primitives are tricky to implement correctly. There might be issues with memory management, exceeding lengths, incorrect buffer management, or worse, incorrect implementations in corner cases.

This is a proactive fix for zero days that may be lurking in the wild.

comment 1y ago · link · parent

There's no mention of what Python version this is actually in.

After some digging, it looks like the answer is 3.14 [0], so we won't be seeing this until October [1].

One could argue that this is a security fix (just read the first sentence of the blog post) and should be included in all the currently supported versions (>=3.9) of Python [2].

[0] https://github.com/python/cpython/blob/main/Doc/whatsnew/3.1...

[1] https://peps.python.org/pep-0745/

[2] https://devguide.python.org/versions/

comment 1y ago · link · parent

Yeah, embedded C++ is a wildly different experience from vanilla. I've worked in large embedded C++ codebases where we couldn't use the STL and had to use homegrown containers for everything.

I wonder how Rust is stacking up (no pun intended) in the embedded game these days.

comment 1y ago · link · parent

They are grumpy about having to install the Rust compiler for a good reason. You can’t compile for Rust on Windows without using MSVC via Visual Studio Build Tools, which has a restrictive license.

comment 1y ago · link · parent

Linear Algebra Unit?

comment 1y ago · link · parent

Yeah, definitely. It's basically executable pseudocode and it's really simple for a beginner to pick up and hit the ground running for a variety of use cases.

Some people will tell you to start with C or C++ to get a better intuition for what's actually happening under the hood in Python, but that's not really necessary for most use cases unless you're doing something niche. Some of the most popular use cases for Python are webapps, data analysis, or general automation. For the 1% of use cases that Python isn't the right fit for, you can still use it to prototype or glue things together.

There are a lot of great resources out there for learning Python, but they won't necessarily teach you how to make great software. You can't go wrong with the official tutorial. https://learn.scientific-python.org/development/ is pretty terse and incorporates a lot of best practices.

comment 1y ago · link · parent

Python is really shaping up to be the lingua franca of programming languages. Its adoption is soaring in this FOSS renaissance and I think it's the closest thing to a golden hammer that we've ever had.

The PEP model is a good vehicle for self-improvement and standardization. Packaging and deployment will soon be solved problems thanks to projects such as uv and BeeWare, and I'm confident that we're going to see continued performance improvements year over year.

comment 2y ago · link · parent

I love this kind of detective work. It blows my mind how easy it is to pinpoint someone with the smallest bits of identifying info.