https://github.com/mcejp/helium
A programming language Invented Here™
https://github.com/mcejp/helium
bytecode-interpreter embeddable-scripting-language scripting-language
Last synced: 12 months ago
JSON representation
A programming language Invented Here™
- Host: GitHub
- URL: https://github.com/mcejp/helium
- Owner: mcejp
- Created: 2020-04-25T17:48:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-14T21:36:18.000Z (almost 4 years ago)
- Last Synced: 2025-03-09T01:29:39.930Z (about 1 year ago)
- Topics: bytecode-interpreter, embeddable-scripting-language, scripting-language
- Language: C++
- Homepage:
- Size: 304 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Helium Programming Language
A little glossary:
- A *list* of *items*: `(1, 2, 3)`
- An *object* has *members* (probably should be *properties*, *attributes*, *fields*, or something)
- All *functions* go into *modules*, including the fictitious *main function*
- *Script functions* vs *native functions*.
## How to build
Simple! Using CMake:
mkdir cmake-build-debug
cd cmake-build-debug
cmake ..
cmake --build .
## Debug mode
- automatic disassembly is enabled by default (into _.helium_disassembly_)
- full value tracing is enabled (`HELIUM_TRACE_VALUES`, output _.helium_value_trace_)
- GC tracing is enabled (`HELIUM_TRACE_GC`, output _.helium_gc.log_)
## Spec
### Built-in types
- boolean
- integer
- real
- string
- list
- object
- nativeFunction
- scriptFunction
- internal
- nil
### Implicit conversion rules
- integer to real
- note: no implicit conversions to bool
- use explicit comparison for ` != 0`, 0.0 and empty strings
- use `has ` to test against nil more succinctly
## Notes
- Garbage collection per https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon01Concurrent.pdf (like PHP 5.3)
## TODO
- some examples of usage
- strings mutable or not?
- all compile-time options