HNHacker News
TopNewBestAskShowJobs

init1

44 karma · joined February 21, 2025

submissionscomments
init1··on Authoritarianism of Code (2020)
Repos are owned by an owner. The owner has full control of the repo but it's not like you are being forced to use the Repo. Nobody comes to your house and forces you at gunpoint to delete your forks or forces you not to use alternative software.

Jesus. Stop misusing the word authoritarian.

init1··on AI companies destroy physical books – let's scan rare books before it's too late
One of the worst articles of all time. AI companies buy old books that would be rotting on a shelf with nobody reading them. They are required by law to destroy the book as part of the scanning process. This book was not being read anyway and now it's digitized. I.e. preserved forever.

I get you want to be mad at them. Be mad at them for real reasons like increasing ram prices or using the public grid to socialize their costs.

init1··on Go is an ideal language for AI-assisted software engineering
Ada Spark is better. Embedding proofs into the code that prove absence of runtime errors lets the bot know what your actual intent is and gives it an iterable target that is actually correct.
init1··on Ada, its design, and the language that built the languages
I've read it and I agree private properties on classes satisfy the requirement. It does allow you to hide implementation details and I was unaware it was added; though with anything JavaScript you can usually find a way around it.

However I don't really want to talk to you. You are rude.

init1··on Ada, its design, and the language that built the languages
See my comment here for an example: https://news.ycombinator.com/item?id=47810686
init1··on Ada, its design, and the language that built the languages
> The article claims only Ada has true separation of implementation vs specification (the interface), but as far as I am able to reason, also e.g. JavaScript is perfectly able to define "private" elements (not exported by an ES6 module) while being usable in the module that declares them -- if this isn't "syntactical" (and semantical) separation like what is prescribed to Ada, what is the difference(s) the article tries to point out?

This is false. For example in Ada you can write:

    package Foo
        type Bar is private;
        procedure Initialize (Item : in out Bar); 
    private
        type Bar is record
            Baz : Integer;
            Qux : Float;
        end record;
    end Foo;
Users of the Foo package know there is an opaque type called Bar. They can declare variables of the type, they can use the defined API to operate on it but they cannot reference the implementation defined private members (Baz, Qux) without compile errors. Yes Ada does give you the power and tools to in a very blatantly unsafe and obvious way cast it as another type or as an array of bytes or whatever but if you're doing stuff like that you have already given up.

In JavaScript there are no such protections. For example if you have a module with private class Bar and you export some functions that manipulate it:

    class Bar {
        constructor() {
            this.Baz = 420;
            this.Qux = 1337.69;
        }
    }
    export function Initialize() {
        return new Bar();
    }
In client code you have no issue inspecting and using the private values of that class:

    import { Initialize } from 'module';
    let myBar = Initialize();

    myBar.Baz = 42069; // works just fine
    Object.keys(myBar).forEach(console.log); // you can iterate parameters.
    myBar.Quux = 'Corge'; // add new parameters
    delete myBar.Baz; // I hope no functions rely on this...
Using the private parts of Bar should 100% be a compilation error and even the most broken languages would have it at least be a runtime error. Lmao JS.
init1··on Ada, its design, and the language that built the languages
As far as I can tell you cannot create your own bounded Integer/Floating point types in any of the ML languages. That's one example of one of the core Ada type features. Most people have never experienced a type system like Ada and you will be surprised by how it helps you write higher quality software that is also more reliable.
init1··on Ada, its design, and the language that built the languages
In my opinion it has both complicated and terrible syntax that it inherited and extended from c++ and complicated semantics.
init1··on Ada, its design, and the language that built the languages
It is not that I cannot remember the symbols - I don't want to; I want the language to plainly explain itself to me. Furthermore every language has it's own set of unique symbols. For new readers to a language you first have to familiarize yourself with the new symbols. I remember my first few times reading rust... It still makes my head spin. I had to keep looking up what everything did. If the plain keyword doesn't directly tell you what it's doing at least it hints at it.

