jscl
jscl copied to clipboard
A Lisp-to-JavaScript compiler bootstrapped from Common Lisp
This allows numbers to be used as hash-table keys, since they are crudely converted to strings. Closes #424
I'm trying to use `MutationObserver` object to catch a DOM change using the following code (can be reproduced in JSCL console): ``` (defparameter obs (jscl::make-new (jscl::oget (jscl::%js-vref "window") "MutationObserver") (lambda...
ABCL: ``` CL-USER(1): (defstruct foo "it's a foo") FOO CL-USER(2): (documentation 'foo 'type) "it's a foo" ``` JSCL: ``` CL-USER> (defstruct foo "it's a foo") ERROR: "it's a foo" is...
Sequence functions (map, concatenate) should also work on these specifiers: - simple-string - simple-base-string - base-string - simple-vector - bit-vector Are there others? I can't find the related resource in...
ABCL: ``` CL-USER(1): (typep #(1 2) '(simple-vector 2)) T ``` JSCL ``` CL-USER> (typep #(1 2) '(simple-vector 2)) ERROR: Unknown type-specifier (SIMPLE-VECTOR 2). ```
https://github.com/jscl-project/jscl/blob/98376589572908d26c33ad536228abd6672a1dfd/src/boot.lisp#L158 ```lisp CL-USER> (fboundp '(what the f..k ?)) T CL-USER> ```
https://github.com/jscl-project/jscl/blob/98376589572908d26c33ad536228abd6672a1dfd/src/conditions.lisp#L123 ```lisp CL-USER> (warn "a ~a b ~a" 1 2) WARNING: a (1 2) b NIL NIL CL-USER> ```
Currently we have a hack to support `(defun (setf name) ...)`, but `(setf X)` doesn't work as proper functions. They can't be used with `fdefinition` or `function`. ## Suggestions /...
https://github.com/jscl-project/jscl/blob/dd613aa7a2f09591bccbfc3f4c727c98a867cae2/src/hash-table.lisp#L39 The current release of the hash table does not work correctly with numeric keys. ```lisp CL-USER> (gethash 1 qq ) ERROR: activechars.join is not a function ```
`If function-name is a [list](http://clhs.lisp.se/Body/26_glo_l.htm#list) it must be of the form (setf symbol). If (fboundp function-name) is [false](http://clhs.lisp.se/Body/26_glo_f.htm#false), a new [generic function](http://clhs.lisp.se/Body/26_glo_g.htm#generic_function) is created. If (fdefinition function-name) is a [generic...