jackhill/mal.git
7 years agoEnsure assoc updates maps properly
Vasilij Schneidermann [Mon, 24 Oct 2016 19:49:07 +0000 (21:49 +0200)]
Ensure assoc updates maps properly

7 years agoSwift3: updates/fixes for Swift 3.0.1
Joel Martin [Tue, 18 Oct 2016 03:37:42 +0000 (22:37 -0500)]
Swift3: updates/fixes for Swift 3.0.1

7 years agoguide: incorporate feedback from Nicolas Boulenguez
Joel Martin [Sat, 8 Oct 2016 17:23:10 +0000 (12:23 -0500)]
guide: incorporate feedback from Nicolas Boulenguez

7 years agoHaskell: update docker image to 7.10.3
Joel Martin [Thu, 6 Oct 2016 22:55:58 +0000 (17:55 -0500)]
Haskell: update docker image to 7.10.3

This goes along with https://github.com/kanaka/mal/pull/238

7 years agoMerge pull request #238 from prt2121/pt/haskell-7.10.1
Joel Martin [Thu, 6 Oct 2016 22:53:27 +0000 (17:53 -0500)]
Merge pull request #238 from prt2121/pt/haskell-7.10.1

support GHC 7.10.1+ : update error handling

7 years agoSupport GHC 7.10.1+. Update error handling
Prat [Sun, 2 Oct 2016 17:49:28 +0000 (13:49 -0400)]
Support GHC 7.10.1+. Update error handling

7 years agoMerge pull request #237 from iqbalansari/master
Joel Martin [Tue, 20 Sep 2016 14:32:59 +0000 (09:32 -0500)]
Merge pull request #237 from iqbalansari/master

Compile guile files before running them

7 years agoCompile guile files before running them
Iqbal Ansari [Tue, 20 Sep 2016 12:24:30 +0000 (17:54 +0530)]
Compile guile files before running them

7 years agoMerge pull request #232 from zmower/ada_patches_sep16
Joel Martin [Thu, 15 Sep 2016 19:13:42 +0000 (14:13 -0500)]
Merge pull request #232 from zmower/ada_patches_sep16

Ada patches sep16

7 years agoMerge pull request #233 from iqbalansari/master
Joel Martin [Thu, 15 Sep 2016 18:28:34 +0000 (13:28 -0500)]
Merge pull request #233 from iqbalansari/master

Update CLISP implementation

7 years agoStore enviroments as struct instead of classes
Iqbal Ansari [Thu, 15 Sep 2016 14:46:32 +0000 (20:16 +0530)]
Store enviroments as struct instead of classes

Seems to give some good speedups

7 years agoDo not use custom hashtable for storing MAL environment
Iqbal Ansari [Thu, 15 Sep 2016 04:25:16 +0000 (09:55 +0530)]
Do not use custom hashtable for storing MAL environment

7 years agoFix a typo in core division function
Iqbal Ansari [Thu, 15 Sep 2016 04:13:03 +0000 (09:43 +0530)]
Fix a typo in core division function

7 years agoNicholas Boulenguez : Use Get_Line function instead of insisting on a maximum string...
Chris M Moore [Sat, 10 Sep 2016 20:06:47 +0000 (21:06 +0100)]
Nicholas Boulenguez : Use Get_Line function instead of insisting on a maximum string size

7 years agoNicholas Boulenguez : Delegate Ada dependency handling to gnatmake
Chris M Moore [Sat, 10 Sep 2016 19:45:06 +0000 (20:45 +0100)]
Nicholas Boulenguez : Delegate Ada dependency handling to gnatmake

7 years agoNicholas Boulenguez : Replace all GNAT projects with -D gnatmake option
Chris M Moore [Sat, 10 Sep 2016 17:35:10 +0000 (18:35 +0100)]
Nicholas Boulenguez : Replace all GNAT projects with -D gnatmake option

7 years agoMerge pull request #231 from iqbalansari/master
Joel Martin [Mon, 29 Aug 2016 17:47:06 +0000 (12:47 -0500)]
Merge pull request #231 from iqbalansari/master

Update README to mention CLISP implementation

7 years agoAdd GNU CLISP to the list of implementations
Iqbal Ansari [Mon, 29 Aug 2016 14:44:52 +0000 (20:14 +0530)]
Add GNU CLISP to the list of implementations

