Live data from Hacker News

A perfectable programming language

alok.github.io

51–60 of 152 posts

Re: A perfectable programming language

#52
post #42
post #27

Earlier quoted context omitted.

Lean is far off the most bloated one. Isabelle most likely takes that spot, the main archive includes a whole vscodium among other things.

>> Lean 3 was the least bloated theorem prover among Lean, Coq and Agda, and Lean 4 is the most bloated among this Big Three. > Lean is far off the most bloated one. Isabelle most likely takes that spot. Among these three is the operative phrase here. I hate to be pedantic, but we are talking about theorem provers here :)

That is a fair point, thank you for the correction there

Re: A perfectable programming language

#53

> languages without types tend to grow them, like PHP in 7.4 and Python type annotations Well ... that is a trend that is driven largely by people who love types. Not everyone shares that opinion. See ruby. It is very hard to try to argue with people who love types. They will always focus on "types are great, every language must have them". They, in general, do not acknowledge trade-offs when it comes to type systems…

You mentioned there are reasons not to type check your program. I would very much like to hear what they are!

Also, I have to point out that of course Ruby has types. And it does type checking. It just does it when the line of code actually runs. (i.e. runtime type errors).

So the discussion here isn't should we check types or not. It's a question of when to do it.

Do you want to know you've made a mistake when you actually make it? Or do you want to find out an unknown amount of time later (e.g. in unfortunate cases, several months later, debugging an issue in prod. Not that I would know anything about that ;)

---

My own thinking on the subject is that it should be configurable.

Rust's level of correctness, for example is probably overkill for a game jam. (As is, arguably, using a low level language in the first place.)

But my thinking here is that correctness should be opt out rather than opt-in. If you have a good reason to make your program wrong by default, then you should be allowed to do that. But it should be a conscious choice! And every source file, at the top of the file, should remind you that you are making that choice: #JAMMODE

And if you intend to actually ship the thing, and charge money for it, in Serious Release Mode the compiler should refuse to build anything that's still in jam mode.

My point here is that some languages make jam mode the only option you have.

Re: A perfectable programming language

#54
post #45

Unfortunately Lean’s distribution went from somewhat about 15 MiB in times of Lean 3 to more than 2,5 GiB when unpacked nowadays for no good reason. This is too much. Even v4.0.0-m1 was a 90 MB archive. Looks like that Lean’s authors do not care about this anymore. Lean 3 was the least bloated theorem prover among Lean, Coq and Agda, and Lean 4 is the most bloated among this Big Three. This is very sad. Personally, I…

Static linking wonders? Originally Lean was coded in C++, and dynamically linked executable, if I remeber correctly.

No, it’s still linked dynamically and its kernel is still in C++ (see https://github.com/leanprover/lean4/tree/master/src/kernel, this part of a codebase has hardly changed since Lean 3). Almost all the space in the package (more than 2.5 GiB) is taken up by .olean/.ilean/.ir files, approximately 1 GiB of which is generated from the code of Lean’s frontend itself (i.e., parser, elaborator, core tactics, and so on) and the other 1 GiB from a standard library. As you might guess, these files are IR and essentially a compiled Lean’s environment (something like a Lisp image), so that Lean can load them straight up without recompiling and rechecking everything.

There were some proposals like compressing all the .olean files, but (as far as I know) none of them were implemented. Well, even if some proposals were implemented, their contribution was effectively negated anyway.

Re: A perfectable programming language

#57

> languages without types tend to grow them, like PHP in 7.4 and Python type annotations Well ... that is a trend that is driven largely by people who love types. Not everyone shares that opinion. See ruby. It is very hard to try to argue with people who love types. They will always focus on "types are great, every language must have them". They, in general, do not acknowledge trade-offs when it comes to type systems…

Here's a recent talk about how "concrete syntax matters, actually": https://www.youtube.com/watch?v=kQjrcSMYpaA

Highly recommended!

Re: A perfectable programming language

#59
The perfect programming language has:

  - The compile speed of Go
  - The performance of Go
  - The single binary compilation of Go
  - The type system of Kotlin
  - The ecosystem of JVM (packages for anything I could dream of)
  - The document sytem/tests of Elixir
  - The ability to go "unsafe" and opt for ARC instead of GC
  - The result monad/option monad and match statements from OCaml/Gleam
  - A REPL like Kotlin or even better, OCaml
  - A GREAT LSP for NeoVim
  - A package/module system that minimizes transient dependencies
  - No reliance on a VM like BEAM or JVM
I still dream about this "one size fits all" language.

Re: A perfectable programming language

#60

Unfortunately Lean’s distribution went from somewhat about 15 MiB in times of Lean 3 to more than 2,5 GiB when unpacked nowadays for no good reason. This is too much. Even v4.0.0-m1 was a 90 MB archive. Looks like that Lean’s authors do not care about this anymore. Lean 3 was the least bloated theorem prover among Lean, Coq and Agda, and Lean 4 is the most bloated among this Big Three. This is very sad. Personally, I…

Also, I dislike that they are using Github as the default package registery. But as this langage was created inside Microsoft, it makes senses.
Post reply on HN