Re: [racket] performance problem in math/matrix

2013-01-21 Thread Neil Toronto
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) flmatrix* : FlArray FlArray -> FlArray Results so far, measured in DrRacket wit

Re: [racket] ffi->SendMessageTimeoutW

2013-01-21 Thread heraklea
Ahh, yes you are right. I compare it with the results in c++. There I get an Error_success in getlasterror(), thatswhy I was a little bit confused about the ERROR_PATH_NOT_FOUND in (GetLastError) in Racket. Thank you very much. Yours, Racket Users list: http://lists.

Re: [racket] Many datums in syntax-parse

2013-01-21 Thread Greg Hendershott
Have you tried using define-syntax-class to define some of the "intermediate chunks"? For example would it help if you were to define a syntax class for old-date, another for time-of-day, and compose old-timestamp from those? On Mon, Jan 21, 2013 at 3:04 PM, Lorenz Köhl wrote: > How can I match

Re: [racket] performance problem in math/matrix

2013-01-21 Thread Berthold Bäuml
> > I just did that. Here are the types: > > real-matrix* : (Array Real) (Array Real) -> (Array Real) > > flonum-matrix* : (Array Flonum) (Array Flonum) -> (Array Flonum) > > flmatrix* : FlArray FlArray -> FlArray > > Results so far, measured in DrRacket with debugging off: > > Function

[racket] Many datums in syntax-parse

2013-01-21 Thread Lorenz Köhl
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 ((~datum old-timestamp) ((~datum old-date) month day) ((~d

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

2013-01-21 Thread Neil Toronto
On 01/21/2013 02:48 AM, Pierpaolo Bernardi wrote: Hello, what's the most convenient way to convert between math/matrices and FFI/arrays? To reduce the scope of the question, at the moment I'm only interested in conversions from and to the following FFI types: (_array _double 3 3) (_array _

Re: [racket] variables within macros

2013-01-21 Thread Matthias Felleisen
I have considered adding something like this to the DrRacket teaching languages for HtDP. For an ordinary programmer, this conveys that tests do NOT prove anything but that the function works on the supplied test cases. Absolutely useful. Note: 30 years ago, this macro was the beginning of a

Re: [racket] ffi->SendMessageTimeoutW

2013-01-21 Thread Thomas Chust
Hello, your code looks fine to me. On my virtualized installation of Windows XP it runs flawlessly and the call to SendMessageTimeoutW returns with (= r4 1), which is a successful result according to the Win32 API documentation [1]. The result of GetLastError is meaningless in that context, s

Re: [racket] variables within macros

2013-01-21 Thread Tim Brown
On 21/01/13 05:22, Eli Barzilay wrote: (Ah, and that explains the `define/test'. I don't know what's the time-frame involved, but something that would be more ambitious would be a language where the source code must have enough tests to get complete coverage...) Time frame is the end of the mo

Re: [racket] performance problem in math/matrix

2013-01-21 Thread Jens Axel Søgaard
2013/1/21 Tobias Hammer : > The attached patch should fix it. Thanks! /Jens Axel Racket Users list: http://lists.racket-lang.org/users

Re: [racket] variables within macros

2013-01-21 Thread Tim Brown
On 20/01/13 22:26, Matthias Felleisen wrote: On Jan 20, 2013, at 6:35 AM, Tim Brown wrote: On Jan 18, 2013, at 12:36 PM, Tim Brown wrote: A concrete example is that I am trying to write a #lang language. Honestly, I would never ever try to write a #lang first. That's more than most people wan

Re: [racket] performance problem in math/matrix

2013-01-21 Thread Tobias Hammer
The attached patch should fix it. Tobias On Sun, 20 Jan 2013 15:09:42 +0100, Jens Axel Søgaard wrote: Hi Berthold, 2013/1/20 Berthold Bäuml : I tried a little test with mildly large Flonum matrices using math/matrix in Typed Racket. Two 1000x1000 dimensional matrices should be multipli

Re: [racket] ffi->SendMessageTimeoutW

2013-01-21 Thread heraklea
Thank you very much, but if I understand you right, I make it so: [Code_Begin] #lang racket (require ffi/com ffi/unsafe ffi/unsafe/define ffi/winapi racket/string racket/format) (define _HKEY (_cpointer/null 'HKEY)) (define _HANDLE (_cpointer/null '

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

2013-01-21 Thread Pierpaolo Bernardi
Hello, what's the most convenient way to convert between math/matrices and FFI/arrays? To reduce the scope of the question, at the moment I'm only interested in conversions from and to the following FFI types: (_array _double 3 3) (_array _double 3) (_array _double 2 3) Thanks! P. __