jackhill/mal.git
9 years agostep7: Streamlined pattern matching with some active patterns.
Peter Stephens [Mon, 20 Apr 2015 02:13:23 +0000 (21:13 -0500)]
step7: Streamlined pattern matching with some active patterns.

9 years agofsharp: step7: Streamlined concat. Vectors are now array segments, so more efficient...
Peter Stephens [Thu, 9 Apr 2015 01:29:30 +0000 (20:29 -0500)]
fsharp: step7: Streamlined concat. Vectors are now array segments, so more efficient slicing.

9 years agofsharp: step7: Added quoting. Need to clean up quasiquote and concat.
Peter Stephens [Wed, 8 Apr 2015 03:14:00 +0000 (22:14 -0500)]
fsharp: step7: Added quoting. Need to clean up quasiquote and concat.

9 years agofsharp: step6: Added eval & file io.
Peter Stephens [Sun, 5 Apr 2015 05:20:42 +0000 (00:20 -0500)]
fsharp: step6: Added eval & file io.

9 years agoMerge branch 'fsharp' of https://github.com/pstephens/mal into fsharp
Peter Stephens [Sun, 5 Apr 2015 03:01:31 +0000 (22:01 -0500)]
Merge branch 'fsharp' of https://github.com/pstephens/mal into fsharp

9 years agofsharp: step5: Added tail call optimization.
Peter Stephens [Sun, 5 Apr 2015 03:01:05 +0000 (22:01 -0500)]
fsharp: step5: Added tail call optimization.

9 years agofsharp: tweaked the count function
Peter Stephens [Thu, 2 Apr 2015 21:50:34 +0000 (16:50 -0500)]
fsharp: tweaked the count function

9 years agoMerge branch 'master' of https://github.com/kanaka/mal into fsharp
Peter Stephens [Fri, 27 Mar 2015 09:31:38 +0000 (04:31 -0500)]
Merge branch 'master' of https://github.com/kanaka/mal into fsharp

Conflicts:
Makefile

9 years agoREADME: update with Julia.
Joel Martin [Wed, 1 Apr 2015 14:47:29 +0000 (09:47 -0500)]
README: update with Julia.

9 years agoJulia: missed Makefile for stats.
Joel Martin [Wed, 1 Apr 2015 04:12:25 +0000 (23:12 -0500)]
Julia: missed Makefile for stats.

9 years agoJulia: self-hosting.
Joel Martin [Wed, 1 Apr 2015 03:42:42 +0000 (22:42 -0500)]
Julia: self-hosting.

- fix meta and swap! functions and add missing tests
- fix eval_ast of hash-maps across all steps

9 years agoJulia: add Dockerfile dependencies.
Joel Martin [Wed, 1 Apr 2015 03:41:47 +0000 (22:41 -0500)]
Julia: add Dockerfile dependencies.

9 years agoJulia: step A. Add atoms and metadata.
Joel Martin [Wed, 1 Apr 2015 03:17:47 +0000 (22:17 -0500)]
Julia: step A. Add atoms and metadata.

- Refactor readline (not editline yet) into readline_mod.
- Ignore comments properly

9 years agoJulia: Step 9, hash maps and keywords.
Joel Martin [Wed, 1 Apr 2015 02:23:22 +0000 (21:23 -0500)]
Julia: Step 9, hash maps and keywords.

9 years agoJulia: step 8
Joel Martin [Sun, 29 Mar 2015 22:55:11 +0000 (17:55 -0500)]
Julia: step 8

9 years agoJulia: step7.
Joel Martin [Sun, 29 Mar 2015 21:42:15 +0000 (16:42 -0500)]
Julia: step7.

- Also fix list core function.

9 years agoJulia: step6
Joel Martin [Sun, 29 Mar 2015 21:01:02 +0000 (16:01 -0500)]
Julia: step6

9 years agoJulia: step5
Joel Martin [Sun, 29 Mar 2015 20:51:54 +0000 (15:51 -0500)]
Julia: step5

