Live data from Hacker News

DreamBerd is a perfect programming language

github.com

151–160 of 215 posts

Re: DreamBerd is a perfect programming language

#151
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.

I really like the "when" keyword, actually.

Feel free to use it today in any language if your debugger supports it. Most do. It's called a data breakpoint/watch point.

Re: DreamBerd is a perfect programming language

#152
post #13

const var scores = [3, 2, 5]! scores[0.5] = 4 print(scores) //[3, 2, 4, 5]! Genius! This trivially solves the problem of reading integer and floating point numbers from input and inserting them into a sorted array. Too bad there are no loops in this language. (Remember that arrays start from -1.)

Loops are implemented using when:

  const var i = 10

  when (i >= 0) {

    do_something()

    i = i  - 1

  }

Re: DreamBerd is a perfect programming language

#153

>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. Us…

I would be quite happy if you could add a single character in a function definition to log the function name and all arguments on call, and function name at time of return. I spend a substantial amount of time manually adding logging to unfamiliar or malfunctioning code, and this would improve (not eliminate) the difficulty of doing so.

Re: DreamBerd is a perfect programming language

#154

>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. Us…

Only if you want to replace the current somewhat-arbitrary set of operator precedence rules with an equivalent set that's just as arbitrary but that you also can't see. :P

Re: DreamBerd is a perfect programming language

#157

>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. Us…

> 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.

Tomorrow is today: https://twitter.com/TodePond/status/1595464031728459776

Re: DreamBerd is a perfect programming language

#159

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…

Signals are a design paradigm for reactive programming which have recently trended in the JS frontend space. For e.g., https://preactjs.com/blog/introducing-signals/

Is this effectively a watch() on a variable?
Post reply on HN