Re: [racket-users] Error when trying to run MzScheme v372 Web Server Servlet

2016-05-11 Thread 'John Clements' via Racket Users
> On May 11, 2016, at 1:52 PM, Eric Domeshek wrote: > > This is a question for the way-back machine: I have a system built in > MzScheme v372 that I just tried to fire up. I got the following error > message: > > >

[racket-users] Error when trying to run MzScheme v372 Web Server Servlet

2016-05-11 Thread Eric Domeshek
This is a question for the way-back machine: I have a system built in MzScheme v372 that I just tried to fire up. I got the following error message: C:\Users\domeshek\Desktop\METTLE-372>.\PLT\MZScheme.exe --load PLT\METTLE.ss Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme

[racket-users] Replicate Term in Redex

2016-05-11 Thread Benjamin Chung
A use case I'm running up against a lot in Redex is when I have some pattern that's matching some number (let's say n) of elements, and I want to replace all of them with n of the same element. Take the following language: (define-language L (e number (e ...))) Suppose we now want to

Re: [racket-users] Typo in syntax-class documentation?

2016-05-11 Thread Ryan Culpepper
On 05/11/2016 03:16 AM, Tim Brown wrote: I found this in the documentation for syntax-class (Link to this section with @secref["stxparse-attrs" #:doc '(lib "syntax/scribblings/syntax.scrbl")]): Consider the following code: (define-syntax-class quark (pattern (a b ...)))

Re: [racket-users] Re: for/list in-query

2016-05-11 Thread Ryan Culpepper
You might find this function helpful (from the implementation of in-query): (define (in-list/vector->values vs) (make-do-sequence (lambda () (values (lambda (p) (vector->values (car p))) cdr vs pair? #f #f Ryan On 05/04/2016 09:46 AM, Denis

[racket-users] Accessing/ Manually saving Text in Buffer.

2016-05-11 Thread Normal Loone
Hello, I want to write a plugin for DrRacket that saves all the text that is currently written in the Buffer (where you write the code) every time the person stops typing. The code will later be compared the progress calculated. How does one access the text written in the buffer? Are there

Re: [racket-users] slow mutable-array-data

2016-05-11 Thread Berthold Bäuml
Here a corrected code example with (collect-garbage) to make time measurement more deterministic and the results (still mutable-array-data is 50% slower than element-wise access): #lang racket (require math/array) (define arr (mutable-array #[#[1. 2. 3.] #[4. 5. 6.]])) (define

Re: [racket-users] DrRacket debugger error

2016-05-11 Thread WarGrey Gyoudmon Ju
Just mention here: I met this error message when invoking a function with keyword arguments within the class body (but not method body). The simplest solution is to wrap the function application in another function that do not passed with keyword arguments. (define toolbar-snip% : Toolbar-Snip%

[racket-users] slow mutable-array-data

2016-05-11 Thread Berthold Bäuml
Converting a mutable-array into a vector in Racket (not Typed Racket) seems to be faster when done element-wise instead of using mutable-array-data. Why is this? I always thought crossing the untyped/typed boundary as little as possible makes things run faster. This little test program

Re: [racket-users] Why no "type checking" for C arrays?

2016-05-11 Thread Berthold Bäuml
That’s what I needed. Thanks! Berthold > On 10 May 2016, at 18:59, Matthew Flatt wrote: > > That's an oversight. I'll push an improvement. > > Even with the improvement I have now, checking is not as complete as > you might like. The check ensures that an array value has

[racket-users] Typo in syntax-class documentation?

2016-05-11 Thread Tim Brown
I found this in the documentation for syntax-class (Link to this section with @secref["stxparse-attrs" #:doc '(lib "syntax/scribblings/syntax.scrbl")]): Consider the following code: (define-syntax-class quark (pattern (a b ...))) (syntax-parse some-term [(x