7 years agoDo not start MAL REPL if code is executed in Emacs (specially via SLIME)
Iqbal Ansari [Mon, 29 Aug 2016 14:44:15 +0000 (20:14 +0530)]
Do not start MAL REPL if code is executed in Emacs (specially via SLIME)

7 years agoAdd interop
Iqbal Ansari [Mon, 29 Aug 2016 14:41:22 +0000 (20:11 +0530)]
Add interop

- clisp-eval: allows executing Common Lisp
- define-builtin: allows defining builtin functions on the fly

7 years agoIntern symbols in mal-user package while unwraping MAL values
Iqbal Ansari [Mon, 29 Aug 2016 14:40:42 +0000 (20:10 +0530)]
Intern symbols in mal-user package while unwraping MAL values

7 years agoPrint startup header when REPL starts
Iqbal Ansari [Mon, 29 Aug 2016 11:07:11 +0000 (16:37 +0530)]
Print startup header when REPL starts

7 years agoFix path of history file for readline
Iqbal Ansari [Mon, 29 Aug 2016 11:07:00 +0000 (16:37 +0530)]
Fix path of history file for readline

7 years agoMerge pull request #230 from iqbalansari/clisp
Joel Martin [Sun, 28 Aug 2016 21:01:15 +0000 (16:01 -0500)]
Merge pull request #230 from iqbalansari/clisp

Add MAL implementation in clisp

7 years agoAdd make target to clean generated files
Iqbal Ansari [Sun, 28 Aug 2016 18:03:49 +0000 (23:33 +0530)]
Add make target to clean generated files

7 years agoAdd readline integration support to the REPL
Iqbal Ansari [Sun, 28 Aug 2016 17:53:25 +0000 (23:23 +0530)]
Add readline integration support to the REPL

7 years agoUse only clisp specific features
Iqbal Ansari [Sun, 28 Aug 2016 17:52:57 +0000 (23:22 +0530)]
Use only clisp specific features

7 years agoCompile clisp files before running
Iqbal Ansari [Sun, 28 Aug 2016 16:40:14 +0000 (22:10 +0530)]
Compile clisp files before running

This step gives really good speedups, there still seem to be some
bottlenecks around evaluation which need attention

7 years agoMove exports from types package to the top
Iqbal Ansari [Sun, 28 Aug 2016 16:33:54 +0000 (22:03 +0530)]
Move exports from types package to the top

7 years agoUse singleton values for nil, true and false
Iqbal Ansari [Sun, 28 Aug 2016 16:16:37 +0000 (21:46 +0530)]
Use singleton values for nil, true and false

7 years agoAvoid creating unnecessary symbols for special froms in eval
Iqbal Ansari [Sun, 28 Aug 2016 15:34:01 +0000 (21:04 +0530)]
Avoid creating unnecessary symbols for special froms in eval

7 years agoMake sure dependencies are loaded only once
Iqbal Ansari [Sun, 28 Aug 2016 15:13:15 +0000 (20:43 +0530)]
Make sure dependencies are loaded only once

7 years agoCoerce results of division to a non fractional value
Iqbal Ansari [Sun, 28 Aug 2016 15:09:21 +0000 (20:39 +0530)]
Coerce results of division to a non fractional value

7 years agoUse find-env instead of get-env in is-macro-call
Iqbal Ansari [Sun, 28 Aug 2016 14:39:20 +0000 (20:09 +0530)]
Use find-env instead of get-env in is-macro-call

Apparently the earlier approach with all its error handling is slower

7 years agoCleanup mal-value=
Iqbal Ansari [Sun, 28 Aug 2016 14:27:09 +0000 (19:57 +0530)]
Cleanup mal-value=

7 years agoStore symbols as strings
Iqbal Ansari [Sun, 28 Aug 2016 14:02:11 +0000 (19:32 +0530)]
Store symbols as strings

7 years agoRename mal-type to mal-data
Iqbal Ansari [Sun, 28 Aug 2016 12:28:06 +0000 (17:58 +0530)]
Rename mal-type to mal-data

7 years agoUse maphash to print hash-tables
Iqbal Ansari [Sun, 28 Aug 2016 08:45:58 +0000 (14:15 +0530)]
Use maphash to print hash-tables

