Jakub T. Jankiewicz
Jakub T. Jankiewicz
`case` macro was reverted because it took to long to execute unit tests 600% slowdown after adding that macro. This will need to wait for compiling/transforming all macros away before...
Great post on StackOverflow about TCO and Continuations, it's multiple answers by the same person: [How to adapt trampolines to Continuation Passing Style?](https://stackoverflow.com/q/57733363/387194)
this lips macros can be used as base: ```scheme ;; --------------------------------------------------------------------------------------- (define-macro (module name . body) "(module module-name . body) Macro for defining modules inside you can use define to...
Speed test, array based code is much faster even that that is lambda that invoke the interpreter in each iteration: ```scheme (define (get-zeros data) (--> data (split "\n") (filter (lambda...
The different is huge Simple array methods: ``` real 0m2,536s user 0m3,113s sys 0m0,094s ``` do macro: ``` real 0m44,835s user 0m45,418s sys 0m0,133s ``` Probably each lambda slow down...
This is probably the fastest function: ```scheme (define (get-zeros data) (let ((re #/ZERO;Nd;/ )) (--> data (split "\n") (filter (lambda (line) (line.match re))) (map (lambda (line) (let* ((parts (line.split ";"))...
I should probably use some benchmarking tool to test performance: This SO question have example of using Benchmark.js. [How to profile Javascript now that JSPerf is down?](https://stackoverflow.com/a/37808777/387194) But the usage...
Literals regexes are slightly faster, probably because they are created in parser and getting value from scope chain is slower. ``` >>> Regex: variable x 28.59 ops/sec ±2.58% (51 runs...
This is a fundametal error, exceptions don't stop the execution: ```scheme (try (begin (print 'foo) (print 'bar) (throw 'ZONK) (print 'baz) (print 'quux)) (catch (e) (print e))) ;; ==> foo...
Another idea is to create a stack of error handlers and handle errors by hand instead of using functions. Maybe try..catch needs to be in the core of `evaluate` (but...