9 years agoJulia: step4
Joel Martin [Sun, 29 Mar 2015 20:38:05 +0000 (15:38 -0500)]
Julia: step4

9 years agoJulia: step3
Joel Martin [Sun, 29 Mar 2015 20:00:27 +0000 (15:00 -0500)]
Julia: step3

9 years agoJulia: add step2.
Joel Martin [Sun, 29 Mar 2015 19:33:57 +0000 (14:33 -0500)]
Julia: add step2.

9 years agoJulia: step 1 basics.
Joel Martin [Sat, 28 Mar 2015 22:44:31 +0000 (17:44 -0500)]
Julia: step 1 basics.

9 years agoJulia: step0
Joel Martin [Sat, 28 Mar 2015 20:10:32 +0000 (15:10 -0500)]
Julia: step0

9 years agoMerge pull request #52 from def-/nim
Joel Martin [Sun, 29 Mar 2015 02:09:55 +0000 (21:09 -0500)]
Merge pull request #52 from def-/nim

Adapt to new Nim devel compiler

9 years agoAdapt to new Nim devel compiler
def [Sun, 29 Mar 2015 01:07:10 +0000 (03:07 +0200)]
Adapt to new Nim devel compiler

9 years agoFAQ: clarify about competing/overlapping implementations.
Joel Martin [Sat, 28 Mar 2015 17:11:44 +0000 (12:11 -0500)]
FAQ: clarify about competing/overlapping implementations.

9 years agoC++: add Makefile stats targets.
Joel Martin [Sat, 28 Mar 2015 16:53:30 +0000 (11:53 -0500)]
C++: add Makefile stats targets.

9 years agoREADME: add names/links of implementation creators.
Joel Martin [Sat, 28 Mar 2015 16:48:11 +0000 (11:48 -0500)]
README: add names/links of implementation creators.

9 years agoREADME: add C++ instructions and bump count to 29.
Joel Martin [Sat, 28 Mar 2015 16:41:16 +0000 (11:41 -0500)]
README: add C++ instructions and bump count to 29.

9 years agoMerge pull request #50 from sdt/cpp
Joel Martin [Sat, 28 Mar 2015 16:26:49 +0000 (11:26 -0500)]
Merge pull request #50 from sdt/cpp

C++ implementation

9 years agoSplit ASSERT into ASSERT and MAL_CHECK/MAL_FAIL
Stephen Thirlwall [Sat, 28 Mar 2015 11:54:26 +0000 (22:54 +1100)]
Split ASSERT into ASSERT and MAL_CHECK/MAL_FAIL

* ASSERT is to check for internal errors
* MAL_CHECK / MAL_FAIL is to check mal code errors

9 years agoFix bugs introduced in reader hash-map/{} change
Stephen Thirlwall [Sat, 28 Mar 2015 05:22:26 +0000 (16:22 +1100)]
Fix bugs introduced in reader hash-map/{} change

Only apparent in double-self-hosting mode.

eg. ../cpp/stepA_mal ./stepA_mal.mal ./stepA_mal.mal

Throws an error that MACROEXPAND is not defined.

TODO: figure out why modifying he hash in-place doesn't work.

9 years agoFix *host-language*
Stephen Thirlwall [Sat, 28 Mar 2015 04:41:19 +0000 (15:41 +1100)]
Fix *host-language*

9 years agoExclude cpp from test step 5
Stephen Thirlwall [Sat, 28 Mar 2015 04:26:07 +0000 (15:26 +1100)]
Exclude cpp from test step 5

Completes at 10,000 (bus error at 20,000)

9 years agoRevert { X } -> ( hash-map X ) reader macro
Stephen Thirlwall [Sat, 28 Mar 2015 04:08:25 +0000 (15:08 +1100)]
Revert { X } -> ( hash-map X ) reader macro

The macro breaks the step 2 tests.

9 years agoReplace table iterations with new for-loop syntax
Stephen Thirlwall [Sat, 28 Mar 2015 01:22:01 +0000 (12:22 +1100)]
Replace table iterations with new for-loop syntax

