Readit News logoReadit News
beagle3 commented on Surface Tension of Software   iamstelios.com/blog/surfa... · Posted by u/i8s
i_am_a_peasant · 5 days ago
what is it with this take that oop is dead… even the linux kernel heavily uses OOP.

inheritance is what has been changing in scope, where it’s discouraged to base your inheritance structure on your design domain.

beagle3 · 4 days ago
OOP is different things to different people, see e.g. [0]. Many types of OOP that were popular in the past, are, indeed, dead. Many are still alive.

[0] https://paulgraham.com/reesoo.html

beagle3 commented on Surface Tension of Software   iamstelios.com/blog/surfa... · Posted by u/i8s
BSTRhino · 5 days ago
Make your invalid states unrepresentable
beagle3 · 4 days ago
Indeed. But ... do not confuse your model with reality.

There's a folk story - I don't remember where I read it - about a genealogy database that made it impossible to e.g. have someone be both the father and the grandfather of the same person. Which worked well until they had to put in details about a person who had fathered a child with his own daughter - and was thus both the father and the grandfather of that child. (Sad as it might be, it is something that can, in fact, happen in reality, and unfortunately does).

While that was probably just database constraints of some sort which could easily be relaxed, and not strictly "unrepresentable" like in the example in the article - it is easy to paint yourself into a corner by making a possible state of the world, which your mental model dims impossible, unrepresentable.

beagle3 commented on Tiny Core Linux: a 23 MB Linux distro with graphical desktop   tinycorelinux.net/... · Posted by u/LorenDB
maccard · 12 days ago
A single 1920x1080 framebuffer (which is a low resolution monitor in 2025 IMO) is 2MB. Add any compositing into the mix for multi window displays and it literally doesn’t fit in memory.
beagle3 · 12 days ago
The Amiga 500 had high res graphics (or high color graphics … but not on the same scanline), multitasking, 15 bit sound (with a lot of work - the hardware had 4 channels of 8 bit DACs but a 6-bit volume, so …)

In 1985, and with 512K of RAM. It was very usable for work.

beagle3 commented on Nimony (Nim 3.0) Design Principles   nim-lang.org/araq/nimony.... · Posted by u/andsoitis
xigoi · 13 days ago
Nim (the original one, not Nimony) compiles to C, so making basic types work differently from C would involve major performance costs.
beagle3 · 13 days ago
And yet, Nim does overflow checking by default.
beagle3 commented on Nimony (Nim 3.0) Design Principles   nim-lang.org/araq/nimony.... · Posted by u/andsoitis
kbd · 13 days ago
When I was learning Nim and learned how imports work and that things stringify with a $ function that comes along with their types (since everything is splat imported) and $ is massively overloaded I went "oh that all makes sense and works together". The LSP can help figure it out. It still feels like it's in bad taste.

It's similar to how Ruby (which also has "unstructured" imports) and Python are similar in a lot of ways yet make many opposite choices. I think a lot of Ruby's choices are "wrong" even though they fit together within the language.

beagle3 · 13 days ago
Do note that unlike Python’s “import * from a; import * from b” where you have no idea where a name cam from later in the code (and e.g. changes to a and b, such as new versions, will change where a name comes from), Nim requires a name to be unambiguous, so that if “b” added a function that previously only “a” had, you’ll get a compile time error.
beagle3 commented on Nimony (Nim 3.0) Design Principles   nim-lang.org/araq/nimony.... · Posted by u/andsoitis
snek_case · 13 days ago
The reason NaN exists is for performance AFAIK. i.e. on a GPU you can't really have exceptions. You don't want to be constantly checking "did this individual floating-point op produce an error?" It's easier and faster for the individual floating point unit to flag the output as a NaN. Obviously NaNs long predate GPUs, but floating-point support was also hardware accelerated in a variety of ways for a long time.

That being said, I agree that the way NaNs propagate is messy. You can end up only finding out that there was an error much later during the program's execution and then it can be tricky to find out where it came from.

beagle3 · 13 days ago
The alternative is checking the result of every operation; or use “signaling NaNs” that raise an exception on a (properly configured) scalar operation on a CPU. As soon as non scalar code is involved - SIMD or GPU, quiet NaNs with strategically placed explicit tests along the computation becomes the only reasonable/efficient option.
beagle3 commented on SVG.js v3.2   svgjs.dev/docs/3.2/... · Posted by u/eustoria
emil-lp · 25 days ago
Anyone know a Python library for manipulating SVG images?
beagle3 · 25 days ago
Not what you asked for, but something you might find useful: https://github.com/andy31lewis/brySVG

A great SVG kit for Brython (browser Python)

beagle3 commented on Windows Subsystem for FreeBSD   github.com/BalajeS/WSL-Fo... · Posted by u/rguiscard
Brian_K_White · 2 months ago
Can I even use a usb serial port yet after how many years? (Possibly by now but how long did it take, and does it actually work well?)

It is stupid in that it's not really any kind of subsystem, it's just a vm. VMs have their uses, but it's basically just an app.

The reason hardware such as my usb serial example (or any serial) worked on wsl1 was because it actually was a subsystem.

beagle3 · 2 months ago
Your serial might have worked, but your docker didn’t. (And someone else’s other drivers didn’t, and mmapping had ever-so-slightly different semantics causing rare and hard to reproduce issues).

WSL2, on the whole, is much more compatible. If you want 100% Linux compatibility, just run Linux.

beagle3 commented on Testing two 18 TB white label SATA hard drives from datablocks.dev   ounapuu.ee/posts/2025/10/... · Posted by u/thomasjb
amelius · 2 months ago
Why is USB so bad at data integrity. Doesn't it have error detection/correction? If so, that sounds like a huge design flaw.
beagle3 · 2 months ago
Individual writes are safe, in my Experience with thousands of uSB drives in many configurations, some with 12 2tb drives hanging on multiple USB hubs at the same time.

However, there are disconnects/reconnects every now and then. If you use a standard raid over these usb drives, almost every disconnect/reconnect will trigger a rebuild — and rebuilds take many hours. If you are unlucky enough to have multiple disconnects during a rebuild, you are in trouble.

u/beagle3

KarmaCake day16599June 20, 2009View Original