News for hackers. Stuff that matters.

pyjarrett

Re:Ask HN: What're You Reading? on Tuesday September 29, 2026 @04:55PM (#49900386)
Discourses by Epictetus
Re:"It works better in the app " on Friday August 28, 2026 @10:20AM (#49478893)
When I was job hunting earlier this year, LinkedIn on my phone told me to install the app. Sure, why not? So I did. It refused to authenticate and never worked. One good point is that at least the mobile web version didn't lock me out with an impassable overlay like some websites are starting to do.
Re:No More JetBrains Products for Me on Monday May 18, 2026 @05:47PM (#48186159)
> I tend to run older hardware,

> the tool is so fricken slow.

How old is "old hardware"? I've had no issues running CLion on a 2020 M1 Macbook Air and a i5-10400 (Linux). These projects are only in the hundreds of thousands of lines of code though.

> The install is gigantic on disk, leading me to avoid it on my older machines where space is limited.

I found that by default toolbox likes to keep old versions of the IDEs available for rollback. I disabled that and reclaimed tens of GB across all the products I use.

Ariane 5 became one of the most reliable rockets ever made and was used to launch the JWST.
I used to, but the knowledge of .NET seems mostly transferrable to C#. It's super useful to do `dotnet fsi` and then work out the appropriate .NET calls in the F# repl.
These are the big ones I use, specifically because of the standard libraries:

Python (decent standard library) - It's pretty much everywhere. There's so many hidden gems in that standard library (difflib, argparse, shlex, subprocess, cmd)

C#/F# (.NET)

C# feels so productive because of how much is available in .NET Core, and F# gets to tag along and get it all for free too. With C# you can compile executables down to bundle the runtime and strip it down so your executables are in the 15 MiB range. If you have dotnet installed, you can run F# as scripts.

It doesn't take much power or time to run your own local git server. My first one which lasted years was parts I mangled together from old computers from garage sales.

There's instructions on running a Git server in the git book: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protoco...

Re:Two and a Half Years in GameDev on Sunday July 06, 2025 @01:57PM (#44482727)
I played an incredibly amount of SimCity 2000 and SimCity 3000, and Metropolis 1998 looks *amazing.*
Re:Modern CMake on Tuesday April 15, 2025 @09:26PM (#43700419)
FASTBuild[0] is super fast for large projects and comes with distributed builds and caching out of the box. It requires a bit of effort to set up, but it supports globbing sources, there's no separate generate build step, and it can also make Visual Studio solutions.

[0]: https://www.fastbuild.org/docs/home.html

Re:Vets Who Code on Wednesday April 02, 2025 @04:49PM (#43561376)
Another great resource for vets getting started in software development (and other fields) is American Corporate Partners[1]. I had a great mentor through that group.

[1]: https://www.acp-usa.org/

Re:You Need Subtyping on Saturday March 29, 2025 @11:22AM (#43516244)
> However, existing programming languages have little or no subtyping

Every "type" you use in Ada is actually a subtype.

In Ada, "A subtype of a given type is a combination of the type, a constraint on values of the type, and certain attributes specific to the subtype".

You don't ever refer to actual types in Ada, since creating a type with "type" actually creates an anonymous type and the name refers to the first subtype.[1]

    type Token_Kind is (
       Identifier,
       String_Literal,
       --  many more ...
    
       -- These are character symbols and will be part of Token_Character_Symbol.
       Ampersand,
       --  ...
       Vertical_Bar,
    );
    
    --  A subtype with a compile-time checked predicate.
    subtype Subprogram_Kind is Token_Kind
    with Static_Predicate => Subprogram_Kind in RW_Function | RW_Procedure;
    
    subtype Token_Character_Symbol is Token_Kind range Ampersand .. Vertical_Bar;
> If you have a pointer with more permissions, it should still be usable in a place that only requires a pointer with fewer permissions

This is exactly how "accessibility" of access types works in Ada[2]. If you have a pointer ("access type") to something on the heap, you can use it wherever an anonymous access type can be used. You can also create subtypes of access types which have the constraint of a "null exclusion".

[1]: https://ada-lang.io/docs/arm/AA-3/AA-3.2#p1_3.2.1

[2]: https://ada-lang.io/docs/arm/AA-3/AA-3.10

Re:We're Still Not Done with Jesus on Tuesday March 25, 2025 @09:26PM (#43477909)
> no one cared back then if he was real,

This was directly addressed in 2 John 7

"I say this because many deceivers, who do not acknowledge Jesus Christ as coming in the flesh, have gone out into the world."

Re:I stopped everything and started writing C again on Wednesday March 12, 2025 @07:40PM (#43348879)
> Plenty of ways to trigger undefined behavior

I'm curious about this list, because it definitely doesn't seem that way these days. It'd be interesting to see how many of these are still possible now.

Ada

The open source tooling has significantly improved since I started using it in the last five years.

Re:Ada's Dependent Types, and Its Types as a Whole on Saturday December 28, 2024 @12:12PM (#42532490)
About two years ago, I was able to dive into the Ada reference manual formatter which has initial commit of March 2000 and is about 45k lines of code, and add MDX output pretty easily.

Other languages focus on terseness and expressiveness. Ada expresses a bunch of constraints directly and forces you to do things in organized ways (e.g. use namespaces appropriately).

Re:A Random Walk Through Ada (2014) on Saturday November 09, 2024 @10:25AM (#42094898)
The big reason for `out` only is "I want to write here, but I don't care about the initial value." It's a more explicit version of the C++ `Foo& outFoo` output parameter paradigm.

> When "out" and "in out" parameters are distinguished, there is no need for the existence of constructors as a separate concept.

I don't agree with this. You can get I need to do things "post-init" with controlled types, or use a `return X : Thing do ... end return` block. Constructors help ensure invariants. You can make a type `is private` to prevent instantiation, only allowing creation via functions (sort of like Rust `new` associated functions), or initialization via an `out` param. It's OK but not perfect, but you can also tag on a `Type_Invariant` aspect if there are conditions which have to be met by a type. My big problem with Controlled types is that forces a type to be `tagged` (i.e. it has a vtable) which means it affects storage layout of values of that type, which isn't a problem in C++.

You can forbid copies by making something a `limited` type, but you'd have to write your own "Move" equivalent, and some of the containers have `Move` subprograms implemented to transfer contents. Limited types might elide the copy when returned from a function, but it's been a while since I looked at those rules.

Re:A Random Walk Through Ada (2014) on Saturday November 09, 2024 @08:32AM (#42094318)
I recently started writing Ada again, a couple of years after I did a bunch of projects with it. The amazing things is how easy it is to go back and update old code due to how much semantic information gets embedded in it and how few symbols it uses.
Re:Four Months with Ada on Wednesday June 19, 2024 @08:42AM (#40727729)
That's because I took it down over two years ago and moved most of the content to ada-lang.io when I set that up. This was an anecdotal blog post so it didn't get moved over.
Re:How to read C type declarations (2003) on Friday May 17, 2024 @06:32AM (#40388358)
Ada syntax is close to what you described:

    Foo : array (Positive range 1 .. 100) of access function return access Integer;
Re:Ada 95: The Craft of Object-Oriented Programming on Sunday March 03, 2024 @01:18PM (#39582933)
> you don't have to go full functional verification

The amazing thing to me is that Ada code can call SPARK code just fine, and there's crates of SPARK code in Alire that you can use. It's a huge boost of confidence in the quality of a library that you're using when it has some form of verification.

Re:Ada 95: The Craft of Object-Oriented Programming on Saturday March 02, 2024 @07:38PM (#39577230)
> the code to SPARK and proving the absence or runtime error

I wrote Rob Pike's simple regex from the "Practice of Programming" in Ada/SPARK and it blew my mind that I actually managed to prove an absence of runtime error (guaranteed no overflow or out of bounds).

Re:Ada 95: The Craft of Object-Oriented Programming on Saturday March 02, 2024 @10:46AM (#39573304)
This is an awesome feature, combined with appropriate type and bounds checking and prevents so many errors. It can also avoid resorting to a heavier-weight map type.

Ada has this as well, including using any arbitrary continuous range for array indexing which handles remapping indices for you. e.g. if the key range is 20-40 the language handles associating it with array indices for you.

Re:Ada 95: The Craft of Object-Oriented Programming on Saturday March 02, 2024 @10:12AM (#39573051)
Ada checks the ranges on types assigned to each other at compile time and then invariants on assignment and when passed as parameters. You can turn the runtime side of these checks on or off individually at the module level.
Re:Ada 95: The Craft of Object-Oriented Programming on Saturday March 02, 2024 @12:15AM (#39570036)
My favorite thing about Ada is how it uses modules ("packages") for encapsulation and not classes. This separates it from a lot of other languages with object-oriented programming by allowing you to split up and expose externally visible behavior in modules and submodules without making type internals visible.
Re:Go Enums Suck on Friday March 01, 2024 @07:46PM (#39568717)
Not only that, but when you define an enum you get 'Pred and 'Succ to move between values, range iteration over all values with 'Range and 'First and 'Last, string conversion with 'Image and parsing with 'Value.
Re:Rust developers concerned about complexity, low usage on Sunday February 25, 2024 @07:19PM (#39506397)
I tried out Swift on Windows and really enjoyed it. The experience was 100x better than I expected.

Older »