HNHacker News
TopNewBestAskShowJobs

zkldi

1,734 karma · joined March 10, 2021

aspirant
submissionscomments
zkldi··on And Then Came JavaScript
an errant comma after the last object property doesn't cause any issues
zkldi··on The Changing "Guarantees" Given by Python's Global Interpreter Lock
Tools win not because they are "better" in some platonic ideal of a programming language but because they are more practical for solving the problems people have.

Python, JS, C, Bash aren't even particularly great at the problems they solve, but they succeed mostly on inertia (it's where all the libraries are, it's what people know) and occupying developer mindshare.

They are full of obvious design mistakes; things that not even the creators of the language (nor any of its users) can defend, yet those languages are used infinitely more than languages that eschew those mistakes. Why? Because they solve problems people have.

If this sounds terrible to you, the good news is that there is a tonne of low-hanging fruit in the programming language design space. Consider that most developers know nothing of sum-types, or eschew the idea of typing entirely. Consider that most developers see no fundamental problem behind having to venv or dockerise software lest it bitrot over a month. Consider that programmers actually use bash.

These terrible, obviously broken tools are somehow the most pragmatic things we actually have. The fruit is low-hanging; the door is wide open, if you wish to grab it.

zkldi··on Ask HN: Who is hiring? (November 2023)
Weird. I've seen this exact job posted by this exact company every single month for the past year.

I even applied at one point and heard nothing back. Looks like nobody else has ever heard anything back either.

Bizarre.

zkldi··on Berry is a ultra-lightweight dynamically typed embedded scripting language
What's rule 0?
zkldi··on XML is better than YAML – Hear me out
why isn't the default secure? if the default isn't secure we have learned time and time again that people will use the default unknowingly exposing themselves to security holes.

Here's just a couple examples off the top of my head:

- `$variables` in bash are subject to arbitrary code execution via word splitting without escaping

- PHP register_globals

- PHP, express, and some others parse `?a[b]="foo"` in a query string as an object, allowing for prototype pollution or other exploits

- string concatenation for SQL + escape_string being the default for years

- perl array expansion in function calls

- XML entity inclusion on by default allowing you to read arbitrary files

- log4j executing arbitrary code inside its logs

- passing a variable to printf's first arg

- no difference between escaped and unescaped tags in php

- xargs splitting on whitespace

- yaml allowing arbitrary code execution (it got rails good!)

and there's probably loads more.

zkldi··on OpenTF is now OpenTofu
that's on you i think. quite a lot of people enjoy tofu and it's a cute name imo.
zkldi··on Gojekyll: A fast, partially compatible Go clone of Jekyll
both of these scripts break on perfectly valid filenames with whitespace, it's pretty rough how shell scripting directs you towards writing subtly broken scripts.
zkldi··on Fish – A friendly interactive shell
the shebang is literally handled by the kernel, so fish has nothing to do with this here.

are you sure you're running `./scriptname` or bash scriptname`

zkldi··on TypeScript is surprisingly ok for compilers
C# doesn't have anything resembling proper pattern matching. C#s pattern matching is akin to a marginally improved switch or if/else-if chain. C#s pattern matches aren't exhaustive, and the compiler doesn't properly check them at all.[0]

There are no proper sum types in C#, so 80% of the point isn't even there.

    enum Season
        {
        Spring,
        Summer,
        Autumn,
        Winter
    }
     
...

    int PatternMatch(Season season) =>
    season switch {
        Season.Spring => 1,
        Season.Summer => 2,
        Season.Autumn => 3,
        Season.Winter => 4,
        // compiler can't prove the above code is exhaustive because no proper sum types
        // compiler needs nonsensical branch here that diverges
        _ => throw new ArgumentException("Invalid enum value for command", nameof(command)),
    };
zkldi··on TypeScript is surprisingly ok for compilers
that's not using `try` as an expression. can you do `let foo = try <code> (plus some handling for diverging in the other case?)`
zkldi··on Nintendo is trying to patent some broad Tears of the Kingdom mechanics
fun addendum: StepmaniaX doesn't have note receptors because konami's patents for DDR are so broad that the idea of notes scrolling towards a visible note outline is something they can sue you for.

I believe that patent has expired now at this point, but it's the reason StepmaniaX doesn't have receptors.

Similarly this is the reason games like Guitar Hero/Rock Band/ITG have hallway style viewports instead of straight lines. It was to mitigate the patents on having things scroll towards receptors in a straight line.

