jackhill/mal.git
7 years agoBasic: various memory savings.
Joel Martin [Sat, 10 Dec 2016 16:50:40 +0000 (11:50 -0500)]
Basic: various memory savings.

- simplify DO_CONCAT.
- inline MAL_READ/PRINT.
- comment out memory debug/sanity checks.
- more aggressive space removal.

Saves over 900 bytes.

Increase Z% value memory by 374 to 9216 (8192+1024).

7 years agoBasic: more efficient/correct file reader.
Joel Martin [Sat, 10 Dec 2016 14:53:10 +0000 (09:53 -0500)]
Basic: more efficient/correct file reader.

- read one character at a time from the file instead of chunking it
  into the A$ string.
- fix an overflow that was happening during reads of long forms.

7 years agoMerge pull request #250 from dubek/skew
Joel Martin [Mon, 21 Nov 2016 17:16:23 +0000 (11:16 -0600)]
Merge pull request #250 from dubek/skew

Add Skew implementation

7 years agoMerge pull request #248 from iqbalansari/common-lisp
Joel Martin [Mon, 21 Nov 2016 16:51:16 +0000 (10:51 -0600)]
Merge pull request #248 from iqbalansari/common-lisp

Portable implementation in Common LISP

7 years agoCommon Lisp: Add support for running on ABCL
Iqbal Ansari [Sun, 20 Nov 2016 19:41:55 +0000 (01:11 +0530)]
Common Lisp: Add support for running on ABCL

7 years agoCommon Lisp: Use a custom hash-function when running on ABCL
Iqbal Ansari [Sun, 20 Nov 2016 19:37:08 +0000 (01:07 +0530)]
Common Lisp: Use a custom hash-function when running on ABCL

7 years agoCommon Lisp: Load libraries silently
Iqbal Ansari [Sun, 20 Nov 2016 19:36:05 +0000 (01:06 +0530)]
Common Lisp: Load libraries silently

7 years agoAdd Skew implementation
Dov Murik [Tue, 8 Nov 2016 21:40:18 +0000 (21:40 +0000)]
Add Skew implementation

