From derick.eddington at gmail.com Thu May 1 04:29:09 2008 From: derick.eddington at gmail.com (Derick Eddington) Date: Thu Mar 26 02:17:36 2009 Subject: [plt-scheme] connection reset on pre.plt-scheme.org In-Reply-To: <20080430221747.GA3825@acer> References: <20080430221747.GA3825@acer> Message-ID: <1209630549.6320.23.camel@eep> Something similar also happens to me nearly every time I try to download anything from pre.plt-scheme.org. It only works like once every 20 times. It's been like this for a while; I always thought the problem was on my end. It blasts the first few hundred Kb then the transfer rate just drops to 0. I don't get "Connection reset by peer" and the connection doesn't seem to be lost because wget's ETA keeps going up. $ wget http://pre.plt-scheme.org/installers/plt-3.99.0.23-bin-i386-linux-ubuntu-feisty.sh --01:12:34-- http://pre.plt-scheme.org/installers/plt-3.99.0.23-bin-i386-linux-ubuntu-feisty.sh => `plt-3.99.0.23-bin-i386-linux-ubuntu-feisty.sh' Resolving pre.plt-scheme.org... 129.10.115.117 Connecting to pre.plt-scheme.org|129.10.115.117|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 31,730,046 (30M) [application/x-sh] 1% [ ] 338,594 --.--K/s ETA 12:45:56 On Wed, 2008-04-30 at 18:17 -0400, Tom Schouten wrote: > hello, > > i'm not sure if this is the right spot to report it, but there seems to be a > problem with the web server hosting pre.plt-scheme.org > > i get connection resets when downloading the nightly builds.. > this has been going on for a while. the first time i remember this happening > was dowloading 3.99.0.10 on 2008-02-11 > > tom@klimop:~$ wget http://pre.plt-scheme.org/installers/full-3.99.0.23-bin-i386-linux-ubuntu.sh > --21:07:34-- http://pre.plt-scheme.org/installers/full-3.99.0.23-bin-i386-linux-ubuntu.sh > => `full-3.99.0.23-bin-i386-linux-ubuntu.sh' > Resolving pre.plt-scheme.org... 129.10.115.117 > Connecting to pre.plt-scheme.org|129.10.115.117|:80... connected. > HTTP request sent, awaiting response... 200 OK > Length: 49,129,970 (47M) [application/x-sh] > > 1% [ ] 810,610 837.27K/s > > 21:07:37 (835.55 KB/s) - Read error at byte 810610/49129970 (Connection reset by peer). Retrying. > > --21:07:38-- http://pre.plt-scheme.org/installers/full-3.99.0.23-bin-i386-linux-ubuntu.sh > (try: 2) => `full-3.99.0.23-bin-i386-linux-ubuntu.sh' > Connecting to pre.plt-scheme.org|129.10.115.117|:80... connected. > HTTP request sent, awaiting response... 206 Partial Content > Length: 49,129,970 (47M), 48,319,360 (46M) remaining [application/x-sh] > > 100%[========================================>] 49,129,970 3.73M/s ETA 00:00 > > 21:07:54 (2.86 MB/s) - `full-3.99.0.23-bin-i386-linux-ubuntu.sh' saved [49129970/49129970] > > tom@klimop:~$ > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From ewan_higgs at yahoo.co.uk Thu May 1 06:00:35 2008 From: ewan_higgs at yahoo.co.uk (Ewan Higgs) Date: Thu Mar 26 02:17:38 2009 Subject: [plt-scheme] [ANN:Scheme UK Meeting] : "Fluxus: scheme livecoding" 28 May @ 7pm Message-ID: <437141.22168.qm@web27014.mail.ukl.yahoo.com> Scheme UK is back on!! The next meeting for the Scheme UK user's group will be held on Wednesday, 28 May from 7pm till we leave for the pub. The meeting will take place at the offices of LShift(see http://www.lshift.net/contact.html for directions). Dave Griffiths: "Fluxus: Scheme Livecoding" Livecoding is the name given to improvised programming, usually in front of an audience, with screen projection to allow viewers to connect the construction of a program along with it's audio/visual/olfactory output. Fluxus is a rapid prototyping, livecoding and playing/learning environment for 3D graphics and games. It extends PLT Scheme with graphical commands and can be used within it's own livecoding environment or from within the DrScheme IDE. Date: 28 May Time: 7:00pm Venue: LShift Ltd Hoxton Point 1st Floor Office 6 Rufus Street London N1 6PE Map: http://www.lshift.net/contact __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html From matthias at ccs.neu.edu Thu May 1 08:11:55 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:38 2009 Subject: [plt-scheme] continuation marks In-Reply-To: <932b2f1f0804301355t4d5337aeh6a5f334148e9c417@mail.gmail.com> References: <1209587230.10478.262.camel@localhost.localdomain> <932b2f1f0804301355t4d5337aeh6a5f334148e9c417@mail.gmail.com> Message-ID: <6B908234-0F41-4012-BDE8-688C8CA34F1C@ccs.neu.edu> ... and useful. -- Matthias On Apr 30, 2008, at 4:55 PM, Robby Findler wrote: > Because one mark will clobber another if their corresponding > with-continuation-mark expressions are in tail-position wrt to each > other (indeed, that is the magic property that makes > with-continuation-mark primitive). > > Robby > > On Wed, Apr 30, 2008 at 3:27 PM, John Leuner > wrote: >> Why does the output differ for these two cases: >> >> mzscheme -t >> test.ss >> Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme >> Inc. >> (4 2) >> (4) >> >> John Leuner >> >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From matthias at ccs.neu.edu Thu May 1 10:15:20 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:39 2009 Subject: [plt-scheme] Class methods and class fields In-Reply-To: References: <932b2f1f0804290543l6d475792wbf1b5b1f859c99c9@mail.gmail.com> <932b2f1f0804290631k32fd750fo9d6deae6400d1351@mail.gmail.com> Message-ID: <94937A0F-BB79-40F1-A8F8-1EC765FAE586@ccs.neu.edu> Yes, this scenario makes sense in principle. No, I wouldn't use Scheme classes to do templates UNLESS the number of defaults is large and yet overriding a few of them at a time is needed. Even then, I'd consider keyword arguments with default values instead to do what you want to do. And also see Neil's answer. -- Matthias On Apr 30, 2008, at 8:02 PM, Eddie Sullivan wrote: > Well, here's the scenario I had in mind when I originally posed the > question about class variables. I've since come up with a way to > accomplish this without using classes at all, so this may be a moot > point, but here it is. > > My idea was an x-expression based template library, where each > template was enclosed in a class. The concept was based on some > existing text templating languages, where a template can contain > "blocks" that a derived template can override, and "parameters" > that can be set on a per-instance basis. In this case the template > expression would be associated with the class itself, while the > parameter values would be associated with an instance. > > I wanted a syntax where default block and parameter values could be > specified in-line in the template rather than as default parameters > to a function. And I wanted to be able to nest blocks. > > I should mention that if this were to be implemented using > protected static fields, they would be treated as read-only. I have > not been able to come up with a realistic use case for *mutable* > protected static fields, which in fact sound a little scary. > > A simple example of one of these templates would look something like: > > '(html > (head > (block: head > (title (param: title "Page title")) > (link ((rel "StyleSheet") > ("/static/base.css")) > (type "text/css")))) > (block: morehead)) ; ... etc > > -Eddie > > ----- Original Message ----- From: "Matthias Felleisen" > > To: "Eddie Sullivan" > Cc: "Robby Findler" ; scheme@list.cs.brown.edu> > Sent: Wednesday, April 30, 2008 11:29 AM > Subject: Re: [plt-scheme] Class methods and class fields > > >> >> You have pretty much characterized the positive side of the game. >> The only thing we are missing is the following: >> >> -- class C lives in module M and comes with a *protected static >> field*. That is, only instances and subclasses have access to this >> field. >> >> -- C and M comes as a part of an immutable package >> -- you need to design a class D in some module K and D needs to >> extend C. >> In our world, we must export the quasi-static variable from the >> module and thus make it visible to the whole world. It becomes >> quasi- global. >> >> If we had static class variables (and we do have a generalization >> of protected) we could ensure that only C and D see this static >> field. >> >> We can approximate the ideal view with programming protocols >> (lexical scope plus accessor methods), but they are just that. >> >> So yes, there is a weakness in our system. If you come up with a >> realistic scenario for the above, we should reconsider our class >> design. >> >> -- Matthias >> >> >> >> >> On Apr 29, 2008, at 11:09 AM, Eddie Sullivan wrote: >> >>> I think I see what you're saying: that module variables can >>> accomplish what class variables would be used for in other >>> languages, by putting the class(es) in its/their own module, or >>> even replacing each class with an equivalent module. To take it >>> further, a sort-of inheritance can be accomplished by re- >>> providing items from a "parent" module (or is that taking the >>> analogy too far?). >>> >>> I guess the mental barrier is seeing modules as more than just a >>> way to organize source or object code (sort of like C include- >>> files or .NET assemblies), but as an intrinsic part of the >>> language at the same level as classes and structures. That and >>> overcoming the C-based aversion to what seem like global variables. >>> >>> Thanks again, and let me know if I've misunderstood you. >>> -Eddie >>> >>> ----- Original Message ----- From: "Robby Findler" >>> >>> To: "Eddie Sullivan" >>> Cc: >>> Sent: Tuesday, April 29, 2008 9:31 AM >>> Subject: Re: [plt-scheme] Class methods and class fields >>> >>> >>>> I think that inheritance is mismatched to what you want and that >>>> kind >>>> of thing only comes about because languages like you mentioned >>>> earlier >>>> don't have anything that isn't attached to a class somehow. >>>> >>>> For the examples you've described, you really just want lexical >>>> scope >>>> (plus a module system), IMO. Even for the code you write below, it >>>> seems to me that you just want to put my-class and my-derived-class >>>> into one module and have db-connection at the top-level of that >>>> module. >>>> >>>> Robby >>>> >>>> On Tue, Apr 29, 2008 at 8:29 AM, Eddie Sullivan >>>> wrote: >>>>> That gives some of the functionality, but doesn't specifically >>>>> associate the >>>>> variable with the class, and doesn't allow for inheritance the >>>>> way structure >>>>> type properties do. To add to your example, I can envision >>>>> something like: >>>>> >>>>> >>>>> (define my-class% >>>>> (class object% >>>>> ;; Just initialized once ever: >>>>> (static-field [db-connection (init-db)]) >>>>> >>>>> (define/public (talk-to-db stuff) ... db-connection ...) >>>>> (super-new))) >>>>> >>>>> (define my-derived-class% >>>>> (class my-class% >>>>> ;; Provides access to superclass's static field: >>>>> (inherit-static-field db-connection) >>>>> (define/public (more-db-talking stuff) ... db-connection ...) >>>>> (super-new))) >>>>> >>>>> (let ([dbc (get-static-field db-connection my-derived-class%)]) >>>>> ... dbc ...) >>>>> >>>>> ----- Original Message ----- From: "Robby Findler" >>>>> >>>>> To: "Eddie Sullivan" >>>>> Cc: >>>>> Sent: Tuesday, April 29, 2008 8:43 AM >>>>> Subject: Re: [plt-scheme] Class methods and class fields >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> > The PLT Scheme class system is embedded in an ordinary >>>>> functional >>>>> > language, so you can just define functions or database >>>>> connections >>>>> > outside the class an refer to those variables lexically, eg: >>>>> > >>>>> > (define db-connection (init-db)) >>>>> > (define my-class% >>>>> > (class object% >>>>> > (define/public (talk-to-db stuff) ... db-connection ...) >>>>> > (super-new))) >>>>> > >>>>> > Robby >>>>> > >>>>> > On Tue, Apr 29, 2008 at 7:38 AM, Eddie Sullivan >>>>> >>>>> wrote: >>>>> > >>>>> > > Hi. >>>>> > > I'm another long-time programmer trying out scheme. I have >>>>> been > > working >>>>> > > with PLT's scheme/class module because I am used to >>>>> > > the object oriented way of thinking about programming. >>>>> > > >>>>> > > In every other language I have used that has classes (Python >>>>> and the >>>>> C++ >>>>> > > family, also [incr tcl] but my memory of that is vague), >>>>> there is > > the >>>>> > > concept of "class variables", that is, variables that are >>>>> associated >>>>> with >>>>> > > the class itself rather than with any particular instance, >>>>> and the >>>>> similar >>>>> > > concept of "class methods." (They're also often called >>>>> "static", but >>>>> that >>>>> > > term can be confusing, IMO.) >>>>> > > >>>>> > > It's easy to imagine scenarios where these concepts would be >>>>> very >>>>> useful, >>>>> > > such as a >>>>> > > shared resource like a database connection, or simply a >>>>> usage > > counter. >>>>> > > >>>>> > > Perhaps I'm misreading the documentation, but I can't find >>>>> anything >>>>> like >>>>> > > that in scheme/class. Structures have "structure type >>>>> properties", so >>>>> the >>>>> > > idea must be acknowledged to be useful in theory. >>>>> > > >>>>> > > Is it there and I'm missing it? If not, is there a simple >>>>> way to >>>>> implement >>>>> > > this functionality that I haven't figured out? Or is there a >>>>> philosophical >>>>> > > reason why this was considered a bad idea? >>>>> > > >>>>> > > Thanks! >>>>> > > -Eddie Sullivan >>>>> > > >>>>> > > >>>>> > > _________________________________________________ >>>>> > > For list-related administrative tasks: >>>>> > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>>>> > > >>>>> > > >>>>> > >>>>> > >>>>> >>>>> >>> >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> > From mflatt at cs.utah.edu Thu May 1 11:25:59 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:39 2009 Subject: [plt-scheme] update on R6RS support Message-ID: <20080501152600.18A5B650115@mail-svr1.cs.utah.edu> PLT Scheme's R6RS is now (in SVN) backed by a minimally competent test suite --- and there are many fewer bugs than there were a week ago. The test suite is in collects/tests/r6rs Also, as of a week or two ago, the R6RS document is wired into to the PLT documentation. For example, running DrScheme's Check Syntax on #!r6rs (import (rnrs)) cons provides a link from `cons' to the R6RS description of `cons'. Known non-conformance with the standard in the current implementation: * When `guard' catches an exception that no clause matches, the exception is re-`raise'ed without restoring the continuation to the one that raised the exception. This difference can be made visible using `dynamic-wind'. According to R6RS, the following program should print "in" and "out" twice, but each prints once using PLT Scheme: (guard (exn [(equal? exn 5) 'five]) (guard (exn [(equal? exn 6) 'six]) (dynamic-wind (lambda () (display "in") (newline)) (lambda () (raise 5)) (lambda () (display "out") (newline))))) Along similar lines, continuation capture and invocation within an exception handler is restricted. Unless the exception is raised through @scheme[raise-continuable], a handler can escape only through a continuation that is a tail of the current continuation, and a continuation captured within the handler cannot be invoked after control escapes from the raise. * Currently, inexact numbers are printed without a precision indicator, and precision indicators are ignored on input (e.g., `0.5|7' is read the same as `0.5'). * Word boundaries for `string-downcase', `string-upcase', and `string-titlecase' are not determined as specified by Unicode Standard Annex #29. * When an identifier bound by `letrec' or `letrec*' is referenced before it is bound, an exception is not raised; instead, the reference produces #. * The bindings in a namespace produced by `null-environment' or `scheme-report-environment' correspond to R5RS bindings instead of R6RS bindings. In particular, `=>', `else', `_', and `...' are not bound. Matthew From stephen at degabrielle.name Fri May 2 08:59:07 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:17:39 2009 Subject: [plt-scheme] finder:common-get-file-list Message-ID: <595b9ab20805020559h1de2b027lc4b2301dc43a08d7@mail.gmail.com> Hi, I'm trying to use the Framework (to select a folder), but I'm having trouble getting the args right; I think I'm doing the minimum sufficient to get a 'select files' dialog, but I'm getting a contrat error that I don't quite understand - it doesn't seems to match the contract in the manual. Can anyone make any suggestions as to what I'm doing wrong? [I'm using 3.99.0.23 [3m], built from source and running on Eee Xandros(debian)] > (finder:common-get-file-list #f "get-folder" #f "not right" #f) . framework broke the contract (->* () ((or/c false/c path?) string? (or/c false/c byte-regexp?) string? (or/c false/c (is-a?/c interface:top-level-window<%>))) (or/c (listof path?) false/c)) on finder:common-get-file-list; expected <(or/c (listof path?) false/c)>, given: # > > From robby at cs.uchicago.edu Fri May 2 09:05:04 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:17:39 2009 Subject: [plt-scheme] finder:common-get-file-list In-Reply-To: <595b9ab20805020559h1de2b027lc4b2301dc43a08d7@mail.gmail.com> References: <595b9ab20805020559h1de2b027lc4b2301dc43a08d7@mail.gmail.com> Message-ID: <932b2f1f0805020605q589e36fdq313a681cdd5eb716@mail.gmail.com> Hm. Apparently, that function has been partly removed. It should probably be completely removed. You want: get-file-list I think. hth, Robby On Fri, May 2, 2008 at 7:59 AM, Stephen De Gabrielle wrote: > Hi, I'm trying to use the Framework (to select a folder), but I'm > having trouble getting the args right; I think I'm doing the minimum > sufficient to get a 'select files' dialog, but I'm getting a contrat > error that I don't quite understand - it doesn't seems to match the > contract in the manual. > > Can anyone make any suggestions as to what I'm doing wrong? > [I'm using 3.99.0.23 [3m], built from source and running on Eee Xandros(debian)] > > > (finder:common-get-file-list > #f > "get-folder" > #f > "not right" > #f) > > . framework broke the contract > (->* > () > ((or/c false/c path?) > string? > (or/c false/c byte-regexp?) > string? > (or/c > false/c > (is-a?/c interface:top-level-window<%>))) > (or/c (listof path?) false/c)) > on finder:common-get-file-list; expected <(or/c (listof path?) > false/c)>, given: # > > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From stephen at degabrielle.name Fri May 2 10:56:58 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:17:39 2009 Subject: [plt-scheme] finder:common-get-file-list In-Reply-To: <932b2f1f0805020605q589e36fdq313a681cdd5eb716@mail.gmail.com> References: <595b9ab20805020559h1de2b027lc4b2301dc43a08d7@mail.gmail.com> <932b2f1f0805020605q589e36fdq313a681cdd5eb716@mail.gmail.com> Message-ID: <595b9ab20805020756v47a09205s64e14033ce9bde1d@mail.gmail.com> Thanks - you led me to get-directory, which is what I really wanted, but it is interacting oddly for me; It it requires me to click twice, first to open the directory, then second to select it. It also seems very sensitive about the position of the cursor. This could be just me, as I am using a build from source (as of this morning), and this latest build has caused all my buttons (run, check-syntax etc.) to go mostly black. I think my wm is icewm. #lang scheme/gui (require framework) ; Make a frame by instantiating the frame% class (define frame (new frame% [label "Example"] [min-height 200][min-width 200])) ; Make a static text message in the frame (define msg (new message% [parent frame] [label "No events so far... ."])) ; Make a button in the frame (new button% [parent frame] [label "Click Me"] ; Callback procedure for a button click: (callback (lambda (button event) (send msg set-label (path->string (get-directory #f #f #f null)))))) ; Show the frame by calling its show method (send frame show #t) On Fri, May 2, 2008 at 2:05 PM, Robby Findler wrote: > Hm. Apparently, that function has been partly removed. It should > probably be completely removed. > > You want: > > get-file-list > > I think. > > hth, > Robby > > > > On Fri, May 2, 2008 at 7:59 AM, Stephen De Gabrielle > wrote: > > Hi, I'm trying to use the Framework (to select a folder), but I'm > > having trouble getting the args right; I think I'm doing the minimum > > sufficient to get a 'select files' dialog, but I'm getting a contrat > > error that I don't quite understand - it doesn't seems to match the > > contract in the manual. > > > > Can anyone make any suggestions as to what I'm doing wrong? > > [I'm using 3.99.0.23 [3m], built from source and running on Eee Xandros(debian)] > > > > > (finder:common-get-file-list > > #f > > "get-folder" > > #f > > "not right" > > #f) > > > > . framework broke the contract > > (->* > > () > > ((or/c false/c path?) > > string? > > (or/c false/c byte-regexp?) > > string? > > (or/c > > false/c > > (is-a?/c interface:top-level-window<%>))) > > (or/c (listof path?) false/c)) > > on finder:common-get-file-list; expected <(or/c (listof path?) > > false/c)>, given: # > > > > > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > -- Cheers, Stephen -- Stephen De Gabrielle s.degabrielle@ucl.ac.uk Telephone +44 (0)20 7679 5242 (x45242) Mobile 079 851 890 45 Project: Making Sense of Information (MaSI) http://www.uclic.ucl.ac.uk/annb/MaSI.html UCLIC: University College London Interaction Centre http://www.uclic.ucl.ac.uk/ Remax House - 31/32 Alfred Place London - WC1E 7DP From plragde at uwaterloo.ca Fri May 2 12:15:33 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:17:40 2009 Subject: [plt-scheme] using plt-match.ss in teaching languages Message-ID: <481B3E25.8090302@uwaterloo.ca> The following program works in Advanced Student. (require (lib "plt-match.ss" "mzlib")) (define-struct myposn (x y)) (define (dist p1 p2) (match `(,p1 ,p2) [(list (struct myposn (x1 y1)) (struct myposn (x2 y2))) (sqrt (+ (sqr (- x1 x2)) (sqr (- y1 y2))))])) (dist (make-myposn 0 0) (make-myposn 3 4)) If I run it in Intermediate Student with lambda or below, I get the following error: map: all lists must have same size; arguments were: list (list # #) (list false) This is in 3.99.0.18-svn16mar2008. Is there a way to get match working in lower-level languages? Beginning Student with List Abbreviations would be ideal. Thanks. --PR From matthias at ccs.neu.edu Fri May 2 13:01:40 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:43 2009 Subject: [plt-scheme] using plt-match.ss in teaching languages In-Reply-To: <481B3E25.8090302@uwaterloo.ca> References: <481B3E25.8090302@uwaterloo.ca> Message-ID: <86F34AF9-3373-4D67-B86D-6679DBF3616E@ccs.neu.edu> If you change it to this: (require (lib "plt-match.ss" "mzlib")) (define-struct myposn (x y)) (define (dist p1 p2) (match (list p1 p2) [(list (struct myposn (x1 y1)) (struct myposn (x2 y2))) (sqrt (+ (sqr (- x1 x2)) (sqr (- y1 y2))))])) (dist (make-myposn 0 0) (make-myposn 3 4)) it works in all levels in my svn (version 3.99.0.23-svn1may2008 [3m].) I think you're seeing a bug in match that was recently fixed. ;; --- I strongly discourage pattern matching in the first semester. Been there, done that, failed with it. -- Matthias On May 2, 2008, at 12:15 PM, Prabhakar Ragde wrote: > The following program works in Advanced Student. > > (require (lib "plt-match.ss" "mzlib")) > > (define-struct myposn (x y)) > > (define (dist p1 p2) > (match `(,p1 ,p2) > [(list (struct myposn (x1 y1)) (struct myposn (x2 y2))) > (sqrt (+ (sqr (- x1 x2)) (sqr (- y1 y2))))])) > > (dist (make-myposn 0 0) (make-myposn 3 4)) > > If I run it in Intermediate Student with lambda or below, I get the > following error: > > map: all lists must have same size; arguments were: list (list > # #) (list false) > > This is in 3.99.0.18-svn16mar2008. > > Is there a way to get match working in lower-level languages? > Beginning Student with List Abbreviations would be ideal. Thanks. --PR > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From matthias at ccs.neu.edu Fri May 2 13:02:37 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:45 2009 Subject: [plt-scheme] Permutation correct way to do it ? In-Reply-To: <723743.74454.qm@web63312.mail.re1.yahoo.com> References: <723743.74454.qm@web63312.mail.re1.yahoo.com> Message-ID: <83D61C44-3938-4B2F-ADE4-12266F73F393@ccs.neu.edu> But you're using an accumulator, violating the design recipe of the section in which the problem lives. 60% -- Matthias On Apr 30, 2008, at 5:22 AM, Rocky wrote: > > Matthias said: >> This exercise is within reach >> for someone who has never programmed before and follows the recipe; >> if you fall in this group, systematically use the recipe and you will >> get there. It is a stumbling block for people who have programmed >> before and believe that I made up the design recipe to torture them. > > It's so simple, so very simple, that only a child can do it! > > Look Ma, no append ... > --rocky > > > (define (arrange aword) > (cond > ((empty? aword) (cons empty empty)) > (else (inter/all (first aword) (arrange (rest aword)))))) > > > (define (inter/all elem alist) > (cond > ((empty? alist) empty) > (else > (inter/one empty > elem > (first alist) > (inter/all elem (rest alist)))))) > > > (define (inter/one worms elem can alist) > (cond > ((empty? can) (cons (stuff worms (cons elem empty)) alist)) > (else > (cons (stuff worms (cons elem can)) > (inter/one (cons (first can) worms) > elem > (rest can) > alist))))) > > > (define (stuff worms can) > (cond > ((empty? worms) can) > (else (stuff (rest worms) (cons (first worms) can))))) > > > > > ______________________________________________________________________ > ______________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http:// > mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From plragde at uwaterloo.ca Fri May 2 13:19:51 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:17:45 2009 Subject: [plt-scheme] using plt-match.ss in teaching languages In-Reply-To: <86F34AF9-3373-4D67-B86D-6679DBF3616E@ccs.neu.edu> References: <481B3E25.8090302@uwaterloo.ca> <86F34AF9-3373-4D67-B86D-6679DBF3616E@ccs.neu.edu> Message-ID: <481B4D37.6050306@uwaterloo.ca> Matthias Felleisen wrote: > it works in all levels in my svn (version 3.99.0.23-svn1may2008 [3m].) I > think you're seeing a bug in match that was recently fixed. Thanks, yes. Goodbye to 3.99.0.18! But now it says, after printing the right results: This program should be tested. Which, after a bit of digging, I now understand as well. > I strongly discourage pattern matching in the first semester. Been > there, done that, failed with it. -- Matthias That was milder than I expected! This is for the advanced course -- top 5-10% of incoming students, admission by instructor consent only. And I'm not leaning heavily on it. --PR From rrnewton at gmail.com Fri May 2 13:50:08 2008 From: rrnewton at gmail.com (Ryan Newton) Date: Thu Mar 26 02:17:46 2009 Subject: [plt-scheme] How do you import external PLT functionality into an R6RS program? Message-ID: Hello, I've ported my application to R6RS and am running it with Ikarus/ Larceny. It depends on some nonstandard features (there's still a lot missing from R6RS), which I have encapsulated in a compat.sls (compat.{ikarus,larceny,mzscheme}.sls) library. However, in trying to write the .mzscheme.sls version (using 3.99.0.23), I haven't figured out how to pull in broader mzscheme functionality (e.g. the 'random' procedure). I believe I should need to write (import X) for some X. For example, in larceny, X= (primitives p1 p2 ...), in ikarus, X='(ikarus)'. There's a section on scheme interoperability in the docs, but it's focused on using R6RS modules from the outside, not the reverse: http://docs.plt-scheme.org/r6rs/Scheme_Interoperability.html -Ryan P.S. As a separate matter, plt-r6rs doesn't seem to be working for me in the version I'm using. I get this error: $ plt-r6rs ws/compat/compat.mzscheme.sls procedure *read-syntax: expects 6 arguments, given 2: # # Ditto when I try to run it in other modes like --compile: $ plt-r6rs --compile test.sls [Compiling /afs/csail.mit.edu/u/n/newton/WaveScope/code/wavescript/ src/test.sls] procedure *read-syntax: expects 6 arguments, given 2: # # From mflatt at cs.utah.edu Fri May 2 15:56:56 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:46 2009 Subject: [plt-scheme] How do you import external PLT functionality into an R6RS program? In-Reply-To: References: Message-ID: <20080502195657.7F29965010D@mail-svr1.cs.utah.edu> At Fri, 2 May 2008 13:50:08 -0400, Ryan Newton wrote: > However, in trying to write the .mzscheme.sls version (using > 3.99.0.23), I haven't figured out how to pull in broader mzscheme > functionality (e.g. the 'random' procedure). I believe I should need > to write (import X) for some X. For example, in larceny, X= > (primitives p1 p2 ...), in ikarus, X='(ikarus)'. > > There's a section on scheme interoperability in the docs, but it's > focused on using R6RS modules from the outside, not the reverse: > > http://docs.plt-scheme.org/r6rs/Scheme_Interoperability.html It works both directions. If you want to import from `scheme/base', for example, use `(import (scheme base))'. > P.S. As a separate matter, plt-r6rs doesn't seem to be working for me > in the version I'm using. I get this error: > > $ plt-r6rs ws/compat/compat.mzscheme.sls > procedure *read-syntax: expects 6 arguments, given 2: # csail.mit.edu/u/n/newton/WaveScope/code/wavescript/src/ws/compat/ > compat.mzscheme.sls> # WaveScope/code/wavescript/src/ws/compat/compat.mzscheme.sls> Thanks for the report --- fixed in SVN. matthew From mflatt at cs.utah.edu Fri May 2 17:09:49 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:46 2009 Subject: [plt-scheme] v372: Uncollectable Scheme memory (even with sandbox.ss) In-Reply-To: <20080430181907.D0E956500E5@mail-svr1.cs.utah.edu> References: <431341160804291101k138a0d7fu2cc069379351014b@mail.gmail.com> <20080430181907.D0E956500E5@mail-svr1.cs.utah.edu> Message-ID: <20080502210950.95456650118@mail-svr1.cs.utah.edu> At Wed, 30 Apr 2008 12:19:07 -0600, Matthew Flatt wrote: > At Tue, 29 Apr 2008 14:01:04 -0400, "Eric Kidd" wrote: > > Over the past several years, we've been wrestling with a memory leak > > in Halyard. This leak appears to occur in the Scheme heap, and we > > haven't been able to control it using either custodians or sandboxes. > > > > [...] > > > > We're pretty much at a loss here. Is there anything else we should > > try? Are there any other statistics we should take a look at? For the record, we tracked this down to a problem with sharing the output and error port across sandbox invocations. Sharing the port directly turns out to be a bad idea, because a program in a sandbox can attach a `display' or `print' handler to the port. (And it turns out that Swindle sets the handlers while chaining to the old ones, which created a bridge between sandbox invocations.) I'm adding `dup-input-port' and `dup-output-port' to `scheme/port', so that you can pass along a port to a sandbox that reads/writes from/to an existing port without allowing changes to the existing port's handlers. Matthew From neil at neilvandyke.org Fri May 2 22:45:35 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:17:46 2009 Subject: [plt-scheme] two questions about extensions and 3m under 372 Message-ID: <481BD1CF.1020809@neilvandyke.org> 1. What experiences have people had moving their existing MzScheme extensions from CGC to 3m? 2. What experiences have people had opting to stay with CGC? Background details follow... I'm helping to move a system deployed under PLT v300 to v372. The system uses multiple in-house MzScheme extensions written in C. We therefore need to decide whether to use the old CGC or 3m. My main concern is the unknown risk that I will make an error in the conversion of the C code to 3m that won't manifest until this system is deployed to customers under 372, which would be very bad. (Perhaps it's easier to write for 3m from the start, rather than have a different programmer convert after the fact.) I don't know the likelihood of error if I work very diligently, nor the likelihood that any such error would be detected before deployment. By the way, any eventual move to PLT v4 is not a concern for this system at this time. Thanks, Neil From rockysqq at yahoo.com Fri May 2 22:56:03 2008 From: rockysqq at yahoo.com (Rocky) Date: Thu Mar 26 02:17:46 2009 Subject: [plt-scheme] Permutation correct way to do it ? In-Reply-To: <83D61C44-3938-4B2F-ADE4-12266F73F393@ccs.neu.edu> Message-ID: <393480.62390.qm@web63308.mail.re1.yahoo.com> --- Matthias Felleisen wrote: > > But you're using an accumulator, violating the design recipe of the > section in which the problem lives. 60% > > -- Matthias Grrr. I remember now why I like imperative style better. Six functions! I had one with "only" five functions that worked if the letters were unique, but never returned if there were duplicates. Obviously that was no good for newspaper "Jumble" games. Now don't tell me I can't hide a 'pea to find my place... (I gotta get over 60% this time. This Prof is a hard grader. Just forget there's no comments. :) --rocky (define (arrange aword) (cond ((empty? aword) (cons empty empty)) (else (inter/all (first aword) (arrange (rest aword)))))) (define (inter/all elem alist) (cond ((empty? alist) empty) (else (inter/one elem (cons 'pea (first alist)) (inter/all elem (rest alist)))))) (define (inter/one elem aword alist) (cond ((more? aword) (cons (pea->elem elem aword) (inter/one elem (next aword) alist))) (else (cons (pea->elem elem aword) alist)))) (define (more? aword) (cond ((symbol=? 'pea (first aword)) (not (empty? (rest aword)))) (else (more? (rest aword))))) (define (next aword) (cond ((symbol=? 'pea (first aword)) (cons (first (rest aword)) (cons 'pea (rest (rest aword))))) (else (cons (first aword) (next (rest aword)))))) (define (pea->elem elem aword) (cond ((symbol=? 'pea (first aword)) (cons elem (rest aword))) (else (cons (first aword) (pea->elem elem (rest aword)))))) ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ From lispercat at gmail.com Fri May 2 18:43:47 2008 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu Mar 26 02:17:47 2009 Subject: [plt-scheme] Newbie: the best way to start building GUI apps? Message-ID: What is the best GUI framework to use with DrScheme on MS Windows? I was trying to find GTK binding for MzScheme, but the links to MzGTK were broken. Are there any tutorials on how to build gui apps with MzScheme? If I use Emacs, should I active DrEd (not MzScheme) to work with built-in gui framework? If finally I have to make a standalone executable, what files do I need to have to deploy in on other machines? Thank you! Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080502/4015e253/attachment.html From robby at cs.uchicago.edu Fri May 2 23:11:49 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:17:47 2009 Subject: [plt-scheme] finder:common-get-file-list In-Reply-To: <595b9ab20805020756v47a09205s64e14033ce9bde1d@mail.gmail.com> References: <595b9ab20805020559h1de2b027lc4b2301dc43a08d7@mail.gmail.com> <932b2f1f0805020605q589e36fdq313a681cdd5eb716@mail.gmail.com> <595b9ab20805020756v47a09205s64e14033ce9bde1d@mail.gmail.com> Message-ID: <932b2f1f0805022011y2b5094a6m6ab89fe3c36dbbc2@mail.gmail.com> I'm not seeing that, but it is a platform-specific dialog. Are you using linux? Robby On Fri, May 2, 2008 at 9:56 AM, Stephen De Gabrielle wrote: > Thanks - you led me to get-directory, which is what I really wanted, > but it is interacting oddly for me; > It it requires me to click twice, first to open the directory, then > second to select it. It also seems very sensitive about the position > of the cursor. > > This could be just me, as I am using a build from source (as of this > morning), and this latest build has caused all my buttons (run, > check-syntax etc.) to go mostly black. I think my wm is icewm. > > > > #lang scheme/gui > (require framework) > > ; Make a frame by instantiating the frame% class > (define frame (new frame% [label "Example"] > [min-height 200][min-width 200])) > > ; Make a static text message in the frame > (define msg (new message% [parent frame] > [label "No events so far... ."])) > > ; Make a button in the frame > (new button% [parent frame] > [label "Click Me"] > ; Callback procedure for a button click: > (callback > (lambda (button event) > (send msg set-label > (path->string > (get-directory > #f #f #f null)))))) > > ; Show the frame by calling its show method > (send frame show #t) > > > > > On Fri, May 2, 2008 at 2:05 PM, Robby Findler wrote: > > > > Hm. Apparently, that function has been partly removed. It should > > probably be completely removed. > > > > You want: > > > > get-file-list > > > > I think. > > > > hth, > > Robby > > > > > > > > On Fri, May 2, 2008 at 7:59 AM, Stephen De Gabrielle > > wrote: > > > Hi, I'm trying to use the Framework (to select a folder), but I'm > > > having trouble getting the args right; I think I'm doing the minimum > > > sufficient to get a 'select files' dialog, but I'm getting a contrat > > > error that I don't quite understand - it doesn't seems to match the > > > contract in the manual. > > > > > > Can anyone make any suggestions as to what I'm doing wrong? > > > [I'm using 3.99.0.23 [3m], built from source and running on Eee Xandros(debian)] > > > > > > > (finder:common-get-file-list > > > #f > > > "get-folder" > > > #f > > > "not right" > > > #f) > > > > > > . framework broke the contract > > > (->* > > > () > > > ((or/c false/c path?) > > > string? > > > (or/c false/c byte-regexp?) > > > string? > > > (or/c > > > false/c > > > (is-a?/c interface:top-level-window<%>))) > > > (or/c (listof path?) false/c)) > > > on finder:common-get-file-list; expected <(or/c (listof path?) > > > false/c)>, given: # > > > > > > > > > > > _________________________________________________ > > > For list-related administrative tasks: > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > > > > > > > -- > Cheers, > > Stephen > > -- > Stephen De Gabrielle > s.degabrielle@ucl.ac.uk > Telephone +44 (0)20 7679 5242 (x45242) > Mobile 079 851 890 45 > Project: Making Sense of Information (MaSI) > http://www.uclic.ucl.ac.uk/annb/MaSI.html > > UCLIC: University College London Interaction Centre > http://www.uclic.ucl.ac.uk/ > > Remax House - 31/32 Alfred Place > London - WC1E 7DP > From czhu at cs.utah.edu Sat May 3 00:40:39 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:17:47 2009 Subject: [plt-scheme] two questions about extensions and 3m under 372 In-Reply-To: <481BD1CF.1020809@neilvandyke.org> References: <481BD1CF.1020809@neilvandyke.org> Message-ID: <481BECC7.2050104@cs.utah.edu> Neil Van Dyke wrote: > 1. What experiences have people had moving their existing MzScheme > extensions from CGC to 3m? > For me, under CGC, I used to insert MZ_GC_REG and so on manually, but later I find out using mzc --xform is much easier. > 2. What experiences have people had opting to stay with CGC? > AFAIK, there's not too much difference between 300 and 372, other than the xform get improved a lot. I managed to carefully re-structure my C code to make it work with xform. It might be hard for you, if you existing C code doesn't go well with xform. Manually inserting MZ_GC_REG and so on is very error prone, just like manually inserting malloc/free. And as far as I can tell, such error is hard to detect before deployment. I didn't stay with CGC because I knew I have to move on, but my result code works with CGC. My 2 cents, Chongkai > Background details follow... > > I'm helping to move a system deployed under PLT v300 to v372. The > system uses multiple in-house MzScheme extensions written in C. We > therefore need to decide whether to use the old CGC or 3m. > > My main concern is the unknown risk that I will make an error in the > conversion of the C code to 3m that won't manifest until this system > is deployed to customers under 372, which would be very bad. (Perhaps > it's easier to write for 3m from the start, rather than have a > different programmer convert after the fact.) > > I don't know the likelihood of error if I work very diligently, nor > the likelihood that any such error would be detected before deployment. > > By the way, any eventual move to PLT v4 is not a concern for this > system at this time. > > Thanks, > Neil > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From czhu at cs.utah.edu Sat May 3 00:42:13 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:17:48 2009 Subject: [plt-scheme] Newbie: the best way to start building GUI apps? In-Reply-To: References: Message-ID: <481BED25.1050908@cs.utah.edu> How much do you know about MrEd? http://download.plt-scheme.org/doc/372/html/mred/ Chongkai Andrei Stebakov wrote: > What is the best GUI framework to use with DrScheme on MS Windows? > I was trying to find GTK binding for MzScheme, but the links to MzGTK > were broken. > Are there any tutorials on how to build gui apps with MzScheme? > If I use Emacs, should I active DrEd (not MzScheme) to work with > built-in gui framework? > If finally I have to make a standalone executable, what files do I > need to have to deploy in on other machines? > > Thank you! > Andrew > ------------------------------------------------------------------------ > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From matthias at ccs.neu.edu Sat May 3 09:09:57 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:48 2009 Subject: [plt-scheme] Permutation correct way to do it ? In-Reply-To: <393480.62390.qm@web63308.mail.re1.yahoo.com> References: <393480.62390.qm@web63308.mail.re1.yahoo.com> Message-ID: <8E8DB6A7-3593-4511-922D-5C31BE4194DE@ccs.neu.edu> On May 2, 2008, at 10:56 PM, Rocky wrote: > I remember now why I like imperative style better. Why don't you send us a solution to the problem in your favorite language, imperative, OOP, logic-based, you name it. We can read it all and then we can compare the two things. -- Matthias From grettke at acm.org Sat May 3 10:26:45 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:17:48 2009 Subject: [plt-scheme] Newbie: the best way to start building GUI apps? In-Reply-To: References: Message-ID: <756daca50805030726u8e1a12flec8b2f61284ad86b@mail.gmail.com> On Fri, May 2, 2008 at 5:43 PM, Andrei Stebakov wrote: > What is the best GUI framework to use with DrScheme on MS Windows? Use MrED. From neil at neilvandyke.org Sat May 3 10:35:03 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:17:48 2009 Subject: [plt-scheme] Newbie: the best way to start building GUI apps? In-Reply-To: References: Message-ID: <481C7817.3080800@neilvandyke.org> Andrei Stebakov wrote at 05/02/2008 06:43 PM: > If I use Emacs, should I active DrEd (not MzScheme) to work with > built-in gui framework? Yes, if you want to use Emacs, then I think you want to use the Scheme command "mred -z". This command is one of the defaults in Quack. http://www.neilvandyke.org/quack/ From grettke at acm.org Sat May 3 10:47:33 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:17:48 2009 Subject: [plt-scheme] Is it important to understand continuations conceptually; not in terms of their implementation? Message-ID: <756daca50805030747m693c568bw5319cc004d8d8bf4@mail.gmail.com> I get the feeling that it is important to understand continuations conceptually, and specifically not in terms of their implementation. The TSPL book, for example, does so; and I often see it quoted word for word in explanations of continuations. However, the number of articles that describe continuations in terms of the stack far outweigh explaining them conceptually. Does describing them in terms of their implementation serve as a disservice? Will it be an impediment later on? From jadudm at gmail.com Sat May 3 11:46:17 2008 From: jadudm at gmail.com (Matt Jadud) Date: Thu Mar 26 02:17:48 2009 Subject: [plt-scheme] Is it important to understand continuations conceptually; not in terms of their implementation? In-Reply-To: <756daca50805030747m693c568bw5319cc004d8d8bf4@mail.gmail.com> References: <756daca50805030747m693c568bw5319cc004d8d8bf4@mail.gmail.com> Message-ID: On Sat, May 3, 2008 at 10:47 AM, Grant Rettke wrote: > I get the feeling that it is important to understand continuations > conceptually, and specifically not in terms of their implementation. > > Does describing them in terms of their implementation serve as a > disservice? Will it be an impediment later on? Are you asking "Does having an accurate model of continuations adversely affect the ability to understand the use of continuations?" I don't do a lot of programming that would benefit from the use of continuations. However, I'm not sure how, having learned to implement them, it makes it harder for me to use them. The most obvious pedagogic presentation of continuations I can think of (besides via implementation in TSPL) is their use in web programming... and I believe there's local expertise on this list in that regard. What is a "disservice" in this context? That students who learn about continuations by writing interpreters might construct an incorrect mental model of continuations by implementing them correctly? That a student might not have an "intuitive" understanding of how they can be applied in larger software applications? If your question is one of comparison/evaluation, I don't know how you would evaluate whether students who learn to implement continuations through writing interpreters have a "deeper" or "more meaningful" understanding than those students who learned to use continuations through web programming. Cheers, Matt From eric.kidd at iml.dartmouth.edu Sat May 3 11:46:20 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:17:49 2009 Subject: [plt-scheme] v372: Uncollectable Scheme memory (even with sandbox.ss) In-Reply-To: <20080502210950.95456650118@mail-svr1.cs.utah.edu> References: <431341160804291101k138a0d7fu2cc069379351014b@mail.gmail.com> <20080430181907.D0E956500E5@mail-svr1.cs.utah.edu> <20080502210950.95456650118@mail-svr1.cs.utah.edu> Message-ID: <431341160805030846o6ee17873r5e874fb804a0f885@mail.gmail.com> On Fri, May 2, 2008 at 5:09 PM, Matthew Flatt wrote: > For the record, we tracked this down to a problem with sharing the > output and error port across sandbox invocations. Our many thanks to Matthew Flatt (for tracking this down) and to Eli Barzilay (for fixing this in Swindle). Our final solution was to save and restore the output port handlers, as seen here: http://iml.dartmouth.edu/git?p=halyard.git;a=commitdiff;h=22d4b19dd2c48961c9aa9b7b8e53d4e40a4568b4 Our in-house Halyard users were delighted. This is already saving them lots of time on a day-to-day basis, and it will make development of our next project significantly easier. This fix will be included in Halyard 0.5.9 early next week. Once again, thank you for your help! Cheers, Eric http://iml.dartmouth.edu/halyard/ From eric.kidd at iml.dartmouth.edu Sat May 3 12:00:02 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:17:49 2009 Subject: [plt-scheme] two questions about extensions and 3m under 372 In-Reply-To: <481BD1CF.1020809@neilvandyke.org> References: <481BD1CF.1020809@neilvandyke.org> Message-ID: <431341160805030900m47657c45qcebda0331dfd94b1@mail.gmail.com> On Fri, May 2, 2008 at 10:45 PM, Neil Van Dyke wrote: > 1. What experiences have people had moving their existing MzScheme > extensions from CGC to 3m? We were emebedding mzscheme CGC in our C++ application, and converted manually to 3m. We saw performance improvements of around 50-200%. We were unable to use the MZ_GC_REG macros, because they're not compatible with C++ exceptions. So we build a limited C++ framework for managing the GC stack. Our recommendation: Don't try to insert MZ_GC_REG manually. Our C++ API is a bit easier to use than standard MZ_GC_REG, and it was still a non-trivial amount of work to convert 1700 lines of code. (And we suspect that we introduced at least one rare crashing bug that we're still tracking down.) The 'mzc --xform' tool looks much easier to use. > (Perhaps it's > easier to write for 3m from the start, rather than have a different > programmer convert after the fact.) Honestly, I think that the 3m API is extremely difficult to use safely, whether you use it from day, or convert later. However, if you can incorporate 'mzc --xform' into your build process, I suspect that you'll have reasonable results. The 'mzc --xform' tool is used for the mzscheme interpreter itself without any apparent problems. Cheers, Eric http://iml.dartmouth.edu/halyard/ From grettke at acm.org Sat May 3 12:13:14 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:17:49 2009 Subject: [plt-scheme] Is it important to understand continuations conceptually; not in terms of their implementation? In-Reply-To: References: <756daca50805030747m693c568bw5319cc004d8d8bf4@mail.gmail.com> Message-ID: <756daca50805030913g51638433v37db5bb4525858da@mail.gmail.com> Hi Matt, On Sat, May 3, 2008 at 10:46 AM, Matt Jadud wrote: > Are you asking "Does having an accurate model of continuations > adversely affect the ability to understand the use of continuations?" I have been thinking a lot about the notion that there is a "what we want to accomplish" and "how we will accomplish that with programming languages". So, there is this idea of the "what" and the "how" when it comes to programming languages. When folks learn programing languages, there is this focus (by nature or by bad habit?) only on the "how". This is a disservice to the student because they never develop the notion that for example that there is a concept of "binding a value to a name" (the what) and instead they only every learn the notion of "I want to declare a variable" and they have to re-learn it every time they learn a new language. Now that example is trivial but the point is that there is that difference between internalizing the idea that "binding a value to a name" is the hugely important concept and that how it is done in a particular language is just a realization of such a concept. Taking that idea to continuations, I see that most of the explanations of them focus on the stack. This is the "how", not the "what". The implication is that whenever said student goes to a different language he will only ever understand the concept of a continuation in terms of how it is implemented (the how) without benefiting from internalizing the concept of continuations. The disservice here is that when he goes to language that doesn't have continuations he won't be able to benefit by using the language in such a manner that the "spirit" of continuations could be implemented, instead giving up since he doesn't have access to the stack to implement what he knows about continuations from language X. The thing I am wondering about continuations is the "what" part. Is the concept as simple as "it is the rest of the program" and there is nothing more to it. Maybe I am assuming there is a bigger idea to it when it comes to computation, when there really is not. From matthias at ccs.neu.edu Sat May 3 12:32:36 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:49 2009 Subject: [plt-scheme] Is it important to understand continuations conceptually; not in terms of their implementation? In-Reply-To: <756daca50805030913g51638433v37db5bb4525858da@mail.gmail.com> References: <756daca50805030747m693c568bw5319cc004d8d8bf4@mail.gmail.com> <756daca50805030913g51638433v37db5bb4525858da@mail.gmail.com> Message-ID: <8C2E1BA5-0A4B-4EE6-8A15-DABA795B81A6@ccs.neu.edu> Grant, you're correct in that an understanding of one particular implementation technique for a linguistic construct causes huge and ubiquitous misunderstandings. Procedures and procedure calls are the examples that come to mind. Those things were explained via a stack-based implementation in the 1950s and 1960s although [&] abstract explanations in terms of 8th grade algebra all the way to Lambda Calculus had been around for, oh, a while. [*] As a result, procedure calls had been considered expensive and a thing to be avoided. Steele pointed out our misunderstanding of this issue AND YET, to this day, people don't implement procedures and procedure calls properly and we are still suffering from this perception. People still write huge procedures to avoid another call, and people still want to see complete stack traces in their debuggers for their function calls. So the sentence labeled with [*] uses the incorrect tense. It should use "have been and are" instead. It is one sad state of affairs. Of course, this just refers back to the sentence with [&]: people who design and implement programming languages do not wish to study mathematical models of PLs, can't and won't. But they sure want credit on all fronts. That's why the problem is pervasive. Continuation objects in Scheme are special-purpose procedures. That is, they are procedural representations of the 'rest of the computation with respect to some expression evaluation.' So the story is related but fortunately (or whatever) doesn't have as much of an impact. Continuations aren't as useful as procedure. Yes, there are kids out there who think that if you don't implement continuations with fast code etc your Scheme implementation isn't worth much. But those are just mislead. Continuations can be implemented with at least four basic techniques that I can remember right now. Clinger et al (a nice scientific paper from the 80s revised in the 90s) lays out a beautiful and well- presented comparison of such techniques. I recommend reading it. And of course Dybvig/Hieb's lazy stack copy technique in the original paper. Of course in SML/NJ callcc = cons. So that's that. Continuations can be understood as all kinds of abstract beasts, with little more knowledge than 8th grade algebra or Lambda Calculus. But that is just an abstract form of 'how'. I have spent a good deal of time on this question. Finally, continuations can be understood from a 'pragmatic' perspective ('what are they useful for, and how are they used'). For this question, I recommend two books and a paper: -- Shriram's PLAI -- Friedman and Springers, "Art and Scheme" -- Friedman's POPL talk from 1988 on "Applications of Continuations" Good luck -- Matthias From eric.kidd at iml.dartmouth.edu Sat May 3 13:01:11 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:17:49 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? Message-ID: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> First, some background: We tend to work with fairly large Scheme programs (sometimes exceeding 50,000 lines of code), and we reload them from scratch of a fairly regular basis. Historically, we've relied on a two-prong approach: 1) Sandbox our code by loading it into a new namespace each time. 2) Compile *.ss files into *.zo files using the compilation manager. This improves load times by a factor of 5 to 10. This strategy works fine on Windows, because we have a local, writable copy of PLTCOLLECTS. But on the Mac, there's a good chance that the PLTCOLLECTS directory is owned by root. So when we try to enable the compilation manager, we get the following error: delete-file: cannot delete file: "/opt/local/share/mzscheme/371/collects/swindle/compiled/misc.zo" (Permission denied; errno=13) Here, we're trying to compile our own *.ss files, stored in the user's working directory. But the compilation manager is attempting to recompile system *.ss files in /opt/local/, which is owned by root. This error is caused by compile-zo, which attempts to delete any existing *.zo file before compiling: [else (when (file-exists? zo-name) (delete-file zo-name)) (with-handlers ([exn:get-module-code? Unfortunately, there's no way for use to override this behavior without disabling the compilation manager, because make-compilation-manager-load/use-compiled-handler/table disables itself if another module tries to wrap it: [(not (eq? compilation-manager-load-handler (current-load/use-compiled))) (trace-printf "skipping: ~a current-load/use-compiled changed ~s" path (current-load/use-compiled)) (default-handler path mod-name)] It looks like the simplest solution is to make a local copy of mzlib/cm.ss, and modify it to check whether directories are writable. What do people think? Are we insane? Confused? :-) Are we abusing the compilation manager for tasks it was never meant to handle? Thank you for any suggestions you can provide! Cheers, Eric http://iml.dartmouth.edu/halyard/ From lispercat at gmail.com Sat May 3 14:07:55 2008 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu Mar 26 02:17:51 2009 Subject: [plt-scheme] Interactive gui development in Emacs with MrEd Message-ID: I am making my first steps with MrEd with gui apps (on MS WinXP) I took a sample of "hello" application from http://programmingalchemy.blogspot.com/2007/05/open-source-cross-platform-gui.html and pasted that code in hello.scm in Emacs. I started MrEd -z and started to evaluate all forms one after another (with Ctr-x Ctrl-e). Finally when I came to the final form (send frame show #t) and evaluated it, a window without any contents appeared, to get message to show on the window I had to switch back and forth from the app to emacs. Looks like emacs is blocking the message thread of the MrEd application. I am not sure if it's the right way to use MrEd in Emacs... I come from Common Lisp/Slime environment, so it seemed natural to me. When I compile the file and make an exe, everything works. How the interactive development with MrEd should look like when you add new UI elements and test them before you make the final exe? Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080503/eddf9f00/attachment.htm From plragde at uwaterloo.ca Sat May 3 14:45:11 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:17:51 2009 Subject: [plt-scheme] running mzscheme in 3.99.0.23 Message-ID: <481CB2B7.8050404@uwaterloo.ca> I'm trying to figure out how things will change for students when we move to v400. When I write a program in Beginning Student like (define (mysqr x) (* x x)) (mysqr 6) and save it in "test.ss", then run "mzscheme test.ss" on the command line, nothing is printed out. But if I change the language to Module (mostly so the metadata goes away), put #lang scheme/base at the top of the file, save it as "test2.ss", and run "mzscheme test2.ss", 36 is printed out. I don't think I would have predicted that, but I'm sure there's a consistent explanation. What governs what is printed out, and can I change either of these behaviours? Thanks. --PR From matthias at ccs.neu.edu Sat May 3 16:14:25 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:51 2009 Subject: [plt-scheme] running mzscheme in 3.99.0.23 In-Reply-To: <481CB2B7.8050404@uwaterloo.ca> References: <481CB2B7.8050404@uwaterloo.ca> Message-ID: <0F1B1338-ACF8-459F-AFBD-338353E408A3@ccs.neu.edu> When you're in a module, things are printed out. When you're in a teaching language, the implicit module installs a non-printer at top-level. You might want to ask why, and the best answer is that we're not completely finished with the module move yet. Matthew has pushed for #lang htdp/beginner (or things like that) and this may just come with 4.1. But this means that we also have to rethink drscheme's relationship to the lang part. -- Matthias On May 3, 2008, at 2:45 PM, Prabhakar Ragde wrote: > I'm trying to figure out how things will change for students when > we move to v400. When I write a program in Beginning Student like > > (define (mysqr x) (* x x)) > (mysqr 6) > > and save it in "test.ss", then run "mzscheme test.ss" on the > command line, nothing is printed out. But if I change the language > to Module (mostly so the metadata goes away), put > > #lang scheme/base > > at the top of the file, save it as "test2.ss", and run "mzscheme > test2.ss", 36 is printed out. I don't think I would have predicted > that, but I'm sure there's a consistent explanation. What governs > what is printed out, and can I change either of these behaviours? > Thanks. --PR > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From plragde at uwaterloo.ca Sat May 3 16:31:25 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:17:51 2009 Subject: [plt-scheme] running mzscheme in 3.99.0.23 In-Reply-To: <0F1B1338-ACF8-459F-AFBD-338353E408A3@ccs.neu.edu> References: <481CB2B7.8050404@uwaterloo.ca> <0F1B1338-ACF8-459F-AFBD-338353E408A3@ccs.neu.edu> Message-ID: <481CCB9D.3080205@uwaterloo.ca> Matthias Felleisen wrote: > > When you're in a module, things are printed out. This is a change from 3xx, right? > When you're in a teaching language, the implicit module installs a > non-printer at top-level. Okay, thanks. Is there any way to change that right now? Do I have to take students into #lang scheme to have them run on the command line, or can I do it while they're still in the teaching languages? > #lang htdp/beginner I tried that, but wasn't surprised when it didn't work. Is there a description of exactly what is different between #lang scheme and #lang scheme/base? (I'm thinking of the equivalent of footnote 1 to section 2 of the DrScheme Programming Environment Manual in 3xx.) --PR From mflatt at cs.utah.edu Sat May 3 16:46:39 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:51 2009 Subject: [plt-scheme] running mzscheme in 3.99.0.23 In-Reply-To: <481CCB9D.3080205@uwaterloo.ca> References: <481CB2B7.8050404@uwaterloo.ca> <0F1B1338-ACF8-459F-AFBD-338353E408A3@ccs.neu.edu> <481CCB9D.3080205@uwaterloo.ca> Message-ID: <20080503204640.CD69065011D@mail-svr1.cs.utah.edu> At Sat, 03 May 2008 16:31:25 -0400, Prabhakar Ragde wrote: > Matthias Felleisen wrote: > > > > When you're in a module, things are printed out. That's not quite right. The `scheme' and `scheme/base' module languages automatically print the results of top-level expressions in a module body. The `mzscheme' module language doesn't do that (as it didn't in 3xx). For example, the program #lang mzscheme 10 doesn't print 10. > > When you're in a teaching language, the implicit module installs a > > non-printer at top-level. A bit more precisely, the`lang/htdp-beginner', etc. module languages do not print the results of top-level expressions. Going back to the original question: > What governs what is > printed out, and can I change either of these behaviours? The module's language is in charge via the `#%module-begin' binding. If you create a new module language, then you can re-export `#%module-begin' from `scheme/base' to have top-level expression values printed, or you could re-export `#%plain-module'begin' as `#%module-begin' to have top-level expressions results ignored. Changing an existing language is tricker. If you know that the language's `#%module-begin' is the same as `scheme/base' or the same as `#%plain-module-begin', then you could create a new language that re-exports everything of the existing language, except that it re-exports the other `#%module-begin'. If the existing language has a more complicated `#%module-begin', however (which is the case for the `htdp' languages), then it's a problem of composing `#%module-begin's, which doesn't work in general. In particular, I don't see an easy way of creating a variant of `lang/htdp-beginner' that prints the results of top-level expressions, but I'll think about it more. > Is there a description of exactly what is different between #lang scheme > and #lang scheme/base? (I'm thinking of the equivalent of footnote 1 to > section 2 of the DrScheme Programming Environment Manual in 3xx.) I'll add something like that to the reference manual. (It will be computed automatically from existing annotations in the documentation source.) Matthew From aleks at cs.brown.edu Sat May 3 16:47:18 2008 From: aleks at cs.brown.edu (Aleks Bromfield) Date: Thu Mar 26 02:17:52 2009 Subject: [plt-scheme] running mzscheme in 3.99.0.23 In-Reply-To: <0F1B1338-ACF8-459F-AFBD-338353E408A3@ccs.neu.edu> References: <481CB2B7.8050404@uwaterloo.ca> <0F1B1338-ACF8-459F-AFBD-338353E408A3@ccs.neu.edu> Message-ID: <20080503204717.GA30360@cs.brown.edu> On Sat, May 03, 2008 at 04:14:25PM -0400, Matthias Felleisen wrote: > When you're in a teaching language, the implicit module installs a > non-printer at top-level. How much work would it be to remove that non-printer? Last year, the class I TAed had a blind student. Her screen reader was not compatible with DrScheme, so she had to use MzScheme at the command line. It was nontrivial to set things up so that she could write a file in a text editor, but see the output in MzScheme. It would have been tremendously useful if the teaching languages had a printer by default. ~ Aleks From filcab at gmail.com Sat May 3 19:29:38 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:17:52 2009 Subject: [plt-scheme] Run a function when pressing start in drscheme Message-ID: <225F8D94-BA8F-49EB-8053-D1B28772F49A@gmail.com> Hi I'm trying to run a function when my program is terminated, to do some minor cleanup. I'm using an exit-handler, but that only works when calling exit. When I press start in DrScheme (after loading my code), my function is not called. Is there a way to register a function to be called whenever the inferior scheme quits (either through exit or pressing start in DrScheme)? Thanks for the help - Filipe Cabecinhas From robby at cs.uchicago.edu Sat May 3 21:25:23 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:17:52 2009 Subject: [plt-scheme] Run a function when pressing start in drscheme In-Reply-To: <225F8D94-BA8F-49EB-8053-D1B28772F49A@gmail.com> References: <225F8D94-BA8F-49EB-8053-D1B28772F49A@gmail.com> Message-ID: <932b2f1f0805031825j4262eaa9h579a65b0565c6a33@mail.gmail.com> There's isn't an "inferior scheme" per se (in the Emacs sense of a separate process). Instead, there is a custodian that gets shutdown. You can't currently add code to do clean up when a custodian is shutdown without extending mzscheme itself. But maybe if we knew a little bit more of the specifics, we could suggest an alternative. Robby On Sat, May 3, 2008 at 6:29 PM, Filipe Cabecinhas wrote: > Hi > > I'm trying to run a function when my program is terminated, to do some > minor cleanup. > > I'm using an exit-handler, but that only works when calling exit. When I > press start in DrScheme (after loading my code), my function is not called. > Is there a way to register a function to be called whenever the inferior > scheme quits (either through exit or pressing start in DrScheme)? > > Thanks for the help > > - Filipe Cabecinhas > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From benjisimon at gmail.com Sat May 3 22:43:57 2008 From: benjisimon at gmail.com (Ben Simon) Date: Thu Mar 26 02:17:52 2009 Subject: [plt-scheme] Interactive gui development in Emacs with MrEd In-Reply-To: References: Message-ID: After kicking off mred -z, did you run the following in your emacs repl: (current-eventspace (make-eventspace)) Does that help? Here's where I first saw that advice: http://www.neilvandyke.org/quack/quack.el ;; Evaluate ;; ;; (current-eventspace (make-eventspace)) ;; ;; as the first expression in the stdio REPL, and then it will work the ;; way you want. ;; ;; The GUI REPL creates a new eventspace for evaluating expressions, so ;; the expressions are not evaluated in MrEd's main thread. The stdio ;; REPL, however, uses the main thread for evaluating expressions, so that ;; it acts just like MzScheme. On Sat, May 3, 2008 at 2:07 PM, Andrei Stebakov wrote: > I am making my first steps with MrEd with gui apps (on MS WinXP) > I took a sample of "hello" application from > http://programmingalchemy.blogspot.com/2007/05/open-source-cross-platform-gui.html > > and pasted that code in hello.scm in Emacs. I started MrEd -z and started > to evaluate all forms one after another (with Ctr-x Ctrl-e). > Finally when I came to the final form (send frame show #t) and evaluated > it, a window without any contents appeared, to get message to show on the > window I had to switch back and forth from the app to emacs. > Looks like emacs is blocking the message thread of the MrEd application. > I am not sure if it's the right way to use MrEd in Emacs... I come from > Common Lisp/Slime environment, so it seemed natural to me. > When I compile the file and make an exe, everything works. > How the interactive development with MrEd should look like when you add > new UI elements and test them before you make the final exe? > > Thank you, > Andrew > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > -- Have an idea for software? I can make it happen - http://www.ideas2executables.com My Blog: http://benjisimon.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080503/df7827c7/attachment.html From robby at cs.uchicago.edu Sat May 3 22:47:19 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:17:53 2009 Subject: [plt-scheme] Interactive gui development in Emacs with MrEd In-Reply-To: References: Message-ID: <932b2f1f0805031947s4bbed39fkfdd8fff410412d20@mail.gmail.com> This is actually subtly wrong (because REPL interactions and GUI callbacks will now be in separate threads, and that can lead to strange behavior). There was a recent discussion of this here on the mailing list, and the short version of the story is that the implementation of -z in v4 is going to "do the right thing", ie what you want. Robby On Sat, May 3, 2008 at 9:43 PM, Ben Simon wrote: > After kicking off mred -z, did you run the following in your emacs repl: > (current-eventspace (make-eventspace)) > > Does that help? > > Here's where I first saw that advice: > http://www.neilvandyke.org/quack/quack.el > ;; Evaluate > ;; > ;; (current-eventspace (make-eventspace)) > ;; > ;; as the first expression in the stdio REPL, and then it will work the > ;; way you want. > ;; > ;; The GUI REPL creates a new eventspace for evaluating expressions, so > ;; the expressions are not evaluated in MrEd's main thread. The stdio > ;; REPL, however, uses the main thread for evaluating expressions, so that > ;; it acts just like MzScheme. > > > > > On Sat, May 3, 2008 at 2:07 PM, Andrei Stebakov wrote: > > > > > > > > > I am making my first steps with MrEd with gui apps (on MS WinXP) > > I took a sample of "hello" application from > http://programmingalchemy.blogspot.com/2007/05/open-source-cross-platform-gui.html > > > > and pasted that code in hello.scm in Emacs. I started MrEd -z and started > to evaluate all forms one after another (with Ctr-x Ctrl-e). > > Finally when I came to the final form (send frame show #t) and evaluated > it, a window without any contents appeared, to get message to show on the > window I had to switch back and forth from the app to emacs. > > Looks like emacs is blocking the message thread of the MrEd application. > > I am not sure if it's the right way to use MrEd in Emacs... I come from > Common Lisp/Slime environment, so it seemed natural to me. > > When I compile the file and make an exe, everything works. > > How the interactive development with MrEd should look like when you add > new UI elements and test them before you make the final exe? > > > > Thank you, > > Andrew > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > > > > -- > Have an idea for software? I can make it happen - > http://www.ideas2executables.com > My Blog: http://benjisimon.blogspot.com > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From benjisimon at gmail.com Sat May 3 22:47:53 2008 From: benjisimon at gmail.com (Ben Simon) Date: Thu Mar 26 02:17:53 2009 Subject: [plt-scheme] Newbie: the best way to start building GUI apps? In-Reply-To: <756daca50805030726u8e1a12flec8b2f61284ad86b@mail.gmail.com> References: <756daca50805030726u8e1a12flec8b2f61284ad86b@mail.gmail.com> Message-ID: On Sat, May 3, 2008 at 10:26 AM, Grant Rettke wrote: > On Fri, May 2, 2008 at 5:43 PM, Andrei Stebakov > wrote: > > What is the best GUI framework to use with DrScheme on MS Windows? > > Use MrED. Agreed, use MrEd. And here are some reasons why: http://benjisimon.blogspot.com/2008/04/tackling-desktop-gui-project-consider.html -Ben -- Have an idea for software? I can make it happen - http://www.ideas2executables.com My Blog: http://benjisimon.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080503/d865256d/attachment.htm From neil at neilvandyke.org Sat May 3 23:06:37 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:17:53 2009 Subject: [plt-scheme] Interactive gui development in Emacs with MrEd In-Reply-To: <932b2f1f0805031947s4bbed39fkfdd8fff410412d20@mail.gmail.com> References: <932b2f1f0805031947s4bbed39fkfdd8fff410412d20@mail.gmail.com> Message-ID: <481D283D.4080903@neilvandyke.org> Thanks, Robby. The new version of Quack removes the TODO comment with the bad advice. (The new Quack also incidentally has a few small improvements for Emacs 22 and PLT. ) http://www.neilvandyke.org/quack/ Robby Findler wrote at 05/03/2008 10:47 PM: > This is actually subtly wrong (because REPL interactions and GUI > callbacks will now be in separate threads, and that can lead to > strange behavior). There was a recent discussion of this here on the > mailing list, and the short version of the story is that the > implementation of -z in v4 is going to "do the right thing", ie what > you want. > > Robby > > On Sat, May 3, 2008 at 9:43 PM, Ben Simon wrote: > >> After kicking off mred -z, did you run the following in your emacs repl: >> (current-eventspace (make-eventspace)) >> >> Does that help? >> >> Here's where I first saw that advice: >> http://www.neilvandyke.org/quack/quack.el [...] From mflatt at cs.utah.edu Sat May 3 23:56:50 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:54 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? In-Reply-To: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> References: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> Message-ID: <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> At Sat, 3 May 2008 13:01:11 -0400, "Eric Kidd" wrote: > This strategy works fine on Windows, because we have a local, writable > copy of PLTCOLLECTS. But on the Mac, there's a good chance that the > PLTCOLLECTS directory is owned by root. So when we try to enable the > compilation manager, we get the following error: > > delete-file: cannot delete file: > "/opt/local/share/mzscheme/371/collects/swindle/compiled/misc.zo" > (Permission denied; errno=13) > > Here, we're trying to compile our own *.ss files, stored in the user's > working directory. But the compilation manager is attempting to > recompile system *.ss files in /opt/local/, which is owned by root. But why does "misc.ss" need to be recompiled? The files in the main installation should refer only to other files in the main installation; if none of them change, then the compilation manager shouldn't try to recompile any of them. Is it a file-modification-date problem, a bug, or are installation files somehow changed or redirected to depend on non-installation files? Matthew From filcab at gmail.com Sun May 4 06:25:02 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:17:54 2009 Subject: [plt-scheme] Run a function when pressing start in drscheme In-Reply-To: <932b2f1f0805031825j4262eaa9h579a65b0565c6a33@mail.gmail.com> References: <225F8D94-BA8F-49EB-8053-D1B28772F49A@gmail.com> <932b2f1f0805031825j4262eaa9h579a65b0565c6a33@mail.gmail.com> Message-ID: <33FC208E-3666-48B2-A6F2-61E1F9EFEB16@gmail.com> Hi On 4 May, 2008, at 02:25, Robby Findler wrote: > > But maybe if we knew a little bit more of the specifics, we could > suggest an alternative. > > Robby I'm working on a program that, when it starts, has to open a connection to another program. When opening the connection, one instance of the other program is started (even if there is already another instance running. I can't change this). The other program has to load about 100MB to memory so I don't want it just hanging there and having to go to the task manager to close it. So I wanted to register a function to be run whenever the scheme exited, so I could close the program. Thanks for the help - Filipe Cabecinhas From rrnewton at gmail.com Sun May 4 06:56:24 2008 From: rrnewton at gmail.com (Ryan Newton) Date: Thu Mar 26 02:17:54 2009 Subject: [plt-scheme] Running into syntax->datum error trying to build r6rs code Message-ID: <9D44E273-CEE8-4A99-B566-7542EAC59773@csail.mit.edu> I'm using rev 9632 from SVN. Either using mzscheme directly, or plt-r6rs, I can build a leaf module with no dependencies (compat.mzscheme.sls). However, when I try to build a module that depends on that leaf node, I then run into a syntax->datum error like the following: [Compiling /afs/csail.mit.edu/u/n/newton/WaveScope/code/wavescript/src/ ws/globals.sls] [Compiling /home/newton/wavescript/src/ws/compat/compat.mzscheme.sls] syntax->datum: expects argument of type ; given {# # # References: <225F8D94-BA8F-49EB-8053-D1B28772F49A@gmail.com> <932b2f1f0805031825j4262eaa9h579a65b0565c6a33@mail.gmail.com> <33FC208E-3666-48B2-A6F2-61E1F9EFEB16@gmail.com> Message-ID: Can you wrap your program in a call to dynamic-wind, which clears up the subprocess whenever your main function exits? N. On Sun, May 4, 2008 at 11:25 AM, Filipe Cabecinhas wrote: > > I'm working on a program that, when it starts, has to open a connection to > another program. When opening the connection, one instance of the other > program is started (even if there is already another instance running. I > can't change this). The other program has to load about 100MB to memory so I > don't want it just hanging there and having to go to the task manager to > close it. > > So I wanted to register a function to be run whenever the scheme exited, so > I could close the program. > > > Thanks for the help > > - Filipe Cabecinhas From noelwelsh at gmail.com Sun May 4 07:06:43 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:17:55 2009 Subject: [plt-scheme] Running into syntax->datum error trying to build r6rs code In-Reply-To: <9D44E273-CEE8-4A99-B566-7542EAC59773@csail.mit.edu> References: <9D44E273-CEE8-4A99-B566-7542EAC59773@csail.mit.edu> Message-ID: On Sun, May 4, 2008 at 11:56 AM, Ryan Newton wrote: > As a side note, this model of installing everything in a collections > directory took a little getting used to. Perhaps plt-r6rs should simply > take a -path argument for the root of the r6rs application (like larceny). > The semantics might be the same as adding the path to PLTCOLLECTS. This seems wrong, at least for normal PLT Scheme (I have not used R6RS). A statement like (require (file "foo.ss")) [or just (require "foo.ss")] will look for foo.ss in the same directory as the current module. There is no need for this directory to be in PLTCOLLECTS. You might find define-runtime-path useful for your application, but it doesn't sound like you're using modules and collections in the way they're intended to be used. HTH, N. From samth at ccs.neu.edu Sun May 4 07:24:46 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:17:55 2009 Subject: [plt-scheme] Running into syntax->datum error trying to build r6rs code In-Reply-To: References: <9D44E273-CEE8-4A99-B566-7542EAC59773@csail.mit.edu> Message-ID: <63bb19ae0805040424t3c14a8f1xee5f9a5522d26bf3@mail.gmail.com> On Sun, May 4, 2008 at 7:06 AM, Noel Welsh wrote: > On Sun, May 4, 2008 at 11:56 AM, Ryan Newton wrote: > > As a side note, this model of installing everything in a collections > > directory took a little getting used to. Perhaps plt-r6rs should simply > > take a -path argument for the root of the r6rs application (like larceny). > > The semantics might be the same as adding the path to PLTCOLLECTS. > > This seems wrong, at least for normal PLT Scheme (I have not used > R6RS). A statement like > > (require (file "foo.ss")) > > [or just (require "foo.ss")] > > will look for foo.ss in the same directory as the current module. > There is no need for this directory to be in PLTCOLLECTS. > > You might find define-runtime-path useful for your application, but it > doesn't sound like you're using modules and collections in the way > they're intended to be used. The PLT implementation of R6RS only looks for R6RS libraries in the current collection path. So an R6RS library spec like: (import (foo bar baz)) is equivalent to the v4 require spec: (require foo/bar/baz). There's currently no way to import local files in the PLT R6RS implementation. -- sam th samth@ccs.neu.edu From mflatt at cs.utah.edu Sun May 4 09:06:02 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:56 2009 Subject: [plt-scheme] Running into syntax->datum error trying to build r6rs code In-Reply-To: <9D44E273-CEE8-4A99-B566-7542EAC59773@csail.mit.edu> References: <9D44E273-CEE8-4A99-B566-7542EAC59773@csail.mit.edu> Message-ID: <20080504130606.504566500C3@mail-svr1.cs.utah.edu> At Sun, 4 May 2008 06:56:24 -0400, Ryan Newton wrote: > Either using mzscheme directly, or plt-r6rs, I can build a leaf module > with no dependencies (compat.mzscheme.sls). > > However, when I try to build a module that depends on that leaf node, > I then run into a syntax->datum error like the following: > > [Compiling /afs/csail.mit.edu/u/n/newton/WaveScope/code/wavescript/src/ > ws/globals.sls] > [Compiling /home/newton/wavescript/src/ws/compat/compat.mzscheme.sls] > syntax->datum: expects argument of type ; given {# csail.mit.edu/u/n/newton/WaveScope/code/wavescript/src/ws/globals.sls: > 904:24> # wavescript/src/ws/globals.sls:904:28> # newton/WaveScope/code/wavescript/src... > > Any ideas? On closer inspection, I see that `syntax->datum' didn't behave like it's supposed to. Now fixed in SVN. > As a side note, this model of installing everything in a collections > directory took a little getting used to. Perhaps plt-r6rs should > simply take a -path argument for the root of the r6rs application > (like larceny). The semantics might be the same as adding the path to > PLTCOLLECTS. That sounds reasonable, so I've added `++path'. > In any case, if I do let PLT use a separate collects directory (rather > than adding my current directory to PLTCOLLECTS) then I run into > trouble with "include". I've used the include macro to break out > shared pieces from "compat.sls" (which differs across > implementations). It seems that PLT's include demands a relative path > and won't accept an absolute one(?!). If you use `(include )', then does indeed have to be a portable, URL-style relative path, but `(include (file ))' lets you provide an absolute-path using the current platform's conventions. http://docs.plt-scheme.org/reference/include.html > Further, this relative path is > taken relative to the *collects* directory. It should be relative to the enclosing file. I guess the problem is that `plt-r6rs --install' doesn't see the `include', so it doesn't copy over the included file. I'm not sure how to fix that, other than to add a flag to `plt-r6rs --install' to supply extra files. You could also put the shared code in a library instead of using `include'. That is, instead of ;; shared.ss: (define shared 7) ;; compat.mzscheme.sls: .... (include "shared.ss") use ;; shared.ss: (library (... shared) (export include-shared) (import ....) (define-syntax (include-shared) (lambda (stx) (datum->syntax stx '(define shared 7))))) ;; compat.mzscheme.sls: .... (import .... (.... shared) ....) .... (include-shared) This approach is more verbose to get started, but it's less dependent on implementation-specific details for files and paths. Matthew From eric.kidd at iml.dartmouth.edu Sun May 4 09:35:07 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:17:56 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? In-Reply-To: <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> References: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> Message-ID: <431341160805040635w26bde438o95ea91ef47c303c1@mail.gmail.com> On Sat, May 3, 2008 at 11:56 PM, Matthew Flatt wrote: > But why does "misc.ss" need to be recompiled? The files in the main > installation should refer only to other files in the main installation; > if none of them change, then the compilation manager shouldn't try to > recompile any of them. Oh, I see! The main installation generates a full set of *.deps files. And the timestamps look good, so there's something more mysterious going on here. Let me spend a few hours trying to debug this. Thank you for the advice! Cheers, Eric From eric.kidd at iml.dartmouth.edu Sun May 4 11:10:18 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:17:56 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? In-Reply-To: <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> References: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> Message-ID: <431341160805040810w5704de1cr44c864f68e71b6ea@mail.gmail.com> On Sat, May 3, 2008 at 11:56 PM, Matthew Flatt wrote: > Is it a file-modification-date problem, a bug, or are installation > files somehow changed or redirected to depend on non-installation > files? I enabled tracing in the compilation manager, and eventually puzzled out what was happening. * Bug #1 (in Halyard): Bad current-library-collection-paths Our halyard/loader/collection-paths.ss had set up a bogus search path, containing _both_ the system 'collects-dir, and another 'collects-dir that was lying around. So PLT was getting terminally confused, and trying to mix files from two different copies of swindle. But how did we manage to get so confused? Further investigation revealed: * Bug #2 (in MacPorts mzscheme): Bad 'collects-dir Under MacPorts (and possibly other Unix-style package managers), the value of (find-system-path 'collects-dir) doesn't get set up correctly. But on those systems, we can generally find our collections in the appropriate directory under (find-system-path 'addon-dir). Normally, we don't notice the bogus collects-dir, because (find-library-collection-paths) also looks in addon-dir. This makes ordinary (require (libs ... "mzlib")) forms work correctly. But the compilation manager relies on things like (main-collects-relative->path '(collects . #"swindle/turbo.ss")) resolving to actual collection paths. And this will only work if (find-system-path 'collects-dir) returns something reasonable. We worked around this by adding 'addon-dir to the list of places we look for the system collections: http://iml.dartmouth.edu/git?p=halyard.git;a=commitdiff;h=f9b049bc4362426ca9314986e32fb3e50d7fe4e4 As a nice side-effect, this allows us to enable to enable the compilation manager on the Mac version of Halyard, speeding up reloads by a factor of 5 to 10. Once again, thank you for your help! Cheers, Eric http://iml.dartmouth.edu/halyard/ From eli at barzilay.org Sun May 4 11:34:38 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:17:56 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? In-Reply-To: <431341160805040810w5704de1cr44c864f68e71b6ea@mail.gmail.com> References: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> <431341160805040810w5704de1cr44c864f68e71b6ea@mail.gmail.com> Message-ID: <18461.55182.428917.105878@arabic.ccs.neu.edu> On May 4, Eric Kidd wrote: > * Bug #2 (in MacPorts mzscheme): Bad 'collects-dir > > Under MacPorts (and possibly other Unix-style package managers), the > value of (find-system-path 'collects-dir) doesn't get set up > correctly. But on those systems, we can generally find our > collections in the appropriate directory under (find-system-path > 'addon-dir). I just checked two things: 1. The Fedora plt package (it's v371 for my version of fedora). Looks like there is a bug: * (find-system-path 'collects-dir) returns "../", this is fine since the /usr/bin/mzscheme executable is a symlink to /usr/lib64/plt/bin/mzscheme, and that has the usual tree. * However -- and this is the bug -- (find-system-path 'exec-file) returns the location of the link instead of the actual file. I see the same thing with the subversion executable: winooski:~ eli> ln -s /home/scheme/plt/bin/mzscheme /tmp/mz winooski:~ eli> /tmp/mz Welcome to MzScheme v3.99.0.23 [3m], Copyright (c) 2004-2008 PLT Scheme Inc. > (find-system-path 'exec-file) # 2. But this is not a unix-style installation, so I checked such an installation -- using our nightly build installer. That seemed like it gets a perfectly fine result. (But there might be issues with other packagers that keep their own hacks from times where we didn't have good support for them.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mflatt at cs.utah.edu Sun May 4 11:58:04 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:57 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? In-Reply-To: <18461.55182.428917.105878@arabic.ccs.neu.edu> References: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> <431341160805040810w5704de1cr44c864f68e71b6ea@mail.gmail.com> <18461.55182.428917.105878@arabic.ccs.neu.edu> Message-ID: <20080504155805.AF6076500B7@mail-svr1.cs.utah.edu> At Sun, 4 May 2008 11:34:38 -0400, Eli Barzilay wrote: > * However -- and this is the bug -- (find-system-path 'exec-file) > returns the location of the link instead of the actual file. Why is that a bug? If mzscheme is started via a soft link, the result of `(find-system-path 'exec-file)' should be the soft link. And it's ok for `(find-system-path 'collects-dir)' to return a result relative to the binary. The results of `(find-system-path 'exec-file)' and `(find-system-path 'collects-dir)' should be combined using `find-executable-path', which follows soft links appropriately. Matthew From eli at barzilay.org Sun May 4 12:04:51 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:17:57 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? In-Reply-To: <20080504155805.AF6076500B7@mail-svr1.cs.utah.edu> References: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> <431341160805040810w5704de1cr44c864f68e71b6ea@mail.gmail.com> <18461.55182.428917.105878@arabic.ccs.neu.edu> <20080504155805.AF6076500B7@mail-svr1.cs.utah.edu> Message-ID: <18461.56995.281222.764891@arabic.ccs.neu.edu> On May 4, Matthew Flatt wrote: > At Sun, 4 May 2008 11:34:38 -0400, Eli Barzilay wrote: > > * However -- and this is the bug -- (find-system-path 'exec-file) > > returns the location of the link instead of the actual file. > > Why is that a bug? (I should have added a "(possibly a documentation bug)" there...) > If mzscheme is started via a soft link, the result of > `(find-system-path 'exec-file)' should be the soft link. > > And it's ok for `(find-system-path 'collects-dir)' to return a result > relative to the binary. > > The results of `(find-system-path 'exec-file)' and `(find-system-path > 'collects-dir)' should be combined using `find-executable-path', which > follows soft links appropriately. So it is a documentation bug, IMO -- I didn't understand that from If this path is relative, it's relative to the directory of @scheme[(find-system-path 'exec-file)]. I'd expect something like "... or what it resolves to if it's a symbolic link." -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mflatt at cs.utah.edu Sun May 4 12:07:42 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:17:57 2009 Subject: [plt-scheme] Disabling the compilation manager for system directories? In-Reply-To: <18461.56995.281222.764891@arabic.ccs.neu.edu> References: <431341160805031001u146611bfof4f12990e3822ed1@mail.gmail.com> <20080504035652.6A2A16500CB@mail-svr1.cs.utah.edu> <431341160805040810w5704de1cr44c864f68e71b6ea@mail.gmail.com> <18461.55182.428917.105878@arabic.ccs.neu.edu> <20080504155805.AF6076500B7@mail-svr1.cs.utah.edu> <18461.56995.281222.764891@arabic.ccs.neu.edu> Message-ID: <20080504160743.B4A4D6500BC@mail-svr1.cs.utah.edu> At Sun, 4 May 2008 12:04:51 -0400, Eli Barzilay wrote: > > The results of `(find-system-path 'exec-file)' and `(find-system-path > > 'collects-dir)' should be combined using `find-executable-path', which > > follows soft links appropriately. > > So it is a documentation bug, IMO -- I didn't understand that from > > If this path is relative, it's relative to the directory of > @scheme[(find-system-path 'exec-file)]. > > I'd expect something like "... or what it resolves to if it's a > symbolic link." Ah, that's definitely a documentation bug, which I'll fix now. matthew From plragde at uwaterloo.ca Sun May 4 13:16:24 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:17:57 2009 Subject: [plt-scheme] using plt-match.ss in teaching languages In-Reply-To: <86F34AF9-3373-4D67-B86D-6679DBF3616E@ccs.neu.edu> References: <481B3E25.8090302@uwaterloo.ca> <86F34AF9-3373-4D67-B86D-6679DBF3616E@ccs.neu.edu> Message-ID: <481DEF68.4070205@uwaterloo.ca> Matthias Felleisen wrote: > > If you change it to this: > > (require (lib "plt-match.ss" "mzlib")) > > (define-struct myposn (x y)) > > (define (dist p1 p2) > (match (list p1 p2) > [(list (struct myposn (x1 y1)) (struct myposn (x2 y2))) > (sqrt (+ (sqr (- x1 x2)) (sqr (- y1 y2))))])) > > (dist (make-myposn 0 0) (make-myposn 3 4)) > > > it works in all levels in my svn (version 3.99.0.23-svn1may2008 [3m].) I > think you're seeing a bug in match that was recently fixed. Quasipatterns don't appear to work (I'm using the version cited above). (match '(1 (2 3)) [`(1 (,x 3)) x]) produces 2 when preceded by #lang scheme and run in Module, but when preceded by (require (lib "plt-match.ss" "mzlib")) and run in Advanced Student, it says: x: name is not defined, not a parameter, and not a primitive name highlighting the last occurrence of x in the expression. (match '(1 (2 3)) [(list 1 (list x 3)) x]) works. I suppose I can live with that, but it would be nice to explain to the students why the former failed, and what else won't work. Thanks for any enlightenment anyone can provide. --PR From geoff at knauth.org Sun May 4 22:32:02 2008 From: geoff at knauth.org (Geoffrey S. Knauth) Date: Thu Mar 26 02:17:57 2009 Subject: [plt-scheme] running mzscheme in 3.99.0.23 In-Reply-To: <20080503204717.GA30360@cs.brown.edu> References: <481CB2B7.8050404@uwaterloo.ca> <0F1B1338-ACF8-459F-AFBD-338353E408A3@ccs.neu.edu> <20080503204717.GA30360@cs.brown.edu> Message-ID: <61A368CC-7892-4540-A3A1-5881006A5FEF@knauth.org> Wow, that's something I wouldn't have thought of, but I should have (I volunteered ten years at Recording for the Blind). On May 3, 2008, at 16:47, Aleks Bromfield wrote: > On Sat, May 03, 2008 at 04:14:25PM -0400, Matthias Felleisen wrote: >> When you're in a teaching language, the implicit module installs a >> non-printer at top-level. > > How much work would it be to remove that non-printer? > > Last year, the class I TAed had a blind student. Her screen reader was > not compatible with DrScheme, so she had to use MzScheme at the > command > line. It was nontrivial to set things up so that she could write a > file > in a text editor, but see the output in MzScheme. > > It would have been tremendously useful if the teaching languages had a > printer by default. > > ~ Aleks From neil at neilvandyke.org Mon May 5 01:20:03 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:17:57 2009 Subject: [plt-scheme] two questions about extensions and 3m under 372 In-Reply-To: <431341160805030900m47657c45qcebda0331dfd94b1@mail.gmail.com> References: <481BD1CF.1020809@neilvandyke.org> <431341160805030900m47657c45qcebda0331dfd94b1@mail.gmail.com> Message-ID: <481E9903.8060000@neilvandyke.org> Thanks to Chongkai Zhu and Eric Kidd for their very helpful responses. I think I'm going to try using "mzc --xform", along with some manual inspection. If that goes smoothly enough and seems to work, then I'll stress-test the extensions to be reasonably confident they're not breaking the GC. From matthias at ccs.neu.edu Mon May 5 15:50:42 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:17:57 2009 Subject: [plt-scheme] release of 4.0 Message-ID: <2C24C33E-2322-42ED-BF40-9B876849FF50@ccs.neu.edu> Due to (un)foreseen problems that crept into the release process, we are postponing the release of version 4.0 until early/mid June. Apologies if this causes any problems -- Matthias From spdegabrielle at gmail.com Mon May 5 19:32:00 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:17:58 2009 Subject: [plt-scheme] speeding up building from source Message-ID: <595b9ab20805051632xda8a2ceoa001083bf6962f03@mail.gmail.com> Hi, Does anyone have any suggestions for speeding up building from source? I'm using a slow/resource constrained machine, Cheers, Stephen From filcab at gmail.com Tue May 6 03:25:22 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:17:58 2009 Subject: [plt-scheme] speeding up building from source In-Reply-To: <595b9ab20805051632xda8a2ceoa001083bf6962f03@mail.gmail.com> References: <595b9ab20805051632xda8a2ceoa001083bf6962f03@mail.gmail.com> Message-ID: <8279AC48-20B1-4BEB-BD12-33DD46910575@gmail.com> Hi On 6 May, 2008, at 00:32, Stephen De Gabrielle wrote: > Does anyone have any suggestions for speeding up building from > source? > > I'm using a slow/resource constrained machine, One thing you could do is skip the documentation, which takes quite a while. In windows you would change the last line of build.bat to ..\..\mzscheme -l setup -- -D -n in unix you would change the SETUP_ARGS variable in the makefile to: SETUP_ARGS = -X "$(DESTDIR)$(collectsdir)" -l setup -- -D -n (if you do it in makefile.in before issuing ./configure it's better because the makefile is generated from it) on unix you can also disable stuff you don't need when running configure with --disable- (use ./configure --help to see what can be disabled). - Filipe Cabecinhas From eli at barzilay.org Tue May 6 03:36:49 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:17:58 2009 Subject: [plt-scheme] speeding up building from source In-Reply-To: <8279AC48-20B1-4BEB-BD12-33DD46910575@gmail.com> References: <595b9ab20805051632xda8a2ceoa001083bf6962f03@mail.gmail.com> <8279AC48-20B1-4BEB-BD12-33DD46910575@gmail.com> Message-ID: <18464.2705.253832.531112@arabic.ccs.neu.edu> On May 6, Filipe Cabecinhas wrote: > in unix you would change the SETUP_ARGS variable in the makefile to: > SETUP_ARGS = -X "$(DESTDIR)$(collectsdir)" -l setup -- -D -n There's no need to change the makefile, you can use `make plain-install' instead of `make install' -- this will make it skip running setup-plt, which you can do later with mzscheme -l- setup -D -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From spdegabrielle at gmail.com Tue May 6 04:13:58 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:17:58 2009 Subject: [plt-scheme] speeding up building from source In-Reply-To: <18464.2705.253832.531112@arabic.ccs.neu.edu> References: <595b9ab20805051632xda8a2ceoa001083bf6962f03@mail.gmail.com> <8279AC48-20B1-4BEB-BD12-33DD46910575@gmail.com> <18464.2705.253832.531112@arabic.ccs.neu.edu> Message-ID: <595b9ab20805060113g108b3b4dy70c25c27472e18fc@mail.gmail.com> excellent! thanks for both the tips. Regards, Stephen On Tue, May 6, 2008 at 8:36 AM, Eli Barzilay wrote: > On May 6, Filipe Cabecinhas wrote: > > in unix you would change the SETUP_ARGS variable in the makefile to: > > SETUP_ARGS = -X "$(DESTDIR)$(collectsdir)" -l setup -- -D -n > > There's no need to change the makefile, you can use > `make plain-install' instead of `make install' -- this will make it > skip running setup-plt, which you can do later with > > mzscheme -l- setup -D > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > -- Cheers, Stephen -- Stephen De Gabrielle s.degabrielle@ucl.ac.uk Telephone +44 (0)20 7679 5242 (x45242) Mobile 079 851 890 45 Project: Making Sense of Information (MaSI) http://www.uclic.ucl.ac.uk/annb/MaSI.html UCLIC: University College London Interaction Centre http://www.uclic.ucl.ac.uk/ Remax House - 31/32 Alfred Place London - WC1E 7DP From tbhanson at gmx.de Tue May 6 06:48:42 2008 From: tbhanson at gmx.de (Tim Hanson) Date: Thu Mar 26 02:17:58 2009 Subject: [plt-scheme] basic syntax problem Message-ID: <20080506104842.320780@gmx.net> hi, I'm having unexpected syntax trouble in something that worked before, so i suspect i am breaking rules i'm not aware of. the following code: (require ( lib "url.ss" "net")) (define (f u) (string->url u)) compiles once (and then runs), but not twice. the second attempt to "start" yields (cf. below): compile: bad syntax; reference to top-level identifier is not allowed, because no #%top syntax transformer is bound in: lifted could someone please explain or point me to a good doc? (i have dug a bit, but couldn't find anything.) cheers, Tim Willkommen bei DrScheme, Version 372 [3m]. Sprache: Kombo (enth?lt MrEd and Fortgeschritten) angepasst. > (f "www.faz.net") # ---------------------------- Willkommen bei DrScheme, Version 372 [3m]. Sprache: Kombo (enth?lt MrEd and Fortgeschritten) angepasst. compile: bad syntax; reference to top-level identifier is not allowed, because no #%top syntax transformer is bound in: lifted > -- 249 Spiele f?r nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro. Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de From noelwelsh at gmail.com Tue May 6 06:56:00 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:17:58 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <20080506104842.320780@gmx.net> References: <20080506104842.320780@gmx.net> Message-ID: On Tue, May 6, 2008 at 11:48 AM, Tim Hanson wrote: > hi, I'm having unexpected syntax trouble in something that worked before, so i suspect i am breaking rules i'm not aware of. > > the following code: > (require ( lib "url.ss" "net")) > > (define (f u) > (string->url u)) > > compiles once (and then runs), but not twice. the second attempt to "start" What do you mean by "compiles"? Are you running mzc on this code? If so, what is the complete code that causes the error? Your description doesn't include enough information for me to diagnose the problem (maybe someone else can help). The code above works fine in my MzScheme (3.99.0.23). N. From tbhanson at gmx.de Tue May 6 07:55:24 2008 From: tbhanson at gmx.de (Tim Hanson) Date: Thu Mar 26 02:17:58 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: References: <20080506104842.320780@gmx.net> Message-ID: <20080506115524.18780@gmx.net> > What do you mean by "compiles"? Are you running mzc on this code? If > so, what is the complete code that causes the error? Your description > doesn't include enough information for me to diagnose the problem > (maybe someone else can help). The code above works fine in my > MzScheme (3.99.0.23). sorry, i meant "start", as in digest the definitions. click start once: happiness and i can run (f ...) as i indicated. click start a second time and i get the error. -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger From tbhanson at gmx.de Tue May 6 08:00:25 2008 From: tbhanson at gmx.de (Tim Hanson) Date: Thu Mar 26 02:17:59 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: References: <20080506104842.320780@gmx.net> Message-ID: <20080506120025.18750@gmx.net> sorry. should have answered better. > What do you mean by "compiles"? Are you running mzc on this code? If > so, what is the complete code that causes the error? Your description > doesn't include enough information for me to diagnose the problem > (maybe someone else can help). The code above works fine in my > MzScheme (3.99.0.23). no, i am running in DrScheme Ver 372 [3m] with language "combined" (includes MrEd and advanced). i'm running a German version. -- 249 Spiele f?r nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro. Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de From plragde at uwaterloo.ca Tue May 6 08:10:01 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:17:59 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <20080506104842.320780@gmx.net> Message-ID: <48204A99.5010708@uwaterloo.ca> Tim Hanson wrote: > I'm having unexpected syntax trouble in something that worked before, so i suspect i am breaking rules i'm not aware of. > > the following code: > (require ( lib "url.ss" "net")) > > (define (f u) > (string->url u)) > > compiles once (and then runs), but not twice. the second attempt to "start" > yields (cf. below): > compile: bad syntax; reference to top-level identifier is not allowed, because no #%top syntax transformer is bound in: lifted We ran into this error with a similar demo intended for lecture, and I found it in the PLT bug database, marked as fixed. I bet it works in 3.99.0.23 (my example does). I don't know what the fix might be for 372. --PR From robby at cs.uchicago.edu Tue May 6 08:11:49 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:17:59 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <48204A99.5010708@uwaterloo.ca> References: <20080506104842.320780@gmx.net> <48204A99.5010708@uwaterloo.ca> Message-ID: <932b2f1f0805060511j1f542bbfr2574da83d44bc95b@mail.gmail.com> There were a few bugs that manifested like that in the last year or two (in the contract library and in the libraries used by the contract library). I believe that they are all fixed now in the latest version. Robby On Tue, May 6, 2008 at 7:10 AM, Prabhakar Ragde wrote: > Tim Hanson wrote: > > > > I'm having unexpected syntax trouble in something that worked before, so i > suspect i am breaking rules i'm not aware of. > > > > the following code: > > (require ( lib "url.ss" "net")) > > (define (f u) > > (string->url u)) > > > > compiles once (and then runs), but not twice. the second attempt to > "start" > > yields (cf. below): > > compile: bad syntax; reference to top-level identifier is not allowed, > because no #%top syntax transformer is bound in: lifted > > > > We ran into this error with a similar demo intended for lecture, and I > found it in the PLT bug database, marked as fixed. I bet it works in > 3.99.0.23 (my example does). I don't know what the fix might be for 372. > --PR > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From tbhanson at gmx.de Tue May 6 08:23:29 2008 From: tbhanson at gmx.de (Tim Hanson) Date: Thu Mar 26 02:17:59 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <932b2f1f0805060511j1f542bbfr2574da83d44bc95b@mail.gmail.com> References: <20080506104842.320780@gmx.net> <48204A99.5010708@uwaterloo.ca> <932b2f1f0805060511j1f542bbfr2574da83d44bc95b@mail.gmail.com> Message-ID: <20080506122329.14230@gmx.net> > There were a few bugs that manifested like that in the last year or > two (in the contract library and in the libraries used by the contract > library). I believe that they are all fixed now in the latest version. > > Robby thanks. i wasn't sure if 372 = 372, so i re-installed just now and the problem persists. based on Noel's hint i tried the code in MZScheme and I think it worked there. i don't suppose the fact that i'm running on a W2k3 server machine under VmWare is relevant? cheers, Tim -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser From robby at cs.uchicago.edu Tue May 6 08:36:05 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:00 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <20080506122329.14230@gmx.net> References: <20080506104842.320780@gmx.net> <48204A99.5010708@uwaterloo.ca> <932b2f1f0805060511j1f542bbfr2574da83d44bc95b@mail.gmail.com> <20080506122329.14230@gmx.net> Message-ID: <932b2f1f0805060536q5b8208ddte116f84023f43ad2@mail.gmail.com> On Tue, May 6, 2008 at 7:23 AM, Tim Hanson wrote: > > There were a few bugs that manifested like that in the last year or > > two (in the contract library and in the libraries used by the contract > > library). I believe that they are all fixed now in the latest version. > > > > Robby > > thanks. i wasn't sure if 372 = 372, so i re-installed just now and the problem persists. based on Noel's hint i tried the code in MZScheme and I think it worked there. i don't suppose the fact that i'm running on a W2k3 server machine under VmWare is relevant? No, that's not relevant. There is only one 372. :) One thing that worked around one of the bugs (I've lost track which one was which) is to do something like this: (define s->u string->url) at the top of your file and then use s->u instead of string->url everywhere. A pain, I know. Sorry for the trouble. Robby From mflatt at cs.utah.edu Tue May 6 08:59:19 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:00 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <932b2f1f0805060536q5b8208ddte116f84023f43ad2@mail.gmail.com> References: <20080506104842.320780@gmx.net> <48204A99.5010708@uwaterloo.ca> <932b2f1f0805060511j1f542bbfr2574da83d44bc95b@mail.gmail.com> <20080506122329.14230@gmx.net> <932b2f1f0805060536q5b8208ddte116f84023f43ad2@mail.gmail.com> Message-ID: <20080506125921.1CCB465008D@mail-svr1.cs.utah.edu> At Tue, 6 May 2008 07:36:05 -0500, "Robby Findler" wrote: > On Tue, May 6, 2008 at 7:23 AM, Tim Hanson wrote: > > > There were a few bugs that manifested like that in the last year or > > > two (in the contract library and in the libraries used by the contract > > > library). I believe that they are all fixed now in the latest version. > > > > > > Robby > > > > thanks. i wasn't sure if 372 = 372, so i re-installed just now and the > problem persists. based on Noel's hint i tried the code in MZScheme and I > think it worked there. i don't suppose the fact that i'm running on a W2k3 > server machine under VmWare is relevant? > > No, that's not relevant. There is only one 372. :) > > One thing that worked around one of the bugs (I've lost track which > one was which) is to do something like this: > > (define s->u string->url) > > at the top of your file and then use s->u instead of string->url everywhere. I don't think that works. The bug is related to the top-level environment; any reference to `string->url' in the top-level environment, including on the right-hand side of a definition, will fail the second time around. The only workaround I know is to put the reference to `string->url' in a module. That is, you can put your whole program in a module --- which is recommended, for lots of reasons --- or use (module workaround mzscheme (require (lib "url.ss" "net")) (define s->u string->url) (provide (rename s->u string->url))) (require workaround) Matthew From plragde at uwaterloo.ca Tue May 6 10:40:06 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:18:00 2009 Subject: [plt-scheme] release of 4.0 In-Reply-To: <2C24C33E-2322-42ED-BF40-9B876849FF50@ccs.neu.edu> Message-ID: <48206DC6.5030903@uwaterloo.ca> Matthias wrote: > Due to (un)foreseen problems that crept into the release process, we > are postponing the release of version 4.0 until early/mid June. Thanks for the update. Am I right in assuming that this pushes 4.1 to past the start of the school year (for us, after Labour Day)? --PR From tbhanson at gmx.de Tue May 6 10:41:53 2008 From: tbhanson at gmx.de (Tim Hanson) Date: Thu Mar 26 02:18:00 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <20080506125921.1CCB465008D@mail-svr1.cs.utah.edu> References: <20080506104842.320780@gmx.net> <48204A99.5010708@uwaterloo.ca> <932b2f1f0805060511j1f542bbfr2574da83d44bc95b@mail.gmail.com> <20080506122329.14230@gmx.net> <932b2f1f0805060536q5b8208ddte116f84023f43ad2@mail.gmail.com> <20080506125921.1CCB465008D@mail-svr1.cs.utah.edu> Message-ID: <20080506144153.107320@gmx.net> thanks, Matthew, > > at the top of your file and then use s->u instead of string->url > everywhere. > > I don't think that works. The bug is related to the top-level > environment; any reference to `string->url' in the top-level > environment, including on the right-hand side of a definition, will > fail the second time around. > > The only workaround I know is to put the reference to `string->url' in > a module. That is, you can put your whole program in a module --- which > is recommended, for lots of reasons --- or use > > (module workaround mzscheme > (require (lib "url.ss" "net")) > (define s->u string->url) > (provide (rename s->u string->url))) > (require workaround) great, i will try that and would like to learn about modules. is this a good place to read up on them: http://www.htus.org/Book/Staging/how-to-use-modules/ ? cheers, Tim -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger From mflatt at cs.utah.edu Tue May 6 10:50:06 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:01 2009 Subject: [plt-scheme] release of 4.0 In-Reply-To: <48206DC6.5030903@uwaterloo.ca> References: <48206DC6.5030903@uwaterloo.ca> Message-ID: <20080506145006.6D4976500AD@mail-svr1.cs.utah.edu> At Tue, 06 May 2008 10:40:06 -0400, Prabhakar Ragde wrote: > Matthias wrote: > > > Due to (un)foreseen problems that crept into the release process, we > > are postponing the release of version 4.0 until early/mid June. > > Thanks for the update. Am I right in assuming that this pushes 4.1 to > past the start of the school year (for us, after Labour Day)? No. The release date is a much stronger constraint on Version 4.1 than 4.0, since a September release is much less useful than an August release. A later 4.0 just means that we have less time to discover and fix problems before 4.1. Matthew From mflatt at cs.utah.edu Tue May 6 10:53:32 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:01 2009 Subject: [plt-scheme] basic syntax problem In-Reply-To: <20080506144153.107320@gmx.net> References: <20080506104842.320780@gmx.net> <48204A99.5010708@uwaterloo.ca> <932b2f1f0805060511j1f542bbfr2574da83d44bc95b@mail.gmail.com> <20080506122329.14230@gmx.net> <932b2f1f0805060536q5b8208ddte116f84023f43ad2@mail.gmail.com> <20080506125921.1CCB465008D@mail-svr1.cs.utah.edu> <20080506144153.107320@gmx.net> Message-ID: <20080506145332.DDCF56500AD@mail-svr1.cs.utah.edu> At Tue, 06 May 2008 16:41:53 +0200, "Tim Hanson" wrote: > great, i will try that and would like to learn about modules. is this a good > place to read up on them: > http://www.htus.org/Book/Staging/how-to-use-modules/ > ? Yes. For anyone using v3.99 or later, this is a better starting place: http://docs.plt-scheme.org/guide/modules.html Matthew From matthias at ccs.neu.edu Tue May 6 10:53:46 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:01 2009 Subject: [plt-scheme] release of 4.0 In-Reply-To: <48206DC6.5030903@uwaterloo.ca> References: <48206DC6.5030903@uwaterloo.ca> Message-ID: On May 6, 2008, at 10:40 AM, Prabhakar Ragde wrote: > Matthias wrote: > >> Due to (un)foreseen problems that crept into the release process, >> we are postponing the release of version 4.0 until early/mid June. > > Thanks for the update. Am I right in assuming that this pushes 4.1 > to past the start of the school year (for us, after Labour Day)? --PR The intended August update is usually based on the workshops we run and the take-home observations we make there. I don't anticipate any changes to that. -- Matthias From dyoo at cs.wpi.edu Mon May 5 21:00:09 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:01 2009 Subject: [plt-scheme] Writing a kill-safe data structure Message-ID: Hi everyone, I was wondering if someone could give a look at some code I've written to maintain a "topological queue". I've tried to write it to be kill-safe according to the techniques in the "Kill Safe Synchronization Abstractions" paper by Flatt and Findler. The code is here: http://hashcollision.org/tmp/topological-queue.ss Is it kill-safe? I'll eventually put it on PLaneT, as soon as my project I'm using it for is finished. Any code comments would be greatly appreciated. Thanks! From eddieSull at hotmail.com Tue May 6 11:51:21 2008 From: eddieSull at hotmail.com (Eddie Sullivan) Date: Thu Mar 26 02:18:01 2009 Subject: [plt-scheme] Building 3-99.0.23 on Cygwin Message-ID: I just built the 3-99.0.23 release of DrScheme from source on Cygwin running on Windows XP (without X-Windows). I was able to make it work, but it took some doing, and I wonder if I've ended up with a subtly broken system. I tested it on a few simple scripts and it does seem to be working. Here's what I did. Hopefully others will find this useful, or be able to correct any missteps I may have made. * I kept getting a linker error complaining of an undefined reference to _scheme_require_from_original_env. I noticed that function was not defined, but also not called anywhere in the C source. I deleted the references to it, and it built. This of course scares me a bit. * I modified collects/setup/unixstyle-install.ss so it wouldn't try to copy the doc directory, since that directory is not there in the tarball I downloaded. * There is a problem in collects/setup/variant.ss. It assumes that the executable file name is "mzscheme" on a Unix-style system. Under Cygwin, this is not true: it is actually called "mzscheme.exe". * I had to set LIBRARY_PATH to the .libs directory before "make install" would work (this is using tcsh): setenv LIBRARY_PATH /cygdrive/c/src/plt-3.99.0.23/src/mzscheme/.libs/ * Building documentation ran out of memory. I think because Cygwin uses CGC for garbage collecting, which seems to have troubles with this (as discussed at http://article.gmane.org/gmane.lisp.scheme.plt/24577/match=scribble+memory) I didn't build the documentation. * My configure command was: /configure --enable-shared --prefix=/usr/local/plt --disable-mred * My make command was: make MAKE='make --unix' --unix make MAKE='make --unix' --unix plain-install mzscheme -l setup -- -D -n * I was using the following versions: ~>uname -srv CYGWIN_NT-5.1 1.5.25(0.156/4/2) 2007-12-14 19:21 ~>gcc --version gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) -Eddie From jev at mac.com Tue May 6 11:42:37 2008 From: jev at mac.com (Jaime Vargas) Date: Thu Mar 26 02:18:02 2009 Subject: [plt-scheme] Status of SrPersist Message-ID: I try to use SrPersist, but I get the following error: open-input-file: cannot open input file: "/Applications/PLT-Scheme- v372/collects/srpersist/private/srpmain.ss" (No such file or directory; errno=2) (module db mzscheme (require (lib "srpersist.ss" "srpersist")) (define x 10)) Is srpersist being developed. Are there any alternatives packages? Thanks, Jaime From noelwelsh at gmail.com Tue May 6 11:57:58 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:02 2009 Subject: [plt-scheme] Status of SrPersist In-Reply-To: References: Message-ID: There are a bunch of alternatives on PLaneT. PostgreSQL has the best support. N. On Tue, May 6, 2008 at 4:42 PM, Jaime Vargas wrote: > I try to use SrPersist, but I get the following error: > > open-input-file: cannot open input file: > "/Applications/PLT-Scheme-v372/collects/srpersist/private/srpmain.ss" (No > such file or directory; errno=2) > > > (module db mzscheme > (require (lib "srpersist.ss" "srpersist")) > (define x 10)) > > Is srpersist being developed. Are there any alternatives packages? > > Thanks, > > Jaime From jev at mac.com Tue May 6 13:32:33 2008 From: jev at mac.com (Jaime Vargas) Date: Thu Mar 26 02:18:02 2009 Subject: [plt-scheme] Status of SrPersist In-Reply-To: References: Message-ID: <3611BAA6-50DD-4D3D-B0CD-7EB32F0E6DA4@mac.com> Unfortunately I need ODBC support. -- Jaime On May 6, 2008, at 11:57 AM, Noel Welsh wrote: > There are a bunch of alternatives on PLaneT. PostgreSQL has the > best support. > > N. > > On Tue, May 6, 2008 at 4:42 PM, Jaime Vargas wrote: >> I try to use SrPersist, but I get the following error: >> >> open-input-file: cannot open input file: >> "/Applications/PLT-Scheme-v372/collects/srpersist/private/ >> srpmain.ss" (No >> such file or directory; errno=2) >> >> >> (module db mzscheme >> (require (lib "srpersist.ss" "srpersist")) >> (define x 10)) >> >> Is srpersist being developed. Are there any alternatives packages? >> >> Thanks, >> >> Jaime From lispercat at gmail.com Tue May 6 14:20:42 2008 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu Mar 26 02:18:03 2009 Subject: [plt-scheme] (Newbie) MrEd modues using Emacs Quack Message-ID: If I load this code in DrScheme and select Language (module...) and hit the run button it works (shows the window with the message): (module test mzscheme (require (lib "class.ss") (lib "mred.ss" "mred")) (define (main) (letrec ((frame-155 (new frame% (parent #f) (alignment '(center top)) (stretchable-height #t) (min-width 0) (style '()) (label "test") (width 146))) (message-156 (new message% (parent frame-155) (label "Hello!") (style '())))) (send frame-155 show #t))) (main)) Now, if I load the same code in Emacs quack mode with "mred.exe -z" running, there is now way I can make it show the window using the code as is (I tried to evaluate all region, or the last s-exp, nothing helps). If I remove the "(module test mzscheme " wrapping and start evaluate top level forms one after another, then by the time I evaluate (send frame-155 show #t) it will run the window without any problem. My question is how can I develop a module like above in the quack mode incrementally (adding/removing UI elements)? Basically, what the best practice of developing MrEd UI in Quack incrementally? Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080506/adea2fff/attachment.html From filcab at gmail.com Tue May 6 16:21:16 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:03 2009 Subject: [plt-scheme] (R6RS) Dr Scheme doesn't indent the 'library form correctly Message-ID: Hi When writing a 'library form, Dr Scheme indents to the start of the first argument of library, instead of indenting like it does in module: test program: #!r6rs (library (hello) (export greet) (import (rnrs)) (define (greet) (display 'hello))) Could you fix that? Also, how can I know how MzScheme is with R6RS interoperability? I'm writing a library that I would like to be able to port easily (it depends on some MzScheme-only stuff, but I'm minimizing it) so I wanted to write as much R6RS code as possible so I could port it between scheme implementations. If R6RS isn't very mature on mzscheme, then I'll just watch out for when it is and try to not make too much implementation-dependent code. Thanks for the help - Filipe Cabecinhas From robby at cs.uchicago.edu Tue May 6 16:29:43 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:03 2009 Subject: [plt-scheme] (R6RS) Dr Scheme doesn't indent the 'library form correctly In-Reply-To: References: Message-ID: <932b2f1f0805061329n6d3e8670i24f82bd221a88084@mail.gmail.com> On Tue, May 6, 2008 at 3:21 PM, Filipe Cabecinhas wrote: > Hi > > When writing a 'library form, Dr Scheme indents to the start of the first > argument of library, instead of indenting like it does in module: > > test program: > #!r6rs > (library (hello) > (export greet) > (import (rnrs)) > (define (greet) (display 'hello))) > > Could you fix that? Fow now, you can fix that yourself by adding "library" to the indenting preferences. Robby From dekudekuplex at yahoo.com Wed May 7 06:41:03 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:04 2009 Subject: [plt-scheme] (Newbie) MrEd modues using Emacs Quack In-Reply-To: Message-ID: <265290.36436.qm@web30207.mail.mud.yahoo.com> Hi Andrei, Apparently, according to the post by Robby Findler in the thread "[plt-scheme] Interactive gui development in Emacs with MrEd" (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024528.html), MrEd needs to be updated to v4 before the implementation of -z will "do the right thing"; i.e., put up a GUI window with the label "Hello!" upon evaluation of your module "test mzscheme." Also, per the post by Neil Van Dyke (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024530.html) in the same thread, you also need to update quack.el (at http://www.neilvandyke.org/quack/) from version 0.30 to version 0.31 (it was last updated on 2008-05-03). After updating quack.el to version 0.31, then once MrEd is updated to v4, you should be able to evaluate your module "test mzscheme" in Emacs Quack mode with "mred.exe -z" running, and it should put up a GUI window with the label "Hello!" However, according to the post by Matthias Felleisen (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024547.html) in the thread "[plt-scheme] release of 4.0," "Due to (un)foreseen problems that crept into the release process, [the developers] are postponing the release of version 4.0 until early/mid June." I.e., just stay tuned until then. Benjamin L. Russell --- On Wed, 5/7/08, Andrei Stebakov wrote: > From: Andrei Stebakov > Subject: [plt-scheme] (Newbie) MrEd modues using Emacs Quack > To: plt-scheme@list.cs.brown.edu > Date: Wednesday, May 7, 2008, 3:20 AM > If I load this code in DrScheme and select Language > (module...) and hit the > run button it works (shows the window with the message): > (module test mzscheme > (require (lib "class.ss") (lib > "mred.ss" "mred")) > (define > (main) > (letrec ((frame-155 > (new > frame% > (parent #f) > (alignment '(center top)) > (stretchable-height #t) > (min-width 0) > (style '()) > (label "test") > (width 146))) > (message-156 > (new > message% > (parent frame-155) > (label "Hello!") > (style '())))) > (send frame-155 show #t))) > (main)) > > Now, if I load the same code in Emacs quack mode with > "mred.exe -z" running, > there is now way I can make it show the window using the > code as is (I tried > to evaluate all region, or the last s-exp, nothing helps). > If I remove the "(module test mzscheme " wrapping > and start evaluate top > level forms one after another, then by the time I evaluate > (send frame-155 > show #t) it will run the window without any problem. > My question is how can I develop a module like above in the > quack mode > incrementally (adding/removing UI elements)? > Basically, what the best practice of developing MrEd UI in > Quack > incrementally? > > Thank you, > Andrew_________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robby at cs.uchicago.edu Wed May 7 06:55:38 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:04 2009 Subject: [plt-scheme] (Newbie) MrEd modues using Emacs Quack In-Reply-To: <265290.36436.qm@web30207.mail.mud.yahoo.com> References: <265290.36436.qm@web30207.mail.mud.yahoo.com> Message-ID: <932b2f1f0805070355ge7949c5ra815239a2493c337@mail.gmail.com> There's been a little more information about this topic in the more distant past. Here's a shortcut: evaluate (current-eventspace (make-eventspace)) in the REPL and then the GUI callbacks and the REPL evaluations will happen on different threads and avoid blocking each other. Of course, this is probably not what you want, since it can introduce threading bugs into your program. But it may be enough to tide you over to v4. The proper fix (which is what v4 will do) is to have the read-eval-print-loop create a separate thread that blocks on reads, keeping the eventspace main thread free to handle events during that time. Then, when it gets an expression, it should send the expression off to the eventspace main thread for evaluation. Robby On Wed, May 7, 2008 at 5:41 AM, Benjamin L. Russell wrote: > Hi Andrei, > > Apparently, according to the post by Robby Findler in the thread "[plt-scheme] Interactive gui development in Emacs with MrEd" (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024528.html), MrEd needs to be updated to v4 before the implementation of -z will "do the right thing"; i.e., put up a GUI window with the label "Hello!" upon evaluation of your module "test mzscheme." > > Also, per the post by Neil Van Dyke (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024530.html) in the same thread, you also need to update quack.el (at http://www.neilvandyke.org/quack/) from version 0.30 to version 0.31 (it was last updated on 2008-05-03). > > After updating quack.el to version 0.31, then once MrEd is updated to v4, you should be able to evaluate your module "test mzscheme" in Emacs Quack mode with "mred.exe -z" running, and it should put up a GUI window with the label "Hello!" > > However, according to the post by Matthias Felleisen (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024547.html) in the thread "[plt-scheme] release of 4.0," "Due to (un)foreseen problems that crept into the release process, [the developers] are postponing the release of version 4.0 until early/mid June." > > I.e., just stay tuned until then. > > Benjamin L. Russell > > --- On Wed, 5/7/08, Andrei Stebakov wrote: > > > From: Andrei Stebakov > > Subject: [plt-scheme] (Newbie) MrEd modues using Emacs Quack > > To: plt-scheme@list.cs.brown.edu > > Date: Wednesday, May 7, 2008, 3:20 AM > > > > If I load this code in DrScheme and select Language > > (module...) and hit the > > run button it works (shows the window with the message): > > (module test mzscheme > > (require (lib "class.ss") (lib > > "mred.ss" "mred")) > > (define > > (main) > > (letrec ((frame-155 > > (new > > frame% > > (parent #f) > > (alignment '(center top)) > > (stretchable-height #t) > > (min-width 0) > > (style '()) > > (label "test") > > (width 146))) > > (message-156 > > (new > > message% > > (parent frame-155) > > (label "Hello!") > > (style '())))) > > (send frame-155 show #t))) > > (main)) > > > > Now, if I load the same code in Emacs quack mode with > > "mred.exe -z" running, > > there is now way I can make it show the window using the > > code as is (I tried > > to evaluate all region, or the last s-exp, nothing helps). > > If I remove the "(module test mzscheme " wrapping > > and start evaluate top > > level forms one after another, then by the time I evaluate > > (send frame-155 > > show #t) it will run the window without any problem. > > My question is how can I develop a module like above in the > > quack mode > > incrementally (adding/removing UI elements)? > > Basically, what the best practice of developing MrEd UI in > > Quack > > incrementally? > > > > Thank you, > > Andrew_________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From mflatt at cs.utah.edu Wed May 7 09:59:36 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:04 2009 Subject: [plt-scheme] (R6RS) Dr Scheme doesn't indent the 'library form correctly In-Reply-To: References: Message-ID: <20080507135937.9B4B66500E7@mail-svr1.cs.utah.edu> At Tue, 6 May 2008 21:21:16 +0100, Filipe Cabecinhas wrote: > Also, how can I know how MzScheme is with R6RS interoperability? > I'm writing a library that I would like to be able to port easily (it > depends on some MzScheme-only stuff, but I'm minimizing it) so I > wanted to write as much R6RS code as possible so I could port it > between scheme implementations. > > If R6RS isn't very mature on mzscheme, then I'll just watch out for > when it is and try to not make too much implementation-dependent code. PLT Scheme's R6RS support is ready for use. It's difficult to say how mature it is, really, since it has only existed for a few months --- though I think it's pretty solid as R6RS implementations go. :) Matthew From spdegabrielle at gmail.com Wed May 7 10:40:44 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:18:05 2009 Subject: [plt-scheme] black buttons in drscheme Message-ID: <595b9ab20805070740u6a8ddaf5u98925586110e2c69@mail.gmail.com> Hi all, has anyone experienced black buttons in drscheme? The buttons are not all black the little image seems ok for the lady-bug ,the running man seems blury(alpha?) and teh stop signs white octagon is missing. I've attached a screenshot as an example. I'm building from source on a Xandros Linux(a debian deriv), I got black buttons about a week ago. I've disabled xrender as a configure option and loaded the png and jpeg libraries (from the debian packages) to no effect. I'm just hoping that someone else has experienced this, or has an idea about what is going on? Cheers, Stephen -- Stephen De Gabrielle s.degabrielle@ucl.ac.uk Telephone +44 (0)20 7679 5242 (x45242) Mobile 079 851 890 45 Project: Making Sense of Information (MaSI) http://www.uclic.ucl.ac.uk/annb/MaSI.html UCLIC: University College London Interaction Centre http://www.uclic.ucl.ac.uk/ Remax House - 31/32 Alfred Place London - WC1E 7DP -------------- next part -------------- A non-text attachment was scrubbed... Name: snapshot2.png Type: image/png Size: 9822 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080507/7ef636af/snapshot2.png From robby at cs.uchicago.edu Wed May 7 12:15:23 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:05 2009 Subject: [plt-scheme] (Newbie) MrEd modues using Emacs Quack In-Reply-To: References: <265290.36436.qm@web30207.mail.mud.yahoo.com> <932b2f1f0805070355ge7949c5ra815239a2493c337@mail.gmail.com> Message-ID: <932b2f1f0805070915w43283d7tcff498c8bcd130fa@mail.gmail.com> Well, that's just a piece of functionality that is in DrScheme but isn't implemented in Quack, I guess. You can approximate drscheme by using require, but that won't expose the bindings in the module to the REPL, it will only evaluate the main module. I believe others have contributed libraries that you can use to do this, but I can't recall what they are. I think they've been discussed on this mailing list, however. Robby On Wed, May 7, 2008 at 9:42 AM, Andrei Stebakov wrote: > Thank you, Benjamin, Robby. > Robby, I am using (current-eventspace (make-eventspace)) and my question was > not about blocking the thread (yes, without running (current-eventspace > (make-eventspace)) it's not even possible to develop anything > interactively). > My question was why evaluating the module top form (where the module is > defined) doesn't execute the (main) function. Without module definition, I > can evaluate all the forms and it works. > As per what Benjamin responded, I'll wait for the next v4 release of MrEd. > And yes, I updated to the latest Quack. > > Andrew > > > > On Wed, May 7, 2008 at 6:55 AM, Robby Findler wrote: > > There's been a little more information about this topic in the more > > distant past. Here's a shortcut: > > > > evaluate (current-eventspace (make-eventspace)) > > > > in the REPL and then the GUI callbacks and the REPL evaluations will > > happen on different threads and avoid blocking each other. > > > > Of course, this is probably not what you want, since it can introduce > > threading bugs into your program. But it may be enough to tide you > > over to v4. > > > > The proper fix (which is what v4 will do) is to have the > > read-eval-print-loop create a separate thread that blocks on reads, > > keeping the eventspace main thread free to handle events during that > > time. Then, when it gets an expression, it should send the expression > > off to the eventspace main thread for evaluation. > > > > Robby > > > > > > > > > > On Wed, May 7, 2008 at 5:41 AM, Benjamin L. Russell > > wrote: > > > Hi Andrei, > > > > > > Apparently, according to the post by Robby Findler in the thread > "[plt-scheme] Interactive gui development in Emacs with MrEd" > (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024528.html), MrEd > needs to be updated to v4 before the implementation of -z will "do the right > thing"; i.e., put up a GUI window with the label "Hello!" upon evaluation of > your module "test mzscheme." > > > > > > Also, per the post by Neil Van Dyke > (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024530.html) in the > same thread, you also need to update quack.el (at > http://www.neilvandyke.org/quack/) from version 0.30 to version 0.31 (it was > last updated on 2008-05-03). > > > > > > After updating quack.el to version 0.31, then once MrEd is updated to > v4, you should be able to evaluate your module "test mzscheme" in Emacs > Quack mode with "mred.exe -z" running, and it should put up a GUI window > with the label "Hello!" > > > > > > However, according to the post by Matthias Felleisen > (http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024547.html) in the > thread "[plt-scheme] release of 4.0," "Due to (un)foreseen problems that > crept into the release process, [the developers] are postponing the release > of version 4.0 until early/mid June." > > > > > > I.e., just stay tuned until then. > > > > > > Benjamin L. Russell > > > > > > --- On Wed, 5/7/08, Andrei Stebakov wrote: > > > > > > > From: Andrei Stebakov > > > > Subject: [plt-scheme] (Newbie) MrEd modues using Emacs Quack > > > > To: plt-scheme@list.cs.brown.edu > > > > Date: Wednesday, May 7, 2008, 3:20 AM > > > > > > > > > > If I load this code in DrScheme and select Language > > > > (module...) and hit the > > > > run button it works (shows the window with the message): > > > > (module test mzscheme > > > > (require (lib "class.ss") (lib > > > > "mred.ss" "mred")) > > > > (define > > > > (main) > > > > (letrec ((frame-155 > > > > (new > > > > frame% > > > > (parent #f) > > > > (alignment '(center top)) > > > > (stretchable-height #t) > > > > (min-width 0) > > > > (style '()) > > > > (label "test") > > > > (width 146))) > > > > (message-156 > > > > (new > > > > message% > > > > (parent frame-155) > > > > (label "Hello!") > > > > (style '())))) > > > > (send frame-155 show #t))) > > > > (main)) > > > > > > > > Now, if I load the same code in Emacs quack mode with > > > > "mred.exe -z" running, > > > > there is now way I can make it show the window using the > > > > code as is (I tried > > > > to evaluate all region, or the last s-exp, nothing helps). > > > > If I remove the "(module test mzscheme " wrapping > > > > and start evaluate top > > > > level forms one after another, then by the time I evaluate > > > > (send frame-155 > > > > show #t) it will run the window without any problem. > > > > My question is how can I develop a module like above in the > > > > quack mode > > > > incrementally (adding/removing UI elements)? > > > > Basically, what the best practice of developing MrEd UI in > > > > Quack > > > > incrementally? > > > > > > > > Thank you, > > > > Andrew_________________________________________________ > > > > For list-related administrative tasks: > > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > _________________________________________________ > > > For list-related administrative tasks: > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > > > From geoff at knauth.org Wed May 7 12:53:05 2008 From: geoff at knauth.org (Geoffrey S. Knauth) Date: Thu Mar 26 02:18:05 2009 Subject: [plt-scheme] release of 4.0 In-Reply-To: References: <48206DC6.5030903@uwaterloo.ca> Message-ID: <2E76A8A0-FD31-4609-AE1C-E47AC6174443@knauth.org> If 4.0 is released by June 30, I don't have to convince the IT department at my college to put the image on all the lab machines. After July 1, I have to start twisting arms. The really motivated students, however, always go get DrScheme themselves and put it on their laptops. From eric.kidd at iml.dartmouth.edu Wed May 7 13:46:05 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:18:05 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure Message-ID: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> Good afternoon! When compiling a large amount of code with Halyard (roughly 20K lines) with errortrace enabled, our memory usage frequently exceeds 400MB.[1] This will generally cause mzscheme 372 3m to crash. After a bit of poking around, it appears that the crash is caused by VirtualAlloc returning NULL: static void *malloc_pages(size_t len, size_t alignment) { // ... return (void *)VirtualAlloc(NULL, len, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); } #define malloc_dirty_pages(size,align) malloc_pages(size,align) When this happens, the following code in GC_mark attempts to write through a NULL pointer: /* Allocate and prep the page */ work = (struct mpage *)malloc_dirty_pages(APAGE_SIZE, APAGE_SIZE); memset(work, 0, sizeof(struct mpage)); I'm not sure why VirtualAlloc is failing at only 400MB (the system has barely even touched swap yet). But the GC should probably be prepared for VirtualAlloc to return NULL, and do something sensible. As always, thank you to the PLT Scheme for your code and advice! Cheers, Eric [1] I'm not sure why the compiler allocates and holds onto so much memory, but it all goes away when the namespace gets GC'd. Is the compiler storing some kind of compilation-related data somewhere in the module's data structures? I need to look into this... From mflatt at cs.utah.edu Wed May 7 17:08:23 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:05 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> Message-ID: <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> At Wed, 7 May 2008 13:46:05 -0400, "Eric Kidd" wrote: > I'm not sure why VirtualAlloc is failing at only 400MB (the system has > barely even touched swap yet). It's a bug in v372 and earlier that causes MzScheme to use only 1/4 the available address space under Windows. > But the GC should probably be prepared > for VirtualAlloc to return NULL, and do something sensible. This is a deep weakness of the current GC implementation; it needs to allocate some memory to perform a collection. I agree with your conclusion, but I don't know how to fix it, yet. > [1] I'm not sure why the compiler allocates and holds onto so much > memory, but it all goes away when the namespace gets GC'd. Is the > compiler storing some kind of compilation-related data somewhere in > the module's data structures? I need to look into this... We have no clear answer on this one. Macro expansion creates large data structures to keep information about the lexical contexts that come and go in the process of expansion. We continue to find ways to compress and prune those data structures, but they're still too big. Errortrace probably aggravates the problem by expanding and re-expanding. And then there are the possibilities for leaks and temporary leaks, where data hangs around a little longer than it should. We've made some progress lately on this front, too, but it's difficult to say whether it would improve memory use for your example. Matthew From eric.kidd at iml.dartmouth.edu Wed May 7 18:11:11 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:18:05 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> Message-ID: <431341160805071511k66a4f41eve76734679de07b6f@mail.gmail.com> On Wed, May 7, 2008 at 5:08 PM, Matthew Flatt wrote: > It's a bug in v372 and earlier that causes MzScheme to use only 1/4 the > available address space under Windows. Thank you for the fast response! Is there a workaround or patch for this bug in 3.99.x? We're quite happy to patch our PLT v372 tree. > > But the GC should probably be prepared > > for VirtualAlloc to return NULL, and do something sensible. > > This is a deep weakness of the current GC implementation; it needs to > allocate some memory to perform a collection. > > I agree with your conclusion, but I don't know how to fix it, yet. Would it be worthwhile to check for NULL and generate a fatal error message when VirtualAlloc fails? That would at least make it possible for users to distinguish between out-of-memory errors (which can be safely ignored) and NULL-pointer segfaults (which should be reported as bugs). Of course, I'm not sure how to report an error from within the GC. If you have any advice on how to report errors gracefully from within the GC, we'd be happy to send you a patch. > Macro expansion creates large data structures to keep information about > the lexical contexts that come and go in the process of expansion. I've observed an interesting pattern, which might be relevant: - When we load pre-compiled code, we end up using around 20MB of core (for everything: code, data, etc.). - When we have to compile the code, we end up using around 80MB of core. In either case, the memory can't be reclaimed until the namespace is destroyed. Do the compiled modules keep any syntax information around? Thank you so much for your debugging help and advice--you've helped us make significant improvements to Halyard, and our in-house users have been really happy all week. Cheers, Eric From mflatt at cs.utah.edu Wed May 7 18:44:27 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:05 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: <431341160805071511k66a4f41eve76734679de07b6f@mail.gmail.com> References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> <431341160805071511k66a4f41eve76734679de07b6f@mail.gmail.com> Message-ID: <20080507224428.C8B6965010D@mail-svr1.cs.utah.edu> At Wed, 7 May 2008 18:11:11 -0400, "Eric Kidd" wrote: > On Wed, May 7, 2008 at 5:08 PM, Matthew Flatt wrote: > > It's a bug in v372 and earlier that causes MzScheme to use only 1/4 the > > available address space under Windows. > > Thank you for the fast response! > > Is there a workaround or patch for this bug in 3.99.x? We're quite > happy to patch our PLT v372 tree. Maybe all you have to do is, in newgc.c, change #define LOG_APAGE_SIZE 14 to #define LOG_APAGE_SIZE 16 > > > But the GC should probably be prepared > > > for VirtualAlloc to return NULL, and do something sensible. > > > > This is a deep weakness of the current GC implementation; it needs to > > allocate some memory to perform a collection. > > > > I agree with your conclusion, but I don't know how to fix it, yet. > > Would it be worthwhile to check for NULL and generate a fatal error > message when VirtualAlloc fails? Yes, we should at least do that. > I've observed an interesting pattern, which might be relevant: > > - When we load pre-compiled code, we end up using around 20MB of > core (for everything: code, data, etc.). > - When we have to compile the code, we end up using around 80MB of core. > > In either case, the memory can't be reclaimed until the namespace is > destroyed. Do the compiled modules keep any syntax information around? Are you measuring that with `current-memory-use', or some other way? Forcing a GC a time or two before measuring? When I start MrEd v4 without .zo files, after I get a prompt, `(current-memory-use)' says 50 MB. After a GC, it's 19MB. With .zo files, the initial memory use is 22.5 MB, and then it's 15MB after a GC. Source-location information is pruned when writing bytecode. Also, the process of compiling probably triggers JIT compilation of code that doesn't run otherwise. Those can account for a few megabytes, and I think they explain the post-GC difference for MrEd, but those factors can't explain 60 MB. Looking into this further may help us find another problem. Matthew From dekudekuplex at yahoo.com Wed May 7 23:19:35 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:06 2009 Subject: [plt-scheme] black buttons in drscheme In-Reply-To: <595b9ab20805070740u6a8ddaf5u98925586110e2c69@mail.gmail.com> Message-ID: <540390.35494.qm@web30206.mail.mud.yahoo.com> Hi Stephen, While I can't vouch for this, the black buttons in your screen snapshot resemble similar buttons that I've seen in some applications (especially browsers with many tabs open containing images) in Windows XP Professional (Service Pack 2) and Mac OS X 10.2.8 Jaguar when running with too many running applications/insufficiently available RAM. According to your screen snapshot, you have a memory limit of 128 megabytes set in DrScheme, version 3.99.0.23 [3m]. You may wish to try removing this limit on your memory by navigating to the "Scheme" menu -> "Limit memory..." menu item, and clicking the "Unlimited" radio button there, and then restarting DrScheme. If that doesn't work, then try installing the stable release of DrScheme, version 372, english from the regular download site at http://download.plt-scheme.org/drscheme/ into a different directory from version 3.99.0.23 [3m] in order to avoid overwriting your existing DrScheme settings, and then running version 372 to see if this bug is reproduced. If the same bug occurs in version 372, then this bug is probably not related to DrScheme. In that case, try closing some other applications before starting version 3.99.0.23 [3m]. Otherwise, if this bug doesn't occur in version 372, then this problem may be related to your installation of version 3.99.0.23 [3m]. The first diagnostic measure would probably be, in version 3.99.0.23 [3m], to try to disable all installed tools by going to the "Edit" menu -> "Preferences..." menu item -> "Tools" tab, selecting each installed tool in the list there, then, at the bottom of that page for that tool, clicking on the "Skip the tool" radio button, and then restarting version 3.99.0.23 [3m]. If that fails, then uninstall and reinstall version 3.99.0.23 [3m]. Let us know if this procedure helps. Benjamin L. Russell --- On Wed, 5/7/08, Stephen De Gabrielle wrote: > Hi all, > > has anyone experienced black buttons in drscheme? > > The buttons are not all black the little image seems ok for > the > lady-bug ,the running man seems blury(alpha?) and teh stop > signs white > octagon is missing. > > I've attached a screenshot as an example. > > I'm building from source on a Xandros Linux(a debian > deriv), I got > black buttons about a week ago. > I've disabled xrender as a configure option and loaded > the png and > jpeg libraries (from the debian packages) to no effect. > > I'm just hoping that someone else has experienced this, > or has an idea > about what is going on? > > Cheers, > > Stephen > > -- > Stephen De Gabrielle > s.degabrielle@ucl.ac.uk > Telephone +44 (0)20 7679 5242 (x45242) > Mobile 079 851 890 45 > Project: Making Sense of Information (MaSI) > http://www.uclic.ucl.ac.uk/annb/MaSI.html > > UCLIC: University College London Interaction Centre > http://www.uclic.ucl.ac.uk/ > > Remax House - 31/32 Alfred Place > London - WC1E > 7DP_________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From sridhar.ratna at gmail.com Wed May 7 23:29:41 2008 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Thu Mar 26 02:18:06 2009 Subject: [plt-scheme] pink or red? Message-ID: <7c73a13a0805072029t1de24d26q9d5d3bdaaf47e10a@mail.gmail.com> >From http://docs.plt-scheme.org/quick/index.html """" Try giving circle the wrong number of arguments, just to see what happens: > (circle 10 20) procedure circle: expects 1 argument, given 2: 10 20 Note that DrScheme highlights the source of the error in pink. """ Doesn't look like pink to me. :-) From sridhar.ratna at gmail.com Wed May 7 23:31:10 2008 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Thu Mar 26 02:18:06 2009 Subject: [plt-scheme] Re: pink or red? In-Reply-To: <7c73a13a0805072029t1de24d26q9d5d3bdaaf47e10a@mail.gmail.com> References: <7c73a13a0805072029t1de24d26q9d5d3bdaaf47e10a@mail.gmail.com> Message-ID: <7c73a13a0805072031v32a84d3fy27b6734917f7be4@mail.gmail.com> Oh, I just noticed that it is talking about the *highlighting* of the s-exp. The HTML page however has no such highlighting. A minor bug. On Wed, May 7, 2008 at 8:29 PM, Sridhar Ratnakumar wrote: > From http://docs.plt-scheme.org/quick/index.html > > """" > Try giving circle the wrong number of arguments, just to see what happens: > > > (circle 10 20) > > procedure circle: expects 1 argument, given 2: 10 20 > > Note that DrScheme highlights the source of the error in pink. > """ > > Doesn't look like pink to me. :-) > From robby at cs.uchicago.edu Thu May 8 02:05:36 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:06 2009 Subject: [plt-scheme] black buttons in drscheme In-Reply-To: <540390.35494.qm@web30206.mail.mud.yahoo.com> References: <595b9ab20805070740u6a8ddaf5u98925586110e2c69@mail.gmail.com> <540390.35494.qm@web30206.mail.mud.yahoo.com> Message-ID: <932b2f1f0805072305w105897a0vf60d3ce463f4ea93@mail.gmail.com> I'm pretty sure the limit memory menu item is unrelated, as are tools. Robby On Wed, May 7, 2008 at 10:19 PM, Benjamin L. Russell wrote: > Hi Stephen, > > While I can't vouch for this, the black buttons in your screen snapshot resemble similar buttons that I've seen in some applications (especially browsers with many tabs open containing images) in Windows XP Professional (Service Pack 2) and Mac OS X 10.2.8 Jaguar when running with too many running applications/insufficiently available RAM. > > According to your screen snapshot, you have a memory limit of 128 megabytes set in DrScheme, version 3.99.0.23 [3m]. You may wish to try removing this limit on your memory by navigating to the "Scheme" menu -> "Limit memory..." menu item, and clicking the "Unlimited" radio button there, and then restarting DrScheme. > > If that doesn't work, then try installing the stable release of DrScheme, version 372, english from the regular download site at http://download.plt-scheme.org/drscheme/ into a different directory from version 3.99.0.23 [3m] in order to avoid overwriting your existing DrScheme settings, and then running version 372 to see if this bug is reproduced. > > If the same bug occurs in version 372, then this bug is probably not related to DrScheme. In that case, try closing some other applications before starting version 3.99.0.23 [3m]. > > Otherwise, if this bug doesn't occur in version 372, then this problem may be related to your installation of version 3.99.0.23 [3m]. The first diagnostic measure would probably be, in version 3.99.0.23 [3m], to try to disable all installed tools by going to the "Edit" menu -> "Preferences..." menu item -> "Tools" tab, selecting each installed tool in the list there, then, at the bottom of that page for that tool, clicking on the "Skip the tool" radio button, and then restarting version 3.99.0.23 [3m]. If that fails, then uninstall and reinstall version 3.99.0.23 [3m]. > > Let us know if this procedure helps. > > Benjamin L. Russell > > > > --- On Wed, 5/7/08, Stephen De Gabrielle wrote: > > > Hi all, > > > > has anyone experienced black buttons in drscheme? > > > > The buttons are not all black the little image seems ok for > > the > > lady-bug ,the running man seems blury(alpha?) and teh stop > > signs white > > octagon is missing. > > > > I've attached a screenshot as an example. > > > > I'm building from source on a Xandros Linux(a debian > > deriv), I got > > black buttons about a week ago. > > I've disabled xrender as a configure option and loaded > > the png and > > jpeg libraries (from the debian packages) to no effect. > > > > I'm just hoping that someone else has experienced this, > > or has an idea > > about what is going on? > > > > Cheers, > > > > Stephen > > > > -- > > Stephen De Gabrielle > > s.degabrielle@ucl.ac.uk > > Telephone +44 (0)20 7679 5242 (x45242) > > Mobile 079 851 890 45 > > Project: Making Sense of Information (MaSI) > > http://www.uclic.ucl.ac.uk/annb/MaSI.html > > > > UCLIC: University College London Interaction Centre > > http://www.uclic.ucl.ac.uk/ > > > > Remax House - 31/32 Alfred Place > > London - WC1E > > 7DP_________________________________________________ > > > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From stephen at degabrielle.name Thu May 8 02:50:06 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:18:06 2009 Subject: [plt-scheme] DrScheme interface changes Message-ID: <595b9ab20805072350s4e4220e3te1758902202d2ca5@mail.gmail.com> Hi. I don't know who is doing it- but thankyou! I really like the recent DrScheme interface changes. They look good and work well on a small screen. (which is good for me because I use a small notebook) and while screen resolutions are getting higher, my 'eye resolution' is getting worse. thanks again cheers stephen -- Sent from Google Mail for mobile | mobile.google.com Cheers, Stephen -- Stephen De Gabrielle s.degabrielle@ucl.ac.uk Telephone +44 (0)20 7679 5242 (x45242) Mobile 079 851 890 45 Project: Making Sense of Information (MaSI) http://www.uclic.ucl.ac.uk/annb/MaSI.html UCLIC: University College London Interaction Centre http://www.uclic.ucl.ac.uk/ Remax House - 31/32 Alfred Place London - WC1E 7DP From noelwelsh at gmail.com Thu May 8 03:09:02 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:06 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> Message-ID: On Wed, May 7, 2008 at 10:08 PM, Matthew Flatt wrote: > > [1] I'm not sure why the compiler allocates and holds onto so much > > memory, but it all goes away when the namespace gets GC'd. Is the > > compiler storing some kind of compilation-related data somewhere in > > the module's data structures? I need to look into this... FWIW, we found compiling (on the command line, with mzc -k) was something like O(n^2) in the number of files in 372. It would slow down significantly on large projects. 3.99 is *much* better in this regard. N. From filcab at gmail.com Thu May 8 03:45:55 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:07 2009 Subject: [plt-scheme] (R6RS) Dr Scheme doesn't indent the 'library form correctly In-Reply-To: <20080507135937.9B4B66500E7@mail-svr1.cs.utah.edu> References: <20080507135937.9B4B66500E7@mail-svr1.cs.utah.edu> Message-ID: <597E9FA3-6E08-4327-A1B8-2980CC8C21C6@gmail.com> Hi If I'm doing an R6RS module, how can I import something from a normal MzScheme module? For instance, If I want to (import (rnrs)) and then I want to have access to regexp-match from (require scheme) (or (import (only ... regexp-match)))? also, how can I, in MzScheme code, require an R6RS library? I can't just (require ) because it's not in the collects' directory Thanks for the help - Filipe Cabecinhas From martindemello at gmail.com Thu May 8 04:04:25 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:18:07 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? Message-ID: I just installed 399 from source. I downloaded the plt-3.99.0.24-src-unix.tgz, ran configure --prefix=/opt/plt and make (no problems), then make install, which died because there was no doc directory. So I downloaded the PLT Scheme Full Unix Sources (plt-clean-tree.tgz), copied the doc and man directories from there to the plt-399 directory, and make install worked fine. The problem now is, both the "help desk" link from PLT and plt-help from the command line simply open up the webpage in gvim, and I can see no option to invoke the internal browser. The best I can find in the preferences is to make it open in a browser instead. How do I get the internal help browser back? martin From spdegabrielle at gmail.com Thu May 8 04:16:38 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:18:07 2009 Subject: [plt-scheme] split window & keybindings Message-ID: <595b9ab20805080116r10d43ccfva97325e70d5bdcc5@mail.gmail.com> Hi, 1. Is it possible to split the drscheme editing window vertically and horizontally? I seem to remember a preference setting but I can't find it in DS or in the Docs. 2. can the (define ...) button be accessed by the keyboard, or is it mouse only? (ditto for the file/path browser button) Cheers, Stephen From eli at barzilay.org Thu May 8 04:19:55 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:07 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: References: Message-ID: <18466.47019.670404.748650@arabic.ccs.neu.edu> On May 8, Martin DeMello wrote: > I just installed 399 from source. I downloaded the > plt-3.99.0.24-src-unix.tgz, ran configure --prefix=/opt/plt and make > (no problems), then make install, which died because there was no > doc directory. (This sounds like either a distribution bug, or a build bug.) > So I downloaded the PLT Scheme Full Unix Sources > (plt-clean-tree.tgz), copied the doc and man directories from there > to the plt-399 directory, and make install worked fine. The problem > now is, both the "help desk" link from PLT and plt-help from the > command line simply open up the webpage in gvim, Did you set gvim as the default Gnome browser somehow? The first default that it would try is "gnome-open" -- what happens when you run it (gnome-open) with a URL? > and I can see no option to invoke the internal browser. The best I > can find in the preferences is to make it open in a browser > instead. How do I get the internal help browser back? The internal browser (Help Desk) is no longer used. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From martindemello at gmail.com Thu May 8 04:50:24 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:18:07 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <18466.47019.670404.748650@arabic.ccs.neu.edu> References: <18466.47019.670404.748650@arabic.ccs.neu.edu> Message-ID: On Thu, May 8, 2008 at 1:19 AM, Eli Barzilay wrote: > > > So I downloaded the PLT Scheme Full Unix Sources > > (plt-clean-tree.tgz), copied the doc and man directories from there > > to the plt-399 directory, and make install worked fine. The problem > > now is, both the "help desk" link from PLT and plt-help from the > > command line simply open up the webpage in gvim, > > Did you set gvim as the default Gnome browser somehow? The first > default that it would try is "gnome-open" -- what happens when you run > it (gnome-open) with a URL? Oddly enough, running gnome-open from the bash prompt opens the page in firefox, but running it from within drscheme opens the file in gvim. > > and I can see no option to invoke the internal browser. The best I > > can find in the preferences is to make it open in a browser > > instead. How do I get the internal help browser back? > > The internal browser (Help Desk) is no longer used. Ah. Shame - it felt nicer than using an external browser, somehow, though that could just be a psychological thing. martin From dekudekuplex at yahoo.com Thu May 8 05:21:14 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:07 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: Message-ID: <397321.36933.qm@web30205.mail.mud.yahoo.com> --- On Thu, 5/8/08, Martin DeMello wrote: > On Thu, May 8, 2008 at 1:19 AM, Eli Barzilay > wrote: > > > > [snip] > > > > > and I can see no option to invoke the internal > browser. The best I > > > can find in the preferences is to make it open > in a browser > > > instead. How do I get the internal help browser > back? > > > > The internal browser (Help Desk) is no longer used. > > Ah. Shame - it felt nicer than using an external browser, > somehow, > though that could just be a psychological thing. Indeed. If I may ask, why is it no longer used? It was like having a personal assistant in DrScheme who is no longer around. It now feels somehow ... lonely.... SWI-Prolog still has its own built-in internal browser, and WinHugs has its own built-in internal browser as well. They each have their own styles. It seems a shame that now DrScheme is reduced to using a generic browser. Why not just keep the existing internal browser, but allow users to invoke an external one if preferred? Benjamin L. Russell From noelwelsh at gmail.com Thu May 8 05:27:24 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:08 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <397321.36933.qm@web30205.mail.mud.yahoo.com> References: <397321.36933.qm@web30205.mail.mud.yahoo.com> Message-ID: My view is this: - writing a featureful text rendering engine is a big undertaken. The old help desk had significant limitations that made it difficult to display some information (e.g. the page for plt-match.ss) - there is limited time available for these tasks - given the above, reusing an existing web browser is an obvious time saver And the corollary: If you don't like the current (3.99) help desk... all the documentation is HTML, there are excellent web programming tools for Scheme. So write your own! It would be really cool to see a bunch of user developed help systems pop-up. N. > Indeed. If I may ask, why is it no longer used? It was like having a personal assistant in DrScheme who is no longer around. It now feels somehow ... lonely.... > > SWI-Prolog still has its own built-in internal browser, and WinHugs has its own built-in internal browser as well. They each have their own styles. It seems a shame that now DrScheme is reduced to using a generic browser. Why not just keep the existing internal browser, but allow users to invoke an external one if preferred? > > Benjamin L. Russell From eli at barzilay.org Thu May 8 05:35:47 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:08 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <397321.36933.qm@web30205.mail.mud.yahoo.com> References: <397321.36933.qm@web30205.mail.mud.yahoo.com> Message-ID: <18466.51571.844651.826636@arabic.ccs.neu.edu> On May 8, Benjamin L. Russell wrote: > > Indeed. If I may ask, why is it no longer used? It was like having > a personal assistant in DrScheme who is no longer around. It now > feels somehow ... lonely.... [Among other, more technical reasons, I think that many people complained exactly about having to deal with a special browser. (For example, there were always complaints about the help desk browser not doing something that popular browsers do.)] -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From dekudekuplex at yahoo.com Thu May 8 06:48:25 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:08 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <18466.51571.844651.826636@arabic.ccs.neu.edu> Message-ID: <433259.74060.qm@web30203.mail.mud.yahoo.com> --- On Thu, 5/8/08, Eli Barzilay wrote: > On May 8, Benjamin L. Russell wrote: > > > > Indeed. If I may ask, why is it no longer used? It > was like having > > a personal assistant in DrScheme who is no longer > around. It now > > feels somehow ... lonely.... > > [Among other, more technical reasons, I think that many > people > complained exactly about having to deal with a special > browser. (For > example, there were always complaints about the help desk > browser not > doing something that popular browsers do.)] Hmmm ... I just compared the Help Desks of DrScheme, versions 372 [3m] and 3.99.0.13-svn26feb2008 [3m], and discovered that I can't seem to find the corresponding Help Desk-accessible version of "Teach Yourself Scheme in Fixnum Days" that had been available from the old "Help" menu -> "Help Desk" menu item -> "PLT Help Desk" title -> "Learn to program in Scheme:" section -> "Program Design:" subsection -> "Books" sub-subsection -> "Teach Yourself Scheme in Fixnum Days" link. The new "PLT Scheme Documentation" HTML page (file:///C:/Program%20Files/PLT-3.99.0.13/doc/index.html) in version 3.99.0.13-svn26feb2008 [3m] does not seem to have a link to this page. Neither does there seem to be a link to this page anywhere in the new "Help" menu in DrScheme, version version 3.99.0.13-svn26feb2008 [3m], either. Am I missing something, or is there a direct link to this page accessible from the new "PLT Scheme Documentation" HTML page (file:///C:/Program%20Files/PLT-3.99.0.13/doc/index.html)? (I already know how to get to the official site to that book using Google; rather, I'm looking for a way to get there using a direct link on the new "PLT Scheme Documentation" HTML page that should correspond to the old built-in "PLT Help Desk" page.) Benjamin L. Russell From eric.kidd at iml.dartmouth.edu Thu May 8 07:43:47 2008 From: eric.kidd at iml.dartmouth.edu (Eric Kidd) Date: Thu Mar 26 02:18:08 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> Message-ID: <431341160805080443s4933e68bv8877d3397a3b0703@mail.gmail.com> On Thu, May 8, 2008 at 3:09 AM, Noel Welsh wrote: > FWIW, we found compiling (on the command line, with mzc -k) was > something like O(n^2) in the number of files in 372. It would slow > down significantly on large projects. 3.99 is *much* better in this > regard. Thank you for that information! If that's the case, than I have two questions about 3.99: 1) How stable is 3.99? I've seen a few segfault reports on the mailing list, which would suggest that it might be too soon for us to consider upgrading. 2) Assuming we have ~2000 lines of C++ code using the 372 3m API, and ~100,000 lines of Scheme code using the mzscheme language, what would be involved in upgrading to 3.99? We're definitely not interested in moving to R6RS any time in the next 6 months. I've poked around the website a bit, but I haven't found a "porting to 3.99" document yet. Thank you for any pointers you can provide! Cheers, Eric From eli at barzilay.org Thu May 8 07:49:22 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:08 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: <431341160805080443s4933e68bv8877d3397a3b0703@mail.gmail.com> References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> <431341160805080443s4933e68bv8877d3397a3b0703@mail.gmail.com> Message-ID: <18466.59586.106747.333456@arabic.ccs.neu.edu> On May 8, Eric Kidd wrote: > I've poked around the website a bit, but I haven't found a "porting to > 3.99" document yet. http://docs.plt-scheme.org/release-notes/mzscheme/MzScheme_4.txt -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mflatt at cs.utah.edu Thu May 8 07:51:41 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:08 2009 Subject: [plt-scheme] black buttons in drscheme In-Reply-To: <595b9ab20805070740u6a8ddaf5u98925586110e2c69@mail.gmail.com> References: <595b9ab20805070740u6a8ddaf5u98925586110e2c69@mail.gmail.com> Message-ID: <20080508115143.17793650144@mail-svr1.cs.utah.edu> This is now fixed. The problem was that the button drawing relied on `set-alpha' at the dc<%> level, but `set-alpha' works only when smoothed (i.e., anti-aliased) drawing is supported. It doesn't work, for example, in X11 without Cairo. We changed the drawing routine to detect when smoothed drawing is unavailable and to use a different drawing strategy in that case. Matthew At Wed, 7 May 2008 15:40:44 +0100, "Stephen De Gabrielle" wrote: > Hi all, > > has anyone experienced black buttons in drscheme? > > The buttons are not all black the little image seems ok for the > lady-bug ,the running man seems blury(alpha?) and teh stop signs white > octagon is missing. > > I've attached a screenshot as an example. > > I'm building from source on a Xandros Linux(a debian deriv), I got > black buttons about a week ago. > I've disabled xrender as a configure option and loaded the png and > jpeg libraries (from the debian packages) to no effect. > > I'm just hoping that someone else has experienced this, or has an idea > about what is going on? > > Cheers, > > Stephen > > -- > Stephen De Gabrielle > s.degabrielle@ucl.ac.uk > Telephone +44 (0)20 7679 5242 (x45242) > Mobile 079 851 890 45 > Project: Making Sense of Information (MaSI) > http://www.uclic.ucl.ac.uk/annb/MaSI.html > > UCLIC: University College London Interaction Centre > http://www.uclic.ucl.ac.uk/ > > Remax House - 31/32 Alfred Place > London - WC1E 7DP > > ------------------------------------------------------------------------------ > [image/#f "snapshot2.png"] [save to ~/Desktop/ & open] > . > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From noelwelsh at gmail.com Thu May 8 08:11:09 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:09 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: <431341160805080443s4933e68bv8877d3397a3b0703@mail.gmail.com> References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> <431341160805080443s4933e68bv8877d3397a3b0703@mail.gmail.com> Message-ID: On Thu, May 8, 2008 at 12:43 PM, Eric Kidd wrote: > 1) How stable is 3.99? I've seen a few segfault reports on the mailing > list, which would suggest that it might be too soon for us to consider > upgrading. We run it in production web sites. It is stable enough. [There seems to be a conception by some that pre-releases are only for those living on the edge. For at least the last four years I've done my day-to-day development in a recent checkout of plt-scheme. The svn trunk is usually very stable and has many bug fixes and improvements compared to the latest release. In fact I would go so far as to say that anyone developing a web app using 372 is crackers. ] > 2) Assuming we have ~2000 lines of C++ code using the 372 3m API, and > ~100,000 lines of Scheme code using the mzscheme language, what would > be involved in upgrading to 3.99? We're definitely not interested in > moving to R6RS any time in the next 6 months. I don't have experience with the C API. Most of your Scheme code will run as is; maybe with a few modifications. You can shift to the scheme/base language over time. N. From mflatt at cs.utah.edu Thu May 8 08:12:22 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:09 2009 Subject: [plt-scheme] 372: 3m does not check for VirtualAlloc failure In-Reply-To: <431341160805080443s4933e68bv8877d3397a3b0703@mail.gmail.com> References: <431341160805071046h7a8612a1x728dbf98248303f3@mail.gmail.com> <20080507210825.0929A6500B9@mail-svr1.cs.utah.edu> <431341160805080443s4933e68bv8877d3397a3b0703@mail.gmail.com> Message-ID: <20080508121224.1CA2E650145@mail-svr1.cs.utah.edu> At Thu, 8 May 2008 07:43:47 -0400, "Eric Kidd" wrote: > 1) How stable is 3.99? I've seen a few segfault reports on the mailing > list, which would suggest that it might be too soon for us to consider > upgrading. I think v3.99 is at least as stable as v372. Grepping for "seg" just in message titles over the last two months, I find two messages. The bug that Tom hit last week is also in v372. The one that Danny reported in March was specific to v3.99 (though the memory-leak half of his problem was a carry-over from v372). > 2) Assuming we have ~2000 lines of C++ code using the 372 3m API, and > ~100,000 lines of Scheme code using the mzscheme language, what would > be involved in upgrading to 3.99? The C half should be easy, because little has changed in internally. But see http://list.cs.brown.edu/pipermail/plt-scheme/2008-April/024322.html For the Scheme half, the document that Eli mentioned contains a "Porting Advice" section: http://docs.plt-scheme.org/release-notes/mzscheme/MzScheme_4.txt From jos.koot at telefonica.net Thu May 8 08:39:49 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:09 2009 Subject: [plt-scheme] DrScheme interface changes References: <595b9ab20805072350s4e4220e3te1758902202d2ca5@mail.gmail.com> Message-ID: <001101c8b108$9b438f90$2101a8c0@uw2b2dff239c4d> I guess you refer to version 3.99.0.24-svn7may2008 [3m]. In that case I fully agree and add my thanks to PLT. Jos ----- Original Message ----- From: "Stephen De Gabrielle" To: Sent: Thursday, May 08, 2008 8:50 AM Subject: [plt-scheme] DrScheme interface changes > Hi. I don't know who is doing it- but thankyou! > I really like the recent DrScheme interface changes. > They look good and work well on a small screen. (which is good for me > because I use a small notebook) and while screen resolutions are > getting higher, my 'eye resolution' is getting worse. > > thanks again > > cheers > stephen From icfp.publicity at googlemail.com Thu May 8 15:01:36 2008 From: icfp.publicity at googlemail.com (Matthew Fluet (ICFP Publicity Chair)) Date: Thu Mar 26 02:18:09 2009 Subject: [plt-scheme] Workshop on Generic Programming: Call for Papers (co-located w/ ICFP08) Message-ID: <53ff55480805081201r36f57164j73261e94b18ca813@mail.gmail.com> CALL FOR PAPERS Workshop on Generic Programming 2008 Victoria, Canada, 20th September 2008 http://www.comlab.ox.ac.uk/ralf.hinze/wgp2008/cfp.{html,pdf,ps,txt} The Workshop on Generic Programming is sponsored by ACM SIGPLAN and forms part of ICFP 2008. Previous Workshops on Generic Programming have been held in Marstrand (affiliated with MPC), Ponte de Lima (affiliated with MPC), Nottingham (informal workshop), Dagstuhl (IFIP WG2.1 Working Conference), Oxford (informal workshop), Utrecht (informal workshop), and Portland (affiliated with ICFP). Scope ----- Generic programming is about making programs more adaptable by making them more general. Generic programs often embody non-traditional kinds of polymorphism; ordinary programs are obtained from them by suitably instantiating their parameters. In contrast with normal programs, the parameters of a generic program are often quite rich in structure; for example they may be other programs, types or type constructors, class hierarchies, or even programming paradigms. Generic programming techniques have always been of interest, both to practitioners and to theoreticians, but only recently have generic programming techniques become a specific focus of research in the functional and object-oriented programming language communities. This workshop will bring together leading researchers in generic programming from around the world, and feature papers capturing the state of the art in this important emerging area. We welcome contributions on all aspects, theoretical as well as practical, of o adaptive object-oriented programming, o aspect-oriented programming, o component-based programming, o generic programming, o meta-programming, o polytypic programming, o programming with modules, and so on. Submission details ------------------ Deadline for submission: 30th June 2008 Notification of acceptance: 14th July 2008 Final submission due: 28th July 2008 Workshop: 20th September 2008 Authors should submit papers, in PostScript or PDF format, formatted for A4 paper, to Ralf Hinze (ralf.hinze@comlab.ox.ac.uk) or Don Syme (Don.Syme@microsoft.com) by 30th June 2008. The length should be restricted to 12 pages in standard (two-column, 9pt) ACM. Accepted papers are published by the ACM and will additionally appear in the ACM digital library. Programme committee ------------------- Ralf Hinze (co-chair) University of Oxford Patrik Jansson Chalmers University Andrew Lumsdaine Indiana University Conor McBride University of Nottingham Adriaan Moors Universiteit Leuven Fritz Ruehr Willamette University Tim Sheard Portland State University Don Syme (co-chair) Microsoft Research Todd Veldhuizen University of Waterloo From grettke at acm.org Thu May 8 16:03:33 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:09 2009 Subject: [plt-scheme] DrScheme interface changes In-Reply-To: <595b9ab20805072350s4e4220e3te1758902202d2ca5@mail.gmail.com> References: <595b9ab20805072350s4e4220e3te1758902202d2ca5@mail.gmail.com> Message-ID: <756daca50805081303y288e9c5bx6a157d098fc4b0b4@mail.gmail.com> On Thu, May 8, 2008 at 1:50 AM, Stephen De Gabrielle wrote: > Hi. I don't know who is doing it- but thankyou! > I really like the recent DrScheme interface changes. What in particular did you like? From czhu at cs.utah.edu Thu May 8 17:51:27 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:18:09 2009 Subject: [plt-scheme] split window & keybindings In-Reply-To: <595b9ab20805080116r10d43ccfva97325e70d5bdcc5@mail.gmail.com> References: <595b9ab20805080116r10d43ccfva97325e70d5bdcc5@mail.gmail.com> Message-ID: <482375DF.8040808@cs.utah.edu> Stephen De Gabrielle wrote: > Hi, > > 1. Is it possible to split the drscheme editing window vertically and > horizontally? I seem to remember a preference setting but I can't find > it in DS or in the Docs. > > View menu, Split bottom. (Ctrl + M on my Windows machine). Splits the editing window vertically but not horizontally. Chongkai From cr-service at hotmail.it Thu May 8 17:46:47 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:18:10 2009 Subject: [plt-scheme] solution for exercise 5.1.3 Message-ID: is this correct? (define (unity a b c) (+ (* a 100) (* b 10) c)) (define (check-guess3 a b c target) (cond [(< (unity a b c) target) 'TooSmall] [(= (unity a b c) target) 'Perfect] [(> (unity a b c) target) 'TooLarge])) _________________________________________________________________ Una cena tra amici? Cerca il ristorante con Live Search Maps http://maps.live.it -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080508/2201d8a8/attachment.html From Stefan.Ballnat at fokus.fraunhofer.de Fri May 9 08:21:27 2008 From: Stefan.Ballnat at fokus.fraunhofer.de (Ballnat, Stefan) Date: Thu Mar 26 02:18:11 2009 Subject: [plt-scheme] match library for r6rs Message-ID: I'm trying to find a match library for r6rs. Using the match library from mzlib didn't work. Following program worked for r5rs: (module match-testing mzscheme (require (lib "plt-match.ss" "mzlib")) (match '(1 2 1) ((list a b a) (display "foo"))) ) Trying to write it in r6rs leads to an error message: #!r6rs (library (match-test) (export) (import (rnrs) (mzlib plt-match) ) (match '(1 2 1) ((list a b a) (display "foo"))) ) match: no matching clause for {1 2 1} I also tried mzscheme/match or scheme/match with the same results. I don't even know, if they are the same library. In the Ikarus code I also found a match library that was ported to r6rs. But using this library with DrScheme leads to following error message: match.ss:377:6: compile: bad syntax; function application is not allowed, because no #%app syntax transformer is bound Now, I can't see any solution. Thanks. Stefan Ballnat PS: I'm using DrScheme 3.99.0.24. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080509/78483810/attachment.htm From yarkun at gmail.com Fri May 9 10:05:22 2008 From: yarkun at gmail.com (Yavuz Arkun) Date: Thu Mar 26 02:18:11 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <18466.51571.844651.826636@arabic.ccs.neu.edu> References: <397321.36933.qm@web30205.mail.mud.yahoo.com> <18466.51571.844651.826636@arabic.ccs.neu.edu> Message-ID: <48245A22.90402@gmail.com> Indeed, I remember this being a particular bugbear of me until it was fixed in 3.99 series. I was getting distracted by the discordant look of the internal browser and rendered text compared to the rest of my desktop. I believe that all application UIs should conform to the environment they are run in to the point that they are "invisible" when used. This is one of the reasons why I cannot make myself use emacs regularly despite a history going back years...I have philosophical problems with an application and development process that cannot use platform-standard dialogs, menus, keyboard shortcuts, etc. --Yavuz Eli Barzilay wrote: > On May 8, Benjamin L. Russell wrote: >> Indeed. If I may ask, why is it no longer used? It was like having >> a personal assistant in DrScheme who is no longer around. It now >> feels somehow ... lonely.... > > [Among other, more technical reasons, I think that many people > complained exactly about having to deal with a special browser. (For > example, there were always complaints about the help desk browser not > doing something that popular browsers do.)] > From plragde at uwaterloo.ca Fri May 9 10:20:52 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:18:11 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <48245A22.90402@gmail.com> Message-ID: <48245DC4.2080804@uwaterloo.ca> Yavuz Arkun wrote: > Indeed, I remember this being a particular bugbear of me until it was > fixed in 3.99 series. I was getting distracted by the discordant look > of the internal browser and rendered text compared to the rest of my > desktop. It's also discordant for me when I choose Help Desk in 3.99.0.23 and get switched to my browser, meaning I have to switch back. I'm sure I'll get used to it. Harder to deal with is the loss of search capability. There's no search box in the top level help document. The master index is huge and slow to load even though it's a local file and I have a fast laptop. A search yields just a bunch of index entries without context; I have to hover my cursor over each one and look at the "status bar" in my browser to try to guess what section of what manual it will take me to by deciphering the displayed URL. I think the overall scheme of the documentation is a great improvement from 3xx, but it's a work in progress, clearly. --PR From matthias at ccs.neu.edu Fri May 9 10:29:40 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:11 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <48245DC4.2080804@uwaterloo.ca> References: <48245DC4.2080804@uwaterloo.ca> Message-ID: <0BC1D4D7-F559-4400-AF3C-AA03DEED5F8F@ccs.neu.edu> We are working on the search capability. You're not the only one who's feeling bad about losing it. -- Matthias On May 9, 2008, at 10:20 AM, Prabhakar Ragde wrote: > Yavuz Arkun wrote: > >> Indeed, I remember this being a particular bugbear of me until it >> was fixed in 3.99 series. I was getting distracted by the >> discordant look of the internal browser and rendered text compared >> to the rest of my desktop. > > It's also discordant for me when I choose Help Desk in 3.99.0.23 > and get switched to my browser, meaning I have to switch back. I'm > sure I'll get used to it. Harder to deal with is the loss of search > capability. There's no search box in the top level help document. > The master index is huge and slow to load even though it's a local > file and I have a fast laptop. A search yields just a bunch of > index entries without context; I have to hover my cursor over each > one and look at the "status bar" in my browser to try to guess what > section of what manual it will take me to by deciphering the > displayed URL. I think the overall scheme of the documentation is a > great improvement from 3xx, but it's a work in progress, clearly. --PR > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From gknauth at sunlink.net Thu May 8 20:36:20 2008 From: gknauth at sunlink.net (Geoffrey S. Knauth) Date: Thu Mar 26 02:18:11 2009 Subject: [plt-scheme] DrScheme interface changes In-Reply-To: <756daca50805081303y288e9c5bx6a157d098fc4b0b4@mail.gmail.com> References: <595b9ab20805072350s4e4220e3te1758902202d2ca5@mail.gmail.com> <756daca50805081303y288e9c5bx6a157d098fc4b0b4@mail.gmail.com> Message-ID: On May 8, 2008, at 16:03, Grant Rettke wrote: > On Thu, May 8, 2008 at 1:50 AM, Stephen De Gabrielle wrote: >> Hi. I don't know who is doing it- but thankyou! >> I really like the recent DrScheme interface changes. > > What in particular did you like? I just updated from svn and rebuilt. I too like the new look & feel. Big clunky buttons are gone. Their replacements have a light feel to them. It almost looks like Javascript underneath, but I haven't looked under the hood. From eli at barzilay.org Fri May 9 11:21:36 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:12 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <48245DC4.2080804@uwaterloo.ca> References: <48245A22.90402@gmail.com> <48245DC4.2080804@uwaterloo.ca> Message-ID: <18468.27648.269785.769766@arabic.ccs.neu.edu> On May 9, Prabhakar Ragde wrote: > Yavuz Arkun wrote: > > > Indeed, I remember this being a particular bugbear of me until it > > was fixed in 3.99 series. I was getting distracted by the > > discordant look of the internal browser and rendered text compared > > to the rest of my desktop. > > It's also discordant for me when I choose Help Desk in 3.99.0.23 and > get switched to my browser, meaning I have to switch back. (That's probably some OSX thing, right? I think that in all other places, there would be no difference between a new MrEd window and a new browser window...) > I'm sure I'll get used to it. Harder to deal with is the loss of > search capability. There's no search box in the top level help > document. The master index is huge and slow to load even though it's > a local file and I have a fast laptop. I have a sketch that makes things much faster, and the plan is to work on getting that in shape now. I also noticed the problem with many entries looking exactly identical with no context (or the "provided from" popup) being visible without using the mouse, and I hope to get to that too. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at cs.uchicago.edu Fri May 9 11:41:12 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:12 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <48245DC4.2080804@uwaterloo.ca> References: <48245A22.90402@gmail.com> <48245DC4.2080804@uwaterloo.ca> Message-ID: <932b2f1f0805090841u6f9490ddr3e86e07c8ac23c5@mail.gmail.com> Just as a stopgap, there is also the plt-help executable and hitting f1 in drscheme will search for the phrase at the insertion point. Robby On Fri, May 9, 2008 at 9:20 AM, Prabhakar Ragde wrote: > Yavuz Arkun wrote: > >> Indeed, I remember this being a particular bugbear of me until it was >> fixed in 3.99 series. I was getting distracted by the discordant look of the >> internal browser and rendered text compared to the rest of my desktop. > > It's also discordant for me when I choose Help Desk in 3.99.0.23 and get > switched to my browser, meaning I have to switch back. I'm sure I'll get > used to it. Harder to deal with is the loss of search capability. There's no > search box in the top level help document. The master index is huge and slow > to load even though it's a local file and I have a fast laptop. A search > yields just a bunch of index entries without context; I have to hover my > cursor over each one and look at the "status bar" in my browser to try to > guess what section of what manual it will take me to by deciphering the > displayed URL. I think the overall scheme of the documentation is a great > improvement from 3xx, but it's a work in progress, clearly. --PR > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From robby at cs.uchicago.edu Fri May 9 11:41:57 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:12 2009 Subject: [plt-scheme] DrScheme interface changes In-Reply-To: References: <595b9ab20805072350s4e4220e3te1758902202d2ca5@mail.gmail.com> <756daca50805081303y288e9c5bx6a157d098fc4b0b4@mail.gmail.com> Message-ID: <932b2f1f0805090841p6a8edce7w6750645b8c7d8c3e@mail.gmail.com> No javascript! :) On Thu, May 8, 2008 at 7:36 PM, Geoffrey S. Knauth wrote: > On May 8, 2008, at 16:03, Grant Rettke wrote: >> >> On Thu, May 8, 2008 at 1:50 AM, Stephen De Gabrielle wrote: >>> >>> Hi. I don't know who is doing it- but thankyou! >>> I really like the recent DrScheme interface changes. >> >> What in particular did you like? > > I just updated from svn and rebuilt. I too like the new look & feel. Big > clunky buttons are gone. Their replacements have a light feel to them. It > almost looks like Javascript underneath, but I haven't looked under the > hood. > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From plragde at uwaterloo.ca Fri May 9 11:49:55 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:18:12 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <18468.27648.269785.769766@arabic.ccs.neu.edu> References: <48245A22.90402@gmail.com> <48245DC4.2080804@uwaterloo.ca> <18468.27648.269785.769766@arabic.ccs.neu.edu> Message-ID: <482472A3.5050008@uwaterloo.ca> Eli Barzilay wrote: > (That's probably some OSX thing, right? I think that in all other > places, there would be no difference between a new MrEd window and a > new browser window...) I don't know if it's OS X specific. When a browser window is active, the menu bar at the top is for the browser, not for DrScheme, and the keybindings are for the browser also. --PR From geoff at knauth.org Fri May 9 12:55:50 2008 From: geoff at knauth.org (Geoffrey S. Knauth) Date: Thu Mar 26 02:18:12 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <397321.36933.qm@web30205.mail.mud.yahoo.com> References: <397321.36933.qm@web30205.mail.mud.yahoo.com> Message-ID: <03E3EC76-E831-454F-95FF-1E5EDD1B6F22@knauth.org> On May 8, 2008, at 05:21, Benjamin L. Russell wrote: > It seems a shame that now DrScheme is reduced to using a generic > browser. Actually, I'm really impressed with the Ajaxian behavior of search in the new browser-based help. I like the navigation enough I tell myself I should study it and use the same techniques. From eli at barzilay.org Fri May 9 13:52:31 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:12 2009 Subject: [plt-scheme] Building 3-99.0.23 on Cygwin In-Reply-To: References: Message-ID: <18468.36703.304865.61986@arabic.ccs.neu.edu> On May 6, Eddie Sullivan wrote: > I just built the 3-99.0.23 release of DrScheme from source on Cygwin > running on Windows XP (without X-Windows). I was able to make it > work, but it took some doing, and I wonder if I've ended up with a > subtly broken system. I tested it on a few simple scripts and it > does seem to be working. FWIW, we have a minimal cygwin build as part of the usual builds (but the cygwin installation that it's using is not up-to-date). IIRC, last time I tried a cygwin build, things were mostly working fine -- and that was up to getting drscheme running on X. There was, however, one issue -- the mzscheme program would keep the cpu spinning at 100%. IIRC, Matthew said something about the terminal IO implementation in cygwin that makes this impossible to avoid. (As for the rest of your post, the lack of `doc' is s problem with the currently distributed files, which would be fixed soon. I didn't encounter any of the other issues, but that was before the v4 switch, and I didn't use shared libraries.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Fri May 9 13:53:46 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:13 2009 Subject: [plt-scheme] Status of SrPersist In-Reply-To: <3611BAA6-50DD-4D3D-B0CD-7EB32F0E6DA4@mac.com> References: <3611BAA6-50DD-4D3D-B0CD-7EB32F0E6DA4@mac.com> Message-ID: <18468.36778.858265.650751@arabic.ccs.neu.edu> [The code in the PLT tree is not maintained. If there's anyone that can revive it, please let me know.] On May 6, Jaime Vargas wrote: > Unfortunately I need ODBC support. -- Jaime > > On May 6, 2008, at 11:57 AM, Noel Welsh wrote: > > > There are a bunch of alternatives on PLaneT. PostgreSQL has the > > best support. > > > > N. > > > > On Tue, May 6, 2008 at 4:42 PM, Jaime Vargas wrote: > >> I try to use SrPersist, but I get the following error: > >> [...] > >> Is srpersist being developed. Are there any alternatives packages? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Fri May 9 16:32:58 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:13 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <433259.74060.qm@web30203.mail.mud.yahoo.com> References: <18466.51571.844651.826636@arabic.ccs.neu.edu> <433259.74060.qm@web30203.mail.mud.yahoo.com> Message-ID: <18468.46330.432088.409959@arabic.ccs.neu.edu> On May 8, Benjamin L. Russell wrote: > [...] I can't seem to find the corresponding Help Desk-accessible > version of "Teach Yourself Scheme in Fixnum Days" [...] Yes, that document is not ported yet. It will be done, eventually. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From filcab at gmail.com Fri May 9 17:27:23 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:13 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <48245DC4.2080804@uwaterloo.ca> References: <48245DC4.2080804@uwaterloo.ca> Message-ID: <6AEA376C-520E-4D63-846B-A5C62EF79989@gmail.com> Hi On 9 May, 2008, at 15:20, Prabhakar Ragde wrote: > Yavuz Arkun wrote: >> > A search yields just a bunch of index entries without context; I > have to hover my cursor over each one and look at the "status bar" > in my browser to try to guess what section of what manual it will > take me to by deciphering the displayed URL. It also has a bug in Windows XP + firefox 3 where the links appear as c:\... instead of file:///c:... so it says the protocol isn't supported. - Filipe Cabecinhas From derick.eddington at gmail.com Fri May 9 18:32:22 2008 From: derick.eddington at gmail.com (Derick Eddington) Date: Thu Mar 26 02:18:13 2009 Subject: [plt-scheme] match library for r6rs In-Reply-To: References: Message-ID: <1210372342.7062.25.camel@eep> On Fri, 2008-05-09 at 14:21 +0200, Ballnat, Stefan wrote: > I?m trying to find a match library for r6rs. Using the match library > from mzlib didn?t work. > > > > Following program worked for r5rs: > > > > (module match-testing mzscheme > > > > (require (lib "plt-match.ss" "mzlib")) > > > > (match '(1 2 1) > > ((list a b a) (display "foo"))) > > > > ) > > > > Trying to write it in r6rs leads to an error message: > > > > #!r6rs > > (library (match-test) > > > > (export) > > (import (rnrs) > > (mzlib plt-match) > > ) > > > > (match '(1 2 1) > > ((list a b a) (display "foo"))) > > ) > > > > match: no matching clause for {1 2 1} I think this could be failing because the PLT matchers from mzlib and scheme/match are trying to match the PLT-Scheme-Language's list type which is immutable, but the R6RS list type being used here is mutable, and when the mutable list is given to the matcher implemented in the PLT-Scheme-Language, the matcher fails to find a match because it doesn't recognize mutable lists as lists. But I'm not positive this is the issue. > In the Ikarus code I also found a match library that was ported to > r6rs. This matcher that comes with the Ikarus distribution only does (import (ikarus)) which means it is implemented in the (ikarus) language, which is a superset of R6RS, which means the match library depends on functionality beyond R6RS. However, the additional dependencies are minimal and I've already made a port of this matcher which is portable and would run on MzScheme if it weren't for another issue related to the one I mention in my last comment below, and I have two other different matchers which currently do work in MzScheme, one of which is a port of Alex Shinn's hygienic version of the Wright matcher which is most similar to PLT's matcher: [libraries (xitomatl AS-match) and (xitomatl smatch)] https://code.launchpad.net/~derick-eddington/ikarus-libraries/xitomatl > But using this library with DrScheme leads to following error message: > > match.ss:377:6: compile: bad syntax; function application is not > allowed, because no #%app syntax transformer is bound I think the reason for this error could be a bug in MzScheme's R6RS support. I think the macro experts here can tell us. I think the issue has to do with export levels of bindings. IIRC (rnrs) is supposed to be imported for phase `expand' by default. The problem can be reduced to this example, which only works in MzScheme if the (rnrs) library is explicitly imported for phase `expand': #!r6rs (import (for (rnrs) run #;expand)) (define-syntax A (let () (define-syntax B (syntax-rules () [(_ x) x])) (define (h) (B 1)) (lambda (ignored) (h)))) (write (A)) (newline) ERROR=> compile: bad syntax; function application is not allowed, because no #% app syntax transformer is bound in: (syntax-rules () ((_ x) x)) Uncomment the `expand' in the import form, and it works. -- : Derick ---------------------------------------------------------------- From d.j.gurnell at gmail.com Sat May 10 06:38:37 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:18:13 2009 Subject: [plt-scheme] Scribble for PLaneT packages Message-ID: <2F64C760-E57F-4662-A317-1DF7983FBA11@gmail.com> Hi all, I'm writing Scribble documentation for some PLaneT packages and I'm having trouble with my @defmodule forms. I'm putting all my documentation in the directory "$PACKAGE_ROOT/doc", and all my source code is in the directory "$PACKAGE_ROOT". For example: /my/home/directory/unlib/list.ss and /my/home/directory/unlib/doc/list.scrbl I started out trying to use defmodule forms like: @defmodule[(planet untyped/unlib/list) #:use-sources ((file "../ list.ss"))]{ etc ... } When I used "setup-plt -P" to build the documentation on my Mac, the build process failed because it was looking for "/my/home/directory/ list.ss". I figured this was because setup-plt resolved filenames relative to the root directory for the package, so I changed the forms to: @defmodule[(planet untyped/unlib/list) #:use-sources ((file "list.ss"))]{ etc ... } The docs build fine now for me, but my colleague gets an error on his Linux machine saying setup-plt can't find "/his/home/directory/list.ss". Am I doing this wrong or is there some sort of discrepancy? Cheers, -- Dave From mflatt at cs.utah.edu Sat May 10 06:36:13 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:14 2009 Subject: [plt-scheme] match library for r6rs In-Reply-To: <1210372342.7062.25.camel@eep> References: <1210372342.7062.25.camel@eep> Message-ID: <20080510103617.BBFAD65035D@mail-svr1.cs.utah.edu> At Fri, 09 May 2008 15:32:22 -0700, Derick Eddington wrote: > > But using this library with DrScheme leads to following error message: > > > > match.ss:377:6: compile: bad syntax; function application is not > > allowed, because no #%app syntax transformer is bound > > I think the reason for this error could be a bug in MzScheme's R6RS > support. I think the macro experts here can tell us. I think the issue > has to do with export levels of bindings. IIRC (rnrs) is supposed to be > imported for phase `expand' by default. The problem can be reduced to > this example, which only works in MzScheme if the (rnrs) library is > explicitly imported for phase `expand': > > #!r6rs > (import (for (rnrs) run #;expand)) > > (define-syntax A > (let () > (define-syntax B > (syntax-rules () [(_ x) x])) > (define (h) > (B 1)) > (lambda (ignored) > (h)))) > > (write (A)) (newline) > > ERROR=> > > compile: bad syntax; function application is not allowed, because no #% > app syntax transformer is bound in: (syntax-rules () ((_ x) x)) > > Uncomment the `expand' in the import form, and it works. The use of `syntax-rules' is in phase level 2 (i.e., expand time relative to expand time). The `(rnrs)' language exports `syntax-rules' at phase level 1 (= `expand'), but not 2. A `(run .... expand)' import of `(rnrs)' fixes the problem, because it shifts the phase level 1 export of `syntax-rules' to phase level 2. Matthew From mflatt at cs.utah.edu Sat May 10 06:44:04 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:14 2009 Subject: [plt-scheme] Scribble for PLaneT packages In-Reply-To: <2F64C760-E57F-4662-A317-1DF7983FBA11@gmail.com> References: <2F64C760-E57F-4662-A317-1DF7983FBA11@gmail.com> Message-ID: <20080510104408.D7B3E650373@mail-svr1.cs.utah.edu> At Sat, 10 May 2008 11:38:37 +0100, Dave Gurnell wrote: > I started out trying to use defmodule forms like: > > @defmodule[(planet untyped/unlib/list) #:use-sources ((file "../ > list.ss"))]{ etc ... } > > When I used "setup-plt -P" to build the documentation on my Mac, the > build process failed because it was looking for "/my/home/directory/ > list.ss". I figured this was because setup-plt resolved filenames > relative to the root directory for the package, so I changed the forms > to: > > @defmodule[(planet untyped/unlib/list) #:use-sources ((file > "list.ss"))]{ etc ... } > > The docs build fine now for me, but my colleague gets an error on his > Linux machine saying setup-plt can't find "/his/home/directory/list.ss". > > Am I doing this wrong or is there some sort of discrepancy? I'm not sure how relative module names in this position would get resolved, actually. They're intended to be absolute module paths. Do you really need `#:use-sources'? It's for unusual cases where you want to document X as exported from Y, but Y really just re-exports from Z, and if someone looks for information on X from Z, then you want them to find the docs for X from Y. Matthew From d.j.gurnell at gmail.com Sat May 10 07:08:06 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:18:14 2009 Subject: [plt-scheme] Scribble for PLaneT packages In-Reply-To: <20080510104408.D7B3E650373@mail-svr1.cs.utah.edu> References: <2F64C760-E57F-4662-A317-1DF7983FBA11@gmail.com> <20080510104408.D7B3E650373@mail-svr1.cs.utah.edu> Message-ID: > Do you really need `#:use-sources'? It's for unusual cases where you > want to document X as exported from Y, but Y really just re-exports > from Z, and if someone looks for information on X from Z, then you > want > them to find the docs for X from Y. I was avoiding using (planet ...) forms because I did this once with a require statement in some actual code and I managed to mess up the package I was writing. I guess you're saying it'll work if I do it in the docs. I'll give that a try. Many thanks, -- Dave From yarkun at gmail.com Sat May 10 11:16:47 2008 From: yarkun at gmail.com (Yavuz Arkun) Date: Thu Mar 26 02:18:14 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <6AEA376C-520E-4D63-846B-A5C62EF79989@gmail.com> References: <48245DC4.2080804@uwaterloo.ca> <6AEA376C-520E-4D63-846B-A5C62EF79989@gmail.com> Message-ID: <4825BC5F.7070601@gmail.com> That bug was fixed a few weeks back, unless it reappeared. Are you running a recent build? --Yavuz Filipe Cabecinhas wrote: > Hi > > On 9 May, 2008, at 15:20, Prabhakar Ragde wrote: > >> Yavuz Arkun wrote: >>> >> A search yields just a bunch of index entries without context; I have >> to hover my cursor over each one and look at the "status bar" in my >> browser to try to guess what section of what manual it will take me to >> by deciphering the displayed URL. > > It also has a bug in Windows XP + firefox 3 where the links appear as > c:\... instead of file:///c:... so it says the protocol isn't supported. > > - Filipe Cabecinhas > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From praimon at gmail.com Sat May 10 18:52:57 2008 From: praimon at gmail.com (praimon) Date: Thu Mar 26 02:18:14 2009 Subject: [plt-scheme] match question Message-ID: <4acd8930805101552p11e60ebftddd7d7b2d989d5cc@mail.gmail.com> hello, in 3.99.0.24, using scheme/match: (map (lambda (x) (match x ((list x ... y z ..1 y) (append x z)))) '((1 2 3 4 3) (1 2 3 4 3 4) (1 2 3 4 3 3))) => ((1 2 4) (1 2 3 3) (1 2 3 3)) I understand the first two matches, but shouldn't the last result be (1 2 4 3)? This produces my expected answer: (match '(1 2 3 4 3 3) ((list x ... y z ..2 y) (append x z))) => (1 2 4 3) but in this context, aren't ..1 and ..2 equivalent? thanks, praimon From filcab at gmail.com Sat May 10 19:00:45 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:15 2009 Subject: [plt-scheme] 399: how to get the internal helpdesk browser? In-Reply-To: <4825BC5F.7070601@gmail.com> References: <48245DC4.2080804@uwaterloo.ca> <6AEA376C-520E-4D63-846B-A5C62EF79989@gmail.com> <4825BC5F.7070601@gmail.com> Message-ID: Hi On 10 May, 2008, at 16:16, Yavuz Arkun wrote: > That bug was fixed a few weeks back, unless it reappeared. Are you > running a recent build? > --Yavuz Now I am. I remembered I lagged behind for a while, while MysterX wasn't updated with some patches. Today I tried it and it worked. Thanks for the help - Filipe Cabecinhas From dyrueta at gmail.com Sat May 10 19:50:16 2008 From: dyrueta at gmail.com (dave yrueta) Date: Thu Mar 26 02:18:15 2009 Subject: [plt-scheme] Help requested for HtDP Exercise 16.3.4 Challenge Part 2 Message-ID: All clues, comments and suggestions welcome! Link to problem: http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-21.html#node_sec_16.3 Data Definitions A path is either 1. empty, or 2. (cons s p) where s is a symbol and p is a path A list-of-files is either 1. empty, or 2. (cons f lof) where f is a file structure and lof is a list-of-files A list-of-directories is either 1. empty, or 2. (cons d lod) where d is a directory structure and lod is a list-of- directories A directory is a structure (make-dir n ds fs) where n is a symbol (representing the name of the directory), ds is a list-of-directories, and fs is a list-of-files. A file is a structure (make-file n s x) where n is a symbol (representing the name of the file) s is a number and x is some Scheme value. Link to illustration of a exercise directory tree: http://www.htdp.org/2003-09-26/Book/curriculum-Z-H-21.html#node_sec_16.1 A Scheme representation of the exercise directory tree: (define-struct file (name size content)) (define-struct dir(name dirs files)) (define docs(make-dir 'docs empty (list (make-file 'read! 19 empty)))) (define code(make-dir 'code empty (list (make-file ?hang 8 empty) (make-file 'draw 2 empty)))) (define text(make-dir 'text empty (list (make-file 'part1 99 empty) (make-file 'part2 52 empty)(make-file 'part3 17 empty)))) (define libs(make-dir 'libs (list code docs)empty)) (define ts(make-dir 'ts (list text libs)(list (make-file 'read! 10 empty)))) Exercise 16.3.4 has three parts: the basic exercise, and the first and second parts of the ?challenge.? I?m stuck on the second part of the challenge. Each solution seems to build on the last, so I?m including what I came up with for the basic exercise and part 1 of the challenge for context. 16.3.4 ? Solution to basic exercise: ;;find?: directory-structure symbol > boolean ;;accepts a directory and a file-name, returns true if file-name appears in directory or any sub-directories, false if it ;;does not ;;(find? ts 'hang) > true (define(find? d f) (or(search-files (dir-files d) f);; search all files in directory for file matching file-name (search-dirs (dir-dirs d) f)));; search all sub-directories for file matching file-name ;;search-files:list-of-file-structures symbol > boolean ;;accepts a list-of-files and a file-name, returns true if file-name matches any file names contained in the ;;list-of-files, false if it does not ;;(search-files (list(make-file 'hang 8 empty)) 'hang) > true (define(search-files lof f) (cond [(empty? lof)false];; if list-of-files is empty, return false [else(or(check-file-name (first lof) f);;else check first file name for match or (search-files (rest lof)f))]));;recur on rest of list ;;check-file-name:file-structure symbol > boolean ;;accepts a file and a file-name, returns true if name of file and file-name match, false if they do not. ;;(check-file-name (make-file 'hang 8 empty) 'hang) > true (define(check-file-name fl f) (cond [(symbol=? (file-name fl)f)true];;if name of file matches file- name, return true [else false]));;otherwise, return false ;;search-dirs:list-of-directory-structures symbol > boolean ;;accepts a list-of-directories and a file-name, returns true if file- name matches any files found in the ;;subdirectories, otherwise false ;;(search-dirs (list text libs) 'part1 > true (define(search-dirs lod f) (cond [(empty? lod)false];;if list-of-directory structures is empty, then return false [else(or(find? (first lod) f);;else submit first directory to 'find?' and search rest of directories in list (search-dirs (rest lod) f))])) 16.3.4 ? Solution to part 1 of ?challenge?: ;;find: directory file-name > boolean or path ;;accepts a directory structure and file name; if file not found in directories or subdirectories, returns 'false'; if file ;;is found, returns path from input directory to nearest directory ;;(find ts 'read!) > (list 'ts) (define(find d f) (cond [(boolean=? (find? d f)true);; if file found in either directory or subdirectories, then (cond [(boolean=?(search-files(dir-files d)f)true);; if file found in directory, list path from directory (list(dir-name d))] [else(cons(dir-name d)(make-path (dir-dirs d)f))])];;else start list from directory and search subdirectories [else false]));; else file not found, so return false ;;make-path: list-of-directories file-name > boolean or path ;;accepts a list-of-directory structures and file-name: returns false if file not found; a path from immediate ;;directory to nearest directory if file is found ;;(make-path (list ts) 'read!) > (list 'ts) (define(make-path lod f) (cond [(empty? lod)false];; if list-of-directories is empty, return false [(boolean=?(find?(first lod)f)true);;if file-name not found in first directory in list, search rest of directories (find(first lod)f)] [else (make-path (rest lod)f)]));; else, find the path from the first directory in list So far, so good? 16.3.4 ? Proposed solution to part 2 of ?challenge?: I can only conceive of two ways to solve this problem. The first is a kind of ?bottom-up? approach, and adopts the mechanics employed by the solution to HtDP 12.4.2, that is: recursively attaching the current directory name to each path within a list of found paths. Preventing this function from crashing, at least the way I?ve designed it, relies on omitting ?path? as a possible outcome. The current function returns only a boolean or a list-of-paths. It seems to me that the function?s defects and my inability to conceive of a design which delivers the desired output without resorting to some ?post- processing? are probably related?.. The second solution imagines a ?top-down? approach by introducing ?path? as a third argument to ?find?. ?Path? is a list which grows with each recursive call, and would serve as an index of the current state of ?find.? When ?find? hits a list-of-directories, it would append the name of each directory containing a matching file-name to the end of ?path:? (append(path (list (dir-name d)))) My sense is that while this approach can be easily visualized and might work, it probably violates the constraints of structural recursion, and therefore constitutes a ?workaround? to a more formally correct solution. So I haven?t tried it. Final note: for my examples, I?ve changed the definition of directory ?code to --- (define code(make-dir 'code empty (list (make-file ?read! 8 empty) (make-file 'draw 2 empty)))) -- to include a third path to ?read! It makes the tests more rigorous. Anyway, here?s what I have so far: ;;find-all-paths: a-directory symbol > boolean or a list-of-paths ;; accepts a directory structure: returns false if file-name not found in directory files or sub-directories, or a ;;list-of-paths if file is found among the directory or sub-directory files. ;;(find-all-paths ts 'read) > (list (list ts)(list ts libs docs)(list ts libs code)))) (define(find-all-paths d f) (cond [(boolean=?(and(search-dirs(dir-dirs d)f)(search-files(dir-files d)f))true);;if matches are found in the current ;;directory files and subdirectories, then (append(list(list(dir-name d)))(add-header-to-path(dir-name d) (list-paths(dir-dirs d)f)))];; return a list-of-paths by ;;appending the list-of-the-path from the current directory to the list-of-paths found by attaching the current ;;directory name to subsequent paths found in the subdirectories. [(boolean=?(search-files (dir-files d)f)true);; otherwise, if a match is found only in the current directory files, then return a list- of-paths from the current directory (list(list (dir-name d)))] [(boolean=? (search-dirs(dir-dirs d)f)true);; otherwise, if a match is found only somewhere in the subdirectories, ;;proceed as in first condition without appending path from current directory (add-header-to-path(dir-name d)(list-paths (dir-dirs d)f))] [else false]));; else there is no match, so return false. ;;list-paths: list-of-directories symbol > list-of-paths ;; accepts a list-of-directory structures and a file-name: returns an empty list of paths if no matches are found, or a ;;list-of-paths containing paths to directories with ;;matching file names ;;(list-paths (list ts) 'read) > (list (list ts)(list ts libs docs) (list ts libs code)))) (define(list-paths lod f) (cond [(empty? lod)(list empty)];;return empty list of paths for an empty list-of-directories [(boolean=? (find? (first lod) f)false)(list-paths (rest lod)f)];;recur on rest of list no match is found with the first ;;directory in list-of-directories [else(append(find-all-paths(first lod)f)(list-paths (rest lod)f))]));; else, append the list of paths returned by the first directory to all other list-of-paths found ;;by recurring on the rest of the list-of-directories. ;;add-header-to-path : symbol list-of-paths ;;accepts a directory-name and a list-of-paths: returns a new list-of- paths with the directory-name attached to the ;;front of each path ;;(add-header-to-path 'ts (list(list 'libs 'docs)(list 'libs 'code))) > (list(list 'ts 'libs 'docs)(list 'ts 'libs 'code))) (define(add-header-to-path n lop) (cond [(empty? (rest lop))(list(cons n (first lop)))];; if the rest of the list-of-paths is empty, then only one path in the list: ;;attach the directory name to that path [else (cons(cons n(first lop))(add-header-to-path n (rest lop)))]));;otherwise, cons the new path name (cons n ;;(first lop) onto the list-of-paths generated by recurring on the rest of the list- of-paths Evaluation: (find-all-paths ts ?read!) Desired output > (list (list 'ts) (list 'ts 'libs 'code) (list 'ts 'libs 'docs) Actual output > (list (list 'ts) (list 'ts 'libs 'code) (list 'ts 'libs 'docs) (list 'ts 'libs) (list 'ts)) Even worse: (find-all-paths ts ?draw) Desired output: (list ?ts ?libs ?code) Actual output: (list (list 'ts 'libs 'code) (list 'ts 'libs) (list 'ts)) I?ve noted that in each case the extra paths included in the actual output list only the mediating directories, and not those with directories containing files with a match. Can this be fixed, or is the design fatally flawed? I?ve found it difficult to isolate the problem within a single function since they are all interrelated. Again, all help is greatly appreciated! Dave Yrueta From matthias at ccs.neu.edu Sat May 10 20:47:12 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:15 2009 Subject: [plt-scheme] Help requested for HtDP Exercise 16.3.4 Challenge Part 2 In-Reply-To: References: Message-ID: <4C784CF9-7D51-4357-86EE-86DACB2F96F1@ccs.neu.edu> On May 10, 2008, at 7:50 PM, dave yrueta wrote: > > I?ve found it difficult to isolate the problem within a single > function since they are all interrelated. Sorry no time to look thru details BUT when you have mut rec specs of data, you get mut rec functions to process them. And yes, in that case it's nearly impossible to write independent tests (and find problems). ;; --- BTW, I didn't see any check-expects and test-examples but this could be due to your formatting. You might be better off posting a url to a solution. My Mail client scrambles your posting. -- Matthias From dyrueta at gmail.com Sun May 11 00:59:37 2008 From: dyrueta at gmail.com (dave yrueta) Date: Thu Mar 26 02:18:15 2009 Subject: [plt-scheme] Re: Help requested for HtDP Exercise 16.3.4 Challenge Part 2 In-Reply-To: <4C784CF9-7D51-4357-86EE-86DACB2F96F1@ccs.neu.edu> References: <4C784CF9-7D51-4357-86EE-86DACB2F96F1@ccs.neu.edu> Message-ID: Hi Matthias -- >BTW, I didn't see any check-expects and test-examples but this could > be due to your formatting. Did not run check-expects (forgot that existed) but do have test examples with desired outcomes under each function purpose statement. Also contrasted expected outcomes with actual outcomes at the end of the post. >You might be better off posting a url to a > solution. Here it is -- http://docs.google.com/Doc?id=dhdqh3jf_10g9gt37ds I apologize for the length of the post. I have a hard time keeping it brief while justifying each move with respect to the design recipe. On May 10, 5:47 pm, Matthias Felleisen wrote: > On May 10, 2008, at 7:50 PM, dave yrueta wrote: > > > > > I?ve found it difficult to isolate the problem within a single > > function since they are all interrelated. > > Sorry no time to look thru details BUT when you have mut rec specs of > data, you get mut rec functions to process them. And yes, in that > case it's nearly impossible to write independent tests (and find > problems). > > ;; --- > > BTW, I didn't see any check-expects and test-examples but this could > be due to your formatting. You might be better off posting a url to a > solution. My Mail client scrambles your posting. > > -- Matthias > > _________________________________________________ > For list-related administrative tasks: > h>ttp://list.cs.brown.edu/mailman/listinfo/plt-scheme From jos.koot at telefonica.net Sun May 11 04:37:42 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:16 2009 Subject: [plt-scheme] PLT download prerelease Message-ID: <000801c8b342$4793ef70$2101a8c0@uw2b2dff239c4d> http://pre.plt-scheme.org/installers/ (may 11 2008, full, windows) does not respond to download button (neither with internet explorer nor with firefox) My problem or PLT's? Jos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080511/d256f48f/attachment.html From d.j.gurnell at gmail.com Sun May 11 05:12:05 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:18:16 2009 Subject: [plt-scheme] ANN: Mirrors.plt Message-ID: <7D43A1DE-AF39-4C35-BBC5-72E5E284D184@gmail.com> Hi all, I just released a package onto PLaneT: "Mirrors" is a package for programatically assembling and rendering blocks XML and Javascript in Web applications. Future support for CSS is also planned. An abbreviated feature list and an example web application follow: I've built a couple of libraries and applications on top of Mirrors now and I find it to be a quite convenient way of producing XML and Javascript output. Having said that, I have no doubt there are a few bugs and wrinkles that need ironing out. Please let me know if you have any suggestions for improvement. Cheers, -- Dave ==== FEATURES ==== Assemble blocks of XML and Javascript using a convenient macro syntax rather than more traditional lists, quasiquotes and unquotes: (xml (p "Paragraph 1") ,(if condition (xml (p "Paragraph 2") (p "Paragraph 3")) (xml)) (p "Paragraph 4")) Use "raw" blocks in XML output to send text to the browser in a pure, unquoted form, or use "cdata" forms to explicitly insert CDATA tags in XML output: (xml (div (!raw ,block-of-text))) (xml (div (!cdata ,block-of-text))) XML syntax correctly deals with many browser idiosyncrasies such as incorrect parsing of singleton elements: (xml (br)) ==>
(xml (td)) ==> (xml (script)) ==> XML output is pre-rendered as properly quoted strings at macro expansion time, saving time when serving your pages: (define name "Dave") (xml (div (@ [id "hello"]) "Hello " ,name )) --> #(struct:block (#(struct:raw ("
Hello ")) #(struct:atom "Dave") #(struct:raw ("
")))) Quote and quasiquote style splicing for XML and Javascript statements: (js (for ((var [x 0]) (< x 10) (= x (+ x 1))) ,@(list (js (alert (+ "X = " x))) (js (= (!index someArray x) (* x x))) (js (alert (+ "Array value = " (!index someArray x))))))) Javascript can be rendered in compact or indented formats (using the Dave Herman's pretty printing functionality in javascript.plt): (display (javascript->pretty-string (js (function sayHello () (alert "Hello, world!"))))) --> function sayHello() { alert("Hello, world!"); } Javascript is correctly rendered in single- or multi-line format when it is embedded inside XML. And much much more... ==== EXAMPLE ==== #lang scheme (require (planet untyped/mirrors/mirrors) (planet untyped/instaservlet/instaservlet)) (go! (lambda (request) (make-html-response (xml ,xhtml-1.0-transitional-doctype (html (@ [xmlns "http://www.w3.org/1999/xhtml"] [lang "en"]) (title "Hello world") (meta (@ [htp-equiv "Content-Type"] [content "text/ html; charset=utf-8"])) (script (@ [type "text/javascript"]) (!raw "\n// \n"))) (body (h1 "Hello world") (p (label (@ [for "name-field"]) "Enter your name: ") (input (@ [id "name-field"] [type "text"] [size 20] [onchange ,(js (sayHello (!dot this value)))])))))))) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080511/ba0bbdb8/attachment.htm From marek at xivilization.net Sun May 11 06:33:41 2008 From: marek at xivilization.net (Marek Kubica) Date: Thu Mar 26 02:18:17 2009 Subject: [plt-scheme] PLT download prerelease In-Reply-To: <000801c8b342$4793ef70$2101a8c0@uw2b2dff239c4d> References: <000801c8b342$4793ef70$2101a8c0@uw2b2dff239c4d> Message-ID: <20080511123341.49939de6@halmanfloyd.lan.local> On Sun, 11 May 2008 10:37:42 +0200 "Jos Koot" wrote: > http://pre.plt-scheme.org/installers/ (may 11 2008, full, windows) > does not respond to download button (neither with internet explorer > nor with firefox) My problem or PLT's? Jos It does not work here either. Downloading through the "No Javascript" page works, though. regards, Marek From diggerrrrr at gmail.com Sun May 11 07:01:53 2008 From: diggerrrrr at gmail.com (Veer) Date: Thu Mar 26 02:18:17 2009 Subject: [plt-scheme] Re: Help requested for HtDP Exercise 16.3.4 Challenge Part 2 In-Reply-To: References: <4C784CF9-7D51-4357-86EE-86DACB2F96F1@ccs.neu.edu> Message-ID: Here are 2 important points i use when problem is complex. 1. Remember what a function produces , without going into the details how it produces 2. How to combine what we have with what function produces Here are the some clues , i hope i don't confuse you more . ;;find? : dir symbol -> list-of-paths or false (define (find? a-dir a-sym) ..) ;;1. If file is found in a current directory(find-in-files?) what to do we ;; have and what to do with other dirs in this current dir ;; a. (dir-name a-dir) ;; b. (find-in-dirs? (dir-dirs a-dir) a-sym) produces what? (false or list-of-paths) ;;Hint: How will you combine the two and ;; if b is a list-of-paths then we need to ;; insert or prefix "what" to each element in list-of-paths ;;2. If file is not found in current dir then ;; a. Do we search for dirs in current dir if so which function to use ;; b. What that function return and what is needed to be inserted into ;; it ;;find-in-dirs? : list-of-dirs symbol -> list-of-paths or false (define (find-in-dirs? alods a-sym) ..) ;;1. alods is empty ... ;;2. (find? (first alods) a-sym) produces what ? ;; a. if 2 is false what to do ;; b. else we have (find? (first alods) a-sym) ;; Now for b. we have list-of-paths and we also have ;; a list-of-paths from (find-in-dirs? (rest alods) a-sym) ;; Only thing is needed to combine them ;; remember find-in-dirs? returns what? ;;find-in-files?: list-of-files a-sym -> boolean (define (find-in-files? alofs a-sym) ..) ;;insert-or-prefix-funcion : Veer On Sun, May 11, 2008 at 10:29 AM, dave yrueta wrote: > Hi Matthias -- > > > >BTW, I didn't see any check-expects and test-examples but this could > > be due to your formatting. > > Did not run check-expects (forgot that existed) but do have test > examples with desired outcomes under each function purpose statement. > Also contrasted expected outcomes with actual outcomes at the end of > the post. > > > >You might be better off posting a url to a > > solution. > > Here it is -- > > http://docs.google.com/Doc?id=dhdqh3jf_10g9gt37ds > > I apologize for the length of the post. I have a hard time keeping it > brief while justifying each move with respect to the design recipe. > > > > > > > > On May 10, 5:47 pm, Matthias Felleisen wrote: > > On May 10, 2008, at 7:50 PM, dave yrueta wrote: > > > > > > > > > I've found it difficult to isolate the problem within a single > > > function since they are all interrelated. > > > > Sorry no time to look thru details BUT when you have mut rec specs of > > data, you get mut rec functions to process them. And yes, in that > > case it's nearly impossible to write independent tests (and find > > problems). > > > > ;; --- > > > > BTW, I didn't see any check-expects and test-examples but this could > > be due to your formatting. You might be better off posting a url to a > > solution. My Mail client scrambles your posting. > > > > -- Matthias > > > > _________________________________________________ > > For list-related administrative tasks: > > h>ttp://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From jos.koot at telefonica.net Sun May 11 07:02:32 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:17 2009 Subject: [plt-scheme] PLT download prerelease References: <000801c8b342$4793ef70$2101a8c0@uw2b2dff239c4d> <20080511123341.49939de6@halmanfloyd.lan.local> Message-ID: <001001c8b356$838e9ca0$2101a8c0@uw2b2dff239c4d> Got it downloading now. Thanks. Jos ----- Original Message ----- From: "Marek Kubica" To: "Jos Koot" Cc: Sent: Sunday, May 11, 2008 12:33 PM Subject: Re: [plt-scheme] PLT download prerelease > On Sun, 11 May 2008 10:37:42 +0200 > "Jos Koot" wrote: > >> http://pre.plt-scheme.org/installers/ (may 11 2008, full, windows) >> does not respond to download button (neither with internet explorer >> nor with firefox) My problem or PLT's? Jos > It does not work here either. Downloading through the "No Javascript" > page works, though. > > regards, > Marek From lispercat at gmail.com Sun May 11 10:19:15 2008 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu Mar 26 02:18:18 2009 Subject: [plt-scheme] HTTP library for PLT Scheme? Message-ID: I just started with the PLT Scheme and I am wondering if there is a library which impements the functionality of an HTTP client (http GET, POST requests, cookies etc)? Thank you, Andrei -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080511/ac99f8df/attachment.html From eli at barzilay.org Sun May 11 10:54:41 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:18 2009 Subject: [plt-scheme] PLT download prerelease In-Reply-To: <20080511123341.49939de6@halmanfloyd.lan.local> References: <000801c8b342$4793ef70$2101a8c0@uw2b2dff239c4d> <20080511123341.49939de6@halmanfloyd.lan.local> Message-ID: <18471.2225.738000.599141@arabic.ccs.neu.edu> On May 11, Marek Kubica wrote: > On Sun, 11 May 2008 10:37:42 +0200 > "Jos Koot" wrote: > > > http://pre.plt-scheme.org/installers/ (may 11 2008, full, windows) > > does not respond to download button (neither with internet explorer > > nor with firefox) My problem or PLT's? Jos > It does not work here either. Downloading through the "No Javascript" > page works, though. There was a problem with the build script -- I fixed it, so things will be back to normal after the next build finishes. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jos.koot at telefonica.net Sun May 11 11:13:00 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:18 2009 Subject: [plt-scheme] PLT download prerelease References: <000801c8b342$4793ef70$2101a8c0@uw2b2dff239c4d><20080511123341.49939de6@halmanfloyd.lan.local> <18471.2225.738000.599141@arabic.ccs.neu.edu> Message-ID: <000401c8b379$80fd5580$2101a8c0@uw2b2dff239c4d> Thanks, Jos ----- Original Message ----- From: "Eli Barzilay" snipped > There was a problem with the build script -- I fixed it, so things > will be back to normal after the next build finishes. > Eli Barzilay: From derick.eddington at gmail.com Sun May 11 13:10:12 2008 From: derick.eddington at gmail.com (Derick Eddington) Date: Thu Mar 26 02:18:18 2009 Subject: [plt-scheme] match library for r6rs In-Reply-To: <1210372342.7062.25.camel@eep> References: <1210372342.7062.25.camel@eep> Message-ID: On Fri, May 9, 2008 at 3:32 PM, Derick Eddington wrote: > However, the additional dependencies are > minimal and I've already made a port of this matcher which is portable > and would run on MzScheme if it weren't for another issue related to the > one I mention in my last comment below JTMI, I've made this matcher work in MzScheme now. That other issue I mentioned above was the same as: #!r6rs (import (rnrs)) (define-syntax B (lambda (stx) 1)) (define-syntax A (lambda (stx) (syntax-case stx () [(_) (B)]))) (write (A)) (newline) ERROR=> expand: unbound variable in module (transformer environment) in: B That works in Ikarus but MzScheme requires `B' to be moved to another library imported at phase `expand'. -- : Derick ---------------------------------------------------------------- From derick.eddington at gmail.com Sun May 11 13:11:32 2008 From: derick.eddington at gmail.com (Derick Eddington) Date: Thu Mar 26 02:18:18 2009 Subject: [plt-scheme] match library for r6rs In-Reply-To: <20080510103617.BBFAD65035D@mail-svr1.cs.utah.edu> References: <1210372342.7062.25.camel@eep> <20080510103617.BBFAD65035D@mail-svr1.cs.utah.edu> Message-ID: On Sat, May 10, 2008 at 3:36 AM, Matthew Flatt wrote: > The use of `syntax-rules' is in phase level 2 (i.e., expand time > relative to expand time). The `(rnrs)' language exports `syntax-rules' > at phase level 1 (= `expand'), but not 2. > > A `(run .... expand)' import of `(rnrs)' fixes the problem, because it > shifts the phase level 1 export of `syntax-rules' to phase level 2. Ah, I see. Thanks. -- : Derick ---------------------------------------------------------------- From filcab at gmail.com Sun May 11 16:26:35 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:18 2009 Subject: [plt-scheme] Modules/Libraries in MZScheme and R6RS Message-ID: <6B889B7A-2C8C-4D25-BFD8-AE064EB1E81C@gmail.com> Hi I have a few questions regarding modules in MzScheme and R6RS: - How can I import SRFIs into an R6RS program/library? (import (srfi 1)) doesn't work. - Can I do something like (export (all-from-out )) in MzScheme's R6RS language? I couldn't find anything like that in the standard so, maybe I have to name every single symbol to export. - Speaking of export. Now we have forms like (provide (all-from- out ...)), I know previously we had all-from and all-from-out in require (I don't remember which one was the oldest, but I had some files with those and now they broke), but now we have all-from in # %require and all-from-out in require (by the documentation, it seems all-from can't receive another spec, only a path). Will it be like that from now on (require (*-in ...)) and (provide (*-out ...)), or will we be able to do without the '-in/-out suffixes eventually? I don't think they make it harder to understand because they just get in the way. If it's a require, it's -in, if it's a provide, it's -out, no need in having that in every form (unless there's something I'm missing, of course). - How can I refer to an MzScheme module/R6RS library like (require "base.scm") in R6RS? If I have to have it in the collects dir, is there any way I can add a directory to the collects' search path through DrScheme? I suppose I can add a dir to the collects' search path (if it's possible) and then do an (import (base)), am I correct? I think that's it, for today. ;-) Thanks for the help, - Filipe Cabecinhas P.S: In section 2.2 of the Guide ( http://docs.plt-scheme.org/reference/require.html#(form ~20(~23~25kernel~20~23~25require)) ), you have a typo: (only rw-module-path id ...) instead of (only raw-module-path id ...) From samth at ccs.neu.edu Sun May 11 22:37:43 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:18:19 2009 Subject: [plt-scheme] match question In-Reply-To: <4acd8930805101552p11e60ebftddd7d7b2d989d5cc@mail.gmail.com> References: <4acd8930805101552p11e60ebftddd7d7b2d989d5cc@mail.gmail.com> Message-ID: <63bb19ae0805111937j59c0343fxf50f0af1fdf81654@mail.gmail.com> The general answer is the all ... patterns are greedy, but in order, from left to right. So we match as many elements to `x' as possible, then one to `y', then as many to `z' as possible, then another to the second `y'. In the particular case, we match as many elements to `x' as possible, while allowing the whole pattern to match. That's the first 3 elements, and the fifth element gets matched to `z'. In your second example, we have to match at least two elements to `z', so we only match 2 to `x'. Does that help explain things? sam th On Sat, May 10, 2008 at 6:52 PM, praimon wrote: > hello, > in 3.99.0.24, using scheme/match: > > (map (lambda (x) > (match x ((list x ... y z ..1 y) (append x z)))) > '((1 2 3 4 3) > (1 2 3 4 3 4) > (1 2 3 4 3 3))) > > => ((1 2 4) (1 2 3 3) (1 2 3 3)) > > I understand the first two matches, but > shouldn't the last result be (1 2 4 3)? > > This produces my expected answer: > > (match '(1 2 3 4 3 3) > ((list x ... y z ..2 y) (append x z))) > > => (1 2 4 3) > > but in this context, aren't ..1 and ..2 equivalent? > > thanks, > praimon > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- sam th samth@ccs.neu.edu From dave at pawfal.org Mon May 12 07:46:22 2008 From: dave at pawfal.org (Dave Griffiths) Date: Thu Mar 26 02:18:19 2009 Subject: [plt-scheme] 3.99 - extension require changed? Message-ID: <1210592782.7302.9.camel@daves-laptop> Hi all, I'm upgrading fluxus to 3.99, and I'm having difficulty resolving binary extension paths with require - has the way these work changed? (the trick with 'foo.ss' mapping to 'foo.so') The docs look the same to me: http://docs.plt-scheme.org/inside/overview.html#(part~20embedding My extension is here: ../plt/collects/fluxus-015/compiled/native/i386-linux/3m/fluxus-engine.so and in a script inside ../plt/collects/fluxus-015/ both: #lang scheme/base (require fluxus-015/fluxus-engine) and (module fluxus mzscheme (require "fluxus-engine.ss") result in: default-load-handler: cannot open input file: "/usr/local/lib/plt/collects/fluxus-015/fluxus-engine.ss" (No such file or directory; errno=2) as a side issue, I also noticed that putting . in a path results in an invalid module path - is this intended? cheers, dave From mflatt at cs.utah.edu Mon May 12 08:00:10 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:19 2009 Subject: [plt-scheme] 3.99 - extension require changed? In-Reply-To: <1210592782.7302.9.camel@daves-laptop> References: <1210592782.7302.9.camel@daves-laptop> Message-ID: <20080512120012.2789665034A@mail-svr1.cs.utah.edu> At Mon, 12 May 2008 12:46:22 +0100, Dave Griffiths wrote: > I'm upgrading fluxus to 3.99, and I'm having difficulty resolving binary > extension paths with require - has the way these work changed? (the > trick with 'foo.ss' mapping to 'foo.so') The docs look the same to me: > http://docs.plt-scheme.org/inside/overview.html#(part~20embedding I'll fix the docs. The change was that instead of replacing ".ss" with ".so", the loader rewrites ".ss" to "_ss.so" (i.e., it preserves the original suffix in the file name). > as a side issue, I also noticed that putting . in a path results in an > invalid module path - is this intended? Yes. Matthew From mflatt at cs.utah.edu Mon May 12 08:04:11 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:19 2009 Subject: [plt-scheme] Modules/Libraries in MZScheme and R6RS In-Reply-To: <6B889B7A-2C8C-4D25-BFD8-AE064EB1E81C@gmail.com> References: <6B889B7A-2C8C-4D25-BFD8-AE064EB1E81C@gmail.com> Message-ID: <20080512120412.D1368650332@mail-svr1.cs.utah.edu> At Sun, 11 May 2008 21:26:35 +0100, Filipe Cabecinhas wrote: > - How can I import SRFIs into an R6RS program/library? (import (srfi > 1)) doesn't work. I have no good answer so far. It works to write (import (srfi \x31;)) but that's crazy. See also SRFI 97 and the discussion of whether `(srfi 1)' should be allowed. > - Can I do something like (export (all-from-out )) in > MzScheme's R6RS language? I couldn't find anything like that in the > standard so, maybe I have to name every single symbol to export. R6RS offers nothing like `all-from-out'. You really have to name each one. > - Speaking of export. Now we have forms like (provide (all-from- > out ...)), I know previously we had all-from and all-from-out in > require (I don't remember which one was the oldest, but I had some > files with those and now they broke), but now we have all-from in # > %require and all-from-out in require (by the documentation, it seems > all-from can't receive another spec, only a path). Will it be like > that from now on (require (*-in ...)) and (provide (*-out ...)), or > will we be able to do without the '-in/-out suffixes eventually? I > don't think they make it harder to understand because they just get in > the way. If it's a require, it's -in, if it's a provide, it's -out, no > need in having that in every form (unless there's something I'm > missing, of course). In the old `require' form (which is now `#%require'), modifiers like `all-from' were recognized symbolically. With the new `require', `all-from-out' is a syntactic binding to a `require' transformer. This change makes the `require' and `provide' forms macro-expandable. A trade-off is that we have to manage the names more carefully, otherwise we create lots of collisions in the namespace. The `-in' and `-out' suffixes help avoid collisions. See also http://list.cs.brown.edu/pipermail/plt-scheme/2007-September/020508.html and the follow-up. > - How can I refer to an MzScheme module/R6RS library like (require > "base.scm") in R6RS? If I have to have it in the collects dir, is > there any way I can add a directory to the collects' search path > through DrScheme? I suppose I can add a dir to the collects' search > path (if it's possible) and then do an (import (base)), am I correct? Yes, something like that. The "Choose Language" dialog in DrScheme lets you add paths to search for collections. But you won't be able to reach "base.scm", exactly. The library reference `(base)' would mean the "main.ss" (or "main.sls", etc.) file in the "base" collection, for example. But that's the basic idea. > P.S: In section 2.2 of the Guide ( http://docs.plt- > scheme.org/reference/require.html#(form > ~20(~23~25kernel~20~23~25require)) ), you have a typo: Thanks! Matthew From dekudekuplex at yahoo.com Mon May 12 08:24:44 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:19 2009 Subject: [plt-scheme] DrScheme interface changes In-Reply-To: <932b2f1f0805090841p6a8edce7w6750645b8c7d8c3e@mail.gmail.com> Message-ID: <372655.45897.qm@web30207.mail.mud.yahoo.com> Yes, the new buttons in the upper-right corner in DrScheme, version 3.99.0.25-svn11may2008, english, do look more professional. Just curious, though: What happened to the "Slideshow" Experimental Language? It is no longer listed. Benjamin L. Russell --- On Sat, 5/10/08, Robby Findler wrote: > No javascript! :) > > On Thu, May 8, 2008 at 7:36 PM, Geoffrey S. Knauth > wrote: > > On May 8, 2008, at 16:03, Grant Rettke wrote: > >> > >> On Thu, May 8, 2008 at 1:50 AM, Stephen De > Gabrielle wrote: > >>> > >>> Hi. I don't know who is doing it- but > thankyou! > >>> I really like the recent DrScheme interface > changes. > >> > >> What in particular did you like? > > > > I just updated from svn and rebuilt. I too like the > new look & feel. Big > > clunky buttons are gone. Their replacements have a > light feel to them. It > > almost looks like Javascript underneath, but I > haven't looked under the > > hood. > > > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From dave at pawfal.org Mon May 12 08:25:31 2008 From: dave at pawfal.org (Dave Griffiths) Date: Thu Mar 26 02:18:19 2009 Subject: [plt-scheme] 3.99 - extension require changed? In-Reply-To: <20080512120012.2789665034A@mail-svr1.cs.utah.edu> References: <1210592782.7302.9.camel@daves-laptop> <20080512120012.2789665034A@mail-svr1.cs.utah.edu> Message-ID: <1210595131.7302.11.camel@daves-laptop> On Mon, 2008-05-12 at 06:00 -0600, Matthew Flatt wrote: > At Mon, 12 May 2008 12:46:22 +0100, Dave Griffiths wrote: > > I'm upgrading fluxus to 3.99, and I'm having difficulty resolving binary > > extension paths with require - has the way these work changed? (the > > trick with 'foo.ss' mapping to 'foo.so') The docs look the same to me: > > http://docs.plt-scheme.org/inside/overview.html#(part~20embedding > > I'll fix the docs. The change was that instead of replacing ".ss" with > ".so", the loader rewrites ".ss" to "_ss.so" (i.e., it preserves the > original suffix in the file name). > > > > as a side issue, I also noticed that putting . in a path results in an > > invalid module path - is this intended? > > Yes. Thanks for the quick answer, all working now... cheers, dave From dave at pawfal.org Mon May 12 08:31:57 2008 From: dave at pawfal.org (Dave Griffiths) Date: Thu Mar 26 02:18:20 2009 Subject: [plt-scheme] FrTime dependant on MrEd? In-Reply-To: <1205187495.5533.29.camel@daves-laptop> References: <1205184218.5533.19.camel@daves-laptop> <65e1d50c0803101428m32d1d843rfd31ebd849b86ba6@mail.gmail.com> <1205185987.5533.23.camel@daves-laptop> <65e1d50c0803101503n25a9c45ao773510e06cf17c77@mail.gmail.com> <1205187495.5533.29.camel@daves-laptop> Message-ID: <1210595517.7302.16.camel@daves-laptop> Hi Greg, Upgrading to 3.99, I noticed that this hasn't made it into the nightly builds yet - just reminding :) cheers, dave On Mon, 2008-03-10 at 22:18 +0000, Dave Griffiths wrote: > I changed list.ss, etc.ss and math.ss, it works, and everything seems to > be ok :) > > On Mon, 2008-03-10 at 18:03 -0400, Gregory Cooper wrote: > > Sounds like a bug (list.ss should probably just use > > frtime-lang-only.ss). I'll fix this in svn as soon as I get a chance; > > for now go ahead and edit whatever files you need to. > > > > Greg > > > > On 3/10/08, Dave Griffiths wrote: > > > Hi Greg, > > > > > > Nope - I still get problems because things like list.ss use frtime.ss. > > > Is there a way around that? > > > > > > > > > On Mon, 2008-03-10 at 17:28 -0400, Gregory Cooper wrote: > > > > Hi Dave, > > > > > > > > Can you use frtime-lang-only.ss ? That shouldn't depend on MrEd. > > > > > > > > Greg > > > > > > > > On 3/10/08, Dave Griffiths wrote: > > > > > Hi all, > > > > > > > > > > Could/Should FrTime be independent of MrEd? frtime.ss requires > > > > > frp-snip.ss which requires mred.ss. This seems to be the only thing > > > > > making it so (if I comment out the require I can run frtime scripts in > > > > > an mzscheme interpreter). > > > > > > > > > > cheers > > > > > > > > > > dave > > > > > > > > > > _________________________________________________ > > > > > For list-related administrative tasks: > > > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > > > > > > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robby at cs.uchicago.edu Mon May 12 08:43:05 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:20 2009 Subject: [plt-scheme] DrScheme interface changes In-Reply-To: <372655.45897.qm@web30207.mail.mud.yahoo.com> References: <932b2f1f0805090841p6a8edce7w6750645b8c7d8c3e@mail.gmail.com> <372655.45897.qm@web30207.mail.mud.yahoo.com> Message-ID: <932b2f1f0805120543m6eceb945j9d0959399aeb09cc@mail.gmail.com> Most of the functionality in that language is now in all of the languages and what isn't was never used AFAICT. Robby On 5/12/08, Benjamin L. Russell wrote: > Yes, the new buttons in the upper-right corner in DrScheme, version > 3.99.0.25-svn11may2008, english, do look more professional. > > Just curious, though: What happened to the "Slideshow" Experimental > Language? It is no longer listed. > > Benjamin L. Russell > > --- On Sat, 5/10/08, Robby Findler wrote: > > > No javascript! :) > > > > On Thu, May 8, 2008 at 7:36 PM, Geoffrey S. Knauth > > wrote: > > > On May 8, 2008, at 16:03, Grant Rettke wrote: > > >> > > >> On Thu, May 8, 2008 at 1:50 AM, Stephen De > > Gabrielle wrote: > > >>> > > >>> Hi. I don't know who is doing it- but > > thankyou! > > >>> I really like the recent DrScheme interface > > changes. > > >> > > >> What in particular did you like? > > > > > > I just updated from svn and rebuilt. I too like the > > new look & feel. Big > > > clunky buttons are gone. Their replacements have a > > light feel to them. It > > > almost looks like Javascript underneath, but I > > haven't looked under the > > > hood. > > > > > > > > > _________________________________________________ > > > For list-related administrative tasks: > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From greg at cs.brown.edu Mon May 12 08:58:37 2008 From: greg at cs.brown.edu (Gregory Cooper) Date: Thu Mar 26 02:18:20 2009 Subject: [plt-scheme] FrTime dependant on MrEd? In-Reply-To: <1210595517.7302.16.camel@daves-laptop> References: <1205184218.5533.19.camel@daves-laptop> <65e1d50c0803101428m32d1d843rfd31ebd849b86ba6@mail.gmail.com> <1205185987.5533.23.camel@daves-laptop> <65e1d50c0803101503n25a9c45ao773510e06cf17c77@mail.gmail.com> <1205187495.5533.29.camel@daves-laptop> <1210595517.7302.16.camel@daves-laptop> Message-ID: <65e1d50c0805120558r5d5b121dq4bb1740c23657d3f@mail.gmail.com> Fixed in svn. Thanks, Greg On Mon, May 12, 2008 at 8:31 AM, Dave Griffiths wrote: > Hi Greg, > > Upgrading to 3.99, I noticed that this hasn't made it into the nightly > builds yet - just reminding :) > > cheers, > > dave > > On Mon, 2008-03-10 at 22:18 +0000, Dave Griffiths wrote: >> I changed list.ss, etc.ss and math.ss, it works, and everything seems to >> be ok :) >> >> On Mon, 2008-03-10 at 18:03 -0400, Gregory Cooper wrote: >> > Sounds like a bug (list.ss should probably just use >> > frtime-lang-only.ss). I'll fix this in svn as soon as I get a chance; >> > for now go ahead and edit whatever files you need to. >> > >> > Greg >> > >> > On 3/10/08, Dave Griffiths wrote: >> > > Hi Greg, >> > > >> > > Nope - I still get problems because things like list.ss use frtime.ss. >> > > Is there a way around that? >> > > >> > > >> > > On Mon, 2008-03-10 at 17:28 -0400, Gregory Cooper wrote: >> > > > Hi Dave, >> > > > >> > > > Can you use frtime-lang-only.ss ? That shouldn't depend on MrEd. >> > > > >> > > > Greg >> > > > >> > > > On 3/10/08, Dave Griffiths wrote: >> > > > > Hi all, >> > > > > >> > > > > Could/Should FrTime be independent of MrEd? frtime.ss requires >> > > > > frp-snip.ss which requires mred.ss. This seems to be the only thing >> > > > > making it so (if I comment out the require I can run frtime scripts in >> > > > > an mzscheme interpreter). >> > > > > >> > > > > cheers >> > > > > >> > > > > dave >> > > > > >> > > > > _________________________________________________ >> > > > > For list-related administrative tasks: >> > > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> > > > > >> > > >> > > >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From mflatt at cs.utah.edu Mon May 12 09:17:06 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:20 2009 Subject: [plt-scheme] HTTP library for PLT Scheme? In-Reply-To: References: Message-ID: <20080512131707.D6FDA650347@mail-svr1.cs.utah.edu> At Sun, 11 May 2008 10:19:15 -0400, "Andrei Stebakov" wrote: > I just started with the PLT Scheme and I am wondering if there is a library > which impements the functionality of an HTTP client (http GET, POST > requests, cookies etc)? The "url.ss" library of the "net" collection provides functions like `get-pure-port' (for an HTTP GET) and `post-pure-port' (for an HTTP POST). Matthew From stephen at degabrielle.name Mon May 12 11:28:20 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:18:20 2009 Subject: [plt-scheme] DrScheme interface changes In-Reply-To: <372655.45897.qm@web30207.mail.mud.yahoo.com> References: <932b2f1f0805090841p6a8edce7w6750645b8c7d8c3e@mail.gmail.com> <372655.45897.qm@web30207.mail.mud.yahoo.com> Message-ID: <595b9ab20805120828q240848a0l3894df1dcfa3a822@mail.gmail.com> Cool! Buttons Toolbar can be moved to left and right and hidden! (in .25) I can see this is evolving really quickly! s. On Mon, May 12, 2008 at 1:24 PM, Benjamin L. Russell wrote: > Yes, the new buttons in the upper-right corner in DrScheme, version 3.99.0.25-svn11may2008, english, do look more professional. > > Just curious, though: What happened to the "Slideshow" Experimental Language? It is no longer listed. > > Benjamin L. Russell > > > > --- On Sat, 5/10/08, Robby Findler wrote: > > > No javascript! :) > > > > On Thu, May 8, 2008 at 7:36 PM, Geoffrey S. Knauth > > wrote: > > > On May 8, 2008, at 16:03, Grant Rettke wrote: > > >> > > >> On Thu, May 8, 2008 at 1:50 AM, Stephen De > > Gabrielle wrote: > > >>> > > >>> Hi. I don't know who is doing it- but > > thankyou! > > >>> I really like the recent DrScheme interface > > changes. > > >> > > >> What in particular did you like? > > > > > > I just updated from svn and rebuilt. I too like the > > new look & feel. Big > > > clunky buttons are gone. Their replacements have a > > light feel to them. It > > > almost looks like Javascript underneath, but I > > haven't looked under the > > > hood. > > > > > > > > > _________________________________________________ > > > For list-related administrative tasks: > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- Cheers, Stephen -- Stephen De Gabrielle s.degabrielle@cs.ucl.ac.uk Telephone +44 (0)20 7679 0693 (x30693) Mobile 079 851 890 45 Project: Making Sense of Information (MaSI) http://www.uclic.ucl.ac.uk/annb/MaSI.html UCL Interaction Centre MPEB 8th floor University College London Gower Street London WC1E 6BT From filcab at gmail.com Mon May 12 14:24:41 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:21 2009 Subject: [plt-scheme] R6RS and read syntax Message-ID: <87E24E71-3465-4D35-B873-8DB791F344F1@gmail.com> Hi Continuing my R6RS vs. MzScheme woes... Is there a way to import read-syntax into an R6RS program? It doesn't seem to me that the standard covers it so, unless there's something in mzscheme for that, I must continue to use (regexp "...") instead of #rx"...". And in '() it's worse. regexp-match* will give me an immutable list, but '(...) will give me a mutable one (and cars and cdrs will break on one of those). Is there a way to overcome the read-syntax obstacle in mzscheme? Thanks for the help, - Filipe Cabecinhas From dyrueta at gmail.com Mon May 12 14:45:20 2008 From: dyrueta at gmail.com (dave yrueta) Date: Thu Mar 26 02:18:21 2009 Subject: [plt-scheme] Re: Help requested for HtDP Exercise 16.3.4 Challenge Part 2 In-Reply-To: References: <4C784CF9-7D51-4357-86EE-86DACB2F96F1@ccs.neu.edu> Message-ID: Hi Veer -- Thank you for your comments. Are they intended as general guidelines to solving this problem or as a response to my specific approach. I only ask because I believe the approach you've suggested in the one I tried to adopt. Perhaps because it was buried so far down in the post you didn't see it? At any rate, I believe I've isolated the problem with my function. It not only returns all paths, in the manner you've described, but also all intermediate paths as well. So instead of returning (list(list 'ts)(list 'ts 'libs 'docs) after running (find-all-paths ts 'read), it produces -- (list(list 'ts)(list 'ts 'libs 'docs)(list 'ts 'libs)(list 'ts)) The last two paths are intermediate, and I can't quite figure out what is causing them to arise... If you can offer any further insight into the nature of this problem, I certainly would appreciate your help. Thanks! Dave Yrueta On May 11, 4:01 am, Veer wrote: > Here are 2 important points i use when problem is complex. > > 1. Remember what a function produces , without going into the > details how it produces > 2. How to combine what we have with what function produces > > Here are the some clues , i hope i don't confuse you more . > > ;;find? : dir symbol -> list-of-paths or false > (define (find? a-dir a-sym) ..) > > ;;1. If file is found in a current directory(find-in-files?) what to do we > ;; have and what to do with other dirs in this current dir > ;; a. (dir-name a-dir) > ;; b. (find-in-dirs? (dir-dirs a-dir) a-sym) produces what? > (false or list-of-paths) > > ;;Hint: How will you combine the two and > ;; if b is a list-of-paths then we need to > ;; insert or prefix "what" to each element in list-of-paths > > ;;2. If file is not found in current dir then > ;; a. Do we search for dirs in current dir if so which function to use > ;; b. What that function return and what is needed to be inserted into > ;; it > > ;;find-in-dirs? : list-of-dirs symbol -> list-of-paths or false > (define (find-in-dirs? alods a-sym) ..) > > ;;1. alods is empty ... > > ;;2. (find? (first alods) a-sym) produces what ? > > ;; a. if 2 is false what to do > ;; b. else we have (find? (first alods) a-sym) > > ;; Now for b. we have list-of-paths and we also have > ;; a list-of-paths from (find-in-dirs? (rest alods) a-sym) > ;; Only thing is needed to combine them > ;; remember find-in-dirs? returns what? > > ;;find-in-files?: list-of-files a-sym -> boolean > (define (find-in-files? alofs a-sym) ..) > > ;;insert-or-prefix-funcion : > > Veer > > > > On Sun, May 11, 2008 at 10:29 AM, dave yrueta wrote: > > Hi Matthias -- > > > >BTW, I didn't see any check-expects and test-examples but this could > > > be due to your formatting. > > > Did not run check-expects (forgot that existed) but do have test > > examples with desired outcomes under each function purpose statement. > > Also contrasted expected outcomes with actual outcomes at the end of > > the post. > > > >You might be better off posting a url to a > > > solution. > > > Here it is -- > > > http://docs.google.com/Doc?id=dhdqh3jf_10g9gt37ds > > > I apologize for the length of the post. I have a hard time keeping it > > brief while justifying each move with respect to the design recipe. > > > On May 10, 5:47 pm, Matthias Felleisen wrote: > > > On May 10, 2008, at 7:50 PM, dave yrueta wrote: > > > > > I've found it difficult to isolate the problem within a single > > > > function since they are all interrelated. > > > > Sorry no time to look thru details BUT when you have mut rec specs of > > > data, you get mut rec functions to process them. And yes, in that > > > case it's nearly impossible to write independent tests (and find > > > problems). > > > > ;; --- > > > > BTW, I didn't see any check-expects and test-examples but this could > > > be due to your formatting. You might be better off posting a url to a > > > solution. My Mail client scrambles your posting. > > > > -- Matthias > > > > _________________________________________________ > > > For list-related administrative tasks: > > > h>ttp://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From lispercat at gmail.com Mon May 12 15:36:41 2008 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu Mar 26 02:18:21 2009 Subject: [plt-scheme] View Keyword Docs in Emacs (Quack mode) Message-ID: It doesn't work for me. Every time I try to look up the documentation for a function name, I put a cursor on it and run quack-view-keyword-docs and it says "Sorry, no documentation found for keyword.". I set an environment variable PLTHOME which points to my d:\DrScheme folder. Under the folder I have doc directory with documentation. How can I make it work? Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080512/b7922a58/attachment.htm From neil at neilvandyke.org Mon May 12 15:47:34 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:18:22 2009 Subject: [plt-scheme] View Keyword Docs in Emacs (Quack mode) In-Reply-To: References: Message-ID: <48289ED6.7050506@neilvandyke.org> That feature doesn't yet work with the new documentation format in 3.99. Is that the version you're using? Andrei Stebakov wrote at 05/12/2008 03:36 PM: > It doesn't work for me. Every time I try to look up the documentation > for a function name, I put a cursor on it and run > quack-view-keyword-docs and it says "Sorry, no documentation found for > keyword.". > I set an environment variable PLTHOME which points to my d:\DrScheme > folder. Under the folder I have doc directory with documentation. > How can I make it work? From lispercat at gmail.com Mon May 12 15:48:59 2008 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu Mar 26 02:18:22 2009 Subject: [plt-scheme] Re: HTTP library for PLT Scheme? In-Reply-To: References: Message-ID: Any samples code that goes with it? The function is described as (post-pure-port URL post [header]) $B"*(B input-port? URL : url? post : bytes? header : (listof string? ) = null How do I construct a request to url with a file to upload, for example? I am sure there must be samples somewhere but searching the internet I couldn't find any. Andrew On Sun, May 11, 2008 at 10:19 AM, Andrei Stebakov wrote: > I just started with the PLT Scheme and I am wondering if there is a > library which impements the functionality of an HTTP client (http GET, POST > requests, cookies etc)? > > Thank you, > Andrei > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080512/4a79ae55/attachment.html From lispercat at gmail.com Mon May 12 15:54:06 2008 From: lispercat at gmail.com (Andrei Stebakov) Date: Thu Mar 26 02:18:23 2009 Subject: [plt-scheme] View Keyword Docs in Emacs (Quack mode) In-Reply-To: <48289ED6.7050506@neilvandyke.org> References: <48289ED6.7050506@neilvandyke.org> Message-ID: I am using version 372 (current) from http://download.plt-scheme.org/drscheme/. Maybe I should get the latest to avoid many problems that I have (not being able to run most of the GUI apps, for example) Andrew On Mon, May 12, 2008 at 3:47 PM, Neil Van Dyke wrote: > That feature doesn't yet work with the new documentation format in 3.99. > Is that the version you're using? > > Andrei Stebakov wrote at 05/12/2008 03:36 PM: > > It doesn't work for me. Every time I try to look up the documentation for > > a function name, I put a cursor on it and run quack-view-keyword-docs and it > > says "Sorry, no documentation found for keyword.". > > I set an environment variable PLTHOME which points to my d:\DrScheme > > folder. Under the folder I have doc directory with documentation. > > How can I make it work? > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080512/bac9d68e/attachment.htm From filcab at gmail.com Mon May 12 16:06:08 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:23 2009 Subject: [plt-scheme] using a defined procedure in a syntax-case form Message-ID: <0374B43C-B8AB-471D-8BDB-7D362E502558@gmail.com> Hi, I'm trying to use a helper function I defined in the same module in a syntax-case form, but I keep getting "unbound variable" errors. Here's an example: -------------------------- #lang scheme (define (a str) (string-append "a" str)) (define-syntax b (lambda (stx) (syntax-case stx () ((_ str) (with-syntax ([str2 (datum->syntax #'str (a (syntax->datum #'str)))]) #'str2))))) -------------------------- error: expand: unbound variable in module (transformer environment) in: a Thanks for the help, - Filipe Cabecinhas From neil at neilvandyke.org Mon May 12 16:45:51 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:18:24 2009 Subject: [plt-scheme] View Keyword Docs in Emacs (Quack mode) In-Reply-To: References: <48289ED6.7050506@neilvandyke.org> Message-ID: <4828AC7F.7050700@neilvandyke.org> I was just seeing this in my installation of 372. A temporary workaround is to add some additional directories to your "quack-pltcollect-dirs" variable. In my case, I did "M-x customize-variable RET quack-pltcollect-dirs RET" in Emacs and added the following two directories: /home/neil/.plt-scheme/372 /usr/local/src/plt-372 I will fix the Quack code when I get a chance. By the way, for doing MrEd GUI work, I generally recommend using DrScheme. If you want, you can have the files in Emacs at the same time they're in DrScheme, and keep the two in sync by reverting buffers. On the Emacs side, I use "revbufs.el" when doing this with multiple files: http://www.neilvandyke.org/revbufs/revbufs.el Andrei Stebakov wrote at 05/12/2008 03:54 PM: > I am using version 372 (current) from > http://download.plt-scheme.org/drscheme/. > Maybe I should get the latest to avoid many problems that I have (not > being able to run most of the GUI apps, for example) > > Andrew > > On Mon, May 12, 2008 at 3:47 PM, Neil Van Dyke > wrote: > > That feature doesn't yet work with the new documentation format in > 3.99. Is that the version you're using? > > Andrei Stebakov wrote at 05/12/2008 03:36 PM: > > It doesn't work for me. Every time I try to look up the > documentation for a function name, I put a cursor on it and > run quack-view-keyword-docs and it says "Sorry, no > documentation found for keyword.". > I set an environment variable PLTHOME which points to my > d:\DrScheme folder. Under the folder I have doc directory with > documentation. > How can I make it work? > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080512/94a18d1c/attachment.html From neil at neilvandyke.org Mon May 12 16:47:51 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:18:24 2009 Subject: [plt-scheme] View Keyword Docs in Emacs (Quack mode) In-Reply-To: <4828AC7F.7050700@neilvandyke.org> References: <48289ED6.7050506@neilvandyke.org> <4828AC7F.7050700@neilvandyke.org> Message-ID: <4828ACF7.5050706@neilvandyke.org> By the way, those two directories are the PLT installation directory and my PLaneT directory for that version of PLT. Neil Van Dyke wrote at 05/12/2008 04:45 PM: > > In my case, I did "M-x customize-variable RET quack-pltcollect-dirs > RET" in Emacs and added the following two directories: > > /home/neil/.plt-scheme/372 > /usr/local/src/plt-372 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080512/aa50eeea/attachment.htm From filcab at gmail.com Mon May 12 16:54:58 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:25 2009 Subject: [plt-scheme] Modules/Libraries in MZScheme and R6RS In-Reply-To: <20080512120412.D1368650332@mail-svr1.cs.utah.edu> References: <6B889B7A-2C8C-4D25-BFD8-AE064EB1E81C@gmail.com> <20080512120412.D1368650332@mail-svr1.cs.utah.edu> Message-ID: <342B152B-4490-4E66-88F1-C945FF8CBE49@gmail.com> Hi, On 12 May, 2008, at 13:04, Matthew Flatt wrote: > > I have no good answer so far. It works to write > > (import (srfi \x31;)) > > but that's crazy. > > See also SRFI 97 and the discussion of whether `(srfi 1)' should be > allowed. Weird... It works... But it's weird (I guess it's a workaround so it doesn't parse as a number). Anyway, there's a bug in DrScheme's syntax highlighter that makes it treat the ';' as the start of a comment > > Yes, something like that. The "Choose Language" dialog in DrScheme > lets > you add paths to search for collections. But you won't be able to > reach > "base.scm", exactly. The library reference `(base)' would mean the > "main.ss" (or "main.sls", etc.) file in the "base" collection, for > example. But that's the basic idea. > Thanks. Now I just (import (tese base)) and so on. Now I have another problem. If I have the following code: ----------------------- #!r6rs (import (rnrs) (rename (rnrs) [car first] [cdr rest])) ----------------------- I expected to be able to use first and rest but they're not available in the module body. Thanks for the help, - Filipe Cabecinhas From mflatt at cs.utah.edu Mon May 12 19:15:07 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:25 2009 Subject: [plt-scheme] Modules/Libraries in MZScheme and R6RS In-Reply-To: <342B152B-4490-4E66-88F1-C945FF8CBE49@gmail.com> References: <6B889B7A-2C8C-4D25-BFD8-AE064EB1E81C@gmail.com> <20080512120412.D1368650332@mail-svr1.cs.utah.edu> <342B152B-4490-4E66-88F1-C945FF8CBE49@gmail.com> Message-ID: <20080512231509.706676500A8@mail-svr1.cs.utah.edu> At Mon, 12 May 2008 21:54:58 +0100, Filipe Cabecinhas wrote: > Hi, > > On 12 May, 2008, at 13:04, Matthew Flatt wrote: > > > > > I have no good answer so far. It works to write > > > > (import (srfi \x31;)) > > > > but that's crazy. > > > > See also SRFI 97 and the discussion of whether `(srfi 1)' should be > > allowed. > > Weird... It works... But it's weird (I guess it's a workaround so it > doesn't parse as a number). > Anyway, there's a bug in DrScheme's syntax highlighter that makes it > treat the ';' as the start of a comment DrScheme's Scheme mode currently always parses like the default reader. Generalizing DrScheme to adjust coloring based on a `#lang' or `#!' line is planned, but after v4.0. > Now I have another problem. > If I have the following code: > ----------------------- > #!r6rs > (import (rnrs) > (rename (rnrs) [car first] [cdr rest])) > ----------------------- > I expected to be able to use first and rest but they're not available > in the module body. This is an import bug that's not isolated to R6RS support. When a module exports an identifier at multiple phase levels (run time, compile time, etc.), `rename-in' only renamed the identifier at one of the phase levels. This bug now fixed in SVN. Matthew From mflatt at cs.utah.edu Mon May 12 19:16:17 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:25 2009 Subject: [plt-scheme] using a defined procedure in a syntax-case form In-Reply-To: <0374B43C-B8AB-471D-8BDB-7D362E502558@gmail.com> References: <0374B43C-B8AB-471D-8BDB-7D362E502558@gmail.com> Message-ID: <20080512231618.CB4FB65009D@mail-svr1.cs.utah.edu> At Mon, 12 May 2008 21:06:08 +0100, Filipe Cabecinhas wrote: > Hi, > > I'm trying to use a helper function I defined in the same module in a > syntax-case form, but I keep getting "unbound variable" errors. > > Here's an example: > -------------------------- > #lang scheme > > (define (a str) > (string-append "a" str)) > > (define-syntax b > (lambda (stx) > (syntax-case stx () > ((_ str) > (with-syntax ([str2 (datum->syntax #'str (a (syntax->datum > #'str)))]) > #'str2))))) > -------------------------- > > error: expand: unbound variable in module (transformer environment) > in: a The implementation of a macro cannot call a function that exists only at run time. If you want `a' to exist at macro-expansion time, instead, define it with `define-for-syntax': (define-for-syntax (a str) (string-append "a" str)) Matthew From mflatt at cs.utah.edu Mon May 12 19:25:13 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:25 2009 Subject: [plt-scheme] R6RS and read syntax In-Reply-To: <87E24E71-3465-4D35-B873-8DB791F344F1@gmail.com> References: <87E24E71-3465-4D35-B873-8DB791F344F1@gmail.com> Message-ID: <20080512232514.D0FE965009C@mail-svr1.cs.utah.edu> At Mon, 12 May 2008 19:24:41 +0100, Filipe Cabecinhas wrote: > Continuing my R6RS vs. MzScheme woes... > > Is there a way to import read-syntax into an R6RS program? It doesn't > seem to me that the standard covers it so, unless there's something in > mzscheme for that, I must continue to use (regexp "...") instead of > #rx"...". And in '() it's worse. regexp-match* will give me an > immutable list, but '(...) will give me a mutable one (and cars and > cdrs will break on one of those). > > Is there a way to overcome the read-syntax obstacle in mzscheme? There's no way to import reader syntax using the `r6rs' reader. The creation of mutable lists by '(...) isn't actually a reader issue; it's the work of `quote' as exported by `rnrs'. I'm puzzled, though, that you're trying to use R6RS library syntax but you seem willing to use many PLT-specific features. Why not just write in `#lang scheme' syntax instead of `#!r6rs'? Matthew From filcab at gmail.com Mon May 12 19:43:18 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:25 2009 Subject: [plt-scheme] R6RS and read syntax In-Reply-To: <20080512232514.D0FE965009C@mail-svr1.cs.utah.edu> References: <87E24E71-3465-4D35-B873-8DB791F344F1@gmail.com> <20080512232514.D0FE965009C@mail-svr1.cs.utah.edu> Message-ID: <2938C9E2-27BC-46AA-988B-509521EA7896@gmail.com> Hi Matthew, Thanks for your replies and fixes in SVN ;-) On 13 May, 2008, at 00:25, Matthew Flatt wrote: > I'm puzzled, though, that you're trying to use R6RS library syntax but > you seem willing to use many PLT-specific features. Why not just write > in `#lang scheme' syntax instead of `#!r6rs'? Well. I only wanted regexp-match* (with #rx if it was possible) and pretty-print, so I thought about using R6RS and only importing those 2 symbols that I needed so it would be portable. But, due to the trouble I would have converting mlists->lists (or vice-versa) for interoperability and printing (that file will generate stubs for some COM functions on the Scheme side), I think I'll follow your advice and just use #lang scheme. Thanks for the help, - Filipe Cabecinhas From robby at cs.uchicago.edu Mon May 12 19:51:38 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:26 2009 Subject: [plt-scheme] Re: HTTP library for PLT Scheme? In-Reply-To: References: Message-ID: <932b2f1f0805121651g7fb764fcic8c9470fc17d50f6@mail.gmail.com> Did you find string->url? There are uses in the PLT Scheme codebase, too. Robby 2008/5/12 Andrei Stebakov : > Any samples code that goes with it? The function is described as > > > (post-pure-port URL post [header]) ? input-port? > > > URL : url? > > > post : bytes? > > > header : (listof string?) = null > How do I construct a request to url with a file to upload, for example? > I am sure there must be samples somewhere but searching the internet I > couldn't find any. > > Andrew > > > > > On Sun, May 11, 2008 at 10:19 AM, Andrei Stebakov > wrote: > > I just started with the PLT Scheme and I am wondering if there is a > library which impements the functionality of an HTTP client (http GET, POST > requests, cookies etc)? > > > > Thank you, > > Andrei > > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From neil at neilvandyke.org Mon May 12 20:21:34 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:18:26 2009 Subject: [plt-scheme] Re: HTTP library for PLT Scheme? In-Reply-To: References: Message-ID: <4828DF0E.3060708@neilvandyke.org> Andrei Stebakov wrote at 05/12/2008 03:48 PM: > How do I construct a request to url with a file to upload, for example? To do HTTP POST file uploads, you will need to use "multipart/form-data" MIME encoding. From a quick look at the 372 "url-unit.ss", that code don't do this for you directly, but you might be able to do it with the help of the code in "mime-unit.ss" and the information in "http://www.ietf.org/rfc/rfc1867.txt". That RFC is actually more accessible than most. (I wish I had a client who could fund all-new Scheme HTTP libraries. Based on what I've learned from PLT and my own libraries, there's better ways of doing pretty much everything.) -- http://www.neilvandyke.org/ From grettke at acm.org Mon May 12 22:56:22 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:26 2009 Subject: [plt-scheme] View Keyword Docs in Emacs (Quack mode) In-Reply-To: <4828AC7F.7050700@neilvandyke.org> References: <48289ED6.7050506@neilvandyke.org> <4828AC7F.7050700@neilvandyke.org> Message-ID: <756daca50805121956n3b50fea4ra65f173e7558de47@mail.gmail.com> > By the way, for doing MrEd GUI work, I generally recommend using DrScheme. > If you want, you can have the files in Emacs at the same time they're in > DrScheme, and keep the two in sync by reverting buffers. On the Emacs side, > I use "revbufs.el" when doing this with multiple files: > http://www.neilvandyke.org/revbufs/revbufs.el This is a little easier than waiting for the revert: http://planet.plt-scheme.org/display.ss?package=drsync.plt&owner=grettke From praimon at gmail.com Mon May 12 23:34:45 2008 From: praimon at gmail.com (praimon) Date: Thu Mar 26 02:18:26 2009 Subject: [plt-scheme] match question In-Reply-To: <63bb19ae0805111937j59c0343fxf50f0af1fdf81654@mail.gmail.com> References: <4acd8930805101552p11e60ebftddd7d7b2d989d5cc@mail.gmail.com> <63bb19ae0805111937j59c0343fxf50f0af1fdf81654@mail.gmail.com> Message-ID: <4acd8930805122034g68ba7afau963d88aa144e7088@mail.gmail.com> thanks for your response. Would you say that the greediness of the patterns produces counter-intuitive answers? Here's a very simple example: (match '(3 2 4 3 2 1) ((list x y ... x z ...) (append y z))) => (2 4 3 2) Surely the result should be (2 4 2 1)? At least that's the intuitively correct answer (and the one returned by Mathematica, e.g.). Changing ... to ..1 produces a different counter-intuitive answer: (2 4 3 1). For people like me, who are merely using your language rather than trying to understand its inner workings, this is worrisome. regards, praimon On Sun, May 11, 2008 at 10:37 PM, Sam TH wrote: > The general answer is the all ... patterns are greedy, but in order, > from left to right. > > So we match as many elements to `x' as possible, then one to `y', then > as many to `z' as possible, then another to the second `y'. > > In the particular case, we match as many elements to `x' as possible, > while allowing the whole pattern to match. That's the first 3 > elements, and the fifth element gets matched to `z'. In your second > example, we have to match at least two elements to `z', so we only > match 2 to `x'. > > Does that help explain things? > > sam th > > > > On Sat, May 10, 2008 at 6:52 PM, praimon wrote: > > hello, > > in 3.99.0.24, using scheme/match: > > > > (map (lambda (x) > > (match x ((list x ... y z ..1 y) (append x z)))) > > '((1 2 3 4 3) > > (1 2 3 4 3 4) > > (1 2 3 4 3 3))) > > > > => ((1 2 4) (1 2 3 3) (1 2 3 3)) > > > > I understand the first two matches, but > > shouldn't the last result be (1 2 4 3)? > > > > This produces my expected answer: > > > > (match '(1 2 3 4 3 3) > > ((list x ... y z ..2 y) (append x z))) > > > > => (1 2 4 3) > > > > but in this context, aren't ..1 and ..2 equivalent? > > > > thanks, > > praimon > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > > -- > sam th > samth@ccs.neu.edu > From diggerrrrr at gmail.com Tue May 13 04:16:14 2008 From: diggerrrrr at gmail.com (Veer) Date: Thu Mar 26 02:18:26 2009 Subject: [plt-scheme] Re: Help requested for HtDP Exercise 16.3.4 Challenge Part 2 In-Reply-To: References: <4C784CF9-7D51-4357-86EE-86DACB2F96F1@ccs.neu.edu> Message-ID: Hi dave , Sorry , i did not read your code properly . In the function : (define (list-paths lod f) (cond [(empty? lod) (list empty)] [(boolean=? (find? (first lod) f) false) (list-paths (rest lod) f)] [else (append (find-all-paths (first lod) f) (list-paths (rest lod) f))])) change [(empty? lod) (list empty)] to [(empty? lod) empty] Though i have not thoroughly analyzed your code , by changing the above line produces the correct result. You still need to test it rigorously. > Thank you for your comments. Are they intended as general guidelines > to solving this problem or as a response to my specific approach. I > only ask because I believe the approach you've suggested in the one I > tried to adopt. Perhaps because it was buried so far down in the post > you didn't see it? Sometimes we forget :) , just thought it might help , once you have done with this exercise i will mail(directly) you my solution , we can compare. On 5/13/08, dave yrueta wrote: > Hi Veer -- > > Thank you for your comments. Are they intended as general guidelines > to solving this problem or as a response to my specific approach. I > only ask because I believe the approach you've suggested in the one I > tried to adopt. Perhaps because it was buried so far down in the post > you didn't see it? > > At any rate, I believe I've isolated the problem with my function. It > not only returns all paths, in the manner you've described, but also > all intermediate paths as well. So instead of returning (list(list > 'ts)(list 'ts 'libs 'docs) after running (find-all-paths ts 'read), it > produces -- > > (list(list 'ts)(list 'ts 'libs 'docs)(list 'ts 'libs)(list 'ts)) > > The last two paths are intermediate, and I can't quite figure out what > is causing them to arise... > > If you can offer any further insight into the nature of this problem, > I certainly would appreciate your help. > > Thanks! > Dave Yrueta > > On May 11, 4:01 am, Veer wrote: > > Here are 2 important points i use when problem is complex. > > > > 1. Remember what a function produces , without going into the > > details how it produces > > 2. How to combine what we have with what function produces > > > > Here are the some clues , i hope i don't confuse you more . > > > > ;;find? : dir symbol -> list-of-paths or false > > (define (find? a-dir a-sym) ..) > > > > ;;1. If file is found in a current directory(find-in-files?) what to do we > > ;; have and what to do with other dirs in this current dir > > ;; a. (dir-name a-dir) > > ;; b. (find-in-dirs? (dir-dirs a-dir) a-sym) produces what? > > (false or list-of-paths) > > > > ;;Hint: How will you combine the two and > > ;; if b is a list-of-paths then we need to > > ;; insert or prefix "what" to each element in list-of-paths > > > > ;;2. If file is not found in current dir then > > ;; a. Do we search for dirs in current dir if so which function to > use > > ;; b. What that function return and what is needed to be inserted > into > > ;; it > > > > ;;find-in-dirs? : list-of-dirs symbol -> list-of-paths or false > > (define (find-in-dirs? alods a-sym) ..) > > > > ;;1. alods is empty ... > > > > ;;2. (find? (first alods) a-sym) produces what ? > > > > ;; a. if 2 is false what to do > > ;; b. else we have (find? (first alods) a-sym) > > > > ;; Now for b. we have list-of-paths and we also have > > ;; a list-of-paths from (find-in-dirs? (rest alods) a-sym) > > ;; Only thing is needed to combine them > > ;; remember find-in-dirs? returns what? > > > > ;;find-in-files?: list-of-files a-sym -> boolean > > (define (find-in-files? alofs a-sym) ..) > > > > ;;insert-or-prefix-funcion : > > > > Veer > > > > > > > > On Sun, May 11, 2008 at 10:29 AM, dave yrueta wrote: > > > Hi Matthias -- > > > > > >BTW, I didn't see any check-expects and test-examples but this could > > > > be due to your formatting. > > > > > Did not run check-expects (forgot that existed) but do have test > > > examples with desired outcomes under each function purpose statement. > > > Also contrasted expected outcomes with actual outcomes at the end of > > > the post. > > > > > >You might be better off posting a url to a > > > > solution. > > > > > Here it is -- > > > > > http://docs.google.com/Doc?id=dhdqh3jf_10g9gt37ds > > > > > I apologize for the length of the post. I have a hard time keeping it > > > brief while justifying each move with respect to the design recipe. > > > > > On May 10, 5:47 pm, Matthias Felleisen wrote: > > > > On May 10, 2008, at 7:50 PM, dave yrueta wrote: > > > > > > > I've found it difficult to isolate the problem within a single > > > > > function since they are all interrelated. > > > > > > Sorry no time to look thru details BUT when you have mut rec specs of > > > > data, you get mut rec functions to process them. And yes, in that > > > > case it's nearly impossible to write independent tests (and find > > > > problems). > > > > > > ;; --- > > > > > > BTW, I didn't see any check-expects and test-examples but this could > > > > be due to your formatting. You might be better off posting a url to a > > > > solution. My Mail client scrambles your posting. > > > > > > -- Matthias > > > > > > _________________________________________________ > > > > For list-related administrative tasks: > > > > h>ttp://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > _________________________________________________ > > > For list-related administrative tasks: > > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From noelwelsh at gmail.com Tue May 13 04:23:11 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:27 2009 Subject: [plt-scheme] Re: HTTP library for PLT Scheme? In-Reply-To: <4828DF0E.3060708@neilvandyke.org> References: <4828DF0E.3060708@neilvandyke.org> Message-ID: Also see the cookbook: http://schemecookbook.org/Cookbook/WebChapter#Web_Programming N. From samth at ccs.neu.edu Tue May 13 08:22:59 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:18:27 2009 Subject: [plt-scheme] match question In-Reply-To: <4acd8930805122034g68ba7afau963d88aa144e7088@mail.gmail.com> References: <4acd8930805101552p11e60ebftddd7d7b2d989d5cc@mail.gmail.com> <63bb19ae0805111937j59c0343fxf50f0af1fdf81654@mail.gmail.com> <4acd8930805122034g68ba7afau963d88aa144e7088@mail.gmail.com> Message-ID: <63bb19ae0805130522o1e79bdeex91cb25f06da1a9a1@mail.gmail.com> On Mon, May 12, 2008 at 11:34 PM, praimon wrote: > thanks for your response. Would you say that the greediness of > the patterns produces counter-intuitive answers? > Here's a very simple example: > > (match '(3 2 4 3 2 1) > ((list x y ... x z ...) (append y z))) > => (2 4 3 2) > > Surely the result should be (2 4 2 1)? At least that's the intuitively > correct answer (and the one returned by Mathematica, e.g.). > > Changing ... to ..1 produces a different counter-intuitive answer: (2 4 3 1). > For people like me, who are merely using your language rather than trying > to understand its inner workings, this is worrisome. Neither of those are the right answer. There seems to be something wrong with non-linear patterns (patterns where a variable appears multiple times, like `x' does here) combined with ... I'll take a look at it. If you could file a bug report with that example (see the "Submit Bug Report" entry under the Help menu) that would be great. Thanks, -- sam th samth@ccs.neu.edu From R.E.Jones at kent.ac.uk Mon May 12 13:39:32 2008 From: R.E.Jones at kent.ac.uk (R.E.Jones) Date: Thu Mar 26 02:18:27 2009 Subject: [plt-scheme] ISMM 2008 Early registration closes 14 May Message-ID: ACM SIGPLAN 2008 International Symposium on Memory Management June 7-8, 2008, Tucson, Arizona, USA Co-located events PLDI, LCTES, PLAS, SAW http://www.cs.kent.ac.uk/~rej/ismm2008 ----------------------------------------------------------------------------- | | | !!! EARLY RATE REGISTRATION CLOSING SOON !!! | | http://www.regmaster.com/conf/pldi2008.html | | | | Deadline for early registration: May 14, 2008 | | | | Thanks to the generosity of our sponsors, Microsoft Research and Intel, | | ISMM is able to offer heavily discounted registration fees for students | | | ============================================================================= ISMM is the premier forum for research in management of dynamically allocated memory. ISMM 2008 is colocated with PLDI'08, Programming Language Design and Implementation in Tucson, Arizona, USA. This year's ISMM features: - Keynote speaker, David Bacon (IBM TJ Watson Research Center) - 16 presentations - Student Lightning talks - Wild and Crazy Ideas Student Lightning Talks ISMM will feature a workshop for PhD students to give brief presentations (8 minutes + 2 minutes for questions) of their work in progress. This will provide an opportunity for students to get supportive feedback, to gain experience presenting to a major audience and exposure for themselves and their work, and will encourage interaction with fellow students and the community. A prize will be awarded for the best presentation. Students wishing to make a presentation should mail a brief abstract to Witawas Srisa-an by: Abstract deadline: 23 May 2008 Wild and Crazy Ideas Following the success of this session in previous meetings, we will again hold this fun and informal forum for discussion of interesting ideas in the area of memory management. Presenters are given just 4 minutes in which to present their idea and 1 minute to take questions. Prizes are awarded for the idea most crazy and the one most worthy of implementation! Please contribute your wild and crazy ideas. Contact the WACI chair, Tony Hosking , before the event. PROGRAMME Session 1: Garbage Collection & Resource Management - The CLOSER: Automating Resource Management in Java, Isil Dillig, Thomas Dillig, Eran Yahav and Satish Chandra - Parallel generational-copying garbage collection with a block-structured heap, Simon Marlow, Tim Harris, Roshan James and Simon Peyton Jones - Limits of Parallel Marking Garbage Collection, Fridtjof Siebert Session 2: Domain-Specific Memory Management I - Efficient Dynamic Heap Allocation of Scratch-Pad Memory, Ross McIlroy, Peter Dickman and Joe Sventek - Supporting Superpage Allocation without Additional Hardware Support, Mel Gorman and Patrick Healy - Memory management for Self-Adjusting Computation, Matthew Hammer and Umut Acar Session 3: Domain-Specific Memory Management II - Runtime Support for Region-Based Memory Management in Mercury, Quan Phan, Gerda Janssens and Zoltan Somogyi - A Reference Counting Garbage Collection Algorithm for Cyclical Functional Programming, Baltasar Trancon y Widemann Session 4: Locality, Performance and Optimization - Path Specialization: Reducing Phased Execution Overheads, Filip Pizlo, Erez Petrank and Bjarne Steensgaard - Sampling-based Program Locality Approximation, Yutao Zhong and Wentao Chang - Memory Pooling Assisted Data Splitting (MPADS), Stephen Curial, Peng Zhao, Jose Nelson Amaral, Yaoqing Gao, Shimin Cui, Raul Silvera and Roch Archambault Wild and Crazy Ideas Session - This session is a fun and informal forum for discussion of interesting ideas in the area of memory management. Presenters are given just 4 minutes in which to present their idea and 1 minute to take questions. Prizes are awarded for the idea most crazy and the one most worthy of implementation! Session 5: Heap Measurement and Analysis I - No Bit Left Behind: Limits of Heap Data Compression, Jennifer B. Sartor, Martin Hirzel and Kathryn S. McKinley - A Study of Java Object Demographics, Richard Jones and Chris Ryder - Practical Memory Leak Detector Based on Parameterized Procedural Summaries, Yungbum Jung and Kwangkeun Yi Session 6: Heap Measurement and Analysis II - Parametric Prediction of Heap Memory Requirements, Victor Braberman, Federico Fernandez, Diego Garbervetsky and Sergio Yovine - Analysing Memory Resource Bounds for Bytecode Programs, Wei-Ngan Chin, Huu Hai Nguyen, Corneliu Popeea and Shengchao Qin ORGANIZERS General Chair: Richard Jones Programme Chair: Steve Blackburn Steering Committee: Programme Committee: David Bacon, IBM David Detlefs, Microsoft Steve Blackburn, ANU David Gay, Intel Amer Diwan, U. Colorado Dan Grossman, U. Washington David Detlefs, Microsoft Martin Hirzel, IBM Richard Jones, U. Kent Matthias Meyer, U. Stuttgart Greg Morrisett, Harvard Kathryn McKinley, U. Texas Eliot Moss, U. Massachusetts Martin Rinard, MIT Erez Petrank, Technion U. Witawas Srisa-an, U. Nebraska Mooly Sagiv, Tel-Aviv U. Bjarne Steensgaard, Microsoft Guy Steele, Sun Microsystems David Ungar, IBM Craig Zilles, U. Illinois -------------------------------------+--------------------------------------- From praimon at gmail.com Tue May 13 10:18:17 2008 From: praimon at gmail.com (praimon) Date: Thu Mar 26 02:18:27 2009 Subject: [plt-scheme] match question In-Reply-To: <63bb19ae0805130522o1e79bdeex91cb25f06da1a9a1@mail.gmail.com> References: <4acd8930805101552p11e60ebftddd7d7b2d989d5cc@mail.gmail.com> <63bb19ae0805111937j59c0343fxf50f0af1fdf81654@mail.gmail.com> <4acd8930805122034g68ba7afau963d88aa144e7088@mail.gmail.com> <63bb19ae0805130522o1e79bdeex91cb25f06da1a9a1@mail.gmail.com> Message-ID: <4acd8930805130718y108ed7aaha10032d0b8221a69@mail.gmail.com> hello, Unfortunately the bug reporting function isn't working for me (the "submitting bug report" message never completes). I'm guessing my firewall is blocking some needed port, or maybe it's something else. regards, praimon On Tue, May 13, 2008 at 8:22 AM, Sam TH wrote: > On Mon, May 12, 2008 at 11:34 PM, praimon wrote: > > thanks for your response. Would you say that the greediness of > > the patterns produces counter-intuitive answers? > > Here's a very simple example: > > > > (match '(3 2 4 3 2 1) > > ((list x y ... x z ...) (append y z)) > > => (2 4 3 2) > > > > Surely the result should be (2 4 2 1)? At least that's the intuitively > > correct answer (and the one returned by Mathematica, e.g.). > > > > Changing ... to ..1 produces a different counter-intuitive answer: (2 4 3 1). > > For people like me, who are merely using your language rather than trying > > to understand its inner workings, this is worrisome. > > Neither of those are the right answer. There seems to be something > wrong with non-linear patterns (patterns where a variable appears > multiple times, like `x' does here) combined with ... I'll take a > look at it. > > If you could file a bug report with that example (see the "Submit Bug > Report" entry under the Help menu) that would be great. > > Thanks, > -- > > > sam th > samth@ccs.neu.edu > From samth at ccs.neu.edu Tue May 13 11:33:25 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:18:27 2009 Subject: [plt-scheme] match question In-Reply-To: <4acd8930805130718y108ed7aaha10032d0b8221a69@mail.gmail.com> References: <4acd8930805101552p11e60ebftddd7d7b2d989d5cc@mail.gmail.com> <63bb19ae0805111937j59c0343fxf50f0af1fdf81654@mail.gmail.com> <4acd8930805122034g68ba7afau963d88aa144e7088@mail.gmail.com> <63bb19ae0805130522o1e79bdeex91cb25f06da1a9a1@mail.gmail.com> <4acd8930805130718y108ed7aaha10032d0b8221a69@mail.gmail.com> Message-ID: <63bb19ae0805130833n79cd4bdeh1022a18929797feb@mail.gmail.com> The bug server was down, but should be back up now. Thanks, sam th On Tue, May 13, 2008 at 10:18 AM, praimon wrote: > hello, > Unfortunately the bug reporting function isn't working for me > (the "submitting bug report" message never completes). > I'm guessing my firewall is blocking some needed port, > or maybe it's something else. > > regards, > praimon > > > > On Tue, May 13, 2008 at 8:22 AM, Sam TH wrote: > > On Mon, May 12, 2008 at 11:34 PM, praimon wrote: > > > thanks for your response. Would you say that the greediness of > > > the patterns produces counter-intuitive answers? > > > Here's a very simple example: > > > > > > (match '(3 2 4 3 2 1) > > > ((list x y ... x z ...) (append y z)) > > > => (2 4 3 2) > > > > > > Surely the result should be (2 4 2 1)? At least that's the intuitively > > > correct answer (and the one returned by Mathematica, e.g.). > > > > > > Changing ... to ..1 produces a different counter-intuitive answer: (2 4 3 1). > > > For people like me, who are merely using your language rather than trying > > > to understand its inner workings, this is worrisome. > > > > Neither of those are the right answer. There seems to be something > > wrong with non-linear patterns (patterns where a variable appears > > multiple times, like `x' does here) combined with ... I'll take a > > look at it. > > > > If you could file a bug report with that example (see the "Submit Bug > > Report" entry under the Help menu) that would be great. > > > > Thanks, > > -- > > > > > > sam th > > samth@ccs.neu.edu > > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- sam th samth@ccs.neu.edu From tim at johnsons-web.com Tue May 13 18:06:33 2008 From: tim at johnsons-web.com (Tim Johnson) Date: Thu Mar 26 02:18:27 2009 Subject: [plt-scheme] Recommend Scheme for Reasoned Schemer Message-ID: <200805131406.34094.tim@johnsons-web.com> Hi: I'm using linux - kubuntu 7.10 (2.6.22-14), emacs 22.1.1, I'm new to scheme but am an experience programmer and have some familiarity with some lispish languages (elisp, newlisp). I've looked at quack and it's quite appealing to me. would use it with scheme of choice. I would welcome recommendations for a scheme implementation to use to follow along with the "Reasoned Schemer" book. I have already downloaded the kanren-book package which has the code modules for the book. mzscheme seems like a reasonable choice. Any opinions? TIA Tim From filcab at gmail.com Tue May 13 19:17:01 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:27 2009 Subject: [plt-scheme] [R6RS] syntax-rules woes Message-ID: <910F66AC-7EA7-4FB5-8CC5-BF4D4866D10E@gmail.com> Hi, I'm writing a macro that can be distilled to the following form: (define-syntax a (syntax-rules (-) [(a b ... - c - . d) (list b ... c 'd)])) When I try to use it with an empty 'd, it works: > (a 1 2 3 - 42 -) {1 2 3 42 ()} But, if I try to put something after the last '-, it says it's bad syntax: > (a 1 2 3 - 42 - 1 2 3 4) a: bad syntax in: (a 1 2 3 - 42 - 1 2 3 4) From the R6RS standard, I think it should match: ? P is of the form (P1 ... Pk Pe Pm+1 ... Pn . Px), where is the identifier ... and F is a list or improper list of n elements whose first k elements match P1 through Pk, whose next m - k elements each matchPe, whose next n - m elements match Pm+1 through Pn, and whose nth and final cdr matches Px. Is this a bug or am I missing something? Thanks for the help, - Filipe Cabecinhas From mflatt at cs.utah.edu Tue May 13 19:45:29 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:28 2009 Subject: [plt-scheme] [R6RS] syntax-rules woes In-Reply-To: <910F66AC-7EA7-4FB5-8CC5-BF4D4866D10E@gmail.com> References: <910F66AC-7EA7-4FB5-8CC5-BF4D4866D10E@gmail.com> Message-ID: <20080513234530.B90C26500BD@mail-svr1.cs.utah.edu> At Wed, 14 May 2008 00:17:01 +0100, Filipe Cabecinhas wrote: > Hi, > > I'm writing a macro that can be distilled to the following form: > (define-syntax a > (syntax-rules (-) > [(a b ... - c - . d) > (list b ... c 'd)])) > > When I try to use it with an empty 'd, it works: > > (a 1 2 3 - 42 -) > {1 2 3 42 ()} > > But, if I try to put something after the last '-, it says it's bad > syntax: > > (a 1 2 3 - 42 - 1 2 3 4) > a: bad syntax in: (a 1 2 3 - 42 - 1 2 3 4) > > From the R6RS standard, I think it should match: > ? P is of the form (P1 ... Pk Pe Pm+1 ... Pn . Px), where > is the identifier ... and F is a list or improper list of n > elements whose first k elements match P1 through Pk, whose next m - k > elements each matchPe, whose next n - m elements match Pm+1 through > Pn, and whose nth and final cdr matches Px. > > > Is this a bug or am I missing something? "nth and final" means that the part matching `Px' cannot be a pair. Matthew From grettke at acm.org Tue May 13 20:20:07 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:28 2009 Subject: [plt-scheme] Recommend Scheme for Reasoned Schemer In-Reply-To: <200805131406.34094.tim@johnsons-web.com> References: <200805131406.34094.tim@johnsons-web.com> Message-ID: <756daca50805131720x1789dc71re78960e948c0b3a5@mail.gmail.com> > I've looked at quack and it's quite appealing to me. would use it with > scheme of choice. > > I would welcome recommendations for a scheme implementation to use to > follow along with the "Reasoned Schemer" book. > > I have already downloaded the kanren-book package which has the > code modules for the book. > > mzscheme seems like a reasonable choice. > > Any opinions? >From what I understand Quack has quite good support for working with PLT scheme, and since you are posting to the PLT discussion list, you won't be surprised for me to say that mzscheme is a good choice. From tim at johnsons-web.com Tue May 13 20:42:17 2008 From: tim at johnsons-web.com (Tim Johnson) Date: Thu Mar 26 02:18:28 2009 Subject: [plt-scheme] Recommend Scheme for Reasoned Schemer In-Reply-To: <756daca50805131720x1789dc71re78960e948c0b3a5@mail.gmail.com> References: <200805131406.34094.tim@johnsons-web.com> <756daca50805131720x1789dc71re78960e948c0b3a5@mail.gmail.com> Message-ID: <200805131642.17810.tim@johnsons-web.com> On Tuesday 13 May 2008, Grant Rettke wrote: > > I've looked at quack and it's quite appealing to me. would use it with > > scheme of choice. > > > > I would welcome recommendations for a scheme implementation to use to > > follow along with the "Reasoned Schemer" book. > > > > I have already downloaded the kanren-book package which has the > > code modules for the book. > > > > mzscheme seems like a reasonable choice. > > > > Any opinions? > > > >From what I understand Quack has quite good support for working with > > PLT scheme, and since you are posting to the PLT discussion list, you > won't be surprised for me to say that mzscheme is a good choice. That's funny! I completely overlooked what ML I was posting to. anyway, I've installed mzscheme and quack and they seem to be working out of the box. thanks Tim """ Programmers shouldn't multi-task. """ From neil at neilvandyke.org Tue May 13 20:42:39 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:18:28 2009 Subject: [plt-scheme] Recommend Scheme for Reasoned Schemer In-Reply-To: <756daca50805131720x1789dc71re78960e948c0b3a5@mail.gmail.com> References: <200805131406.34094.tim@johnsons-web.com> <756daca50805131720x1789dc71re78960e948c0b3a5@mail.gmail.com> Message-ID: <482A357F.3050009@neilvandyke.org> I would use PLT Scheme (MzScheme) for this. I'd also take the opportunity of working through this book to try using DrScheme rather than Emacs. (Besides the fact that DrScheme has better tools, the extra disorientation of using something other than Emacs might be beneficial in itself. In my experience thus far, good form in Scheme is substantially different than expert common practice in most other Lisps.) -- http://www.neilvandyke.org/ From tim at johnsons-web.com Tue May 13 22:01:07 2008 From: tim at johnsons-web.com (Tim Johnson) Date: Thu Mar 26 02:18:29 2009 Subject: [plt-scheme] Recommend Scheme for Reasoned Schemer In-Reply-To: <482A357F.3050009@neilvandyke.org> References: <200805131406.34094.tim@johnsons-web.com> <756daca50805131720x1789dc71re78960e948c0b3a5@mail.gmail.com> <482A357F.3050009@neilvandyke.org> Message-ID: <200805131801.07861.tim@johnsons-web.com> On Tuesday 13 May 2008, Neil Van Dyke wrote: > I would use PLT Scheme (MzScheme) for this. > > I'd also take the opportunity of working through this book to try using > DrScheme rather than Emacs. (Besides the fact that DrScheme has better > tools, the extra disorientation of using something other than Emacs > might be beneficial in itself. In my experience thus far, good form in > Scheme is substantially different than expert common practice in most > other Lisps.) I'll give it a try. thanks tim From filcab at gmail.com Wed May 14 03:17:34 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:29 2009 Subject: [plt-scheme] [R6RS] syntax-rules woes In-Reply-To: <20080513234530.B90C26500BD@mail-svr1.cs.utah.edu> References: <910F66AC-7EA7-4FB5-8CC5-BF4D4866D10E@gmail.com> <20080513234530.B90C26500BD@mail-svr1.cs.utah.edu> Message-ID: <19307CF4-9E43-4D8A-8730-62E9A6F3D7BB@gmail.com> Hi Matthew, On 14 May, 2008, at 00:45, Matthew Flatt wrote: > > "nth and final" means that the part matching `Px' cannot be a pair. So that's what I missed. Sorry for bothering you, I guess I'll itertate through the list, collecting the things I want. - Filipe Cabecinhas From yinso.chen at gmail.com Wed May 14 03:45:25 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:18:29 2009 Subject: [plt-scheme] Re: HTTP library for PLT Scheme? In-Reply-To: <4828DF0E.3060708@neilvandyke.org> References: <4828DF0E.3060708@neilvandyke.org> Message-ID: <779bf2730805140045u6200f398vd638b954cb901bbb@mail.gmail.com> On Mon, May 12, 2008 at 5:21 PM, Neil Van Dyke wrote: > > (I wish I had a client who could fund all-new Scheme HTTP libraries. > Based on what I've learned from PLT and my own libraries, there's better > ways of doing pretty much everything.) > Neil - Would you be interested in share your thoughts on the better ways? I would love to hear about them. Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080514/c7501340/attachment.html From spdegabrielle at gmail.com Wed May 14 05:39:30 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:18:30 2009 Subject: [plt-scheme] Re: split window & keybindings In-Reply-To: <595b9ab20805080116r10d43ccfva97325e70d5bdcc5@mail.gmail.com> References: <595b9ab20805080116r10d43ccfva97325e70d5bdcc5@mail.gmail.com> Message-ID: <595b9ab20805140239h70195700tc82181a540edcb20@mail.gmail.com> Ah ha! selecting the preference "*Put the interactions window beside the definitions window*" (in editing) also splits sideways. (even when not using the interactions window) S. On Thu, May 8, 2008 at 9:16 AM, Stephen De Gabrielle < spdegabrielle@gmail.com> wrote: > Hi, > > 1. Is it possible to split the drscheme editing window vertically and > horizontally? I seem to remember a preference setting but I can't find > it in DS or in the Docs. > > 2. can the (define ...) button be accessed by the keyboard, or is it > mouse only? (ditto for the file/path browser button) > > > Cheers, > > Stephen > -- Cheers, Stephen -- Stephen De Gabrielle s.degabrielle@cs.ucl.ac.uk Telephone +44 (0)20 7679 0693 (x30693) Mobile 079 851 890 45 Project: Making Sense of Information (MaSI) http://www.uclic.ucl.ac.uk/annb/MaSI.html UCL Interaction Centre MPEB 8th floor University College London Gower Street London WC1E 6BT -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080514/4bc3589c/attachment.htm From dyoo at csmail.wpi.edu Mon May 12 17:20:51 2008 From: dyoo at csmail.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:30 2009 Subject: [plt-scheme] bugs.plt-scheme.org is down? Message-ID: I'm having trouble submitting the following bug; is bugs.plt-scheme.org down? The following simplified program raises a very bad error message under 3.99: -------------------------------------------------------- #lang scheme/base (require scheme/contract) (provide/contract [foo (case-> (number? . -> . any))]) (define (foo x) (* x x)) -------------------------------------------------------- I'm seeing: map: expects type as 2nd argument, given: #f; other arguments were: # The bug seems related to the use of 'any' within a case-> contract. From robby at cs.uchicago.edu Wed May 14 07:40:30 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:30 2009 Subject: [plt-scheme] Re: split window & keybindings In-Reply-To: <595b9ab20805140239h70195700tc82181a540edcb20@mail.gmail.com> References: <595b9ab20805080116r10d43ccfva97325e70d5bdcc5@mail.gmail.com> <595b9ab20805140239h70195700tc82181a540edcb20@mail.gmail.com> Message-ID: <932b2f1f0805140440w2f854de8wb745c949a6a8f6df@mail.gmail.com> The define button can only be accessed by the mouse, I believe. Robby On Wed, May 14, 2008 at 4:39 AM, Stephen De Gabrielle wrote: > Ah ha! > > selecting the preference "Put the interactions window beside the definitions > window" (in editing) also splits sideways. (even when not using the > interactions window) > > S. > > On Thu, May 8, 2008 at 9:16 AM, Stephen De Gabrielle > wrote: >> >> Hi, >> >> 1. Is it possible to split the drscheme editing window vertically and >> horizontally? I seem to remember a preference setting but I can't find >> it in DS or in the Docs. >> >> 2. can the (define ...) button be accessed by the keyboard, or is it >> mouse only? (ditto for the file/path browser button) >> >> >> Cheers, >> >> Stephen > > > > -- > Cheers, > > Stephen > > -- > Stephen De Gabrielle > s.degabrielle@cs.ucl.ac.uk > Telephone +44 (0)20 7679 0693 (x30693) > Mobile 079 851 890 45 > Project: Making Sense of Information (MaSI) > http://www.uclic.ucl.ac.uk/annb/MaSI.html > > UCL Interaction Centre > MPEB 8th floor > University College London > Gower Street > London WC1E 6BT > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From robby at cs.uchicago.edu Wed May 14 07:46:56 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:31 2009 Subject: [plt-scheme] bugs.plt-scheme.org is down? In-Reply-To: References: Message-ID: <932b2f1f0805140446h3ec5c409u8150a2d9cbcdcb1b@mail.gmail.com> That's fixed now. Thanks for the report. Robby On Mon, May 12, 2008 at 4:20 PM, Danny Yoo wrote: > I'm having trouble submitting the following bug; is bugs.plt-scheme.org > down? > > > The following simplified program raises a very bad error message under 3.99: > > -------------------------------------------------------- > #lang scheme/base > (require scheme/contract) > (provide/contract [foo (case-> (number? . -> . any))]) > (define (foo x) > (* x x)) > -------------------------------------------------------- > > > I'm seeing: > > map: expects type as 2nd argument, given: #f; other arguments > were: # > > > The bug seems related to the use of 'any' within a case-> contract. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From filcab at gmail.com Wed May 14 07:47:48 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:18:31 2009 Subject: [plt-scheme] load non-exported symbols from a file Message-ID: <7E1CC533-ED16-41C3-9440-3A41C98E96D0@gmail.com> Hi, Is it possible to load every defined symbol from an R6RS program so I can use use them to do some tests? I have to deliver an R6RS program (one file) but I would like to test my functions without putting all the tests in the deliverable. I can use mzscheme to make the tests (I'm using it already) but I can't load or require it and have the symbols defined. Right now I'm making the program a library and exporting the symbols but I must deliver an R6RS program and not a library. Is there a way to do this? Thanks for the help, - Filipe Cabecinhas From mflatt at cs.utah.edu Wed May 14 08:28:42 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:31 2009 Subject: [plt-scheme] load non-exported symbols from a file In-Reply-To: <7E1CC533-ED16-41C3-9440-3A41C98E96D0@gmail.com> References: <7E1CC533-ED16-41C3-9440-3A41C98E96D0@gmail.com> Message-ID: <20080514122846.21A606500BD@mail-svr1.cs.utah.edu> At Wed, 14 May 2008 12:47:48 +0100, Filipe Cabecinhas wrote: > Is it possible to load every defined symbol from an R6RS program so I > can use use them to do some tests? An R6RS program is a PLT Scheme module, so you can use reflection operations like `module->namespace' to get inside the program. For example, if "ex.ss" contains #!r6rs (import (rnrs)) (define one 1) (define two 2) then > (require "ex.ss") > (define ns (module->namespace "ex.ss")) > (eval 'one ns) 1 > (eval 'two ns) 2 Matthew From mflatt at cs.utah.edu Wed May 14 11:46:31 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:31 2009 Subject: [plt-scheme] v4.0 reference documentation complete Message-ID: <20080514154632.2782F6500BE@mail-svr1.cs.utah.edu> In the process of porting and writing documentation for version 4.0, we recently reached a milestone: all of the reference documentation is now in place! Special thanks to the following individuals who helped port old documentation: Yavuz Arkun, Filipe Cabecinhas, Richard Cleis, Will Farr, Geoff Knauth, Grant Rettke, David Van Horn, Doug Williams, and Danny Yoo. As you can see from http://www.cs.utah.edu/~mflatt/tmp/doc-to-do.txt many helped by porting multiple "doc.txt" files to Scribble format. We still have plenty of work to do on documentation. Notably, "Guide" still has many empty sections, and "Teach Yourself Scheme in Fixnum Days" is a temporary casualty of the conversion. (Chapters 1-2 of "Guide" cover some of the same material as "TYSiFD", but nowhere near all.) Actually, the overview and tutorial material will never be finished, because there's always more to write and always parts to improve. But the reference material is now "finished" in the sense that you shouldn't have to fall back on v372 documentation. Meanwhile, we're working on better searching support within the browser. Stay tuned... Matthew From grettke at acm.org Wed May 14 14:50:56 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:31 2009 Subject: [plt-scheme] Re: split window & keybindings In-Reply-To: <595b9ab20805140239h70195700tc82181a540edcb20@mail.gmail.com> References: <595b9ab20805080116r10d43ccfva97325e70d5bdcc5@mail.gmail.com> <595b9ab20805140239h70195700tc82181a540edcb20@mail.gmail.com> Message-ID: <756daca50805141150x3715b5f1wf29c4338b8c69800@mail.gmail.com> > selecting the preference "Put the interactions window beside the definitions > window" (in editing) also splits sideways. (even when not using the > interactions window) That is pretty neat. While I'm not sure why I would use it right now, well, now I know that I can! :) From grettke at acm.org Wed May 14 17:30:23 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:31 2009 Subject: [plt-scheme] What are syntax-case pattern variables? Message-ID: <756daca50805141430i7b2e241eh4401370da3edb250@mail.gmail.com> Hi folks, syntax-case takes a syntax object as an argument and destructures it via pattern matching into pattern variables. What are pattern variables composed of? syntax takes a template, and the pattern variables in it, to produce a syntax object that has the same lexical scoping as that of the pattern variable, so where does that lexical scope get stored? Best wishes, Grant Rettke From ryanc at ccs.neu.edu Wed May 14 19:40:33 2008 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Thu Mar 26 02:18:31 2009 Subject: [plt-scheme] What are syntax-case pattern variables? In-Reply-To: <756daca50805141430i7b2e241eh4401370da3edb250@mail.gmail.com> References: <756daca50805141430i7b2e241eh4401370da3edb250@mail.gmail.com> Message-ID: <482B7871.7020705@ccs.neu.edu> Grant Rettke wrote: > Hi folks, > > syntax-case takes a syntax object as an argument and destructures it > via pattern matching into pattern variables. > > What are pattern variables composed of? > > syntax takes a template, and the pattern variables in it, to produce a > syntax object that has the same lexical scoping as that of the pattern > variable, so where does that lexical scope get stored? The short answer is that syntax objects store scoping information and that pattern variables have nothing to do with it. Here's a longer answer: A pattern variable is essentially bound to an ellipsis-depth n and syntax object(s). If the pattern variable doesn't have ellipses after it, then n is 0 and the pattern variable refers to a single syntax object. If it has one ellipsis after it, then n is 1 and there is a list of syntax objects. And so forth. The 'syntax' form is like 'quasiquote', except that there is no explicit 'unquote'; rather, pattern variables are automatically substituted, and the rest of the template becomes syntax object literals (via 'quote-syntax') that remember the bindings in scope where they occurred. So pattern variables, while convenient, are not necessary for writing macros. You could do just the same with 'quote-syntax', 'syntax-e', 'datum->syntax', 'car', etc. Lexical scoping is managed by the syntax objects. The macro arguments already have their lexical contexts embedded in them, and that is preserved as the macro takes them apart and puts them together with new syntax. This new syntax mostly comes from syntax literals. The essence of the algorithm is explained in "Syntactic Abstraction in Scheme" by Dybvig et al. Ryan > > Best wishes, > > Grant Rettke > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From jos.koot at telefonica.net Wed May 14 20:33:59 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:32 2009 Subject: [plt-scheme] What are syntax-case pattern variables? References: <756daca50805141430i7b2e241eh4401370da3edb250@mail.gmail.com> Message-ID: <001101c8b623$5e6f6b50$2101a8c0@uw2b2dff239c4d> Pattern variables may look somewhat mystically, because their scope is for the templates, independently from the scope of normal variables. However, trying check syntax on a number of examples may clarify a lot. It did for me. Just follow the arrows. You may also want to play with compilation time variables and pattern variables of the same name. It is instructive I think (: it was for me :) They live in separate worlds. Of course this does not answer your question in detail. I don't know how things are implemented. I am curious, but for usage the behaviour is more important than the details of the implementation, I think. Jos ----- Original Message ----- From: "Grant Rettke" To: "PLT Scheme List" Sent: Wednesday, May 14, 2008 11:30 PM Subject: [plt-scheme] What are syntax-case pattern variables? > Hi folks, > > syntax-case takes a syntax object as an argument and destructures it > via pattern matching into pattern variables. > > What are pattern variables composed of? > > syntax takes a template, and the pattern variables in it, to produce a > syntax object that has the same lexical scoping as that of the pattern > variable, so where does that lexical scope get stored? > > Best wishes, > > Grant Rettke > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From zen1986 at gmail.com Wed May 14 21:19:11 2008 From: zen1986 at gmail.com (zen1986@gmail.com) Date: Thu Mar 26 02:18:32 2009 Subject: [plt-scheme] How to crop images? Message-ID: Hi everyone, I am doing a board game and want to put arbitrary background to arbitrary tile shapes. I have tried using bitmap. but it seems it can only create a rectangular background, while I want arbitrary shape, say triangle, hexagon.. So I wonder if I can get any help here. From robby at cs.uchicago.edu Wed May 14 21:30:33 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:32 2009 Subject: [plt-scheme] How to crop images? In-Reply-To: References: Message-ID: <932b2f1f0805141830i734c77bdncb5e111e5f26ff51@mail.gmail.com> One way would be to make a mask bitmap and use that mask with the bitmap. Another way to make a clipping region and set it on the dc before you call draw-bitmap. Here's how to set the clipping region (this is v4 code -- I think it will run in 372 without the #lang line, tho) #lang scheme/gui (define bm (make-object bitmap% (build-path (collection-path "icons") "plt.jpg"))) (define (draw dc) (let ([old-clip (send dc get-clipping-region)] [new-clip (new region% [dc dc])]) (send new-clip set-rounded-rectangle 80 80 100 100) (send dc set-clipping-region new-clip) (send dc draw-bitmap bm 0 0) (send dc set-clipping-region old-clip))) (define f (new frame% [label ""])) (define c (new canvas% [parent f] [paint-callback (? (c dc) (draw dc))] [min-width (send bm get-width)] [min-height (send bm get-height)])) (send f show #t) Robby On Wed, May 14, 2008 at 8:19 PM, zen1986@gmail.com wrote: > Hi everyone, > I am doing a board game and want to put arbitrary background to > arbitrary tile shapes. > I have tried using bitmap. but it seems it can only create a > rectangular background, while I want arbitrary shape, say triangle, > hexagon.. > So I wonder if I can get any help here. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From dekudekuplex at yahoo.com Thu May 15 06:14:38 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:32 2009 Subject: [plt-scheme] updated version of plai-371.plt for DrScheme, version 3.99.0.25-svn11may2008, english? Message-ID: <36504.13769.qm@web30208.mail.mud.yahoo.com> This question was sent to Shriram Krishnamurthi two days ago, but apparently either he is too busy right now to respond, or it has gotten lost, so I am sending this question to the plt-scheme mailing list. I would like to use the new interface of DrScheme, version 3.99.0.25-svn11may2008, english, with PLAI, but the old plai-371.plt file at http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/plai-371.plt won't install. Is there an updated version of plai-371.plt that will install in DrScheme, version 3.99.0.25-svn11may2008, english, and if so, from where can I download it? Benjamin L. Russell > I would like to use the new interface of DrScheme, version > 3.99.0.25-svn11may2008, english, with PLAI, but your old > plai-371.plt file at > http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/plai-371.plt > won't install. > > Do you have an updated version of plai-371.plt that will > install in DrScheme, version 3.99.0.25-svn11may2008, > english? > > (On an unrelated note, yes, I do read personal Web sites in > some detail, and yes, ?parens rock?!) > > Benjamin L. Russell From ibarland at RADFORD.EDU Fri May 16 10:34:04 2008 From: ibarland at RADFORD.EDU (Barland, Ian) Date: Thu Mar 26 02:18:33 2009 Subject: [plt-scheme] How to set file permissions (chmod) for linux/OSX? In-Reply-To: <20080515160011.512AB40291@qua.cs.brown.edu> Message-ID: Hi -- How do I do a `chmod` from within mzscheme, for programs running on OSX? (If I need to make an ffi call to 'system', any hints on exactly which lib-ffi I need to load?) Thanks in advance, --Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080516/6050f6ab/attachment.html From eli at barzilay.org Fri May 16 10:58:26 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:33 2009 Subject: [plt-scheme] How to set file permissions (chmod) for linux/OSX? In-Reply-To: References: <20080515160011.512AB40291@qua.cs.brown.edu> Message-ID: <18477.41234.47569.646795@arabic.ccs.neu.edu> On May 16, Barland, Ian wrote: > Hi -- > How do I do a `chmod` from within mzscheme, for programs running on > OSX? There's no way to change the permissions (yet?). > (If I need to make an ffi call to 'system', any hints on exactly > which lib-ffi I need to load?) That's easy: #lang scheme (require (lib "foreign.ss")) (unsafe!) (define chmod (get-ffi-obj "chmod" #f (_fun _path _int -> _void))) (chmod "some-path" #o644) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From tom at zwizwa.be Sun May 18 07:12:37 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:18:33 2009 Subject: [plt-scheme] FUSE bindings (userspace filesystem) Message-ID: <20080518111237.GA13414@zzz.i> Hello, Are the FUSE bindings by John Kozak still available somewhere? The link from this post seems to be dead: http://www.cs.brown.edu/pipermail/plt-scheme/2004-March/004835.html Cheers Tom From toddobryan at gmail.com Sun May 18 10:10:05 2008 From: toddobryan at gmail.com (Todd O'Bryan) Date: Thu Mar 26 02:18:33 2009 Subject: [plt-scheme] compile error for OpenGL Message-ID: <904774730805180710i6e767591n2f24185c8a6bf9c7@mail.gmail.com> I'm getting this error when I try to make install version 372. I'm probably just missing a library, but heck if I know which one. :-) setup-plt: Error during Compiling .zos for Gobblet (/opt/plt/lib/plt/collects/games/gobblet) setup-plt: default-load-handler: cannot open input file: "/opt/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: Error during Compiling .zos for sgl (/opt/plt/lib/plt/collects/sgl) setup-plt: default-load-handler: cannot open input file: "/opt/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) Any help appreciated, Todd From eli at barzilay.org Sun May 18 10:15:18 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:34 2009 Subject: [plt-scheme] compile error for OpenGL In-Reply-To: <904774730805180710i6e767591n2f24185c8a6bf9c7@mail.gmail.com> References: <904774730805180710i6e767591n2f24185c8a6bf9c7@mail.gmail.com> Message-ID: <18480.14838.813960.101764@arabic.ccs.neu.edu> On May 18, Todd O'Bryan wrote: > I'm getting this error when I try to make install version 372. I'm > probably just missing a library, but heck if I know which one. :-) > > setup-plt: Error during Compiling .zos for Gobblet > (/opt/plt/lib/plt/collects/games/gobblet) > setup-plt: default-load-handler: cannot open input file: > "/opt/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; > errno=2) You're probably missing the GL libraries. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From sk at cs.brown.edu Sun May 18 21:08:48 2008 From: sk at cs.brown.edu (Shriram Krishnamurthi) Date: Thu Mar 26 02:18:34 2009 Subject: [plt-scheme] updated version of plai-371.plt for DrScheme, version 3.99.0.25-svn11may2008, english? In-Reply-To: <36504.13769.qm@web30208.mail.mud.yahoo.com> References: <36504.13769.qm@web30208.mail.mud.yahoo.com> Message-ID: We're going to have a new release out at the beginning of June. [Arjun and I were both away from non-critical email for a few days, sorry.] Shriram On Thu, May 15, 2008 at 5:14 AM, Benjamin L. Russell wrote: > This question was sent to Shriram Krishnamurthi two days ago, but apparently either he is too busy right now to respond, or it has gotten lost, so I am sending this question to the plt-scheme mailing list. > > I would like to use the new interface of DrScheme, version 3.99.0.25-svn11may2008, english, with PLAI, but the old plai-371.plt file at http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/plai-371.plt won't install. > > Is there an updated version of plai-371.plt that will install in DrScheme, version 3.99.0.25-svn11may2008, english, and if so, from where can I download it? > > Benjamin L. Russell > >> I would like to use the new interface of DrScheme, version >> 3.99.0.25-svn11may2008, english, with PLAI, but your old >> plai-371.plt file at >> http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/plai-371.plt >> won't install. >> >> Do you have an updated version of plai-371.plt that will >> install in DrScheme, version 3.99.0.25-svn11may2008, >> english? >> >> (On an unrelated note, yes, I do read personal Web sites in >> some detail, and yes, "parens rock"!) >> >> Benjamin L. Russell > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From robert.matovinovic at web.de Tue May 20 14:14:38 2008 From: robert.matovinovic at web.de (Robert Matovinovic) Date: Thu Mar 26 02:18:34 2009 Subject: [plt-scheme] word completion for module based languages Message-ID: <082023BF95B0478899AA1CFF45482A4A@IBMI> Hi, I currently use DrScheme, version 3.99.0.25-svn17may2008 on Windows XP to add documentation for a module based language which I implemented as a tool. I started with a simple example using my own modules. The F1 shortcut to get the relevant docs for an item from within the DrScheme window works fine. But is there a possibility to get only the help documents for the current language? The other point is word completion. I only get word completion in Pretty Big or R5RS however I do not get my own definitions as choices. With my own language I don't get any word completions at all (... no completions available). What am I doing wrong? I already asked that some months ago and assume the feature is built in now. I also found that for my language I want to hide the module paths in the documentation, because I don't want to bother the user with such details. But omitting the @defmodule declaration underlines every definition red. It is a minor problem, but perhaps there is a solution I don't know yet. Another point just for information. I downloaded the pre-release exe and installed it without problem. But pressing F1 in DrScheme always raised an error, that the path .../doc/handin-server/out.sxref doesn't exist. Well, that was true. The handin-server documentation will be installed in the user environment but it wasn't. Could it be that it wasn't installed because I have my programs on C: but my documents and settings folder on D:? I just deleted the scribblings flag which was set to user-doc in the info.ss and let run setup-plt. Now it works fine. But may be there are implications I don't know about. Finally I agree with others about the new look and smaller icons of the IDE, I like them. Robert _________________________________________ Robert Matovinovic Wintererstr. 61 79104 Freiburg Germany Tel: +49 (0)761 51 93 544 Cell: +49 (0)171 56 32 330 email: robert.matovinovic@web.de From eli at barzilay.org Tue May 20 20:53:39 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:34 2009 Subject: [plt-scheme] word completion for module based languages In-Reply-To: <082023BF95B0478899AA1CFF45482A4A@IBMI> References: <082023BF95B0478899AA1CFF45482A4A@IBMI> Message-ID: <18483.29331.467649.47407@arabic.ccs.neu.edu> On May 20, Robert Matovinovic wrote: > I currently use DrScheme, version 3.99.0.25-svn17may2008 on Windows > XP to add documentation for a module based language which I > implemented as a tool. I started with a simple example using my own > modules. The F1 shortcut to get the relevant docs for an item from > within the DrScheme window works fine. But is there a possibility > to get only the help documents for the current language? It might be possible to do, I'm not sure about the kind of information that DrScheme has when it starts a help search. (FWIW, the `help' form (in mzscheme) finds the right place for any binding.) (Skipping other issues that I cannot provide a helpful reply...) > Another point just for information. I downloaded the pre-release exe > and installed it without problem. But pressing F1 in DrScheme always > raised an error, that the path .../doc/handin-server/out.sxref > doesn't exist. Yes, that's a known problem. I'm currently working on a solution. (The reason that it takes time is that it is part of a bigger problem regarding the html documentation.) > Well, that was true. The handin-server documentation will be > installed in the user environment but it wasn't. Could it be that it > wasn't installed because I have my programs on C: but my documents > and settings folder on D:? No. The problem is that the handin-server documents are just not included in the distribution (they cannot be included, since they're in a user directory). > I just deleted the scribblings flag which was set to user-doc in the > info.ss and let run setup-plt. Now it works fine. But may be there > are implications I don't know about. Even if you didn't remove it, running setup-plt would have generated the docs (in your user directory), so things would be fine. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at cs.uchicago.edu Tue May 20 21:15:26 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:34 2009 Subject: [plt-scheme] word completion for module based languages In-Reply-To: <18483.29331.467649.47407@arabic.ccs.neu.edu> References: <082023BF95B0478899AA1CFF45482A4A@IBMI> <18483.29331.467649.47407@arabic.ccs.neu.edu> Message-ID: <932b2f1f0805201815j4c0f4104v964a2176c2710270@mail.gmail.com> On Tue, May 20, 2008 at 7:53 PM, Eli Barzilay wrote: > On May 20, Robert Matovinovic wrote: >> I currently use DrScheme, version 3.99.0.25-svn17may2008 on Windows >> XP to add documentation for a module based language which I >> implemented as a tool. I started with a simple example using my own >> modules. The F1 shortcut to get the relevant docs for an item from >> within the DrScheme window works fine. But is there a possibility >> to get only the help documents for the current language? > > It might be possible to do, I'm not sure about the kind of information > that DrScheme has when it starts a help search. (FWIW, the `help' > form (in mzscheme) finds the right place for any binding.) > > (Skipping other issues that I cannot provide a helpful reply...) DrScheme used to be able to do that and I believe it will be able to do that again in the future. I believe Eli and I have discussed this, so I'm a little surprised by his reply, but one way or the other, we should have that capability back before v4.0. As far as word completion goes, it currently does not consider the buffer where you're editing. Others have asked for that too, so I hope to get to it at some point. Robby From steve at localtoast.org Tue May 20 23:00:44 2008 From: steve at localtoast.org (Stephen Wrobleski) Date: Thu Mar 26 02:18:35 2009 Subject: [plt-scheme] r6rs eval + phases + exceptions Message-ID: <20080521030044.GA9476@localhost> Hi, I have a a bit of a problem with values getting passed between phases. I'm calling r6rs:eval on an expression that may throw arbitrary exceptions in a syntax expander. As such, a value from phase 1 (of the eval) has now escaped into phase 0 of the running program. I would like to programmatically test for these exceptions, but of course none of my phase 0 predicates work because they're from a different instantiation. (Actually the r6rs condition library predicates don't work either, so r6rs:simple-conditions ends up mangling the exception) I can still test for exn:fail. It seems that exn:fail must have the same identity across phases, since it's part of the core implementation. Reading the documentation about such things, I came across the following bit doc/reference/syntax-model.html: > When the expander encounters require and require-for-syntax within a > module context, the resulting visits and instantiations are specific to > the expansion of the enclosing module, and are kept separate from visits > and instantiations triggered from a top-level context or from the > expansion of a different module. I don't see how the above can be anything but completely false. I notice that the modules do get instantiated multiple times, but every use of the module uses the same instantiation (as it has to be for values retrieved by syntax-local-value to work). (Also, why _are_ modules instantiated so many times when required for-syntax (looking at their side effects) ?) The only workaround I've come up with is to pass the phase 1 exception back into eval and have a syntax expander pick it out and somehow turn it into the phase 0 representation of the same exception. This seems needlessly complex, and not generalized for the case of an exception thrown from phase 2 or higher. Is there a better solution? It seems there's a lot of flexibility in mzscheme's underlying namespaces. Could r6rs:environment be changed to eliminate this problem? Given that eval expands and then immediately executes code (with no possibility for independent compilation steps), it would make sense to me if any for-syntax includes just referenced already-existing phase 0 instantiations. Steve -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080520/347bbdcc/attachment.pgp From anton at appsolutions.com Wed May 21 02:02:54 2008 From: anton at appsolutions.com (Anton van Straaten) Date: Thu Mar 26 02:18:35 2009 Subject: [plt-scheme] Download kaput Message-ID: <4833BB0E.2020004@appsolutions.com> What's the status of the PLT download site? All I get is broken links. Anton From d.j.gurnell at gmail.com Wed May 21 02:59:06 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:18:36 2009 Subject: [plt-scheme] provide/contract Message-ID: <2382CA99-4DCC-44B8-9433-8F59C3130C00@gmail.com> With the new custom require and provide forms, is there a plan in the works to merge provide and provide/contract? It'd be quite useful to be able to do this: (define-struct person (name age)) (define (create-person name) (make-person name 0)) (provide (except-out (contract-out struct person ([name string?] [age number?])) make-person) (rename-out ((contract-out create-person (-> string? person?)) make-person))) I currently do this sort of thing with two modules: a private module defines and adds contracts to the structure type, while a public module does the renaming and hiding of the default constructor. -- Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080521/a07bcadc/attachment.html From ryanc at ccs.neu.edu Wed May 21 03:04:33 2008 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Thu Mar 26 02:18:36 2009 Subject: [plt-scheme] r6rs eval + phases + exceptions In-Reply-To: <20080521030044.GA9476@localhost> References: <20080521030044.GA9476@localhost> Message-ID: <4833C981.2040109@ccs.neu.edu> Stephen Wrobleski wrote: > Hi, > > I have a a bit of a problem with values getting passed between phases. I'm > calling r6rs:eval on an expression that may throw arbitrary exceptions in a > syntax expander. As such, a value from phase 1 (of the eval) has now escaped > into phase 0 of the running program. I would like to programmatically test > for these exceptions, but of course none of my phase 0 predicates work > because they're from a different instantiation. (Actually the r6rs condition > library predicates don't work either, so r6rs:simple-conditions ends up > mangling the exception) I don't have any pragmatic advice, but I've answered some of the questions about how things work and why they work that way. > I can still test for exn:fail. It seems that exn:fail must have the same > identity across phases, since it's part of the core implementation. That's right. Primitive structs like exn are shared across phases, but things defined in libraries (like R6RS conditions) are not. Prefab structs are, but you can't make prefab exception subtypes. > Reading the documentation about such things, I came across the following bit > > doc/reference/syntax-model.html: >> When the expander encounters require and require-for-syntax within a >> module context, the resulting visits and instantiations are specific to >> the expansion of the enclosing module, and are kept separate from visits >> and instantiations triggered from a top-level context or from the >> expansion of a different module. > > I don't see how the above can be anything but completely false. I notice > that the modules do get instantiated multiple times, but every use of the > module uses the same instantiation (as it has to be for values retrieved by > syntax-local-value to work). (Also, why _are_ modules instantiated so many > times when required for-syntax (looking at their side effects) ?) There are two reasons to visit or instantiate a module A: "for execution" and "for expansion of module B", where B depends on A. Let's call those "instantiation contexts". So if there are 12 modules in your program, there are 13 instantiation contexts: 12 during the compilation of your program, and one more when you run it. No two different ICs share module instantiations. But within an IC, a module is instantiated exactly once per phase that it's required for. If, during the compilation of B, module A is reachable by chasing requires in ten different ways, there's still a single instantiation of B (at phase 0). If it's reachable by chains of requires and just one require-for-syntax, it's instantiated again at phase 1, a separate instantiation from phase 0, but shared for all phase 1 references. And so on. The design rationale is explained in Matthew Flatt's "Composable and Compilable Macros: You Want It When?", ICFP '02. The system ensures that all compilation dependencies are explicitly accounted for, and that things don't accidentally work interactively and later fail in batch compilation. > The only workaround I've come up with is to pass the phase 1 exception back > into eval and have a syntax expander pick it out and somehow turn it into > the phase 0 representation of the same exception. This seems needlessly > complex, and not generalized for the case of an exception thrown from phase > 2 or higher. > > Is there a better solution? It seems there's a lot of flexibility in > mzscheme's underlying namespaces. Could r6rs:environment be changed to > eliminate this problem? Given that eval expands and then immediately > executes code (with no possibility for independent compilation steps), it > would make sense to me if any for-syntax includes just referenced > already-existing phase 0 instantiations. Perhaps the R6RS exn/condition system should be implemented with phase-crossing machinery. I'm not sure what the best way to do that would be, though. Ryan > > > Steve > > > ------------------------------------------------------------------------ > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robert.matovinovic at web.de Wed May 21 05:52:35 2008 From: robert.matovinovic at web.de (Robert Matovinovic) Date: Thu Mar 26 02:18:37 2009 Subject: AW: [plt-scheme] word completion for module based languages In-Reply-To: <932b2f1f0805201815j4c0f4104v964a2176c2710270@mail.gmail.com> Message-ID: Just to clarify, I don't ask for word completion of definitions in the editing buffer, but for a language or a language extension which is loaded by the language menu of DrScheme. My language supports an interface for another software which uses a scheme dialect and has a lot of extensions for programming that software. These numerous extensions have quiet long names, which are difficult to remember exactly. So I want to provide the word completion for them. Robert -----Urspr?ngliche Nachricht----- Von: plt-scheme-bounces@list.cs.brown.edu [mailto:plt-scheme-bounces@list.cs.brown.edu] Im Auftrag von Robby Findler Gesendet: Mittwoch, 21. Mai 2008 03:15 An: Eli Barzilay Cc: Robert Matovinovic; plt-scheme@list.cs.brown.edu Betreff: Re: [plt-scheme] word completion for module based languages On Tue, May 20, 2008 at 7:53 PM, Eli Barzilay wrote: > On May 20, Robert Matovinovic wrote: >> I currently use DrScheme, version 3.99.0.25-svn17may2008 on Windows >> XP to add documentation for a module based language which I >> implemented as a tool. I started with a simple example using my own >> modules. The F1 shortcut to get the relevant docs for an item from >> within the DrScheme window works fine. But is there a possibility to >> get only the help documents for the current language? > > It might be possible to do, I'm not sure about the kind of information > that DrScheme has when it starts a help search. (FWIW, the `help' > form (in mzscheme) finds the right place for any binding.) > > (Skipping other issues that I cannot provide a helpful reply...) DrScheme used to be able to do that and I believe it will be able to do that again in the future. I believe Eli and I have discussed this, so I'm a little surprised by his reply, but one way or the other, we should have that capability back before v4.0. As far as word completion goes, it currently does not consider the buffer where you're editing. Others have asked for that too, so I hope to get to it at some point. Robby _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme From matthias at ccs.neu.edu Wed May 21 07:26:53 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:37 2009 Subject: [plt-scheme] Download kaput In-Reply-To: <4833BB0E.2020004@appsolutions.com> References: <4833BB0E.2020004@appsolutions.com> Message-ID: Eli is moving the server from one machine to another. I thought he had announced the move on plt-scheme, but I see that it's on plt- internal only. Sorry for the miscomm -- Matthias On May 21, 2008, at 2:02 AM, Anton van Straaten wrote: > What's the status of the PLT download site? All I get is broken > links. > > Anton > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mflatt at cs.utah.edu Wed May 21 07:38:38 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:37 2009 Subject: [plt-scheme] word completion for module based languages In-Reply-To: <082023BF95B0478899AA1CFF45482A4A@IBMI> References: <082023BF95B0478899AA1CFF45482A4A@IBMI> Message-ID: <20080521113842.1F044650160@mail-svr1.cs.utah.edu> At Tue, 20 May 2008 20:14:38 +0200, "Robert Matovinovic" wrote: > I also found that for my language I want to hide the module paths in the > documentation, because I don't want to bother the user with such details. > But omitting the @defmodule declaration underlines every definition red. It > is a minor problem, but perhaps there is a solution I don't know yet. Use `declare-exporting' instead of `defmdoule'. It sets up the right module link so that definitions won't be in red, but it doesn't generated any typeset output. Matthew From eckhardnospam at gmx.de Wed May 21 07:39:50 2008 From: eckhardnospam at gmx.de (Eckhard Lehmann) Date: Thu Mar 26 02:18:37 2009 Subject: [plt-scheme] How to configure the PLT web server? Message-ID: <20080521113950.269170@gmx.net> Hi, Apparently, PLT Scheme comes with a webserver... But although I tried it a few times, I couldn't get it running or configured. Nor do I see anywhere what port it uses. I couldn't find any documentation about it either. Is there documentation on this thing? And where is the config file, if any exists? Thanks in advance Eckhard -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser From sk at cs.brown.edu Wed May 21 07:42:06 2008 From: sk at cs.brown.edu (Shriram Krishnamurthi) Date: Thu Mar 26 02:18:37 2009 Subject: [plt-scheme] How to configure the PLT web server? In-Reply-To: <20080521113950.269170@gmx.net> References: <20080521113950.269170@gmx.net> Message-ID: Can you tell us what you tried to get "get it running"? That would help. Thanks. On Wed, May 21, 2008 at 7:39 AM, Eckhard Lehmann wrote: > Hi, > > Apparently, PLT Scheme comes with a webserver... > But although I tried it a few times, I couldn't get it running or configured. Nor do I see anywhere what port it uses. I couldn't find any documentation about it either. > > Is there documentation on this thing? And where is the config file, if any exists? > > > Thanks in advance > Eckhard > -- > Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten > Browser-Versionen downloaden: http://www.gmx.net/de/go/browser > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From mflatt at cs.utah.edu Wed May 21 07:48:45 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:38 2009 Subject: [plt-scheme] r6rs eval + phases + exceptions In-Reply-To: <20080521030044.GA9476@localhost> References: <20080521030044.GA9476@localhost> Message-ID: <20080521114847.3978D65016B@mail-svr1.cs.utah.edu> At Tue, 20 May 2008 23:00:44 -0400, Stephen Wrobleski wrote: > I have a a bit of a problem with values getting passed between phases. I'm > calling r6rs:eval on an expression that may throw arbitrary exceptions in a > syntax expander. As such, a value from phase 1 (of the eval) has now escaped > into phase 0 of the running program. I would like to programmatically test > for these exceptions, but of course none of my phase 0 predicates work > because they're from a different instantiation. (Actually the r6rs condition > library predicates don't work either, so r6rs:simple-conditions ends up > mangling the exception) I think `eval' called from a phase 1 context should use phase 1 instances of modules, instead of phase 0 instances, which would avoid this cross-phase mismatch. The same problem shows up when trying to use `deserialize' within compile-time code. Unfortunately, I don't think this is going to be fixed in v4.0, because it will take some time to track down all the places in the code that assume top-level evaluation starts in phase 0. Hopefully we can fix it soon after the 4.0 release. Matthew From eckhardnospam at gmx.de Wed May 21 08:01:24 2008 From: eckhardnospam at gmx.de (Eckhard Lehmann) Date: Thu Mar 26 02:18:38 2009 Subject: [plt-scheme] How to configure the PLT web server? In-Reply-To: References: <20080521113950.269170@gmx.net> Message-ID: <20080521120124.97630@gmx.net> Double click in OS X and Windows... On OS X I get an error (suspect that it is due to permissions if the server tries to run on a port where I am not allowed to run it as normal user, e.g. 80) On Windows there is nothing after the double click - it either silently runs or silently fails... I don't know. How do I control that server? TIA Eckhard -------- Original-Nachricht -------- > Datum: Wed, 21 May 2008 07:42:06 -0400 > Von: "Shriram Krishnamurthi" > An: "Eckhard Lehmann" > CC: plt-scheme@list.cs.brown.edu > Betreff: Re: [plt-scheme] How to configure the PLT web server? > Can you tell us what you tried to get "get it running"? That would > help. Thanks. > > On Wed, May 21, 2008 at 7:39 AM, Eckhard Lehmann > wrote: > > Hi, > > > > Apparently, PLT Scheme comes with a webserver... > > But although I tried it a few times, I couldn't get it running or > configured. Nor do I see anywhere what port it uses. I couldn't find any > documentation about it either. > > > > Is there documentation on this thing? And where is the config file, if > any exists? > > > > > > Thanks in advance > > Eckhard > > -- > > Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten > > Browser-Versionen downloaden: http://www.gmx.net/de/go/browser > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser From matthias at ccs.neu.edu Wed May 21 08:43:36 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:38 2009 Subject: [plt-scheme] How to configure the PLT web server? In-Reply-To: <20080521120124.97630@gmx.net> References: <20080521113950.269170@gmx.net> <20080521120124.97630@gmx.net> Message-ID: Open a terminal. $ sudo ~/......./plt/bin/web-server Then navigate to the set-up page. Change defaults, restart. I recommend you open DrScheme, press F1, halfway down the screen you see Web Server: PLT HTTP Server (This assumes you're running svn. On 372, it slightly differs.) -- Matthias On May 21, 2008, at 8:01 AM, Eckhard Lehmann wrote: > > Double click in OS X and Windows... > > On OS X I get an error (suspect that it is due to permissions if > the server tries to run on a port where I am not allowed to run it > as normal user, e.g. 80) > On Windows there is nothing after the double click - it either > silently runs or silently fails... I don't know. > > How do I control that server? > > TIA > Eckhard > > > -------- Original-Nachricht -------- >> Datum: Wed, 21 May 2008 07:42:06 -0400 >> Von: "Shriram Krishnamurthi" >> An: "Eckhard Lehmann" >> CC: plt-scheme@list.cs.brown.edu >> Betreff: Re: [plt-scheme] How to configure the PLT web server? > >> Can you tell us what you tried to get "get it running"? That would >> help. Thanks. >> >> On Wed, May 21, 2008 at 7:39 AM, Eckhard Lehmann >> >> wrote: >>> Hi, >>> >>> Apparently, PLT Scheme comes with a webserver... >>> But although I tried it a few times, I couldn't get it running or >> configured. Nor do I see anywhere what port it uses. I couldn't >> find any >> documentation about it either. >>> >>> Is there documentation on this thing? And where is the config >>> file, if >> any exists? >>> >>> >>> Thanks in advance >>> Eckhard >>> -- >>> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten >>> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>> > > -- > Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten > Browser-Versionen downloaden: http://www.gmx.net/de/go/browser > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From eli at barzilay.org Wed May 21 08:51:22 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:38 2009 Subject: [plt-scheme] Download kaput In-Reply-To: References: <4833BB0E.2020004@appsolutions.com> Message-ID: <18484.6858.874407.806618@arabic.ccs.neu.edu> The downtime was supposed to be brief, at least for the web server... But then things got complicated[*]. I hope it will be up in about an hour. The bug server will take some more time though. ([*] If you arrange a meeting for me and whoever designed SELinux, and whoever implemented NetworkManager, in a closed room, I'll be very happy to go there with a 5kg hammer.) On May 21, Matthias Felleisen wrote: > > Eli is moving the server from one machine to another. I thought he > had announced the move on plt-scheme, but I see that it's on plt- > internal only. Sorry for the miscomm -- Matthias > > > On May 21, 2008, at 2:02 AM, Anton van Straaten wrote: > > > What's the status of the PLT download site? All I get is broken > > links. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From neil at neilvandyke.org Wed May 21 09:01:27 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:18:38 2009 Subject: [plt-scheme] Download kaput In-Reply-To: <18484.6858.874407.806618@arabic.ccs.neu.edu> References: <4833BB0E.2020004@appsolutions.com> <18484.6858.874407.806618@arabic.ccs.neu.edu> Message-ID: <48341D27.5000105@neilvandyke.org> I'm with you on NetworkManager being messy, and I'd try not to use it on servers. Regarding SELinux, that would be our friends at the NSA, who'll know about your new 5kg hammer before you leave the hardware store. Eli Barzilay wrote at 05/21/2008 08:51 AM: > ([*] If you arrange a meeting for me and whoever designed SELinux, and > whoever implemented NetworkManager, in a closed room, I'll be very > happy to go there with a 5kg hammer.) > From zen1986 at gmail.com Wed May 21 09:03:04 2008 From: zen1986 at gmail.com (zen1986@gmail.com) Date: Thu Mar 26 02:18:38 2009 Subject: [plt-scheme] region displayed after dc is scaled Message-ID: <938fd252-93c3-4f8e-b151-3d6b96b475d2@z24g2000prf.googlegroups.com> Hi everyone, I am using Mred to build some graphics. I encounter this problem: after My dc is scaled up, the top left region is always displayed. How can I make it show the center region? Is this a very silly question to ask? Please advice, thanks. From eli at barzilay.org Wed May 21 09:19:01 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:39 2009 Subject: [plt-scheme] Download kaput In-Reply-To: <48341D27.5000105@neilvandyke.org> References: <4833BB0E.2020004@appsolutions.com> <18484.6858.874407.806618@arabic.ccs.neu.edu> <48341D27.5000105@neilvandyke.org> Message-ID: <18484.8517.204544.451939@arabic.ccs.neu.edu> On May 21, Neil Van Dyke wrote: > I'm with you on NetworkManager being messy, and I'd try not to use > it on servers. Yes, I get the feeling that it's implemented by 12-year-olds who try hard to make it do the thing that other os is doing. The specific problem I had with it was that when the machine booted, the network came up fine (eg, pinging it worked), but when the NM comes up, the connection is lost. It took me two trips to the office to figure that out... > Regarding SELinux, that would be our friends at the NSA, who'll know > about your new 5kg hammer before you leave the hardware store. This one got me for the Nth time (where N=the number of Fedora distributions since it had SELinux). Every time I try to do the right thing, fight it for a while, and then reach a conclusion that it's a nasty piece of sh^Hoftware. Like the bright idea of using binary files so you must use the horrible GUI (which makes it just like dealing with a text file, but without the usual text tools), or like the lack of a one-page howto that makes it possible to tweak things that you need working, or the fact that it tends to blow things up in a really obscure way (one case of stupidity I had with it in the past: Apache had a problem starting up, and SELinux restricted it from writing things to the system log file) -- which results in a silly game of just-try-to-disable-selinux-when-things-go-bad-with-no- explanation. Perhaps a better target for my hammer is whoever thought of turning it on by default in Fedora, where most of the crowd is usually *not* dealing with top secret documents. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From anton at appsolutions.com Wed May 21 09:34:00 2008 From: anton at appsolutions.com (Anton van Straaten) Date: Thu Mar 26 02:18:39 2009 Subject: [plt-scheme] Download kaput In-Reply-To: <48341D27.5000105@neilvandyke.org> References: <4833BB0E.2020004@appsolutions.com> <18484.6858.874407.806618@arabic.ccs.neu.edu> <48341D27.5000105@neilvandyke.org> Message-ID: <483424C8.3090809@appsolutions.com> Neil Van Dyke wrote: > Eli Barzilay wrote at 05/21/2008 08:51 AM: >> ([*] If you arrange a meeting for me and whoever designed SELinux, >> and whoever implemented NetworkManager, in a closed room, I'll be >> very happy to go there with a 5kg hammer.) > > Regarding SELinux, that would be our friends at the NSA, who'll know > about your new 5kg hammer before you leave the hardware store. Right, they'd get the information via the NSA back door in the SELinux running on the hardware store's cash register. It's all connected... The missing download server ended up "forcing" me to upgrade a three-year old PLT Slideshow presentation to work under 3.99, which turned out not to be nearly as onerous as I feared - mainly changing the case of some symbols. So thanks to PLT for the smooth upgrade path. For a while there I thought I was going to have to ask my audience to read the presentation source code instead - "pay no attention to all the parentheses, please..." Anton From mflatt at cs.utah.edu Wed May 21 09:43:27 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:39 2009 Subject: [plt-scheme] region displayed after dc is scaled In-Reply-To: <938fd252-93c3-4f8e-b151-3d6b96b475d2@z24g2000prf.googlegroups.com> References: <938fd252-93c3-4f8e-b151-3d6b96b475d2@z24g2000prf.googlegroups.com> Message-ID: <20080521134328.BB80F65017A@mail-svr1.cs.utah.edu> At Wed, 21 May 2008 06:03:04 -0700 (PDT), "zen1986@gmail.com" wrote: > I am using Mred to build some graphics. > I encounter this problem: > after My dc is scaled up, the top left region is always displayed. > How can I make it show the center region? It sounds like you have a drawing in some fixed-sized region like this: ---------- | **** | | ** ** | | ** ** | | **** | ---------- and when you prefix the drawing with something like `(send dc set-scale 2 2)', then the drawing looks like ---------- | | | ****|*** | ******|***** | **** | **** ---------- **** **** **** **** **** ************ ******** where the part outside the box is clipped. But you want ******** *----------* *|** **|* *|** **|* *|** **|* *|** **|* *----------* ******** ? In that case, you can adjust the drawing origin, in addition to the scale, by calling the `set-origin' method of the drawing context, something like `(send dc set-origin -10 -10)' but the actual numbers will depend on the scale factor and the size of the drawn image. Matthew From robert.matovinovic at web.de Wed May 21 12:56:10 2008 From: robert.matovinovic at web.de (Robert Matovinovic) Date: Thu Mar 26 02:18:40 2009 Subject: AW: [plt-scheme] word completion for module based languages In-Reply-To: <932b2f1f0805210659o76a87fadqa917c37b076c3b7a@mail.gmail.com> Message-ID: <359743D681F4463E84A51184156D20FE@IBMI> I see, I didn't make indicies in my manual what should fix my problem. Thank you. Robert -----Urspr?ngliche Nachricht----- Von: robby.findler@gmail.com [mailto:robby.findler@gmail.com] Im Auftrag von Robby Findler Gesendet: Mittwoch, 21. Mai 2008 16:00 An: Robert Matovinovic Cc: Matthew Flatt Betreff: Re: [plt-scheme] word completion for module based languages Ah. Well, from what I can tell, the autocompletion code should be completing every word that appears in any of the manual's indicies. Matthew: does that look right to you? (line 2811 of framework/text.ss) I see that there is a bug with completions that they aren't picking up the characters before the insertion point to being the completion. I'll look into that. Robby On Wed, May 21, 2008 at 4:52 AM, Robert Matovinovic wrote: > Just to clarify, I don't ask for word completion of definitions in the > editing buffer, but for a language or a language extension which is > loaded by the language menu of DrScheme. My language supports an > interface for another software which uses a scheme dialect and has a > lot of extensions for programming that software. These numerous > extensions have quiet long names, which are difficult to remember > exactly. So I want to provide the word completion for them. Robert > > -----Urspr?ngliche Nachricht----- > Von: plt-scheme-bounces@list.cs.brown.edu > [mailto:plt-scheme-bounces@list.cs.brown.edu] Im Auftrag von Robby > Findler > Gesendet: Mittwoch, 21. Mai 2008 03:15 > An: Eli Barzilay > Cc: Robert Matovinovic; plt-scheme@list.cs.brown.edu > Betreff: Re: [plt-scheme] word completion for module based languages > > > On Tue, May 20, 2008 at 7:53 PM, Eli Barzilay > wrote: >> On May 20, Robert Matovinovic wrote: >>> I currently use DrScheme, version 3.99.0.25-svn17may2008 on Windows >>> XP to add documentation for a module based language which I >>> implemented as a tool. I started with a simple example using my own >>> modules. The F1 shortcut to get the relevant docs for an item from >>> within the DrScheme window works fine. But is there a possibility >>> to get only the help documents for the current language? >> >> It might be possible to do, I'm not sure about the kind of >> information that DrScheme has when it starts a help search. (FWIW, >> the `help' form (in mzscheme) finds the right place for any binding.) >> >> (Skipping other issues that I cannot provide a helpful reply...) > > DrScheme used to be able to do that and I believe it will be able to > do that again in the future. I believe Eli and I have discussed this, > so I'm a little surprised by his reply, but one way or the other, we > should have that capability back before v4.0. > > As far as word completion goes, it currently does not consider the > buffer where you're editing. Others have asked for that too, so I hope > to get to it at some point. > > Robby > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From eckhardnospam at gmx.de Wed May 21 12:58:20 2008 From: eckhardnospam at gmx.de (Eckhard Lehmann) Date: Thu Mar 26 02:18:40 2009 Subject: [plt-scheme] How to configure the PLT web server? In-Reply-To: References: <20080521113950.269170@gmx.net> <20080521120124.97630@gmx.net> Message-ID: <483454AC.7070505@gmx.de> Finally I found http://docs.plt-scheme.org/. The introduction tutorial there is exactly what I need... Thanks & Regards ;-). Eckhard Matthias Felleisen schrieb: > > Open a terminal. > > $ sudo ~/......./plt/bin/web-server > > Then navigate to the set-up page. Change defaults, restart. > > I recommend you open DrScheme, press F1, halfway down the screen you see > > Web Server: PLT HTTP Server > > (This assumes you're running svn. On 372, it slightly differs.) > > -- Matthias > > > > On May 21, 2008, at 8:01 AM, Eckhard Lehmann wrote: > >> >> Double click in OS X and Windows... >> >> On OS X I get an error (suspect that it is due to permissions if the >> server tries to run on a port where I am not allowed to run it as >> normal user, e.g. 80) >> On Windows there is nothing after the double click - it either >> silently runs or silently fails... I don't know. >> >> How do I control that server? >> >> TIA >> Eckhard >> >> >> -------- Original-Nachricht -------- >>> Datum: Wed, 21 May 2008 07:42:06 -0400 >>> Von: "Shriram Krishnamurthi" >>> An: "Eckhard Lehmann" >>> CC: plt-scheme@list.cs.brown.edu >>> Betreff: Re: [plt-scheme] How to configure the PLT web server? >> >>> Can you tell us what you tried to get "get it running"? That would >>> help. Thanks. >>> >>> On Wed, May 21, 2008 at 7:39 AM, Eckhard Lehmann >>> wrote: >>>> Hi, >>>> >>>> Apparently, PLT Scheme comes with a webserver... >>>> But although I tried it a few times, I couldn't get it running or >>> configured. Nor do I see anywhere what port it uses. I couldn't find >>> any >>> documentation about it either. >>>> >>>> Is there documentation on this thing? And where is the config file, if >>> any exists? >>>> >>>> >>>> Thanks in advance >>>> Eckhard >>>> -- >>>> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten >>>> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser >>>> _________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>>> >> >> -- >> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten >> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From d.j.gurnell at gmail.com Wed May 21 13:15:24 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:18:40 2009 Subject: [plt-scheme] How to configure the PLT web server? In-Reply-To: <483454AC.7070505@gmx.de> References: <20080521113950.269170@gmx.net> <20080521120124.97630@gmx.net> <483454AC.7070505@gmx.de> Message-ID: <9DBCE7EB-8479-4D1D-85FE-44D4B9922263@gmail.com> This is where I do the obligatory plug for instaservlet.plt. For simple uses of the web server it can save you a lot of time. The package is here: http://planet.plt-scheme.org/display.ss?package=instaservlet.plt&owner=untyped and the docs are here: http://www.davegurnell.com/docs/instaservlet.plt/ Cheers, -- Dave > Finally I found http://docs.plt-scheme.org/. The introduction > tutorial there is exactly what I need... > > Thanks & Regards ;-). > Eckhard From joshua.zucker at gmail.com Wed May 21 16:25:41 2008 From: joshua.zucker at gmail.com (Joshua Zucker) Date: Thu Mar 26 02:18:40 2009 Subject: [plt-scheme] DrScheme crash, and my bad programming Message-ID: <721e81490805211325t7ab75c11lc9ac265412dc0572@mail.gmail.com> I know that there's probably a more conventional way to write code like this -- this is just my dorky translation of a C for loop into a recursion. (define (solution6? a b c d n) (let ([f (- (* 12 n (- n 2)) b (* 3 c) (* 2 d))]) (and (>= f 0) (>= (* n n n) (+ a b c d (- (* 8 n) (* 2 a) b) f))))) (define (count-solutions a b c d n) (cond [(> a (* 4 n)) 0] [(> b (- (* 8 n) (* 2 a))) (count-solutions (add1 a) 0 0 0 n)] [(> c (- (* 4 n (- n 2)) b)) (count-solutions a (add1 b) 0 0 n)] [(> d (quotient (- (* 12 n (- n 2)) b (* 3 c)) 2)) (count-solutions a b (add1 c) 0 n)] [(solution6? a b c d n) (add1 (count-solutions a b c (add1 d) n))] [else (count-solutions a b c (add1 d) n)])) But if you run (count-solutions 0 0 0 0 10) or so, where the recursion is then going a couple hundred million layers deep, DrScheme crashes. If I break up the recursion into one function that recurses on c and d while another recurses on a and b, then it has no trouble. If you want me to be more specific about exactly what code I run to make DrScheme crash, let me know. (By crash, I mean the application quits -- v372 on OS X 10.4) But I'm also writing because I figure there are more elegant ways to write for-loop-esque code like this -- maybe I should post that to plt-edu instead -- but I'd love to learn what the conventional way is to write this type of code. Something with let loop? I've seen that idiom but I don't really get it. Finally, the algorithm here is just brute-force counting of solutions to a system of three linear diophantine equations in seven variables, where all the variables have to be nonnegative. So I pick 4 of them, look at all the possibilities, and check for whether the remaining values are positive (with a few shortcuts, since the limits of the loop guarantee some of them will be positive). So maybe there are much much much more efficient ways of counting the number of solutions to a system like this? (Equivalently, the number of lattice points in a 7-dimensional region bounded by a bunch of hyperplanes.) Thanks! --Joshua Zucker From max at gustavus.edu Wed May 21 18:37:34 2008 From: max at gustavus.edu (Max Hailperin) Date: Thu Mar 26 02:18:41 2009 Subject: [plt-scheme] "name is not defined, ..." error in non-teaching language? References: Message-ID: <8DAAD036-C58B-4E97-9D86-3C814BEDB10A@gustavus.edu> I received a support query from someone having difficulty with the graphics library I supply for using DrScheme with the Concrete Abstractions textbook. I'm confused what's going on and hope someone else might be able to figure it out. The problem is he is getting an error message "name is not defined, not a parameter, and not a primitive name" regarding a name that should be defined by my library, which he is requiring. But the really weird part -- the reason I'm confused -- is that the error message looks like the one that would come up in a teaching language. So far as I can tell, in a non-teaching language, the message ought to be "reference to undefined identifier", even if the library somehow were not supplying the name. Yet the user in question sent me a screen snapshot, in which the language is clearly set to "Textual (MzScheme, includes R5RS)". Moreover, I can see he is running a current version of DrScheme and that the error message is as described above. So.... can someone help me out? Under what circumstances would one get an error message "name is not defined, not a parameter, and not a primitive name" rather than "reference to undefined identifier"? For reference, I have put the screen snapshot on my web page at http://gustavus.edu/+max/drscheme-error.jpg Thanks. -max From robby at cs.uchicago.edu Wed May 21 19:44:22 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:41 2009 Subject: [plt-scheme] DrScheme crash, and my bad programming In-Reply-To: <721e81490805211325t7ab75c11lc9ac265412dc0572@mail.gmail.com> References: <721e81490805211325t7ab75c11lc9ac265412dc0572@mail.gmail.com> Message-ID: <932b2f1f0805211644i5d38ffb6xf17620dc1de46417@mail.gmail.com> Do you have memory limits set on your program? Robby On Wed, May 21, 2008 at 3:25 PM, Joshua Zucker wrote: > I know that there's probably a more conventional way to write code > like this -- this is just my dorky translation of a C for loop into a > recursion. > > (define (solution6? a b c d n) > (let ([f (- (* 12 n (- n 2)) b (* 3 c) (* 2 d))]) > (and (>= f 0) > (>= (* n n n) (+ a b c d (- (* 8 n) (* 2 a) b) f))))) > > (define (count-solutions a b c d n) > (cond > [(> a (* 4 n)) 0] > [(> b (- (* 8 n) (* 2 a))) (count-solutions (add1 a) 0 0 0 n)] > [(> c (- (* 4 n (- n 2)) b)) (count-solutions a (add1 b) 0 0 n)] > [(> d (quotient (- (* 12 n (- n 2)) > b > (* 3 c)) > 2)) (count-solutions a b (add1 c) 0 n)] > [(solution6? a b c d n) (add1 (count-solutions a b c (add1 d) n))] > [else (count-solutions a b c (add1 d) n)])) > > But if you run (count-solutions 0 0 0 0 10) or so, > where the recursion is then going a couple hundred million layers deep, > DrScheme crashes. > > If I break up the recursion into one function that recurses on c and d > while another recurses on a and b, then it has no trouble. > > If you want me to be more specific about exactly what code I run to > make DrScheme crash, let me know. (By crash, I mean the application > quits -- v372 on OS X 10.4) > > But I'm also writing because I figure there are more elegant ways to > write for-loop-esque code like this -- maybe I should post that to > plt-edu instead -- but I'd love to learn what the conventional way is > to write this type of code. Something with let loop? I've seen that > idiom but I don't really get it. > > Finally, the algorithm here is just brute-force counting of solutions > to a system of three linear diophantine equations in seven variables, > where all the variables have to be nonnegative. So I pick 4 of them, > look at all the possibilities, and check for whether the remaining > values are positive (with a few shortcuts, since the limits of the > loop guarantee some of them will be positive). So maybe there are > much much much more efficient ways of counting the number of solutions > to a system like this? (Equivalently, the number of lattice points in > a 7-dimensional region bounded by a bunch of hyperplanes.) > > Thanks! > --Joshua Zucker > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From czhu at cs.utah.edu Wed May 21 23:29:25 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:18:41 2009 Subject: [plt-scheme] DrScheme crash, and my bad programming In-Reply-To: <721e81490805211325t7ab75c11lc9ac265412dc0572@mail.gmail.com> References: <721e81490805211325t7ab75c11lc9ac265412dc0572@mail.gmail.com> Message-ID: <4834E895.9020901@cs.utah.edu> I would suggest you to read more about *tail call*, or as some one put it, tail recursion. Afterall, let loop is just a macro that expands to recursive function call. In the code you posted, the line [(solution6? a b c d n) (add1 (count-solutions a b c (add1 d) n))] is not tail call. You didn't post the code that "break up the recursion into one function that recurses on c and d while another recurses on a and b", so I can't tell whether it is tail call or not. Chongkai Joshua Zucker wrote: > I know that there's probably a more conventional way to write code > like this -- this is just my dorky translation of a C for loop into a > recursion. > > (define (solution6? a b c d n) > (let ([f (- (* 12 n (- n 2)) b (* 3 c) (* 2 d))]) > (and (>= f 0) > (>= (* n n n) (+ a b c d (- (* 8 n) (* 2 a) b) f))))) > > (define (count-solutions a b c d n) > (cond > [(> a (* 4 n)) 0] > [(> b (- (* 8 n) (* 2 a))) (count-solutions (add1 a) 0 0 0 n)] > [(> c (- (* 4 n (- n 2)) b)) (count-solutions a (add1 b) 0 0 n)] > [(> d (quotient (- (* 12 n (- n 2)) > b > (* 3 c)) > 2)) (count-solutions a b (add1 c) 0 n)] > [(solution6? a b c d n) (add1 (count-solutions a b c (add1 d) n))] > [else (count-solutions a b c (add1 d) n)])) > > But if you run (count-solutions 0 0 0 0 10) or so, > where the recursion is then going a couple hundred million layers deep, > DrScheme crashes. > > If I break up the recursion into one function that recurses on c and d > while another recurses on a and b, then it has no trouble. > > If you want me to be more specific about exactly what code I run to > make DrScheme crash, let me know. (By crash, I mean the application > quits -- v372 on OS X 10.4) > > But I'm also writing because I figure there are more elegant ways to > write for-loop-esque code like this -- maybe I should post that to > plt-edu instead -- but I'd love to learn what the conventional way is > to write this type of code. Something with let loop? I've seen that > idiom but I don't really get it. > > Finally, the algorithm here is just brute-force counting of solutions > to a system of three linear diophantine equations in seven variables, > where all the variables have to be nonnegative. So I pick 4 of them, > look at all the possibilities, and check for whether the remaining > values are positive (with a few shortcuts, since the limits of the > loop guarantee some of them will be positive). So maybe there are > much much much more efficient ways of counting the number of solutions > to a system like this? (Equivalently, the number of lattice points in > a 7-dimensional region bounded by a bunch of hyperplanes.) > > Thanks! > --Joshua Zucker > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From zen1986 at gmail.com Thu May 22 06:47:28 2008 From: zen1986 at gmail.com (zen1986@gmail.com) Date: Thu Mar 26 02:18:41 2009 Subject: [plt-scheme] Re: region displayed after dc is scaled In-Reply-To: <20080521134328.BB80F65017A@mail-svr1.cs.utah.edu> References: <938fd252-93c3-4f8e-b151-3d6b96b475d2@z24g2000prf.googlegroups.com> <20080521134328.BB80F65017A@mail-svr1.cs.utah.edu> Message-ID: Hi Matthew, I used set-origin to navigate the enlarged picture. That works for me, thanks. On May 21, 9:43 pm, Matthew Flatt wrote: > At Wed, 21 May 2008 06:03:04 -0700 (PDT), "zen1...@gmail.com" wrote: > > > I am using Mred to build some graphics. > > I encounter this problem: > > after My dc is scaled up, the top left region is always displayed. > > How can I make it show the center region? > > It sounds like you have a drawing in some fixed-sized region like this: > > ---------- > | **** | > | ** ** | > | ** ** | > | **** | > ---------- > > and when you prefix the drawing with something like `(send dc set-scale > 2 2)', then the drawing looks like > > ---------- > | | > | ****|*** > | ******|***** > | **** | **** > ---------- **** > **** **** > **** **** > ************ > ******** > > where the part outside the box is clipped. > > But you want > > ******** > *----------* > *|** **|* > *|** **|* > *|** **|* > *|** **|* > *----------* > ******** > > ? > > In that case, you can adjust the drawing origin, in addition to the > scale, by calling the `set-origin' method of the drawing context, > something like > > `(send dc set-origin -10 -10)' > > but the actual numbers will depend on the scale factor and the size of > the drawn image. > > Matthew > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mflatt at cs.utah.edu Thu May 22 06:48:32 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:41 2009 Subject: [plt-scheme] "name is not defined, ..." error in non-teaching language? In-Reply-To: <8DAAD036-C58B-4E97-9D86-3C814BEDB10A@gustavus.edu> References: <8DAAD036-C58B-4E97-9D86-3C814BEDB10A@gustavus.edu> Message-ID: <20080522104836.206EC65011F@mail-svr1.cs.utah.edu> I think "quilting.scm" has been accidentally saved as an HtDP program. That is, DrScheme's language was set to something like "Beginner Scheme" when the program was saved to disk, and so the file has a prefix that makes it parse as a module in the in "Beginner Scheme" language. To fix the file, first open it in DrScheme; the language will automaticlaly change to the one that was active when the file was saved. Change the language to "Textual", and then save the file. Matthew At Wed, 21 May 2008 17:37:34 -0500, Max Hailperin wrote: > I received a support query from someone having difficulty with the > graphics library I supply for using DrScheme with the Concrete > Abstractions textbook. I'm confused what's going on and hope someone > else might be able to figure it out. > > The problem is he is getting an error message "name is not defined, > not a parameter, and not a primitive name" regarding a name that > should be defined by my library, which he is requiring. But the > really weird part -- the reason I'm confused -- is that the error > message looks like the one that would come up in a teaching language. > So far as I can tell, in a non-teaching language, the message ought to > be "reference to undefined identifier", even if the library somehow > were not supplying the name. Yet the user in question sent me a > screen snapshot, in which the language is clearly set to "Textual > (MzScheme, includes R5RS)". Moreover, I can see he is running a > current version of DrScheme and that the error message is as described > above. So.... can someone help me out? Under what circumstances > would one get an error message "name is not defined, not a parameter, > and not a primitive name" rather than "reference to undefined > identifier"? > > For reference, I have put the screen snapshot on my web page at > http://gustavus.edu/+max/drscheme-error.jpg > > Thanks. -max > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From kinch1967 at gmail.com Thu May 22 13:15:59 2008 From: kinch1967 at gmail.com (bullockbefriending bard) Date: Thu Mar 26 02:18:41 2009 Subject: [plt-scheme] Destructive Sort. Really dumb question. Message-ID: (require (lib "list.ss")) (let ((y (list 9 8 7 1 11))) (sort y <)) => (1 7 8 9 11) and all is well with the world. (let ((y (list 9 8 7 1 11))) (sort! y <)) => (1 7 8 9 11) ditto. (let ((y (list 9 8 7 1 11))) (sort! y <) y) => (8 9 11) major screen brain impedance mismatch here. I guess I must be misunderstanding something. If sort! is an in-place sort, why don't I see (1 7 8 9 11) ? From robby at cs.uchicago.edu Thu May 22 13:18:34 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:42 2009 Subject: [plt-scheme] Destructive Sort. Really dumb question. In-Reply-To: References: Message-ID: <932b2f1f0805221018s4032ec6cq441b776101d52748@mail.gmail.com> sort! just changes the structure of the internal cons cell nodes in your list. It doesn't change what `y' is bound to. After the cons cells have been rearranged, the variable "y" still refers to that same cons cell it referred to before, but now that cons cell is somewhere in the middle of the list, its no longer at the front. That's why sort! returns something -- so you know which one is now the front most one. Robby On Thu, May 22, 2008 at 12:15 PM, bullockbefriending bard wrote: > (require (lib "list.ss")) > > (let ((y (list 9 8 7 1 11))) > (sort y <)) > > => (1 7 8 9 11) > > and all is well with the world. > > (let ((y (list 9 8 7 1 11))) > (sort! y <)) > > => (1 7 8 9 11) > > ditto. > > (let ((y (list 9 8 7 1 11))) > (sort! y <) > y) > > => (8 9 11) > > major screen brain impedance mismatch here. > > I guess I must be misunderstanding something. If sort! is an in-place > sort, why don't I see (1 7 8 9 11) ? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From kinch1967 at gmail.com Thu May 22 13:56:04 2008 From: kinch1967 at gmail.com (bullockbefriending bard) Date: Thu Mar 26 02:18:42 2009 Subject: [plt-scheme] Re: Destructive Sort. Really dumb question. In-Reply-To: <932b2f1f0805221018s4032ec6cq441b776101d52748@mail.gmail.com> References: <932b2f1f0805221018s4032ec6cq441b776101d52748@mail.gmail.com> Message-ID: On May 23, 12:18?am, "Robby Findler" wrote: > sort! just changes the structure of the internal cons cell nodes in > your list. It doesn't change what `y' is bound to. After the cons > cells have been rearranged, the variable "y" still refers to that same > cons cell it referred to before, but now that cons cell is somewhere > in the middle of the list, its no longer at the front. > > That's why sort! returns something -- so you know which one is now the > front most one. > > Robby *smacks head* Enlightenment achieved. Thanks! From clements at brinckerhoff.org Thu May 22 20:22:40 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:18:42 2009 Subject: [plt-scheme] CFP: FDPE08: Functional and Declarative Programming in Education Message-ID: Call for Papers Functional and Declarative Programming in Education (FDPE08) http://www-ps.informatik.uni-kiel.de/fdpe08/ Victoria, BC, Canada, 21 September, 2008 The workshop will be held in conjunction with ICFP 2008. http://www.icfpconference.org/icfp2008/ Important Dates --------------- Submission deadline: Friday, June 20, 2008 Notification of acceptance: Friday, July 25, 2008 Final revision due: Monday, July 14, 2008 Workshop: Sunday, September 21, 2008 Goals of the Workshop --------------------- Functional and declarative programming plays an increasingly important role in computing education at all levels. The aim of this workshop is to bring together educators and others who are interested in exchanging ideas on how to use a functional or declarative programming style in the classroom or in e-learning environments. Beyond the traditional focus of teaching programming by means of the functional or declarative paradigm, we are especially interested in case studies showing how these languages can be elegantly applied in teaching other topics of computer science (such as Appel's use of ML to teach compiler construction). Another interesting area covered by the workshop should be dedicated to teaching functional or declarative programming ideas in industrial environments. Functional and declarative languages have become more influential in industry. Thus, teaching such languages has become an interesting topic, as it must take into consideration long programming experiences in imperative languages. Topics: ------- The workshop will cover a wide spectrum of functional and declarative programming techniques: * programming courses using traditional functional and declarative programming languages (e.g. Haskell, Mathematica, ML, Prolog, Scheme, etc); * programming courses teaching functional programming in commercial languages (e.g. C, C++, Common LISP, etc); * programming courses teaching functional program design in modern OO languages (e.g. Java, C#, Eiffel, etc); * pedagogic programming environments to support functional and declarative programming; * teaching tools implemented with functional and declarative languages and/or ideas; * declarative programming language extensions and implementations with pedagogical relevance; * application courses that benefit heavily from functional and declarative programming (e.g. theorem proving or hardware design). Furthermore, the workshop will also cover all levels of education: * secondary school; * college and university; * post-college and continuing professional education. FDPE will be held in conjunction with the 13th ACM SIGPLAN International Conference on Functional Programming (ICFP 2008) in Victoria, British Columbia, Canada on Sunday, September 21, 2008. Submitted papers should describe new ideas, experimental results, or education-related projects. In order to encourage lively discussion, submitted papers may describe new ideas of education as well as project proposals about incorporating functional and declarative concepts into education curricula. All papers will be judged on a combination of correctness, significance, novelty, clarity, and interest to the community. All paper submissions must be at most 12 pages total length in the standard ACM SIGPLAN two-column conference format (9pt). Accepted papers will be published by the ACM and will appear in the ACM Digital Library. Submissions will be refereed by the program commitee who will call upon other members involved in teaching in related areas for expert advice. More details about the submission procedure will be announced on the FDPE website at http://www-ps.informatik.uni-kiel.de/fdpe08/ Registration, hotels, travel, etc. ---------------------------------- Information about registration, accommodation, and travel will eventually be available on the main conference web site (http://www.icfpconference.org/) Program Committee ----------------- * John Clements, California Polytechnic State University, United States * Matthew Flatt, University of Utah, United States * Michael Hanus, University of Kiel, Germany * Frank Huch, University of Kiel, Germany (co-chair) * Adam Parkin, University of Victoria, Canada (co-chair) * Simon Thompson, University of Kent, UK * Mads Torgersen, Microsoft Redmond, United States From clements at brinckerhoff.org Thu May 22 21:02:15 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:18:43 2009 Subject: [plt-scheme] DrScheme crash, and my bad programming In-Reply-To: <4834E895.9020901@cs.utah.edu> References: <721e81490805211325t7ab75c11lc9ac265412dc0572@mail.gmail.com> <4834E895.9020901@cs.utah.edu> Message-ID: On May 21, 2008, at 8:29 PM, Chongkai Zhu wrote: > I would suggest you to read more about *tail call*, or as some one > put it, tail recursion. Afterall, let loop is just a macro that > expands to recursive function call. Indeed; the only non-tail-call is the one that Chongkai points out. Presumably, in the original C code there was a mutation of a global counter. I changed it to be tail-calling, and now it runs cheerfully forever. I changed it to be tail-calling by adding an accumulator. HtDP covers this in section VI, "Accumulating Knowledge". However, I don't see a specific discussion in that section of this particular need. John > In the code you posted, the line > > [(solution6? a b c d n) (add1 (count-solutions a b c (add1 d) n))] > > is not tail call. You didn't post the code that "break up the > recursion into one function that recurses on c and d while another > recurses on a and b", so I can't tell whether it is tail call or not. > > Chongkai > > Joshua Zucker wrote: >> I know that there's probably a more conventional way to write code >> like this -- this is just my dorky translation of a C for loop into a >> recursion. >> >> (define (solution6? a b c d n) >> (let ([f (- (* 12 n (- n 2)) b (* 3 c) (* 2 d))]) >> (and (>= f 0) >> (>= (* n n n) (+ a b c d (- (* 8 n) (* 2 a) b) f))))) >> >> (define (count-solutions a b c d n) >> (cond >> [(> a (* 4 n)) 0] >> [(> b (- (* 8 n) (* 2 a))) (count-solutions (add1 a) 0 0 0 n)] >> [(> c (- (* 4 n (- n 2)) b)) (count-solutions a (add1 b) 0 0 n)] >> [(> d (quotient (- (* 12 n (- n 2)) >> b >> (* 3 c)) >> 2)) (count-solutions a b (add1 c) 0 n)] >> [(solution6? a b c d n) (add1 (count-solutions a b c (add1 d) >> n))] >> [else (count-solutions a b c (add1 d) n)])) >> >> But if you run (count-solutions 0 0 0 0 10) or so, >> where the recursion is then going a couple hundred million layers >> deep, >> DrScheme crashes. >> >> If I break up the recursion into one function that recurses on c >> and d >> while another recurses on a and b, then it has no trouble. >> >> If you want me to be more specific about exactly what code I run to >> make DrScheme crash, let me know. (By crash, I mean the application >> quits -- v372 on OS X 10.4) >> >> But I'm also writing because I figure there are more elegant ways to >> write for-loop-esque code like this -- maybe I should post that to >> plt-edu instead -- but I'd love to learn what the conventional way is >> to write this type of code. Something with let loop? I've seen that >> idiom but I don't really get it. >> >> Finally, the algorithm here is just brute-force counting of solutions >> to a system of three linear diophantine equations in seven variables, >> where all the variables have to be nonnegative. So I pick 4 of them, >> look at all the possibilities, and check for whether the remaining >> values are positive (with a few shortcuts, since the limits of the >> loop guarantee some of them will be positive). So maybe there are >> much much much more efficient ways of counting the number of >> solutions >> to a system like this? (Equivalently, the number of lattice >> points in >> a 7-dimensional region bounded by a bunch of hyperplanes.) >> >> Thanks! >> --Joshua Zucker >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2484 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080522/7b4ebb0a/smime.bin From dekudekuplex at yahoo.com Fri May 23 02:12:36 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:43 2009 Subject: [plt-scheme] DrScheme crash, and my bad programming In-Reply-To: <4834E895.9020901@cs.utah.edu> Message-ID: <804936.1237.qm@web30206.mail.mud.yahoo.com> Just to clarify, not all tail calls are tail recursive. A tail call is just a procedure call just before the end of the procedure (see "Tail call - Wikipedia, the free encyclopedia" at http://en.wikipedia.org/wiki/Tail_call). Tail recursion (see "Tail recursion - Wikipedia, the free encyclopedia" at http://en.wikipedia.org/wiki/Tail_recursion) is a special case of a tail call in which the procedure is calling itself. Benjamin L. Russell --- On Thu, 5/22/08, Chongkai Zhu wrote: > I would suggest you to read more about *tail call*, or as > some one put > it, tail recursion. Afterall, let loop is just a macro that > expands to > recursive function call. > > In the code you posted, the line > > [(solution6? a b c d n) (add1 (count-solutions a b c > (add1 d) n))] > > is not tail call. You didn't post the code that > "break up the recursion > into one function that recurses on c and d while another > recurses on a > and b", so I can't tell whether it is tail call or > not. > > Chongkai > > Joshua Zucker wrote: > > I know that there's probably a more conventional > way to write code > > like this -- this is just my dorky translation of a C > for loop into a > > recursion. > > > > (define (solution6? a b c d n) > > (let ([f (- (* 12 n (- n 2)) b (* 3 c) (* 2 d))]) > > (and (>= f 0) > > (>= (* n n n) (+ a b c d (- (* 8 n) (* 2 > a) b) f))))) > > > > (define (count-solutions a b c d n) > > (cond > > [(> a (* 4 n)) 0] > > [(> b (- (* 8 n) (* 2 a))) (count-solutions > (add1 a) 0 0 0 n)] > > [(> c (- (* 4 n (- n 2)) b)) (count-solutions a > (add1 b) 0 0 n)] > > [(> d (quotient (- (* 12 n (- n 2)) > > b > > (* 3 c)) > > 2)) (count-solutions a b (add1 c) > 0 n)] > > [(solution6? a b c d n) (add1 (count-solutions a b > c (add1 d) n))] > > [else (count-solutions a b c (add1 d) n)])) > > > > But if you run (count-solutions 0 0 0 0 10) or so, > > where the recursion is then going a couple hundred > million layers deep, > > DrScheme crashes. > > > > If I break up the recursion into one function that > recurses on c and d > > while another recurses on a and b, then it has no > trouble. > > > > If you want me to be more specific about exactly what > code I run to > > make DrScheme crash, let me know. (By crash, I mean > the application > > quits -- v372 on OS X 10.4) > > > > But I'm also writing because I figure there are > more elegant ways to > > write for-loop-esque code like this -- maybe I should > post that to > > plt-edu instead -- but I'd love to learn what the > conventional way is > > to write this type of code. Something with let loop? > I've seen that > > idiom but I don't really get it. > > > > Finally, the algorithm here is just brute-force > counting of solutions > > to a system of three linear diophantine equations in > seven variables, > > where all the variables have to be nonnegative. So I > pick 4 of them, > > look at all the possibilities, and check for whether > the remaining > > values are positive (with a few shortcuts, since the > limits of the > > loop guarantee some of them will be positive). So > maybe there are > > much much much more efficient ways of counting the > number of solutions > > to a system like this? (Equivalently, the number of > lattice points in > > a 7-dimensional region bounded by a bunch of > hyperplanes.) > > > > Thanks! > > --Joshua Zucker > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From notnorwegian at yahoo.se Fri May 23 09:56:52 2008 From: notnorwegian at yahoo.se (not norwegian swede) Date: Thu Mar 26 02:18:44 2009 Subject: [plt-scheme] change intendation? Message-ID: <775730.71349.qm@web27913.mail.ukl.yahoo.com> i think 2 char intendation is way too small, how do i change intendation permanently or at least for a session in Dr Scheme? i want to be able to tab 8 chars. best regards notnor __________________________________________________________ L?na pengar utan s?kerhet. J?mf?r vilkor online hos Yahoo! http://shopping.yahoo.se/c-100390123-lan-utan-sakerhet.html?partnerId=96915014 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080523/967632eb/attachment.html From robby at cs.uchicago.edu Fri May 23 10:05:19 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:44 2009 Subject: [plt-scheme] change intendation? In-Reply-To: <775730.71349.qm@web27913.mail.ukl.yahoo.com> References: <775730.71349.qm@web27913.mail.ukl.yahoo.com> Message-ID: <932b2f1f0805230705t740666f4t27019481221412f9@mail.gmail.com> Unfortunately, that's not something that's currently configurable. I believe you should be able to hack the source to change that, tho. I'd look in plt/collects/framework/private/scheme.ss to get started. Robby On Fri, May 23, 2008 at 8:56 AM, not norwegian swede wrote: > i think 2 char intendation is way too small, how do i change intendation > permanently or at least for a session in Dr Scheme? i want to be able to tab > 8 chars. > > best regards notnor > > ________________________________ > S?k efter k?rleken! > Hitta din tvillingsj?l p? Yahoo! Dejting: http://se.meetic.yahoo.net > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From cwbowron at gmail.com Fri May 23 09:58:13 2008 From: cwbowron at gmail.com (cwbowron@gmail.com) Date: Thu Mar 26 02:18:44 2009 Subject: [plt-scheme] programmatically Closing MrEd Frame Message-ID: <00a8bd84-dfbe-4a77-b5d3-cda7c412aefa@2g2000hsn.googlegroups.com> I have a MrEd frame based application and I would like to add a File- >Exit menu item that does the same thing as closing the frame with the close button on the frame, but I cannot figure out how to do that. Is there a way to do this? Thanks From robby at cs.uchicago.edu Fri May 23 13:29:10 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:44 2009 Subject: [plt-scheme] programmatically Closing MrEd Frame In-Reply-To: <00a8bd84-dfbe-4a77-b5d3-cda7c412aefa@2g2000hsn.googlegroups.com> References: <00a8bd84-dfbe-4a77-b5d3-cda7c412aefa@2g2000hsn.googlegroups.com> Message-ID: <932b2f1f0805231029u30ace952nd37d696b74943de7@mail.gmail.com> You want the `close' method, which is (when (send frame can-close?) (send frame on-close) (send frame show #f)) Robby On Fri, May 23, 2008 at 8:58 AM, cwbowron@gmail.com wrote: > I have a MrEd frame based application and I would like to add a File- >>Exit menu item that does the same thing as closing the frame with the > close button on the frame, but I cannot figure out how to do that. Is > there a way to do this? > > Thanks > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From nikander at nc.rr.com Fri May 23 14:15:25 2008 From: nikander at nc.rr.com (Robert Nikander) Date: Thu Mar 26 02:18:44 2009 Subject: [plt-scheme] custom reader Message-ID: <6920B82D-2C93-4C4C-BBF2-8C3334C7A566@nc.rr.com> Hi, I hear you can define a custom reader for a custom language, to use like: #lang my-language Does documentation exist yet for doing this? Or examples? I looked at collects/swindle, because I noticed it parsed :keywords, but all I see is a minimal file in lang/reader.ss that makes no sense to me. thanks, Rob From czhu at cs.utah.edu Fri May 23 19:22:49 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:18:44 2009 Subject: [plt-scheme] custom reader In-Reply-To: <6920B82D-2C93-4C4C-BBF2-8C3334C7A566@nc.rr.com> References: <6920B82D-2C93-4C4C-BBF2-8C3334C7A566@nc.rr.com> Message-ID: <483751C9.7020902@cs.utah.edu> Yes, you can do that. Typed-Scheme is a good example to start with, but as I just checked, it is for v3xx instead of v4. The idea is to have a module that provides two function: read and read-syntax (in v372). In v3.99 doc "Plugins: Extending DrScheme", section 2.1 Adding Module-based Languages to DrScheme, it is mentioned: drscheme-language-readers: This is optional. If present, it must be bound to a quoted list of module specifications (that is, a quoted version of the argument to require). Each specification must be a module that exports a function named read-syntax. Each of these read-syntax functions must match MzScheme?s read-syntax primitive?s contract, but may read different concrete syntax. Chongkai Robert Nikander wrote: > Hi, > > I hear you can define a custom reader for a custom language, to use like: > > #lang my-language > > Does documentation exist yet for doing this? Or examples? > > I looked at collects/swindle, because I noticed it parsed :keywords, > but all I see is a minimal file in lang/reader.ss that makes no sense > to me. > > thanks, > Rob > From jos.koot at telefonica.net Sat May 24 06:42:08 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:45 2009 Subject: [plt-scheme] struct at compile and run time Message-ID: <000c01c8bd8a$d1673e80$2101a8c0@uw2b2dff239c4d> Hi, A question: - I have a syntax that creates immutable structs with procedure property. - All stuff for the preparation of the structs is available at compile time. Therefore the syntax prepares the structs at compile time. By pushing the computations that are required for the preparation of the structs to compile time I intend to avoid unnecessary multiple computations at run time. I also would like to avoid unnecessary computations when requiring a compiled module that uses the syntax (or rather for which the structs were already computed at compile time) - All works very nicely, but I find no way to provide a predicate that at run time can recognize the structs made at compile time. Is there a way to do that? Thanks, Jos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080524/bc9589c1/attachment.htm From samth at ccs.neu.edu Sat May 24 08:26:13 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:18:45 2009 Subject: [plt-scheme] custom reader In-Reply-To: <483751C9.7020902@cs.utah.edu> References: <6920B82D-2C93-4C4C-BBF2-8C3334C7A566@nc.rr.com> <483751C9.7020902@cs.utah.edu> Message-ID: <63bb19ae0805240526l46627c4cv3147fc695f7a42a8@mail.gmail.com> On Fri, May 23, 2008 at 7:22 PM, Chongkai Zhu wrote: > Yes, you can do that. Typed-Scheme is a good example to start with, but as I > just checked, it is for v3xx instead of v4. The idea is to have a module > that provides two function: read and read-syntax (in v372). If you're interested in the how to do this for v4, the `typed-scheme' collection is now in the collections tree, and so you can look there for an example. Thanks, sam th > > In v3.99 doc "Plugins: Extending DrScheme", section 2.1 Adding Module-based > Languages to DrScheme, it is mentioned: drscheme-language-readers: This is > optional. If present, it must be bound to a quoted list of module > specifications (that is, a quoted version of the argument to require). Each > specification must be a module that exports a function named read-syntax. > Each of these read-syntax functions must match MzScheme's read-syntax > primitive's contract, but may read different concrete syntax. > > Chongkai > > Robert Nikander wrote: >> >> Hi, >> >> I hear you can define a custom reader for a custom language, to use like: >> >> #lang my-language >> >> Does documentation exist yet for doing this? Or examples? >> >> I looked at collects/swindle, because I noticed it parsed :keywords, but >> all I see is a minimal file in lang/reader.ss that makes no sense to me. >> >> thanks, >> Rob >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- sam th samth@ccs.neu.edu From spdegabrielle at gmail.com Sat May 24 09:24:27 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:18:45 2009 Subject: [plt-scheme] OT goodbye bug icons Message-ID: <595b9ab20805240624k134dd0abx901e4faa9e7f47f4@mail.gmail.com> I've just noticed the 'bug behind red circle with line through it' icon has been replaced by a 'fuse-bomb'. in my yesterdays svn build. Bye bye bugs. Stephen -- Stephen De Gabrielle s.degabrielle@cs.ucl.ac.uk Telephone +44 (0)20 7679 0693 (x30693) Mobile 079 851 890 45 Project: Making Sense of Information (MaSI) http://www.uclic.ucl.ac.uk/annb/MaSI.html UCL Interaction Centre MPEB 8th floor University College London Gower Street London WC1E 6BT From robby at cs.uchicago.edu Sat May 24 09:26:07 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:45 2009 Subject: [plt-scheme] OT goodbye bug icons In-Reply-To: <595b9ab20805240624k134dd0abx901e4faa9e7f47f4@mail.gmail.com> References: <595b9ab20805240624k134dd0abx901e4faa9e7f47f4@mail.gmail.com> Message-ID: <932b2f1f0805240626q48c89c84vd55694242592e005@mail.gmail.com> Oh, they're not gone -- they've just gotten worse. ;) Robby On Sat, May 24, 2008 at 8:24 AM, Stephen De Gabrielle wrote: > I've just noticed the 'bug behind red circle with line through it' > icon has been replaced by a 'fuse-bomb'. in my yesterdays svn build. > Bye bye bugs. > > > Stephen > > -- > Stephen De Gabrielle > s.degabrielle@cs.ucl.ac.uk > Telephone +44 (0)20 7679 0693 (x30693) > Mobile 079 851 890 45 > Project: Making Sense of Information (MaSI) > http://www.uclic.ucl.ac.uk/annb/MaSI.html > > UCL Interaction Centre > MPEB 8th floor > University College London > Gower Street > London WC1E 6BT > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From robert.matovinovic at web.de Sat May 24 10:12:18 2008 From: robert.matovinovic at web.de (Robert Matovinovic) Date: Thu Mar 26 02:18:46 2009 Subject: AW: [plt-scheme] word completion for module based languages In-Reply-To: <932b2f1f0805210954p706e20d9l999b79327d244fe1@mail.gmail.com> Message-ID: <4C19F56AC22E4500B665E01FF2667586@IBMI> I just installed the latest nightly build 3.99.0.25-svn19may2008 [3m] to test the completion feature and found it still breaking. Is it not yet in the build? Besides I added the index in my scribble file and don't get the completion for ist content. I checked with other manuals for example mysterx in the distribution and found they also don't appear in the completion list in spite of having an index. Well, help still appreciated. Here a copy of my scribble file: #lang scribble/doc @(require scribble/manual (for-label scheme "my-commands.ss") ) @title{My Reference} @declare-exporting[me/my-commands] @table-of-contents[] @defform[(position x y z)]@index["position"] Sets a position in world coordinates. @index-section[] Robert -----Urspr?ngliche Nachricht----- Von: robby.findler@gmail.com [mailto:robby.findler@gmail.com] Im Auftrag von Robby Findler Gesendet: Mittwoch, 21. Mai 2008 18:54 An: Robert Matovinovic Betreff: Re: [plt-scheme] word completion for module based languages Yeah, it didn't always happen (it broke in some situations, depending on the character following the insertion point). Robby On Wed, May 21, 2008 at 11:56 AM, Robert Matovinovic wrote: > Thank you. I didn't mention that, but I had the same experience, > although not always. Robert > > -----Urspr?ngliche Nachricht----- > Von: robby.findler@gmail.com [mailto:robby.findler@gmail.com] Im > Auftrag von Robby Findler > Gesendet: Mittwoch, 21. Mai 2008 16:09 > An: Robert Matovinovic > Cc: Matthew Flatt > Betreff: Re: [plt-scheme] word completion for module based languages > > > On Wed, May 21, 2008 at 8:59 AM, Robby Findler > wrote: >> I see that there is a bug with completions that they aren't picking >> up the characters before the insertion point to being the completion. >> I'll look into that. > > That's fixed now. > > Robby > > > From robby at cs.uchicago.edu Sat May 24 10:58:08 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:46 2009 Subject: [plt-scheme] word completion for module based languages In-Reply-To: <4C19F56AC22E4500B665E01FF2667586@IBMI> References: <932b2f1f0805210954p706e20d9l999b79327d244fe1@mail.gmail.com> <4C19F56AC22E4500B665E01FF2667586@IBMI> Message-ID: <932b2f1f0805240758j57949476o3ef4dd5d85c2c5b7@mail.gmail.com> On Sat, May 24, 2008 at 9:12 AM, Robert Matovinovic wrote: > I just installed the latest nightly build 3.99.0.25-svn19may2008 [3m] to > test the completion feature and found it still breaking. Is it not yet in > the build? I checked it in to SVN just before I email'd you, but I see that that was on May 21st. I think Eli is working on various configurations of various machines, which is why the nightly build hasn't been built in a while. (I'm not sure about the below.) Robby > Besides I added the index in my scribble file and don't get the completion > for ist content. I checked with other manuals for example mysterx in the > distribution and found they also don't appear in the completion list in > spite of having an index. Well, help still appreciated. Here a copy of my > scribble file: > > #lang scribble/doc > @(require scribble/manual > (for-label scheme "my-commands.ss") > ) > > @title{My Reference} > > @declare-exporting[me/my-commands] > > @table-of-contents[] > > @defform[(position x y z)]@index["position"] > Sets a position in world coordinates. > > @index-section[] > > Robert > > -----Urspr?ngliche Nachricht----- > Von: robby.findler@gmail.com [mailto:robby.findler@gmail.com] Im Auftrag von > Robby Findler > Gesendet: Mittwoch, 21. Mai 2008 18:54 > An: Robert Matovinovic > Betreff: Re: [plt-scheme] word completion for module based languages > > > Yeah, it didn't always happen (it broke in some situations, depending on the > character following the insertion point). > > Robby > > On Wed, May 21, 2008 at 11:56 AM, Robert Matovinovic > wrote: >> Thank you. I didn't mention that, but I had the same experience, >> although not always. Robert >> >> -----Urspr?ngliche Nachricht----- >> Von: robby.findler@gmail.com [mailto:robby.findler@gmail.com] Im >> Auftrag von Robby Findler >> Gesendet: Mittwoch, 21. Mai 2008 16:09 >> An: Robert Matovinovic >> Cc: Matthew Flatt >> Betreff: Re: [plt-scheme] word completion for module based languages >> >> >> On Wed, May 21, 2008 at 8:59 AM, Robby Findler >> wrote: >>> I see that there is a bug with completions that they aren't picking >>> up the characters before the insertion point to being the completion. >>> I'll look into that. >> >> That's fixed now. >> >> Robby >> >> >> > > > From toddobryan at gmail.com Sat May 24 14:32:48 2008 From: toddobryan at gmail.com (Todd O'Bryan) Date: Thu Mar 26 02:18:46 2009 Subject: [plt-scheme] OT goodbye bug icons In-Reply-To: <932b2f1f0805240626q48c89c84vd55694242592e005@mail.gmail.com> References: <595b9ab20805240624k134dd0abx901e4faa9e7f47f4@mail.gmail.com> <932b2f1f0805240626q48c89c84vd55694242592e005@mail.gmail.com> Message-ID: <904774730805241132q111516bu199fa6e5297dce9c@mail.gmail.com> Did anyone else get this ad from gmail for this thread? :-) How to Kill Bed Bugs - www.NaturalBedBugKiller.com - Kill Bed Bugs instantly. 100% safe. Free shipping - Only $24.87. On Sat, May 24, 2008 at 9:26 AM, Robby Findler wrote: > Oh, they're not gone -- they've just gotten worse. ;) > > Robby > > On Sat, May 24, 2008 at 8:24 AM, Stephen De Gabrielle > wrote: >> I've just noticed the 'bug behind red circle with line through it' >> icon has been replaced by a 'fuse-bomb'. in my yesterdays svn build. >> Bye bye bugs. >> >> >> Stephen >> >> -- >> Stephen De Gabrielle >> s.degabrielle@cs.ucl.ac.uk >> Telephone +44 (0)20 7679 0693 (x30693) >> Mobile 079 851 890 45 >> Project: Making Sense of Information (MaSI) >> http://www.uclic.ucl.ac.uk/annb/MaSI.html >> >> UCL Interaction Centre >> MPEB 8th floor >> University College London >> Gower Street >> London WC1E 6BT >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From stecksoft at gmail.com Sat May 24 15:26:34 2008 From: stecksoft at gmail.com (Paul A. Steckler) Date: Thu Mar 26 02:18:46 2009 Subject: [plt-scheme] Fwd: [Lisp] MzScheme string formatting In-Reply-To: <294271.68557.qm@web63002.mail.re1.yahoo.com> References: <294271.68557.qm@web63002.mail.re1.yahoo.com> Message-ID: <35d822270805241226v33ada125u464943398364df39@mail.gmail.com> Forwarded from the LispNYC list. I told the poster to try plt-scheme, but here's his message in case he doesn't. -- Paul ---------- Forwarded message ---------- From: Arkady Andrukonis Date: Sat, May 24, 2008 at 12:06 PM Subject: [Lisp] MzScheme string formatting To: lisp Hi, Does anyone have a reference for MzScheme format string patterns for formatting decimal output? The online reference does not seem have the format-string magic. (printf format-string input ...) or (format format-string input ...) For example, ;; format decimal to 2 places in Java printf("%.2d") ;; MzScheme produces the following (- 0.9876 0.9865) -> 0.001099999999999899 ;; this one does not work (format "~w,2F~%" (- 0.9876 0.9865)) ; white space not allowed ;; this is legal Scheme (format "~8,2F" 1/3) -> " 0.33" ; padded with 8 spaces, not in MzScheme ;; we can print numbers as binary, octal, or hexadecimal (printf "#b~b #o~o #b~b ~%" 16 8 2) -> #x10 #o10 #b10 ;; or inexact->exact (inexact->exact (- 0.9876 0.9865)) -> 9907919180215/9007199254740992 ;; how about formatting decimals? Thanks, RKD _______________________________________________ Lisp mailing list Lisp@lispnyc.org http://www.lispnyc.org:8080/mailman/listinfo/lisp From jos.koot at telefonica.net Sat May 24 15:48:09 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:47 2009 Subject: [plt-scheme] Fwd: [Lisp] MzScheme string formatting References: <294271.68557.qm@web63002.mail.re1.yahoo.com> <35d822270805241226v33ada125u464943398364df39@mail.gmail.com> Message-ID: <001501c8bdd7$18149700$2101a8c0@uw2b2dff239c4d> May be http://www.telefonica.net/web2/koot/fmt.zip can be useful for you. If you like another file format (or anotrher format instr), please let me now. Jos ----- Original Message ----- From: "Paul A. Steckler" To: Sent: Saturday, May 24, 2008 9:26 PM Subject: [plt-scheme] Fwd: [Lisp] MzScheme string formatting > Forwarded from the LispNYC list. I told the poster to try plt-scheme, > but here's his message in case he doesn't. > > -- Paul > > ---------- Forwarded message ---------- > From: Arkady Andrukonis > Date: Sat, May 24, 2008 at 12:06 PM > Subject: [Lisp] MzScheme string formatting > To: lisp > > > Hi, > > Does anyone have a reference for MzScheme format > string patterns for formatting decimal output? The > online reference does not seem have the format-string > magic. > > (printf format-string input ...) or (format > format-string input ...) > > For example, > > ;; format decimal to 2 places in Java printf("%.2d") > ;; MzScheme produces the following > (- 0.9876 0.9865) -> 0.001099999999999899 > ;; this one does not work > (format "~w,2F~%" (- 0.9876 0.9865)) ; white space not > allowed > ;; this is legal Scheme > (format "~8,2F" 1/3) -> " 0.33" ; padded with 8 > spaces, not in MzScheme > ;; we can print numbers as binary, octal, or > hexadecimal > (printf "#b~b #o~o #b~b ~%" 16 8 2) -> #x10 #o10 #b10 > ;; or inexact->exact > (inexact->exact (- 0.9876 0.9865)) -> > 9907919180215/9007199254740992 > ;; how about formatting decimals? > > Thanks, > > RKD > > > > _______________________________________________ > Lisp mailing list > Lisp@lispnyc.org > http://www.lispnyc.org:8080/mailman/listinfo/lisp > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From dyrueta at gmail.com Sat May 24 17:26:21 2008 From: dyrueta at gmail.com (dave yrueta) Date: Thu Mar 26 02:18:47 2009 Subject: [plt-scheme] HtDP 17.7.1 Clarification Requested Message-ID: Hi All -- Can someone clarify the meaning of HtDP problems 17.7.1 and 17.7.2? 17.7.1 --??represent the application of a user-defined function to an expression such as (f ( + 1 1)) or (* 3 (g 2)). The application should be represented as a structure with two fields. The first field contains the name of the function, the second one the representation of the argument expression.? So, if a Function Application (fa) structure is defined as -- (make-fa nof arg-exp) -- where nof is the name-of-the-function, and arg-exp is some Scheme Expression(sx, defined below), what is meant by ?the name of the function?? For example, when considering (f (+ 1 1)) above, if f is equivalent to -- (define(f x) (+ x 3)) -- then is the ?name of the function? 1. ?f (a symbol) 2. (define f (make-add ?x 3)), or 3. something else? Similarly, exercise 17.7.2 asks for a Function Definition (fd) structure, which includes the function name, a single parameter name, and the body-- (make-fd nof nop body) --where nof and nop are symbols and the body is some Scheme Expression (sx). Hence, when applied to a Function Definition structure, (define(f x(+ 3 x)) would become -- (make-struct ?f ?x (make-add 3 ?x))). But what about a function which references f, such as (define(h u)(f(* 2 u))? If the Function Application structure is used here to replace (f(* 2 u)), how is the attribute for ?name of the function? defined? 1. As a Function Definition (fd) structure (define f (make-struct ?f ?x (make-add 3 ?x)))? 2. Some other Scheme Expression (sx) , such as ?f, or (define f(make- add 3 ?x))? This problem builds on the data definition for Scheme Expressions (sx) in exercise 14.4.1, which I defined as follows: A Scheme Expression (sx) is 1. a number (n) 2. a symbol (s) 3. a structure for primitive ?+ (make-add sx sx) 4. a structure for primitive ?* (make-mul sx sx) Thanks, Dave Yrueta From dyrueta at gmail.com Sat May 24 21:24:12 2008 From: dyrueta at gmail.com (dave yrueta) Date: Thu Mar 26 02:18:48 2009 Subject: [plt-scheme] Re: HtDP 17.7.1 Clarification Requested In-Reply-To: References: Message-ID: After a little further study, I think I arrived at the proper data definition and the solution to exercise 17.7.3. Comments are welcome. Here's what I came up with -- ; A Scheme Expression (sx) is ; 1. a number (n), or ; 2. a symbol (s), or ; 3. an add-structure (make-add left right) where left and right are sx ; 4. a mul-structure (make-mul left right) where left and right are sx ; 5. a function-application structure (make-fa nof arg-ex) where nof is a function name, and arg-exp is a sx ; A Function Definition (fa) is ; a fa-structure (make-def nof nop body) ; where nof(name-of-function) and nop(name-of-parameter) are symbols, and body is a sx (define-struct fa(nof arg-exp)) (define-struct fd(nof nop body)) (define d1(make-fd 'f 'x (make-add 3 'x))) (define d2(make-fd 'g 'x (make-mul 3 'x))) (define d3(make-fd 'h 'u (make-fa d1 (make-mul 2 'u)))) (define d4(make-fd 'i 'v (make-add(make-mul 'v 'v)(make-mul 'v 'v)))) (define d5(make-fd 'k 'w (make-mul(make-fa d3 'w)(make-fa d4 'w)))) ;;17.7.3 ;;evaluate-with-one-def: sx P > error or Scheme Expression ;;consumes a Scheme Expression and a Function Definition, and returns either an 'error or the evaluated Scheme Expression (define(evaluate-with-one-def sx P) (cond [(numeric? sx) (cond [(number? sx)(evaluate-expression(subs(fd-nop P)sx(fd-body P)))] [else(evaluate-with-one-def (evaluate-expression sx)P)])] [else 'error])) ;;subst:symbol number scheme-expression > scheme-expression ;;consumes a symbol, number and scheme-expression, substitutes all instances of the symbol appearing in the scheme-expression with the number, and then returns a structurally equivalent expression. (define(subs sym num sx) (cond [(mul? sx)(make-mul (subs sym num (mul-left sx))(subs sym num (mul- right sx)))] [(add? sx)(make-add (subs sym num (add-left sx))(subs sym num (add- right sx)))] [(fa? sx) (evaluate-with-one-def(subs sym num (fa-arg-exp sx))(fa- nof sx))] [(number? sx)sx] [(symbol=? sym sx)num] [else sx])) (define(numeric? sx) (cond [(number? sx)true] [(struct? sx)(test-struc sx)] [else false])) (define(test-struc sx) (cond [(mul? sx)(and(numeric? (mul-left sx))(numeric? (mul-right sx)))] [else (and(numeric? (add-left sx))(numeric? (add-right sx)))])) (define(evaluate-expression nx) (cond [(boolean=? (numeric? nx)false)'error] [else (process-nx nx)])) (define(process-nx nx) (cond [(number? nx)nx] [(mul? nx)(*(evaluate-expression (mul-left nx))(evaluate- expression (mul-right nx)))] [else (+(evaluate-expression (add-left nx))(evaluate-expression (add-right nx)))])) On May 24, 2:26 pm, dave yrueta wrote: > Hi All -- > Can someone clarify the meaning of HtDP problems 17.7.1 and 17.7.2? > > 17.7.1 --??represent the application of a user-defined function to an > expression such as (f ( + 1 1)) or (* 3 (g 2)). The application > should be represented as a structure with two fields. The first field > contains the name of the function, the second one the representation > of the argument expression.? > > So, if a Function Application (fa) structure is defined as -- > (make-fa nof arg-exp) > -- where nof is the name-of-the-function, and arg-exp is some Scheme > Expression(sx, defined below), what is meant by ?the name of the > function?? > > For example, when considering (f (+ 1 1)) above, if f is equivalent to > -- > (define(f x) > (+ x 3)) > > -- then is the ?name of the function? > 1. ?f (a symbol) > 2. (define f (make-add ?x 3)), or > 3. something else? > > Similarly, exercise 17.7.2 asks for a Function Definition (fd) > structure, which includes the function name, a single parameter name, > and the body-- > (make-fd nof nop body) > --where nof and nop are symbols and the body is some Scheme Expression > (sx). > > Hence, when applied to a Function Definition structure, (define(f x(+ > 3 x)) would become -- > (make-struct ?f ?x (make-add 3 ?x))). > > But what about a function which references f, such as > (define(h u)(f(* 2 u))? > > If the Function Application structure is used here to replace (f(* 2 > u)), how is the attribute for ?name of the function? defined? > 1. As a Function Definition (fd) structure (define f (make-struct ?f > ?x (make-add 3 ?x)))? > 2. Some other Scheme Expression (sx) , such as ?f, or (define f(make- > add 3 ?x))? > > This problem builds on the data definition for Scheme Expressions (sx) > in exercise 14.4.1, which I defined as follows: > A Scheme Expression (sx) is > 1. a number (n) > 2. a symbol (s) > 3. a structure for primitive ?+ (make-add sx sx) > 4. a structure for primitive ?* (make-mul sx sx) > > Thanks, > Dave Yrueta > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From dyoo at cs.wpi.edu Sat May 24 23:23:58 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:48 2009 Subject: [plt-scheme] editor snips and replacing the editor with set-editor Message-ID: Hi everyone, I'm trying to create an editor snip that doesn't allow further edits to it. I tried the following, but the resulting snips that show up on the interaction window continue to allow internal editing. I'm missing something obvious but I don't quite see the problem yet. Any suggestions? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang scheme/base (require scheme/gui/base scheme/list scheme/class scheme/sandbox) (define immutable-text% (class text% (inherit insert) (init content) (define after-initialize? #f) (define (initialize) (super-new) (insert content) (set! after-initialize? #t)) (define/augment (can-insert? pos len) (not after-initialize?)) (define/augment (can-delete? pos len) (not after-initialize?)) (initialize))) (define immutable-editor-snip% (class editor-snip% (inherit set-editor) (init content) (define (initialize) (super-new) (set-editor (new immutable-text% [content content]))) (initialize))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From ryanc at ccs.neu.edu Sat May 24 23:38:43 2008 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Thu Mar 26 02:18:48 2009 Subject: [plt-scheme] editor snips and replacing the editor with set-editor In-Reply-To: References: Message-ID: <4838DF43.6080205@ccs.neu.edu> Danny Yoo wrote: > Hi everyone, > > I'm trying to create an editor snip that doesn't allow further edits to > it. I tried the following, but the resulting snips that show up on the > interaction window continue to allow internal editing. I'm missing > something obvious but I don't quite see the problem yet. > > Any suggestions? I think the DrScheme printer makes a copy of the snip before inserting it into the interactions editor. You probably just need to implement the 'copy' method correctly. If the snip works as expected in guis you create and just misbehaves in the interaction window, that's probably the issue. Ryan From dyoo at cs.wpi.edu Sat May 24 23:41:51 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:48 2009 Subject: [plt-scheme] editor snips and replacing the editor with set-editor In-Reply-To: References: Message-ID: > I'm trying to create an editor snip that doesn't allow further edits to it. > I tried the following, but the resulting snips that show up on the > interaction window continue to allow internal editing. I'm missing something > obvious but I don't quite see the problem yet. ... and, of course, five minutes later, I see the problem. Doh. Sorry for bothering people. Summary: I didn't realize that a call to the 'copy' method fires off when the snip shows up on the interaction window. So for any of the custom snips I write, I must make sure to define a copy method for them. The following code does sorta what I want, although I suspect I need to be much more careful. I guess I really do need to look closely at the snipclass stuff to preserve my snips under other situations like saving to disk. ;;;;;; #lang scheme/base (require scheme/gui/base scheme/list scheme/class scheme/sandbox) (define immutable-text% (class text% (inherit insert) (init content) (define after-initialize? #f) (define (initialize) (super-new) (insert content) (set! after-initialize? #t)) (define/augment (can-insert? pos len) (not after-initialize?)) (define/augment (can-delete? pos len) (not after-initialize?)) (initialize))) (define immutable-editor-snip% (class editor-snip% (inherit set-editor) (init-field content) (define (initialize) (super-new [editor (new immutable-text% [content content])])) (define/override (copy) (new immutable-editor-snip% [content content])) (initialize))) From philrand at gmail.com Sun May 25 01:47:30 2008 From: philrand at gmail.com (Phil Rand) Date: Thu Mar 26 02:18:48 2009 Subject: [plt-scheme] OT goodbye bug icons In-Reply-To: <904774730805241132q111516bu199fa6e5297dce9c@mail.gmail.com> References: <595b9ab20805240624k134dd0abx901e4faa9e7f47f4@mail.gmail.com> <932b2f1f0805240626q48c89c84vd55694242592e005@mail.gmail.com> <904774730805241132q111516bu199fa6e5297dce9c@mail.gmail.com> Message-ID: <5784c1b10805242247x65cc7081kaaa4aff0000f2eaa@mail.gmail.com> Sometimes I enjoy the gmail ads as much as the list messages. On Sat, May 24, 2008 at 11:32 AM, Todd O'Bryan wrote: > Did anyone else get this ad from gmail for this thread? :-) > > How to Kill Bed Bugs - www.NaturalBedBugKiller.com - Kill Bed Bugs > instantly. 100% safe. Free shipping - Only $24.87. > > On Sat, May 24, 2008 at 9:26 AM, Robby Findler wrote: >> Oh, they're not gone -- they've just gotten worse. ;) >> >> Robby >> >> On Sat, May 24, 2008 at 8:24 AM, Stephen De Gabrielle >> wrote: >>> I've just noticed the 'bug behind red circle with line through it' >>> icon has been replaced by a 'fuse-bomb'. in my yesterdays svn build. >>> Bye bye bugs. >>> >>> >>> Stephen >>> >>> -- >>> Stephen De Gabrielle >>> s.degabrielle@cs.ucl.ac.uk >>> Telephone +44 (0)20 7679 0693 (x30693) >>> Mobile 079 851 890 45 >>> Project: Making Sense of Information (MaSI) >>> http://www.uclic.ucl.ac.uk/annb/MaSI.html >>> >>> UCL Interaction Centre >>> MPEB 8th floor >>> University College London >>> Gower Street >>> London WC1E 6BT >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>> >>> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- Phil Rand philrand@pobox.com From philrand at gmail.com Sun May 25 01:55:42 2008 From: philrand at gmail.com (Phil Rand) Date: Thu Mar 26 02:18:48 2009 Subject: [plt-scheme] Lost my command-I in OSX 10.5 Leopard Message-ID: <5784c1b10805242255r63775f23o76dcc75ea5b77fa6@mail.gmail.com> I'm using PLT Scheme 372, and upgraded my Mac OSX to 10.5 Leopard a few days ago. I've just noticed the command-i key now just inserts an "i" character, where I was expecting reindent-all. Menu item Scheme -> Reindent All still works, and is marked with the hot-key command-I as always. What am I missing? -- Phil Rand philrand@pobox.com From dyoo at cs.wpi.edu Sun May 25 03:04:32 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:49 2009 Subject: [plt-scheme] Does the autoloading of snip-classes support a PLaneT source? Message-ID: I see that if the snip-class name is of the form "(lib ...)" that the snipclass can be dynamic-required. Can the the same support be available for PLaneT-derived snips? I'm looking at mred/private/snipfile.ss, and I see that the definition for "ok-lib-path?" only allows snip-classes to be auto-loaded from collections. If that definition could be expanded to also allow PLaneT packages (maybe by just using module-path?), that would be nice. From geoff at knauth.org Sun May 25 08:05:41 2008 From: geoff at knauth.org (Geoffrey S. Knauth) Date: Thu Mar 26 02:18:49 2009 Subject: [plt-scheme] Lost my command-I in OSX 10.5 Leopard In-Reply-To: <5784c1b10805242255r63775f23o76dcc75ea5b77fa6@mail.gmail.com> References: <5784c1b10805242255r63775f23o76dcc75ea5b77fa6@mail.gmail.com> Message-ID: Phil: I'm running Mac OS X 10.5.2. I just cranked up v372, opened a file, messed up the indentation, pressed Cmd-i (together), and the file reindented itself correctly. I wonder if you have another mapping for Cmd-i in your Keyboard & Mouse System Preferences. I'm sure I've installed v372 since upgrading to Leopard, since I upgraded to Leopard in early summer 2007 and then to v372 in late summer. Maybe the Leopard upgrade itself does something funny. --Geoff On May 25, 2008, at 01:55, Phil Rand wrote: > I'm using PLT Scheme 372, and upgraded my Mac OSX to 10.5 Leopard a > few days ago. > > I've just noticed the command-i key now just inserts an "i" character, > where I was expecting reindent-all. > > Menu item Scheme -> Reindent All still works, and is marked with the > hot-key command-I as always. > > What am I missing? > > -- > Phil Rand > philrand@pobox.com From mflatt at cs.utah.edu Sun May 25 08:13:37 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:49 2009 Subject: [plt-scheme] Does the autoloading of snip-classes support a PLaneT source? In-Reply-To: References: Message-ID: <20080525121339.C8BA6650146@mail-svr1.cs.utah.edu> At Sun, 25 May 2008 03:04:32 -0400 (EDT), Danny Yoo wrote: > I see that if the snip-class name is of the form "(lib ...)" that the > snipclass can be dynamic-required. Can the the same support be available > for PLaneT-derived snips? > > I'm looking at mred/private/snipfile.ss, and I see that the definition for > "ok-lib-path?" only allows snip-classes to be auto-loaded from > collections. If that definition could be expanded to also allow PLaneT > packages (maybe by just using module-path?), that would be nice. We haven't allowed this, so far, because it would mean that merely opening a file in DrScheme would be enough to have code downloaded and installed on your machine. Running a program that uses a Planet library also downloads and installs, but you at least have the option of looking at a file and deciding whether you trust the libraries before you execute it. Probably the solution is to allow Planet paths in combination with a dialog that notifies the user that code is being downloaded, and that proceeds only if allowed. Matthew From robby at cs.uchicago.edu Sun May 25 08:23:24 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:49 2009 Subject: [plt-scheme] Does the autoloading of snip-classes support a PLaneT source? In-Reply-To: <20080525121339.C8BA6650146@mail-svr1.cs.utah.edu> References: <20080525121339.C8BA6650146@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0805250523r1ca08513p80d8b1ce43d40556@mail.gmail.com> On Sun, May 25, 2008 at 7:13 AM, Matthew Flatt wrote: > At Sun, 25 May 2008 03:04:32 -0400 (EDT), Danny Yoo wrote: >> I see that if the snip-class name is of the form "(lib ...)" that the >> snipclass can be dynamic-required. Can the the same support be available >> for PLaneT-derived snips? >> >> I'm looking at mred/private/snipfile.ss, and I see that the definition for >> "ok-lib-path?" only allows snip-classes to be auto-loaded from >> collections. If that definition could be expanded to also allow PLaneT >> packages (maybe by just using module-path?), that would be nice. > > We haven't allowed this, so far, because it would mean that merely > opening a file in DrScheme would be enough to have code downloaded and > installed on your machine. > > Running a program that uses a Planet library also downloads and > installs, but you at least have the option of looking at a file and > deciding whether you trust the libraries before you execute it. > > Probably the solution is to allow Planet paths in combination with a > dialog that notifies the user that code is being downloaded, and that > proceeds only if allowed. I don't particularly like that solution (eg: http://www.youtube.com/watch?v=FfetbidVUYw) But perhaps a variant where the questionable snips can be clicked on to be downloaded and installed? Robby From matthias at ccs.neu.edu Sun May 25 09:55:10 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:49 2009 Subject: [plt-scheme] Re: HtDP 17.7.1 Clarification Requested In-Reply-To: References: Message-ID: Good. -- Matthias On May 24, 2008, at 9:24 PM, dave yrueta wrote: > After a little further study, I think I arrived at the proper data > definition and the solution to exercise 17.7.3. Comments are > welcome. > > Here's what I came up with -- > > ; A Scheme Expression (sx) is > ; 1. a number (n), or > ; 2. a symbol (s), or > ; 3. an add-structure (make-add left right) where left and right are > sx > ; 4. a mul-structure (make-mul left right) where left and right are sx > ; 5. a function-application structure (make-fa nof arg-ex) where nof > is a function name, and arg-exp is a sx > > ; A Function Definition (fa) is > ; a fa-structure (make-def nof nop body) > ; where nof(name-of-function) and nop(name-of-parameter) are symbols, > and body is a sx > > (define-struct fa(nof arg-exp)) > (define-struct fd(nof nop body)) > > (define d1(make-fd 'f 'x (make-add 3 'x))) > (define d2(make-fd 'g 'x (make-mul 3 'x))) > (define d3(make-fd 'h 'u (make-fa d1 (make-mul 2 'u)))) > (define d4(make-fd 'i 'v (make-add(make-mul 'v 'v)(make-mul 'v 'v)))) > (define d5(make-fd 'k 'w (make-mul(make-fa d3 'w)(make-fa d4 'w)))) > > ;;17.7.3 > ;;evaluate-with-one-def: sx P > error or Scheme Expression > ;;consumes a Scheme Expression and a Function Definition, and returns > either an 'error or the evaluated Scheme Expression > (define(evaluate-with-one-def sx P) > (cond > [(numeric? sx) > (cond > [(number? sx)(evaluate-expression(subs(fd-nop P)sx(fd-body > P)))] > [else(evaluate-with-one-def (evaluate-expression sx)P)])] > [else 'error])) > > ;;subst:symbol number scheme-expression > scheme-expression > ;;consumes a symbol, number and scheme-expression, substitutes all > instances of the symbol appearing in the scheme-expression with the > number, and then returns a structurally equivalent expression. > (define(subs sym num sx) > (cond > [(mul? sx)(make-mul (subs sym num (mul-left sx))(subs sym num > (mul- > right sx)))] > [(add? sx)(make-add (subs sym num (add-left sx))(subs sym num > (add- > right sx)))] > [(fa? sx) (evaluate-with-one-def(subs sym num (fa-arg-exp sx))(fa- > nof sx))] > [(number? sx)sx] > [(symbol=? sym sx)num] > [else sx])) > > (define(numeric? sx) > (cond > [(number? sx)true] > [(struct? sx)(test-struc sx)] > [else false])) > > (define(test-struc sx) > (cond > [(mul? sx)(and(numeric? (mul-left sx))(numeric? (mul-right sx)))] > [else (and(numeric? (add-left sx))(numeric? (add-right sx)))])) > > (define(evaluate-expression nx) > (cond > [(boolean=? (numeric? nx)false)'error] > [else (process-nx nx)])) > > (define(process-nx nx) > (cond > [(number? nx)nx] > [(mul? nx)(*(evaluate-expression (mul-left nx))(evaluate- > expression (mul-right nx)))] > [else (+(evaluate-expression (add-left nx))(evaluate-expression > (add-right nx)))])) > > On May 24, 2:26 pm, dave yrueta wrote: >> Hi All -- >> Can someone clarify the meaning of HtDP problems 17.7.1 and 17.7.2? >> >> 17.7.1 --??represent the application of a user-defined function to an >> expression such as (f ( + 1 1)) or (* 3 (g 2)). The application >> should be represented as a structure with two fields. The first field >> contains the name of the function, the second one the representation >> of the argument expression.? >> >> So, if a Function Application (fa) structure is defined as -- >> (make-fa nof arg-exp) >> -- where nof is the name-of-the-function, and arg-exp is some Scheme >> Expression(sx, defined below), what is meant by ?the name of the >> function?? >> >> For example, when considering (f (+ 1 1)) above, if f is >> equivalent to >> -- >> (define(f x) >> (+ x 3)) >> >> -- then is the ?name of the function? >> 1. ?f (a symbol) >> 2. (define f (make-add ?x 3)), or >> 3. something else? >> >> Similarly, exercise 17.7.2 asks for a Function Definition (fd) >> structure, which includes the function name, a single parameter name, >> and the body-- >> (make-fd nof nop body) >> --where nof and nop are symbols and the body is some Scheme >> Expression >> (sx). >> >> Hence, when applied to a Function Definition structure, (define(f x(+ >> 3 x)) would become -- >> (make-struct ?f ?x (make-add 3 ?x))). >> >> But what about a function which references f, such as >> (define(h u)(f(* 2 u))? >> >> If the Function Application structure is used here to replace (f(* 2 >> u)), how is the attribute for ?name of the function? defined? >> 1. As a Function Definition (fd) structure (define f (make- >> struct ?f >> ?x (make-add 3 ?x)))? >> 2. Some other Scheme Expression (sx) , such as ?f, or (define >> f(make- >> add 3 ?x))? >> >> This problem builds on the data definition for Scheme Expressions >> (sx) >> in exercise 14.4.1, which I defined as follows: >> A Scheme Expression (sx) is >> 1. a number (n) >> 2. a symbol (s) >> 3. a structure for primitive ?+ (make-add sx sx) >> 4. a structure for primitive ?* (make-mul sx sx) >> >> Thanks, >> Dave Yrueta >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From diggerrrrr at gmail.com Sun May 25 10:10:06 2008 From: diggerrrrr at gmail.com (Veer) Date: Thu Mar 26 02:18:49 2009 Subject: [plt-scheme] What is needed to use gensym? Message-ID: The expression (gensym 'a) give me the error "reference to undefined identifier: gensym" . Do i need to add some teachpack or something else? This is in context of exercise 32.1.3 page 472. I am using DrScheme, version 372 [3m]. Thanks Veer From philrand at gmail.com Sun May 25 11:08:09 2008 From: philrand at gmail.com (Phil Rand) Date: Thu Mar 26 02:18:49 2009 Subject: [plt-scheme] Lost my command-I in OSX 10.5 Leopard In-Reply-To: References: <5784c1b10805242255r63775f23o76dcc75ea5b77fa6@mail.gmail.com> Message-ID: <5784c1b10805250808v1dae06atbad84206bc913022@mail.gmail.com> Thanks Geoff, I've been through my system preferences keyboard shortcuts, and didn't see any for command-i. On Sun, May 25, 2008 at 5:05 AM, Geoffrey S. Knauth wrote: > Phil: I'm running Mac OS X 10.5.2. I just cranked up v372, opened a file, > messed up the indentation, pressed Cmd-i (together), and the file reindented > itself correctly. I wonder if you have another mapping for Cmd-i in your > Keyboard & Mouse System Preferences. > > I'm sure I've installed v372 since upgrading to Leopard, since I upgraded to > Leopard in early summer 2007 and then to v372 in late summer. Maybe the > Leopard upgrade itself does something funny. > > --Geoff > > On May 25, 2008, at 01:55, Phil Rand wrote: > >> I'm using PLT Scheme 372, and upgraded my Mac OSX to 10.5 Leopard a >> few days ago. >> >> I've just noticed the command-i key now just inserts an "i" character, >> where I was expecting reindent-all. >> >> Menu item Scheme -> Reindent All still works, and is marked with the >> hot-key command-I as always. >> >> What am I missing? >> >> -- >> Phil Rand >> philrand@pobox.com > -- Phil Rand philrand@pobox.com From philrand at gmail.com Sun May 25 12:12:49 2008 From: philrand at gmail.com (Phil Rand) Date: Thu Mar 26 02:18:50 2009 Subject: [plt-scheme] Lost my command-I in OSX 10.5 Leopard In-Reply-To: <5784c1b10805250808v1dae06atbad84206bc913022@mail.gmail.com> References: <5784c1b10805242255r63775f23o76dcc75ea5b77fa6@mail.gmail.com> <5784c1b10805250808v1dae06atbad84206bc913022@mail.gmail.com> Message-ID: <5784c1b10805250912h1d771c97vbaec656e609bf573@mail.gmail.com> Interestingly, when I press command-i, the scheme menu flashes, but no reindent, and an "i" is inserted in the text. I fiddled around with f-script, but I didn't know enough about either Cocoa or F-script to make any sense of what I saw. I also checked the system preferences for assistive technologies (I have typical middle-aged trouble with focusing close up, so I thought I might have experimented with something in there) -- nothing found. There's a drscheme preference, Editing -> General -> Enable key bindings in menus, which turns off the flash I mentioned above when unchecked, but doesn't fix the problem when checked. On Sun, May 25, 2008 at 8:08 AM, Phil Rand wrote: > Thanks Geoff, > > I've been through my system preferences keyboard shortcuts, and didn't > see any for command-i. > > > On Sun, May 25, 2008 at 5:05 AM, Geoffrey S. Knauth wrote: >> Phil: I'm running Mac OS X 10.5.2. I just cranked up v372, opened a file, >> messed up the indentation, pressed Cmd-i (together), and the file reindented >> itself correctly. I wonder if you have another mapping for Cmd-i in your >> Keyboard & Mouse System Preferences. >> >> I'm sure I've installed v372 since upgrading to Leopard, since I upgraded to >> Leopard in early summer 2007 and then to v372 in late summer. Maybe the >> Leopard upgrade itself does something funny. >> >> --Geoff >> >> On May 25, 2008, at 01:55, Phil Rand wrote: >> >>> I'm using PLT Scheme 372, and upgraded my Mac OSX to 10.5 Leopard a >>> few days ago. >>> >>> I've just noticed the command-i key now just inserts an "i" character, >>> where I was expecting reindent-all. >>> >>> Menu item Scheme -> Reindent All still works, and is marked with the >>> hot-key command-I as always. >>> >>> What am I missing? >>> >>> -- >>> Phil Rand >>> philrand@pobox.com >> > > > > -- > Phil Rand > philrand@pobox.com > -- Phil Rand philrand@pobox.com From raj_nandam at yahoo.com Sun May 25 12:14:48 2008 From: raj_nandam at yahoo.com (raj nandam) Date: Thu Mar 26 02:18:50 2009 Subject: [plt-scheme] plt-scheme Digest, Vol 33, Issue 51 In-Reply-To: <20080525160008.06D3C402A7@qua.cs.brown.edu> Message-ID: <140479.74651.qm@web52006.mail.re2.yahoo.com> plt-scheme-request@list.cs.brown.edu wrote: Send plt-scheme mailing list submissions to plt-scheme@list.cs.brown.edu To subscribe or unsubscribe via the World Wide Web, visit http://list.cs.brown.edu/mailman/listinfo/plt-scheme or, via email, send a message with subject or body 'help' to plt-scheme-request@list.cs.brown.edu You can reach the person managing the list at plt-scheme-owner@list.cs.brown.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of plt-scheme digest..." [Please handle PLT Scheme list administrative tasks through the Web: http://list.cs.brown.edu/mailman/listinfo/plt-scheme] Today's Topics: 1. What is needed to use gensym? (Veer) 2. Re: Lost my command-I in OSX 10.5 Leopard (Phil Rand) ---------------------------------------------------------------------- Message: 1 Date: Sun, 25 May 2008 19:40:06 +0530 From: Veer Subject: [plt-scheme] What is needed to use gensym? To: "PLT Scheme List" Message-ID: Content-Type: text/plain; charset=ISO-8859-1 The expression (gensym 'a) give me the error "reference to undefined identifier: gensym" . Do i need to add some teachpack or something else? This is in context of exercise 32.1.3 page 472. I am using DrScheme, version 372 [3m]. Thanks Veer ------------------------------ Message: 2 Date: Sun, 25 May 2008 08:08:09 -0700 From: "Phil Rand" Subject: Re: [plt-scheme] Lost my command-I in OSX 10.5 Leopard To: "Geoffrey S. Knauth" , "PLT Scheme List" Message-ID: <5784c1b10805250808v1dae06atbad84206bc913022@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Thanks Geoff, I've been through my system preferences keyboard shortcuts, and didn't see any for command-i. On Sun, May 25, 2008 at 5:05 AM, Geoffrey S. Knauth wrote: > Phil: I'm running Mac OS X 10.5.2. I just cranked up v372, opened a file, > messed up the indentation, pressed Cmd-i (together), and the file reindented > itself correctly. I wonder if you have another mapping for Cmd-i in your > Keyboard & Mouse System Preferences. > > I'm sure I've installed v372 since upgrading to Leopard, since I upgraded to > Leopard in early summer 2007 and then to v372 in late summer. Maybe the > Leopard upgrade itself does something funny. > > --Geoff > > On May 25, 2008, at 01:55, Phil Rand wrote: > >> I'm using PLT Scheme 372, and upgraded my Mac OSX to 10.5 Leopard a >> few days ago. >> >> I've just noticed the command-i key now just inserts an "i" character, >> where I was expecting reindent-all. >> >> Menu item Scheme -> Reindent All still works, and is marked with the >> hot-key command-I as always. >> >> What am I missing? >> >> -- >> Phil Rand >> philrand@pobox.com > -- Phil Rand philrand@pobox.com End of plt-scheme Digest, Vol 33, Issue 51 ****************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080525/c59915c7/attachment.html From cobbe at ccs.neu.edu Sun May 25 12:29:44 2008 From: cobbe at ccs.neu.edu (Richard Cobbe) Date: Thu Mar 26 02:18:50 2009 Subject: [plt-scheme] xml library: getting DTD information Message-ID: <20080525162944.GA493@perdita.local> I'm having a little difficulty with the XML library, and I'm not sure whether this is a bug in the library or in my XML file. DrScheme 3.99.0.25-svn19may2008, Mac OS 10.5.2. I have this saved as /Users/cobbe/test.xml: I don't know if this is relevant, but /System/Library/DTDs/KeyboardLayout.dtd exists on my machine. (Also probably irrelevant: the XML file above doesn't match the DTD; it's missing several required elements inside the 'keyboard' tag. But I get the same results when I use the full file, of which the above example is a small excerpt.) When I read the XML document using the built-in xml library, I'm able to see everything *except* the DOCTYPE: > (define p (open-input-file "/Users/cobbe/test.xml")) > (require xml) > (define doc (read-xml p)) > (close-input-port p) > (document-misc doc) () This is slightly odd; according to the docs, `document-misc' is supposed to return a comment or a pcdata, not a list. Don't know if this is relevant, though. > (define prolog (document-prolog doc)) > (prolog-misc prolog) (#) > (p-i-target-name (car (prolog-misc prolog))) xml > (p-i-instruction (car (prolog-misc prolog))) "version=\"1.1\" encoding=\"UTF-8\"" This next is the surprising bit; I'd expect to get some representation of the DOCTYPE line here: > (prolog-dtd prolog) #f I'm not familiar enough with XML to know what could appear in the misc2 slot, so I don't know if this is the Right Thing: > (prolog-misc2 prolog) () And the rest is what I'd expect: > (define elt (document-element doc)) > (element-name elt) keyboard > (element-attributes elt) (# # # #) > (element-content elt) (#) > (pcdata-string (car (element-content elt))) "\n" > (map (lambda (a) (list (attribute-name a) (attribute-value a))) (element-attributes elt)) ((group "126") (id "-2") (maxout "3") (name "US Extended")) Now, I'm no XML expert, so I'm quite prepared to believe that the XML file is ill-formed. I did check the W3C's XML tutorial, though, and the DOCTYPE declaration does appear to match the examples they give, so it looks good to me. I did try changing the DOCTYPE line to use just an absolute pathname rather than a URI, and then just the filename "KeyboardLayout.dtd" (which I copied into the same directory as the XML file) but this didn't change anything. Is this a bug in the XML library, or did I miss something? Thanks, Richard From grettke at acm.org Sun May 25 14:04:54 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:51 2009 Subject: [plt-scheme] OT goodbye bug icons In-Reply-To: <904774730805241132q111516bu199fa6e5297dce9c@mail.gmail.com> References: <595b9ab20805240624k134dd0abx901e4faa9e7f47f4@mail.gmail.com> <932b2f1f0805240626q48c89c84vd55694242592e005@mail.gmail.com> <904774730805241132q111516bu199fa6e5297dce9c@mail.gmail.com> Message-ID: <756daca50805251104j5e3524e0p2742219bbc49d614@mail.gmail.com> On Sat, May 24, 2008 at 1:32 PM, Todd O'Bryan wrote: > Did anyone else get this ad from gmail for this thread? :-) No. From workmin at ccs.neu.edu Mon May 26 00:45:29 2008 From: workmin at ccs.neu.edu (Jon Rafkind) Date: Thu Mar 26 02:18:51 2009 Subject: [plt-scheme] 3.99: lazy + match ? Message-ID: <483A4069.8080506@ccs.neu.edu> I am trying to use match and the lazy language together but they don't seem to be cooperating. Should this work? #lang lazy (require scheme/match) (define-struct f (x)) (printf "test1 ~a\n" (match (make-f 1) ((struct f (x)) 'ok))) > match: no matching clause for # === context === /home/kazzmir/svn/plt/trunk/collects/scheme/match/patterns.ss:17:0: match:error It works fine in #lang scheme. I'm running from svn, r9936( mzscheme v3.99.0.25 ). From dekudekuplex at yahoo.com Mon May 26 00:47:06 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:51 2009 Subject: [plt-scheme] Lost my command-I in OSX 10.5 Leopard In-Reply-To: <5784c1b10805250912h1d771c97vbaec656e609bf573@mail.gmail.com> Message-ID: <940393.96767.qm@web30204.mail.mud.yahoo.com> This is just a hunch, but since this problem occurred just after you upgraded to Mac OS X 10.5.2 Leopard, I suspect that command-i may be being intercepted as some kind of special command by the operating system. A few years ago, I had a mysterious problem in Mac OS X 10.2.8 Jaguar in which the ESC key was intercepted by the voice recognition system. You may want to double-check all the applets in your System Preferences to ensure that command-i isn't being interrupted by the OS. In particular, I would focus on Universal Access and, if you use it, Voice Recognition. Benjamin L. Russell --- On Mon, 5/26/08, Phil Rand wrote: > From: Phil Rand > Subject: Re: [plt-scheme] Lost my command-I in OSX 10.5 Leopard > To: "Geoffrey S. Knauth" , "PLT Scheme List" > Date: Monday, May 26, 2008, 1:12 AM > Interestingly, when I press command-i, the scheme menu > flashes, but no > reindent, and an "i" is inserted in the text. > > I fiddled around with f-script, but I didn't know > enough about either > Cocoa or F-script to make any sense of what I saw. > > I also checked the system preferences for assistive > technologies (I > have typical middle-aged trouble with focusing close up, so > I thought > I might have experimented with something in there) -- > nothing found. > > There's a drscheme preference, Editing -> General > -> Enable key > bindings in menus, which turns off the flash I mentioned > above when > unchecked, but doesn't fix the problem when checked. > > On Sun, May 25, 2008 at 8:08 AM, Phil Rand > wrote: > > Thanks Geoff, > > > > I've been through my system preferences keyboard > shortcuts, and didn't > > see any for command-i. > > > > > > On Sun, May 25, 2008 at 5:05 AM, Geoffrey S. Knauth > wrote: > >> Phil: I'm running Mac OS X 10.5.2. I just > cranked up v372, opened a file, > >> messed up the indentation, pressed Cmd-i > (together), and the file reindented > >> itself correctly. I wonder if you have another > mapping for Cmd-i in your > >> Keyboard & Mouse System Preferences. > >> > >> I'm sure I've installed v372 since > upgrading to Leopard, since I upgraded to > >> Leopard in early summer 2007 and then to v372 in > late summer. Maybe the > >> Leopard upgrade itself does something funny. > >> > >> --Geoff > >> > >> On May 25, 2008, at 01:55, Phil Rand wrote: > >> > >>> I'm using PLT Scheme 372, and upgraded my > Mac OSX to 10.5 Leopard a > >>> few days ago. > >>> > >>> I've just noticed the command-i key now > just inserts an "i" character, > >>> where I was expecting reindent-all. > >>> > >>> Menu item Scheme -> Reindent All still > works, and is marked with the > >>> hot-key command-I as always. > >>> > >>> What am I missing? > >>> > >>> -- > >>> Phil Rand > >>> philrand@pobox.com > >> > > > > > > > > -- > > Phil Rand > > philrand@pobox.com > > > > > > -- > Phil Rand > philrand@pobox.com > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From eli at barzilay.org Mon May 26 01:09:18 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:51 2009 Subject: [plt-scheme] 3.99: lazy + match ? In-Reply-To: <483A4069.8080506@ccs.neu.edu> References: <483A4069.8080506@ccs.neu.edu> Message-ID: <18490.17918.462498.762860@arabic.ccs.neu.edu> On May 26, Jon Rafkind wrote: > I am trying to use match and the lazy language together but they > don't seem to be cooperating. Should this work? No, not without some explicit efforts that integrate `match' into the lazy language. The easy solution would be to do that by forcing the matched value, but a proper solution will force just the part that is needed for the match but not more. [You can usually get such magic to happen by re-evaluating the library in the lazy language -- but `match' is big enough that it won't work in this case.] > #lang lazy > (require scheme/match) > > (define-struct f (x)) > > (printf "test1 ~a\n" > (match (make-f 1) > ((struct f (x)) 'ok))) > > > > match: no matching clause for # > > === context === > /home/kazzmir/svn/plt/trunk/collects/scheme/match/patterns.ss:17:0: > match:error > > It works fine in #lang scheme. I'm running from svn, r9936( mzscheme > v3.99.0.25 ). -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From matthias at ccs.neu.edu Mon May 26 09:23:25 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:51 2009 Subject: [plt-scheme] 3.99: lazy + match ? In-Reply-To: <18490.17918.462498.762860@arabic.ccs.neu.edu> References: <483A4069.8080506@ccs.neu.edu> <18490.17918.462498.762860@arabic.ccs.neu.edu> Message-ID: <0F0DF57D-120B-4E8F-8FF5-E1ADC042871C@ccs.neu.edu> Once again the import thing bites us. There is something to be worked out and it is not even close to what Jacob did. On May 26, 2008, at 1:09 AM, Eli Barzilay wrote: > On May 26, Jon Rafkind wrote: >> I am trying to use match and the lazy language together but they >> don't seem to be cooperating. Should this work? > > No, not without some explicit efforts that integrate `match' into the > lazy language. The easy solution would be to do that by forcing the > matched value, but a proper solution will force just the part that is > needed for the match but not more. [You can usually get such magic to > happen by re-evaluating the library in the lazy language -- but > `match' is big enough that it won't work in this case.] > > >> #lang lazy >> (require scheme/match) >> >> (define-struct f (x)) >> >> (printf "test1 ~a\n" >> (match (make-f 1) >> ((struct f (x)) 'ok))) >> >>> >> match: no matching clause for # >> >> === context === >> /home/kazzmir/svn/plt/trunk/collects/scheme/match/patterns.ss:17:0: >> match:error >> >> It works fine in #lang scheme. I'm running from svn, r9936( mzscheme >> v3.99.0.25 ). > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli > Barzilay: > http://www.barzilay.org/ Maze is > Life! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From philrand at gmail.com Tue May 27 00:30:20 2008 From: philrand at gmail.com (Phil Rand) Date: Thu Mar 26 02:18:51 2009 Subject: [plt-scheme] Lost my command-I in OSX 10.5 Leopard In-Reply-To: <940393.96767.qm@web30204.mail.mud.yahoo.com> References: <5784c1b10805250912h1d771c97vbaec656e609bf573@mail.gmail.com> <940393.96767.qm@web30204.mail.mud.yahoo.com> Message-ID: <5784c1b10805262130l49cfdc2cs85f600f24c37e403@mail.gmail.com> Problem solved. I had checked (turned on) the option: DrScheme Preferences -> Editing -> General -> Treat command key as meta. Unchecking it makes command-I do a reindent all, and makes command-w close the current tab, which was also not working (probably others, too). Thanks for the help, Geoff and Benjamin. On Sun, May 25, 2008 at 9:47 PM, Benjamin L. Russell wrote: > This is just a hunch, but since this problem occurred just after you upgraded to Mac OS X 10.5.2 Leopard, I suspect that command-i may be being intercepted as some kind of special command by the operating system. > > A few years ago, I had a mysterious problem in Mac OS X 10.2.8 Jaguar in which the ESC key was intercepted by the voice recognition system. > > You may want to double-check all the applets in your System Preferences to ensure that command-i isn't being interrupted by the OS. In particular, I would focus on Universal Access and, if you use it, Voice Recognition. > > Benjamin L. Russell > > --- On Mon, 5/26/08, Phil Rand wrote: > >> From: Phil Rand >> Subject: Re: [plt-scheme] Lost my command-I in OSX 10.5 Leopard >> To: "Geoffrey S. Knauth" , "PLT Scheme List" >> Date: Monday, May 26, 2008, 1:12 AM >> Interestingly, when I press command-i, the scheme menu >> flashes, but no >> reindent, and an "i" is inserted in the text. >> >> I fiddled around with f-script, but I didn't know >> enough about either >> Cocoa or F-script to make any sense of what I saw. >> >> I also checked the system preferences for assistive >> technologies (I >> have typical middle-aged trouble with focusing close up, so >> I thought >> I might have experimented with something in there) -- >> nothing found. >> >> There's a drscheme preference, Editing -> General >> -> Enable key >> bindings in menus, which turns off the flash I mentioned >> above when >> unchecked, but doesn't fix the problem when checked. >> >> On Sun, May 25, 2008 at 8:08 AM, Phil Rand >> wrote: >> > Thanks Geoff, >> > >> > I've been through my system preferences keyboard >> shortcuts, and didn't >> > see any for command-i. >> > >> > >> > On Sun, May 25, 2008 at 5:05 AM, Geoffrey S. Knauth >> wrote: >> >> Phil: I'm running Mac OS X 10.5.2. I just >> cranked up v372, opened a file, >> >> messed up the indentation, pressed Cmd-i >> (together), and the file reindented >> >> itself correctly. I wonder if you have another >> mapping for Cmd-i in your >> >> Keyboard & Mouse System Preferences. >> >> >> >> I'm sure I've installed v372 since >> upgrading to Leopard, since I upgraded to >> >> Leopard in early summer 2007 and then to v372 in >> late summer. Maybe the >> >> Leopard upgrade itself does something funny. >> >> >> >> --Geoff >> >> >> >> On May 25, 2008, at 01:55, Phil Rand wrote: >> >> >> >>> I'm using PLT Scheme 372, and upgraded my >> Mac OSX to 10.5 Leopard a >> >>> few days ago. >> >>> >> >>> I've just noticed the command-i key now >> just inserts an "i" character, >> >>> where I was expecting reindent-all. >> >>> >> >>> Menu item Scheme -> Reindent All still >> works, and is marked with the >> >>> hot-key command-I as always. >> >>> >> >>> What am I missing? >> >>> >> >>> -- >> >>> Phil Rand >> >>> philrand@pobox.com >> >> >> > >> > >> > >> > -- >> > Phil Rand >> > philrand@pobox.com >> > >> >> >> >> -- >> Phil Rand >> philrand@pobox.com >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- Phil Rand philrand@pobox.com From dekudekuplex at yahoo.com Tue May 27 01:26:52 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:52 2009 Subject: [plt-scheme] Programming the AIBO in Scheme? Message-ID: <604041.47879.qm@web30205.mail.mud.yahoo.com> Does anybody have any libraries and/or manuals for programming the AIBO robot in Scheme (preferably PLT-Scheme? Sony's OPENR-SDK is C++-based, but I would rather use Scheme than C++. A Google search came up with the following semi-relevant pages, none of which seem helpful enough to start programming the AIBO in Scheme: Using Robots in Beginning Computer Science Courses http://www-users.cs.umn.edu/~gini/aibo.html Extending the Next Generation Robot Laboratory to Increase Diversity in Undergraduate CS Programs - Courses: http://faculty.berea.edu/pearcej/aibo/courses.html Extending the Next Generation Robot Laboratory to Increase Diversity in Undergraduate CS Programs - Publications: http://faculty.berea.edu/pearcej/aibo/publications.html M. Gini, J. Pearce, and K. Sutherland. "Using the Sony AIBOs to Increase Diversity in Undergraduate CS Programs," in theProc. of the Conference on Intelligent Autonomous Systems, IAS-9, Japan (March 2006) pp 1033-1040: http://faculty.berea.edu/pearcej/aibo/IAS.pdf M. Gini, J. Pearce, and K. Sutherland." Extending the Next Generation Robot Laboratory to Increase Diversity in Undergraduate CS Programs," NSF CCLI Showcase, SigCSE 2006, Houston, TX (March 2006): http://faculty.berea.edu/pearcej/aibo/SigSCE-06.ppt aibo_scheme_reference [AIBOs for Teaching CS - Wiki]: http://www-users.itlabs.umn.edu/classes/Spring-2007/csci1901/aibo.html U of M IofT 1910w: Robot Pets: AIBO Sources: http://www-users.itlabs.umn.edu/classes/Fall-2006/ioft1910/sources.html Any leads would be greatly appreciated. Benjamin L. Russell From dekudekuplex at yahoo.com Tue May 27 02:12:10 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:18:52 2009 Subject: [plt-scheme] Programming the AIBO in Scheme? In-Reply-To: <604041.47879.qm@web30205.mail.mud.yahoo.com> Message-ID: <208281.99630.qm@web30201.mail.mud.yahoo.com> After some additional research, I discovered that, for solving this problem, there exists the following STk Scheme interpreter STk Home Page: http://kaolin.essi.fr/STk/ that contains the following "Agenda" data structure agenda: http://www-users.itlabs.umn.edu/classes/Spring-2006/csci1901/labs/agenda.html that contains the following AIBO-related Scheme commands aibo_scheme_reference [AIBOs for Teaching CS - Wiki]: http://www-users.itlabs.umn.edu/classes/Spring-2007/csci1901/aibo.html for programming the AIBO in Scheme. In addition, I discovered the following STk Reference Manual STk.pdf (application/pdf Object): http://kaolin.essi.fr/STk/Doc/STk.pdf and STk FAQ: Answers to the Frequently Asked Questions about STk: http://kaolin.essi.fr/STk/FAQ/ However, the STk Reference Manual apparently says nothing about compatibility with PLT Scheme. This brings to mind the following additional questions: 1) Is STk Scheme compatible with PLT-Scheme? 2) If so, is there any way to extend DrScheme with the AIBO-related libraries in STk Scheme? 3) If not, are there any alternative PLaneT libraries similar to those in STk Scheme that allow programming the AIBO? Benjamin L. Russell --- On Tue, 5/27/08, Benjamin L. Russell wrote: > From: Benjamin L. Russell > Subject: [plt-scheme] Programming the AIBO in Scheme? > To: "PLT Scheme List" > Date: Tuesday, May 27, 2008, 2:26 PM > Does anybody have any libraries and/or manuals for > programming the AIBO robot in Scheme (preferably > PLT-Scheme? Sony's OPENR-SDK is C++-based, but I would > rather use Scheme than C++. > > A Google search came up with the following semi-relevant > pages, none of which seem helpful enough to start > programming the AIBO in Scheme: > > Using Robots in Beginning Computer Science Courses > http://www-users.cs.umn.edu/~gini/aibo.html > > Extending the Next Generation Robot Laboratory to Increase > Diversity in Undergraduate CS Programs - Courses: > http://faculty.berea.edu/pearcej/aibo/courses.html > > Extending the Next Generation Robot Laboratory to Increase > Diversity in Undergraduate CS Programs - Publications: > http://faculty.berea.edu/pearcej/aibo/publications.html > > M. Gini, J. Pearce, and K. Sutherland. "Using the Sony > AIBOs to Increase Diversity in Undergraduate CS > Programs," in theProc. of the Conference on > Intelligent Autonomous Systems, IAS-9, Japan (March 2006) > pp 1033-1040: > http://faculty.berea.edu/pearcej/aibo/IAS.pdf > > M. Gini, J. Pearce, and K. Sutherland." Extending the > Next Generation Robot Laboratory to Increase Diversity in > Undergraduate CS Programs," NSF CCLI Showcase, SigCSE > 2006, Houston, TX (March 2006): > http://faculty.berea.edu/pearcej/aibo/SigSCE-06.ppt > > aibo_scheme_reference [AIBOs for Teaching CS - Wiki]: > http://www-users.itlabs.umn.edu/classes/Spring-2007/csci1901/aibo.html > > U of M IofT 1910w: Robot Pets: AIBO Sources: > http://www-users.itlabs.umn.edu/classes/Fall-2006/ioft1910/sources.html > > Any leads would be greatly appreciated. > > Benjamin L. Russell > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From eli at barzilay.org Tue May 27 05:11:48 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:52 2009 Subject: [plt-scheme] Programming the AIBO in Scheme? In-Reply-To: <208281.99630.qm@web30201.mail.mud.yahoo.com> References: <604041.47879.qm@web30205.mail.mud.yahoo.com> <208281.99630.qm@web30201.mail.mud.yahoo.com> Message-ID: <18491.53332.807857.859209@arabic.ccs.neu.edu> On May 26, Benjamin L. Russell wrote: > > 1) Is STk Scheme compatible with PLT-Scheme? Probably not much beyond the standard core. > 2) If so, is there any way to extend DrScheme with the AIBO-related > libraries in STk Scheme? Unlikely -- but the stk interface can probably be used as a basis for a mzscheme interface. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From noelwelsh at gmail.com Tue May 27 05:40:00 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:52 2009 Subject: [plt-scheme] What is needed to use gensym? In-Reply-To: References: Message-ID: Perhaps you are using one of the teaching languages, or the wrong teaching language? I'm fairly sure gensym is in the MzScheme language, though it has been ages since I used 372. There is a menu option to change language in DrScheme. Cheers, Noel On Sun, May 25, 2008 at 3:10 PM, Veer wrote: > The expression (gensym 'a) give me the error "reference to undefined > identifier: gensym" . > Do i need to add some teachpack or something else? > This is in context of exercise 32.1.3 page 472. > > I am using DrScheme, version 372 [3m]. > > Thanks > Veer > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From ewan_higgs at yahoo.co.uk Tue May 27 06:38:01 2008 From: ewan_higgs at yahoo.co.uk (Ewan Higgs) Date: Thu Mar 26 02:18:52 2009 Subject: [plt-scheme] Reminder for tomorrow: [Scheme UK Meeting] : "Fluxus: scheme livecoding" 28 May @ 7pm Message-ID: <326070.70846.qm@web27002.mail.ukl.yahoo.com> Reminder -- The Scheme UK talk on Fluxus is tomorrow. The next meeting for the Scheme UK user's group will be held on Wednesday, 28 May from 7pm till we leave for the pub. The meeting will take place at the offices of LShift(see http://www.lshift.net/contact.html for directions). Dave Griffiths: "Fluxus: Scheme Livecoding" Livecoding is the name given to improvised programming, usually in front of an audience, with screen projection to allow viewers to connect the construction of a program along with it's audio/visual/olfactory output. Fluxus is a rapid prototyping, livecoding and playing/learning environment for 3D graphics and games. It extends PLT Scheme with graphical commands and can be used within it's own livecoding environment or from within the DrScheme IDE. Date: 28 May *Tomorrow* Time: 7:00pm Venue: LShift Ltd Hoxton Point 1st Floor Office 6 Rufus Street London N1 6PE Map: http://www.lshift.net/contact Share and enjoy! __________________________________________________________ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html From matthias at ccs.neu.edu Tue May 27 09:10:07 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:18:52 2009 Subject: [plt-scheme] Programming the AIBO in Scheme? In-Reply-To: <208281.99630.qm@web30201.mail.mud.yahoo.com> References: <208281.99630.qm@web30201.mail.mud.yahoo.com> Message-ID: <17655320-6EB2-4587-B4DF-D5652630E91B@ccs.neu.edu> Porting from Stk Scheme to PLT Scheme shouldn't be bad *and* would make for a great Planet package. -- Matthias On May 27, 2008, at 2:12 AM, Benjamin L. Russell wrote: > After some additional research, I discovered that, for solving this > problem, there exists the following STk Scheme interpreter > > STk Home Page: > http://kaolin.essi.fr/STk/ > > that contains the following "Agenda" data structure > > agenda: > http://www-users.itlabs.umn.edu/classes/Spring-2006/csci1901/labs/ > agenda.html > > that contains the following AIBO-related Scheme commands > > aibo_scheme_reference [AIBOs for Teaching CS - Wiki]: http://www- > users.itlabs.umn.edu/classes/Spring-2007/csci1901/aibo.html > > for programming the AIBO in Scheme. > > In addition, I discovered the following STk Reference Manual > > STk.pdf (application/pdf Object): > http://kaolin.essi.fr/STk/Doc/STk.pdf > > and STk FAQ: > > Answers to the Frequently Asked Questions about STk: > http://kaolin.essi.fr/STk/FAQ/ > > However, the STk Reference Manual apparently says nothing about > compatibility with PLT Scheme. > > This brings to mind the following additional questions: > > 1) Is STk Scheme compatible with PLT-Scheme? > > 2) If so, is there any way to extend DrScheme with the AIBO-related > libraries in STk Scheme? > > 3) If not, are there any alternative PLaneT libraries similar to > those in STk Scheme that allow programming the AIBO? > > Benjamin L. Russell > > > --- On Tue, 5/27/08, Benjamin L. Russell > wrote: > >> From: Benjamin L. Russell >> Subject: [plt-scheme] Programming the AIBO in Scheme? >> To: "PLT Scheme List" >> Date: Tuesday, May 27, 2008, 2:26 PM >> Does anybody have any libraries and/or manuals for >> programming the AIBO robot in Scheme (preferably >> PLT-Scheme? Sony's OPENR-SDK is C++-based, but I would >> rather use Scheme than C++. >> >> A Google search came up with the following semi-relevant >> pages, none of which seem helpful enough to start >> programming the AIBO in Scheme: >> >> Using Robots in Beginning Computer Science Courses >> http://www-users.cs.umn.edu/~gini/aibo.html >> >> Extending the Next Generation Robot Laboratory to Increase >> Diversity in Undergraduate CS Programs - Courses: >> http://faculty.berea.edu/pearcej/aibo/courses.html >> >> Extending the Next Generation Robot Laboratory to Increase >> Diversity in Undergraduate CS Programs - Publications: >> http://faculty.berea.edu/pearcej/aibo/publications.html >> >> M. Gini, J. Pearce, and K. Sutherland. "Using the Sony >> AIBOs to Increase Diversity in Undergraduate CS >> Programs," in theProc. of the Conference on >> Intelligent Autonomous Systems, IAS-9, Japan (March 2006) >> pp 1033-1040: >> http://faculty.berea.edu/pearcej/aibo/IAS.pdf >> >> M. Gini, J. Pearce, and K. Sutherland." Extending the >> Next Generation Robot Laboratory to Increase Diversity in >> Undergraduate CS Programs," NSF CCLI Showcase, SigCSE >> 2006, Houston, TX (March 2006): >> http://faculty.berea.edu/pearcej/aibo/SigSCE-06.ppt >> >> aibo_scheme_reference [AIBOs for Teaching CS - Wiki]: >> http://www-users.itlabs.umn.edu/classes/Spring-2007/csci1901/ >> aibo.html >> >> U of M IofT 1910w: Robot Pets: AIBO Sources: >> http://www-users.itlabs.umn.edu/classes/Fall-2006/ioft1910/ >> sources.html >> >> Any leads would be greatly appreciated. >> >> Benjamin L. Russell >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From joop.ringelberg at gmail.com Tue May 27 07:41:21 2008 From: joop.ringelberg at gmail.com (JoopR) Date: Thu Mar 26 02:18:52 2009 Subject: [plt-scheme] Webserver on Vista, increasing system load Message-ID: Hi, I have tested the webserver on Vista Business using JBlitz pro (a webserver stress test utility). The test requests a page generated by a Scheme servlet that retrieves an Xml fragment from the eXist database. The page contains a url that is used by the stress tester to request the next page. This happens 7 times in sequence (7 pages) and then the test case restarts with the original URL. I've tested using 20, 40, 80 and 120 virtual users. I see the same pattern in all cases: * the webserver gradually increases its memory use; * response time gradually increases from around 100 msec to 4 - 5 seconds (after 40 minutes of testing) * the "System" process gradually claims more time from the processors, from about 1% up to 50 - 60% I ran a Perl script that generates exactly the same page, ActiveState Perl on IIS. It also does the same interaction on the eXist database. Ran the same JBlitz test script. Response times are similar to the initial times of the Scheme version, but do not rise during the test as in Scheme. This seems to rule out that the eXist component is to blame (memory consumption by eXist is pretty much the same during the testrun, after the maximum allowed has been reached). However, the System activities persist after the PLT webserver has been shut down, causing the Perl response times to be an order of magnitude higher (when run after PLT has finished). It looks like some kind of resource is initially claimed by the PLT webserver, and then is not released, giving the System process a lot of work (whatever it does). I lowered the various timeouts in the PLT configuration, with overall better performance, but no effect on the decline described above. My questions: * Any ideas on the cause of this behaviour, and a possible cure? * Does the same happen under Unix? Joop Ringelberg From jay.mccarthy at gmail.com Tue May 27 16:11:19 2008 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Thu Mar 26 02:18:53 2009 Subject: [plt-scheme] Webserver on Vista, increasing system load In-Reply-To: References: Message-ID: Perhaps your benchmarking utility is using HTTP/1.1 and not closing the connections after the requests are done. The webserver will eventually time out these connections, but it's a tuning parameter. Those connections have a system-level existence, so that could have something to do with the behaviour you're seeing. Jay On Tue, May 27, 2008 at 5:41 AM, JoopR wrote: > Hi, > I have tested the webserver on Vista Business using JBlitz pro (a > webserver stress test utility). The test requests a page generated by > a Scheme servlet that retrieves an Xml fragment from the eXist > database. The page contains a url that is used by the stress tester to > request the next page. This happens 7 times in sequence (7 pages) and > then the test case restarts with the original URL. > I've tested using 20, 40, 80 and 120 virtual users. > I see the same pattern in all cases: > * the webserver gradually increases its memory use; > * response time gradually increases from around 100 msec to 4 - 5 > seconds (after 40 minutes of testing) > * the "System" process gradually claims more time from the processors, > from about 1% up to 50 - 60% > > I ran a Perl script that generates exactly the same page, ActiveState > Perl on IIS. It also does the same interaction on the eXist database. > Ran the same JBlitz test script. Response times are similar to the > initial times of the Scheme version, but do not rise during the test > as in Scheme. This seems to rule out that the eXist component is to > blame (memory consumption by eXist is pretty much the same during the > testrun, after the maximum allowed has been reached). > > However, the System activities persist after the PLT webserver has > been shut down, causing the Perl response times to be an order of > magnitude higher (when run after PLT has finished). It looks like some > kind of resource is initially claimed by the PLT webserver, and then > is not released, giving the System process a lot of work (whatever it > does). > > I lowered the various timeouts in the PLT configuration, with overall > better performance, but no effect on the decline described above. > > My questions: > * Any ideas on the cause of this behaviour, and a possible cure? > * Does the same happen under Unix? > > Joop Ringelberg > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- Jay McCarthy http://jay.teammccarthy.org From clements at brinckerhoff.org Tue May 27 16:38:55 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:18:53 2009 Subject: [plt-scheme] xml library: getting DTD information In-Reply-To: <20080525162944.GA493@perdita.local> References: <20080525162944.GA493@perdita.local> Message-ID: On May 25, 2008, at 9:29 AM, Richard Cobbe wrote: > I'm having a little difficulty with the XML library, and I'm not sure > whether this is a bug in the library or in my XML file. ... This is regression advice rather than actual advice, but it might be helpful: have you tried parsing the same file with the sxml library? It'll be something like (require (planet "sxml.ss" (lizorkin "sxml.plt" 2 0) (planet "ssax.ss" (lizorkin "ssax.plt" 2 0))) (xml->sxml (open-input-file ...)) ... I've probably got the minor revision number wrong on one of these... I seem to recall a 2.1 in there. Ignore if not useful, John -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2484 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080527/c5cf8c48/smime.bin From dyoo at cs.wpi.edu Tue May 27 22:38:04 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:54 2009 Subject: [plt-scheme] Trying to reliably turn a value into a list of snips Message-ID: Hi everyone, I've been trying to write a module that takes a value and returns its representation as a list of snips. It sorta works, except when it doesn't. Here's the code I have so far: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (module value-snips mzscheme (require (lib "framework.ss" "framework") (lib "mred.ss" "mred") (lib "class.ss") (lib "contract.ss")) (provide/contract [value-snips (any/c . -> . (listof (is-a?/c snip%)))]) ;; value-snips: value -> (listof snip) (define (value-snips a-value) (let ([es (make-eventspace)]) (parameterize ([current-eventspace es]) (let ([ch (make-channel)]) (thread (lambda () (define a-text (new (text:ports-mixin text:wide-snip%))) (let ([port (send a-text get-out-port)]) (write a-value port) (flush-output port) (channel-put ch (reverse (get-snips/rev a-text 0 (send a-text last-position))))))) (let ([result (sync ch)]) result))))) (define (get-snips/rev text start end) (send text split-snip start) (send text split-snip end) (let loop ([snips/rev '()] [a-snip (send text find-snip start 'after-or-none)]) (cond [(or (not a-snip) (>= (send text get-snip-position a-snip) end)) snips/rev] [else (loop (cons (send a-snip copy) snips/rev) (send a-snip next))])))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Unfortunately, this breaks when I hit things like picts. picts aren't snips. It looks like they get converted implicitly by the REPL in DrScheme. I see that picts are registered to the snip converter through drscheme:language:add-snip-value. I haven't yet found a good way of getting at that function without having to integrate tightly with DrScheme. I suspect I need to use the render-value/format functions that work with DrScheme, but I hesitate in doing so: it means I can't easily test my module. At the very least, I don't know of an effective way of testing a tool that depends on DrScheme. Any suggestions would be greatly appreciated! From robby at cs.uchicago.edu Tue May 27 22:42:33 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:54 2009 Subject: [plt-scheme] Trying to reliably turn a value into a list of snips In-Reply-To: References: Message-ID: <932b2f1f0805271942j1b811e26l8acc50d82fc8bf34@mail.gmail.com> DrScheme uses the pretty-printer when printing values in order to know what to do with snips that are embedded in other data structures. Is that one of the pieces that you need? Specifically, it overrides hooks to let it control how sub-expressions are printed and if it encounters a snip there, it just inserts (a copy of) the snip into the buffer. The drscheme:language:add-snip-value is used so that other values can be turned into snips (or so that some snips can be rendered differently when they appear, eg picts are bitmap-ized so that the drawing callbacks don't ever happen on a drscheme thread). Robby On Tue, May 27, 2008 at 9:38 PM, Danny Yoo wrote: > Hi everyone, > > > I've been trying to write a module that takes a value and returns its > representation as a list of snips. It sorta works, except when it doesn't. > Here's the code I have so far: > > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > (module value-snips mzscheme > (require (lib "framework.ss" "framework") > (lib "mred.ss" "mred") > (lib "class.ss") > (lib "contract.ss")) > > > (provide/contract [value-snips (any/c . -> . (listof (is-a?/c snip%)))]) > > > ;; value-snips: value -> (listof snip) > (define (value-snips a-value) > (let ([es (make-eventspace)]) > (parameterize ([current-eventspace es]) > (let ([ch (make-channel)]) > (thread (lambda () > (define a-text (new (text:ports-mixin text:wide-snip%))) > (let ([port (send a-text get-out-port)]) > (write a-value port) > (flush-output port) > (channel-put > ch > (reverse (get-snips/rev a-text 0 (send a-text > last-position))))))) > (let ([result (sync ch)]) > result))))) > > > (define (get-snips/rev text start end) > (send text split-snip start) > (send text split-snip end) > (let loop ([snips/rev '()] > [a-snip > (send text find-snip start 'after-or-none)]) > (cond > [(or (not a-snip) > (>= (send text get-snip-position a-snip) > end)) > snips/rev] > [else > (loop (cons (send a-snip copy) snips/rev) > (send a-snip next))])))) > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > > Unfortunately, this breaks when I hit things like picts. picts aren't > snips. It looks like they get converted implicitly by the REPL in DrScheme. > I see that picts are registered to the snip converter through > drscheme:language:add-snip-value. > > > I haven't yet found a good way of getting at that function without having to > integrate tightly with DrScheme. I suspect I need to use the > render-value/format functions that work with DrScheme, but I hesitate in > doing so: it means I can't easily test my module. At the very least, I > don't know of an effective way of testing a tool that depends on DrScheme. > > > Any suggestions would be greatly appreciated! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From cobbe at ccs.neu.edu Tue May 27 22:57:39 2008 From: cobbe at ccs.neu.edu (Richard Cobbe) Date: Thu Mar 26 02:18:54 2009 Subject: [plt-scheme] xml library: getting DTD information In-Reply-To: References: <20080525162944.GA493@perdita.local> Message-ID: <20080528025739.GA527@perdita.local> On Tue, May 27, 2008 at 01:38:55PM -0700, John Clements wrote: > > On May 25, 2008, at 9:29 AM, Richard Cobbe wrote: > >> I'm having a little difficulty with the XML library, and I'm not sure >> whether this is a bug in the library or in my XML file. > > ... > > This is regression advice rather than actual advice, but it might be > helpful: have you tried parsing the same file with the sxml library? > It'll be something like > > (require (planet "sxml.ss" (lizorkin "sxml.plt" 2 0) > (planet "ssax.ss" (lizorkin "ssax.plt" 2 0))) > > (xml->sxml (open-input-file ...)) > > ... > > I've probably got the minor revision number wrong on one of these... I > seem to recall a 2.1 in there. I'm certainly willing to try other libraries, but this doesn't seem to work any better. (And you had the version numbers correct.) > (require (planet "sxml.ss" ("lizorkin" "sxml.plt" 2 0)) (planet "ssax.ss" ("lizorkin" "ssax.plt" 2 0))) > (sxml:document "test.xml") Warning at position 123 (DOCTYPE DECL keyboard file://localhost/System/Library/DTDs/KeyboardLayout.dtd found and skipped) (*TOP* (*PI* xml "version=\"1.1\" encoding=\"UTF-8\"") (keyboard (@ (name "US Extended") (maxout "3") (id "-2") (group "126")))) Note that sxml:document prints the "Warning ..." and "(DOCTYPE ..." lines to the console (either stdout or stderr, not sure which) and returns the list starting with '*TOP* as the result. I haven't fully read through the SXML/SSAX manuals, but the default behavior doesn't appear to be any different from the built-in XML library (aside from a really unfortunate way of signaling warnings, although one may be able to change that with a library configuration option that I haven't seen yet). Richard From tilde at tilde.co.kr Wed May 28 00:43:44 2008 From: tilde at tilde.co.kr (soo) Date: Thu Mar 26 02:18:54 2009 Subject: [plt-scheme] PLT's lambda substituting for native case-lambda Message-ID: <000001c8c07d$6bafafa0$eef86bde@INITERM> Hi, I'd like to suggest substituting lambda for case-lambda. All the lambda special forms that support optional variables can substitute for case-lambda as follows: In Mzscheme, (define case-str (case-lambda ((str) (string-length str)) ((str num) (string-ref str num)) ((str num chr) (string-set! str num chr)))) (define cond-str (let ((u (lambda () #f))) ;must be unique like (gensym) or (lambda () #f) (lambda (str (num u) (chr u)) (cond ((eq? u num) (string-length str)) ((eq? u chr) (string-ref str num)) (else (string-set! str num chr)))))) The cond-str has the same performance speed as the case-str in PLT-3.99. In addition, the lambda special forms that support optional keyword variables can make the equivalent of the case-lambda that supports them, as follows: In Mzscheme, (define cond-str-key (let ((u (lambda () #f))) (lambda (str #:num (num u) #:chr (chr u)) (cond ((and (eq? u num) (eq? u chr)) (string-length str)) ((eq? u chr) (string-ref str num)) ((not (or (eq? u num) (eq? u chr))) (string-set! str num chr)))))) examples: (define str (string #\a #\b #\c #\d #\e)) (case-str str) (cond-str str) (cond-str-key str) => 5 (case-str str 1) (cond-str str 1) (cond-str-key str #:num 1) => #\b (case-str str 1 #\f) (cond-str str 1 #\f) (cond-str-key str #:num 1 #:chr #\f) str => "afcde" Thanks. -- Joo ChurlSoo From eli at barzilay.org Wed May 28 00:56:38 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:18:54 2009 Subject: [plt-scheme] PLT's lambda substituting for native case-lambda In-Reply-To: <000001c8c07d$6bafafa0$eef86bde@INITERM> References: <000001c8c07d$6bafafa0$eef86bde@INITERM> Message-ID: <18492.58886.548258.281612@arabic.ccs.neu.edu> On May 28, soo wrote: > Hi, > I'd like to suggest substituting lambda for case-lambda. That's not possible -- `case-lambda' is the primitive function form that is used by `lambda' when you use optional arguments. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jos.koot at telefonica.net Wed May 28 06:52:00 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:18:54 2009 Subject: [plt-scheme] PLT's lambda substituting for native case-lambda References: <000001c8c07d$6bafafa0$eef86bde@INITERM> <18492.58886.548258.281612@arabic.ccs.neu.edu> Message-ID: <000e01c8c0b0$dbef0170$2101a8c0@uw2b2dff239c4d> I am very pleased with the current lambda of PLT (latest svn) There is one thing I am missing: keyword arguments that matter only for being present or not present in the call. For example (define fun (lambda (#:keyword (id present-value-expr absent-value-expr)) id)) (fun) --> value of absent-value-expr (fun #:keyword) --> value of present-value-expr In many cases the present-value-expr will be #t and the absent-value-expr #f, so these might be defaults in #:keyword (id) Just a suggestion Jos ----- Original Message ----- From: "Eli Barzilay" To: "soo" Cc: Sent: Wednesday, May 28, 2008 6:56 AM Subject: Re: [plt-scheme] PLT's lambda substituting for native case-lambda > On May 28, soo wrote: >> Hi, >> I'd like to suggest substituting lambda for case-lambda. > > That's not possible -- `case-lambda' is the primitive function form > that is used by `lambda' when you use optional arguments. > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From dyoo at cs.wpi.edu Wed May 28 12:42:26 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:55 2009 Subject: [plt-scheme] scheme/sandbox and gui stuff? Message-ID: I'm seeing the following error when I try running this program under DrScheme's module language: ##################################### #lang scheme/gui (require scheme/sandbox) (define e (make-evaluator 'slideshow)) ##################################### The error is: ################################################################### Welcome to DrScheme, version 3.99.0.25-svn16may2008 [3m]. Language: Module; memory limit: 512 megabytes. ACK! didn't find drscheme's stackframe when filtering . . exception raised by error display handler: directory-exists?: file access denied (/ exists); original exception raised: dynamic-require: unknown module: '#%mred-kernel ################################################################### I haven't been able to use the gui module in an sandbox evaluator yet. Any help would be appreciated. Thanks! From jacobm at cs.uchicago.edu Wed May 28 12:59:15 2008 From: jacobm at cs.uchicago.edu (Jacob Matthews) Date: Thu Mar 26 02:18:55 2009 Subject: [plt-scheme] planet server upgraded Message-ID: <46b603df0805280959j730f4126j57ff0690711ac2c4@mail.gmail.com> Last night I launched a new version of the planet server in preparation for the impending release of PLT Scheme 4.0. Here are the major outward-facing changes: * in the upper left-hand corner there are two links that say [4.x] and [3xx]. There is now a "4.x" repository that PLT Scheme version 4.x clients will consult to find packages, and a 3xx repository for older clients. Unlike the 2xx -> 3xx transition, a single package version can be in both repositories simultaneously; no more of the situation we saw in the 2xx->3xx transition where the same package had two different version numbers in the two different repositories, which caused needless difficulty. To bootstrap the system, I've populated the 4.x repository with all the packages and versions from the 3xx repository. Package maintainers should note a new 'repositories field for info.ss where a package's repositories can be listed. * It is now possible for package maintainers to edit the metadata on any package version, not just the most recent, and it is possible to submit a new minor version for a not-most-recent major version of a package. Click the name of your package in the packages view to edit. It is possible to change which repositories any given package version appears in through this interface. * PLaneT does scribble! The server won't build scribblings for packages already on the server, because the server doesn't execute any package code (not just for security reasons, but also pretty major logistical reasons). However, for new package submissions, the PLaneT client will look for scribblings files, build them on your computer, and include the output in the package sent to the server. The server knows where to look for this output, the result being that for new packages built with very recent versions of the PLT Scheme planet client, scribble documentation should appear on the server. Please let me know what you think! And if something doesn't seem to be working right, let me know about that too. -jacob From mflatt at cs.utah.edu Wed May 28 13:03:49 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:55 2009 Subject: [plt-scheme] scheme/sandbox and gui stuff? In-Reply-To: References: Message-ID: <20080528170349.DF57965010D@mail-svr1.cs.utah.edu> I think that the main bug that you're seeing has been fixed in the last couple of days. (The `gui-available?' funrction from `scheme/gui/dynamic', which the sandbox uses, wasn't working right.) If I run this now, I get a slightly different error: ACK! didn't find drscheme's stackframe when filtering . file-or-directory-modify-seconds: file access denied (/Users/mflatt/Library/Preferences/org.plt-scheme.prefs.ss read) This error reflects that the sandbox doesn't let Slideshow access the preferences file. (The "ACK!" prefix looks like a DrScheme problem taht's still there.) Running #lang scheme/gui (require scheme/sandbox) (define e (parameterize ([sandbox-security-guard (current-security-guard)]) (make-evaluator 'slideshow))) with the latest in SVN works for me. Matthew At Wed, 28 May 2008 12:42:26 -0400 (EDT), Danny Yoo wrote: > I'm seeing the following error when I try running this program under > DrScheme's module language: > > ##################################### > #lang scheme/gui > (require scheme/sandbox) > (define e (make-evaluator 'slideshow)) > ##################################### > > > > The error is: > > ################################################################### > Welcome to DrScheme, version 3.99.0.25-svn16may2008 [3m]. > Language: Module; memory limit: 512 megabytes. > ACK! didn't find drscheme's stackframe when filtering > . . exception raised by error display handler: directory-exists?: file > access denied (/ exists); original exception raised: dynamic-require: > unknown module: '#%mred-kernel > ################################################################### > > > I haven't been able to use the gui module in an sandbox evaluator yet. > Any help would be appreciated. Thanks! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robby at cs.uchicago.edu Wed May 28 13:29:46 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:55 2009 Subject: [plt-scheme] scheme/sandbox and gui stuff? In-Reply-To: <20080528170349.DF57965010D@mail-svr1.cs.utah.edu> References: <20080528170349.DF57965010D@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0805281029u31cca27eqcd613eddb5dbc4a6@mail.gmail.com> I'm working on the ACK! business, but its good to have an example that doesn't work. Thanks, Robby On Wed, May 28, 2008 at 12:03 PM, Matthew Flatt wrote: > I think that the main bug that you're seeing has been fixed in the last > couple of days. (The `gui-available?' funrction from > `scheme/gui/dynamic', which the sandbox uses, wasn't working right.) > > If I run this now, I get a slightly different error: > > ACK! didn't find drscheme's stackframe when filtering > . file-or-directory-modify-seconds: file access denied > (/Users/mflatt/Library/Preferences/org.plt-scheme.prefs.ss read) > > This error reflects that the sandbox doesn't let Slideshow access the > preferences file. (The "ACK!" prefix looks like a DrScheme problem > taht's still there.) > > Running > > #lang scheme/gui > (require scheme/sandbox) > (define e > (parameterize ([sandbox-security-guard (current-security-guard)]) > (make-evaluator 'slideshow))) > > with the latest in SVN works for me. > > > Matthew > > At Wed, 28 May 2008 12:42:26 -0400 (EDT), Danny Yoo wrote: >> I'm seeing the following error when I try running this program under >> DrScheme's module language: >> >> ##################################### >> #lang scheme/gui >> (require scheme/sandbox) >> (define e (make-evaluator 'slideshow)) >> ##################################### >> >> >> >> The error is: >> >> ################################################################### >> Welcome to DrScheme, version 3.99.0.25-svn16may2008 [3m]. >> Language: Module; memory limit: 512 megabytes. >> ACK! didn't find drscheme's stackframe when filtering >> . . exception raised by error display handler: directory-exists?: file >> access denied (/ exists); original exception raised: dynamic-require: >> unknown module: '#%mred-kernel >> ################################################################### >> >> >> I haven't been able to use the gui module in an sandbox evaluator yet. >> Any help would be appreciated. Thanks! >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From dyoo at cs.wpi.edu Wed May 28 17:46:32 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:55 2009 Subject: [plt-scheme] Trying to reliably turn a value into a list of snips In-Reply-To: <932b2f1f0805271942j1b811e26l8acc50d82fc8bf34@mail.gmail.com> References: <932b2f1f0805271942j1b811e26l8acc50d82fc8bf34@mail.gmail.com> Message-ID: > DrScheme uses the pretty-printer when printing values in order to know > what to do with snips that are embedded in other data structures. Is > that one of the pieces that you need? Specifically, it overrides hooks > to let it control how sub-expressions are printed and if it encounters a > snip there, it just inserts (a copy of) the snip into the buffer. > > The drscheme:language:add-snip-value is used so that other values can be > turned into snips (or so that some snips can be rendered differently > when they appear, eg picts are bitmap-ized so that the drawing callbacks > don't ever happen on a drscheme thread). Hi Robby, Yes, I'm trying to get at the pretty-printer that the RePL uses. I think I might be able to reuse the pretty-printer by using the render-value functions from the language support in the "tool.ss" library in "drscheme". But one complication is that my entry point is in the heart of an decorated-editor-snip% object. I'm trying to write a custom snip that displays its contents just like the interaction REPL. I'm unfamiliar enough with DrScheme's structure that I'm having some trouble getting at the language object from my snip's callback... From robby at cs.uchicago.edu Wed May 28 17:48:26 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:55 2009 Subject: [plt-scheme] Trying to reliably turn a value into a list of snips In-Reply-To: References: <932b2f1f0805271942j1b811e26l8acc50d82fc8bf34@mail.gmail.com> Message-ID: <932b2f1f0805281448h3c2f34abxd69290515a1804aa@mail.gmail.com> Did you try just using `print' and then redirecting the output to your editor snip's ports? Robby On Wed, May 28, 2008 at 4:46 PM, Danny Yoo wrote: > > >> DrScheme uses the pretty-printer when printing values in order to know >> what to do with snips that are embedded in other data structures. Is that >> one of the pieces that you need? Specifically, it overrides hooks to let it >> control how sub-expressions are printed and if it encounters a snip there, >> it just inserts (a copy of) the snip into the buffer. >> >> The drscheme:language:add-snip-value is used so that other values can be >> turned into snips (or so that some snips can be rendered differently when >> they appear, eg picts are bitmap-ized so that the drawing callbacks don't >> ever happen on a drscheme thread). > > Hi Robby, > > > Yes, I'm trying to get at the pretty-printer that the RePL uses. I think I > might be able to reuse the pretty-printer by using the render-value > functions from the language support in the "tool.ss" library in "drscheme". > > But one complication is that my entry point is in the heart of an > decorated-editor-snip% object. I'm trying to write a custom snip that > displays its contents just like the interaction REPL. I'm unfamiliar enough > with DrScheme's structure that I'm having some trouble getting at the > language object from my snip's callback... > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From lunarc.lists at gmail.com Wed May 28 23:36:17 2008 From: lunarc.lists at gmail.com (Henk Boom) Date: Thu Mar 26 02:18:56 2009 Subject: [plt-scheme] Runaway Memory in Web Server Message-ID: Hi, I'm using the PLT Web Server included with 370 to serve a servlet I'm writing (just nabbed some shared hosting space with Webfaction where I can use it). I'm having a problem though, and that is that the web server seems to gobble more and more memory the longer it runs and the more requests it responds to. If I make a request, wait for the memory to go back down with a garbage collection, then make a new request, the memory usage is usually several MB higher than it was after the first request. After the first few requests it sits at around 50MB, but it eventually gets significantly higher than 150MB. Putting a print statement in the top-level of my servlet module, I see that the servlet does get re-evaluated after the collection, which if I understand correctly means that my servlet is not carrying data with it over this time. Also, my servlet does not make use of continuations. What can I do to find out what is using the memory? Here's the launch script I use, and please let me know if there is other information I should give. ---- run.ss ; This file is intended to be copied and/or modified and used as a template. (module run mzscheme (require (lib "cmdline.ss") (lib "file.ss") (lib "web-server.ss" "web-server") (lib "responders.ss" "web-server" "configuration") (lib "mime-types.ss" "web-server" "private") (lib "url.ss" "net") (prefix fsmap: (lib "filesystem-map.ss" "web-server" "dispatchers")) (prefix timeout: (lib "dispatch-timeout.ss" "web-server" "dispatchers")) (prefix files: (lib "dispatch-files.ss" "web-server" "dispatchers")) (prefix filter: (lib "dispatch-filter.ss" "web-server" "dispatchers")) (prefix lift: (lib "dispatch-lift.ss" "web-server" "dispatchers")) (prefix log: (lib "dispatch-log.ss" "web-server" "dispatchers")) (prefix sequencer: (lib "dispatch-sequencer.ss" "web-server" "dispatchers")) (prefix lang: (lib "dispatch-lang.ss" "web-server" "dispatchers")) (prefix stat: (lib "dispatch-stat.ss" "web-server" "dispatchers"))) (define server-root-path (make-parameter (string->path "./root"))) (define port (make-parameter 8080)) (parse-command-line "run" (current-command-line-arguments) `((once-each [("-p" "--port") ,(lambda (flag the-port) (port (string->number the-port))) (,(format "Specify a different port (default: ~a)" (number->string (port))) "number")] [("-r" "--root") ,(lambda (flag path) (server-root-path (normalize-path (string->path path)))) (,(format "Specify a different server root path (default: ~a)" (path->string (server-root-path))) "path")])) (lambda (flag-accum) (void)) null) (define default-host-path (build-path (server-root-path) "conf")) (define file-not-found-file (build-path default-host-path "not-found.html")) (define servlet-error-file (build-path default-host-path "servlet-error.html")) (define url->path (fsmap:make-url->path (build-path (server-root-path) "htdocs"))) (define site-url->path (let ((sys (fsmap:make-url->path (server-root-path)))) (lambda (url) (sys (string->url "http://localhost:8080/servlets/site.ss"))))) (define gc-thread (stat:make-gc-thread 30)) (serve #:port (port) #:dispatch (sequencer:make (timeout:make (* 5 60)) (stat:make) (log:make) (files:make #:url->path url->path #:path->mime-type (make-path->mime-type (build-path (server-root-path) "mime.types")) #:indices (list "index.html" "index.htm")) (lang:make #:url->path site-url->path #:responders-servlet-loading (gen-servlet-responder servlet-error-file) #:responders-servlet (gen-servlet-responder servlet-error-file)) (lift:make (gen-file-not-found-responder file-not-found-file)))) (do-not-return)) From noelwelsh at gmail.com Thu May 29 03:30:55 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:56 2009 Subject: [plt-scheme] Runaway Memory in Web Server In-Reply-To: References: Message-ID: On Thu, May 29, 2008 at 4:36 AM, Henk Boom wrote: > Hi, I'm using the PLT Web Server included with 370 Upgrade. I'm 99% sure that will fix the problem. N. From dyoo at cs.wpi.edu Thu May 29 12:50:01 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:56 2009 Subject: [plt-scheme] Trying to reliably turn a value into a list of snips In-Reply-To: <932b2f1f0805281448h3c2f34abxd69290515a1804aa@mail.gmail.com> References: <932b2f1f0805271942j1b811e26l8acc50d82fc8bf34@mail.gmail.com> <932b2f1f0805281448h3c2f34abxd69290515a1804aa@mail.gmail.com> Message-ID: On Wed, 28 May 2008, Robby Findler wrote: > Did you try just using `print' and then redirecting the output to your > editor snip's ports? Hi Robby, But that's so simple that it can't possibly work... wait. It works! :) I hadn't known about print; I'd only been aware of printf, write, and display. With your suggestion, my updated code is: ;; value->snips: value -> (listof snip%) (define (value->snips a-value) (let* ([text (new text%)] [port (open-output-text-editor text)]) (print a-value port) (flush-output port) (get-text-snips text 0 (send text last-position)))) ;; get-text-snips: text% number number -> (listof snip%) ;; Returns the snips in the text editor between start and end. (define (get-text-snips text start end) (send text split-snip start) (send text split-snip end) (reverse (let loop ([snips/rev '()] [a-snip (send text find-snip start 'after-or-none)]) (cond [(or (not a-snip) (>= (send text get-snip-position a-snip) end)) snips/rev] [else (loop (cons (send a-snip copy) snips/rev) (send a-snip next))])))) and it deals with picts correctly. Thanks again! From dyoo at cs.wpi.edu Thu May 29 16:04:43 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:56 2009 Subject: [plt-scheme] Can subclasses of editor-snips% be saved? Message-ID: Hi everyone, I've been trying to implement the serialization protocol for my editor-snip% subclass, but things aren't working so well. I can see that my write method fires off, but when I try reading back, my snipclass is silent. I've tried to condense my example as small as I can. I've put the source of an 'my-editor-snip' collection here: http://hashcollision.org/tmp/my-editor-snip.tar.gz I've tried to follow the docs on the protocol for serialization. I've implemented "write" for the snip, "read" for the snipclass, registered all snips to the snipclass, and registered the snipclass to (get-the-snip-class-list). I must still be missing something: what am I missing? Thanks for any help! From dyoo at cs.wpi.edu Thu May 29 18:12:15 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:56 2009 Subject: [plt-scheme] Can subclasses of editor-snips% be saved? In-Reply-To: References: Message-ID: > I've been trying to implement the serialization protocol for my > editor-snip% subclass, but things aren't working so well. I can see > that my write method fires off, but when I try reading back, my > snipclass is silent. Following up on this: if I construct instances of my-editor-snip from the REPL, those are snips that I can't copy-and-paste. However, if I construct the instances from a callback in DrScheme itself, those seem to be copy-pasteable. But why in the world should the source of the snip matter? I'm still very confused. I see a very subtle difference in the physical bytes being written out, depending on the context where I create the snip. Depending on whether I initially created the snip in the REPL or in a DrScheme callback, in two places, I see a '-1', whereas in the other, I see a '18'. For example, I created two files containing a single snip. ##################################################################### dyoo@kfisler-ra1:~/work/function-table$ diff example.ss example2.ss 183,184c183,184 < 00000000001 18 00000000002 20 #"dyoo:function-table\0" < 1 18 00000000012 4 9 #"mzscheme\0" --- > 00000000001 -1 00000000002 20 #"dyoo:function-table\0" > 1 -1 00000000012 4 9 #"mzscheme\0" ##################################################################### example.ss is something I can load back, and example2 is corrupted. I created example.ss's snip from a DrScheme callback, whereas I created example2.ss's snip by running a function in the REPL. There seems to be a low level detail here that's messing up. I don't see what it is yet... Any help here would be greatly appreciated. Thanks! From mflatt at cs.utah.edu Thu May 29 19:16:22 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:18:56 2009 Subject: [plt-scheme] Can subclasses of editor-snips% be saved? In-Reply-To: References: Message-ID: <20080529231624.40B6F6500E2@mail-svr1.cs.utah.edu> This is a problem that we keep hitting, and then we hack DrScheme to work around it without fixing the underlying problem. The problem is that there are different snip-class% instances in the user space and in DrScheme's space. So when you copy from the editor, which is in DrScheme's space, the snip-class% associated with the snip isn't in DrScheme's registry, and so it isn't properly marshaled. DrScheme actually copies its `snip-class%' instances (as loaded by your tool, for example) to the user's space. But when you load `my-snip-class/my-snip-class' in the user program, it creates a new `snip-class%' instance, and its snips use that instance. You could try this in "my-snip-class.ss": (define the-class-name (format "~s" '(lib "my-editor-snip.ss" "my-editor-snip"))) ;; Install an instance, which will be ignored if one is already ;; there: (send (get-the-snip-class-list) add (new my-editor-snipclass%)) ;; Bind `snip-class' to the one that DrScheme may have provided, ;; or the one installed above if DrScheme didn't provide one. (define snip-class (send (get-the-snip-class-list) find the-class-name)) ;; Don't try something like this: ;; (or (send (get-the-snip-class-list) find the-class-name) ;; (new my-editor-snipclass%))) ;; because the `the-class-name' triggers an attempt to load the ;; module if the class is not already registered. The danger here is that the user-space program may end up with instances of the `my-editor-snip%' class as created in DrScheme's space. In the past, we've hacked DrScheme by explicitly attaching modules like "my-editor-snip.ss" from the DrScheme space to the user space; see `to-be-copied-module-specs' in `drscheme/private/eval'. As far as I know, that's still the only solution. Matthew At Thu, 29 May 2008 18:12:15 -0400 (EDT), Danny Yoo wrote: > > I've been trying to implement the serialization protocol for my > > editor-snip% subclass, but things aren't working so well. I can see > > that my write method fires off, but when I try reading back, my > > snipclass is silent. > > Following up on this: if I construct instances of my-editor-snip from the > REPL, those are snips that I can't copy-and-paste. > > > However, if I construct the instances from a callback in DrScheme itself, > those seem to be copy-pasteable. But why in the world should the source > of the snip matter? I'm still very confused. > > > I see a very subtle difference in the physical bytes being written out, > depending on the context where I create the snip. Depending on whether I > initially created the snip in the REPL or in a DrScheme callback, in two > places, I see a '-1', whereas in the other, I see a '18'. For example, I > created two files containing a single snip. > > ##################################################################### > dyoo@kfisler-ra1:~/work/function-table$ diff example.ss example2.ss > 183,184c183,184 > < 00000000001 18 00000000002 20 #"dyoo:function-table\0" > < 1 18 00000000012 4 9 #"mzscheme\0" > --- > > 00000000001 -1 00000000002 20 #"dyoo:function-table\0" > > 1 -1 00000000012 4 9 #"mzscheme\0" > ##################################################################### > > > example.ss is something I can load back, and example2 is corrupted. I > created example.ss's snip from a DrScheme callback, whereas I created > example2.ss's snip by running a function in the REPL. > > There seems to be a low level detail here that's messing up. I don't see > what it is yet... > > > > Any help here would be greatly appreciated. Thanks! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From ryanc at ccs.neu.edu Thu May 29 19:30:35 2008 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Thu Mar 26 02:18:56 2009 Subject: [plt-scheme] Can subclasses of editor-snips% be saved? In-Reply-To: References: Message-ID: <483F3C9B.9070308@ccs.neu.edu> Danny Yoo wrote: >> I've been trying to implement the serialization protocol for my >> editor-snip% subclass, but things aren't working so well. I can see >> that my write method fires off, but when I try reading back, my >> snipclass is silent. > > Following up on this: if I construct instances of my-editor-snip from > the REPL, those are snips that I can't copy-and-paste. > > > However, if I construct the instances from a callback in DrScheme > itself, those seem to be copy-pasteable. But why in the world should > the source of the snip matter? I'm still very confused. > > > I see a very subtle difference in the physical bytes being written out, > depending on the context where I create the snip. Depending on whether > I initially created the snip in the REPL or in a DrScheme callback, in > two places, I see a '-1', whereas in the other, I see a '18'. For > example, I created two files containing a single snip. > > ##################################################################### > dyoo@kfisler-ra1:~/work/function-table$ diff example.ss example2.ss > 183,184c183,184 > < 00000000001 18 00000000002 20 #"dyoo:function-table\0" > < 1 18 00000000012 4 9 #"mzscheme\0" > --- >> 00000000001 -1 00000000002 20 #"dyoo:function-table\0" >> 1 -1 00000000012 4 9 #"mzscheme\0" > ##################################################################### > > > example.ss is something I can load back, and example2 is corrupted. I > created example.ss's snip from a DrScheme callback, whereas I created > example2.ss's snip by running a function in the REPL. Matthew or Robby: Could the editor for DrScheme's definition window change its insert method to reject such unhealthy snips (snips whose snipclass is not already loaded in DrScheme's space)? Or replace them with a "No-no" placeholder snip? Ryan > > There seems to be a low level detail here that's messing up. I don't > see what it is yet... > > > > Any help here would be greatly appreciated. Thanks! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mark.engelberg at gmail.com Thu May 29 22:35:52 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:18:57 2009 Subject: [plt-scheme] Reasoned Schemer - miniKanren Message-ID: So I'm trying out some of the examples in Reasoned Schemer, using the miniKanren on the Scheme planet, but it doesn't seem to work right. The miniKanren, contrary to the book, doesn't understand succeed or fail (#s or #f), so I fail to see how to get this to work. What am I missing? --Mark From dyoo at cs.wpi.edu Thu May 29 22:53:04 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:57 2009 Subject: [plt-scheme] Can subclasses of editor-snips% be saved? In-Reply-To: <20080529231624.40B6F6500E2@mail-svr1.cs.utah.edu> References: <20080529231624.40B6F6500E2@mail-svr1.cs.utah.edu> Message-ID: > The danger here is that the user-space program may end up with instances > of the `my-editor-snip%' class as created in DrScheme's space. Yes, I'm seeing this behavior. Ugh. > In the past, we've hacked DrScheme by explicitly attaching modules like > "my-editor-snip.ss" from the DrScheme space to the user space; see > `to-be-copied-module-specs' in `drscheme/private/eval'. As far as I > know, that's still the only solution. Is there an prefered extension mechanism from the tool's end that lets me attach more modules to this to-be-copied-module-specs list? I believe I should be looking at drscheme:language:extend-language-interface and do the same sort of hackery that the lang/htdp-langs.ss module does with on-execute. I just want to make sure that this is an acceptable place to do the namespace-attach-module stuff. From robby at cs.uchicago.edu Thu May 29 22:59:03 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:18:57 2009 Subject: [plt-scheme] Can subclasses of editor-snips% be saved? In-Reply-To: References: <20080529231624.40B6F6500E2@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0805291959j2cacbdep3be3da7dd5461341@mail.gmail.com> Yes, that's the right place, I believe. Watch out for errors, tho. Runtime errors at that point can (silently) wedge drscheme. So, if you see unexplicable wedges, throw in a with-handlers to print out your error messages. hth, Robby On Thu, May 29, 2008 at 9:53 PM, Danny Yoo wrote: >> The danger here is that the user-space program may end up with instances >> of the `my-editor-snip%' class as created in DrScheme's space. > > Yes, I'm seeing this behavior. Ugh. > > > >> In the past, we've hacked DrScheme by explicitly attaching modules like >> "my-editor-snip.ss" from the DrScheme space to the user space; see >> `to-be-copied-module-specs' in `drscheme/private/eval'. As far as I know, >> that's still the only solution. > > Is there an prefered extension mechanism from the tool's end that lets me > attach more modules to this to-be-copied-module-specs list? I believe I > should be looking at drscheme:language:extend-language-interface and do the > same sort of hackery that the lang/htdp-langs.ss module does with > on-execute. I just want to make sure that this is an acceptable place to do > the namespace-attach-module stuff. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From lunarc.lists at gmail.com Thu May 29 23:43:27 2008 From: lunarc.lists at gmail.com (Henk Boom) Date: Thu Mar 26 02:18:57 2009 Subject: [plt-scheme] Runaway Memory in Web Server In-Reply-To: References: Message-ID: 2008/5/29 Henk Boom : > 2008/5/29 Noel Welsh : >> On Thu, May 29, 2008 at 4:36 AM, Henk Boom wrote: >>> Hi, I'm using the PLT Web Server included with 370 >> >> Upgrade. I'm 99% sure that will fix the problem. > > Thanks! I'll give it a shot. > > Henk Boom Thanks! That handled the gradual increase in memory use. I notice that it still takes a large amount of memory if I make many requests (i.e. hold f5 for a second or two in firefox), is there a way to limit the maximum number of concurrent requests? Henk Boom From notnorwegian at yahoo.se Fri May 30 05:09:25 2008 From: notnorwegian at yahoo.se (not norwegian swede) Date: Thu Mar 26 02:18:58 2009 Subject: [plt-scheme] webserver/library? Message-ID: <4964.4838.qm@web27905.mail.ukl.yahoo.com> hi i want to write a webapplication. is there a library that lets you render html. so you ca start a localhost at http://localhost:8080/ for example? with python and webpy i can do this for example(and have a html-file ina separate file): import web render = web.template.render('templates/') urls = (   '/', 'main',   ) class main:     def GET(self):         print render.main() web.webapi.internalerror = web.debugerror if __name__ == "__main__": web.run(urls, globals()) ___________________________________________________ S?k efter k?rleken! Hitta din tvillingsj?l p? Yahoo! Dejting: http://ad.doubleclick.net/clk;185753627;24584539;x?http://se.meetic.yahoo.net/index.php?mtcmk=148783 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080530/a3cb5bde/attachment.html From noelwelsh at gmail.com Fri May 30 05:18:03 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:18:58 2009 Subject: [plt-scheme] webserver/library? In-Reply-To: <4964.4838.qm@web27905.mail.ukl.yahoo.com> References: <4964.4838.qm@web27905.mail.ukl.yahoo.com> Message-ID: Take a look at instaservlet http://planet.plt-scheme.org/display.ss?package=instaservlet.plt&owner=untyped Here's an example from the docs: #lang scheme/base (require (planet "instaservlet.ss" ("untyped" "instaservlet.plt" 1))) (go! (lambda (request) '(html (head (title "It's working!")) (body (h1 "Instaservlet is in the house!"))))) N. On Fri, May 30, 2008 at 10:09 AM, not norwegian swede wrote: > hi > > i want to write a webapplication. is there a library that lets you render > html. so you ca start a localhost at http://localhost:8080/ for example? > with python and webpy i can do this for example(and have a html-file ina > separate file): > > > import web > > render = web.template.render('templates/') > > urls = ( > '/', 'main', > ) > > class main: > def GET(self): > print render.main() > > web.webapi.internalerror = web.debugerror > if __name__ == "__main__": web.run(urls, globals()) From grettke at acm.org Fri May 30 11:08:39 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:58 2009 Subject: [plt-scheme] planet server upgraded In-Reply-To: <46b603df0805280959j730f4126j57ff0690711ac2c4@mail.gmail.com> References: <46b603df0805280959j730f4126j57ff0690711ac2c4@mail.gmail.com> Message-ID: <756daca50805300808g31d4a2b2v92dca337b1255518@mail.gmail.com> Hi Jacob, > Package maintainers should note a new 'repositories field for info.ss where a package's repositories can be listed. Could you please elaborate a little more on this field or point in the direction of where it is documented? From cce at ccs.neu.edu Fri May 30 11:22:48 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:18:58 2009 Subject: [plt-scheme] planet server upgraded In-Reply-To: <756daca50805300808g31d4a2b2v92dca337b1255518@mail.gmail.com> References: <46b603df0805280959j730f4126j57ff0690711ac2c4@mail.gmail.com> <756daca50805300808g31d4a2b2v92dca337b1255518@mail.gmail.com> Message-ID: <990e0c030805300822m78e1bedah6da8439ac51a9e3c@mail.gmail.com> On Fri, May 30, 2008 at 11:08 AM, Grant Rettke wrote: > Hi Jacob, > >> Package maintainers should note a new 'repositories field for info.ss where a package's repositories can be listed. > > Could you please elaborate a little more on this field or point in the > direction of where it is documented? Grant, it's in section 5.2.3 (Create an "info.ss" File) of the Planet documentation, which is in the main PLT Help page under Miscellaneous Libraries. It reads: The 'repositories field: If present, the repositories field should be a list consisting of some subset of the strings "4.x" and "3xx". The string "4.x" indicates that this package should be included in the v4.x repository (which contains packages that are intended to run in PLT Scheme versions at or above version 4.0), and the string "3xx" indicates that the package should be included in the v3xx repository (containing packages intended to run in PLT Scheme versions in the 3xx series). A single package (and a single version of a package) may be included in multiple repositories with the same PLaneT version number. -- Carl Eastlund From grettke at acm.org Fri May 30 13:55:05 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:18:59 2009 Subject: [plt-scheme] planet server upgraded In-Reply-To: <990e0c030805300822m78e1bedah6da8439ac51a9e3c@mail.gmail.com> References: <46b603df0805280959j730f4126j57ff0690711ac2c4@mail.gmail.com> <756daca50805300808g31d4a2b2v92dca337b1255518@mail.gmail.com> <990e0c030805300822m78e1bedah6da8439ac51a9e3c@mail.gmail.com> Message-ID: <756daca50805301055j718820dfoc35acc3fe7839fae@mail.gmail.com> Hi Carl, > it's in section 5.2.3 Thanks for the pointer. I'm running 3.99.0.25 from a nightly build and the text you pasted isn't present in there. Where does the text you referenced live? From cce at ccs.neu.edu Fri May 30 13:59:47 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:18:59 2009 Subject: [plt-scheme] planet server upgraded In-Reply-To: <756daca50805301055j718820dfoc35acc3fe7839fae@mail.gmail.com> References: <46b603df0805280959j730f4126j57ff0690711ac2c4@mail.gmail.com> <756daca50805300808g31d4a2b2v92dca337b1255518@mail.gmail.com> <990e0c030805300822m78e1bedah6da8439ac51a9e3c@mail.gmail.com> <756daca50805301055j718820dfoc35acc3fe7839fae@mail.gmail.com> Message-ID: <990e0c030805301059y53a45821wed835c6243369263@mail.gmail.com> On Fri, May 30, 2008 at 1:55 PM, Grant Rettke wrote: > Hi Carl, > >> it's in section 5.2.3 > > Thanks for the pointer. > > I'm running 3.99.0.25 from a nightly build and the text you pasted > isn't present in there. > > Where does the text you referenced live? I'm using the latest subversion sources. That change may have made it to the latest nightly build, I'm not sure. -- Carl Eastlund From dyoo at cs.wpi.edu Fri May 30 21:02:13 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:18:59 2009 Subject: [plt-scheme] Does the autoloading of snip-classes support a PLaneT source? In-Reply-To: <20080525121339.C8BA6650146@mail-svr1.cs.utah.edu> References: <20080525121339.C8BA6650146@mail-svr1.cs.utah.edu> Message-ID: >> I see that if the snip-class name is of the form "(lib ...)" that the >> snipclass can be dynamic-required. Can the the same support be >> available for PLaneT-derived snips? >> >> I'm looking at mred/private/snipfile.ss, and I see that the definition >> for "ok-lib-path?" only allows snip-classes to be auto-loaded from >> collections. If that definition could be expanded to also allow PLaneT >> packages (maybe by just using module-path?), that would be nice. > > We haven't allowed this, so far, because it would mean that merely > opening a file in DrScheme would be enough to have code downloaded and > installed on your machine. That may be a good thing from a usability point of view, and probably a security nightmare from the administrator's. :) But I wanted to come back to this point. What's in place now doesn't seem like much protection; concretely, if I do a Check-syntax on a file written by someone else, this too can potentially trigger the download and installation of a PLaneT package, even though I haven't Run the program. From samth at ccs.neu.edu Fri May 30 22:00:48 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:18:59 2009 Subject: [plt-scheme] Does the autoloading of snip-classes support a PLaneT source? In-Reply-To: References: <20080525121339.C8BA6650146@mail-svr1.cs.utah.edu> Message-ID: <63bb19ae0805301900l1c528036q88a310672a92f275@mail.gmail.com> On Fri, May 30, 2008 at 9:02 PM, Danny Yoo wrote: >>> I see that if the snip-class name is of the form "(lib ...)" that the >>> snipclass can be dynamic-required. Can the the same support be available >>> for PLaneT-derived snips? >>> >>> I'm looking at mred/private/snipfile.ss, and I see that the definition >>> for "ok-lib-path?" only allows snip-classes to be auto-loaded from >>> collections. If that definition could be expanded to also allow PLaneT >>> packages (maybe by just using module-path?), that would be nice. >> >> We haven't allowed this, so far, because it would mean that merely opening >> a file in DrScheme would be enough to have code downloaded and installed on >> your machine. > > > > That may be a good thing from a usability point of view, and probably a > security nightmare from the administrator's. :) > > But I wanted to come back to this point. What's in place now doesn't seem > like much protection; concretely, if I do a Check-syntax on a file written > by someone else, this too can potentially trigger the download and > installation of a PLaneT package, even though I haven't Run the program. This is true even without snips - this program downloads from planet when you hit check syntax: #lang scheme (require (for-syntax (planet "file.ss" ("me" "package.plt")))) -- sam th samth@ccs.neu.edu From vijay.the.schemer at gmail.com Sat May 31 04:16:37 2008 From: vijay.the.schemer at gmail.com (Vijay Mathew) Date: Thu Mar 26 02:19:00 2009 Subject: [plt-scheme] Customized MzScheme - Spark Message-ID: <9c57dec20805310116m1e406e6wef3e25b9356f329f@mail.gmail.com> A customized version of MzScheme, that I developed for my personal use, is now available for download at http://code.google.com/p/spark-scheme/. I just added things I needed to MzScheme. Thought this might be useful for someone else too. -- Vijay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080531/9ab6035a/attachment.htm From marek at xivilization.net Sat May 31 05:24:33 2008 From: marek at xivilization.net (Marek Kubica) Date: Thu Mar 26 02:19:00 2009 Subject: [plt-scheme] Customized MzScheme - Spark In-Reply-To: <9c57dec20805310116m1e406e6wef3e25b9356f329f@mail.gmail.com> References: <9c57dec20805310116m1e406e6wef3e25b9356f329f@mail.gmail.com> Message-ID: <20080531112433.79aa5f7a@halmanfloyd.lan.local> On Sat, 31 May 2008 13:46:37 +0530 "Vijay Mathew" wrote: > A customized version of MzScheme, that I developed for my personal > use, is now available for download at > http://code.google.com/p/spark-scheme/. I just added things I needed > to MzScheme. Thought this might be useful for someone else too. Sounds interesting, as I come from Python. Can you elaborate on what was added so I can see whether it is of any use for me? regards, Marek