zkldi··on Htmx is part of the GitHub Accelerator
BUT HAVE YOU SEEN MY TECH STACK?
zkldi··on Things you forgot (or never knew) because of React
they're a mess. what the react developers really wanted is a DSL[0], but they couldn't sell that as well so they hacked hooks into JS.

The whole things about "rules of hooks" should tip people off that it's sketchy. I mean, have you ever actually thought about how:

    function Component() {
        const [state, setState] = useState(1);

        return <>{state}</>
    }
actually works? How does `useState` know what bit of state to grab? (it's a global store identified by the function you're in, and an index. it's why you can't change the order of hooks nor call them conditionally).

Hooks are literally javascript in the sense that they're functions you can call in javascript, but they don't operate under any of the rules people actually think of when they write javascript. If for any `function x() {}`, `if (condition) { x() }` was a fatal error, people would consider that terrible API design and the function shouldn't need to care whether it's called conditionally.

Sure, react hooks 'compose' better than class components, but they also don't compose *at all* with anyones mental model of how JS works. What they needed was different syntax or a DSL in general (what svelte does is a lot more understandable, imo).

[0]: jsx is a DSL but it's merely one bit of syntax sugar. they needed a hell of a lot more.

zkldi··on Google is now testing YouTube Playables, before Stadia's corpse is cold
the problem is that the kind of games that warrant anticheat also can't cope with the increased delay (nor predictive inputs).
zkldi··on Testing a 1,000 player Minecraft server with Folia
Like most Guinness World Records, this absolutely isn't even true. I've regularly seen hypixel with more players than this in the past couple years.

GWR is purely just marketing, none of their records should be taken with any merit.

zkldi··on Why Perl?
What happens if `boothd` contains a space? or a semicolon? or any character the shell might interpret?
zkldi··on Why Perl?
it's very easy. you make a file called `rust-toolchain` next to your `Cargo.toml` that contains the version of rust you intend this to compile for.

It will then compile for that version.

zkldi··on It’s not wrong that "🤦🏼‍♂️".length == 7 (2019)
this doesn't "just work" at all?

utf-8 is a variable width encoding and if you treat it like ascii your software just isn't going to work outside of the ascii range.

zkldi··on Emerging Rust GUI libraries in a WASM world
can i ask what kind of things you specifically found confusing about the syntax?
zkldi··on Emerging Rust GUI libraries in a WASM world
you're almost describing flash

i mean, it sucked, but it was kind of that middle layer.

zkldi··on Bitcoin is a solution looking for a problem
all three of those advantages are the same thing - popularity.
zkldi··on Ask HN: Are alternative (oil, nu, etc.) shells usable as daily drivers?
but you can just run `bash`, paste the command, and then `exit`?
zkldi··on Ask HN: Those making $0/month or less on side projects – Show and tell
I've spent the past two years or so working on Tachi (https://bokutachi.xyz/) (https://github.com/TNG-Dev/Tachi), which is a modular tool for tracking rhythm game scores.

Generally, everyone was using their own personal spreadsheets or ancient "just render everything" tables to analyse their scores and progress before this and I'm pretty happy with how it's turned out.

What I'm probably most proud of is that adding support for a new game is adding a new module for it - all of the other features automatically work with it. This turns a "each game needs to have its own full-site tracker" into a "each game needs a configuration for this one tracker", not unlike how LSP simplifies adding language support for editors!

Taught me almost everything I know about scaling a codebase, and despite being a niche tool it's picked up a lot of momentum (2k users, ~3m scores).

zkldi··on Microsoft is preparing to add ChatGPT to Bing
good taste :P
zkldi··on Ask HN: Firing an employee under a month before vest?
3 times? that's an awfully high amount.
zkldi··on Meta Meets Microsoft
Quake was an immediate huge success and lay the groundwork for almost all future 3d FPS games.

VR is not in the early days.

zkldi··on Problems at Roblox
Sounds like it'd just incentivise people to make NSFW content on burners and then report it.
zkldi··on WTF Nextdoor? Over 130 clicks to disable email and push notifications?
It even uses 'for the greater good' as the tagline. I guess they haven't seen Hot Fuzz[1]?

[1]: https://www.youtube.com/watch?v=rm--inJtnc4

zkldi··on Do Kwon in more trouble
not everyone is a perfectly rational actor or in a sane mental state
zkldi··on Web3 skeptics and believers both need a reality check
Disclaimer: this article is wrote by the Director of Product Marketing at Hedera, which is a web3/crypto company[1]. Take it with a grain of salt.

[1]https://hedera.com/

← PreviousPage 2 of 7Next →