Better HN
topnewbestaskshowjobs
Log inSign up

dmit

6,853 karma · joined Feb 21, 2011 (15y ago) · 549 submissions

Submissions

comment 8mo ago · link · parent

Hehe, why "probably"? It says "250 lines" right there in the subject. Surely one can skim the single file of code (https://github.com/ieviev/mini-gzip/blob/main/src/main.rs) and offer criticism that isn't based on hypotheticals?

Anyway, I skimmed the file for you this time, and basically you're either correct or wrong, depending on your definition of "error checking." The code handles error conditions by aborting the process. Seeing as it's a standalone CLI program and not a library meant for reuse, safely shutting down with a meaningful message sounds like fair game to me.

comment 8mo ago · link · parent

I once witnessed a local admonish another (younger) local for exactly that at a bar. He replied with a bratty "Not my fault they're using crappy chopsticks..."

comment 9mo ago · link · parent

For future readers: throwaway27448's comment used to say something completely different, featuring the r-slur, and then immediately edited.

comment 9mo ago · link · parent

What about when you have a long-running program. You can't both brag about NumPy, Django, and the machine learning library ecosystem while also promoting "It's great for when you just want to get the first 100 lines out as soon as possible!"

I am guessing that Python, like Ruby, is dynamic enough that it's impossible to detect all typos with a trivial double-pass interpreter, but still.

Wonder if there was ever a language that made the distinction between library code (meant to be used by others; mandates type checking [or other ways of ensuring API robustness]), and executables: go nuts, you're the leaf node on this compilation/evaluation graph; the only one you can hurt is you.

comment 9mo ago · link · parent

> If I'm using one syntax, how do I tell you to fix a bug in your syntax?

How about "Hey, your Bean ain't sprouting"? :)

I'm sorry, I feel like I'm not communicating this properly. Um, have you ever discussed with someone a book or a TV show that was translated into your language? Did you have problems referring to the exact parts you liked or disliked? :)

comment 9mo ago · link · parent

  class Bean {
    private boolean sprouted;

    public void sprout() {
      this.sprouted = true;
      // ...
    }
  }
or

  data Bean = Dormant | Sprouted
  
  sprout :: Bean -> Bean
  sprout Dormant = Sprouted
  sprout Sprouted = -- aw, beans, we could have modeled
                    -- this state as impossible to construct,
                    -- but you chose runtime checks, so
                    -- here we are.
As for pointing to the source line, I think JavaScript people solved that one for us with source maps. Just because we download and execute a single 4Mb line of minified code, doesn't mean we can't tell which line of the original source caused the error. :)

comment 9mo ago · link · parent

No it won't? That's exactly the point -- each of those people will be viewing the code in their own preferred syntax. If there is semantic nuance in the writer's syntax, the reader will see it presented in the best way their preferred syntax's representation can provide.

Imagine all the hours saved that are currently spent on tired tabs vs spaces debates, or manicuring .prettierrc, etc etc. The color of the bike shed might matter (sometimes a lot) to some people, I know, but it's storing bikes away from the elements and thieves that is the goal, not obsessing over optimizing something that is demonstrably a subjective matter of taste.

comment 9mo ago · link · parent

Alt opinion: syntax is the least important part of a programming language. I can't wait for the day someone invents one where it's defined entirely as an AST (with the S standing for Semantic). Just bring your own weird syntax.

I guess Unison is the closest to this platonic ideal right now? https://github.com/unisonweb/unison/issues/499

comment 9mo ago · link · parent

I mean, as someone who grew up pronouncing it "Ess-Cue-Ell", I wish I learned earlier on that "Sequel" was the intended pronunciation. :)

40.

Pipelined Relational Query Language, Pronounced "Prequel"(prql-lang.org ↗)

66 points · by dmit · 9mo ago · 58 comments

41.

repgrep – Interactive Find/Replace(github.com ↗)

2 points · by dmit · 9mo ago · discuss

comment 9mo ago · link · parent

Good call, for bad reasons.

> At ZML, we are creating exciting AI produ[...]

comment 9mo ago · link · parent

