214 comments

[ 2.5 ms ] story [ 218 ms ] thread
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.
This feature really isn't all that bad!

> To declare a function, you can use any letters from the word function (as long as they're in order):

> function add (a, b) => a + b!

> func multiply (a, b) => a * b!

> fun subtract (a, b) => a - b!

> fn divide (a, b) => a / b!

> functi power (a, b) => a * b!

When I first read this, I thought the function names could only include letters from the word function, and only in order!
You must be a fan of Subversion then. On a more serious note, I'm sure I've seen this (any unique shortenings standing in for the whole word) in an actual language at some point, and it was infuriating.
Incidentalley this allows for

   count func (a,b) => ...
   in out (a,b) => ...
   of if (a,b) => ...
Wonderful language, wonderful.
The letters have to be in order so maybe this will not work?
That's right, "in" works, but "count" and "of" don't.

Here are some of my favorites:

union

funi

funion

fution (sounds like fussion)

fu

fuc

fucton (as noted by a fellow commenter)

I don't know, variable decelerations seem to me to be funny but useful.

I mean constant constants, constant variables, and variable variables seem useful.

I'm not sure how would variable constants be useful.

Also, anybody knows the difference between constant constant and immutable data (constant contact constant)?

In the normal case, Alice can write 'const const true = false' and Bob, on a second machine, can write 'const const true = 7', and there will not be an error. But if Alice writes 'const const const true = false', than Bob can't reassign or mutate 'true' without throwing an error. It's for truly global constants
Come to think of it, package registries are sort of “superglobal” in many languages. It’s not entirely far-fetched to imagine a language in which variables themselves can be super-global. Heck, MUMPS global variables are immediately persisted to disk and visible to all other processes - and that’s a real language used in real systems!
It's a rather straightforward dig at C\C++ which work exactly like this with `const` variables.
But what elevates it is that it's written so confidently and buries the insane lede so well that at each feature there's a fraction of a second where it seems recoverable before sanity kicks in. After, before, and next almost, almost seem smart
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_something()
    i = i  - 1
  }
Yeah honestly I was really interested in that. Kind of like a logic language?

Maybe Prolog is the perfect language.

I like this feature, but to really make it pop I would like it to be combined with comefrom control flow.
Yes, when is the way to do loops in this language. From the hidden examples page

  functi fibonacci (n) => {
     const var sum = 1!
     const var i = 0!
     when (i < n) {
        sum += sum + previous sum!
        i++!
     }
  }

  when (i < 10) {
     fibonacci(i)?
     i++!
  }
And if you don't want your code to loop back by accident you can just use lifetimes! Truly an elegant language
Oh please tell me you can specify the length of your loops in lines of code executed.

  var var i<10> = 0!!
  var var i = false!
  when (i) {
    print(i)!
    i++!
  }
I think this should print 0,1,2 and then stop, assuming checking the condition is a line of code, and that lifetimes are for lines executed and not just the syntax.
Doesn't Tcl's "trace" feature do this?
This feels sort of like key-value observation in obj-c
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!

Delete the observed variable?

About coupling, an implementation could send state change events to a message bus and observers could subscribe only the events they care about.

Isn't that basically a computed COME FROM?
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.
I honestly liked the whitespace significant operator precedence.
Nim used to have that, but unfortunately removed it because it was too controversial.
I also quite liked that idea. It would probably be a nightmare to actually use, but it's definitely a creative solution to dealing with infix operator precedence.

The only implemented language I know of with this feature is the obscure array lang I (an incrementation of the J language's name I assume) by Marshall Lochbaum:

https://github.com/mlochbaum/ILanguage

Also lost it at the timed lifetimes :)

Infinite lifetime is actually useful here and there. I'll usually slap an infinite lifetime wrapper around the `requests` or `httpx` module when I'm testing out some Python web scraping code.

