r/Compilers • • 16h ago

Haze Programming Language

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

43 comments sorted by

10

u/futur3_pr3s3nt 16h ago edited 14h 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 15h ago

AI was used, if you check theirs repo.

2

u/futur3_pr3s3nt 14h ago

Aw. no, bummer.

-16

u/[deleted] 14h ago edited 10h ago

[removed] β€” view removed comment

6

u/raundoclair 14h ago

🀣

-10

u/Top_Marionberry_4413 14h ago

"AI was used, if you check theirs repo" πŸ€“

-9

u/Top_Marionberry_4413 14h ago

I would honestly like to hear what about it makes you think its vibecoded. This kind of redditor investigation always makes me laugh. The compiler backend is literally months of work. Is it bad? Have you tried it?

3

u/beephod_zabblebrox 15h ago

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

1

u/Top_Marionberry_4413 15h ago

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

4

u/beephod_zabblebrox 10h ago

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

1

u/Top_Marionberry_4413 5h ago

ok? and?

2

u/beephod_zabblebrox 5h ago

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

1

u/Top_Marionberry_4413 4h ago

bro i dont care like why are you messaging me still.

3

u/Aaron1924 11h 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 11h 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 11h 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".

-1

u/Top_Marionberry_4413 10h ago edited 10h ago

well this one does, isn't that great? :) they are all checked, the unchecked ones become Result types that need to be unwrapped. so even they are checked.

hey whoever downvoted fuck off im trying to have a conversation here. jeez, reddit cucks, am i right aaron?

5

u/standard_cog 12h ago

"AI artist"

-8

u/Top_Marionberry_4413 12h ago

hey try looking up your name in the dictionary and you'll find "accident due to broken condom"

2

u/AustinVelonaut 12h 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 12h ago

nesting can get messy quickly.

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

1

u/AustinVelonaut 12h 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 13h 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 13h ago

Thanks. Much appreciated.

1

u/ggeldenhuys 12h ago

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

1

u/Top_Marionberry_4413 12h ago

not arm64. which was added. read.

1

u/ggeldenhuys 11h ago

πŸ‘

1

u/funcieq 12h ago

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

2

u/Top_Marionberry_4413 12h ago

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

1

u/KvThweatt 13h 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 12h ago

I love type system in your language

-10

u/Top_Marionberry_4413 14h ago edited 14h 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 14h ago

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

6

u/futur3_pr3s3nt 14h 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 13h 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 13h 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.