Didn't even know this existed!

9 years agoAdd C++ packages to tests/docker/Dockerfile
Stephen Thirlwall [Sat, 28 Mar 2015 01:22:29 +0000 (12:22 +1100)]
Add C++ packages to tests/docker/Dockerfile

Thought I'd already done this. Must've got lost in all the rebasing...

9 years agoUse g++-4.9 instead of clang-3.5 on Linux
Stephen Thirlwall [Sat, 28 Mar 2015 01:17:25 +0000 (12:17 +1100)]
Use g++-4.9 instead of clang-3.5 on Linux

Using the linker fix from @kanaka

9 years agoFix Reader issues on Linux
Stephen Thirlwall [Sat, 28 Mar 2015 00:47:00 +0000 (11:47 +1100)]
Fix Reader issues on Linux

* use regex_search rather than regex_iterator

* use multiple individual whitespace and token regexes,
  rather than one giant regex

This appears to work on 14.10 and 15.04

9 years agoAdd README.md
Stephen Thirlwall [Fri, 27 Mar 2015 09:38:18 +0000 (20:38 +1100)]
Add README.md

9 years agoc++11: step A
Stephen Thirlwall [Fri, 27 Mar 2015 06:24:20 +0000 (17:24 +1100)]
c++11: step A

9 years agoc++11: step 9
Stephen Thirlwall [Fri, 27 Mar 2015 05:38:23 +0000 (16:38 +1100)]
c++11: step 9

9 years agoc++11: step 8
Stephen Thirlwall [Fri, 27 Mar 2015 05:35:47 +0000 (16:35 +1100)]
c++11: step 8

9 years agoc++11: step 7
Stephen Thirlwall [Fri, 27 Mar 2015 05:19:02 +0000 (16:19 +1100)]
c++11: step 7

9 years agoc++11: step 6
Stephen Thirlwall [Fri, 27 Mar 2015 05:07:46 +0000 (16:07 +1100)]
c++11: step 6

9 years agoc++11: step 5
Stephen Thirlwall [Fri, 27 Mar 2015 03:00:46 +0000 (14:00 +1100)]
c++11: step 5

9 years agoc++11: step 4
Stephen Thirlwall [Fri, 27 Mar 2015 01:52:07 +0000 (12:52 +1100)]
c++11: step 4

9 years agoc++11: step 3
Stephen Thirlwall [Fri, 27 Mar 2015 00:03:28 +0000 (11:03 +1100)]
c++11: step 3

9 years agoc++11: step 2
Stephen Thirlwall [Thu, 26 Mar 2015 22:04:35 +0000 (09:04 +1100)]
c++11: step 2

Note that the optional tests for step 1 now fail because I no longer create a
hash directly in the reader, rather handle this as a reader macro:

    { LIST } -> ( hash-map LIST )

This way, once the constructor has built the hash-map, the hash is now evaluated,
and its evaluation procedure is a no-op.

I'd like to do the same with vectors, but this isn't so easy, as we use vectors
as parameter lists in fn* later on.

ie. we'd have this situation, which is incorrect (and I don't see an obvious workaround)

    (fn* [params] body) -> (fn* (vector params) body)

9 years agoc++11: step 1
Stephen Thirlwall [Thu, 26 Mar 2015 11:25:50 +0000 (22:25 +1100)]
c++11: step 1

9 years agoc++11: step 0
Stephen Thirlwall [Thu, 26 Mar 2015 11:08:35 +0000 (22:08 +1100)]
c++11: step 0

9 years agofsharp: step 4: Added fn* binding and not function.
Peter Stephens [Fri, 27 Mar 2015 09:21:56 +0000 (04:21 -0500)]
fsharp: step 4: Added fn* binding and not function.

9 years agofsharp: step 4: Updated equality, comparison, and hashing semantics to kind of match...
Peter Stephens [Fri, 27 Mar 2015 06:26:20 +0000 (01:26 -0500)]
fsharp: step 4: Updated equality, comparison, and hashing semantics to kind of match Mal. Specifically [1 2] = (list 1 2)

