HN user

TOGoS

584 karma
Posts3
Comments353
View on HN

My mental model of a website that replaces the content with some 'sign up now' stuff while I'm trying to read it is that it deserves to get closed and never looked-at again.

http://www.nuke24.net/

Most interesting pages are probably `music/` and `plog/`.

Optionally HTTPS, though some of the features don't work right due to links to files on personal servers that I haven't yet got around to the HTTPS rigamarole (they are running like 15-year-old Ubuntu and can't run Certbot; it's such a pain).

I have never really grokked Ruby on Rails and I passionately hate all the frameworks that try to adapt it to some other language.

That said, I suspect that Ruby on Rails itself occupies kind of a special space where the magic is acceptable because people who write Ruby are used to having very very sharp tools and have learned to wield them carefully. Give that magic to a PHP or Java programmer and there is immediately gallons of blood on the floor.

(says former Rubyist who was put off by the RoR stuff because I'm apparently more of a Haskeller at heart.)

inadvertently leaky

I think this is the main problem.

I don't mind layers of abstraction when they work well and their components compose nicely. Like a well-designed programming language. These can actually be quite fun to work with.

Layers of abstraction where the boundaries between that layer and those around it are fuzzy to non-existent and where certain cases magically work and everything else is a janky mess because it was never designed to work are what give me headaches and want to throw my work laptop out the window on a regular basis.

I'd return my Framework laptop if that was still an option. First they sent me bad RAM, and left me on my own to sort it out with Crucial, which never went anywhere. The mainboard has some weird power issue that prevents the modular ports, which are otherwise a cool idea, from working properly, and I went back and forth with support about that for two years before they finally told me it was out of warranty so I was SoL.

Then there's the screen that falls backwards.

Should've bought an old Thinkpad, instead.

The Polyglot NixOS 7 months ago

I thought this would bring some space savings, because files that are not binary code should be largely the same.

Those ternary blobs tend to be cross-platform, I hear.

The awful thing about OpenSCAD is that what one can model in 3D is limited by one's ability to mathematically stretch, rotate, and/or arrange spheres, cylinders, and cubes in 3D.

Not at all. You can build any polyhedron you want using the polyhedron command.

Which would be an enormous pain to write out by hand every time, but I wrote a function once upon a time to generate a polyhedron from a stack of layers, each of which is a list of points, and haven't had to mess with old cubes and spheres since.

One annoying thing is that the default way of writing programs in OpenSCAD uses 'modules', which are a bit limited compared to functions (you can't store them as values to to functions or other modules). I worked around that by writing a module that interprets arrays (think S-expressions) that representing the shape, and then just build up that S-expression-like thing with functions and whatever.

Once you've built your own programming language inside OpenSCAD it's perfectly usable. :-)

This might sound like sarcasm but I actually do prefer this to dealing with Python's mutable state jungle / package management nightmare.

Maybe, and I would definitely prefer this to the random-generic-word practice. "illuminate" is some part of Laravel, but I can't remember what it is, just that "that's not even a noun; they just picked that word for $whatever_crappy_subsystem because it sounds nice" and being even more annoyed at the whole thing because of it.

Ruby Blocks 9 months ago

`5.times` is not so outlandish, though it would seem better for that to be in a `Loop` library or something (`Loop.times(5) { do some stuff }`).

The `5.days` example that was posted somewhere else in this thread might be a better example. It is not, as far as I can tell, part of Ruby's core library, thank goodness, but it is the kind of thing the methods-as-hacks-for-syntax culture seems to encourage. My question being "why the heck should the number 5 know anything about days? What does 5.days even mean, given that there are various ways to interpret 'a day'?"

This kind of bad design has made its way all over the place. The Java mocking libraries that my coworkers like to use are full of it. Long chains of method calls that appear like they're trying to 'look like English' but make no damn sense, so you have to dig into each method call and what kind of thing it returns to understand what this chain actually means.

adding a queen to the Borg destroyed the Borg

Agreed. The Borg used to be scary because they seemed unbeatable. They were like grey goo that could adapt to whatever you threw at them.[1]

Having a queen gives them a single point of failure. Suddenly they are a lot less scary.

[1] I kind of felt the same way about the Boogieman from Ghost Busters when I was a kid. Teleports between closets and the regular ghost trap doodad doesn't work on him! Shit!

Being a good programmer requires thinking about things that, whether you realize it or not, are math problems. Things like managing complexity, or analyzing a program to understand what it even does. You can get pretty far just with a strong intuition, but stripped of all the syntax and culture around programming, what you're dealing with is, like, graph theory, and combinatorics, and stuff. If you recognize the concepts then you can reason about systems at a higher level and save yourself a lot of trial and error.

Or: You don't necessarily have to take math classes to be a good programmer, but the skills that differentiate a good software engineer from an LLM (previously 'code monkey') happen to correspond to things that mathemeticians would recognize and could give you a word for. This CoRecursive episode comes to mind: https://corecursive.com/050-sam-ritchie-portal-abstractions-...

As per the 'special parsing rules for script tags', browsers don't actually treat it as what you'd expect it means.

  <script>console.log("<![CDATA[Hello, this string content in a CDATA section!]]>");</script>
Results in this being output to the console:
  <![CDATA[Hello, this string content in a CDATA section!]]>
Browsers don't do what you intend if you wrap the whole script in CDATA, either. They treat the "<![CDATA[" sequence as literally part of the script! Which of course throws a syntax error.

I tend to use them anyway, as sort of a HTML/XHTML polyglot thing, because deep in my heart I still think HTML should be valid XML:

  <script>/* <![CDATA[ */
     // my script here, and you *still* need to be careful not
     // to include close-script or close-cdata sequences
  /* ]]> */</script>
In summary, the 'special parsing rules for script tags' add a great amount of complexity not just to the parsing code, but for anybody who has to emit markup, especially if different parsers disagree on what kind of escaping rules are active within a given section. Yes, the HTML5 spec codified the neurotypical "I would rather make you guess what I mean than just use the proper words to say it clearly" behavior, so at least browsers agree on it, but it's a mess and a pain to deal with because now you have to remember 1000 exceptions to what would have been simple rules.

Not so fast, things are about to get messy

That ship sailed several paragraphs ago, when <script> got special treatment by the HTML parser. Too bad we couldn't all agree to parse <![CDATA[...]]> consistently, or, you know, just &-escape the text like we do /everywhere else/ in HTML.

We have <!doctype html> but why not add other doc types as time goes on

We do have older ones!

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
and
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Unfortunately the "be liberal in what you accept" principle, in combination with general incompetence and anti-competitive practices by certain browser vendors, meant that all the browsers kind of ignored it and treated everything as quasi-structured tag soup regardless of the doctype, which is why WHATWG tried to codify what the browsers were already doing and decided we should all just <!doctype html>.

Have we collectively learned the lesson? If so maybe we could have a new doctype for [X]HTML 6. I won't be holding my breath for it.

LLM Inflation 12 months ago

At best we’re implicitly rewarding obfuscation and time wasting; at worst we’re allowing a lack of clear thinking to be covered up.

Most people don't think very clearly. That's why rhetoric is effective. That's why most communication is fluffy social signaling. You can give people great advice and their eyes glaze over because the words didn't fill them with emotion, or something, and they do the exact opposite.

No wonder LLMs get put to work playing that stupid game.

Hexatetrahedral Rails 12 months ago

No, you shall not do a User.where directly, you have to do a UsersRepository.find_all_with_email(...).

Even that seems weird to me. If want to load objects, I want to load them from a particular repository, not a class of repositories (which the upper-casing of `UsersRepository` suggests).

As soon as your app needs to talk to more than one data source, this business where data is tightly coupled to a particular datasource by the framework makes a big mess.

But that's why I don't use Rails in the first place.

When I have a thought about how some piece of code could/should be improved, but it's not urgent, instead of

  // TODO: Refactor this by doing X, Y, Z
I'll say
  // Hmm: This seems brittle.  We might want to X, Y, Z this such that W.
My IDE will list all the TODOs and I don't like to clutter that list with stuff that isn't strictly necessary, but it is nice to have some string--"Hmm:", in this case--that I can grep for or recognize as indicating that I thought about this already.

I'm interested in the long piecewise elimination section. Presumably that's where they explain why not use Ocaml/Nim/yaddah yaddah.

If I were to write such a list, the answer would probably come down to "because I wanted to pick ONE and be able to stick with it, and Rust seems solid and not going anywhere." As much as Clojure and Ocaml are, from what I've heard, right up my alley, learning all these different languages has definitely taken time away from getting crap done, like I used to be able to do perfectly well with Java 2 or PHP 5, even though those are horrible languages.

Eh, if you're doing RPC where the whole request/response are already in another layer on top of HTTP, then sure, 200 everything.

But to me, "REST" means "use the HTTP verbs to talk about resources". The whole point is that for resource-oriented APIs, you don't need another layer. In which case serving 404s for things that don't exist, or 409s when you try to put things into a weird state makes perfect sense.

There is a secret technique, called content-addressing[1], which elegantly solves both of them at once.

A lot of people haven't caught on, and try to cache things using ambiguous names, hence the struggle to invalidate their caches when the meaning changes.

[1] This can be applied even if you don't know the content yet; you just have to unambiguously name the inputs to the function that produces it. You might not know what all the inputs are, and then you have to start adding stuff like "unknown-unknown-2025-07-03T16", but it'll still basically work.