Dreamberd

Latest version: v0.1.2

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

Scan your dependencies

Page 3 of 4

1.0.0.0.0.0.0.0.0a

Welcome to 2023. DreamBerd was already there!

What's new in this release?

* Thanks to acdvs, [loops](https://github.com/TodePond/DreamBerd#loops) are now available in DreamBerd! Just use the `return` keyword to go back to the previous line.
* Also thanks to acdvs, `export` is no longer stuck on the top-level. You can now export directly from functions!
* [String interpolation](https://github.com/TodePond/DreamBerd#string-interpolation) is finally here! Please remember to use the correct currency for your region.

There are some more improvements on the way - by members of the community. They'll come in the next release! To get involved, please do reach out to me by ~~directly supporting Elon Musk's business~~ contacting me on mastodon.

0.3333333333333333

Dividing by zero

> πŸ† **Complete pass**

c
print(3/0)!


undefined


String literals

> πŸ† **Complete pass**

Zero-quote strings are not required for this bounty, but the interpreter still supports it in some cases. ie: It works for one-word zero-quote strings.

c
const const single = 'Lu'!
const const double = "Luke"!
const const triple = '''Lu'''!
const const mixed = "'Lu'"!
const const octuple = """"Luke""""!
const const none = Luke!

print(single)!
print(double)!
print(triple)!
print(mixed)!
print(octuple)!
print(none)!


Lu
Luke
Lu
Lu
Luke
Luke


String interpolation

> πŸ… **Lenient pass**

String interpolation worked, though it incorrectly thought I was in america.

c
const const name = "world"!
print( "Hello ${name}!" )!
print("Hello Β£{name}!")!
print("Hello Β₯{name}!")!
print("Hello {name}€!")!


Hello world!
Hello Β£{name}!
Hello Β₯{name}!
Hello {name}€!


Types

> πŸ† **Complete success**

Types get stripped and ignored.

c
const var age: Int = 28!
const var score: Int9 = 10!

print(age)!
print(score)!


28
10


Regular expression types

> **πŸ… Lenient pass**

Many regular expressions work, but the long crazy one in the example causes an error.

c
const const name: /[a-zA-Z]+/ = "Luke"!
print name!


Luke


Previous

> **πŸ… Lenient pass**

It didn't work with the `++` operator, but it worked when I wrote it out like this.

c
var var score = 5!
score = score + 1!
print(score)!
print(previous score)!


6
5


Next

> **πŸ’° Untested**

I couldn't figure out how to test this one, because I noticed that the DreamBerd example in the docs used old features that aren't supported anymore.

Current

>πŸ† **Complete pass**

c
var var score = 5!
print(current score)!


5


File structure

> πŸ† **Complete pass**

c
const const score = 5!
print(score)!

=====================

const const score = 3!
print(score)!


File names

> πŸ† **Complete pass**

c
======= add.db =======
function add(a, b) => {
return a + b!
}

print( add(1, 2) )!


3


Exporting

> πŸ† **Complete pass**

c
===== add.db ==
function add(a, b) => {
return a + b!
}

export add to "main.db"!

===== main.db ==
import add!
print( add(3, 2) )!


Single instance classes

> πŸ† **Complete pass**

c
class Player {
const var health = 10!
}

const var player1 = new Player()!
const var player2 = new Player()!


Error: Already made instance of the class "Token(TokenType.NAME, 'Player')".


Factory classes

> πŸ† **Complete pass**

c
var var count = 0!

class PlayerMaker {
function makePlayer() => {
count = count + 1!
class Player {
const var health = 10!
const var id = count!
}
const const player = new Player()!
return player!
}
}

const const playerMaker = new PlayerMaker()!
const var player1 = playerMaker.makePlayer()!
const var player2 = playerMaker.makePlayer()!

print(player1.id)!
print(player2.id)!


1
2


Time

> πŸ’₯ **Failure**

This caused an error.

c
print( Date.now() )!


Delete numbers

> πŸ† **Complete pass**

Ridiculous, amazing.

c
delete 3!
print( 2 + 1 )!


Error: The value 3 has been deleted.


Delete class

> **πŸ† Complete pass**

c
delete class!
class Player {}


Error


Delete delete

> **πŸ† Complete pass**

c
delete delete!
delete 3!


Error


Order overloading

> **πŸ† Complete pass**

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


Lu


Exclamation mark overloading

> **πŸ’₯ Close one**

This worked for the simple case.

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


Luke


But it didn't work for a more complex example.

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


Lu


Inverted exclamation mark

> **πŸ† Complete pass**

c
const const name = "Lu"!
const const name = "Luke"Β‘
print(name)!


Lu


Reversing

> **πŸ† Complete pass**

Oh my god it works!!!!!!!!

c
const const message = "Hello"!
print(message)!
const const message = "world"!
reverse!


Hello
world


Class names

> **πŸ† Complete pass**

c
className Player {
const var health = 10!
}

const const player = new Player()!
print(player.health)!


10


DBX

> **πŸ’° Untested**

Not required as part of this bounty.

Semantic naming

> **πŸ† Complete pass**

This doesn't require any implementation. Semantic naming melts away as intended.

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

0.9.9.9.9.9.9.9.9

We are **unhappy** to announce the **un-launch** of DreamBerd **back into beta**.
To explain our reasoning for this, please read this comment from our founder:

> _As of 2023, the DreamBerd compiler is no longer functional due to the language being too advanced for the current state of AI. We will endeavor to get DreamBerd back into a functional state as soon as we can._

This release also brings a whole bunch of empowering new changes. Please read on for the full notes.

Buff: Logo
* Our logo is now blue. Many thanks to tetra-coder for the contribution.
<img height="100" src="https://raw.githubusercontent.com/TodePond/DreamBerd/main/dreamberd.png">

Nerf: Loops
* Loops have been removed from the language.

> **Developer Comment**
> _Loops are a complicated relic of archaic programming languages. We had no option but to remove them._

Buff: Strings

We refined our string syntax!

Strings can be declared with single quotes or double quotes.
java
const const name = 'Lu'!
const const name = "Luke"!


They can also be declared with triple quotes.
java
const const name = '''Lu'''!
const const name = "'Lu'"!


In fact, you can use any number of quotes.
java
const const name = """"Luke""""!


Even zero.
java
const const name = Luke!


New Feature: Immutable Data
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

0.9.9.9.9.9.9.9.9c

Sorry to interrupt... I've just found out that I was a surprise guest on the last [Future of Code podcast episode](https://futureofcoding.org/episodes/064). Secretly, the entire episode was about DreamBerd.

_Because of this, DreamBerd has recently attracted a [lot of attention](https://news.ycombinator.com/item?id=36183683)._

To all the newcomers here, welcome to the DreamBerd community. We ~~can't stand~~ _love_ HackerNews developers! <3
But now... this week's release notes 𓀉

New Feature: Class Name

For maximum compatibility with other languages, you can alternatively use the `className` keyword when making classes.

This makes things less complicated.

java
className Player {
const var health = 10!
}


In response to some recent criticism about this design decision, we would like to remind you that this is part of the JavaScript specification, and therefore - out of our control.

New Feature: DBX

You can embed DBX in DreamBerd. It's just DreamBerd, and it's also just HTML.

java
funct App() => {
return <div>Hello world!</div>
}


**Warning:** As you know, `class` is already a keyword in DreamBerd, so you can't use it within DBX.

java
funct App() => {
// This is not ok
return <div class="greeting">Hello world!</div>
}


`className` is also a DreamBerd keyword, so you can't use that either.

java
funct App() => {
// This is also not ok
return <div className="greeting">Hello world!</div>
}


Instead, you can use the `htmlClassName` attribute.

java
funct App() => {
// This is fine
return <div htmlClassName="greeting">Hello world!</div>
}


**Please note:** Unlike JSX, you are free to freely use the `for` attribute - because DreamBerd doesn't have loops.

java
funct App() => {
return (
<label for="name">Name</label>
<input id="name" />
)
}


Improvement: Hello World
We made the Hello World example more succinct.

Before
java
"Hello world"?


After
java
Hello world?


Check out all the other examples [here](https://github.com/TodePond/DreamBerd/blob/main/Examples.md).

Developer Experience

Commits now get a green tick, thanks to naveen17797 .
It doesn't check anything, but it's green.

Fixes
- Fixed a bug where RegularExressions could be used (by CamiloOY and gezakerecsenyi).
- Fixed a horrific appearance of a 4-space indent (by teijo).

Security
- MartinSStewart clicked the GitHub security button and it [did something](https://github.com/TodePond/DreamBerd/pull/71).

---

That's everything for this time! As always, we welcome your issues and PRs.
But please read our [Code of Conduct](https://github.com/TodePond/DreamBerd/blob/main/CODE_OF_CONDUCT.md) before you do so.

If you want to support my work, then please join my-
> HEY, why have you stopped reading?

I just wanted to tell you about my-

> Wait! Don't go!

I have a pa-

> Hey stop! αΆœα΅’α΅α΅‰ α΅‡α΅ƒαΆœα΅α΅Ž

ᡖˑᡉᡃ˒ᡉ ʲᡒᢦⁿ ᡐʸ⁻ [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;](https://patreon.com/todepond)

0.9.9.9.9.9.9.9.9b

Earlier this week, DreamBerd was secretly featured on the [latest Future of Code podcast episode](https://futureofcoding.org/episodes/064). I only wish that they had invited me onto the show! There were quite a few points where I really wanted to interrupt them and give my opinion. But alas β€” maybe next time!

To celebrate the occasion, a new DreamBerd update is here!

Read on for the notes 𓀉

New Feature: AI

DreamBerd features AEMI, which stands for Automatic-Exclamation-Mark-Insertion.<br>
If you forget to end a statement with an exclamation mark, DreamBerd will helpfully insert one for you!

java
print("Hello world") // This is fine


Similarly... DreamBerd also features ABI, which stands for Automatic-Bracket-Insertion.<br>
If you forget to close your brackets, DreamBerd will pop some in for you!

java
print("Hello world" // This is also fine


Similarly.... DreamBerd also features AQMI, which stands for Automatic-Quotation-Marks-Insertion.<br>
If you forget to close your string, DreamBerd will do it for you!

java
print("Hello world // This is fine as well


This can be very helpful in callback hell situations!

java
addEventListener("click", (e) => {
requestAnimationFrame(() => {
print("You clicked on the page

// This is fine


Similarly..... DreamBerd also features AI, which stands for Automatic-Insertion.<br>
If you forget to finish your code, DreamBerd will auto-complete the whole thing!

java
print( // This is probably fine


**Please note:** AI does not use AI. Instead, any incomplete code will be auto-emailed to Lu Wilson, who will get back to you with a completed line as soon as possible.

**Now recruiting:** The backlog of unfinished programs has now grown unsustainably long. If you would like to volunteer to help with AI, please write an incomplete DreamBerd program, and leave your contact details somewhere in the source code.

New Feature: Signals

To make a signal, use `use`.

java
const var score = use(0)!


When it comes to signals, the most important thing to discuss is _syntax_.

In DreamBerd, you can set (and get) signals with just one function:

java
const var score = use(0)!

score(9)! // Set the value
score()? // Get the value (and print it)


Alternatively, you can be more explicit with your signal syntax, by splitting it into a getter and setter.

java
const var [getScore, setScore] = use(0)!

setScore(9)! // Set the value
getScore()? // Get the value (and print it)


**Technical info:** This is pure syntax sugar. The split signal functions are exactly the same as before.

java
const var [getScore, setScore] = use(0)!

getScore(9)! // Set the value
setScore()? // Get the value (and print it)


Of course, this means that you can carry on splitting as much as you like...

java
const var [getScore, setScore] = use(0)!
const var [retrieveScore, updateScore] = getScore!
const var [calculateScore, assignScore] = updateScore!


New Feature: Signals Sugar

The great thing about signals is that they let you work in *real* DreamBerd, instead of relying on frameworks.<br>
For this reason, there's some additional syntax sugar that gets compiled away in a build step.

You can use signals as if they're just a value.

java
const var score = use(0)!
score = 9!
print(score)! // 9


If you want to be more explicit, you can use the `value` property instead.

java
const var score = use(0)!
score.value = 9!
print(score.value)! // 9


**Technical info:** The `value` property doesn't do anything. It just returns the signal again.

java
const var score = use(0)!

score.value(9)! // Set the value
score.value()? // Get the value (and print it)

score.value.value = 99!
print(score.value.value.value)! // 99

---

Thank you for all your contributions to DreamBerd!
Sorry for not merging your PRs - I like to keep a few open for the semblence of an active community.

**Please note:** As a matter of policy, I only keep open issues with unreproducible steps. Otherwise, I'll just close them! GRRRR >:(

If you would like to help, please take a look at some of the [higher priority issues](https://github.com/TodePond/DreamBerd/issues/32)!

0.9.9.9.9.9.9.9.9a

Here at the DreamBerd Foundation, we've updated our policy on _names_.
Please read on for more info.

Ownership

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:
βœ… DreamBerdScript (not owned by the DreamBerd Foundation - you are free to use this name)
❌ ECMAScript (owned by the DreamBerd Foundation - please consider renaming)
❌ Rust Foundation (owned by the DreamBerd Foundation - please consider renaming)

Page 3 of 4

Β© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.