Re: [racket] Sending a cvector to foreign functions.

2011-01-24 Thread Lewis
Right you are Noel it turns out the C code had a few bugs of its own. I have independently tested it now, and all is working fine from there. The C prototype is now void render(int x_camera, int y_camera, Visual pc, Tile* world); However I still get the error. http://paste.pocoo.org/show/326448

Re: [racket] [REQ] multi-column-list-box% planned?

2011-01-24 Thread Laurent
In the meantime, here is a column-list% that supports multi-columns, sorting, and synchronizes the lists on events, but alas there is no event for scrolling (couldn't find one at least). Sorry about the non-existent documentation, but you can find a test at the end of the file. Laurent On Mon, J

Re: [racket] (string? "c'est ne pas une string")

2011-01-24 Thread Vincent St-Amour
At Mon, 24 Jan 2011 19:53:00 +0100, Jos Koot wrote: > That's ok with me, as long the sentence reads 'Ceci n'est pas une ???'. It's now fixed in git. Thanks for the report ;). Vincent _ For list-related administrative tasks: http://lists.racket-

Re: [racket] function equality with contracts

2011-01-24 Thread Eric Tanter
Just tried my example on 5.0.99.6 and it indeed works. That was just in time! -- Éric On Jan 24, 2011, at 6:35 PM, Eric Tanter wrote: > Great, that's a much happier reply than your previous one, indeed :-) > > Thanks!! > > -- Éric > > > On Jan 24, 2011, at 6:33 PM, Robby Findler wrote: >

Re: [racket] function equality with contracts

2011-01-24 Thread Eric Tanter
Great, that's a much happier reply than your previous one, indeed :-) Thanks!! -- Éric On Jan 24, 2011, at 6:33 PM, Robby Findler wrote: > Ugh. Please excuse my previous reply. I completely forgot about a > change to the contract system (that I helped with a little bit but > that Stevie and Ma

Re: [racket] function equality with contracts

2011-01-24 Thread Robby Findler
Ugh. Please excuse my previous reply. I completely forgot about a change to the contract system (that I helped with a little bit but that Stevie and Matthew did most of the work for). If you change eqv? in your code to equal?, you should get #t back. You'll need the pre-release version, tho. This

Re: [racket] function equality with contracts

2011-01-24 Thread Robby Findler
No. Consider instead using structure properties to make a value that can be applied like a function but has other accessors that led you define how you want equality to work. Robby On Mon, Jan 24, 2011 at 3:15 PM, Eric Tanter wrote: > Sorry, I don't get it. I'm not asking from a theoretical poi

Re: [racket] function equality with contracts

2011-01-24 Thread Eric Tanter
Sorry, I don't get it. I'm not asking from a theoretical point of view, but from a very practical, racket point of view, of two functions being eqv. Concretely: ;; tmp.rkt #lang racket (define f (λ (x) x)) (define ((pred f1) f2) (eqv? f1 f2)) (define eq-f (pred f)) (provide/contract [f (-> intege

Re: [racket] function equality with contracts

2011-01-24 Thread Matthias Felleisen
On Jan 24, 2011, at 2:41 PM, Eric Tanter wrote: > Hi all, > > From the DLS'10 paper of Stephen and Matthias, it says "the class system must > determine that two classes are equal modulo contract wrapping". > > I'm interested in that exact property but for functions. Ie. how do we > determine

[racket] function equality with contracts

2011-01-24 Thread Eric Tanter
Hi all, >From the DLS'10 paper of Stephen and Matthias, it says "the class system must >determine that two classes are equal modulo contract wrapping". I'm interested in that exact property but for functions. Ie. how do we determine if two functions are "equal" modulo contract wrapping? Thank

Re: [racket] (string? "c'est ne pas une string")

2011-01-24 Thread Jos Koot
That sounds even better. I look4ed the words up in my dictionaries and in wikipedia, but apperently I did not look sharp enough. Jos > -Original Message- > From: Cyprien Nicolas [mailto:c.nico...@gmail.com] > Sent: 24 January 2011 19:49 > To: Jos Koot > Cc: users@racket-lang.org > Subject

Re: [racket] gc and vectors

2011-01-24 Thread Jos Koot
I have tried fxvectors and it reduces GC time very much. I also found that on my dual core/processor machine, I can use a future alongside de main program in order to assign values to the vector parallelly (of course making sure that the two processes do not access the same elements) I came up to 1

Re: [racket] (string? "c'est ne pas une string")

2011-01-24 Thread Vincent St-Amour
At Mon, 24 Jan 2011 12:56:10 -0600, Robby Findler wrote: > Would the Académie française approve of this joke? Certainly not of my version. They're not especially fond of anglicisms. Vincent _ For list-related administrative tasks: http://lists.r

Re: [racket] (string? "c'est ne pas une string")

2011-01-24 Thread Robby Findler
Would the Académie française approve of this joke? Robby On Mon, Jan 24, 2011 at 12:49 PM, Vincent St-Amour wrote: > At Mon, 24 Jan 2011 19:01:41 +0100, > Jos Koot wrote: >> In the guide I found the following example: >> (string? "c'est ne pas une string") >> Clearly after  

Re: [racket] (string? "c'est ne pas une string")

2011-01-24 Thread Jos Koot
That's ok with me, as long the sentence reads 'Ceci n'est pas une ???'. Jos > -Original Message- > From: Vincent St-Amour [mailto:stamo...@ccs.neu.edu] > Sent: 24 January 2011 19:49 > To: Jos Koot > Cc: users@racket-lang.org > Subject: Re: [racket] (string? "c'est ne pas une string") > >

Re: [racket] (string? "c'est ne pas une string")

2011-01-24 Thread Vincent St-Amour
At Mon, 24 Jan 2011 19:01:41 +0100, Jos Koot wrote: > In the guide I found the following example: > (string? "c'est ne pas une string") > Clearly after René > Magritte. > But I don't think this is correct french. > Of course the previous sentence i

Re: [racket] (string? "c'est ne pas une string")

2011-01-24 Thread Cyprien Nicolas
On 01/24/2011 07:01 PM, Jos Koot wrote: > In the guide I found the following example: > (string? "c'est ne pas une string") > Clearly after René Magritte > . > But I don't think this is correct french. > Of course the previous sentence is not, for it

[racket] (string? "c'est ne pas une string")

2011-01-24 Thread Jos Koot
In the guide I found the following example: (string? "c'est ne pas une string") Clearly after René Magritte. But I don't think this is correct french. Of course the previous sentence is not, for it is English, I hope. I would write: (string? "Ceci

Re: [racket] [REQ] multi-column-list-box% planned?

2011-01-24 Thread Matthew Flatt
At Mon, 24 Jan 2011 17:29:40 +, Erich Rast wrote: > This is my annual reminder/question whether a multi-column-list-box% > with a native look-and-feel is planned anytime soon for racket? As soon as I can get to it. _ For list-related administ

[racket] [REQ] multi-column-list-box% planned?

2011-01-24 Thread Erich Rast
Dear all, This is my annual reminder/question whether a multi-column-list-box% with a native look-and-feel is planned anytime soon for racket? Now that the graphical foundations have been mostly rewritten this would make a good candidate for a new feature in a future update. Best, Erich __

Re: [racket] Handling bits

2011-01-24 Thread Jens Axel Søgaard
2011/1/24 Michael Coppola : > Hola Racketeers, > > I'm writing a program that performs a lot of binary math, and I was > wondering if there were any established ways in the Racket language to > handle bits or just C-style binary arithmetic in general.  For instance, > the C language lets you store

Re: [racket] cp-write: error writing (Socket is not connected; errno=57)

2011-01-24 Thread Noel Welsh
Sorry, I don't have anymore ideas. I guess you have to reuse sockets. N. On Fri, Jan 21, 2011 at 6:45 AM, Niitsuma Hirotaka wrote: >>Try adding a delay to the loop. > > I added (sleep 5) after http-get > But same err was caused > _ For list-relate

Re: [racket] First meaningful experiment.

2011-01-24 Thread Noel Welsh
I had a brief look. I would define a maze datastructure and then a bunch of functions that create instances of this datastructure. Then write a function that, given a dc renders a maze instance. This is much more in the functional style. HTH, N. On Sat, Jan 22, 2011 at 1:32 AM, Alexandre Moreira

Re: [racket] Autotest like tool help

2011-01-24 Thread Eduardo Bellani
Hello Matthias. Thanks for the help. Your code, unsurprisingly, is much superior. This module is now closer to what I had in mind when I started. There is still a lot to be desired by the output but it is useful for me, which according to my metric is a great result. Here is your version with some

Re: [racket] Handling bits

2011-01-24 Thread Neil Van Dyke
As Jos said, there are the bitwise operations. There's even an operation to pick out an arbitrary range of bits. http://docs.racket-lang.org/reference/generic-numbers.html#(part._.Bitwise_.Operations) I have used these bitwise operations to in my Racket consulting work recently, for data conv

Re: [racket] pretty-printing example output in Scribble manual?

2011-01-24 Thread Richard Cobbe
On Sun, Jan 23, 2011 at 07:31:16PM -0700, Matthew Flatt wrote: > At Sun, 23 Jan 2011 17:03:07 -0500, Richard Cobbe wrote: > > Is there a way to get Scribble's @example form to pretty-print its output? > > [...] > > I'm already using a custom evaluator for the examples, so I looked for a > > way to

Re: [racket] Sending a cvector to foreign functions.

2011-01-24 Thread Noel Welsh
It is really hard to say (and debug). Have you independently tested the C code? N. On Mon, Jan 24, 2011 at 5:50 AM, Lewis wrote: > Greetings, > > I am trying to send a racket cvector to a C function in a lib I a > writing. The C function in question has the prototype > ... > > Unfortunately, whe

Re: [racket] Handling bits

2011-01-24 Thread Veer
If your data is always a "string" over 0,1 then you can write like this (which is similar to yours) (define (bit-and b1 b2) (if (char=? b1 #\0) b1 b2)) (define (bitwise f str1 str2) (for/fold ((res "")) ((b1 str1) (b2 str2)) (string-append res (string (f b1 b2) (bitwise b

Re: [racket] Handling bits

2011-01-24 Thread Jos Koot
You can use positive exact integers with bitwise operations. Look for the word 'bitwise' in the docs. Use (number->string n 2) for display of the bitstring n. You may have to add leading zero's when you want a specific number of bits to be shown. Jos > -Original Message- > From: users-bou

[racket] [ANN] Geiser 0.1.1 released

2011-01-24 Thread Jose A. Ortega Ruiz
I'm happy to announce a new release of Geiser, the extended Emacs/Scheme interaction thingie for Guile and Racket. Version 0.1.1 is mainly a bug fix release (autodoc improvements, no more *spurious* buffer pop-ups and doc improvements), with a couple of new featurettes. See geiser's homepage (ht

[racket] Handling bits

2011-01-24 Thread Michael Coppola
Hola Racketeers, I'm writing a program that performs a lot of binary math, and I was wondering if there were any established ways in the Racket language to handle bits or just C-style binary arithmetic in general. For instance, the C language lets you store any arbitrary byte to a buffer and perf