To be clear Ada specifically talks about all this in the Ada reference manual in the Introduction. It was specifically designed for readers as opposed to writers for very good reasons and it explains why. It's exactly one of the features other languages will eventually learn they need and will independently "discover" some number of years in the future.

init1··on Ada, its design, and the language that built the languages
Verbosity is a feature not a bug. Programming is a human activity and thus should use human language and avoid encoded forms that require decoding to understand. The use of abbreviations should be avoided as it obsfucates the meaning and purpose of code from a reader.
init1··on All my new code will be closed-source from now on
Git is an OSS project and is not owned even slightly by Microsoft.

Github the website however is.

You don't need to replace git.

init1··on Be Like Clippy
I found a project ClippyJS: https://github.com/pi0/clippyjs

That adds clippy and all the other agents to a webpage. There is a PR on the repo that adds an example that hooks clippy up to a local ollama agent: https://github.com/pi0/clippyjs/pull/17

init1··on Montana becomes first state to enshrine 'right to compute' into law
What useless drivel. If you already have property rights then you have the right to own and operate computers.

The main thrust of the law is directly self contradictory.

"Government actions that restrict the ability to privately own or make use of computational resources for lawful purposes..."

OK then just make the usage you don't like unlawful and you are allowed to violate this "protection".

init1··on A comparison of Ada and Rust, using solutions to the Advent of Code
Big agree. Overly terse and symbolic languages feel very cryptic and ugly to me as well.
init1··on Language Agnostic Programming: Why you may still need code
You're in luck. Try Ada (it's great BTW)
init1··on A comparison of Ada and Rust, using solutions to the Advent of Code
You can generate bindings using a gcc -c -fdump-ada-spec <header.h>. They typically work well enough without needing additional tweaks but If it's more involved you can ask Claude to make a shell script that generates bindings for whatever C library you wanted to use and it works reasonably well.

In my opinion, don't make thick bindings for your C libraries. It just makes it harder to use them.

For example I don't really like the OpenGL thick bindings for Ada because using them is so wildly different than the C examples that I can't really figure out how to do what I want to do.

init1··on A comparison of Ada and Rust, using solutions to the Advent of Code
What exactly is a "type-related disadvantage"?

As far as I'm aware, Ada has a much more expressive type system and not by a hair. By miles. Being able to define custom bounds checked ordinals, being able to index arrays with any enumerable type. Defining custom arithmatic operators for types. adding compile and runtime typechecks to types with pre/post conditions, iteration variants, predicates, etc... Discriminant records. Record representation clauses.

I'm not sure what disadvantages exist.

init1··on A comparison of Ada and Rust, using solutions to the Advent of Code
I've never come across any range restricting constructions in C++ projects in the wild before. It truly is a shame, I think it's something more programmers should be aware of and use. Eliminating all bounds checking and passing that job to the compiler is pretty killer and eliminates whole classes of bugs.
init1··on To be a better programmer, write little proofs in your head
Instead of just thinking about the proof in your mind or putting it in comments you can actually embed pre/post conditions and compile time proofs in actual code using ADA SPARK. You use Pre and Post aspects for subprograms and pragma Invariant for loops and such constructs. The spark toolchain will run provers against your code and show if it can show the proofs hold.

https://www.youtube.com/watch?v=tYAod_61ZuQ

init1··on Designing type inference for high quality type errors
All these years and Ada is still the undisputed and unmatched master of type safety.
init1··on A new math library for Ada: Neo.SIMD
I wanted to look at the code in more detail and it looks like the author didn't link it anywhere. Luckily it wasn't difficult to find: https://github.com/AdaDoom3/Neo.SIMD

Looks like the author pulled it from his main project (which doesn't look like it's been updated in a while) and at the moment it only supports x86. It's certainly a good start, it could be an easy project to make it an alire crate and publish it.