Dreamberd

Latest version: v0.1.1

Safety actively analyzes 638773 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

2.0

[<img align="right" height="100" src="shapes.png">](https://github.com/TodePond/DreamBerd/blob/main/examples/Examples.md "Click here for the examples page.")


**It's finally here.**

Today we're launching DreamBerd 2, the sequel to the perfect programming language. We think you'll enjoy the new powers and possibilities that it brings.

**Note:** DreamBerd 2 is a full re-write, so please let us know about any bugs or issues that you find.

Keep reading for its new features! When you've finished reading through all the new features, check out the [new examples](https://github.com/TodePond/DreamBerd/blob/main/Examples.md).

<!--

If you're reading this then you might be looking for the hidden examples page...

CONGRATULATIONS! You found it!
Here it is: https://github.com/TodePond/DreamBerd/blob/main/res/res/Examples.md



But if you came here because you want to contribute to DreamBerd 2, here are some tips on how to get your PR successfully merged.

- Always punch up.
- Only poke fun at things you respect + admire.
- Make us feel good.

-->

New features

Exclamation marks!

Be bold! End every statement with an exclamation mark!

java
print("Hello world")!


If you're feeling extra-bold, you can use even more!!!

java
print("Hello world")!!!


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.

java
print("Hello world")?


You might be wondering what DreamBerd 2 uses for the 'not' operator, which is an exclamation mark in most other languages. That's simple - the 'not' operator is a semi-colon instead.

java
if (;false) {
print("Hello world")!
}


Declarations

There are four types of declaration. Constant constants can't be changed in any way.

java
const const name = "Luke"!


Constant variables can be edited, but not re-assigned.

java
const var name = "Luke"!
name.pop()!
name.pop()!


Variable constants can be re-assigned, but not edited.

java
var const name = "Luke"!
name = "Lu"!


Variable variables can be re-assigned and edited.

java
var var name = "Luke"!
name = "Lu"!
name.push("k")!
name.push("e")!


Immutable data

**New for 2023!**<br>
Mutable data is an anti-pattern. Use the `const const const` keyword to make a constant constant constant. Its value will become constant and immutable, and will _never change_. Please be careful with this keyword, as it is very powerful, and will affect all users globally forever.

java

1.5

9

1.0

[Recently](https://github.com/TodePond/DreamBerd/releases/tag/v0.0), we ran out of money.

However, I just realised that I counted our investments wrong. User Joshix didn't just donate 69 *cents*. They donated 69 [*euros*](https://github.com/TodePond/DreamBerd/tree/main/docs/investment/pre-seed#liberapay-investors)!

> DreamBerd is saved!

Our new drive into academia

Since [conquering hacker news](https://github.com/TodePond/DreamBerd/issues/32) (a vile website), we've set our sites on a new target: Academia.

It is our goal to get DreamBerd mentioned in as many academic papers and conferences as possible. If you work in academia, or you know someone who does, **mention DreamBerd**!

The current list of DreamBerd appearances is as follows:

- [Cellpond: Spatial programming without escape](https://www.youtube.com/watch?v=cBYudbaqHAk&t=6704s).
- That's it.

Due to the slow place of academia, we don't expect this list to grow any time soon.

Influencers

No, we're not interested in any influencers covering Dreamberd (unless you work in academia).

But if you really insist on covering it... You <ins>must</ins> cover the contributing section in your coverage. We've added a [note](https://github.com/TodePond/DreamBerd/tree/main#contributing) to our docs to cover this.

**If you notice an influencer or content-creator cover DreamBerd without mentioning it, please let them know in their chat and comments!**

<br>

Thank you for tuning into this week's release notes. See you next week.

vaN.aN
[Last week](https://github.com/TodePond/DreamBerd/releases/tag/vNaN.NaN), we revealed the truth about DreamBerd:

> DreamBerd's true purpose is to make fun of JavaScript. Just look at this abomination:
>
> `typeof NaN === "number"`
>
> Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.
>
> _That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is to make fun of people who make fun of JavaScript. Just look at this abomination:

> Just look at this abomination.
>
> `typeof NaN === "number"`
>
> Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.

Yeah, you read that right. They think that 'not a number' is 'not a number'. But 'not a number' is a 'number' as part of the IEFFFF spec. You probably didn't know this.

_That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is to make fun of people who make fun of people who make fun of JavaScript. Just look at this abomination:

> Just look at this abomination:
>
> > Just look at this abomination.
> >
> > `typeof NaN === "number"`
> >
> > Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.
>
> Yeah, you read that right. They think that 'not a number' is 'not a number'. But 'not a number' is a 'number' as part of the IEFFFF spec. You probably didn't know this.

Yeah, you read that right. They think that 'not a number' is a 'number'. But if you look closely at the name of 'not a number', you'll notice that it says 'not a number', not 'a number'. You probably didn't know this.

_That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is to make fun of people who make fun of people who make fun of people who make fun JavaScript. Just look at this abomination:

> Just look at this abomination:
>
> > Just look at this abomination:
> >
> > > Just look at this abomination.
> > >
> > > `typeof NaN === "number"`
> > >
> > > Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.
> >
> > Yeah, you read that right. They think that 'not a number' is 'not a number'. But 'not a number' is a 'number' as part of the IEFFFF spec. You probably didn't know this.
>
> Yeah, you read that right. They think that 'not a number' is a 'number'. But if you look closely at the name of 'not a number', you'll notice that it says 'not a number', not 'a number'. You probably didn't know this.

Yeah, you read that right. They think that 'not a number' is 'not a number' as if any of this matters. When push comes to shove, our reality has no meaning, and there's no point in arguing about anything. You probably didn't know that.

_That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is to make fun of people who make fun of people who make fun of people who make fun of people who make fun of JavaScript. Just look at this abomination:

> Just look at this abomination:
>
> > Just look at this abomination:
> >
> > > Just look at this abomination:
> > >
> > > > Just look at this abomination.
> > > >
> > > > `typeof NaN === "number"`
> > > >
> > > > Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.
> > >
> > > Yeah, you read that right. They think that 'not a number' is 'not a number'. But 'not a number' is a 'number' as part of the IEFFFF spec. You probably didn't know this.
> >
> > Yeah, you read that right. They think that 'not a number' is a 'number'. But if you look closely at the name of 'not a number', you'll notice that it says 'not a number', not 'a number'. You probably didn't know this.
>
> Yeah, you read that right. They think that 'not a number' is 'not a number' as if any of this matters. When push comes to shove, our reality has no meaning, and there's no point in arguing about anything. You probably didn't know that.

Yeah, you read that right. They think that nothing matters. But they could just go outside and _touch grass_. If they went to the gym, or created a child as soon as possible, they'd find meaning in their life. You probably didn't know this.

_That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is to make fun of people who make fun of people who make fun of people who make fun of people who make fun of people who make fun of JavaScript. Just look at this abomination:

> Just look at this abomination:
>
> > Just look at this abomination:
> >
> > > Just look at this abomination:
> > >
> > > > Just look at this abomination:
> > > >
> > > > > Just look at this abomination.
> > > > >
> > > > > `typeof NaN === "number"`
> > > > >
> > > > > Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.
> > > >
> > > > Yeah, you read that right. They think that 'not a number' is 'not a number'. But 'not a number' is a 'number' as part of the IEFFFF spec. You probably didn't know this.
> > >
> > > Yeah, you read that right. They think that 'not a number' is a 'number'. But if you look closely at the name of 'not a number', you'll notice that it says 'not a number', not 'a number'. You probably didn't know this.
> >
> > Yeah, you read that right. They think that 'not a number' is 'not a number' as if any of this matters. When push comes to shove, our reality has no meaning, and there's no point in arguing about anything. You probably didn't know that.
>
> Yeah, you read that right. They think that nothing matters. But they could just go outside and _touch grass_. If they went to the gym, or created a child as soon as possible, they'd find meaning in their life. You probably didn't know this.

Yeah, you read that right. They're trying to make out that they're not a nerd like everyone else reading this. (Also getting weird vibes from that child comment). Really, they shouldn't have kids. They should stay single, live in the dark, and work overtime all day to make their startup a success. Too many people don't want to work nowadays. You probably didn't know this.

_That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is to make fun of everyone. Just look at this abomination:

> Just look at this abomination:
>
> > Just look at this abomination:
> >
> > > Just look at this abomination:
> > >
> > > > Just look at this abomination:
> > > >
> > > > > Just look at this abomination:
> > > > >
> > > > > > Just look at this abomination.
> > > > > >
> > > > > > `typeof NaN === "number"`
> > > > > >
> > > > > > Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.
> > > > >
> > > > > Yeah, you read that right. They think that 'not a number' is 'not a number'. But 'not a number' is a 'number' as part of the IEFFFF spec. You probably didn't know this.
> > > >
> > > > Yeah, you read that right. They think that 'not a number' is a 'number'. But if you look closely at the name of 'not a number', you'll notice that it says 'not a number', not 'a number'. You probably didn't know this.
> > >
> > > Yeah, you read that right. They think that 'not a number' is 'not a number' as if any of this matters. When push comes to shove, our reality has no meaning, and there's no point in arguing about anything. You probably didn't know that.
> >
> > Yeah, you read that right. They think that nothing matters. But they could just go outside and _touch grass_. If they went to the gym, or created a child as soon as possible, they'd find meaning in their life. You probably didn't know this.
>
> Yeah, you read that right. They're trying to make out that they're not a nerd like everyone else reading this. (Also getting weird vibes from that child comment). Really, they shouldn't have kids. They should stay single, live in the dark, and work overtime all day to make their startup a success. Too many people don't want to work nowadays. You probably didn't know this.

Yeah, you read that right. Both sides are as bad as each other. But not me. I'm above all that. You probably didn't know this.

_That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is to make fun of people who make fun of everyone. Just look at this abomination:

> Just look at this abomination:
>
> > Just look at this abomination:
> >
> > > Just look at this abomination:
> > >
> > > > Just look at this abomination:
> > > >
> > > > > Just look at this abomination:
> > > > >
> > > > > > Just look at this abomination:
> > > > > >
> > > > > > > Just look at this abomination.
> > > > > > >
> > > > > > > `typeof NaN === "number"`
> > > > > > >
> > > > > > > Yeah, you read that right. JavaScript thinks that 'not a number' is a 'number'. You probably didn't know this.
> > > > > >
> > > > > > Yeah, you read that right. They think that 'not a number' is 'not a number'. But 'not a number' is a 'number' as part of the IEFFFF spec. You probably didn't know this.
> > > > >
> > > > > Yeah, you read that right. They think that 'not a number' is a 'number'. But if you look closely at the name of 'not a number', you'll notice that it says 'not a number', not 'a number'. You probably didn't know this.
> > > >
> > > > Yeah, you read that right. They think that 'not a number' is 'not a number' as if any of this matters. When push comes to shove, our reality has no meaning, and there's no point in arguing about anything. You probably didn't know that.
> > >
> > > Yeah, you read that right. They think that nothing matters. But they could just go outside and _touch grass_. If they went to the gym, or created a child as soon as possible, they'd find meaning in their life. You probably didn't know this.
> >
> > Yeah, you read that right. They're trying to make out that they're not a nerd like everyone else reading this. (Also getting weird vibes from that child comment). Really, they shouldn't have kids. They should stay single, live in the dark, and work overtime all day to make their startup a success. Too many people don't want to work nowadays. You probably didn't know this.
>
> Yeah, you read that right. Both sides are as bad as each other. But not me. I'm better than that. You probably didn't know this.

Yeah, you read that right. They're making fun of people. I'm above all that - I don't make fun of people! You probably didn't know this.

_That's the kind of high level satire you can expect from DreamBerd._

Except... That's not the truth. Here's the real truth:

The Real Truth About DreamBerd

DreamBerd's true purpose is...

The Surreal Truth About DreamBerd

For frog's sake, stop seeing everything through that lens.

[❌🐦](https://www.todepond.com/wikiblogarden/social-media/just-block-them/)

v1.0

vWelcome cTo adjAnother adjWeekly nDreamBerd nRelease nNotes.

adjNew nName

aFirst, pWe'vRe qReally adjPleased cTo vAnnounce nDreamberd's adjNew nName: nDreamBerd.

pWe vPromise pWe vWon't vChange pIt advAgain.

adjSemantic nNaming

pWe'vRe qAlso adjExcited cTo vIntroduce aA qBrand adjNew nFeature. pWe vCall pIt adjSemantic vNaming, cOr adjHungarian nNotation.

advNow pIt's adjEasier cTo vRead nDreamberd cThan advEver nBefore.

java
const const sName = "Lu"!
const const iAge = 29!
const const bHappy = true!


pWe qEven vSupport g_nGlobals.

java

1.0.0.0.0.0.0.0.0

We've launched! 🚀

New with this release:

* You can now [overload variables](https://github.com/TodePond/DreamBerd#overloading)! (thanks to scolsen)
* You can now [overload variables](https://github.com/TodePond/DreamBerd#overloading)!!! (thanks to scolsen)

And most importantly...
You can now [run DreamBerd](https://github.com/TodePond/DreamBerd#compiling)!

1.0alpha

Over the years, many people have tried [and failed](https://github.com/TodePond/DreamBerd/discussions/183) to implement DreamBerd. No one has been able to do it...

*Until today!*

Introducing [Vivaan Singhvi](https://vivaansinghvi07.github.io/), a highschool student who has now created the world's first mostly-functional [Dreamberd interpreter](https://github.com/vivaansinghvi07/dreamberd-interpreter). This is extremely impressive, as it's a task that many experienced programmers have struggled with.

**[As promised](https://github.com/TodePond/DreamBerd/releases/tag/v3.0), I have now donated [£99](https://www.dreamberd.computer/investment/pre-seed-extension/) to a charity of Vivaan's choice, [Second Harvest Food Bank](https://secondharvestetn.org/).**

The money will pay for approximately 375 meals for children and families experiencing hunger. I now invite you to [donate](https://donate.secondharvestetn.org/site/Donation2?idb=2120474203&df_id=1480) as well! If you do so, please let me know on social media by tagging TodePond. I'll give you a boost!

> And now I want to show you how well the interpreter fared up with DreamBerd. Here's the analysis.

Implementation report

Exclamation marks

> **🏆 Complete pass**

All exclamation mark syntax worked well.
Notably, the debug information I got from my question mark was clear and helpful.

c
print("Hello world")!
print("Hello world")!!!
print("Hello world")?
if (;false) {
print("Hello world")!
}


Console:

Hello world
Hello world
Hello world

exclamation-marks/bold.db, line 3

print("Hello world")?
^^^^^
Expression evaluates to value undefined.

Hello world


Const const

> **🏆 Complete pass**

c
const const name = "Luke"!
print(name)!


Luke


Const var

> **🏅 Lenient pass**

The `pop` method from the example didn't work, but constant variables worked as expected with other methods.

c
const var name = "Lu"!
name.push("ke")!
print(name)!


Luke


Var const

> **🏆 Complete pass**

c
var const name = "Luke"!
name = "Lu"!
print(name)!


Lu


Var var

> **🏅 Lenient pass**

Similar to above, the `pop` method didn't work, but `push` worked fine.

c
var var name = "Luke"!
name = "Lu"!
name.push("ke")!
print(name)!


Luke


Const const const

> 💰 **Untested**

For the [first bounty](https://github.com/TodePond/DreamBerd/releases/tag/v3.0), a global "const 3" server is not needed, so I didn't test this.

However, the interpreter does state that it supports const 3!

Unicode naming

> **🏅 Buggy pass**

The `1️⃣` emoji didn't work, but most other emojis do work.
Notably, the `True` value was correctly interpreted as a string!

c
const const letter = 'A'!
var const 👍 = True!
var var 🐦 = 1!

print(letter)!
print(👍)!
print(🐦)!


A
True
1


Number naming

> **🏆 Complete pass**

I had to add in some extra whitespace because the interpreter partially implements the parentheses features of DreamBerd, which are not required or tested as part of this [first bounty](https://github.com/TodePond/DreamBerd/releases/tag/v3.0).

c
const const 5 = 4!
print( 2 + 2 == 5 )!


true


Negative one index arrays

> **🏆 Complete pass**

c
const const scores = [3, 2, 5]!
print(scores[-1])!
print(scores[0])!
print(scores[1])!


3
2
5


Float array indexing

> **💥 So close!**

This should print `[3, 2, 4, 5]` instead.

c
const var scores = [3, 2, 5]!
scores[0.5] = 4!
print(scores)!


[3, 4, 2, 5]


When

> 🏆 **Complete pass**

This was one of the first features I tried. Amazing!

c
var var health = 10!
when (health == 0) {
print("You lose")!
}

print("You got hit")!
health = 0!


You got hit
You lose


Line-based lifetimes

> 🏆 **Complete pass**

c
const const name<2> = "Luke"!
print(name)!


Luke
Error


Time-based lifetimes

> **💥 Failure**

This caused an error.

c
const const name<20s> = "Luke"!
print(name)!


Infinity-based lifetimes

> 🏆 **Complete pass**

I genuinely can't believe this worked. I ran one program that set an infinite-lifetime constant...

c
const const foreverName<Infinity> = "Luke"!


Then I ran another program to read it and print it out.

c
print(foreverName)!


Luke


Loops

> 🏆 **Complete pass**

There are no loops.

Booleans

> **🏅 Lenient pass**

The interpreter is based off a slightly older version of DreamBerd that uses the `after` keyword instead of `addEventListener`. I didn't test those older features, but I tested that you can use the `maybe` boolean value still. The interpreter seems to treat `maybe` like a string, which is fine I guess.

c
const const isTuesday = maybe!
print(isTuesday)!


maybe


Significant whitespace

> **🏆 Complete pass**

Amazing. Love it.

c
print( 1 + 2*3 )!
print( 1+2 * 3 )!


7
9


Powers

> **🏆 Complete pass**

c
print(1^1)!
print(2^3)!


1
8


Number names

> **🏆 Complete pass**

Incredible.

c
print( one + two )!
print( thirteen + two )!


3
15


Indentation

> **🏅 Lenient pass**

The interpreter allows indents of multiples of 3, which is standard practice among DreamBerd implementations. However, it also allows the use of the tabs (in place of two spaces), which is strictly forbidden. I will allow it this once.

c
function main() => {
print("DreamBerd is the future")!
}

main()!


DreamBerd is the future


Negative indent:

c
function main() => {
print("DreamBerd is the future")!
}

main()!


DreamBerd is the future


Loose check

> **🏆 Complete pass**

c

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.