[racket] DrRacket Plugins require drracket/too-lib alone seems to cause error

2013-09-08 Thread Stephen De Gabrielle
Hi, 'raco setup -l tool-name' fails for tools with only '(require drracket/too-lib)' fails with an unknown signature error[1] Requiring 'drracket/tool' resolves the error, but this doesn't match the plugins documentation. (e.g. http://download.racket-lang.org/docs/5.3.6/html/tools/ ) I don't kno

Re: [racket] Understanding GC when working with streams

2013-09-08 Thread Stephen Chang
Konrad's exactly right. Your filtered-nums blows up because you named the stream and then traversed the entire thing. In general, if you hang onto the head of the stream while traversing then the GC can't collect anything because since you have a pointer to the head, every element of the stream is

Re: [racket] removing a plugin from /collects

2013-09-08 Thread Laurent
If you installed it as a collection with `raco link`, then you can remove it with `raco link --remove`. If you installed it as a package (containing a collection) with `raco pkg install --link` (or `raco pkg install` for that matter), you can remove it with `raco pkg remove`. (Nowadays the latter o

[racket] removing a plugin from /collects

2013-09-08 Thread Stephen De Gabrielle
Hi, I'm teaching myself how to create DrRacket plugins. I couldn't find a raco command to delete a plugin so deleted the collects/tool-name/compiled folder. Is DrRacket caching the tools somewhere? I'm using v5.90.0.9 Cheers, Stephen -- Stephen De Gabrielle

Re: [racket] a problem with image.rkt teachpack

2013-09-08 Thread Elena Machkasova
This would alleviate the confusion, thank you! But I agree that now is an awkward time to push the change: many schools are just starting their semester, and a change at this point may make some notes obsolete right at the beginning of the semester. My students should be ok at this point: we h

[racket] raco exe error help

2013-09-08 Thread Joe Gibbs Politz
I got the following error from raco exe, and could use some pointers in turning it into something actionable. I think I just don't have a very good mental model of what raco exe is trying to do. Here's the output: $ raco exe -o binary /main.rkt find-module: module referenced both as a library a

Re: [racket] a problem with image.rkt teachpack

2013-09-08 Thread Robby Findler
Okay, I've made a first attempt on two changes aimed at fixing these problems. 1) change the "image.rkt" to "htdp/image.rkt" and "2htdp/image.rkt" so there are no names that are exactly the same 2) have the teachpack dialog be sensitive to the already installed teachpacks and give a warning when

Re: [racket] Contracts error message

2013-09-08 Thread Robby Findler
Thank you for your thought, Dan. Here are some of mine in return. I would say that there are several separate things going on here and we'd benefit from separating them in our discussion. As I understand them, contract violations are separate from stack traces. A contract violation is the discover

Re: [racket] Contracts error message

2013-09-08 Thread Daniel Prager
For the consideration of Robby et al: The clearest run-time errors I ever received were dumped out of SmallEiffel / SmartEiffel in response to contract violations. These were stack-traces that -- critically -- included parameter values and local state information for each stack frame. Blame for

Re: [racket] a problem with image.rkt teachpack

2013-09-08 Thread Elena Machkasova
Thanks, Robby and Marco! Yes, such things may be difficult to change - that's totally understandable! I think a significant part of the confusion is that these teachpacks are listed under "Pre-installed" which seems to mean that they are already there when DrRacket is installed, and that there

[racket] Expander vs Reader layer and general Macro advice

2013-09-08 Thread Scott Klarenbach
So in an attempt to improve my understanding of Racket Macros, I thought I'd implement the following syntax change to Racket: Introduce an alternative syntax for pairs where they are delimited by ':' in addition to ' . ', ie: "a":"b" => '("a" . "b") Seemed simple enough. I hooked into #%top, sp

Re: [racket] Immutable vectors

2013-09-08 Thread Matthias Felleisen
On Sep 7, 2013, at 9:43 AM, Konrad Hinsen wrote: > That sounds reasonable, but in the scenario we are discussing > (accessing data structures implemented in Typed Racket from > plain Racket), the data structure never passes in that direction, > except if it's constructed from a plain Racket data

Re: [racket] How to handle exit of a GRacket application?

2013-09-08 Thread Jens Axel Søgaard
For cross referencing: http://stackoverflow.com/questions/18684412/how-to-handle-gui-exit-in-racket 2013/9/8 Eric Dong > Hi there, > > My Racket GUI application needs to do a lot of cleanup work when exiting, > i.e. when the user presses the X button. Wrapping the .rkt in a shell > script which

Re: [racket] How to handle exit of a GRacket application?

2013-09-08 Thread Laurent
You probably want to augment `on-close' in `frame%', for example: #lang racket/gui (send (new (class frame% (super-new) (define/augment (on-close) (displayln "Exiting..."))) [label "Frame"] [width 400] [height 200]) show #t) which on my machine prints "Exiting..."

[racket] How to handle exit of a GRacket application?

2013-09-08 Thread Eric Dong
Hi there, My Racket GUI application needs to do a lot of cleanup work when exiting, i.e. when the user presses the X button. Wrapping the .rkt in a shell script which waits and then does the cleanup is a bit too hacky for me. There are many exit handlers in the Racket documentation (exit-handler e

Re: [racket] Pkg install error

2013-09-08 Thread Laurent
On Sun, Sep 8, 2013 at 4:06 PM, Matthew Flatt wrote: > The problem seems to be that "pkg.racket-lang.org" has recoreded a > checksum of "" for your package. > Indeed! > We'll have to investigate more how things got into a bad state (and > change `raco pkg install` to deal with it in a better w

Re: [racket] Pkg install error

2013-09-08 Thread Greg Hendershott
On Sun, Sep 8, 2013 at 10:09 AM, Matthew Flatt wrote: > At Sun, 8 Sep 2013 10:06:46 -0400, Greg Hendershott wrote: >> If I had chosen "Y", would a "base" package have been installed for 5.3.5? > > Yes, but the "base" package is empty for v5.3.5. Ah, good. IOW this was a case of me knowing somethi

Re: [racket] Pkg install error

2013-09-08 Thread Matthew Flatt
At Sun, 8 Sep 2013 10:06:46 -0400, Greg Hendershott wrote: > >> Let me try downloading some older package as an experiment. > > OK so the package I picked as a test is "bcrypt" because it looks both > small and interesting. > > With Racket 5.3.5 (happened to be set as my default version when I tr

Re: [racket] Pkg install error

2013-09-08 Thread Greg Hendershott
On Sun, Sep 8, 2013 at 9:55 AM, Greg Hendershott wrote: > On Sun, Sep 8, 2013 at 8:09 AM, Laurent wrote: >> Hi, >> >> (using this morning's racket build) >> I've just uploaded a package to pkg, but when I try to install it for >> testing I get the following error: >> >> % raco pkg install script-

Re: [racket] Pkg install error

2013-09-08 Thread Greg Hendershott
>> Let me try downloading some older package as an experiment. OK so the package I picked as a test is "bcrypt" because it looks both small and interesting. With Racket 5.3.5 (happened to be set as my default version when I tried): $ raco pkg install bcrypt The following packages are listed as d

Re: [racket] Pkg install error

2013-09-08 Thread Matthew Flatt
The problem seems to be that "pkg.racket-lang.org" has recoreded a checksum of "" for your package. We'll have to investigate more how things got into a bad state (and change `raco pkg install` to deal with it in a better way), but if you go to "Manage Your Packages" at "pkg.racket-lang.org" and c

Re: [racket] Pkg install error

2013-09-08 Thread Greg Hendershott
On Sun, Sep 8, 2013 at 8:09 AM, Laurent wrote: > Hi, > > (using this morning's racket build) > I've just uploaded a package to pkg, but when I try to install it for > testing I get the following error: > > % raco pkg install script-plugin > Resolving "script-plugin" via https://pkg.racket-lang.org

Re: [racket] Contracts error message

2013-09-08 Thread Robby Findler
You are not the only one to complain :). We've been having an internal discussion about this, actually. In this particular, case, I think that you are using provide/contract, right? If so, the blame really lies with the entire file edf.rkt. So there really isn't anything more specific to say. Rob

[racket] Pkg install error

2013-09-08 Thread Laurent
Hi, (using this morning's racket build) I've just uploaded a package to pkg, but when I try to install it for testing I get the following error: % raco pkg install script-plugin Resolving "script-plugin" via https://pkg.racket-lang.org Downloading https://github.com/Metaxal/script-plugin/tarball/

[racket] Contracts error message

2013-09-08 Thread antoine
Hello, I have just start using contracts in racket, but i am a bit disapointed by the error message they give to me. example contract error: add-number: contract violation expected: number? given: "1" in: the 2nd argument of (-> number? number? number?) contract from: abc.rkt blam