frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
250•theblazehen•2d ago•82 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
22•AlexeyBrin•1h ago•1 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
705•klaussilveira•15h ago•206 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
967•xnx•21h ago•558 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
66•jesperordrup•5h ago•28 comments

Reinforcement Learning from Human Feedback

https://arxiv.org/abs/2504.12501
7•onurkanbkrc•42m ago•0 comments

Making geo joins faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
135•matheusalmeida•2d ago•35 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
42•speckx•4d ago•34 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
68•videotopia•4d ago•6 comments

ga68, the GNU Algol 68 Compiler – FOSDEM 2026 [video]

https://fosdem.org/2026/schedule/event/PEXRTN-ga68-intro/
13•matt_d•3d ago•2 comments

Jeffrey Snover: "Welcome to the Room"

https://www.jsnover.com/blog/2026/02/01/welcome-to-the-room/
39•kaonwarb•3d ago•30 comments

What Is Ruliology?

https://writings.stephenwolfram.com/2026/01/what-is-ruliology/
45•helloplanets•4d ago•46 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
237•isitcontent•16h ago•26 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
237•dmpetrov•16h ago•126 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
340•vecti•18h ago•147 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
506•todsacerdoti•23h ago•247 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
389•ostacke•21h ago•97 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
303•eljojo•18h ago•187 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
361•aktau•22h ago•186 comments

Cross-Region MSK Replication: K2K vs. MirrorMaker2

https://medium.com/lensesio/cross-region-msk-replication-a-comprehensive-performance-comparison-o...
3•andmarios•4d ago•1 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
428•lstoll•22h ago•284 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
71•kmm•5d ago•10 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
25•1vuio0pswjnm7•2h ago•14 comments

Was Benoit Mandelbrot a hedgehog or a fox?

https://arxiv.org/abs/2602.01122
23•bikenaga•3d ago•11 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
96•quibono•4d ago•22 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
270•i5heu•18h ago•219 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
34•romes•4d ago•3 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1079•cdrnsf•1d ago•461 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
64•gfortaine•13h ago•30 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
304•surprisetalk•3d ago•44 comments
Open in hackernews

Uncommon Uses of Python in Commonly Used Libraries (2022)

https://eugeneyan.com/writing/uncommon-python/
99•sebg•7mo ago

Comments

iamevn•7mo ago
Seems fairly standard stuff for libraries to consider. I was really hoping for some weird stuff like patching bytecode or implementing entire different languages as a python library.
Pinegulf•7mo ago
Sure, but "Do not deprive people the joy of discovery." -Someone, not me.
ethan_smith•7mo ago
Check out Coconut (https://github.com/evhub/coconut), which implements an entire functional programming language as a Python superset that compiles to Python bytecode.
froh•7mo ago
thanks for resharing, interesting well written read

previous: https://news.ycombinator.com/item?id=32528919

pjc50•7mo ago
I briefly thought "oh yeah, mixins, shame we can't do that in C# with single inheritance" and then realized that's what extension methods are for (and slightly more general).

I have some C# code which relies on calling an extension method on a null instance, which is mildly naughty but saves a lot of refactoring.

Xss3•7mo ago
You can call methods on null instances?
pjc50•7mo ago
You can call an extension method, because it's just fancy syntax for calling a non member method with the thing before the . as the first argument. If you then don't reference it at all, it doesn't matter that it's null.
stephenlf•7mo ago
What a fantastic read. It’s nothing groundbreaking, but it’s a perfect model of how to learn good patterns.
silvester23•7mo ago
If you want to combine a mixin with a base class you have no control over, just put the base class last in the inheritance chain. Then it does not matter if it calls its super __init__.
Y_Y•7mo ago
And if there are two such base classes?
CmdrKrool•7mo ago
In the case of multiple base classes wouldn't it be more sensible for the derived class to forego the lexical convenience of super() and simply call each base explicitly? i.e.

        BaseEstimator.__init__(self, **kwargs)
        ServingMixin.__init__(self, **kwargs)
If one wants to inherit from multiple classes then they should be responsible for specifying the details of how that happens. Why should a base class be expected to add boilerplate just in case some external consumer comes along and wants to use it in some unforeseeable context?

That super() has a "method resolution order" seems like a fudge. Now 'super' doesn't necessarily mean 'superclass' anymore at the point of use. Am I missing some other hypothetical situation in which super()'s MRO brings more value for the price of having to know about this extra, implicit behaviour?

And what's funny is that in the example given, the first base class not calling super() leads to the bad consequence that the other base class doesn't get to set some internal state (self.mode). Yet in the next section, "When to use a Mixin", it advises: "A mixin is a class that [...] does not contain state"

DHRicoF•7mo ago
I could try to answer myself, but this will be far better that I could express in english:

https://www.youtube.com/watch?v=EiOglTERPEo

zahlman•7mo ago
These are things that less experienced Python programmers might not know about, but they're not at all uncommon. If anything, calling `super()` in a base class should be the default if you're designing a framework where you expect people to use mixins (or even just explicitly intend for them to derive your classes, really).

Creating blank `__init__.py` files has basically become standard because the use cases where you'd prefer to omit them don't work well with packaging tools (since everything will be in `site-packages` anyway; most people also aren't going to install multiple things from a common namespace that you publish; adding those files helps build backends and other tools understand your project layout; etc.). On the flip side, the use cases for writing something in `__init__.py` should be evident from just considering the fact that it's possible. (It's also a useful refactoring tool; if you are planning to make a package but don't know what all its modules should be yet, you can start by turning an existing `foo.py` into `foo/__init__.py`.) Preemptively importing from `__init__.py`, though, is not always a great idea; it represents extra up-front import time that clients can't opt out of. (This has a lot to do with why Pip takes a significant amount of time even when it ultimately determines that it hasn't been asked to do anything.)

Preferring relative imports is, if anything, not common enough, but is certainly common among people who know what they're doing.

As for class/static/instance methods:

> When should we use class or static methods? Here are some basic guidelines I found.

The use cases more or less derive directly from their differences. But if you're going to cite sources for this, it's a crying shame to leave out Raymond Hettinger's "Python's Class Development Toolkit" (https://www.youtube.com/watch?v=HTLu2DFOdTg).