Live data from Hacker News

Ante: A low-level functional language

antelang.org

191–200 of 226 posts

Re: Ante: A low-level functional language

#191
post #58

Hello, author here! As the website says, the compiler itself is still in a very early state where basic things like functions, types, traits, inference, monomorphisation, and codegen are implemented. The fun stuff of algebraic effects, lifetime inference, and refinement types are not however. Though I can elaborate on implementation strategies of these for anyone curious. For example, algebraic effects in existing la…

This is a really awesome project and I hope it goes far!

Re: Ante: A low-level functional language

#192
post #180

Earlier quoted context omitted.

The generally accepted definition of a low level language is a language that provides little or no abstraction from a computer's instruction set architecture. In actuality, C is a lower level functional programming language than Ante, because C functions are first-class citizens. I like the lack of GC! What is the method for always incremental compilation? The benefits are obvious, but isn't it problematic to have tw…

Fwiw C is actually a huge abstraction over modern hardware. It's a good representation of the PDP-11 and similar-era computers. It's also a good abstraction for modern microcontrollers. C's view of the world is also a really poor fit for today's larger CPUs. Your computer has to jump through a ton of hoops to make itself seem C-like. C has no concept of vectorization, speculative execution, branch prediction, multipl…

> C has no concept of vectorization

OK, but vectorisation is exposed by the instruction set, as instructions[1]

> speculative execution, branch prediction, ... caches, MMUs

How would you expose speculative execution & branch prediction? Cache behaviour is well understood so what's wrong with it? What would you do to expose MMUs to the programmer, and what would they do with it/how would it help?

[1] but aren't there libraries that expose it just fine in a portable way?

Re: Ante: A low-level functional language

#193
post #58

Hello, author here! As the website says, the compiler itself is still in a very early state where basic things like functions, types, traits, inference, monomorphisation, and codegen are implemented. The fun stuff of algebraic effects, lifetime inference, and refinement types are not however. Though I can elaborate on implementation strategies of these for anyone curious. For example, algebraic effects in existing la…

I'd really like to find "the low-level functional language" without "the fun stuff". Or at least it should have simple and boring subset that is usable without "the fun stuff". Something like Caml Light - precursor to Ocaml - but with translation to C instead of bytecode, so it will be fast and will have comfortable integration with C libraries.

[deleted]

Re: Ante: A low-level functional language

#194
post #58

Hello, author here! As the website says, the compiler itself is still in a very early state where basic things like functions, types, traits, inference, monomorphisation, and codegen are implemented. The fun stuff of algebraic effects, lifetime inference, and refinement types are not however. Though I can elaborate on implementation strategies of these for anyone curious. For example, algebraic effects in existing la…

I'd really like to find "the low-level functional language" without "the fun stuff". Or at least it should have simple and boring subset that is usable without "the fun stuff". Something like Caml Light - precursor to Ocaml - but with translation to C instead of bytecode, so it will be fast and will have comfortable integration with C libraries.

For functional lang transpiling to C, you can look at Fennel - a Clojure dialect over C. However, if you want functional and statically typed, then you are probably out of luck.

Re: Ante: A low-level functional language

#195

Earlier quoted context omitted.

Even assembly languages are abstractions.

Strangely the language "below" assembly, Verilog, is a lot more abstract and tries to pretend to look like C while generating hardware, so writing it is more like imagining how to trick it into doing what you want.

That's because a HDL is not a lower level machine language, but instead they are languages used to implement a machine that consumes a machine language.

Consider what happens when you implement a x86 emulator in python: you're using a high level language to implement a machine using a particular substrate (a simulation inside another machine). This simulated x86 CPU executed machine code and you'd call that machine code to be the "native" or "lowest level" language with respect to that particular machine.

You can see how that choice of machine language bears no relationship with the language used to implement the underlying machine.

Re: Ante: A low-level functional language

#196

Interesting, well have to see how it develops in the future. Although, I normally dislike languages without {}, but I suppose that is just preference.

I hate having to press Shift to get braces. Let's use square brackets which require no modifier key.

Consider remapping your keyboard layout

Re: Ante: A low-level functional language

#197

Earlier quoted context omitted.

This is definitely an interesting thought. My thinking is that "the fun stuff" tends to help make the language more functional, so removing it you are left with a more imperative language resembling a C clone with traits and type inference. Then if you want easier C interop you must remove traits and either remove modules as well or provide a standard method of mangling module names into function names. At that point…

what makes Ante low level? Just from a cursory look over the website seems pretty high level to me.

There's a lovely Perlisism for this: "A programming language is low level when its programs require attention to the irrelevant." Which is interesting in this context because it's clearly not a good fit for Ante, where it looks like many traditional features of "low-level" languages no longer require such attention! So maybe it's not Perlis-low-level; maybe it's "machine-oriented"?

Re: Ante: A low-level functional language

#198

Earlier quoted context omitted.

I hate having to press Shift to get braces. Let's use square brackets which require no modifier key.

Just a question: but are you considering the frequency of usage for a particular symbol in that suggestion? If {} is for opening/closing functions or code blocks/scope AND [] is for making arrays, lists, or some other data structure: do you only want them switched where, idiomatically, where there are less function definitions vs instances of the data structure? Or is it an overall objection to any shift+key operator…

I don't code in C/C++.

Re: Ante: A low-level functional language

#199
post #181

Earlier quoted context omitted.

What do you think is more likely, that the author forgot to add a LICENSE file or that he actually doesn't intend for ANYONE to use the language he created? Give me a break

The original comment was asking if the current legal status is that nobody is allowed to use ante without acquiring a licence separately (which is true) not whether the author's intention is that nobody use ante (which we don't know, but it seems unlikely.)

I thought the original comment was simply a big report: missing license file. With a snarky comment tagged on. I thought everyone assumed that, being shown by the author here, it was the latter.

Re: Ante: A low-level functional language

#200

Earlier quoted context omitted.

I strongly doubt that, most people would look at it and say it was a concatenative language (it’s not, but that is a semantics issue) and immediate disregard. The language, while being a modal dependently typed language, there is no mandatory ‘safety’ features and memory is largely manually managed. And after the blowback, complaints, and negativity posts about Hare on HN, I just don’t care to argue the fact that my…

There is a group of programming language enthusiasts that would be interested in all sorts of languages. Then there are people who will criticize just about anything for the sake of doing it. Just ignore those people and make a day more interesting for the people who share your passions.

That is the argument that has been made by my few friends who are interested in PLT as well. The other option I’ve considered if starting a blog or similar (although my son keeps suggesting a YouTube channel) and doing a longer series of posts concerning the language, type theory, and category theory inspirations present in the semantics of the language.

I would love to imagine I could be the next Andrew Kelly (creator of Zig), I don’t know that I can actually be a language founder.

Post reply on HN