Skip to content

pixie-lang/dust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dust

Magic fairy dust for Pixie.

Provides tooling around pixie, e.g. a nicer repl, running tests and fetching dependencies.

Usage

  • dust or dust repl to start a REPL

  • dust test to run the tests

  • dust run to run code in a file

  • all commands:

    $ dust help
    Usage: dust <cmd> <options>
    
    Available commands:
    get-deps  Download the dependencies of the current project.
    deps      List the dependencies and their versions of the current project.
    repl      Start a REPL in the current project.
    run       Run the code in the given file.
    doc       Show function documentation. Broaden search using -all
    load-path Print the load path of the current project.
    test      Run the tests of the current project.
    help      Display the help
    describe  Describe the current project.
    

Project definition

dust reads its settings from a per-project project.edn file. In that file one configures the name, version, dependencies and other metadata about the project:

{:name dust
 :version "0.1.0-alpha"
 :description "Magic fairy dust for Pixie"
 :dependencies [[heyLu/hiccup.pxi "0.1.0-alpha"]]}

With such a project definition you can run dust get-deps to fetch the dependencies of the project and dust will set up the load-paths var in Pixie so that the namespaces are available in the repl or when running programs:

$ dust get-deps
Downloading heyLu/hiccup.pxi
$ dust repl
Pixie 0.1 - Interactive REPL
(linux, gcc)
:exit-repl or Ctrl-D to quit
----------------------------
user => (use 'hiccup.core)
nil
user => (html [:span#foo.bar.baz "HOORAY!"])
"<span class="bar baz" id="foo">HOORAY!</span>"
user => @load-paths
["/home/lu/t/pixie/pixie" "." "deps/heyLu/hiccup.pxi/src"]

Installation

  • install Pixie
  • ln -s <path-to-pixie>/pixie-vm /usr/bin/pixie-vm (or really anywhere else in $PATH)
  • git clone git://github.com/pixie-lang/dust
  • ln -s <path-to-dust>/dust /usr/bin/dust (or really anywhere else in $PATH)

For an improved REPL with history and line-editing you'll need to install rlwrap.

Contributions welcome!

Some ideas:

  • dust doc, probably using something like this
  • dependency improvements:
    • fetch dependencies from paths inside repositories, maybe via a :path "sub/dir" option

Copying

Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL). For details see the files LICENSE included with the source distribution. All copyrights are owned by their respective authors.

About

Magic fairy dust for pixie, i.e. tooling around the language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published