A wrapper over what?? Bun includes the JavaScriptCore engine for JS evaluation, but it's so much more.

As for financial database concerns, if you're serious about including a project like that in your system, you have thorough correctness and performance testing stages before you commit to it. And once it passes the hurdles, at that point what difference does it make if it's written in a beta language, or a bunch of shell scripts in a trench coat, or whatever.

comment 9mo ago · link · parent

> Jokes aside

Ok ok, good

> once Jai comes out

Dangit! You couldn't even make it to the end of the sentence.

comment 9mo ago · link · parent

> In a similar project, a hard part was filtering penis and nazi symbols.

Check out how the precursor of this project did it! https://news.ycombinator.com/item?id=44719222

> I built a basic CNN trained against penises and swastikas, and then anything that doesn't hit the 63% confidence score gets sent to a mod queue, a vibe-coded fish-tinder (https://bsky.app/profile/bigass.bsky.social/post/3luvikxn3f2...).

comment 9mo ago · link · parent

https://github.com/ai-robots-txt/ai.robots.txt

comment 10mo ago · link · parent

Going 1.0 was a requirement for cashing out, don't worry about it. And segfaults don't really even matter as long as you run the code in production with -OReleaseSafe and turn on ubsan, it's fiiiiineee

comment 10mo ago · link · parent

Think you answered your second question with your first.

comment 10mo ago · link · parent

Yes. It occupies the spot in the Sway tutorials that recommend you "waybar, fuzzel, tofi, [etc]" to fill out the necessities. Noctalia, DMS, and other Quickshell projects cover that void.

comment 10mo ago · link · parent

Do I need to be present for this thread, or are you capable of projecting the rest all on your own?

51.

Nannou – A creative coding framework for Rust(github.com ↗)

59 points · by dmit · 10mo ago · 19 comments

comment 10mo ago · link · parent

I'm not having an argument. I was just trying to explain that "I'm not left or right" sounds like "I am perfectly fine with how things are right now" to the people who think the current state of things is an absolute disaster.

comment 10mo ago · link · parent

People jump to the conclusion because a lot of the time they've had this exact argument already, and they know how it tends to end.

Proclaiming oneself a centrist might seem like a noble, moderate position. But in 2026, with the Overton window basically being shifted outside the frame?

comment 10mo ago · link · parent

NixOS. Had prior Linux experience, so wasn't too worried about learning multiple new major paradigms in parallel. Also had been running a lil' NixOS server for half a year before that, so I could carry over most of my configuration.nix from there, and also the safe feeling of knowing that if I do mess up stuff, I could with very high probability just reboot to a previous generation and have everything back to working exactly the same as before.

Edit: the two configuration.nixen has since been merged in a single dotfiles repo, which also covers my Macbook via https://nix-darwin.org.

comment 11mo ago · link · parent

I'm using https://einaregilsson.com/redirector/ with a couple custom rules. Unfortunately, it appears the author has died (https://github.com/einaregilsson/Redirector#tribute), and the project is in a maintenance state. But it does exactly everything I need, and I disabled the auto-update, so I should be safe from any takeover attacks. Thank you, Einar.

comment 11mo ago · link · parent

More of a "Ugh, I clicked a mystery link, and it's Twitter" situation for me. A rare case for sure, but I'm petty enough that adding even one (legit, non-bot) MAU irks me.

comment 1y ago · link · parent

To be fair, you can also run tmux inside tmux (inside Zellij, inside another tmux, inside screen, etc). :)

comment 1y ago · link · parent

> is there anything that Bun does better?

Telling prospective employees that if you're not ready to work 60-hour weeks, then what the fuck are you doing here? for one.

> Zig does force some safety with ReleaseSafe IIRC

which Bun doesn't use, choosing to go with `ReleaseFast` instead.

comment 1y ago · link · parent

> You can have a stable OS version but still have rolling packages. Somehow most Linux distros can't manage that.

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
    nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"
:)

comment 1y ago · link · parent

Plasma is KDE. What are you trying to say?

Edit: oh, I guess swapping FreeBSD for Linux? Yeah nah, I don't know GP, but I suspect this isn't a reason for them to switch OS just to solve this.

12345
19