[TODO, ONHOLD] fnjs - functional javascript
Clojure JavaScript Shell Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_scripts
examples
output
src-fnjs
src/fnjs
tree/bin
.gitignore
Makefile
README
_vsn
bin
project.clj

README

--                                                                {{{1

File        : README
Maintainer  : Felix C. Stegerman <flx@obfusk.net>
Date        : 2012-10-03

Copyright   : Copyright (C) 2012  Felix C. Stegerman
Version     : v0.2.0-dev

--                                                                }}}1

=== Description ===                                               {{{1

  fnjs - functional javascript

  fnjs ("fungus"? -- let's hope it spreads ...) is JavaScript with a
  Clojure-like [1] syntax.  It allows you to write JavaScript code
  with a nicer -- functional -- syntax and style.

  It's not a complete Clojure platform like ClojureScript [2].
  Instead, like CoffeeScript [3], it's compiled one-to-one into
  equivalent JS, and interoperates seamlessly with existing JS.

  It also comes with a small (optional) Clojure-inspired standard
  library, and a Node.js-based [4] repl.

  See examples/overview.fnjs for an annotated example of the current
  implementation.                                                 TODO
                                                                  }}}1

=== Synopsis ===                                                  {{{1

  (ns hello (:use [F fnjs.core]))
  (defn say-hello [x] (console.log (F.str "Hello, " x "!")))
  (say-hello "World")
                                                                  }}}1

=== Usage ===                                                     {{{1

  Get it at https://github.com/obfusk/fnjs.

  $ make                                  # build; see tree/
  $ make test                             # run tests

  $ ./bin/fnjs file...                    # "compile" to JS on stdout
  $ ./bin/fnjs-repl                       # repl

  $ ./bin/fnjs ... | ./_scripts/ugly      # prettify
  $ ./bin/fnjs ... | node                 # run


  === Other make targets ===

    $ make install PREFIX=/some/path      # install
    $ make archive                        # create .tgz
    $ make clean                          # clean up
                                                                  }}}1

=== Roadmap ===                                                   {{{1

  === Branches ===                                                {{{2

    dev     development version; may be broken; will be next dev
    next    working development version; will be next master
    master  stable version
                                                                  }}}2

  === v0.2.0 ===                                                  {{{2

    [ ] core language
    [ ] core library
    [X] repl
                                                                  }}}2

  === v0.3.0 ===                                                  {{{2

    [ ] update examples
    [ ] improve test coverage
    [ ] review everything
                                                                  }}}2

  === v0.4.0 ===                                                  {{{2

    [ ] app: bootstrap, ...
    [ ] app: examples
    [ ] app: api
    [ ] app: repl
    [ ] website
                                                                  }}}2

  === v0.5.0 ===                                                  {{{2

    [ ] first release; --> clojars, announce
    [ ] downloads
    [ ] --> brew formula, .deb (!?)
    [ ] issues, milestones
                                                                  }}}2

  === ... ===                                                     {{{2

    [ ] vectors, lists, maps, keywords, ...
    [ ] records, protocols, multimethods, ...
    [ ] --> polymorphism in library

    [ ] compile-time macros
    [ ] eval, app: api

    [ ] typechecking (!?)

    ...
                                                                  }}}2
                                                                  }}}1

=== Dependencies ===                                              {{{1

  * Node.js     [4] (>= 0.8.9)  (to run the repl and examples)
  * Underscore  [5] (>= 1.4.1)  (to use the repl and library)
  * UglifyJS    [6]             (to prettify)

  * Leiningen   [7]             (to build)
  * Java                        (to run)

  NB: Node.js v0.6.12 (which comes with Ubuntu 12.04) is too old to
  run the fnjs repl; I've only tested with >= v0.8.9.
                                                                  }}}1

=== License ===                                                   {{{1

  GPLv2 [9] or EPLv1 [10].
                                                                  }}}1

=== Editing ===                                                   {{{1

  I use VimClojure [8] with this in my ~/.vimrc:
  au BufNewFile,BufRead *.fnjs set filetype=clojure
                                                                  }}}1

=== References ===                                                {{{1

  [1]   Clojure
        http://clojure.org/

  [2]   ClojureScript
        https://github.com/clojure/clojurescript

  [3]   CoffeeScript
        http://coffeescript.org/

  [4]   Node.js
        http://nodejs.org/

  [5]   Underscore
        http://underscorejs.org/

  [6]   UglifyJS
        https://npmjs.org/package/uglify-js

  [7]   Leiningen
        http://leiningen.org/

  [8]   VimClojure
        https://github.com/vim-scripts/VimClojure

  [9]   GNU General Public License, version 2
        http://www.opensource.org/licenses/GPL-2.0

  [10]  Eclipse Public License, version 1
        http://www.opensource.org/licenses/EPL-1.0
                                                                  }}}1

--

vim: set tw=70 sw=2 sts=2 et fdm=marker :