mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
Misc fixes and TODO updates.
- Truncate ruby and python stacktraces since they can get very long in certain cases causing problems. - Fix Clojure West example with proper escaping.
This commit is contained in:
parent
115e430d02
commit
e17aef048e
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,7 @@
|
|||||||
.sbt
|
.sbt
|
||||||
.npm
|
.npm
|
||||||
.node-gyp
|
.node-gyp
|
||||||
|
.elm
|
||||||
*/experiments
|
*/experiments
|
||||||
*/node_modules
|
*/node_modules
|
||||||
*.o
|
*.o
|
||||||
|
39
docs/TODO
39
docs/TODO
@ -7,17 +7,13 @@ General:
|
|||||||
./core.mal to ./lib directory
|
./core.mal to ./lib directory
|
||||||
|
|
||||||
- Finish guide.md
|
- Finish guide.md
|
||||||
- Refactor ./run:
|
- mention that identifier names are suggested. some have run
|
||||||
- java: build step, don't use mvn to run
|
into collisions with READ,EVAL,PRINT in case insensitive
|
||||||
- plpgsql: maybe combine wrap.sh and run
|
languages
|
||||||
- vhdl: combine run_vhdl.sh and run
|
|
||||||
- vimscript: combine run_vimscript.sh and run
|
|
||||||
|
|
||||||
All Implementations:
|
All Implementations:
|
||||||
- regular expression matching in runtest
|
- regular expression matching in runtest
|
||||||
- add re (use in rep) everywhere and use that (to avoid printing)
|
- add re (use in rep) everywhere and use that (to avoid printing)
|
||||||
- per impl tests for step5_tco, or at least a better way of
|
|
||||||
enabling/disabling/tweaking per implementation
|
|
||||||
- fix stepA soft failures: lua matlab miniMAL perl racket
|
- fix stepA soft failures: lua matlab miniMAL perl racket
|
||||||
|
|
||||||
Other ideas for All:
|
Other ideas for All:
|
||||||
@ -55,15 +51,11 @@ Bash:
|
|||||||
|
|
||||||
C:
|
C:
|
||||||
- come up with better way to do 20 vararg code
|
- come up with better way to do 20 vararg code
|
||||||
- GC: use http://www.hboehm.info/gc/
|
|
||||||
|
|
||||||
C#:
|
C#:
|
||||||
- accumulates line breaks with mal/clojurewest2014.mal
|
- accumulates line breaks with mal/clojurewest2014.mal
|
||||||
- interop: http://www.ckode.dk/programming/eval-in-c-yes-its-possible/
|
- interop: http://www.ckode.dk/programming/eval-in-c-yes-its-possible/
|
||||||
|
|
||||||
Clojure:
|
|
||||||
- fix "\/" exception in mal/clojurewest2014.mal
|
|
||||||
|
|
||||||
CoffeeScript:
|
CoffeeScript:
|
||||||
- make target to compile to JS
|
- make target to compile to JS
|
||||||
|
|
||||||
@ -77,9 +69,9 @@ Haskell:
|
|||||||
- immediately exits mal/clojurewest2014.mal ("\/" exception)
|
- immediately exits mal/clojurewest2014.mal ("\/" exception)
|
||||||
|
|
||||||
Java:
|
Java:
|
||||||
|
- build step, don't use mvn in run script
|
||||||
- Use gradle instead of mvn
|
- Use gradle instead of mvn
|
||||||
http://blog.paralleluniverse.co/2014/05/01/modern-java/
|
http://blog.paralleluniverse.co/2014/05/01/modern-java/
|
||||||
- MAL formatting is a bit off with mal/clojurewest2014.mal
|
|
||||||
|
|
||||||
Javascript:
|
Javascript:
|
||||||
- interop: adopt techniques from miniMAL
|
- interop: adopt techniques from miniMAL
|
||||||
@ -87,9 +79,6 @@ Javascript:
|
|||||||
Make:
|
Make:
|
||||||
- allow '_' in make variable names
|
- allow '_' in make variable names
|
||||||
- hash-map with space in key string
|
- hash-map with space in key string
|
||||||
- Fix: make -f stepA_mal.mk ../mal/step6_file.mal
|
|
||||||
(slurp "../tests/incA.mal")
|
|
||||||
(read-string "(+ 2 3)")
|
|
||||||
- errors should propagate up from within load-file
|
- errors should propagate up from within load-file
|
||||||
- GC: expore using "undefined" directive in Make 3.82
|
- GC: expore using "undefined" directive in Make 3.82
|
||||||
|
|
||||||
@ -97,9 +86,6 @@ Mal:
|
|||||||
- line numbers in errors
|
- line numbers in errors
|
||||||
- step5_tco
|
- step5_tco
|
||||||
|
|
||||||
MATLAB:
|
|
||||||
- Port to support both GNU Octave and MATLAB
|
|
||||||
|
|
||||||
miniMAL:
|
miniMAL:
|
||||||
- figure out why {} literals are "static"/persistent
|
- figure out why {} literals are "static"/persistent
|
||||||
|
|
||||||
@ -107,6 +93,9 @@ ObjPascal:
|
|||||||
- verify that GC/reference counting works
|
- verify that GC/reference counting works
|
||||||
- fix comment by itself error at REPL
|
- fix comment by itself error at REPL
|
||||||
|
|
||||||
|
plpgsql:
|
||||||
|
- maybe combine wrap.sh and run
|
||||||
|
|
||||||
Perl:
|
Perl:
|
||||||
- fix metadata on native functions
|
- fix metadata on native functions
|
||||||
- fix extra line breaks at REPL
|
- fix extra line breaks at REPL
|
||||||
@ -116,6 +105,14 @@ Postscript:
|
|||||||
- fix blank line after comments
|
- fix blank line after comments
|
||||||
- fix command line arg processing (doesn't run file specified)
|
- fix command line arg processing (doesn't run file specified)
|
||||||
|
|
||||||
|
Powershell:
|
||||||
|
- convert function with "abc_def" to "abc-def"
|
||||||
|
- remove extraneous return statements at end of functions
|
||||||
|
- remove unnecessary semi-colons
|
||||||
|
- use ArrayList instead of Array for performance
|
||||||
|
- new test to test Keys/keys as hash-map key
|
||||||
|
- test *? predicates with nil
|
||||||
|
|
||||||
R:
|
R:
|
||||||
- tracebacks in errors
|
- tracebacks in errors
|
||||||
- fix running from different directory
|
- fix running from different directory
|
||||||
@ -129,3 +126,9 @@ Rust:
|
|||||||
Scala
|
Scala
|
||||||
- readline
|
- readline
|
||||||
- fix exception when finished running something on command line
|
- fix exception when finished running something on command line
|
||||||
|
|
||||||
|
VHDL:
|
||||||
|
- combine run_vhdl.sh and run
|
||||||
|
|
||||||
|
vimscript:
|
||||||
|
- combine run_vimscript.sh and run
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
(list
|
(list
|
||||||
(list
|
(list
|
||||||
(title2 " __ __ _ _")
|
(title2 " __ __ _ _")
|
||||||
(title2 "| \/ | / \ | |")
|
(title2 "| \\/ | / \\ | |")
|
||||||
(title2 "| |\/| | / _ \ | | ")
|
(title2 "| |\\/| | / _ \\ | | ")
|
||||||
(title2 "| | | |/ ___ \| |___ ")
|
(title2 "| | | |/ ___ \\| |___ ")
|
||||||
(title2 "|_| |_/_/ \_\_____|"))
|
(title2 "|_| |_/_/ \\_\\_____|"))
|
||||||
(list
|
(list
|
||||||
(title "gherkin")
|
(title "gherkin")
|
||||||
"- a lisp1 written in bash4")
|
"- a lisp1 written in bash4")
|
||||||
|
@ -1329,6 +1329,7 @@ implementation. Let us continue!
|
|||||||
* In the main program, use the `rep` function to define two new
|
* In the main program, use the `rep` function to define two new
|
||||||
control structures macros. Here are the string arguments for `rep`
|
control structures macros. Here are the string arguments for `rep`
|
||||||
to define these macros:
|
to define these macros:
|
||||||
|
* TODO: note throw is not present until step9
|
||||||
* `cond`: "(defmacro! cond (fn* (& xs) (if (> (count xs) 0) (list 'if (first xs) (if (> (count xs) 1) (nth xs 1) (throw \"odd number of forms to cond\")) (cons 'cond (rest (rest xs)))))))"
|
* `cond`: "(defmacro! cond (fn* (& xs) (if (> (count xs) 0) (list 'if (first xs) (if (> (count xs) 1) (nth xs 1) (throw \"odd number of forms to cond\")) (cons 'cond (rest (rest xs)))))))"
|
||||||
* `or`: "(defmacro! or (fn* (& xs) (if (empty? xs) nil (if (= 1 (count xs)) (first xs) `(let* (or_FIXME ~(first xs)) (if or_FIXME or_FIXME (or ~@(rest xs))))))))"
|
* `or`: "(defmacro! or (fn* (& xs) (if (empty? xs) nil (if (= 1 (count xs)) (first xs) `(let* (or_FIXME ~(first xs)) (if or_FIXME or_FIXME (or ~@(rest xs))))))))"
|
||||||
|
|
||||||
|
@ -97,4 +97,4 @@ while True:
|
|||||||
print(REP(line))
|
print(REP(line))
|
||||||
except reader.Blank: continue
|
except reader.Blank: continue
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("".join(traceback.format_exception(*sys.exc_info())))
|
print("".join(traceback.format_exception(*sys.exc_info())[0:100]))
|
||||||
|
@ -103,6 +103,6 @@ while line = _readline("user> ")
|
|||||||
puts REP[line]
|
puts REP[line]
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
puts "Error: #{e}"
|
puts "Error: #{e}"
|
||||||
puts "\t#{e.backtrace.join("\n\t")}"
|
puts "\t#{e.backtrace[0..100].join("\n\t")}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -127,6 +127,7 @@ class Runner():
|
|||||||
new_data = new_data.decode("utf-8") if IS_PY_3 else new_data
|
new_data = new_data.decode("utf-8") if IS_PY_3 else new_data
|
||||||
#print("new_data: '%s'" % new_data)
|
#print("new_data: '%s'" % new_data)
|
||||||
debug(new_data)
|
debug(new_data)
|
||||||
|
# Perform newline cleanup
|
||||||
if self.no_pty:
|
if self.no_pty:
|
||||||
self.buf += new_data.replace("\n", "\r\n")
|
self.buf += new_data.replace("\n", "\r\n")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user