News for hackers. Stuff that matters.

skribanto

Re:Bringing uv and ty together on Saturday October 24, 2026 @08:13PM (#50226843)
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.
Re:Bringing uv and ty together on Saturday October 24, 2026 @06:48PM (#50226211)
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.
Re:Vibe Coding is the new Internet Dating on Tuesday September 15, 2026 @05:34PM (#49719181)
Thats like the same point the article is making
Re:What is jj and why should I care? on Thursday April 16, 2026 @07:06AM (#47791351)
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

Re:Git Rebase for the Terrified on Tuesday January 13, 2026 @12:30PM (#46604401)
rerere can help, but OP probably has their own workflow
Re:Rust's Block Pattern on Saturday December 20, 2025 @09:32AM (#46336450)
Why couldnt you flatten it?
Re:Smart Performance Hacks for Faster Python Code on Thursday November 20, 2025 @12:50PM (#45995428)
swap with last element then truncate at the end
Re:Rating 26 years of Java changes on Sunday October 12, 2025 @04:49PM (#45561771)
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.
Re:Open Steno Project on Sunday June 15, 2025 @07:41PM (#44285675)
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
Re:You Can Choose Tools That Make You Happy on Sunday May 25, 2025 @09:37PM (#44093103)
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.

Well, recursion is well-structured and can be reasoned about through induction. Goto is unstructured…
Re:My Favorite C++ Pattern: X Macros (2023) on Tuesday March 25, 2025 @12:57PM (#43473439)
I don’t think I follow, do you mind giving a concrete example?
Re:The Rise of Worse Is Better (1991) on Monday October 07, 2024 @04:17PM (#41770554)
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
Re:Lesser known tricks, quirks and features of C on Friday September 27, 2024 @12:49PM (#41672791)
I believe int[6] can still be passed to static 5 but I would have to double check
Re:Why is a Guillotine blade diagonal? on Sunday August 25, 2024 @05:59PM (#41351848)
Looks fine to me
I like to wrap it in a venv (pure python project) or nix flake (mixed languages)
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

Re:Discussions: Flat or Threaded? (2006) on Monday June 10, 2024 @05:53AM (#40631835)
Re:Common Lisp Is Not a Single Language, It Is Lots on Friday May 24, 2024 @05:57PM (#40470823)
Interesting side note: the blog is generated with the C preprocessor

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

Re:Static Chess on Monday May 13, 2024 @08:12PM (#40350125)
e4 d5 e5 f5 exf6 This simple en passant works
Re:Firefox Is Bringing in Tab Grouping Feature on Tuesday April 09, 2024 @09:05PM (#39985954)
I use Sidebery for tab groups, but it would be nice to have it built in
Re:A formula for responsive font-size on Thursday March 14, 2024 @09:59AM (#39704100)
At least in safari, you can hit the AA button and increase the font size there.
Re:Show HN: Rank a Random Subject Everyday on Wednesday February 07, 2024 @08:00AM (#39288008)
Aren’t fruits only plants which contain seeds? Like a celery would not be a fruit
Re:C Object Oriented Programming (2014) on Wednesday December 20, 2023 @04:40PM (#38713991)
You can approximate it by maintaining some kind of vtable, but it can get messy, especially if you need to implement multiple traits/interfaces.
Re:Tao Te Ching on Thursday September 28, 2023 @01:56PM (#37693206)
These virtues are promoted by Christianity as well
Re:Small Joys with Odin on Friday July 21, 2023 @05:00PM (#36819665)
Without it, it would pass the current location, that is the location inside that test function, rather than the original parent call.
Re:The C Programming Language: Myths and Reality (1) on Monday July 17, 2023 @02:51PM (#36762381)
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;
Re:Red Programming Language on Sunday July 16, 2023 @10:53PM (#36753545)
Austral has been looking good to me as a potential "rust-lite". It's still in the very early stages though.
Re:Learning to Touch Type Again on Saturday July 15, 2023 @06:46PM (#36741611)
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
Getting 502 Bad Gateway

Older »