9 years agofsharp: step 4: Added prn, str, println, and pr-str
Peter Stephens [Thu, 26 Mar 2015 19:05:02 +0000 (14:05 -0500)]
fsharp: step 4: Added prn, str, println, and pr-str

9 years agofsharp: step 4: Added list and comparison functions.
Peter Stephens [Thu, 26 Mar 2015 05:17:46 +0000 (00:17 -0500)]
fsharp: step 4: Added list and comparison functions.

9 years agoguide: most of step 9 and start step A.
Joel Martin [Thu, 26 Mar 2015 02:53:53 +0000 (20:53 -0600)]
guide: most of step 9 and start step A.

9 years agoSwift: lang cnt to 28, note XCode, skip in docker.
Joel Martin [Tue, 24 Mar 2015 15:29:53 +0000 (09:29 -0600)]
Swift: lang cnt to 28, note XCode, skip in docker.

- Update the README to 28 languages.
- Note that Swift impl currently requires XCode/OS X :-(
- Add Swift to skip list in Dockerfile.

9 years agoMerge pull request #49 from keith-rollin/swift
Joel Martin [Tue, 24 Mar 2015 15:23:47 +0000 (09:23 -0600)]
Merge pull request #49 from keith-rollin/swift

Initial Swift implementation.

9 years agoguide: step9 core functions.
Joel Martin [Mon, 23 Mar 2015 16:37:16 +0000 (10:37 -0600)]
guide: step9 core functions.

9 years agoInitial Swift implementation.
Keith Rollin [Wed, 18 Mar 2015 06:32:35 +0000 (23:32 -0700)]
Initial Swift implementation.

9 years agoracket: fix apply/vector
Joel Martin [Sun, 22 Mar 2015 19:43:26 +0000 (14:43 -0500)]
racket: fix apply/vector

- re-order apply/vector tests into optional section.

9 years agoMerge pull request #47 from sdt/step9-apply-vector-test
Joel Martin [Sun, 22 Mar 2015 19:27:45 +0000 (14:27 -0500)]
Merge pull request #47 from sdt/step9-apply-vector-test

Step 9 test cases for apply on vectors

9 years agoStep 9 test cases for apply on vectors
Stephen Thirlwall [Sun, 22 Mar 2015 10:43:03 +0000 (21:43 +1100)]
Step 9 test cases for apply on vectors

9 years agoguide: expand step1 deferrables and some of step 9.
Joel Martin [Fri, 20 Mar 2015 22:30:56 +0000 (17:30 -0500)]
guide: expand step1 deferrables and some of step 9.

9 years agoruntest.py: allow repeated form in output.
Joel Martin [Fri, 20 Mar 2015 13:40:46 +0000 (08:40 -0500)]
runtest.py: allow repeated form in output.

This should fix (or rather, workaround)
https://github.com/kanaka/mal/issues/30 where on OS X the input form
is occasionally echo'd twice for some reason.

9 years agoC: remove extraneous glib includes.
Joel Martin [Fri, 20 Mar 2015 13:35:53 +0000 (08:35 -0500)]
C: remove extraneous glib includes.

9 years agoMerge pull request #46 from neutralevil/osx_c
Joel Martin [Fri, 20 Mar 2015 13:35:14 +0000 (08:35 -0500)]
Merge pull request #46 from neutralevil/osx_c

C: fix compilation errors and warnings for the official toolchain of OSX...

9 years agoC: fix compilation errors and warnings for the official toolchain of OSX.
Liu Bin [Fri, 20 Mar 2015 09:01:38 +0000 (17:01 +0800)]
C: fix compilation errors and warnings for the official toolchain of OSX.

9 years agoruntest: exit when child process exits.
Joel Martin [Thu, 19 Mar 2015 15:49:36 +0000 (10:49 -0500)]
runtest: exit when child process exits.

Fixes: https://github.com/kanaka/mal/issues/40

- Simplify exception handling by combining keyboard exception into
  other exception handler. Print out output buffer on all exceptions.

9 years agoruntest: set PERL_RL=false, remove --raw.
Joel Martin [Thu, 19 Mar 2015 13:00:28 +0000 (08:00 -0500)]
runtest: set PERL_RL=false, remove --raw.

Thanks to suggestion from Stephen Thirlwall
(https://github.com/kanaka/mal/commit/99ec06dd23fea86b6a95b1151d7d22cbab63db84#commitcomment-10278903)

9 years agoPerl: still seems to need --raw in some situations.
Joel Martin [Thu, 19 Mar 2015 04:57:52 +0000 (23:57 -0500)]
Perl: still seems to need --raw in some situations.

9 years agoruntest: set INPUTRC to /dev/null
Joel Martin [Thu, 19 Mar 2015 04:51:14 +0000 (23:51 -0500)]
runtest: set INPUTRC to /dev/null

- try and avoid any strange readline init script settings.

9 years agoDockerfile: make Nim build one layer.
Joel Martin [Wed, 18 Mar 2015 19:51:32 +0000 (14:51 -0500)]
Dockerfile: make Nim build one layer.

Save couple hundred MB or so.

9 years agoruntest: set pty size to fix readline of long lines.
Joel Martin [Wed, 18 Mar 2015 18:08:08 +0000 (13:08 -0500)]
runtest: set pty size to fix readline of long lines.

- Also, add a long line test to step0 tests.
- Fix java step0 arg parsing.
- Fix postscript long line reads (larger buffer)
- Add mal step0_repl

9 years agojava,lua,perl: with TERM=dumb, --raw not needed
Joel Martin [Wed, 18 Mar 2015 14:01:01 +0000 (09:01 -0500)]
java,lua,perl: with TERM=dumb, --raw not needed

- Only mono based implementations (C#, VB) still need this.

9 years agoruntest: set TERM=dumb, remove --mono mode
Joel Martin [Wed, 18 Mar 2015 13:47:01 +0000 (08:47 -0500)]
runtest: set TERM=dumb, remove --mono mode

9 years agotests: move reorder tests to better match guide.
Joel Martin [Wed, 18 Mar 2015 13:12:19 +0000 (08:12 -0500)]
tests: move reorder tests to better match guide.

9 years agoFAQ: add question anchors.
Joel Martin [Tue, 17 Mar 2015 15:29:39 +0000 (10:29 -0500)]
FAQ: add question anchors.

9 years agofsharp: step 3: Consolidated vector and list let* binding logic.
Peter Stephens [Tue, 17 Mar 2015 12:22:38 +0000 (07:22 -0500)]
fsharp: step 3: Consolidated vector and list let* binding logic.

9 years agoMerge branch 'master' of https://github.com/kanaka/mal into fsharp
Peter Stephens [Tue, 17 Mar 2015 02:36:04 +0000 (21:36 -0500)]
Merge branch 'master' of https://github.com/kanaka/mal into fsharp

Conflicts:
Makefile

9 years agofsharp: step 3: Implemented the let* special form.
Peter Stephens [Tue, 17 Feb 2015 02:28:00 +0000 (21:28 -0500)]
fsharp: step 3: Implemented the let* special form.

9 years agoMerge pull request #45 from sdt/typofix-perl-clone
Joel Martin [Tue, 17 Mar 2015 00:57:15 +0000 (19:57 -0500)]
Merge pull request #45 from sdt/typofix-perl-clone

Test case & fix for typo in Perl _clone implementation

9 years agoFix typo in perl _clone()
Stephen Thirlwall [Tue, 17 Mar 2015 00:11:38 +0000 (11:11 +1100)]
Fix typo in perl _clone()

I stumbled over this cun-t-paste error in the perl implementation.

9 years agoAdd test that (with-meta X ...) returns an X
Stephen Thirlwall [Tue, 17 Mar 2015 00:10:39 +0000 (11:10 +1100)]
Add test that (with-meta X ...) returns an X

9 years agoMerge pull request #44 from sdt/step9-typo-fix
Joel Martin [Mon, 16 Mar 2015 14:51:21 +0000 (09:51 -0500)]
Merge pull request #44 from sdt/step9-typo-fix

Remove extra ) from step9 test snippet

9 years agoMerge pull request #43 from sdt/step9-apply-user-fn-test
Joel Martin [Mon, 16 Mar 2015 14:50:47 +0000 (09:50 -0500)]
Merge pull request #43 from sdt/step9-apply-user-fn-test

Step 9 apply tests test user fns as well as core

9 years agofsharp: step 3: Improved Env to work with chains. Implemented the def! special form.
Peter Stephens [Mon, 16 Mar 2015 12:09:10 +0000 (07:09 -0500)]
fsharp: step 3: Improved Env to work with chains. Implemented the def! special form.

9 years agoRemove extra ) from step9 test snippet
Stephen Thirlwall [Mon, 16 Mar 2015 05:55:34 +0000 (16:55 +1100)]
Remove extra ) from step9 test snippet

