Re: [racket] Many datums in syntax-parse

2013-01-22 Thread Ryan Culpepper
I've added #:datum-literals (I couldn't bring myself to use either #:datums or #:data). Ryan On 01/22/2013 02:23 PM, Danny Yoo wrote: On Mon, Jan 21, 2013 at 1:04 PM, Lorenz Köhl wrote: How can I match datums more concisely with syntax-parse? I get syntax objects like this from ragg: #'(o

[racket] Unicode Question

2013-01-22 Thread Nick Sivo
Hi, In the attached file, use of string-normalize-nfc truncates the string. Is this expected? I tried on Mac and Windows, using 5.2.1, 5.3.1, and the latest nightly. According to http://unicode.org/reports/tr15/ form C might alter the bytes, but shouldn't change the displayed form, let alone tr

Re: [racket] When does 3D syntax get marshalled?

2013-01-22 Thread J. Ian Johnson
I found that this example does NOT work if you take the use of M out of its expression context. Problem program: #lang racket (require racket/stxparam racket/splicing) (define-syntax-parameter p #f) (define-syntax-rule (M id body) (splicing-let-syntax ([id (let* ([p-tr (syntax-par

Re: [racket] performance problem in math/matrix

2013-01-22 Thread Jens Axel Søgaard
2013/1/22 Berthold Bäuml : > On 22.01.2013, at 06:19, Neil Toronto wrote: >> On 01/21/2013 04:33 PM, Berthold Bäuml wrote: >>> For the latter it would be great if one could even change the used library >>> to, >>> e.g., redirect to a installation of the highly efficient MKL library from >>> In

Re: [racket] performance problem in math/matrix

2013-01-22 Thread Berthold Bäuml
On 22.01.2013, at 06:19, Neil Toronto wrote: > On 01/21/2013 04:33 PM, Berthold Bäuml wrote: >> >>> >>> I just did that. Here are the types: >>> >>> real-matrix* : (Array Real) (Array Real) -> (Array Real) >>> >>> flonum-matrix* : (Array Flonum) (Array Flonum) -> (Array Flonum) >>> >>> f

Re: [racket] math/matrix <--> FFI/array

2013-01-22 Thread Neil Toronto
On 01/22/2013 12:33 PM, Tobias Hammer wrote: When you pass it directly to c-code, maybe you can completely bypass the array and convert matrix -> flarray -> flvector -> cpointer the last 3 conversions should be blazing fast but i guess that won't matter much for 16 elements. Neil, can you neverth

Re: [racket] "Streaming" gunzip-through-ports hangs?

2013-01-22 Thread Greg Hendershott
> You may want to add a call to close-output-port after the gunzip; > otherwise, the pipe's still open, and blocking for additional > content. Doh. Thank you! On Tue, Jan 22, 2013 at 2:47 PM, Danny Yoo wrote: > On Tue, Jan 22, 2013 at 12:40 PM, Greg Hendershott > wrote: >> I'd like to take an

Re: [racket] "Streaming" gunzip-through-ports hangs?

2013-01-22 Thread Danny Yoo
On Tue, Jan 22, 2013 at 12:40 PM, Greg Hendershott wrote: > I'd like to take an input-port that I know has gzip encoded bytes, and > return a new input-port port that will return the decoded bytes. I > don't want to suck the entire bytes into memory. Instead I want to > "stream" them as-needed. >

[racket] "Streaming" gunzip-through-ports hangs?

2013-01-22 Thread Greg Hendershott
I'd like to take an input-port that I know has gzip encoded bytes, and return a new input-port port that will return the decoded bytes. I don't want to suck the entire bytes into memory. Instead I want to "stream" them as-needed. It _seems_ like I could do this is with a combination of `make-pipe`

Re: [racket] math/matrix <--> FFI/array

2013-01-22 Thread Tobias Hammer
When you pass it directly to c-code, maybe you can completely bypass the array and convert matrix -> flarray -> flvector -> cpointer the last 3 conversions should be blazing fast but i guess that won't matter much for 16 elements. Neil, can you nevertheless tell me more about the expected perf

Re: [racket] Many datums in syntax-parse

2013-01-22 Thread Danny Yoo
On Mon, Jan 21, 2013 at 1:04 PM, Lorenz Köhl wrote: > How can I match datums more concisely with syntax-parse? > > I get syntax objects like this from ragg: > > #'(old-timestamp (old-date 2 23) (time-of-day 2 ":" 23 ":" 42)) > > The parts I care about are the numbers. I write patterns like > > ((~

Re: [racket] When does 3D syntax get marshalled?

2013-01-22 Thread J. Ian Johnson
Here is a concrete example that is an outline of what I do. It works. However, in my project, when I replace F with the form that I actually defined and mix in more for p's transformer, I get that new-tr cannot be marshalled in the compiled code. This baffles me. #lang racket (module A racket

Re: [racket] current-load/use-compiled and old .zo files

2013-01-22 Thread Gustavo Massaccesi
Thanks. Yesterday I tested the two ideas a few times. I tried with _raco make_, but it only can compile one file, not every file in the folder. I found _raco setup -l _ more useful. I created a collection that include all my files and then compiled it. It's also useful because it follows the pref

[racket] When does 3D syntax get marshalled?

2013-01-22 Thread J. Ian Johnson
I have a fairly crazy macro that chains together syntax transformers that are stored in syntax-parameters to get a sort of "macro mix-in" if you will. In order to do this, I have code that looks like the following: (define old-tr (syntax-parameter-value #'p)) (define new-tr (syntax-parser [(_ bla

Re: [racket] variables within macros

2013-01-22 Thread Matthias Felleisen
No, I am just saying the very idea was considered brilliant 30 years ago. On Jan 22, 2013, at 3:57 AM, Tim Brown wrote: > On 21/01/13 17:13, Matthias Felleisen wrote: >> Absolutely useful. Note: 30 years ago, this macro was the beginning of >> an ACM award-winning dissertation on "program syn