Results 89 comments of emixa-d

Have you considered not using eval but rather first compile the input, then load it in memory (as a thunk) and lastly invoke the thunk? IIUC, the first step is...

``` (define (block-fn flag sched resume) (define (commit) (match (atomic-box-compare-and-swap! flag 'W 'S) ('W (resume values)) ('C (commit)) ('S #f))) (when sched (schedule-task sched (lambda () (perform-operation (thread-operation th)) (commit)))))...

Also, 'thread-operation' -> 'thread-join-operation' is a clearer name.

``` (when sched (schedule-task sched (lambda () (perform-operation (thread-operation th)) (commit))))) ``` You are busy-looping here, which is bad for efficiency (CPU time/energy). You are also forgetting to implement the...

Have you considered not implementing thread-operation and instead make a condition variable and wrap the thunk of the new thread to signal the condition variable (upon success or otherwise, you...

> and stumbled upon an issue: we can't do [interruptable] eval inside fiber I don't see any fundamental problems with implementing interruption of individual fibers -- it seems a matter...

``` (wrap-operation (wait-operation cnd) (lambda () (format #t "condition signal recieved\n") 'recieved-cnd-signal)) ``` ``` (spawn-fiber (lambda () (sleep 5) (format #t "sending signal\n") (signal-condition! cnd))) ``` You are reimplementing 'sleep-operation'...

``` (let ((res (with-exception-handler (lambda (exception) `(exception-value ,exception)) (lambda () `(eval-value . ,(primitive-eval code)) ) #:unwind? #t))) ``` In a REPL, it would be useful to include a backtrace and...

(When building with Cargo, the test failure disappears)

I'm wondering if there's a difference in rounding between CPU models (on my computer, it passes): ``` processor : 0 vendor_id : AuthenticAMD cpu family : 23 model : 104...