My reader complains if there is extra input after the top-level
read_form, so this test was inadvertently failing for me.

9 years agoStep 9 apply tests test user fns as well as core
Stephen Thirlwall [Mon, 16 Mar 2015 05:30:56 +0000 (16:30 +1100)]
Step 9 apply tests test user fns as well as core

I had a bug in my apply core function. It worked for core functions, but
not for user-defined functions.

This bug escaped direct testing, but caused problems in self-host
testing.

Here's a couple of simple test cases that catch those errors.

9 years agoFAQ: minor cleanup/grammar.
Joel Martin [Sun, 15 Mar 2015 20:47:23 +0000 (15:47 -0500)]
FAQ: minor cleanup/grammar.

9 years agoREADME: link to FAQ and mention #mal (freenode).
Joel Martin [Sun, 15 Mar 2015 20:41:11 +0000 (15:41 -0500)]
README: link to FAQ and mention #mal (freenode).

9 years agoFAQ: mal history and new impl. merge guidelines.
Joel Martin [Sun, 15 Mar 2015 20:35:54 +0000 (15:35 -0500)]
FAQ: mal history and new impl. merge guidelines.

9 years agofsharp: step 2: Factored out funcs into Core module.
Peter Stephens [Sun, 15 Mar 2015 20:07:08 +0000 (15:07 -0500)]
fsharp: step 2: Factored out funcs into Core module.

