HNHacker News
TopNewBestAskShowJobs

skribanto

49 karma · joined January 27, 2022

submissionscomments
skribanto··on Bringing uv and ty together
I routinely run into issues, where Claude will try to add functionality to a dict-heavy API and messup the keys, I just do an initial pass converting everything to dataclasses, and it can iterate on it's own with the typechecker to fix everything on it's own, but otherwise I have to do a bunch of manual iterations.
skribanto··on Bringing uv and ty together
The use case in the article though is type checking standalone scripts with declared dependencies. So it kind of needs some kind of package management + type checking utility at the same time.
skribanto··on Vibe Coding is the new Internet Dating?
Thats like the same point the article is making
skribanto··on jj – the CLI for Jujutsu
From my understanding git reflog works on refs and jj op log works on fhe repo as a whole.

E.g. if I rebase some stacked branches then I want to undo it, with git I would reset each branch separately.

With jj you can timetravel the state of the repo in ine command

skribanto··on Git Rebase for the Terrified
rerere can help, but OP probably has their own workflow
skribanto··on Rust's Block Pattern
Why couldnt you flatten it?
skribanto··on Performance hacks for faster Python code
swap with last element then truncate at the end
skribanto··on Rating 26 years of Java changes
Well, it can make some chained function composition easier.

  Ick1 result1 = potentiallyNull1();
  Ick2 result2 = (result1 == null) ? null : potentiallyNull2(result1);
  Ick3 result3 = (result2 == null) ? null : potentiallyNull3(result2);
vs

  Ick3 result3 = potentiallyNone1()
    .flatMap(potentiallyNone2)
    .flatMap(potentiallyNone3);
You could maybe move the null check inside the method in the former and it cleans it up a bit, but in the latter you can have methods that are explicitly marked as taking NonNull in their type signature which is nice.
skribanto··on Open Steno Project
maybe it’s better now, but at last time I checked (~2 years ago) humans are still better in jargon heavy contexts - legal as you mentioned, tech/medical/etc. also accents, muffled audio, noise in general, humans are (were?) much better at accounting for that
skribanto··on You can choose tools that make you happy
My interpretation is that as engineers, we attempt to justify all of our choices through purely rational means. However, as humans, we cannot really make said choices without also being at least somewhat influenced by our subjective affections.

Perhaps I'm stretching the author's message, but at least I believe that the argument extends to all engineering conclusions. The author's call is that we acknowledge this subjective side.

Essentially, true engineering is about tradeoffs, there is no X that is objectively better than Y in all circumstances and contexts.

skribanto··on Programming languages should have a tree traversal primitive
Well, recursion is well-structured and can be reasoned about through induction. Goto is unstructured…
skribanto··on My Favorite C++ Pattern: X Macros (2023)
I don’t think I follow, do you mind giving a concrete example?
skribanto··on The Rise of Worse Is Better (1991)
Well the main point is that there are changes that for most languages would need a change in the compiler/interpreter itself. However in lisp those kinds of things can be done in userspace
skribanto··on Lesser known tricks, quirks and features of C
I believe int[6] can still be passed to static 5 but I would have to double check
skribanto··on Why is a Guillotine blade diagonal?
Looks fine to me
skribanto··on Show HN: Vdm, a sane alternative to e.g. Git submodules
I like to wrap it in a venv (pure python project) or nix flake (mixed languages)
skribanto··on B-Trees Require Fewer Comparisons Than Balanced Binary Search Trees
Left leaning red black trees enforce extra constraints, which remove symmetries. This actually adds an edge case when instead you can just treat left/right rotations and comparisons as symmetric operations.

Left Leaning Red Black Trees Considerer Harmful: https://www.read.seas.harvard.edu/~kohler/notes/llrb.html

skribanto··on Discussions: Flat or Threaded? (2006)
A follow up from the same author

https://blog.codinghorror.com/web-discussions-flat-by-design...

skribanto··on Common Lisp Is Not a Single Language, It Is Lots
Interesting side note: the blog is generated with the C preprocessor

https://aartaka.me/this-post-is-cpp

skribanto··on Static Chess
e4 d5 e5 f5 exf6 This simple en passant works
skribanto··on Firefox Is Bringing in Tab Grouping Feature
I use Sidebery for tab groups, but it would be nice to have it built in
skribanto··on A formula for responsive font-size
At least in safari, you can hit the AA button and increase the font size there.
skribanto··on Show HN: Rank a random subject every day
Aren’t fruits only plants which contain seeds? Like a celery would not be a fruit
skribanto··on C Object Oriented Programming (2014)
You can approximate it by maintaining some kind of vtable, but it can get messy, especially if you need to implement multiple traits/interfaces.
skribanto··on Tao Te Ching
These virtues are promoted by Christianity as well
skribanto··on Small joys of programming in Odin
Without it, it would pass the current location, that is the location inside that test function, rather than the original parent call.
skribanto··on The C Programming Language: Myths and Reality
Maybe have your public fields defined as a second struct, and then you can cast the pointer to your struct to the concrete struct that has all the public fields. This has the restriction that all public fields must be at the start, and you must make sure to maintain the same order between the two structs.

At this point though, I think I honestly would prefer setters/getters.

    struct MyClassPublic {
        int x;
        int y;
        ...
    }

    /* using it */
    MyClass *myclass = myclass_create();
    ((MyClassPublic *)myclass)->x = 5;
skribanto··on Red Programming Language
Austral has been looking good to me as a potential "rust-lite". It's still in the very early stages though.
skribanto··on Learning to Touch Type Again
For me, tap hold is kind of iffy. If I set the hold delay short enough that it doesn’t feel sluggish, it becomes too easy to misfire it while trying to type. That’s just my experience though, I’ve come to prefer dedicated keys for each in a thumb cluster
skribanto··on Generate RSS feed for any website using CSS selectors
Getting 502 Bad Gateway
Page 1 of 3Next →