kimtg / closhure Goto Github PK
View Code? Open in Web Editor NEWLisp for .NET
License: The Unlicense
Lisp for .NET
License: The Unlicense
It seems that Closhure gets confused with decimal separators and commas on a German Windows installation where ',' is the decimal separator:
Entering "1.0" doesn't work, "1,0" seems to be read as two forms, floating point numbers are written written with a ',' as a decimal separator, though. See the REPL transcript below:
C:\robert\Closhure\bin\Debug>Closhure.exe
Closhure 0.6
Special forms:
. and catch def defmacro do doseq finally fn if import let loop new or quasiquote quote recur reify set! try unquote unquote-splicing
Defined symbols:
1.0
System.FormatException: Die Eingabezeichenfolge hat das falsche Format.
bei System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
bei System.Double.Parse(String s)
bei Closhure.Core.parse(TextReader r, String tok) in c:\robert\Closhure\Core.cs:Zeile 1525.
bei Closhure.Core.parse(TextReader r) in c:\robert\Closhure\Core.cs:Zeile 1433.
bei Closhure.Core.repl() in c:\robert\Closhure\Core.cs:Zeile 1138.
1,0
1
0
(/ 1 3)
0,333333333333333
I tried some backquote forms. Regular backquotes work great, nested (double) backquote forms don't seem to work, see the examples below.
Nested backquotes are quite a bit of work to get right, I won't be mad if you decide to leave things as is and close this issue.
That said, here are four samples, the first two work, the last two fail:
; from http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm
(def a "A") (def c "C") (def d '("D" "DD")) `((~a b) ~c ~@d)
; ==> (("A" b) "C" "D" "DD")
; ok
; from r7rs.pdf p. 21
(let [a 3] `((1 2) ~a ~4 ~'five 6))
; ==> ((1 2) 3 4 five 6)
; ok
; from Ansi Common Lisp pp413, (def a 1) actually seems unneeded
(def x 'a) (def a 1) (def y 'b) (def b 2.0) (eval ``(w ~x ~~y))
; expected: ==> (w a 2.0)
; actual: System.Exception: Unable to resolve symbol: unquote
; homegrown sample, "expected" shows one possible result, other valid results exist
(def ccc 'cccval) ``(aaa ~bbb ~~ccc)
; expected: ==> (list (quote aaa) bbb cccval)
; actual: System.Exception: Unable to resolve symbol: bbb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.