jackhill/mal.git
8 years agoDon't pass an env to apply
Stephen Thirlwall [Mon, 14 Dec 2015 07:06:50 +0000 (18:06 +1100)]
Don't pass an env to apply

Due to some initial confusion about which env to pass to the eval
builtin, I'd been needlessly passing an env to apply all along.

No need.

8 years agoImplement native swap! function
Stephen Thirlwall [Mon, 14 Dec 2015 06:40:55 +0000 (17:40 +1100)]
Implement native swap! function

8 years agoMerge pull request #129 from dubek/examples-memoize
Joel Martin [Thu, 10 Dec 2015 18:39:42 +0000 (12:39 -0600)]
Merge pull request #129 from dubek/examples-memoize

examples: add memoize.mal as a usage example for atoms

8 years agoexamples: add memoize.mal as a usage example for atoms
Dov Murik [Thu, 10 Dec 2015 17:50:36 +0000 (12:50 -0500)]
examples: add memoize.mal as a usage example for atoms

8 years agoMerge pull request #128 from sleep/actual-zsh-fix
Joel Martin [Wed, 9 Dec 2015 21:27:41 +0000 (15:27 -0600)]
Merge pull request #128 from sleep/actual-zsh-fix

quoted all make args in documentation for zsh compatibility

8 years agoquoted all make args in documentation for zsh compatibility
Sean Lee [Wed, 9 Dec 2015 19:49:15 +0000 (14:49 -0500)]
quoted all make args in documentation for zsh compatibility

8 years agoMerge pull request #127 from dubek/fix-nim-tokenizer-oom
Joel Martin [Fri, 4 Dec 2015 22:44:10 +0000 (16:44 -0600)]
Merge pull request #127 from dubek/fix-nim-tokenizer-oom

nim: fix tokenizer endless loop (and out-of-memory) on bad input

8 years agonim: fix tokenizer endless loop (and out-of-memory) on bad input
Dov Murik [Fri, 4 Dec 2015 20:35:39 +0000 (15:35 -0500)]
nim: fix tokenizer endless loop (and out-of-memory) on bad input

The input string `(prn "abc` caused the nim implementaion (from step1
onwards) to enter an endless loop in tokenize (which eventually caused
out-of-memory).

The fix verfies that indeed the regex matches a non-empty substring
before adding that substring as a token.

8 years agoHaskell: fix simple vector equality. Add test.
Joel Martin [Thu, 3 Dec 2015 22:27:47 +0000 (16:27 -0600)]
Haskell: fix simple vector equality. Add test.

- Was missing vector to vector equality but never noticed because test
  was missing.
- Related to #123

8 years agoBash, PHP: fix nested hash-map equality.
Joel Martin [Thu, 3 Dec 2015 22:19:22 +0000 (16:19 -0600)]
Bash, PHP: fix nested hash-map equality.

8 years agoScala: fix hash-map nil values and printing.
Joel Martin [Thu, 3 Dec 2015 05:26:50 +0000 (23:26 -0600)]
Scala: fix hash-map nil values and printing.

8 years agoTravis: add D implementation.
Joel Martin [Wed, 2 Dec 2015 22:06:17 +0000 (16:06 -0600)]
Travis: add D implementation.

8 years agoMerge pull request #125 from dubek/d-impl
Joel Martin [Wed, 2 Dec 2015 21:18:49 +0000 (15:18 -0600)]
Merge pull request #125 from dubek/d-impl

D implementation

8 years agoD implementation
Dov Murik [Tue, 17 Nov 2015 03:17:13 +0000 (22:17 -0500)]
D implementation

8 years agotests: add tests for nil hashmap values
Dov Murik [Wed, 2 Dec 2015 18:12:56 +0000 (13:12 -0500)]
tests: add tests for nil hashmap values

8 years agoScala: fix nested sequence/hash-map equality.
Joel Martin [Wed, 2 Dec 2015 17:17:54 +0000 (11:17 -0600)]
Scala: fix nested sequence/hash-map equality.

Related to #123

8 years agoTests: add nested hash-map tests.
Joel Martin [Wed, 2 Dec 2015 17:16:09 +0000 (11:16 -0600)]
Tests: add nested hash-map tests.

