Git Product home page Git Product logo

closhure's People

Contributors

kimtg avatar mayerrobert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mayerrobert

closhure's Issues

Floating point values on Windows 10 with german locale settings

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:

    • command-line-args / + < <= = == > >= apply eval filter fold gensym instance? list load-file load-string macroexpand map mod nil? not not= nth pr print println prn quot range read read-line read-string slurp spit str symbol type
      Macros:
      defn dotimes when while

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

System.Exception with nested backquote forms

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.