I think there's a hint of a good idea in the type that checks strings with a regex. Obviously it's comically impractical written that way.
The 'previous' feature sounds like a great idea! The compiler could even decide which variables it needs to keep track of.
I think it would lead to a lot of hard to find logical bugs in a lot of projects but I think it would be a great operator in say, a scripting language for a turn based game.
I am currently working on a DSL which actually does include a "back" operator! The language is used to describe simulated circuits, so you can inquire about the value a register had during a previous clock cycle.
I dunno, the previous keyword seemed pretty neat to me.
Love the constants. Biggest confusion for me reading modern javascript, coming from traditional languages. "What do you mean you can change a constant?"
You can't reassign constants in JS, it throws an error: Uncaught TypeError: Assignment to constant variable.

But yes you can modify objects and arrays of a constant, which is not great.

This is incredibly good. It maintains the breathlessly approving tone of a language readme the entire time, it has incredible comedic timing (a lesser shitpost would have revealed that of course the file extension was .db right at the start), and it has incredible internal consistency. For some reason it was the fact that it demonstrates how "files" work by rebinding a const const that sent me completely over the edge. Or maybe it was the regex describing valid regex labels
breathlessly approving tone of a language readme

What does this mean?

it has incredible comedic timing

How does text have comedic timing?

Sorry it would be a spoiler to reveal this to you at this point
Breathlessly approving tone of a language readme: Readmes on Github, especially for languages, often have a recognizable tone. Look how cool this is! Isn't this so neat!? Why would you ever do it differently!?

Comedic timing (in text): Most prose is written under the assumption that it will be read in order- ie, from beginning to end. For instance, you likely read the word "beginning" before you read the word "end" in that last sentence, and read the word "to" between them. So for instance, while "a lesser shitpost would have revealed that of course the file extension was .db right at the start", this superior shitpost has text between the start and the reveal. This is analogous to how, when speaking, a comedian will maintain awareness of pausing and such to drop funny lines at exactly the right moment.

[flagged]
Sorry to interrupt... I've just realised that it isn't breathlessly approving. A better example of breathless approval would be the above comment.
My apologies. Please take the first ":" of the first paragraph and replace it with the following string: " is as follows:".
If you are constantly exclaiming, you are likely to become breathless. Exclaimations are signified with an Exclaimation mark. Pauses and other timing can be signified with commas, dashes and ellipses.
... this entire comment chain is weird AF.
Oh don’t be so mean, sometimes robots need help understanding humans.
You could read it and then you'd understand what they're talking about
Delete

To avoid confusion, the delete statement only works with primitive values like numbers, strings, and booleans.

delete 3!

print(2 + 1)! // Error: 3 has been deleted

HAHAHAHAHA

DreamBerd is a multi-paradigm programming language, which means that you can delete the keywords and paradigms you don't like.

  delete class!
  class Player {} // Error: class was deleted
When perfection is achieved and there is nothing left to delete, you can do this:

  delete delete!
delete = previous delete!!
Make sure to look at the example programs if you missed the link in the doc

https://github.com/TodePond/DreamBerd/blob/main/LICENSE.md

I sort of spoiled the joke for myself because the first thing I noticed was that it didn't have a standard license (github says view license instead of Apache or whatever). So I clicked on it before even reading what the language was about, still thinking it was serious.
Is this to blame complexity of Rust ?
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
What is INTERCAL ? When will you release first version of the compiler ?
INTERCAL is basically a sequel to DreamBerd. I highly recommend listening to that podcast episode! It's very enlightening
Also JavaScript, Python, React, R, C, functional programming, and probably many others things.
Please no! Someone may try to actually use this in some corporate production model -- I can see the carnage now - the language, editors where you can write left to right, right to left, or even vertically with an exta cost plug-in, training courses at $1500/day -- the horror of it all! Don't forget the vertical camelcase variable names where letters appear, not only in both cases, but on two lines. You know of course, tehre's a special place for you when the mist clears. You'll either be stuck in the Bank of America customer care department for eternity, or, be stuck in the other Big Red helping to get Larry Elisson's network computer workig -- FOREVER.

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

I wonder what the behavior of

    scores[-2] = 4!
is. Or, for that matter, of

    scores[-1.1] = 4!
(Assuming that -2 and -1.1 haven’t been deleted.)
The first one would place 4 at the start of the array. So would the second one.

If you did the first, then the second one, two 4s would be placed at the start.

