r/Compilers • • 2d ago

Haze Programming Language

https://www.haze-lang.cc/
0 Upvotes

45 comments sorted by

11

u/futur3_pr3s3nt 2d ago edited 1d ago

Yay, another programming language! And this one doesn't look vibed at first glance! (Not being sarcastic. The more the merrier.) Unfortunately, 'at first glance' was exactly right and it turns out to be another vibecoded language. Whereby Yay, another programming language becomes sarcastic retroactively.

1

u/raundoclair 1d ago

AI was used, if you check theirs repo.

2

u/futur3_pr3s3nt 1d ago

Aw. no, bummer.

-16

u/[deleted] 1d ago edited 1d ago

[removed] β€” view removed comment

→ More replies (1)

3

u/beephod_zabblebrox 1d ago

which domain is right? here its haze-lang.cc, on github its hazelang.org

1

u/Top_Marionberry_4413 1d ago

both of them are right. they go to the same place bro.

4

u/beephod_zabblebrox 1d ago

fake websites for open source projects exist, you have to keep an eye out for phishing

-3

u/Top_Marionberry_4413 1d ago

ok? and?

2

u/beephod_zabblebrox 1d ago

your message seemed to make fun of me being careful that is all

3

u/futur3_pr3s3nt 21h ago

I've seen another thread of his, and he displays a consistent pattern of being abrasive and highly irascible. OP must think this communication style is justified for some reason.

→ More replies (1)

3

u/Aaron1924 1d ago

Looks like an interesting project! I'm personally very excited about Verus and Creusot, which add compile-time verified function specifications to Rust, and I'm always happy to see new languages where these features are part of the language design, rather than bolted on retroactively.

Two things that confused me while reading though the documentation:

  • The website states that "all contracts are checked at compile time", which sounds similar to what Verus & Creusot do, where everything is checked by SMT solvers statically, and only provably correct programs compile. But the docs later clarify that "contracts are evaluated at compile time when the compiler has enough information, at runtime otherwise".Even worse, the examples imply that the compile-time prover is essentially just constant folding, meaning any interesting statement about function inputs ends up being a runtime assertion.
  • The other flagship feature from the homepage, the "Immix Collector", is only the "intended" design. According to the docs: "the current runtime implements a parallel mark-and-sweep subset". So the claims about this garbage collector are also misleading.

1

u/Top_Marionberry_4413 1d ago

SMT solvers sound good but in practice if the compiler cant prove your program is correct, it doesnt compile, or it just allows everything, which makes them impractical, and the DX just ends up being terrible, with the contracts being an obstacle instead of an assistance.

The runtime checking thing means that the compiler forces you to use Result[T, E] if it cant prove something, which is much better than not compiling at all, and means that the program doesnt abort at runtime because of something that couldnt be proven at compile time. Hope that helps.

2

u/Aaron1924 1d ago

I mean it's a valid design choice to make runtime assertions a built-in language feature; D, Ada and Eiffel do something very similar, and some modern languages (e.g. Zig) have built-in unit testing. It's just that none of these language claim that "all contracts are checked at compile time".

→ More replies (1)

2

u/AustinVelonaut 1d ago

Looking at the documentation, I see that Haze supports pattern matching, but doesn't support nested patterns. Is there a reason why those are disallowed? They can provide succinct expressions for things like balancing red-black trees:

balanceLeft (Node _ (Node Red lx kx vx rx) ky vy ry) k v r = Node Red (Node Black lx kx vx rx) ky vy (Node Black ry k v r)

0

u/Top_Marionberry_4413 1d ago

nesting can get messy quickly.

not unplanned though, these kind of FP features are generally desirable if they have guardrails.

1

u/AustinVelonaut 1d ago

If you add them, there's a nice match algorithm in The Implementation of Functional Programming Languages that converts a nested pattern match into a fairly-optimal case-tree.

1

u/Lonely-Session-7643 1d ago

Context error reporting is cool! Don’t worry, keep working on this. Publish some articles, benchmarks. You will need a package manager, use a winget-like git-based package registry, is easier to manage things, and start create the ecosystem!

0

u/Top_Marionberry_4413 1d ago

Thanks. Much appreciated.

1

u/ggeldenhuys 1d ago

A fork of QBE to support Windows? But QBE does support Windows. πŸ€·β€β™‚οΈ

1

u/Top_Marionberry_4413 1d ago

not arm64. which was added. read.

1

u/ggeldenhuys 1d ago

πŸ‘

1

u/funcieq 1d ago

I know your nickname from somewhere, did you made axe lang?

2

u/Top_Marionberry_4413 1d ago

yes. yes i did. i remember you too, for zap.

1

u/KvThweatt 1d ago

Looks neat. Attaching a contract to a function and declaring a contract looks very similar to my language Ideka. I approve. Keep it up.

1

u/funcieq 1d ago

I love type system in your language

-10

u/Top_Marionberry_4413 1d ago edited 1d ago

The brainlet comments from the redditor neckbeards is really funny to me.

> Ignores unique memory allocation strategy and spec that took months to sketch
> Ignores compiler backend that applies optimizations on top of QBE to achieve near-LLVM performance for a fraction of the cost
> Ignores DbC guarantees and compile time evaluation from the compiler
> Uses single braincell:
> "AI was used, if you check theirs repo"

Hilarious.

3

u/futur3_pr3s3nt 1d ago

Breh, why don't you go post it in r/TripleNineSociety.

6

u/futur3_pr3s3nt 1d ago

Salty that we're not getting the attention we desired for months of 'work', are we. Resorting to personal insults, are we. Tsktsktsk.

1

u/Top_Marionberry_4413 1d ago

Talking to yourself? I ask again since you were too scared to answer last time, is it bad? Have you tried it?

Where is your completely human coded language, do you have one? I do. It's from 2021.

Disregarding anything that used AI assistance means disregarding all programming post-2022, which is stupid.

5

u/futur3_pr3s3nt 1d ago

The comment was in response to the insult that you posted which was subsequently deleted and cannot be replied to. We're past polite discussion here.