Git Product home page Git Product logo

hummus's People

Contributors

azer0s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hummus's Issues

Add nested calls

(def a ({}
  (:foo "Bar")
  (:hello (fn x 
    (out x)
  ))
))

((:hello a) "Hello")

Refactor stdlib to go plugins

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.

Make build & run accessible from Hummus REPL

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)

Add path stdlib

;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)

Add library version for Hummus libs

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)

Add local library use

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)

Fix call in map

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.

Move struct from a built-in to a macro

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) ...)
))

Rework REPL

The current REPL needs a rework.

The new REPL needs following features:

  • History (Arrow Up, Arrow Down)
  • LR-Scroll (Arrow Left, Arrow Right)
  • Exit anywhere (Ctrl+D); even when a task is running
  • Syntax highlighting

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.