[racket] Invitation to use Google Talk

2012-11-16 Thread Google Talk
--- You've been invited by Patrick Mahoney to use Google Talk. If you already have a Google account, log in to Gmail and accept this chat invitation: http://mail.google.com/mail/b-d371d9a09c-ddf4a7fac4-RCos8lKLd6hSh5IjXr1lAjsva20

Re: [racket] Why this code snippet from document does not work?

2012-11-16 Thread Monica Tomson
Yeah, my original version is 5.2.1. Now it works on the new version. Thanks, Eric! --Monic On Fri, Nov 16, 2012 at 11:52 PM, Eric Dobson wrote: > This example runs fine for me, but likely would not run fine on older > versions of racket (before submodules were released). > > I believe 5.3 added

Re: [racket] Why this code snippet from document does not work?

2012-11-16 Thread Eric Dobson
This example runs fine for me, but likely would not run fine on older versions of racket (before submodules were released). I believe 5.3 added support for submodules and 5.3.1 was released recently. What version of racket are you running? Running (version) will tell you. On Fri, Nov 16, 2012 a

[racket] Why this code snippet from document does not work?

2012-11-16 Thread Monica Tomson
Hi, I want to use some quoted module name, and read this page in Racket documentation: http://docs.racket-lang.org/guide/Module_Syntax.html In the section 6.2.3, submodules, the code is: #lang racket (module

[racket] How to make eval work on define?

2012-11-16 Thread Monica Tomson
Hi, When I use eval on an S-Expression, where there are something like (define len (...)), racket screams at me define: not allowed in an expression context in: (define len (make-length 10)) My questions are: - How to make eval work on definition? - If eval is not designed to work on defin

[racket] How can I unsplice a list of expression into code?

