1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 18:48:12 +03:00
Commit Graph

1481 Commits

Author SHA1 Message Date
Joel Martin
97df14cdaf plsql (Oracle PL/SQL): Copy plpgsql. Step0,1 basics. 2016-05-22 00:16:01 -06:00
Joel Martin
20e8dea043 Refactor to use run scripts, remove *_RUNSTEP
- Add */run script for every implementation.

- Refactor Clojure build to allow individual jar files for each step.

- Update FFI version for es6 and miniMAL to work with newer node
  versions.

The run scripts for the following could use some additional
refactoring:
- java: build individual step jar, use java -jar instead of mvn to run
- plpgsql: maybe combine plpgsql/run and plpgsql/wrap.sh
- vhdl: combine vhdl/run and vhdl/run_vhdl.sh
- vimscript: combine vimscript/run and vimscript/run_vimscript.sh
2016-05-18 22:29:18 -07:00
Joel Martin
f8985c0cb0 Merge pull request #212 from dubek/argv-testing
tests: Test *ARGV* is set correctly in step 6
2016-05-17 12:08:38 -05:00
Dov Murik
37a33ac72e scala: Run steps directly from jar file
The Scala build will create a mal.jar file with all the steps' classes
in it.  A `run` wrapper script will run that jar with a specific step
main class according to the `$STEP` environment variable.  Now the jar
file is created only once (when testing step0) and then re-used for
testing the next steps, which should speed up the build.

Moreover, sbt now prepends shell script header to the jar file, so no
need to implement this in Makefile (for the `dist` target).
2016-05-16 11:25:42 -04:00
Dov Murik
31cc710f06 make: Clean script output; skip test for command-line argument with spaces
Add --no-print-directory to make implementation execution so it only
prints the actual output from a Mal script.

