Bob's a young esoteric language (Generates C++ code and then compiles it with g++). The idea is to have an English like syntax that doesn't compromise much of the flexibility of the language's use, while being fast and compiled. Fun and impractical.
Bob write "Hello world!!" .
The currently open issues are things I haven't put time in to see how to implement in Rust. They're still valuable things a new comer to the code base and Rust could easily do.
- Install rust - https://www.rust-lang.org/tools/install.
- Install g++ - apt install g++ (for Ubuntu based Linux distros)
- cargo run example.bob (assuming example.bob is in the working directory)
- Use ./app for running the compiled app.
- Access docs through cargo doc --open
- install and setup termux or another terminal emulator for android.
- run the script curl https://its-pointless.github.io/setup-pointless-repo.sh | bash
- Run pkg install rust
- Clone and build Bob as normal!
- Follow the same old instructions to setup the Vim plugin.
- You can get the release for armv7 directly from this repository, instead of having to install ruust from an unreliable community maintained repository .
./bob example.bob
Check out the files in the examples directory.
- Bob statements are called sentences.
- Each sentence is terminated with a period.
- Each sentence begins with calling Bob.
- Every token in Bob must be separated by whitespace.
- Function names in Bob are called verbs.
- A verb HAS to follow the Bob call, as it is put.
- Sentences may contain expressions, which are evaluated into arguments for each verb. Verbs that return a value may be used as expressions(to be implemented).
- Comments in Bob go in between brackets.
- Currently verbs may have only one argument in Bob. This will be changed to function name argument1 argument name argument2 .. eg. Bob write line "Name: " + Martha.
- Variables in Bob are called Identities. Expressions like "sqws" or 5 are called literals, 5 being a number literal and "sqws" being a string literal.
- write - writes to stdout.
- write line - writes to stdout after appending a newline to argument string.
- read - reads from stdin.
- let - declares a variable.
- number
- decimal
- string
- Arithmetic operators like +,-,/,% may be used. Their written counterparts like plus, minus, modulo, etc, may also be used.
- strings may be concatenated with +. String identities and literals may be used together for this. Currently other types cannot be used along string literals and identities, but that'll be implemented in the future.
Things to be implemented are mentioned here. (This is a short term roadmap)
A vim plugin is available for Bob that currently supports text highlighting and not perfectly refined autocomplete. Repo is at https://github.com/actuday6418/bob-vim