2012-11-16 Thread Monica Tomson
Hi, I have an experiment for my project, basically, I need to *embedded* some s-expression into the code and make it run, like this, (define (test lst) (define num 1) (define l (list)) `@lst) ; oh, this is not the right way to go. (define lst `( (define num2 (add1 num)) (

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Robby Findler
This is a special case just to make life more convenient: we know that no matter what boundary 'amount' crosses, it is going to trigger a violation and it will blame that module, so we don't wait. Robby On Fri, Nov 16, 2012 at 8:24 PM, Harry Spier wrote: > Thanks Matthias. > > Why does the first

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Harry Spier
Thanks Matthias. Why does the first case which doesn't cross a module boundary cause a contract violation. #lang racket (provide/contract (amount positive?)) (define amount -7) On Fri, Nov 16, 2012 at 8:24 PM, Matthias Felleisen wrote: > > Contracts really are like business contracts. They ar

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Matthias Felleisen
Contracts really are like business contracts. They are between two distinct parties; they are not by a party on itself. On occasion, you really do want to wish to break the contract inside a module. This is well-known in the OO world, and it is often called the re-entrance problem. Say you wa

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Galler
> > Even if you use define/contract, you may violate the contract on recursive calls. This is intentional. > Thanks. I hadn't run into that behavior before and wasn't aware. Could you possibly elaborate on the thinking wrt this design choice? (define/contract (my-natural-number n) (-> exa

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Matthias Felleisen
p.s. Contracts are not types. Even if you use define/contract, you may violate the contract on recursive calls. This is intentional. On Nov 16, 2012, at 7:13 PM, Matthias Felleisen wrote: > > First cut: Contracts check cross-module invariants. That's why they establish > boundaries: >

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Galler
Use (define/contract... to enforce a contract within a module (define/contract (amount) (-> positive?) -7) #| amount: broke its contract promised: positive?, produced: -7 in: the range of (-> positive?) contract from: (function amount) blaming: (function amount) at: unsav

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Matthias Felleisen
First cut: Contracts check cross-module invariants. That's why they establish boundaries: http://doc.racket-lang.org/guide/contract-boundaries.html?q=contracts When a module M provides a function f with a contract, calls w/i M to f are not checked. Second cut: if you know about contract reg

[racket] Why this contract violation behaviour?

2012-11-16 Thread Harry Spier
Dear list members, Can someone explain why in the following cases only two out of the three cases and not all of them cause a contract violation. Thanks, Harry Spier #lang racket (provide/contract (amount positive?)) (define amount -7) > contract promised: positive? produced: -7 in: positive? con

Re: [racket] On Cooperating Macros

2012-11-16 Thread Ray Racine
Thanks for answering on a Friday night. I'll limit my questions to one and do some more homework now that you've reduced the search space. Regarding, "The *only* way for module A to affect the compilation of module B in any way is for module B to require (directly or indirectly) module A. And

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Jon Rafkind
Ok it might be due to the dh_strip rule. I have overriden it to do nothing for now. Let's see if tomorrows package works. On 11/16/2012 04:09 PM, Kevin Tew wrote: It looks stripped to me! no .debug sections. ➜ ~/temp/usr/bin git:(master) ✗ objdump -h racket Fri Nov 16 11 2012 04:07:16 PM: r

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Diogo F. S. Ramos
Jon Rafkind writes: > Looking over the build log it doesn't look like the racket binary is stripped. > > https://launchpadlibrarian.net/122407607/buildlog_ubuntu-raring-amd64.racket_5.3.1.5-20121108~raring_BUILDING.txt.gz It would be nice if someone with the same system of mine (Ubuntu 12.04 x86

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Kevin Tew
It looks stripped to me! no .debug sections. ➜ ~/temp/usr/bin git:(master) ✗ objdump -h racket Fri Nov 16 11 2012 04:07:16 PM: racket: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 001c 00400270 00400270 0270 2**0 CONTENTS, ALLOC, LO

Re: [racket] On Cooperating Macros

2012-11-16 Thread Ryan Culpepper
On 11/16/2012 05:16 PM, Ray Racine wrote: I've run across a few things mentioning cooperating macros, something I'm working through. Consider the following in a source file "nest.rkt" https://gist.github.com/4090877 So in this example each expansion of the two defined macros in the `nest' modul

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Jon Rafkind
Looking over the build log it doesn't look like the racket binary is stripped. https://launchpadlibrarian.net/122407607/buildlog_ubuntu-raring-amd64.racket_5.3.1.5-20121108~raring_BUILDING.txt.gz On 11/16/2012 08:46 AM, Diogo F. S. Ramos wrote: Matthew Flatt writes: Does the executable from

[racket] On Cooperating Macros

2012-11-16 Thread Ray Racine
I've run across a few things mentioning cooperating macros, something I'm working through. Consider the following in a source file "nest.rkt" https://gist.github.com/4090877 So in this example each expansion of the two defined macros in the `nest' module sees mutually mutable state at meta level

[racket] Racket error reporting and the console window

2012-11-16 Thread Harry Spier
1) Is there some way to keep the console window open when a racket executable reports an error? (I'm a Windows user) For this example, the racket console window closes before I can read the contract violation message: #lang racket (provide/contract [amount positive?]) (define amount 0) This also

Re: [racket] realm of racket (roar!)

2012-11-16 Thread Eric Tanter
The following works: $ echo '#lang racket "hello world"' > hw.rkt $ racket hw.rkt "hello world" ie. racket is a multi-language language, so you must first tell it in what language you're writing. That's of course an overhead compared to mono-language languages ;) -- Éric On Nov 16, 2012, at

Re: [racket] realm of racket (roar!)

2012-11-16 Thread Robby Findler
More work! :) On Fri, Nov 16, 2012 at 12:27 PM, Grant Rettke wrote: > What is in it for the Racket maintainers to have it gain popularity? > > On Fri, Nov 16, 2012 at 12:09 PM, Ray Racine wrote: >> I liked it overall. Racket has advanced so rapidly over the last few years, >> it really needs to

Re: [racket] realm of racket (roar!)

2012-11-16 Thread Grant Rettke
What is in it for the Racket maintainers to have it gain popularity? On Fri, Nov 16, 2012 at 12:09 PM, Ray Racine wrote: > I liked it overall. Racket has advanced so rapidly over the last few years, > it really needs to be re-introduced and hopefully will gain a footing and > some sort of viral

Re: [racket] realm of racket (roar!)

2012-11-16 Thread Ray Racine
I liked it overall. Racket has advanced so rapidly over the last few years, it really needs to be re-introduced and hopefully will gain a footing and some sort of viral growth. Marketing is persistence. On Wed, Nov 14, 2012 at 9:54 AM, Matthias Felleisen wrote: > > It is a pleasure to share so

Re: [racket] realm of racket (roar!)

2012-11-16 Thread Anthony Carrico
Also, the example doesn't work: $ echo '"hello world"' > hw.rkt $ racket hw.rkt default-load-handler: expected a `module' declaration found: something else in: # context...: standard-module-name-resolver -- Anthony Carrico signature.asc Description: OpenPGP digital signature ___

Re: [racket] realm of racket (roar!)

2012-11-16 Thread Anthony Carrico
I hate to say it but after an initial laugh, that video strikes me as mostly just snarky and dishonest. A literal isn't the same thing as I/O, and brevity doesn't have much to do with why I like Racket. What is the point? Maybe it would make sense with some context. Sorry if my reaction bothers an

Re: [racket] 80-bit precision in Racket

2012-11-16 Thread Neil Toronto
On 11/15/2012 01:35 PM, Joe Marshall wrote: On Thu, Nov 15, 2012 at 12:13 PM, Dmitry Pavlov mailto:dpav...@ipa.nw.ru>> wrote: > "In hindsight, the use of quad precision appears to have been overly > conservative for this problem" Might be, and may still be, but the precision of

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Diogo F. S. Ramos
Matthew Flatt writes: > Does the executable from the package have debugging info stripped away? > The Racket JIT needs some DWARF information to reconstruct the call > stack for backtraces and profiling on x86_64. I don't know if my method is conclusive, but running `gdb' with the package's exec

Re: [racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Matthew Flatt
Does the executable from the package have debugging info stripped away? The Racket JIT needs some DWARF information to reconstruct the call stack for backtraces and profiling on x86_64. At Fri, 16 Nov 2012 13:18:54 -0200, Diogo F. S. Ramos wrote: > I'm using Ubuntu 12.04 x86_64 and the statistical

[racket] Statistical profiler doesn't return a complete report with JIT

2012-11-16 Thread Diogo F. S. Ramos
I'm using Ubuntu 12.04 x86_64 and the statistical profiler is not returning a report with the procedures called during the execution of a thunk. The package installed through the PPA (using apt-get) was `5.3.1-20121108~precise'. I've attached a test program at the bottom of this message. When th

Re: [racket] Performance measurement per each thread

2012-11-16 Thread Matthew Flatt
At Fri, 16 Nov 2012 15:33:39 +0900, 주대연 wrote: > Hi I am a student in master course for Computer Engineering. > > I am studying Racket for my research. > My one of goals is to measure the performance(cpu usages, memory, i/o..etc) > of each thread. > > So I have two questions... > > 1) CPU, I/O u

Re: [racket] 80-bit precision in Racket

2012-11-16 Thread Dmitry Pavlov
Matthew, The changes you have made make much sense to us, thanks! Right now we are looking into JIT and we plan to make our changes starting from Monday 26. If you plan to bring significant changes to JIT after that day, then no problem, please give a notice--we can rearrange our plans. Regards