7 years agoUse compiled string and digit regular expressions
Iqbal Ansari [Sun, 28 Aug 2016 05:49:45 +0000 (11:19 +0530)]
Use compiled string and digit regular expressions

7 years agoUse compiled regex instead of raw ones
Iqbal Ansari [Sun, 28 Aug 2016 05:15:58 +0000 (10:45 +0530)]
Use compiled regex instead of raw ones

7 years agoTrying out defstruct instead of defclass for MAL types
Iqbal Ansari [Sat, 27 Aug 2016 18:22:27 +0000 (23:52 +0530)]
Trying out defstruct instead of defclass for MAL types

7 years agoOptimize tokenizer a bit
Iqbal Ansari [Sat, 27 Aug 2016 18:03:29 +0000 (23:33 +0530)]
Optimize tokenizer a bit

Avoid ignore-errors forms, apparently the ignore-errors form cost around
100 milliseconds in step 1 tests

7 years agoAdd travis config for clisp, also add stats target for clisp
Iqbal Ansari [Sat, 27 Aug 2016 12:34:54 +0000 (18:04 +0530)]
Add travis config for clisp, also add stats target for clisp

7 years agoRename common_lisp to clisp
Iqbal Ansari [Tue, 23 Aug 2016 17:50:03 +0000 (23:20 +0530)]
Rename common_lisp to clisp

7 years agoMake mal-errors catchable, self hosting is now complete
Iqbal Ansari [Tue, 23 Aug 2016 17:28:46 +0000 (22:58 +0530)]
Make mal-errors catchable, self hosting is now complete

Remove implementation of print-object for MAL objects.
Also note the slowness of the implementation

7 years agoImplement step A
Iqbal Ansari [Tue, 23 Aug 2016 17:04:00 +0000 (22:34 +0530)]
Implement step A

7 years agoImplement all core functions required for step 9, completes step 9
Iqbal Ansari [Mon, 22 Aug 2016 18:32:03 +0000 (00:02 +0530)]
Implement all core functions required for step 9, completes step 9

7 years agoAdd nil?, true?, false? and symbol?
Iqbal Ansari [Mon, 22 Aug 2016 17:44:26 +0000 (23:14 +0530)]
Add nil?, true?, false? and symbol?

7 years agoAdd 'apply' and 'map' core functions
Iqbal Ansari [Mon, 22 Aug 2016 17:38:12 +0000 (23:08 +0530)]
Add 'apply' and 'map' core functions

7 years agoAdd throw core function
Iqbal Ansari [Mon, 22 Aug 2016 17:21:50 +0000 (22:51 +0530)]
Add throw core function

7 years agoAdd try* special form
Iqbal Ansari [Mon, 22 Aug 2016 17:21:06 +0000 (22:51 +0530)]
Add try* special form

7 years agoIntroduce types mal-runtime-exception and mal-user-exception types
Iqbal Ansari [Mon, 22 Aug 2016 17:19:11 +0000 (22:49 +0530)]
Introduce types mal-runtime-exception and mal-user-exception types

All the exceptions generated by runtime inherit from mal-user-exception
while user exceptions inherit from mal-user-exception

7 years agoImprove error handling
Iqbal Ansari [Sun, 21 Aug 2016 17:09:55 +0000 (22:39 +0530)]
Improve error handling

7 years agoImplement or and cond macros, completes step 8
Iqbal Ansari [Sun, 21 Aug 2016 14:52:09 +0000 (20:22 +0530)]
Implement or and cond macros, completes step 8

7 years agoImplement nth, first and rest
Iqbal Ansari [Sun, 21 Aug 2016 14:17:26 +0000 (19:47 +0530)]
Implement nth, first and rest

7 years agoAdd support for macros and macro expansion
Iqbal Ansari [Sun, 21 Aug 2016 14:09:45 +0000 (19:39 +0530)]
Add support for macros and macro expansion

7 years agoImplement quasiquote, completes step 7
Iqbal Ansari [Sun, 21 Aug 2016 09:09:01 +0000 (14:39 +0530)]
Implement quasiquote, completes step 7

7 years agoAdd cons and concat
Iqbal Ansari [Sun, 21 Aug 2016 08:08:40 +0000 (13:38 +0530)]
Add cons and concat

7 years agoAdd unwrap value to convert from mal type to native types
Iqbal Ansari [Sun, 21 Aug 2016 08:05:48 +0000 (13:35 +0530)]
Add unwrap value to convert from mal type to native types