But arrays start at -1. How would that work?
You can insert items before the start
So it’s not invariably true that arrays start at -1? They only start at -1 after an array literal assignment? You need to update the language description! ;)
Perhaps they start at -1 and proceed in both directions

  const var scores = [3, 2, 5]!
  scores[0.5] = 4
  print(scores) //[3, 2, 4, 5]!
  scores[-2] = 10
  print(scores) //[10, 3, 2, 4, 5]
  print(scores[-1]) // 10
is how I interpret the spec, but I did not run this through the reference compiler yet.
Loops are implemented using when:

  const var i = 10

  when (i >= 0) {

    do_something()

    i = i  - 1

  }
A correction on another comment -- this is not a multithreaded language -- it's transthreaded-- a radically new concept where your code may or may not, run code in your thread, or someoen else's thread, without your knowledge. Errors in your code show up in their program, and their errors, in yours - see? Now bugs aren't your fault anymore! And don't forget the KvetchGPT option. It's doesn't so much as complain about your code as you go along. It's like pair programming with your manager but you can turn them ofF.
Lu makes awesome stuff, do check out todepond on youtube
Hello! Creator here. This is an open-source project so please do submit any issues or PRs.

Please note: I will close any issues without unreproducible steps.

> Please note: I will close any issues without unreproducible steps.

Surely you meant "without reproducible steps"?

No I mean without unreproducible steps.
(comment deleted)
(comment deleted)
Surely you didn't comment before viewing the post.
Who would do such a thing on the internet? You would have to forever live with the shame.
Funny seeing you here, I enjoyed your SandPond videos :)
Hey thank you! See you round the Pond some time
Double negatives hurts my brain.

The latter could be phrased like this: "Please note: I will close any issues with reproducible steps."

That's not right. Your issue can have reproducible steps. But it must contain unreproducible steps.

For more info, please read my blog post "Why unreproductions are required".

Would it be possible to add a graphics drawing interface similar to turtle?

I think you should support the following API

    Start(x,y)
    LineTo(x,y)
    Circle(x,y,A) // A is area
    Triangle(ax,by,ay,cx,cy,ay,bx) //Most Intuitive coordinate order
    RestOfEffingOwl()
It's really super fun hahah!

But you guessed right at least the features from my ACPUL no-keyword programming language.

Here is a quick comparison DreamBerd vs ACPUL:

! - should use ';' and use everywhere if(..){..}; This is important!

if (;true) - no boolean operators !, &&, || etc. no else. use

  if (a==0){
    true;
  };
  if (a!=0){
   else;
  };
Naming - unicode by default and fully translatable

Floating indexes in arrays. - works, but it's called a map

  index 0.5;
  map.set.value(index, 123);
When - works but with restrictions

  when if;
  when(a<=10){
    a+=1;
  };
  if(r0){
    a:=1;
  };
Loops - there are loops here but no "break" keyword, just set the end value. Same for functions and there is no "return" keyword, use if(..)

Indents - 1 space ident is highest priority. Maybe your editor ident: 2 space or 4 space, -3 is possible, but rare case

Function - don't need to write any keyword like 'fn' or 'func'. just func1 {..};

Strings - all strings always zero quotes. var=STRING;

File Structure - Yes! Really usable and it looks much better than other languages

AI - fully designed for AI copilot and works with partially defective code

..and it works. I wrote a lot of code. Lets fun :)

Here is the demo app https://github.com/web3cryptowallet/Web3CryptoWallet

I haven't laughed like this in a very long time, very well done.

Looking at the cellular automatons video, I felt it captures the early sense of wonder learning about math and programming. But also, the despair in what problems are actually kind of open. What if I design a cellular automatons where every neighborhood is in the shape of a Disney character and every value it can take corresponds to the release date of one movie that was in the global top 10 of highest grossing movies? Well, turns out that's a special case of a Heisendorff-Circlydot automatons, which was solved using topolographical methods in the 80's and the only open question have been proven to be equivalent to proving the consistency of Riemann.

Unless say you give each cell a bounded notebook with a given number of page, in which case the problem falls into a weird computability class between the gaps of the Chomsky hierarchy. And then it's thesis material :-)