See http://skew-lang.org/ for details on the Skew language. Currently
Mal only compiles to Javascript, as there are some issues with the C#
backend for Skew (https://github.com/evanw/skew/issues/19).

Tested with Skew 0.7.42.

7 years agoBasic: miscellaneous memory savings.
Joel Martin [Sat, 19 Nov 2016 05:51:33 +0000 (23:51 -0600)]
Basic: miscellaneous memory savings.

- Use variables A1, A2, B2 for Z%(A+1), Z%(A+2), Z%(B+2) respectively.
- Replace Z%(R)=Z%(R)+32 with GOSUB INC_REF_R
- Add functions TYPE_A and TYPE_F for (Z%(A)AND 31) and (Z%(F)AND 31)
  respectively.
- Inline NATIVE_FUNCTION and MAL_FUNCTION.

All together saves over 500 bytes so increase Z% value memory by 250
entries.

7 years agoCommon Lisp: Remove GNU CLISP specific implementation
Iqbal Ansari [Fri, 18 Nov 2016 12:06:44 +0000 (17:36 +0530)]
Common Lisp: Remove GNU CLISP specific implementation

7 years agoCommon Lisp: Add documentation
Iqbal Ansari [Fri, 18 Nov 2016 12:00:54 +0000 (17:30 +0530)]
Common Lisp: Add documentation

7 years agoCommon Lisp: Add wrapper shell code to change to script's directory when
Iqbal Ansari [Fri, 18 Nov 2016 11:16:15 +0000 (16:46 +0530)]
Common Lisp: Add wrapper shell code to change to script's directory when
cl-launch scripts are run

7 years agoCommon Lisp: Use a custom hash-function when running on ECL
Iqbal Ansari [Fri, 18 Nov 2016 09:26:42 +0000 (14:56 +0530)]
Common Lisp: Use a custom hash-function when running on ECL

ECL's sxhash function does not seem to be consistent for compound data types

7 years agoCommon Lisp: Suppress messages from CMUCL while restoring image
Iqbal Ansari [Fri, 18 Nov 2016 06:46:31 +0000 (12:16 +0530)]
Common Lisp: Suppress messages from CMUCL while restoring image

The 'Reloaded library ... ' messages were causing some tests to fail

7 years agoCommon Lisp: Fix `println` on GNU CLISP
Iqbal Ansari [Fri, 18 Nov 2016 03:53:24 +0000 (09:23 +0530)]
Common Lisp: Fix `println` on GNU CLISP

Use `write-line` instead of `(format *standard-output* ... )` since the former
seems to be printing an extra newline at the start

7 years agoCommon Lisp: Initialize standard streams in GNU CLISP on startup
Iqbal Ansari [Thu, 17 Nov 2016 11:44:33 +0000 (17:14 +0530)]
Common Lisp: Initialize standard streams in GNU CLISP on startup

Without the initialization CLISP seems to be interacting wierdly with PERL_RL
flag

7 years agoCommon Lisp: Keep track of the implementation used to build a step
Iqbal Ansari [Tue, 15 Nov 2016 18:54:49 +0000 (00:24 +0530)]
Common Lisp: Keep track of the implementation used to build a step

Rebuild the step if the implementation changes

7 years agoCommon Lisp: Allow user to select the implementation to use for building MAL
Iqbal Ansari [Tue, 15 Nov 2016 13:51:00 +0000 (19:21 +0530)]
Common Lisp: Allow user to select the implementation to use for building MAL

7 years agoCommon Lisp: Ignore fasl and lib files
Iqbal Ansari [Wed, 2 Nov 2016 03:49:24 +0000 (09:19 +0530)]
Common Lisp: Ignore fasl and lib files

7 years agoCommon Lisp: Enable travis for Common Lisp
Iqbal Ansari [Tue, 1 Nov 2016 07:22:47 +0000 (12:52 +0530)]
Common Lisp: Enable travis for Common Lisp

7 years agoCommon Lisp: Add Dockerfile for Common Lisp implementation
Iqbal Ansari [Sat, 29 Oct 2016 18:46:46 +0000 (00:16 +0530)]
Common Lisp: Add Dockerfile for Common Lisp implementation

7 years agoCommon Lisp: Add tasks for stats and stats-lisp for Common Lisp implementation
Iqbal Ansari [Wed, 2 Nov 2016 10:10:01 +0000 (15:40 +0530)]
Common Lisp: Add tasks for stats and stats-lisp for Common Lisp implementation

7 years agoCommon Lisp: Implement step A
Iqbal Ansari [Sat, 29 Oct 2016 18:37:40 +0000 (00:07 +0530)]
Common Lisp: Implement step A

7 years agoCommon Lisp: Implement step 9
Iqbal Ansari [Sat, 29 Oct 2016 18:26:44 +0000 (23:56 +0530)]
Common Lisp: Implement step 9

7 years agoCommon Lisp: Implement step 8
Iqbal Ansari [Sat, 29 Oct 2016 17:50:05 +0000 (23:20 +0530)]
Common Lisp: Implement step 8

7 years agoCommon Lisp: Implement step 7
Iqbal Ansari [Sat, 29 Oct 2016 17:35:19 +0000 (23:05 +0530)]
Common Lisp: Implement step 7

7 years agoCommon Lisp: Implement step 6
Iqbal Ansari [Wed, 2 Nov 2016 07:21:14 +0000 (12:51 +0530)]
Common Lisp: Implement step 6

7 years agoCommon Lisp: Implement step 5
Iqbal Ansari [Sat, 29 Oct 2016 13:33:59 +0000 (19:03 +0530)]
Common Lisp: Implement step 5

7 years agoCommon Lisp: Implement step 4
Iqbal Ansari [Sat, 29 Oct 2016 13:33:46 +0000 (19:03 +0530)]
Common Lisp: Implement step 4

7 years agoCommon Lisp: Implement step 3
Iqbal Ansari [Sat, 29 Oct 2016 11:44:51 +0000 (17:14 +0530)]
Common Lisp: Implement step 3

7 years agoCommon Lisp: Implement step 2
Iqbal Ansari [Sat, 27 Aug 2016 13:30:14 +0000 (19:00 +0530)]
Common Lisp: Implement step 2

7 years agoCommon Lisp: Implement step 1
Iqbal Ansari [Fri, 26 Aug 2016 18:15:29 +0000 (23:45 +0530)]
Common Lisp: Implement step 1

7 years agoCommon Lisp: Implement step 0
Iqbal Ansari [Thu, 25 Aug 2016 16:56:26 +0000 (22:26 +0530)]
Common Lisp: Implement step 0

7 years agoBasic: refactor memory layout.
Joel Martin [Fri, 18 Nov 2016 06:54:04 +0000 (00:54 -0600)]
Basic: refactor memory layout.

Use a one dimensional array for the Z% value array. This enables
lists, vectors, environments and metadata pointers to all save off
1 word (2 bytes) of space.

Split the memory init and functions into mem.in.bas.

In addition, change type 14 to be metdata rather than any type 16-31.

This change saves about 560 bytes (no second array dimension
subscripts) and reduces Z% value usage by 10%-15%.

Bump the number of Z% words by 200 (to 8591). This enables
self-hosting up to step7 (without step8-stepA functions in core.mal).

7 years agoBasic: use RE from REP.
Joel Martin [Fri, 18 Nov 2016 06:46:07 +0000 (00:46 -0600)]
Basic: use RE from REP.

7 years agoBasic: refactor of hashmaps, map loops, remove derefs.
Joel Martin [Wed, 16 Nov 2016 04:38:09 +0000 (22:38 -0600)]
Basic: refactor of hashmaps, map loops, remove derefs.

- Alternate memory layout of hash-maps:

Instead of hash-maps being an alternating sequence of keys and values,
combine the key/values into a single entry. In other words, switch
from this:

    8   ->  next Z% index (0 for last)
    14      key/value (alternating)

To this:

    8   ->  next Z% index (0 for last)
    key     value

This requires refactoring of the sequence reader, EVAL_AST and
especially DO_HASHMAP and DO_KEY_VALS. So that leads to the next big
refactoring:

- Change mapping/lapping constructs to share code:

Several pieces of mapping/looping code have a common structure, so
this moves that common structure to types.in.bas: MAP_LOOP_START,
MAP_LOOP_UPDATE, MAP_LOOP_DONE. Then use this code in:
    - EVAL_AST
    - READ_SEQ_*
    - DO_MAP
    - DO_HASH_MAP
    - DO_KEYS_VALS

This also fixes the issue that several of these looping constructs
were creating new empty sequence entries instead of using the common
ones at the beginning of memory.

- Remove the use of DEREF_*.

This isn't actually needed because we no longer create structure that
refer to multiple levels of type 14 references. Replace DEREF_* with
VAL_* which gets the value of a particular sequence element i.e.
Z%(A+1,1).

All together, the above changes save over 300 bytes.

Also:

- Fix empty nil/false/true entries so they
  are treated the same as other types of data with regards to
  reference counting and ALLOC/RELEASE.
- Add a new memory summary function in debug.in.bas that just prints
  out free, value count, and references for the early scalar and empty
  list elements. Comment out the larger one. This saves about 90
  bytes.

7 years agoMerge pull request #249 from hterkelsen/dart2
Joel Martin [Mon, 14 Nov 2016 21:39:33 +0000 (15:39 -0600)]
Merge pull request #249 from hterkelsen/dart2

Add Dart implementation

7 years agoadd dart/Makefile stub
Harry Terkelsen [Mon, 14 Nov 2016 21:28:23 +0000 (13:28 -0800)]
add dart/Makefile stub

7 years agoupdate travis file
Harry Terkelsen [Sun, 13 Nov 2016 23:24:48 +0000 (15:24 -0800)]
update travis file

7 years agoadd dart Dockerfile
Harry Terkelsen [Sun, 13 Nov 2016 23:24:02 +0000 (15:24 -0800)]
add dart Dockerfile

7 years agoupdate number of languages Mal is implemented in
Harry Terkelsen [Sun, 13 Nov 2016 22:44:11 +0000 (14:44 -0800)]
update number of languages Mal is implemented in

7 years agoupdate readme
Harry Terkelsen [Sun, 13 Nov 2016 22:35:35 +0000 (14:35 -0800)]
update readme

7 years agouse tabs for Makefile
Harry Terkelsen [Sun, 13 Nov 2016 22:28:19 +0000 (14:28 -0800)]
use tabs for Makefile

7 years agofix makefile
Harry Terkelsen [Sun, 13 Nov 2016 22:27:03 +0000 (14:27 -0800)]
fix makefile

7 years agoMerge branch 'master' into dart
Harry Terkelsen [Sun, 13 Nov 2016 22:24:49 +0000 (14:24 -0800)]
Merge branch 'master' into dart

7 years agoadd Dart implementation
Harry Terkelsen [Sun, 13 Nov 2016 22:21:44 +0000 (14:21 -0800)]
add Dart implementation

7 years agoBasic: more reductions. RELEASE refactor.
Joel Martin [Thu, 10 Nov 2016 07:51:02 +0000 (01:51 -0600)]
Basic: more reductions. RELEASE refactor.

Save about 400 bytes.

Increase value Z% array by 100 to 4195.

Reduce string array by 1 (to 199) since in BASIC the value is the last
index not the size.

7 years agoBasic: memory savings and variable simplifications.
Joel Martin [Sun, 6 Nov 2016 23:20:03 +0000 (17:20 -0600)]
Basic: memory savings and variable simplifications.

In core move incrementing of function index into
INIT_CORE_SET_FUNCTION. Switch 3 IF GOTO to ON GOTO. Reuse some
temporary variables.

Saves about 480 bytes.

Bump value array from 3950 to 4096. This allows step4 (sumdown 2) to
pass. Previously only (sumdown 1) passed.

7 years agoBasic: add pr-memory-summary core function.
Joel Martin [Sat, 5 Nov 2016 03:53:20 +0000 (22:53 -0500)]
Basic: add pr-memory-summary core function.

- Remove test POKE commands.

7 years agoAda: add ada/obj to .gitignore
Joel Martin [Sat, 5 Nov 2016 03:52:58 +0000 (22:52 -0500)]
Ada: add ada/obj to .gitignore

7 years agoREADME: note ChucK tested on more than just Arch.
Joel Martin [Sat, 5 Nov 2016 03:52:05 +0000 (22:52 -0500)]
README: note ChucK tested on more than just Arch.

7 years agoBasic: move logic/release stack to $C000
Joel Martin [Sat, 5 Nov 2016 02:46:45 +0000 (21:46 -0500)]
Basic: move logic/release stack to $C000

Uses stack PUSH*/POP*/PEEK* routines instead of direct X% and Y%
access. Seems to be about the same performance (maybe a 5% performance
hit at most).

This gives us a larger stack (1920 2-byte words of $C000 rather
than 200 words as before). The release stack at $CF00 stays the same
size (64 4-byte addr/level entries).

Also saves over 1K or program and array space. So take the opportunity
to expand Z% entry space from 3712 to 3950.

7 years agoBasic: reduce variables. Fix func printing.
Joel Martin [Fri, 4 Nov 2016 05:07:09 +0000 (00:07 -0500)]
Basic: reduce variables. Fix func printing.

- Save over 450 bytes. Bump up Z values by 128.
- Fix function printing when function is embedded in something else by
  using strings storage as a stack while printing rather than using
  RR$
- Simplify some error messages and sanity checks in RELEASE.

7 years agoBasic: add string memory mgt. Fix eval, symbol fns
Joel Martin [Fri, 4 Nov 2016 04:27:42 +0000 (23:27 -0500)]
Basic: add string memory mgt. Fix eval, symbol fns

7 years agoBasic: more memory savings
Joel Martin [Thu, 3 Nov 2016 04:36:44 +0000 (23:36 -0500)]
Basic: more memory savings

- Do the pop of CALL return value at the end of the subroutine
  (callee) rather than at the call point (caller)
- shorten some character variables (CH$->C$, CH->C)
- remove spaces after OPEN, GET
- print REPL header directly in BASIC code

Together saves 404 bytes of memory.

7 years agoBasic: more aggressive space removal
Joel Martin [Thu, 3 Nov 2016 03:19:51 +0000 (22:19 -0500)]
Basic: more aggressive space removal

Saves over 1200 bytes so that Z% value space can be bumped up by 256
entries.

7 years agoAda, C: fix step3 error handling.
Joel Martin [Tue, 1 Nov 2016 15:44:49 +0000 (10:44 -0500)]
Ada, C: fix step3 error handling.

New step3 tests were added during basic implementation that broke Ada
and C.

7 years agoBasic: capitalize BASIC
Joel Martin [Mon, 31 Oct 2016 22:50:13 +0000 (17:50 -0500)]
Basic: capitalize BASIC

I guess.

7 years agoBasic: update to 61 impls after merge.
Joel Martin [Mon, 31 Oct 2016 22:45:00 +0000 (17:45 -0500)]
Basic: update to 61 impls after merge.

7 years agoMerge branch 'master' of github.com:kanaka/mal
Joel Martin [Mon, 31 Oct 2016 22:41:58 +0000 (17:41 -0500)]
Merge branch 'master' of github.com:kanaka/mal

7 years agoMerge branch 'basic'
Joel Martin [Mon, 31 Oct 2016 22:40:29 +0000 (17:40 -0500)]
Merge branch 'basic'

7 years agoBasic: update the README.
Joel Martin [Mon, 31 Oct 2016 22:38:28 +0000 (17:38 -0500)]
Basic: update the README.

7 years agoMerge pull request #247 from chr15m/php-interop-extended
Joel Martin [Mon, 31 Oct 2016 15:20:04 +0000 (10:20 -0500)]
Merge pull request #247 from chr15m/php-interop-extended

Php interop extended

7 years agoBasic: add QBasic support.
Joel Martin [Mon, 31 Oct 2016 00:15:24 +0000 (19:15 -0500)]
Basic: add QBasic support.

make MODE=qbasic stepA_mal.bas
qb64 stepA_mal.bas

7 years agoAdded interop notes to README.
Chris McCormick [Sat, 29 Oct 2016 04:32:26 +0000 (12:32 +0800)]
Added interop notes to README.

7 years agoMerge branch 'master' into php-interop-extended
Chris McCormick [Sat, 29 Oct 2016 04:29:33 +0000 (12:29 +0800)]
Merge branch 'master' into php-interop-extended

7 years agoTests for new PHP interop functions.
Chris McCormick [Sat, 29 Oct 2016 04:24:00 +0000 (12:24 +0800)]
Tests for new PHP interop functions.

7 years agoTighter PHP interop using '$' and '!' fns.
Chris McCormick [Sun, 16 Oct 2016 11:14:53 +0000 (19:14 +0800)]
Tighter PHP interop using '$' and '!' fns.
($ _SERVER) returns a mal hash-map holding the contents of the $_SERVER superglobal from PHP.
(! file_get_contents "https://github.com") returns a string containing the github homepage.
file_get_contents is a native PHP function.

7 years agoAllow printing of more PHP types.
Chris McCormick [Sun, 16 Oct 2016 11:12:11 +0000 (19:12 +0800)]
Allow printing of more PHP types.
In case return type from interop is a complex native PHP type.

7 years agoNew functions for converting between PHP and mal types.
Chris McCormick [Sun, 16 Oct 2016 11:11:30 +0000 (19:11 +0800)]
New functions for converting between PHP and mal types.

7 years agoBasic: enable Travis testing.
Joel Martin [Sat, 29 Oct 2016 03:05:30 +0000 (22:05 -0500)]
Basic: enable Travis testing.

7 years agoBasic: pass required tests. Printer fix.
Joel Martin [Sat, 29 Oct 2016 03:02:59 +0000 (22:02 -0500)]
Basic: pass required tests. Printer fix.

Also, move dissoc and hashmap equality tests to optional/soft since
they aren't actually needed for self-hosting.

7 years agoBasic: add Dockerfile
Joel Martin [Sat, 29 Oct 2016 02:57:35 +0000 (21:57 -0500)]
Basic: add Dockerfile

- installs patch cbmbasic

7 years agoBasic: d64 disk image build rules.
Joel Martin [Sat, 29 Oct 2016 02:49:29 +0000 (21:49 -0500)]
Basic: d64 disk image build rules.

- Include .args.mal file and core.mal into the image.

7 years agoMerge pull request #246 from def-/master
Joel Martin [Fri, 28 Oct 2016 15:21:09 +0000 (10:21 -0500)]
Merge pull request #246 from def-/master

Update Nim to 0.15.2, clean up compiler warnings

7 years agoUpdate Nim to 0.15.2, clean up compiler warnings
Dennis Felsing [Fri, 28 Oct 2016 10:02:21 +0000 (12:02 +0200)]
Update Nim to 0.15.2, clean up compiler warnings

7 years agoMerge pull request #245 from dubek/vimscript-use-vim8
Joel Martin [Fri, 28 Oct 2016 05:40:27 +0000 (00:40 -0500)]
Merge pull request #245 from dubek/vimscript-use-vim8

Vimscript: Use Vim 8.0

7 years agoBasic: fix step6 arg test. Gensym. Misc cleanup.
Joel Martin [Fri, 28 Oct 2016 04:47:05 +0000 (23:47 -0500)]
Basic: fix step6 arg test. Gensym. Misc cleanup.

- Strip linefeeds in run_argv_test.sh so that step6 arg test passes
  for basic.
- Add gensym and convert or macro.
- Add gitignore entries for transpiled basic sources.
- Add conj/seq stubs so that step4 self-host loads (if non-step4
  functions are commented out in core.mal)
- Bump up Z% value space by 256 spaces (1K)
- Remove old qb2cbm.sh

7 years agoMerge pull request #244 from chr15m/php-web-run
Joel Martin [Thu, 27 Oct 2016 15:14:02 +0000 (10:14 -0500)]
Merge pull request #244 from chr15m/php-web-run

Allow web exec of a .mal file via symlinked php script.

7 years agoBasic: fix errors, reader, if form. Self-host 0-3
Joel Martin [Thu, 27 Oct 2016 03:29:09 +0000 (22:29 -0500)]
Basic: fix errors, reader, if form. Self-host 0-3

- Stop let binding eval on error. Also don't continue into EVAL if
  error.
- if without a false position was freeing up too much when it
  finished.
- fix reader so that it doesn't keep incrementing ref cnt of static
  empty sequences.

7 years agoBasic: use static empty sequences in reader.
Joel Martin [Thu, 27 Oct 2016 01:43:17 +0000 (20:43 -0500)]
Basic: use static empty sequences in reader.

- Add vector and hash-map empty static sequences in types

7 years agovimscript: Use map and lambda in EvalAst
Dov Murik [Wed, 26 Oct 2016 08:19:38 +0000 (08:19 +0000)]
vimscript: Use map and lambda in EvalAst

7 years agovimscript: Remove useless calls to ObjQ
Dov Murik [Wed, 26 Oct 2016 07:33:22 +0000 (07:33 +0000)]
vimscript: Remove useless calls to ObjQ

7 years agovimscript: Remove calls to ObjType
Dov Murik [Wed, 26 Oct 2016 06:56:00 +0000 (06:56 +0000)]
vimscript: Remove calls to ObjType

7 years agovimscript: Remove calls to ObjValue
Dov Murik [Wed, 26 Oct 2016 06:46:20 +0000 (06:46 +0000)]
vimscript: Remove calls to ObjValue

7 years agoBasic: implement CALL in basicpp.py and use it.
Joel Martin [Wed, 26 Oct 2016 06:26:05 +0000 (01:26 -0500)]
Basic: implement CALL in basicpp.py and use it.

- Add clean rule to Makefile and restructure deps.

7 years agoDocumentation for the web-run functionality.
Chris McCormick [Wed, 26 Oct 2016 00:56:57 +0000 (08:56 +0800)]
Documentation for the web-run functionality.

7 years agovimscript: Simplify *ARGV* setting using map and lambda
Dov Murik [Tue, 25 Oct 2016 22:43:28 +0000 (22:43 +0000)]
vimscript: Simplify *ARGV* setting using map and lambda

7 years agovimscript: Update Dockerfile to install Vim 8.0
Dov Murik [Tue, 25 Oct 2016 22:06:08 +0000 (22:06 +0000)]
vimscript: Update Dockerfile to install Vim 8.0

7 years agovimscript: Use Vim 8.0 lambdas to reduce boilerplate code
Dov Murik [Tue, 25 Oct 2016 19:55:14 +0000 (19:55 +0000)]
vimscript: Use Vim 8.0 lambdas to reduce boilerplate code

7 years agovimscript: Increase the unixtime base to make sure time-ms fits in a *positive* integer
Dov Murik [Tue, 25 Oct 2016 19:54:03 +0000 (19:54 +0000)]
vimscript: Increase the unixtime base to make sure time-ms fits in a *positive* integer

7 years agovimscript: Fix misinformation in comment
Dov Murik [Tue, 25 Oct 2016 22:24:36 +0000 (22:24 +0000)]
vimscript: Fix misinformation in comment

7 years agoMerge pull request #239 from wasamasa/picolisp
Joel Martin [Tue, 25 Oct 2016 22:20:07 +0000 (17:20 -0500)]
Merge pull request #239 from wasamasa/picolisp

Picolisp

7 years agoAdd interop and tests
Vasilij Schneidermann [Tue, 25 Oct 2016 22:11:33 +0000 (00:11 +0200)]
Add interop and tests

7 years agoExtend README
Vasilij Schneidermann [Tue, 25 Oct 2016 21:43:32 +0000 (23:43 +0200)]
Extend README

7 years agoAdd docker support
Vasilij Schneidermann [Tue, 25 Oct 2016 20:39:32 +0000 (22:39 +0200)]
Add docker support

7 years agoMerge pull request #243 from wasamasa/assoc-update-tests
Joel Martin [Tue, 25 Oct 2016 16:15:03 +0000 (11:15 -0500)]
Merge pull request #243 from wasamasa/assoc-update-tests

Ensure assoc updates maps properly

7 years agoMerge pull request #242 from wasamasa/elisp-emacs25
Joel Martin [Tue, 25 Oct 2016 16:07:07 +0000 (11:07 -0500)]
Merge pull request #242 from wasamasa/elisp-emacs25

Emacs 25.1 fixes

7 years agoBasic: Reduce GOSUB use. Partial self-host to step3
Joel Martin [Tue, 25 Oct 2016 04:29:27 +0000 (23:29 -0500)]
Basic: Reduce GOSUB use. Partial self-host to step3

step4 runs out of space attempting to load the program. Step2 and
step3 run out of memory (stack exhaustion) for more complicated forms.

- Use GOTO with return label on our stack instead of GOSUB for:
    - APPLY function in types.in.bas
    - "apply", "map" and "swap!" core functions
- Implement DO TCO. Change EVAL_AST to detect if we are called from DO
  and exit one element early.
- Remove GOSUB recursion from EQUAL_Q
- Inline PAIR_Q. Reduce REPLACE stack use.
- Remove one level of GOSUB/stack by calling REP with GOTO
- Simplify mal/step2_eval.mal to remove use of (or ) macro in
  eval_ast.
- Fix ON GOTO/GOSUB line detection in basicpp

7 years agoAllow web exec of a .mal file via symlinked php script.
Chris McCormick [Sun, 16 Oct 2016 11:14:06 +0000 (19:14 +0800)]
Allow web exec of a .mal file via symlinked php script.
ln -s  mal.php myscript.php
Then create myscript.mal will get run when the user visits /myscript on a PHP capable webserver.