[racket] mobile agent in racket

2011-01-04 Thread Nevo
hi, I'm new to mobile agent, but i'm interested in that and plan to continue my study on that if possible. Now I'm required to prepare a proposal related with mobile agent and I want to use racket as the implementation language, but i'm not sure if this is really applicable, so i'm asking here fo

Re: [racket] gc and vectors

2011-01-04 Thread Greg Hendershott
> If you use for/flvector and in-flvector (esp. the extended in-flvector > that some good fellow added) this kind of code is quite pleasant. What is the extended in-flvector? On Tue, Jan 4, 2011 at 2:28 PM, Noel Welsh wrote: > On Tue, Jan 4, 2011 at 6:09 PM, Jos Koot wrote: >> Thanks for your r

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Richard Cleis
I wonder if Babbage had any idea how much trouble he was starting. rac On Jan 4, 2011, at 3:13 PM, Matthew Flatt wrote: > At Tue, 4 Jan 2011 14:39:39 -0700, Matthew Flatt wrote: >> Racket sets the x87 control word to use double precision instead of >> extended precision. That setting apparently

[racket] Extending the Racket GUI with native widgets

2011-01-04 Thread Thomas Chust
Hello, is it possible or even straightforward to implement the control<%> interface of the Racket GUI libraries using a native widget? I'm particularly interested in doing so for the GTK+ based Racket GUI libraries. More specifically, I'm trying to find out whether it's feasible to create a bindi

Re: [racket] gc and vectors