Alos, since the make implementation can't handle spaces in a
command-line argument, we skip this test.
2016-05-15 00:05:09 -04:00
Dov Murik
27a8252525 matlab: Add 'run' script to handle command-line args
The 'run' wrapper script escapes and creates the proper matlab/octave
command-line, replacing definitions from the main Makefile.
2016-05-14 23:55:30 -04:00
Dov Murik
e09f1b102a java: Add 'run' script which quotes arguments correctly 2016-05-14 23:42:58 -04:00
Dov Murik
09dce03504 io: Add wrapper to swallow startup message from Io interpreter
The `io/run` script will run the io interpreter on a step file given in
the `$STEP` environment variable.  It'll swallow the first 25 bytes
printed by the interpreter because they are a startup message about the
Io Regex module (and can't be suppressed in a normal way).
2016-05-13 10:20:31 -04:00
Joel Martin
fac46c23e0 Merge pull request #213 from dubek/time-ms-fixes
cpp, erlang: time-ms fixes
2016-05-12 16:30:57 -05:00
Dov Murik
b85c07fd07 factor: Set *ARGV* and run command-line script correctly in step6-stepA 2016-05-12 08:51:19 -04:00
Dov Murik
8a16f95375 r: Fix setting *ARGV* 2016-05-11 16:29:33 -04:00
Dov Murik
5f5c06e20c js: Fix setting *ARGV* in step6 & step7 2016-05-11 16:11:18 -04:00
Dov Murik
a1a3a8df2c fsharp: When executing a mal script, don't print the final return value 2016-05-11 16:01:15 -04:00
Dov Murik
61635e5f31 erlang: Fix time-ms to return milliseconds since epoch 2016-05-11 15:53:42 -04:00
Dov Murik
10ba42b883 cpp: Make integer values 64-bit so they can holds time-ms values 2016-05-11 15:52:55 -04:00
Dov Murik
e2d4f00fc0 erlang: When executing a mal script, don't print the final return value 2016-05-11 15:51:22 -04:00
Dov Murik
2f8f48e12c cpp: When executing a mal script, don't print the final return value 2016-05-11 15:50:19 -04:00
Dov Murik
65a2fffd31 ocaml: Remove debug prints in step6 & step7 2016-05-11 15:48:21 -04:00
Dov Murik
d3c401c1e8 tests: Test *ARGV* is set correctly in step 6
Add new mini test harness run_argv_test.sh to run the Mal interpreter
with different command-line arguments and test the stdout of that
process.

The main Makefile will automatically run the new harness whenever step 6
is tested (either directly or during REGRESS=1 of a more advanced step).
2016-05-11 11:31:04 -04:00
Joel Martin
b9768061c0 Merge pull request #211 from dubek/racket-fix-argv
racket: Set *ARGV* correctly
2016-05-11 09:03:50 -05:00
Dov Murik
61c7bc86a4 racket: Set *ARGV* correctly 2016-05-11 09:02:36 -04:00
Joel Martin
c4dd3eb8c4 Merge pull request #210 from dubek/test-slurp-newline
tests: Test slurp captures final newline in step6
2016-05-10 12:41:44 -05:00
Dov Murik
2cd015e56a tests: Test slurp captures final newline in step6 2016-05-10 12:36:06 -04:00
Joel Martin
c1ef46cb04 Link to cheatsheet at gh-pages. 2016-05-10 10:43:38 -05:00
Joel Martin
a15f76bd80 Add cheatsheet. Link to it from guide. 2016-05-10 10:34:05 -05:00
Joel Martin
a1eb30fcc9 Use more common spelling of deferrable.
Deferable is apprently a less common but correct spelling.
2016-05-10 10:26:39 -05:00
Joel Martin
46e2568944 Makefile/runtest/tests: deferable/optional options
- tests/*: marked with deferable and optional runtest flags. Some
  moving around of tests within different sections to more closely
  align with the guide.
- runtest.py has --deferable/--no-deferable and
  --optional/--no-optional to control whether tests marked as
  deferable and optional are tested.
- Makefile: DEFERABLE and OPTIONAL top level flags to be passed to
  runtest when running tests.
- Also, fix problems in java quoting revealed by step7 test changes.
2016-05-09 21:14:15 -05:00
Joel Martin
4b7ee8fa27 guide: update step9, stepA diagrams.
- Add single arg `prn` as mandatory in step4 (for testing do
  side-effects).
- Re-order some deferables in the guide to more closely match the
  tests.
2016-05-09 17:46:42 -05:00
Joel Martin
dfa6d64050 Merge pull request #208 from dubek/vim-fix-time-ms
vimscript:  implement time-ms in C
2016-05-09 11:13:30 -05:00
Joel Martin
ffd41afd7d Merge pull request #209 from dubek/python-interop
python: Fix interop (py*, py!*)
2016-05-09 11:12:21 -05:00
Dov Murik
a5bdda6d64 python: Fix interop (py*, py!*)
py!*: Fix to work on both Python 2 and 3.

py*: Python types are converted to Mal types where applicable.

Added tests for Python interop.
2016-05-09 01:39:45 -04:00
Dov Murik
c19139e1af docs/Hints: vimscript no longer shells out in time-ms 2016-05-09 00:21:15 -04:00
Dov Murik
fddf570fd1 vimscript: implement time-ms in a C function
Instead of shelling out to `date`, implement time-ms as a C function in
the vimextras.c library (which was already used for readline()).

Since Vim numbers can only hold numbers up to 32-bit, we return the
number of milliseconds since 2000 and not since 1970.
2016-05-09 00:18:04 -04:00
Dov Murik
d831996cfb vimscript: rename libvimreadline -> libvimextras 2016-05-09 00:12:32 -04:00
Joel Martin
342b49ccf8 Merge pull request #207 from dubek/vhdl
Add VHDL implementation
2016-05-05 15:30:46 -05:00
Dov Murik
d14053739b vhdl: Update Dockerfile, add Travis-CI build 2016-05-05 16:06:28 -04:00
Dov Murik
36e91db404 Add VHDL implementation 2016-05-05 14:50:12 -04:00
Dov Murik
817316df0c docs/Hints: add questions about command-line arguments 2016-05-04 21:25:58 -04:00
Joel Martin
ae964c6865 Hints.md: fix formatting. 2016-05-04 14:24:04 -05:00
Joel Martin
df5589d9d7 Add Hints wiki page. 2016-05-04 01:10:34 -05:00
Joel Martin
53a418e455 plpgsql: fix env.sql envs.sql in stats target. 2016-05-03 12:21:57 -05:00
Joel Martin
85ccb9eb44 plpgsql: fix Makefile stats targets. 2016-05-03 12:19:49 -05:00
Joel Martin
494792abe4 plpgsql: schema namespaces. refactor IO.
- move each file to a schema namespace. Don't recreate DB, just the
  schemas. This is much faster and avoids the error about user still
  using the DB when recreating the DB.
- combine RUN and MAIN_LOOP into MAIN routine.
- add open column to streams table
- close stream 1 in MAIN
2016-05-02 23:37:16 -05:00
Joel Martin
fa52cda6f7 plpgsql: another attempt using travis user. 2016-05-02 23:37:16 -05:00
Joel Martin
67cc8a15a2 plpgsql: try again with Travis user/sudo permissions.
This time sudo inside the entrypoint only for starting postgres
service.
2016-05-02 23:37:16 -05:00
Joel Martin
68e4df99aa plpgsql: set WORKDIR in Dockerfile. 2016-05-02 23:37:16 -05:00
Joel Martin
7d93e81246 plpgsql: minor tweaks to Dockerfile to work with Travis.
Travis runs as user 1001, make that a user in the container too and
use sudo to launch the entrypoint as the postgres user.
2016-05-02 23:37:16 -05:00
Joel Martin
7fa2dba78a Travis: enable plpgsql. 2016-05-02 23:37:16 -05:00
Joel Martin
b25bf8d8d0 plpgsql: add to README. 2016-05-02 23:37:16 -05:00
Joel Martin
08e44c41d6 plpgsql: testing via Makefile/Docker container.
- Add Dockerfile for an image with postgres installed that
  automatically starts the server when the docker image is started.
- Fix Unicode issue with keywords that caused "requested character too
  large for encoding: 670" when used with rebuilt docker image.
  Switched from 0x29e (670) to 0x7f (127) as the keyword string
  prefix.
- Add default PSQL user as "postgres" in wrap.sh
2016-05-02 23:37:16 -05:00