Re: [racket] Confused about define-values(-for-export) forms in define-signature

2014-04-02 Thread dfeltey
> A `define-values` in a signature adds a definition to any *importing* > context (in contrast to `define-values-for-export` which adds a > definition in any *exporting* context). The `define-values/invoke-unit` > form "imports" the signature into the definition context. I reread the documentation

Re: [racket] About genericity...

2014-04-02 Thread Roman Klochkov
There is gls package  https://github.com/Kalimehtar/gls/tree/master It is even more generic (you may use any predicate as a `type') Your case is  #lang racket (require gls) (defgeneric dup) (add-method dup   (method ((a string?))      (string-append a a))) (add-method dup    (method ((a exact

[racket] free-id-table. Is it a bug?

2014-04-02 Thread Roman Klochkov
#lang racket (require (for-syntax syntax/id-table)) (define-for-syntax table (make-free-id-table)) (define-syntax (save-and-define stx)   (syntax-case stx ()      [(_ ID) (free-id-table-set! table #'ID 1) #'(define ID 1)])) (define-syntax (load stx)   (syntax-case stx ()      [(_ ID2)        (if (

Re: [racket] Confused about define-values(-for-export) forms in define-signature

2014-04-02 Thread Matthias Felleisen
On Apr 2, 2014, at 5:41 PM, Matthew Flatt wrote: >> >> What confuses me is that I can also define the following signature and unit: >> >> (define-signature y^ >> ((define-values (y) 5))) >> >> (define y@ >> (unit (import) >>(export y^))) >> >> (define-values/invoke-unit y@ (import)

Re: [racket] Confused about define-values(-for-export) forms in define-signature

2014-04-02 Thread Matthew Flatt
At Tue, 1 Apr 2014 02:29:17 -0400 (EDT), Daniel Feltey wrote: > The define-signature form allows define-values and define-values-for-export > forms in its body. According to the documentation the define-values form > should > prefix any unit that imports the signature, and define-values-for-expo

Re: [racket] About genericity...

2014-04-02 Thread Asumu Takikawa
On 2014-04-02 20:53:58 +0200, Alejandro Zamora Fonseca wrote: > ¿How can I create generic-functions in Racket? > > Something like > this samples in CL: > > (defmethod dup ((a string)) > (concatenate 'string a a)) > > (defmethod dup ((a integer)) > (list a a)) See the docs for the `racke

[racket] racket 6.0 gtk core dump

2014-04-02 Thread John Clements
One of my students in lab today saw a Racket 6.0 core dump. Does this console output ring a bell for anyone? Is this a bug that’s been fixed since the 6.0 release? Many thanks, John Begin forwarded message: > From: "Riley S. McGovern" > Subject: Core Dump Log Error > Date: April 2, 2014 at 1

Re: [racket] Using Racket 6.0 through a Web proxy

2014-04-02 Thread Konrad Hinsen
Jay McCarthy writes: > The package system currently doesn't use proxies at all. Howver, you > should be able to go to > > https://github.com/jbclements/sxml/tarball/648a97f4881a8ea2f0959cf26e80bfdfec93d181 > > in a web browser and download the archive manually then install it > "raco pkg

Re: [racket] About genericity...

2014-04-02 Thread Patrick Useldinger
On 02/04/2014 20:53, Alejandro Zamora Fonseca wrote: (defmethod dup ((a string)) (concatenate 'string a a)) (defmethod dup ((a integer)) (list a a)) 1) From the standard Racket "swindle/tiny-clos" library, you can use the CLOS-like functions that you may already know from Common

[racket] About genericity...

2014-04-02 Thread Alejandro Zamora Fonseca
Hello everybody! I have a newbie question. ¿How can I create generic-functions in Racket? Something like this samples in CL: (defmethod dup ((a string)) (concatenate 'string a a)) (defmethod dup ((a integer)) (list a a)) Cheers, Alejandro -- Este mensaje le ha llegado media

Re: [racket] Using Racket 6.0 through a Web proxy

2014-04-02 Thread Jay McCarthy
Hi Konrad, The package system currently doesn't use proxies at all. Howver, you should be able to go to https://github.com/jbclements/sxml/tarball/648a97f4881a8ea2f0959cf26e80bfdfec93d181 in a web browser and download the archive manually then install it "raco pkg install -n sxml the-file.tgz"

Re: [racket] handin-server install problem: gnu-gunzip bad header

2014-04-02 Thread Robby Findler
Is he giving a URL to DrRacket? If so could there be something operating at the network layer (a proxy maybe) that gets in the way? A simple thing to try is visit the URL in a browser, save the file and then give DrRacket the path to the file (in that same dialog box). Robby On Wednesday, April

[racket] handin-server install problem: gnu-gunzip bad header

2014-04-02 Thread Breanndán Ó Nualláin
This semester I set up a handin server and all my students are using it ...except for one. When he tries to install the prepared plt file via "Install .plt file", DrRacket gives the complaint "gnu-gunzip bad header". Does anyone have a pointer to what the problem might be? He's using DrRacket v6.