2011-01-04 Thread Jos Koot
As I said, I'll try. Thanks for your encouragement. Jos > -Original Message- > From: Noel Welsh [mailto:noelwe...@gmail.com] > Sent: 04 January 2011 20:28 > To: Jos Koot > Cc: users@racket-lang.org > Subject: Re: [racket] gc and vectors > > On Tue, Jan 4, 2011 at 6:09 PM, Jos Koot > w

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Matthew Flatt
At Tue, 4 Jan 2011 14:39:39 -0700, Matthew Flatt wrote: > Racket sets the x87 control word to use double precision instead of > extended precision. That setting apparently interferes with the pow() > C library function. The following page suggests that the problem is relatively specific to pow():

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Matthew Flatt
Ok, I see the problem, now. (When I tried earlier, I was confused about what I should be looking for.) Racket sets the x87 control word to use double precision instead of extended precision. That setting apparently interferes with the pow() C library function. Mac library functions use SSE for fl

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Richard Cleis
I wonder if it has something to do with the rounding switches in fenv.h. For example, the last elements are: -6.137094160310568e-05 -6.13709416031052e-05 The precision is different, and if the higher precision representation is rounded to the lower one, the 15th digit differs by 5. rac On

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread David Van Horn
On 1/4/11 3:55 PM, Richard Cleis wrote: Can you post the first few dozen elements of g-series? Ubuntu (Luke's behavior): Welcome to Racket v5.0.2. > (define (g-series n) (if (zero? n) empty (cons (expt -0.99 n) (g-series (sub1 n) > (take (g-series #i1000) 36) (4.3171247

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Michael Larson
>> Darwin doom.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 >> PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 >> Linux login 2.6.31-22-generic #60-Ubuntu SMP Thu May 27 00:22:23 UTC 2010 >> i686 GNU/Linux Rounding modes of the FPU? Or "Darwin Kernel Version 10.3.0" 10.3?

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Richard Cleis
Can you post the first few dozen elements of g-series? rac On Jan 4, 2011, at 1:41 PM, David Van Horn wrote: > On 1/4/11 3:26 PM, Carl Eastlund wrote: >> We're not looking for an explanation of why the two numbers are >> different. We're looking for an explanation of why, on Luke's >> machine,

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread David Van Horn
On 1/4/11 3:26 PM, Carl Eastlund wrote: We're not looking for an explanation of why the two numbers are different. We're looking for an explanation of why, on Luke's machine, unlike anybody else's here, they _aren't_ different. FWIW, I see Luke's behavior using 5.0.2 on login.ccs.neu.edu. The

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Richard Cleis
Oops. Sorry. I was interpreting the issue backwards. I don't have an explanation; Luke needs to show his numbers. Or I need to be in the lab where I can run it on Ubuntu, which doesn't seem likely to be the issue anyway. rac On Jan 4, 2011, at 1:26 PM, Carl Eastlund wrote: > Richard, > > We'

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Carl Eastlund
Richard, We're not looking for an explanation of why the two numbers are different. We're looking for an explanation of why, on Luke's machine, unlike anybody else's here, they _aren't_ different. Somehow I don't think portability issues in DrRacket are anybody's homework assignment. So if you

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Richard Cleis
I can explain it, but I don't know if it's revealing a solution. rac On Jan 4, 2011, at 12:32 PM, Stephen Chang wrote: > I get results similar to Carl. > > Welcome to DrRacket, version 5.0.1.7 [3m]. > Language: Intermediate Student. > #i-0.49746596003269394 > #i-0.4974659600326953 > #i-49746596

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Stephen Chang
I get results similar to Carl. Welcome to DrRacket, version 5.0.1.7 [3m]. Language: Intermediate Student. #i-0.49746596003269394 #i-0.4974659600326953 #i-4974659600326939.0 #i-4974659600326953.0 > (equal? (sum (g-series #i1000)) (accu-sum (g-series #i1000))) false > (equal? (* 10e15 (sum (g-series

Re: [racket] gc and vectors

2011-01-04 Thread Noel Welsh
On Tue, Jan 4, 2011 at 6:09 PM, Jos Koot wrote: > Thanks for your response, very quick as always. > I'll try flvectors first. > It will be like writing fortran with racket syntax. If you use for/flvector and in-flvector (esp. the extended in-flvector that some good fellow added) this kind of code

Re: [racket] gc and vectors

2011-01-04 Thread Jos Koot
Thanks for your response, very quick as always. I'll try flvectors first. It will be like writing fortran with racket syntax. I don't yet understand how a byte array can help me. I'll have to study the docs on this. Thanks, Jos > -Original Message- > From: Matthew Flatt [mailto:mfl...@cs.u

Re: [racket] gc and vectors

2011-01-04 Thread Matthew Flatt
You could use flvectors instead of vectors. If you feed numbers extracted from `flvector-ref' directly into `fl' arithmetic, and if you push numbers directly from `fl' arithmetic back into `flvector-set!', that might save allocation and speed things up. Otherwise, if you're spending so much time o

[racket] gc and vectors

2011-01-04 Thread Jos Koot
I have a simple program using vectors of inexact numbers. Half the time goes to garbage collection. I suppose that's because vectors effectively are internally arrays of pointers to the numbers. So reassigning an element to a vector may leave garbage. Do unsafe floating point vectors and operations

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Carl Eastlund
On Tue, Jan 4, 2011 at 9:38 AM, Luke Jordan wrote: > All that code came straight out of the text, except that I used if instead > of cond.  The sum, accu-sum, and g-series defs are all given.  In your Ah, yes, now I see where the accumulator-based sum is. Sorry, my mistake. > results I see a di

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Luke Jordan
All that code came straight out of the text, except that I used if instead of cond. The sum, accu-sum, and g-series defs are all given. In your results I see a difference. When I run it at home it's the same. I can even (equal? (sum (listof number)) (accu-sum (listof number))) and get true. On

Re: [racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-04 Thread Carl Eastlund
Luke, In the future, please do not post complete (or nearly complete) homework solutions to the list. Try to find a slightly more indirect way to ask your question -- we're happy to answer, we just don't want copy/paste solutions floating around. For now, though, here are the results I get with

Re: [racket] CGC embedding on win64

2011-01-04 Thread ugo
> You should be able to build the DLLs using MSVC and selecting the > "Debug" project. But that actually just turns off optimization; > debugging ".pdb" files are generated with the "Release" build. > > I'm not sure why the debugger wants "sgc.lib", since that's used only > for the "SGC" project.

Re: [racket] scribble and emacs

2011-01-04 Thread Eli Barzilay
It might be possible to hack something quick using `texinfo-mode'. On Friday, Noel Welsh wrote: > There is no Emacs mode for Scribble that I know of. > > N. > > On Fri, Dec 31, 2010 at 5:35 AM, Manfred Lotz wrote: > > Hi there, > > Is there highlighting support for scribble under emacs. It see

Re: [racket] setf in scheme

2011-01-04 Thread Eli Barzilay
On Thursday, Sam Tobin-Hochstadt wrote: > On Thu, Dec 30, 2010 at 10:34 AM, Razvan Rotaru wrote: > > > > I was just wondering whether there is anything like setf in > > scheme. As far as I know there isn't, so I'm asking you, the more > > experienced schemers out there. If not, why? Could it be cr