8 years agoJulia: fix nested sequence equality.
Joel Martin [Wed, 2 Dec 2015 16:57:32 +0000 (10:57 -0600)]
Julia: fix nested sequence equality.

8 years agoMerge pull request #124 from dubek/fix-guile-hash-list-equality
Joel Martin [Mon, 30 Nov 2015 21:09:17 +0000 (16:09 -0500)]
Merge pull request #124 from dubek/fix-guile-hash-list-equality

guile: fix equality of hash-maps and lists/vectors

8 years agoguile: fix equality of hash-maps and lists/vectors
Dov Murik [Mon, 30 Nov 2015 20:00:10 +0000 (15:00 -0500)]
guile: fix equality of hash-maps and lists/vectors

As part of #116 and #123

8 years agoMatlab: fix hash-map equality and keywords.
Joel Martin [Mon, 30 Nov 2015 20:09:38 +0000 (14:09 -0600)]
Matlab: fix hash-map equality and keywords.

- hash-map equality is related to #161.

8 years agoR: add native hash-map equality
Joel Martin [Mon, 30 Nov 2015 19:06:53 +0000 (14:06 -0500)]
R: add native hash-map equality

- part of #116

8 years agoMerge pull request #122 from dubek/nested-vector-list-tests
Joel Martin [Mon, 30 Nov 2015 18:53:26 +0000 (13:53 -0500)]
Merge pull request #122 from dubek/nested-vector-list-tests

tests: add soft tests for nested vector/list equality in step 4

8 years agotests: add soft tests for nested vector/list equality in step 4
Dov Murik [Mon, 30 Nov 2015 15:35:14 +0000 (10:35 -0500)]
tests: add soft tests for nested vector/list equality in step 4

8 years agoTravis: fix docker use with matrix.
Joel Martin [Tue, 24 Nov 2015 16:06:05 +0000 (11:06 -0500)]
Travis: fix docker use with matrix.

- Move the service: [docker] into each matrix item instead of
  top-level.

8 years agoTravis: test without language setting.
Joel Martin [Tue, 24 Nov 2015 03:13:50 +0000 (22:13 -0500)]
Travis: test without language setting.

8 years agoTravis: fix global language to "node_js"
Joel Martin [Tue, 24 Nov 2015 02:58:25 +0000 (21:58 -0500)]
Travis: fix global language to "node_js"

8 years agonim: update Dockerfile to use version 0.12
Joel Martin [Mon, 23 Nov 2015 20:48:56 +0000 (15:48 -0500)]
nim: update Dockerfile to use version 0.12

8 years agoMerge pull request #120 from def-/master
Joel Martin [Mon, 23 Nov 2015 19:32:29 +0000 (14:32 -0500)]
Merge pull request #120 from def-/master

Nim fixes

8 years agoMerge pull request #121 from dubek/lua-time-ms
Joel Martin [Mon, 23 Nov 2015 19:10:01 +0000 (14:10 -0500)]
Merge pull request #121 from dubek/lua-time-ms

lua: fix time-ms to return actual millisecond resolution timestamp

8 years agoMerge pull request #119 from dubek/racket-fix-hash-equality
Joel Martin [Mon, 23 Nov 2015 19:02:22 +0000 (14:02 -0500)]
Merge pull request #119 from dubek/racket-fix-hash-equality

racket: fix hash-map equality

8 years agoMerge pull request #118 from dubek/ocaml-fix-hash-equality
Joel Martin [Mon, 23 Nov 2015 19:01:57 +0000 (14:01 -0500)]
Merge pull request #118 from dubek/ocaml-fix-hash-equality

ocaml: fix hash equality

8 years agolua: fix time-ms to return actual millisecond resolution timestamp
Dov Murik [Mon, 23 Nov 2015 16:41:54 +0000 (11:41 -0500)]
lua: fix time-ms to return actual millisecond resolution timestamp

8 years agoNim: Fix hash map behaviour when key is not in it
def [Mon, 23 Nov 2015 14:41:23 +0000 (15:41 +0100)]
Nim: Fix hash map behaviour when key is not in it

