1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-20 10:07:45 +03:00
Commit Graph

1654 Commits

Author SHA1 Message Date
Joel Martin
8421dbf821 Merge pull request #230 from iqbalansari/clisp
Add MAL implementation in clisp
2016-08-28 16:01:15 -05:00
Iqbal Ansari
cfa139a7a1 Add make target to clean generated files 2016-08-28 23:33:49 +05:30
Iqbal Ansari
abb46bb21d Add readline integration support to the REPL 2016-08-28 23:33:35 +05:30
Iqbal Ansari
d65385bf2d Use only clisp specific features 2016-08-28 23:22:57 +05:30
Iqbal Ansari
3283e402d9 Compile clisp files before running
This step gives really good speedups, there still seem to be some
bottlenecks around evaluation which need attention
2016-08-28 22:26:35 +05:30
Iqbal Ansari
1d0a626d1f Move exports from types package to the top 2016-08-28 22:03:54 +05:30
Iqbal Ansari
d4fe5ef0a5 Use singleton values for nil, true and false 2016-08-28 21:46:37 +05:30
Iqbal Ansari
29cb42a450 Avoid creating unnecessary symbols for special froms in eval 2016-08-28 21:21:21 +05:30
Iqbal Ansari
3b97a1a78b Make sure dependencies are loaded only once 2016-08-28 20:43:15 +05:30
Iqbal Ansari
f6da27368c Coerce results of division to a non fractional value 2016-08-28 20:39:21 +05:30
Iqbal Ansari
20bd0392b9 Use find-env instead of get-env in is-macro-call
Apparently the earlier approach with all its error handling is slower
2016-08-28 20:09:20 +05:30
Iqbal Ansari
b6fce2eea0 Cleanup mal-value= 2016-08-28 19:57:09 +05:30
Iqbal Ansari
97c2c420d5 Store symbols as strings 2016-08-28 19:51:04 +05:30
Iqbal Ansari
b54ada313a Rename mal-type to mal-data 2016-08-28 17:58:06 +05:30
Iqbal Ansari
adaa0a0047 Use maphash to print hash-tables 2016-08-28 14:15:58 +05:30
Iqbal Ansari
f2539b37e5 Use compiled string and digit regular expressions 2016-08-28 11:19:45 +05:30
Iqbal Ansari
e929d5be8e Use compiled regex instead of raw ones 2016-08-28 10:45:58 +05:30
Iqbal Ansari
961c035bc3 Trying out defstruct instead of defclass for MAL types 2016-08-27 23:52:27 +05:30
Iqbal Ansari
098095fa3e Optimize tokenizer a bit
Avoid ignore-errors forms, apparently the ignore-errors form cost around
100 milliseconds in step 1 tests
2016-08-27 23:33:29 +05:30
Iqbal Ansari
844ac73813 Add travis config for clisp, also add stats target for clisp 2016-08-27 18:13:33 +05:30
Iqbal Ansari
c505538df9 Rename common_lisp to clisp 2016-08-27 18:13:33 +05:30
Iqbal Ansari
fd834e86a8 Make mal-errors catchable, self hosting is now complete
Remove implementation of print-object for MAL objects.
Also note the slowness of the implementation
2016-08-27 18:13:33 +05:30
Iqbal Ansari
5745b6ef3e Implement step A 2016-08-27 18:13:33 +05:30
Iqbal Ansari
381ff1a47a Implement all core functions required for step 9, completes step 9 2016-08-27 18:13:33 +05:30
Iqbal Ansari
efc3d24c32 Add nil?, true?, false? and symbol? 2016-08-27 18:13:33 +05:30
Iqbal Ansari
a9e59041f7 Add 'apply' and 'map' core functions 2016-08-27 18:13:33 +05:30
Iqbal Ansari
3a470921a0 Add throw core function 2016-08-27 18:13:33 +05:30
Iqbal Ansari
147cc3611b Add try* special form 2016-08-27 18:13:33 +05:30
Iqbal Ansari
e844f5c872 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
2016-08-27 18:13:33 +05:30
Iqbal Ansari
aa333009ae Improve error handling 2016-08-27 18:13:33 +05:30
Iqbal Ansari
07b4ed9fa7 Implement or and cond macros, completes step 8 2016-08-27 18:13:33 +05:30
Iqbal Ansari
3dec1ccf68 Implement nth, first and rest 2016-08-27 18:13:33 +05:30
Iqbal Ansari
f0cc89b26f Add support for macros and macro expansion 2016-08-27 18:13:33 +05:30
Iqbal Ansari
c5064079c4 Implement quasiquote, completes step 7 2016-08-27 18:13:33 +05:30
Iqbal Ansari
4accd3ef60 Add cons and concat 2016-08-27 18:13:33 +05:30
Iqbal Ansari
cc9b97ef37 Add unwrap value to convert from mal type to native types 2016-08-27 18:13:33 +05:30
Iqbal Ansari
4ccd278d37 Eval keys of hash-map as well 2016-08-27 18:13:33 +05:30
Iqbal Ansari
130e1c9441 Add *ARGV*, completes step 6 2016-08-27 18:13:33 +05:30
Iqbal Ansari
d3b9d34e56 Add all required atom functions 2016-08-27 18:13:33 +05:30
Iqbal Ansari
ae90ccdcd8 Fix reading of quotes 2016-08-27 18:13:33 +05:30
Iqbal Ansari
b9de97b683 Add atom type 2016-08-27 18:13:33 +05:30
Iqbal Ansari
bb02455ccc Add load-file function 2016-08-27 18:13:33 +05:30
Iqbal Ansari
4eb913bffb Add eval builtin 2016-08-27 18:13:33 +05:30
Iqbal Ansari
fd53ac3cac Handle non-mal datatypes in mal-value= 2016-08-27 18:13:33 +05:30
Iqbal Ansari
903cf3ffd9 Implement slurp and read-string 2016-08-27 18:13:33 +05:30
Iqbal Ansari
1161823b0b Implement tail calls for functions, completes step 5 2016-08-27 18:13:33 +05:30
Iqbal Ansari
6a036a3158 Implement tail calls for 'let*', 'if' and 'do' 2016-08-27 18:13:33 +05:30
Iqbal Ansari
e7337b4cd0 Implement print_readably, completes step 4 2016-08-27 18:13:33 +05:30
Iqbal Ansari
dc1a9c479f Implement equality between vectors and list 2016-08-27 18:13:33 +05:30
Iqbal Ansari
460d52f828 Implement not in MAL 2016-08-27 18:13:33 +05:30