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