8 years agoNim: Add sequtils import for map proc
def [Mon, 23 Nov 2015 14:40:56 +0000 (15:40 +0100)]
Nim: Add sequtils import for map proc

8 years agoracket: fix hash-map equality
Dov Murik [Sun, 22 Nov 2015 04:57:47 +0000 (23:57 -0500)]
racket: fix hash-map equality

8 years agoocaml: fix hash equality
Dov Murik [Sun, 22 Nov 2015 04:00:56 +0000 (23:00 -0500)]
ocaml: fix hash equality

8 years agoVB: fix hash-map equality.
Joel Martin [Thu, 19 Nov 2015 05:56:54 +0000 (23:56 -0600)]
VB: fix hash-map equality.

8 years agomake: fix comparison of empty hash-maps.
Joel Martin [Thu, 19 Nov 2015 04:58:27 +0000 (22:58 -0600)]
make: fix comparison of empty hash-maps.

Again, combine checks onto a single line to prevent newline/whitespace
breakage in the check.

8 years agomake: fix list comparison
Joel Martin [Thu, 19 Nov 2015 03:53:09 +0000 (21:53 -0600)]
make: fix list comparison

Multiline check introduces bug in certain sequential comparisons.
So make it one line :-(

8 years agoMerge pull request #117 from ivern/kotlin
Joel Martin [Thu, 19 Nov 2015 03:50:25 +0000 (21:50 -0600)]
Merge pull request #117 from ivern/kotlin

Upgraded Kotlin to a newer beta, solved new deprecation warnings

8 years agoperl: fix keys on hash-map in perl 5.20
Joel Martin [Thu, 19 Nov 2015 03:44:58 +0000 (21:44 -0600)]
perl: fix keys on hash-map in perl 5.20

Otherwise throw error "keys on reference is experimental".

8 years agoMerge remote-tracking branch 'kanaka/master' into kotlin
Javier Fernandez-Ivern [Thu, 19 Nov 2015 02:26:25 +0000 (20:26 -0600)]
Merge remote-tracking branch 'kanaka/master' into kotlin

8 years agoUpdated kotlinc version in the Dockerfile
Javier Fernandez-Ivern [Wed, 18 Nov 2015 23:15:19 +0000 (17:15 -0600)]
Updated kotlinc version in the Dockerfile

8 years agoMerge branch 'kotlin' of https://github.com/ivern/mal into kotlin
Javier Fernandez-Ivern [Wed, 18 Nov 2015 23:14:01 +0000 (17:14 -0600)]
Merge branch 'kotlin' of https://github.com/ivern/mal into kotlin

8 years agoRemoved unnecessary casts now that Kotlin compiler bug is fixed
Javier Fernandez-Ivern [Wed, 18 Nov 2015 23:13:43 +0000 (17:13 -0600)]
Removed unnecessary casts now that Kotlin compiler bug is fixed

8 years agoUpgraded to Kotlin 1.0.0-beta-2423, fixed new deprecation warnings
Javier Fernandez-Ivern [Wed, 18 Nov 2015 23:04:35 +0000 (17:04 -0600)]
Upgraded to Kotlin 1.0.0-beta-2423, fixed new deprecation warnings

8 years agoMakefile: fix recursive make of compiled impls.
Joel Martin [Wed, 18 Nov 2015 22:32:53 +0000 (16:32 -0600)]
Makefile: fix recursive make of compiled impls.

Should fix #105

8 years agominiMAL, perl: add native hash-map equality.
Joel Martin [Wed, 18 Nov 2015 21:39:46 +0000 (15:39 -0600)]
miniMAL, perl: add native hash-map equality.

8 years agoMerge pull request #115 from dubek/fix-ps-hash-equal
Joel Martin [Wed, 18 Nov 2015 16:12:52 +0000 (10:12 -0600)]
Merge pull request #115 from dubek/fix-ps-hash-equal

ps: Fix hash equal

8 years agops: fix hash-map equality
Dov Murik [Fri, 13 Nov 2015 18:03:32 +0000 (13:03 -0500)]
ps: fix hash-map equality

* extract _keys and _hash_map_get to types.ps
* correct sequential types equals - only compare if *both* arguments are
  sequential
* implement equality for two hash-maps

8 years agotests: add more hash equality test cases in step 9
Dov Murik [Fri, 13 Nov 2015 17:47:40 +0000 (12:47 -0500)]
tests: add more hash equality test cases in step 9

8 years agoMerge pull request #114 from dubek/equality-pure-mal
Joel Martin [Tue, 17 Nov 2015 22:32:40 +0000 (16:32 -0600)]
Merge pull request #114 from dubek/equality-pure-mal

add examples/equality.mal

8 years agoadd examples/eqaulity.mal
Dov Murik [Tue, 17 Nov 2015 19:41:06 +0000 (14:41 -0500)]
add examples/eqaulity.mal

Implementations that don't have proper native comparison of hash-maps
and sequences can load examples/equality.mal for a pure-mal
implementation.

8 years agohash-map equality: bash, c, coffee, cs, es6, ...
Joel Martin [Tue, 17 Nov 2015 05:28:58 +0000 (23:28 -0600)]
hash-map equality: bash, c, coffee, cs, es6, ...

- hash-map equality support for bash, c, coffee, cs, es6, java, js,
  julia, make, php.
- also, add another test to catch another hash-map in-equality: same
  keys, different values

8 years agoexamples/: add chouser's protocols.mal file.
Joel Martin [Thu, 12 Nov 2015 23:03:17 +0000 (17:03 -0600)]
examples/: add chouser's protocols.mal file.

Originally from: https://gist.github.com/Chouser/6081ea66d144d13e56fc

8 years agoMove mal code examples from mal/ to examples/
Joel Martin [Thu, 12 Nov 2015 23:00:55 +0000 (17:00 -0600)]
Move mal code examples from mal/ to examples/

8 years agoMerge pull request #111 from dubek/fix-go-hash-equality
Joel Martin [Thu, 12 Nov 2015 15:29:58 +0000 (09:29 -0600)]
Merge pull request #111 from dubek/fix-go-hash-equality

go: fix hash equality

8 years agogo: fix hash-map equality
Dov Murik [Thu, 12 Nov 2015 15:11:34 +0000 (10:11 -0500)]
go: fix hash-map equality

8 years agoMerge pull request #109 from dubek/lua-fix-hash-map-equal
Joel Martin [Wed, 11 Nov 2015 02:52:51 +0000 (20:52 -0600)]
Merge pull request #109 from dubek/lua-fix-hash-map-equal

lua: fix hash-map equality

8 years agoMerge pull request #108 from dubek/tcl-impl
Joel Martin [Tue, 10 Nov 2015 19:28:47 +0000 (13:28 -0600)]
Merge pull request #108 from dubek/tcl-impl

tcl: add --raw flag to allow running without Readline

8 years agolua: fix hash-map equality
Dov Murik [Tue, 10 Nov 2015 19:03:26 +0000 (14:03 -0500)]
lua: fix hash-map equality

8 years agotcl: add --raw flag to allow running without Readline
Dov Murik [Tue, 10 Nov 2015 18:11:49 +0000 (13:11 -0500)]
tcl: add --raw flag to allow running without Readline

The Readline library for Tcl (tclreadline) enables history
substitutions, which means that lines that begin with `^` or `!` are
preprocessed by readline.  This interferes with some step1 tests of the
`^` form (--> with-meta).

Now the Tcl implementation supports a `--raw` command line flag which
disables the readline library and opts for simple input from stdin. The
tests (Makefile) are run with `--raw`.

8 years agoFix hash-map equality in python and rpython.
Joel Martin [Tue, 10 Nov 2015 17:00:56 +0000 (11:00 -0600)]
Fix hash-map equality in python and rpython.

8 years agoMerge pull request #104 from dubek/hashmap-equality-test
Joel Martin [Tue, 10 Nov 2015 15:56:19 +0000 (09:56 -0600)]
Merge pull request #104 from dubek/hashmap-equality-test

tests: step9: add hash-map equality tests

8 years agoTravis: add Tcl
Joel Martin [Tue, 10 Nov 2015 04:53:30 +0000 (22:53 -0600)]
Travis: add Tcl

8 years agoMerge pull request #106 from dubek/tcl-impl
Joel Martin [Tue, 10 Nov 2015 04:19:18 +0000 (22:19 -0600)]
Merge pull request #106 from dubek/tcl-impl

Tcl implementation

8 years agotests: step9: add hash-map equality tests (as soft tests)
Dov Murik [Mon, 9 Nov 2015 21:13:45 +0000 (16:13 -0500)]
tests: step9: add hash-map equality tests (as soft tests)

8 years agoruntest/travis: make soft mode the default.
Joel Martin [Tue, 10 Nov 2015 03:16:38 +0000 (21:16 -0600)]
runtest/travis: make soft mode the default.

Switch runtest.py option to --hard instead of --soft. This changes
tests marked as soft into a hard fail tests.

8 years agoTcl implementation
Dov Murik [Thu, 9 Jul 2015 15:14:16 +0000 (11:14 -0400)]
Tcl implementation

8 years agoMisc cleanup for midwest.io presentation.
Joel Martin [Sat, 7 Nov 2015 21:19:44 +0000 (15:19 -0600)]
Misc cleanup for midwest.io presentation.

8 years agoMerge pull request #102 from nlfiedler/fix-escapes
Joel Martin [Fri, 6 Nov 2015 20:31:21 +0000 (12:31 -0800)]
Merge pull request #102 from nlfiedler/fix-escapes

Fix reading/printing of escaped characters

8 years agoFix reading/printing of escaped characters
Nathan Fiedler [Fri, 6 Nov 2015 19:19:06 +0000 (11:19 -0800)]
Fix reading/printing of escaped characters

Properly read \\n and convert to a newline, and when printing with
readability enabled, convert the newline back to \\n.

Add support for Erlang R18, which was nothing more than tweaking the
requirements in the rebar.config file.

Fixes #100

make test^erlang passes

8 years agoMerge pull request #101 from ivern/kotlin
Joel Martin [Wed, 4 Nov 2015 16:59:45 +0000 (08:59 -0800)]
Merge pull request #101 from ivern/kotlin

Kotlin refactoring (more idiomatic)

8 years agoCleaned up usage of ISeq.count()
Javier Fernandez-Ivern [Wed, 4 Nov 2015 14:54:54 +0000 (08:54 -0600)]
Cleaned up usage of ISeq.count()

8 years agoBumped Kotlin version in the Dockerfile
Javier Fernandez-Ivern [Wed, 4 Nov 2015 14:43:23 +0000 (08:43 -0600)]
Bumped Kotlin version in the Dockerfile

8 years agoKotlin eval refactoring to make it more idiomatic
Javier Fernandez-Ivern [Wed, 4 Nov 2015 04:45:07 +0000 (22:45 -0600)]
Kotlin eval refactoring to make it more idiomatic

8 years agoKotlin dispatch refactoring to make it more idiomatic
Javier Fernandez-Ivern [Wed, 4 Nov 2015 04:36:24 +0000 (22:36 -0600)]
Kotlin dispatch refactoring to make it more idiomatic

8 years agoawk: generate awk.sh. Update docs/TODO.
Joel Martin [Sat, 31 Oct 2015 03:30:56 +0000 (22:30 -0500)]
awk: generate awk.sh. Update docs/TODO.

8 years agoruntest: split debug/log file. Test stats.
Joel Martin [Sat, 31 Oct 2015 03:23:19 +0000 (22:23 -0500)]
runtest: split debug/log file. Test stats.

8 years agoAll: fix read/print of \\, and \n
Joel Martin [Sat, 31 Oct 2015 03:05:49 +0000 (22:05 -0500)]
All: fix read/print of \\, and \n

8 years agoAll: don't ignore */mal. Fixes #99
Joel Martin [Fri, 30 Oct 2015 14:31:38 +0000 (09:31 -0500)]
All: don't ignore */mal. Fixes #99

8 years agoMerge pull request #98 from mrjbq7/factor
Joel Martin [Thu, 29 Oct 2015 17:14:18 +0000 (12:14 -0500)]
Merge pull request #98 from mrjbq7/factor

Factor updates

8 years agofactor: adding some unit tests.
John Benediktsson [Thu, 29 Oct 2015 16:02:44 +0000 (09:02 -0700)]
factor: adding some unit tests.

8 years agofactor: partial fix for with-meta.
John Benediktsson [Thu, 29 Oct 2015 16:02:32 +0000 (09:02 -0700)]
factor: partial fix for with-meta.

8 years agofactor: update FACTOR_ROOTS in Makefile.
John Benediktsson [Thu, 29 Oct 2015 15:27:24 +0000 (08:27 -0700)]
factor: update FACTOR_ROOTS in Makefile.

8 years agofactor: update code.
John Benediktsson [Wed, 28 Oct 2015 23:16:43 +0000 (16:16 -0700)]
factor: update code.

* Works on soon-to-be-released 0.98 (triple quote strings removed)
* 50% more iterations per second on perf3.mal
* Removed 'src' directory, use 'factor' as the root
* Using 'mal' namespace for core, reader, printer, malenv, types
* Fixed issue with "empty" readline input (should be ignored and wasn't)
* Tried to simplify some of the code

8 years agostep5 test: group related test code together.
Joel Martin [Tue, 27 Oct 2015 20:33:53 +0000 (15:33 -0500)]
step5 test: group related test code together.

8 years agoMerge pull request #97 from ivern/kotlin
Joel Martin [Tue, 27 Oct 2015 20:33:05 +0000 (15:33 -0500)]
Merge pull request #97 from ivern/kotlin

Added TCO test for mutually recursive functions

8 years agoReduced the mutually recursive function test size
Javier Fernandez-Ivern [Tue, 27 Oct 2015 20:05:40 +0000 (15:05 -0500)]
Reduced the mutually recursive function test size

8 years agoAdded TCO test for mutually recursive functions
Javier Fernandez-Ivern [Tue, 27 Oct 2015 18:17:56 +0000 (13:17 -0500)]
Added TCO test for mutually recursive functions

8 years agovimscript: fix atom? to return boolean not integer.
Joel Martin [Tue, 27 Oct 2015 17:03:40 +0000 (12:03 -0500)]
vimscript: fix atom? to return boolean not integer.

8 years agoMerge pull request #96 from ivern/kotlin
Joel Martin [Tue, 27 Oct 2015 17:02:34 +0000 (12:02 -0500)]
Merge pull request #96 from ivern/kotlin

Kotlin step cleanup

8 years agoCleaned up some boilerplate code in core
Javier Fernandez-Ivern [Tue, 27 Oct 2015 14:57:10 +0000 (09:57 -0500)]
Cleaned up some boilerplate code in core

8 years agoTravis: add kotlin.
Joel Martin [Tue, 27 Oct 2015 05:11:06 +0000 (00:11 -0500)]
Travis: add kotlin.

8 years agoMerge remote-tracking branch 'kanaka/master' into kotlin
Javier Fernandez-Ivern [Tue, 27 Oct 2015 05:01:54 +0000 (00:01 -0500)]
Merge remote-tracking branch 'kanaka/master' into kotlin

8 years agoMerge remote-tracking branch 'kanaka/master' into kotlin
Javier Fernandez-Ivern [Tue, 27 Oct 2015 05:01:38 +0000 (00:01 -0500)]
Merge remote-tracking branch 'kanaka/master' into kotlin

8 years agoKotlin: minor change to re-use layers from Java image.
Joel Martin [Tue, 27 Oct 2015 05:00:12 +0000 (00:00 -0500)]
Kotlin: minor change to re-use layers from Java image.

8 years agoStep cleanup
Javier Fernandez-Ivern [Tue, 27 Oct 2015 04:59:04 +0000 (23:59 -0500)]
Step cleanup

8 years agoMerge pull request #95 from ivern/kotlin
Joel Martin [Tue, 27 Oct 2015 04:57:38 +0000 (23:57 -0500)]
Merge pull request #95 from ivern/kotlin

Kotlin