Re: [racket-users] distributed computation support for handin-server?

2018-10-25 Thread 'John Clements' via Racket Users
Another random thought; has anyone thought of pushing this out to the student computer, by supplying students with a hopefully-opaque executable that runs the tests on a student program and then outputs a digitally signed test result? John > On Oct 23, 2018, at 21:50, Greg Hendershott wrote:

Re: [racket-users] distributed computation support for handin-server?

2018-10-25 Thread Tom Gillespie
That is inviting the students with a more hackerish mentality to find ... alternative ways of scoring points. Probably better to not even entice them with the possibility, given the bureaucratic headaches that it could cause. Tom On Wed, Oct 24, 2018 at 11:11 PM 'John Clements' via Racket Users <

Re: [racket-users] confusion about call-with-current-continuation

2018-10-25 Thread Joao Pedro Abreu De Souza
Well, call/cc is like (in racket) delimited continuation, and have a implicit prompt around a s-exp, so, as begin is a macro, he don't create a prompt. The continuation captured is (+ 1 []) in your example. If you change the begin to a let, this works, because let expand to a application of a

Re: [racket-users] confusion about call-with-current-continuation

2018-10-25 Thread serioadamo97
Thank Joao I change my code like this: #lang racket ((lambda () (define saved-k #f) (println (+ 1 (call/cc (lambda (k) ; k is the captured continuation (set! saved-k k) 0 (println 'hello) (saved-k 100) )) Now it works as I expected. But why?

[racket-users] confusion about call-with-current-continuation

2018-10-25 Thread serioadamo97
Dear all, I am learning call/cc in racket, so I wrote some experiment code: #lang racket (begin (define saved-k #f) (+ 1 (call/cc (lambda (k) ; k is the captured continuation (set! saved-k k) 0))) (println 'hello) (saved-k 100) ;; why 'hello not print

Re: [racket-users] confusion about call-with-current-continuation

2018-10-25 Thread Joao Pedro Abreu De Souza
Shu-hung, very cool information. Em qui, 25 de out de 2018 às 16:57, Shu-Hung You < shu-hung@eecs.northwestern.edu> escreveu: > FWIW here's the part in the document that could be helpful: > > 1. The section in the Guide that talks about the concept of prompts > and their usage in the

Re: [racket-users] confusion about call-with-current-continuation

2018-10-25 Thread Joao Pedro Abreu De Souza
well, let's go by parts : 1) call/cc in principle will capture the complete continuation of a expression, right? Delimited continuation will capture ... welll, delimited continuations. But delimited by what? By a prompt. In a delimited contninuation style(not really, but I dont want to mix

Re: [racket-users] confusion about call-with-current-continuation

2018-10-25 Thread Shu-Hung You
FWIW here's the part in the document that could be helpful: 1. The section in the Guide that talks about the concept of prompts and their usage in the continuation in Racket: https://docs.racket-lang.org/guide/prompt.html The prompt is kind of like a mark on the continuations that lets the

Re: [racket-users] confusion about call-with-current-continuation

2018-10-25 Thread serioadamo97
About (+ 1 (prompt (* 2 (call/cc (lambda (k) (set! x k) 2) 1. "prompt" form does not exist in racket. It is a procedure application or special form ? 2. assume this procedure or special form exists to construct a prompt. (+ 1 (prompt (* 2 (call/cc (lambda (k) (set! x k) 2) After the