[racket] Using a splash screen with GRacket

2010-08-31 Thread Laurent
Hi, Is it possible to have a splash screen displayed while loading a GRacket program? Much like DrRacket's in fact. Because for some projects, it can take several seconds to initialize everything. I tried to open up a frame at the very beginning of the code, but it only shows up after everything i

Re: [racket] Some questions regarding exercises in PLAI

2010-08-31 Thread Shriram Krishnamurthi
Sorry for the delay. In this case, Eric's interpretation is the one I had in mind! On Mon, Aug 30, 2010 at 9:40 AM, Eric Tanter wrote: > Hi Ionut, Jay, > > I don't understand the question this way -- rather, how to maintain laziness > without introducing an extra variant of CFAE-Value, ie. reus

[racket] unpacking tarballs

2010-08-31 Thread Ryan Golbeck
Hi all again, In the documentation I find functions for creating tar files (http://docs.racket-lang.org/file/tar.html?q=tar#%28def._%28%28lib._file/tar..rkt%29._tar%29%29), but none for unpacking them. Is anyone aware of some library functions for unpacking tarballs? Thanks, -ryan __

Re: [racket] Optimizations at the library level.

2010-08-31 Thread Noel Welsh
On Tue, Aug 31, 2010 at 9:01 PM, Patrick Li wrote: > Thanks for the suggestions. > I'm interested in the suggestion about reasoning about data flow actually. > I'm interested in a systematic way for users to program these optimizations. > Do you know of any readings that might be helpful to me? T

Re: [racket] Optimizations at the library level.

2010-08-31 Thread Patrick Li
Thanks for the suggestions. I'm interested in the suggestion about reasoning about data flow actually. I'm interested in a systematic way for users to program these optimizations. Do you know of any readings that might be helpful to me? I presented the matrix problem as an example, but here's anot

Re: [racket] Reading drracket files into text%

2010-08-31 Thread Eli Barzilay
One way to get things done "properly" is to submit the file through the server, then on the server you get it in exactly the same format that all files are saved. You could maybe even arrange this to happen automatically, using symlinks to the file from the published name to the one that you submi

Re: [racket] Reading drracket files into text%

2010-08-31 Thread Robby Findler
On Tue, Aug 31, 2010 at 2:14 PM, Matthias Felleisen wrote: > > Would this help: > > ;; String (instance Text%) -> Void > ;; load the content of file f into text editor t, > ;; strip meta-data in first three lines > (define (load f t) >  (send t load-file f) >  (define txt (send t get-text)) >  (de

Re: [racket] Reading drracket files into text%

2010-08-31 Thread Robby Findler
Ah. Well, I guess the right thing to do is to just chop the first three lines out of the file. You should probably check for some keyword in the header file to make sure that it really is the header generated by drracket. If the file contains images, then the three lines of header will be encoded

Re: [racket] Reading drracket files into text%

2010-08-31 Thread Matthias Felleisen
p.s. In that case, just read and strip the first three lines. See 'load'. On Aug 31, 2010, at 3:13 PM, Ryan Golbeck wrote: > I'm modifying the handin-server collection to include an option where > our students can retrieve "starter" files for assignments and labs. > Since these files will be s

Re: [racket] Reading drracket files into text%

2010-08-31 Thread Matthias Felleisen
Would this help: ;; String (instance Text%) -> Void ;; load the content of file f into text editor t, ;; strip meta-data in first three lines (define (load f t) (send t load-file f) (define txt (send t get-text)) (define inp (open-input-string txt)) (define fst (read-line inp)) (def

Re: [racket] Reading drracket files into text%

2010-08-31 Thread Ryan Golbeck
I'm modifying the handin-server collection to include an option where our students can retrieve "starter" files for assignments and labs. Since these files will be saved on the server directly from DrRacket, rather than through the handin infrastructure, the files include these three lines of meta

Re: [racket] Reading drracket files into text%

2010-08-31 Thread Robby Findler
You have to specially remove those lines yourself in that case. But if you say a little more about why you want to read something into a text% object, I may give a different answer (it isn't clear what you want to do with this stuff). Robby On Tue, Aug 31, 2010 at 1:49 PM, Ryan Golbeck wrote: >

[racket] Reading drracket files into text%

2010-08-31 Thread Ryan Golbeck
What's the proper way to read a file produced by DrRacket into a text% object? Using load-file produces problems when DrRacket has created a file where the first three lines contain meta data information about the language to use. Thanks, -ryan _

Re: [racket] Optimizations at the library level.

2010-08-31 Thread Neil Van Dyke
One option is to define a 'minilanguage' for matrix manipulations, and implement it as a new bit of syntax that you can implement with "syntax-rules" or "syntax-case": (matrixy (multiply (transpose A) B)) If you want something that doesn't require operations to be structured like this syntact

Re: [racket] Optimizations at the library level.

2010-08-31 Thread Noel Welsh
On Tue, Aug 31, 2010 at 4:22 PM, Patrick Li wrote: > But this starts to clutter up the library. Is it possible to provide this > optimization at the library level for the users? eg. somehow recognize that > whenever the user writes (matrix-transpose-multiply A B)  I can replace it > with the inter

[racket] Optimizations at the library level.

2010-08-31 Thread Patrick Li
Hi everyone, I would like to be able to provide optimizations for my library based on how it's used, but don't know how to go about doing it. I have a function called (matrix-multiply A B) and another function called (matrix-transpose A) which are fundamental linear algebra operations. A very com

Re: [racket] current-directory in tools/plugins

2010-08-31 Thread Matthew Flatt
Use `define-runtime-path' to locate a file relative to an enclosing module's source. At Tue, 31 Aug 2010 12:54:38 +0100, Stephen De Gabrielle wrote: > Hi, > > I'm trying to determine the plugin folder at runtime for a plugin I'm > writing; > > an example of where I'd like this: > > (def

[racket] current-directory in tools/plugins

2010-08-31 Thread Stephen De Gabrielle
Hi, I'm trying to determine the plugin folder at runtime for a plugin I'm writing; an example of where I'd like this: (define commit-button (new switchable-button% (label "commit") (parent (make-object vertical-pane% (get-button-panel)))