pebaz / lambdacore Goto Github PK
View Code? Open in Web Editor NEWAn interpreted language written in Rust inspired by the Lisp family of languages.
Home Page: https://sites.google.com/view/lcore
License: Mozilla Public License 2.0
An interpreted language written in Rust inspired by the Lisp family of languages.
Home Page: https://sites.google.com/view/lcore
License: Mozilla Public License 2.0
Cannot print arrays and arrays are flattened no matter their depth.
Returning from a function may work, but it is inconsistent and uses something that is not similar to a loop. If an error is created named ReturnError
that holds the Value
to return, it can escape any number of loops to return a value.
This may not be worth the effort to implement, but would simplify the inner-workings of LambdaCore and help the programmer's mental model when adding features.
Need to support how the standard library will interact with the interpreter.
Need to implement #11 before starting this.
Eliminate duplicate symbol tables from being created by reusing the previous stack frame.
Use Asciinema to make tutorials and put them right on the front page of the website.
(defn 'hello-world ['person] '[
(prin "Hello ")
(prin person)
(print "!")
])
(hello-world "Pebaz")
Instead of only implicit return.
+
-
*
/
**
Dicts need to be able to be indexed using any value type?
(set 'info (dict "first name" "David" "last name" "Wallace"))
(set 'ms (dict 'first-name "Michael" 'last-name "Scott"))
(print (get info "first name"))
(print (get ms 'first-name))
Use Rust modules instead of putting everything into a single file.
>
>=
<
<=
;; Instead of evaluating arguments from back to front:
(print "third" "second" "first")
;; Eval them from front to back:
(print "first" "second" "third")
This doesn't make LambdaCore compain:
(dict 'a 1 'b 2 'c)
Tutorial, download, hook up to DevOps pipeline.
(= True True)
(!= True False)
(or True False)
(and True False)
(not True)
(print (get [1 2 3] 0))
Backtick: Evaluate other parts of array while not evaluating others.
`(a list of ,(+ 2 3) elements)
⇒ (a list of 5 elements)
:>
Multi-line
Block Comment
<:
Can't have functions defining local variables that can be accessed after the function is over.
Goes hand in hand with #15.
Need to be able to support user defined types.
:: Type definition
(type 'person '[name age])
:: Instantiation
(set 'pebaz (new person "Pebaz" 24))
:: Usage
(print (get pebaz 'name))
(print (get pebaz "name"))
:: Future
(print pebaz/name)
Once the #29 Dict type is created, it will be easy to make type
definitions return Dict
s.
Allow code to be imported and interpreted to add names from another file.
Since all functions return values instead of references, there is no way to modify any collection value. The swap
function will allow this:
(set 'person (dict 'name "Pebaz"))
(swap 'person '[name] "Protodip")
(print (get person 'name)) :: Prints "Protodip"
The quoted list contains sequential indexes to any collection objects it finds along the way:
(set 'person (dict 'name "Pebaz" 'inventory [1 2 3]))
(swap 'person '[inventory 1] 222222)
(print (get (get person 'inventory) 1)) :: Prints 222222
This:
(print [(+ 3 5)])
Does not print 8
(if True '[
(print "It's True!")
]'[
(print "It's False!")
])
(set num 3)
(sel num
1 '[
(print "It's One!")
]
2 '[
(print "It's Two!")
]
3 '[
(print "It's Three!")
])
Need to implement macros. Macros are just functions that have their arguments passed to them untouched rather than pre-evaluated.
Potential plan:
Array
from evaluating arguments.Macro
variant for Value
.eval
built-in function for Macro
designers to evaluate Array
s of code.(defm setq '[key value] '[
(set 'key (eval value))
])
(setq name "Pebaz")
Make sure that this is put somewhere that VS Code users can get to it.
Turn:
interpret(...) {
...interpret(...);
}
Into:
LambdaCore(...) {
while let a = symbols.pop() {
interpret(a);
}
}
Need to determine what CI/CD pipeline to use for distributing release versions of LambdaCore.
Trust Travis CI and AppVeyor template to test your Rust crate on 5 architectures and publish binary releases of it for Linux, macOS and Windows
Goes hand in hand with #44.
Quote: Don't evaluate symbol
'(+ 1 2)
⇒ (+ 1 2)
Use lcore_parse
and lcore_interpret
to make a REPL.
LambdaCore REPL runs the command if it has the first and last paren. This means that multi line statements contained within an open paren will become a syntax error after 3 enter keys are pressed without a closing paren.
Why? Because it would be amazingly cool.
"Syntax Recognized by GitHub"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.