azer0s / hummus Goto Github PK
View Code? Open in Web Editor NEWA gluten free LISP (ish) interpreter powered by black magic
License: MIT License
A gluten free LISP (ish) interpreter powered by black magic
License: MIT License
(def a ({}
(:foo "Bar")
(:hello (fn x
(out x)
))
))
((:hello a) "Hello")
Load stdlib at runtime. We'd use a custom command in Hummus. Something like:
(use :./base.so :native)
The hook for these would be
func doSystemCall(...)
All shared functionality would need to be in a library package.
For this, BuildProject
and RunProject
should not use os.GetWd
in the future, but rather have a working dir supplied as a parameter. I think there should be a library loaded at REPL startup that contains all REPL specific stuff.
API should look something like so:
(hummus/build-project "/User/x/workspace/foobar")
(hummus/run-project "/User/x/workspace/foobar")
Also, I think you should be able to pull and build libs on runtime. They should be installed into a global lib folder next to the stdlib folder. So if LibBasePath
isn't supplied to the interpreter, ./lib
(from the same dir in which the binary is) should be taken.
(hummus/get-lib "github.com/Azer0s/bootstrap-hummus" :master)
(use :@bootstrap-hummus/master) ; can also just be (use :@bootstrap-hummus)
;TODO: (path/abs)
;TODO: (path/abs!)
;TODO: (path/join)
;TODO: (path/base)
;TODO: (path/clean)
;TODO: (path/dir)
;TODO: (path/ext)
;TODO: (path/is-abs?)
;TODO: (path/match)
;TODO: (path/match!)
;TODO: (path/split)
;TODO: (path/rel)
;TODO: (path/rel!)
;TODO: (path/walk)
Links with #24
Prefix every function parameter in stdlib with _
Right now, one can only use the master version of a lib, so:
(use :@bootstrap-hummus)
In the future, one should be able to provide a version like this:
(use :@bootstrap-hummus/c5bbf :local)
Currently, when a library is imported via use
, it's imported globally because Hummus use
acts like C #import
.
In the future, one should be able to include a file only on the local file scope with :local
to avoid version clashing.
(use 'mylibv1' :local)
This doesn't work, yet it should.
(def func (fn x (/ x 2)))
(map (.. 0 10) (fn x (' x (func x))))
I'd tap into doCall
and make the call to the native map implementation myself to debug this. Probably something with context not set correctly.
Same as #11 but for native libs
(use :./calls.so :native :local)
(use :./calls.so :local :native)
struct
could actually be a macro from stdlib that returns a function which takes arguments supplied like in the struct def. Something like
(def struct (macro args
(' :fn (list/concat (' :parameters) args) ...)
))
The current REPL needs a rework.
The new REPL needs following features:
This is a good first issue for anyone who is skilled in Go but doesn't have too much experience with interpreters yet. Ref: runners/runner.go
is the file to start with.
This is linked to the last point in TODO.md
Maybe syscall channels can be used...somehow? Maybe this can even be written as a Hummus lib with API and all?
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.