Skip to content

AWeirdDev/dreamberd-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dreamberd-interpreter

Now the DreamBerd foundation does not own this project.

Big shoutout to @sus2790 for helping me out with this project! Really appreciate it! ❤️

Installation

Update: We recommend you to run this on Replit if you don't have cargo installed.

To install, you'll need to install the DreamBerd Installer Installer. Learn how to

Then, install the DreamBerd installer & run it:

$ git clone https://github.com/AWeirdScratcher/dreamberd-interpreter
-- Cloning into 'dreamberd-interpreter'...
-- remote: Enumerating objects: 61, done.
-- remote: Counting objects: 100% (61/61), done.
-- remote: Compressing objects: 100% (57/57), done.
-- remote: Total 61 (delta 24), reused 0 (delta 0), pack-reused 0
-- Receiving objects: 100% (61/61), 17.98 KiB | 2.25 MiB/s, done.
-- Resolving deltas: 100% (24/24), done.

$ cd dreamberd-interpreter
$ python installer.py

Then you're done installing!

Running

To run in your command line:

$ python3 -m dreamberd your_file.db

or, inline code:

$ python3 -m dreamberd 'print("I love dreamberd")!'

Speed

It's slow. Perfectly slow. However, using rure, it's a bit faster. I'm not good at writing interpreters, please forgive me.

Tested with most of the examples

speed test

Current Features

These are the current supported features!

Basic Print

print("DreamBerd!")!

MAKE IT BOLD!1!

print("DreamBerd")!!!

BOLD

Booleans

const const dreamberd = ;;true!
print("Dreamberd is the best programming language: ${dreamberd}")!

Error Handling & AI

AI: Auto-Insertion

print("this is fine.")
print("This is also fine."
error here!

These are fine!

Debug Information

const const luke = "amazing"!
print("How is luke")?

Debug Info

String Interpolation

As stated in the DreamBerd README, this interpreter also detects your local currency symbol and uses it for string interpolation. To check the symbol, simply write:

?

This is similar to print()?, yet more efficient.

String Interpolation Debug Information

File Structure & Exporting

Thanks to recent advances in technology, you can now give files names.

===== main.db =====
const const luke = "still amazing"!
export luke to "second.db"!

===== second.db =====
print("Luke is ${luke}")!

Exporting and File Structure

Reverse

Make sure to put the keyword on the LAST line.

print("am i happy? ${happy}")!
const const happy = ;;true!
reverse!

Result after Reversing

Unsupported Features

  • var var
  • const const const (not going to)
  • equality, statements... (== != > < <= >=)
  • emoji naming
  • arrays
  • when
  • lifetimes (priority)
  • arithmetic
  • functions
  • dividing by 0
  • useless types
  • Regular Expressions
  • Previous
  • Classes / ClassNames (may not be following the docs)
  • Time (may not be following the docs)
  • Delete
  • Overloading (may be the last to finish)
  • DBX (may be the last to finish)
  • Async Functions (need help)
  • Signals (doing when arrays are finished)
  • AI (INCOMPLETE)
  • Copilot (if we managed to make the prompts)

About

interpreter for the perfect programming language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published