7 years agoEval keys of hash-map as well
Iqbal Ansari [Sun, 21 Aug 2016 05:59:59 +0000 (11:29 +0530)]
Eval keys of hash-map as well

7 years agoAdd *ARGV*, completes step 6
Iqbal Ansari [Sat, 20 Aug 2016 18:42:58 +0000 (00:12 +0530)]
Add *ARGV*, completes step 6

7 years agoAdd all required atom functions
Iqbal Ansari [Sat, 20 Aug 2016 18:39:18 +0000 (00:09 +0530)]
Add all required atom functions

7 years agoFix reading of quotes
Iqbal Ansari [Sat, 20 Aug 2016 18:24:37 +0000 (23:54 +0530)]
Fix reading of quotes

7 years agoAdd atom type
Iqbal Ansari [Sat, 20 Aug 2016 18:24:28 +0000 (23:54 +0530)]
Add atom type

7 years agoAdd load-file function
Iqbal Ansari [Sat, 20 Aug 2016 18:24:16 +0000 (23:54 +0530)]
Add load-file function

7 years agoAdd `eval` builtin
Iqbal Ansari [Sat, 20 Aug 2016 17:42:04 +0000 (23:12 +0530)]
Add `eval` builtin

7 years agoHandle non-mal datatypes in mal-value=
Iqbal Ansari [Sat, 20 Aug 2016 16:21:32 +0000 (21:51 +0530)]
Handle non-mal datatypes in mal-value=

7 years agoImplement slurp and read-string
Iqbal Ansari [Sat, 20 Aug 2016 08:10:26 +0000 (13:40 +0530)]
Implement slurp and read-string

7 years agoImplement tail calls for functions, completes step 5
Iqbal Ansari [Sat, 20 Aug 2016 07:33:16 +0000 (13:03 +0530)]
Implement tail calls for functions, completes step 5

7 years agoImplement tail calls for 'let*', 'if' and 'do'
Iqbal Ansari [Sat, 20 Aug 2016 07:08:46 +0000 (12:38 +0530)]
Implement tail calls for 'let*', 'if' and 'do'

7 years agoImplement print_readably, completes step 4
Iqbal Ansari [Fri, 19 Aug 2016 11:41:21 +0000 (17:11 +0530)]
Implement print_readably, completes step 4

7 years agoImplement equality between vectors and list
Iqbal Ansari [Thu, 18 Aug 2016 19:00:14 +0000 (00:30 +0530)]
Implement equality between vectors and list

7 years agoImplement `not` in MAL
Iqbal Ansari [Thu, 18 Aug 2016 19:00:02 +0000 (00:30 +0530)]
Implement `not` in MAL

7 years agoTreat nil as a list in list?
Iqbal Ansari [Thu, 18 Aug 2016 18:59:27 +0000 (00:29 +0530)]
Treat nil as a list in list?

7 years agoAdd support for variadic arguments
Iqbal Ansari [Thu, 18 Aug 2016 18:58:34 +0000 (00:28 +0530)]
Add support for variadic arguments

7 years agoMake sure the REPL does not crash on unknown errors
Iqbal Ansari [Thu, 18 Aug 2016 16:42:01 +0000 (22:12 +0530)]
Make sure the REPL does not crash on unknown errors

7 years agoFix wrapping of Common Lisp value into MAL values
Iqbal Ansari [Thu, 18 Aug 2016 16:38:57 +0000 (22:08 +0530)]
Fix wrapping of Common Lisp value into MAL values

1) Since nil and t are symbols also, we need the specific clauses
i.e. null and boolean before symbol clause
2) Since nil stands for both an empty list as well as false in common
lisp as opposed to MAL where these are distinct values, we need to use
explicit flag while wrapping them

7 years agoTeach mal-value= to compare list and hash-maps
Iqbal Ansari [Thu, 18 Aug 2016 16:38:14 +0000 (22:08 +0530)]
Teach mal-value= to compare list and hash-maps

7 years agoUse symbol name while comparing mal-symbols
Iqbal Ansari [Thu, 18 Aug 2016 15:28:14 +0000 (20:58 +0530)]
Use symbol name while comparing mal-symbols

7 years agoInitial attempt at adding core functions required for step 4
Iqbal Ansari [Thu, 18 Aug 2016 13:28:58 +0000 (18:58 +0530)]
Initial attempt at adding core functions required for step 4

