Live data from Hacker News

DreamBerd is a perfect programming language

github.com

131–140 of 215 posts

Re: DreamBerd is a perfect programming language

#131

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)

Does it even count as an esolang feature if it was a real feature in a commonly-used language for years?

https://perldoc.perl.org/5.20.0/arybase

It was even more fun in Perl 4, when $[ was program-scoped o_O

Re: DreamBerd is a perfect programming language

#132
>If you're unsure, that's ok. You can put a question mark at the end of a line instead. It prints debug info about that line to the console for you.

Man, I love this idea. Imagine if in JavaScript, you could just add a `?` to a line to print out the value of all variables and expressions referenced. Or `?` on a line by itself to print out the value of all variables in scope.

> DreamBerd has significant whitespace. Use spacing to specify the order of arithmetic operations.

I might be mad, but this seems...almost...useful?

Re: DreamBerd is a perfect programming language

#135
post #52
post #40

The best gem in all of it is this: > You can make classes, but you can only ever make one instance of them. This shouldn't affect how most object-oriented programmers work. This describes my experience with most OOP code very well.

I think the best gem is the ability to delete paradigms. As for OOP, a bit more realistic would have been to restrict interfaces to at most one implementation.

One real implementation and many implementations for testing that do whatever the consumer wants them to do.

Re: DreamBerd is a perfect programming language

#136
post #21

Earlier quoted context omitted.

This feature is not so bad: > In case you really need to vary a variable, the when keyword lets you check a variable each time it mutates. const var health = 10! when (health = 0) { print("You lose")! } If it can really be triggered when the variable changes to any value it makes it a truly reactive paradigm programming language. By the way, could that be hacked to implement loops? const var i = 10 when (i >= 0) { do…

It's basically a syntactic sugar on an Observer pattern but I like it. You would need a way to turn off 'when' observers. And I suppose it does couple the observer to the observable pretty tightly.

It's pretty easy to turn off the when observers, simply `delete when`.

Side-effect is that it will delete all the whens, so only use it if you need it!

Re: DreamBerd is a perfect programming language

#137
Gotta say, you really had me going there. When I got to arrays starting at -1, I started to furl my brow but shrugged it off because Perl allows you to do just that. Then I saw the equality operators and didn’t think much of that either because it seemed quite plausible given that I’ve seen things like “truthy” in Jasmine/Karma and Rspec code. Even the no-loop thing didn’t phase me since modern JS seems to discourage loops in favor of loop-like lambda functions. I think a few of these are actually good ideas, such as truly immutable data, unicode variable support, and “previous”.

By the way, what is a Signal?

Post reply on HN