9 years agoFAQ: shorter title.
Joel Martin [Sun, 15 Mar 2015 17:40:13 +0000 (12:40 -0500)]
FAQ: shorter title.

9 years agoAdd FAQ: a couple questions that have come up.
Joel Martin [Sun, 15 Mar 2015 17:37:33 +0000 (12:37 -0500)]
Add FAQ: a couple questions that have come up.

9 years agoMerge pull request #42 from stamourv/master
Joel Martin [Sun, 15 Mar 2015 17:33:13 +0000 (12:33 -0500)]
Merge pull request #42 from stamourv/master

Fix extension for Racket in README.

9 years agoFix extension for Racket in README.
Vincent St-Amour [Sun, 15 Mar 2015 17:01:50 +0000 (13:01 -0400)]
Fix extension for Racket in README.

9 years agoguide: clarify eval function and ARGV.
Joel Martin [Sun, 15 Mar 2015 16:20:05 +0000 (11:20 -0500)]
guide: clarify eval function and ARGV.

9 years agoruntest.py: Ouput current buffer if keyboard interrupt.
Joel Martin [Sun, 15 Mar 2015 15:52:59 +0000 (10:52 -0500)]
runtest.py: Ouput current buffer if keyboard interrupt.

Suggestion on https://github.com/kanaka/mal/issues/40#issuecomment-81015115
by https://github.com/boxed

9 years agoguide: clarify usage of eval_ast in do form.
Joel Martin [Sat, 14 Mar 2015 22:37:54 +0000 (17:37 -0500)]
guide: clarify usage of eval_ast in do form.