7 years agoImplement fn*, do and let*
Iqbal Ansari [Wed, 17 Aug 2016 18:32:43 +0000 (00:02 +0530)]
Implement fn*, do and let*

7 years agoAllow specifying initial set of bindings while creating new environment
Iqbal Ansari [Wed, 17 Aug 2016 18:31:59 +0000 (00:01 +0530)]
Allow specifying initial set of bindings while creating new environment

7 years agoAdd support for printing functions
Iqbal Ansari [Wed, 17 Aug 2016 18:31:44 +0000 (00:01 +0530)]
Add support for printing functions

7 years agoImplement step 3 (environment)
Iqbal Ansari [Wed, 17 Aug 2016 16:49:03 +0000 (22:19 +0530)]
Implement step 3 (environment)

7 years agoAdd mal-environment class
Iqbal Ansari [Wed, 17 Aug 2016 10:47:27 +0000 (16:17 +0530)]
Add mal-environment class

7 years agoUpdate apply-unwrapped-values to also wrap the result into a mal type
Iqbal Ansari [Wed, 17 Aug 2016 10:38:46 +0000 (16:08 +0530)]
Update apply-unwrapped-values to also wrap the result into a mal type

7 years agoComplete implmentation of step 2 (eval)
Iqbal Ansari [Wed, 17 Aug 2016 03:23:12 +0000 (08:53 +0530)]
Complete implmentation of step 2 (eval)

7 years agoAdd printer for built-in functions
Iqbal Ansari [Sat, 20 Aug 2016 16:45:22 +0000 (22:15 +0530)]
Add printer for built-in functions

7 years agoExport predicates for checking MAL types from types package
Iqbal Ansari [Wed, 17 Aug 2016 02:58:59 +0000 (08:28 +0530)]
Export predicates for checking MAL types from types package

7 years agoTeach MAL about number signs
Iqbal Ansari [Wed, 17 Aug 2016 02:58:43 +0000 (08:28 +0530)]
Teach MAL about number signs

7 years agoChange the way meta is handled
Iqbal Ansari [Wed, 17 Aug 2016 02:16:37 +0000 (07:46 +0530)]
Change the way meta is handled

This might require some more modifications in future

7 years agoSupport clause any in switch-mal-type to execute form for any type
Iqbal Ansari [Tue, 16 Aug 2016 19:03:49 +0000 (00:33 +0530)]
Support clause any in switch-mal-type to execute form for any type

7 years agoRemove the need to quote symbols in switch-mal-type
Iqbal Ansari [Tue, 16 Aug 2016 19:01:31 +0000 (00:31 +0530)]
Remove the need to quote symbols in switch-mal-type

7 years agoRemove obsolete 'add-mal-meta' function
Iqbal Ansari [Tue, 16 Aug 2016 17:40:27 +0000 (23:10 +0530)]
Remove obsolete 'add-mal-meta' function

7 years agoExport MAL types and MAL accessors from types package
Iqbal Ansari [Tue, 16 Aug 2016 16:39:17 +0000 (22:09 +0530)]
Export MAL types and MAL accessors from types package

7 years agoExport eof error from reader
Iqbal Ansari [Tue, 16 Aug 2016 16:23:34 +0000 (21:53 +0530)]
Export eof error from reader

7 years agoMake sure last duplicate entry override first entry in hash maps
Iqbal Ansari [Tue, 16 Aug 2016 15:39:19 +0000 (21:09 +0530)]
Make sure last duplicate entry override first entry in hash maps

This completes mandatory as well as optional requirements for step 1

7 years agoAdd support for reading print metadata associated with values
Iqbal Ansari [Tue, 16 Aug 2016 07:05:00 +0000 (12:35 +0530)]
Add support for reading print metadata associated with values

7 years agoFix printing of vectors, use fully qualified symbol names in printing switch
Iqbal Ansari [Tue, 16 Aug 2016 06:21:09 +0000 (11:51 +0530)]
Fix printing of vectors, use fully qualified symbol names in printing switch

7 years agoAdd switch-mal-type, use it select printing strategy
Iqbal Ansari [Mon, 15 Aug 2016 18:07:26 +0000 (23:37 +0530)]
Add switch-mal-type, use it select printing strategy