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
|
||||
.npm
|
||||
.node-gyp
|
||||
.elm
|
||||
*/experiments
|
||||
*/node_modules
|
||||
*.o
|
||||
|
39
docs/TODO
39
docs/TODO
@ -7,17 +7,13 @@ General:
|
||||
./core.mal to ./lib directory
|
||||
|
||||
- Finish guide.md
|
||||
- Refactor ./run:
|
||||
- java: build step, don't use mvn to run
|
||||
- plpgsql: maybe combine wrap.sh and run
|
||||
- vhdl: combine run_vhdl.sh and run
|
||||
- vimscript: combine run_vimscript.sh and run
|
||||
- mention that identifier names are suggested. some have run
|
||||
into collisions with READ,EVAL,PRINT in case insensitive
|
||||
languages
|
||||
|
||||
All Implementations:
|
||||
- regular expression matching in runtest
|
||||
- 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
|
||||
|
||||
Other ideas for All:
|
||||
@ -55,15 +51,11 @@ Bash:
|
||||
|
||||
C:
|
||||
- come up with better way to do 20 vararg code
|
||||
- GC: use http://www.hboehm.info/gc/
|
||||
|
||||
C#:
|
||||
- accumulates line breaks with mal/clojurewest2014.mal
|
||||
- interop: http://www.ckode.dk/programming/eval-in-c-yes-its-possible/
|
||||
|
||||
Clojure:
|
||||
- fix "\/" exception in mal/clojurewest2014.mal
|
||||
|
||||
CoffeeScript:
|
||||
- make target to compile to JS
|
||||
|
||||
@ -77,9 +69,9 @@ Haskell:
|
||||
- immediately exits mal/clojurewest2014.mal ("\/" exception)
|
||||
|
||||
Java:
|
||||
- build step, don't use mvn in run script
|
||||
- Use gradle instead of mvn
|
||||
http://blog.paralleluniverse.co/2014/05/01/modern-java/
|
||||
- MAL formatting is a bit off with mal/clojurewest2014.mal
|
||||
|
||||
Javascript:
|
||||
- interop: adopt techniques from miniMAL
|
||||
@ -87,9 +79,6 @@ Javascript:
|
||||
Make:
|
||||
- allow '_' in make variable names
|
||||
- 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
|
||||
- GC: expore using "undefined" directive in Make 3.82
|
||||
|
||||
@ -97,9 +86,6 @@ Mal:
|
||||
- line numbers in errors
|
||||
- step5_tco
|
||||
|
||||
MATLAB:
|
||||
- Port to support both GNU Octave and MATLAB
|
||||
|
||||
miniMAL:
|
||||
- figure out why {} literals are "static"/persistent
|
||||
|
||||
@ -107,6 +93,9 @@ ObjPascal:
|
||||
- verify that GC/reference counting works
|
||||
- fix comment by itself error at REPL
|
||||
|
||||
plpgsql:
|
||||
- maybe combine wrap.sh and run
|
||||
|
||||
Perl:
|
||||
- fix metadata on native functions
|
||||
- fix extra line breaks at REPL
|
||||
@ -116,6 +105,14 @@ Postscript:
|
||||
- fix blank line after comments
|
||||
- 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:
|
||||
- tracebacks in errors
|
||||
- fix running from different directory
|
||||
@ -129,3 +126,9 @@ Rust:
|
||||
Scala
|
||||
- readline
|
||||
- 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
|
||||
(title2 " __ __ _ _")
|
||||
(title2 "| \/ | / \ | |")
|
||||
(title2 "| |\/| | / _ \ | | ")
|
||||
(title2 "| | | |/ ___ \| |___ ")
|
||||
(title2 "|_| |_/_/ \_\_____|"))
|
||||
(title2 "| \\/ | / \\ | |")
|
||||
(title2 "| |\\/| | / _ \\ | | ")
|
||||
(title2 "| | | |/ ___ \\| |___ ")
|
||||
(title2 "|_| |_/_/ \\_\\_____|"))
|
||||
(list
|
||||
(title "gherkin")
|
||||
"- 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
|
||||
control structures macros. Here are the string arguments for `rep`
|
||||
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)))))))"
|
||||
* `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))
|
||||
except reader.Blank: continue
|
||||
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]
|
||||
rescue Exception => e
|
||||
puts "Error: #{e}"
|
||||
puts "\t#{e.backtrace.join("\n\t")}"
|
||||
puts "\t#{e.backtrace[0..100].join("\n\t")}"
|
||||
end
|
||||
end
|
||||
|
@ -127,6 +127,7 @@ class Runner():
|
||||
new_data = new_data.decode("utf-8") if IS_PY_3 else new_data
|
||||
#print("new_data: '%s'" % new_data)
|
||||
debug(new_data)
|
||||
# Perform newline cleanup
|
||||
if self.no_pty:
|
||||
self.buf += new_data.replace("\n", "\r\n")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user