> But also, the despair in what problems are actually kind of open.

I loved the video too and initially felt the way you felt. But as I thought more about it, I don’t think that value is found in doing something that nobody ever has done before, that might be nay impossible for the majority of humanity. I think that new for the individual is very valuable, like, how to solve quadratic equations has been solved for a long time, but it’s still new to new people all the time!

But even more powerful is the application of the not-new to a new setting! One might think that because, say, proper data management has been “solved” (as in, there are tools out there like SQL and graph DBs and such), it is solved for everybody, but it only takes one glance at huge international companies that are held together by an assorted array of excel files moving around in a semi-random way with no data types, enormous space for human error, and some other atrocities for data management… it’d be of great value for such a fictional organization that has never existed to do something “new” for them, use and actual database!

(comment deleted)
This is amazing. You're my kind of weird. :D
Elegant, concise and simple:

  const const const delete = delete delete!
Cannot imagine a neater form with which to express such a concept in another language.
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.
I love Singletons and God Classes. ;)
Factories and Managers. Don't forget Decorators!
First time reading this. Thanks for the laugh. Trigger warning for those who have worked on legacy Java/C# code.
I'd like the extend the Trigger warning to people still building Java apps because it's the same shit.
You really need a visitor pattern factory factory for trigger warnings.
Sturgeon's Law: "90 of everything is crap".

It's no surprise that when you make virtually all mainstream programming languages OOP, then there will be a vast amount of bad OOP code out there (as by definition mainstream code then becomes "OOP code").

I like how you forget the % after 90.

DreamBerd probably allows this.

Why waste time type lot char, when few char do trick
IIRC, numbers without a percentage sign are assumed to be percentages. Numbers that are not percentages have to be followed by ;% (the semicolon is the NOT operator in DreamBerd).
I think they actually meant that there are 90 crap OOP language implementations and the infinite quantity that remain are ‘not crap’
Maybe you can hoist % symbols like you can hoist variables.

If not, maybe you can hoist the ability to hoist % symbols, before which you can hoist % symbols.

Ouch, that is a harsh view. Black & white thinking leads to depression in people with a disposition. Questioning these thoughts helps.

I'm more inclined to follow the bell curve. 10% crap, 40% mediocre but rather bad, 40% mediocre but rather good and 10% great.

> Black & white thinking leads to depression in people with a disposition.

That sounds interesting. Who has researched/written about that?

I've seen this called "bulldozer code". As in "Hey, all of those plain functions need to be OOP! Get a big earth moving machine and gently push them inside the curly braces of a class! Which class? Any class!"
This thread slice is making me feel really bad.
>In case you really need to vary a variable, the when keyword lets you check a variable each time it mutates.

The kOS plugin for Kerbal Space Program implements a programming language that actually has this feature.

could have made a language faster than C in 0.1x the amount of time
I rather appreciate the built-in support for the `fucton` keyword.

  Using the word 'DreamBerd' in your project name implies that the DreamBerd Foundation does not own your project.
  
  However, not using the word 'DreamBerd' in your project implies that the DreamBerd Foundation does own your project. If you would like to keep ownership of your work, please always use the word 'DreamBerd' in it.
  
  Here are some examples:
  white_check_mark DreamBerdScript (not owned by the DreamBerd Foundation - you are free to use this name)
  x ECMAScript (owned by the DreamBerd Foundation - please consider renaming)
  x Rust Foundation (owned by the DreamBerd Foundation - please consider renaming)
Maybe the author should actually take over the Rust Foundation.
This is brilliant haha
The author described it as "perfect", but failed to use "elegant", "thoughtful", "awesome" or "empathy" anywhere.
I find DreamBerd to have the perfect antidote to all the constexpr/const fetish in that other, non-perfect language.

    scores[0.5] = 4
    print(scores) //[3, 2, 4, 5]!
should be [3, 4, 2, 5] imo, between 0 and 1
No arrays starts from -1 in this case.
Great repo, had a good laugh through the whole readme!
Please send for help. I have rubbed off my face with the palms of my hands.