Live data from Hacker News

DreamBerd is a perfect programming language

github.com

101–110 of 215 posts

Re: DreamBerd is a perfect programming language

#101
post #16

Earlier quoted context omitted.

Feels like more of a JS parody to me. Perhaps parodies like this are an effective way to reveal our biases. #deepthoughts

Creator here - it's actually a parody of INTERCAL. I explained more on the Future of Code podcast recently: https://futureofcoding.org/episodes/064

That was a fun listen, thanks!

Re: DreamBerd is a perfect programming language

#102
> Variable hoisting can be achieved with this neat trick. Specify a negative lifetime to make a variable exist before its creation, and disappear after its creation.

It'd be neat if you could also hoist a var up into the set of extant running runtimes.

Oh, someone on earth already computed a table of rsqrt values. Let me try just try using that one...

Re: DreamBerd is a perfect programming language

#104
post #2

This is great. Usually with the joke programming languages, you can get at least one person arguing that "x feature" really isn't all that bad, or could maybe be useful. DreamBerd beats them all in that regard. It is 100% terrible! I lost it at the lifetimes implementation.

The 'previous' feature sounds like a great idea! The compiler could even decide which variables it needs to keep track of.

Re: DreamBerd is a perfect programming language

#105
I feel that the array starting index should be adjustable at runtime via increment/decrement overloading for either the [ or ] character.

var var meanings = [42]!

print(meanings[-1])! //42

[++! //temporarily change to 0-based indexing

print(meanings[0])! //42

print(meanings[-1--])! //42 (because of the --] pre-decrement)

Re: DreamBerd is a perfect programming language

#107

I feel that the array starting index should be adjustable at runtime via increment/decrement overloading for either the [ or ] character. var var meanings = [42]! print(meanings[-1])! //42 [++! //temporarily change to 0-based indexing print(meanings[0])! //42 print(meanings[-1--])! //42 (because of the --] pre-decrement)

Might be worth opening a pull request! Lots of people might prefer starting at something more intuitive, like -0 or NaN

Re: DreamBerd is a perfect programming language

#108

> Variable hoisting can be achieved with this neat trick. Specify a negative lifetime to make a variable exist before its creation, and disappear after its creation. It'd be neat if you could also hoist a var up into the set of extant running runtimes. Oh, someone on earth already computed a table of rsqrt values. Let me try just try using that one...

You could do it with 'const const const' if you don't need it mutated, but perhaps a 'const const var' would serve.

Re: DreamBerd is a perfect programming language

#109
post #92

> Booleans can be true, false or maybe. > Technical info: Booleans are stored as one-and-a-half bits. Technically, ternary values would be ~1.5849 bits.

Perhaps maybe values are only _mostly_ represented, such that storing a `maybe` will baybe result in true or false actually being stored, contingent on the compiler and surrounding code. Thus, maybe accurately describes itself--storing a maybe will maybe store a maybe.

Perfection.

Post reply on HN