koneko (hackage):   [Index] [Quick Jump]  Package maintainers  For package maintainers and hackage trustees  Candidates               koneko - a concatenative not-quite-lisp for kittens   → Description, → Whirlwind Tour, → Language Reference, → More Examples, → Doctests;  → Installing, → Running, → (Build) Requirements, → Specs & Docs, → Vim Syntax Highlighting;  → TODO, → License  NB: work in progress.  Koneko (子猫 -- "kitten" in Japanese) is a simple functional concatenative stack-based programming language with Lisp (& Haskell) influences.  It is intended to combine the elegance of the (point-free) "concatenation is composition" model with the elegance of Lisp-like languages.  → Try koneko in your browser with the JavaScript REPL.  NB: use whitespace to separate tokens since "special" characters like + and ( are not delimiters but valid parts of identifiers.  Details: → Language Features, → Ident(ifiers) & Quoting  NB: all data types are immutable.  NB: nil and #f are falsy, everything else is truthy.  Details: → Primitive Data Types, → Pairs, Lists & Dicts, → Records  NB: since purely concatenative programs contain no free variables, almost any "subexpression" can be "factored out" simply by giving it a name.  Details: → Functions, → Multi(method)s  Details: → Primitives, Builtins & Prelude, → Prelude: Syntax Highlighted Source, → Prelude: Function Index  Details: → Syntactic Sugar  → 01: Language Features,  → 02: Ident(ifiers) & Quoting,  → 03: Primitive Data Types,  → 04: Pairs, Lists & Dicts,  → 05: Functions,  → 06: Multi(method)s,  → 07: Records,  → 08: Syntactic Sugar,  → 09: Primitives, Builtins & Prelude,  → 10: Standard Library,  → 11: Possible Future Extensions  → Syntax Highlighted Source, → Function Index  → More Examples  Like Python (& Haskell), koneko supports "doctests": executable pieces of documentation that look like interactive REPL sessions.  Doctests make it easy to write user tutorials, documentation, and regression tests at the same time and confirm that examples in documentation are correct and up to date.  NB: this README, the Language Reference, and koneko's Prelude & Standard Library are full of doctests.  Lets look at an example, mylib.knk:  We run koneko with the --doctest option (in this case also with -v for verbosity) to execute the tests in a koneko -- or markdown -- file:  NB: for :mylib use to be able to load the mylib.knk file we need to add the current directory to KONEKOPATH.  See (Build) Requirements.  ... TODO ...  ... TODO ...  The Haskell implementation requires the Haskell Platform (and a few additional libraries that the Cabal build system provided with the Platform can install); see koneko.cabal for the dependencies.  The JavaScript implementation requires Node.js.  TODO: haddock    (i.e. lib/*.knk)  
Keywords: compilers-interpreters|gpl|library|program|concatenative|functional-programming|language|lisp|programming-language|stack|work-in-progress