From pluskid at gmail.com Sun Jun 1 00:28:12 2008 From: pluskid at gmail.com (Chiyuan Zhang) Date: Thu Mar 26 02:19:00 2009 Subject: [plt-scheme] How to deal with namespace in embed mode? Message-ID: Hi all, I sent a mail to the list but it seems that non-member can't do this. So I subscribed to this list and ask again. I was embedding mzscheme and I sometimes need multiple independent namespaces. The document on namespace of "Inside PLT MzScheme" is rather brief. But I found that it seems "make_namespace" can be used to create a Scheme_Env * which can be used as a namespace. It can be passed to the functions like scheme_eval as the namespace to use. However, I found another paragraph in "PLT MzScheme: Language reference": A namespace is used by setting the current-namespace parameter value (see section 7.9.1.5), by providing the namespace to procedures such as eval and eval-syntax. So is it enough by just passing the namespace to the functions? Or should I set the current-namespace parameter each time I switched to another namespace? Thanks for help! -- pluskid From czhu at cs.utah.edu Sun Jun 1 06:13:48 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:03 2009 Subject: [plt-scheme] How to deal with namespace in embed mode? In-Reply-To: References: Message-ID: <4842765C.20905@cs.utah.edu> Chiyuan Zhang wrote: > Hi all, > > I sent a mail to the list but it seems that non-member can't do this. > So I subscribed to this list and ask again. > > I was embedding mzscheme and I sometimes need multiple independent > namespaces. The document on namespace of "Inside PLT MzScheme" is > rather brief. But I found that it seems "make_namespace" can be used > to create a Scheme_Env * which can be used as a namespace. > > Yes, this is correct. > It can be passed to the functions like scheme_eval as the namespace to > use. However, I found another paragraph in "PLT MzScheme: Language > reference": > > A namespace is used by setting the current-namespace parameter value > (see section 7.9.1.5), by providing the namespace to procedures such > as eval and eval-syntax. > > So is it enough by just passing the namespace to the functions? Or > should I set the current-namespace parameter each time I switched to > another namespace? > > You can do either. (Assuming you are using PLT Scheme v372,) Please refer to chapter 4 and 9 about the current-namespace parameter. > Thanks for help! > Chongkai From czhu at cs.utah.edu Sun Jun 1 06:32:23 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:03 2009 Subject: [plt-scheme] How to deal with namespace in embed mode? In-Reply-To: <4842765C.20905@cs.utah.edu> References: <4842765C.20905@cs.utah.edu> Message-ID: <48427AB7.4000909@cs.utah.edu> Chongkai Zhu wrote: > > You can do either. (Assuming you are using PLT Scheme v372,) Please > refer to chapter 4 and 9 about the current-namespace parameter. > Chapter 4 and 9 of "Inside PLT MzScheme". If you are writing C code, then I feel passing Scheme_Env* around will be more handy. But you can use the parameter. From pluskid at gmail.com Sun Jun 1 08:19:55 2008 From: pluskid at gmail.com (Chiyuan Zhang) Date: Thu Mar 26 02:19:03 2009 Subject: [plt-scheme] How to do exception catching in C code? Message-ID: Hi all, I'm embedding mzscheme to other program. I want to handle the exception and know precisely what happened. I found in the "Exceptions and Escape Continuations" chapter that the simplest way is to mix Scheme code with C code. I tried that way and found I was encountering some strange errors. I'm not sure what part of my code has something wrong, but I'm also concerning that there will be a performance issue with this method. So I would like to try the "harder" way. It is mentioned that there are parameters like "MZCONFIG_ERROR_DISPLAY_HANDLER", "MZCONFIG_EXIT_HANDLER", "MZCONFIG_ERROR_PRINT_VALUE_HANDLER", "MZSCHEME_INIT_EXN_HANDLER" etc. But where can I find some more details about those parameters? I.e. what exactly do they do? If I want to install my own handler, what prototype and conventions should they follow? Any hints? -- pluskid From dave at pawfal.org Sun Jun 1 08:33:37 2008 From: dave at pawfal.org (Dave Griffiths) Date: Thu Mar 26 02:19:03 2009 Subject: [plt-scheme] reindent code Message-ID: <1212323617.5550.4.camel@daves-laptop> Hi all, Is the code for the reindent function in drscheme availible as a library function anywhere? I've been playing with pretty-format, but it doesn't do quite the same thing. Cheers, dave From czhu at cs.utah.edu Sun Jun 1 08:37:03 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:03 2009 Subject: [plt-scheme] How to do exception catching in C code? In-Reply-To: References: Message-ID: <484297EF.4060807@cs.utah.edu> Chiyuan Zhang wrote: > Hi all, > > I'm embedding mzscheme to other program. I want to handle the > exception and know precisely what happened. I found in the > "Exceptions and Escape Continuations" chapter that the simplest way is > to mix Scheme code with C code. I tried that way and found I was > encountering some strange errors. I'm not sure what part of my code > has something wrong, but I'm also concerning that there will be a > performance issue with this method. > > My first choice would be to handle the exception in Scheme code instead of mix Scheme with C. Actually my first choice will be to live in Scheme at all and not bothered with C. But that's kind of off topic. I don't think there is a performance issue with this method. > So I would like to try the "harder" way. It is mentioned that there > are parameters like "MZCONFIG_ERROR_DISPLAY_HANDLER", > "MZCONFIG_EXIT_HANDLER", "MZCONFIG_ERROR_PRINT_VALUE_HANDLER", > "MZSCHEME_INIT_EXN_HANDLER" etc. But where can I find some more > details about those parameters? I.e. what exactly do they do? If I > want to install my own handler, what prototype and conventions should > they follow? > > Any hints? > > Still, assuming you are using PLT Scheme v372, section 7.9.1.7 of PLT MzScheme: Language Manual is what you should read. Chongkai From robby at cs.uchicago.edu Sun Jun 1 08:38:20 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:19:03 2009 Subject: [plt-scheme] reindent code In-Reply-To: <1212323617.5550.4.camel@daves-laptop> References: <1212323617.5550.4.camel@daves-laptop> Message-ID: <932b2f1f0806010538q72729fd9xea2e9798a0ec9db@mail.gmail.com> It is only available as methods of the scheme:text% editor (scheme:text-mixin, more precisely), so you'd have to use the framework (ie a GUI library). Robby On Sun, Jun 1, 2008 at 7:33 AM, Dave Griffiths wrote: > Hi all, > > Is the code for the reindent function in drscheme availible as a library > function anywhere? I've been playing with pretty-format, but it doesn't > do quite the same thing. > > Cheers, > > dave > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From dave at pawfal.org Sun Jun 1 13:57:18 2008 From: dave at pawfal.org (Dave Griffiths) Date: Thu Mar 26 02:19:03 2009 Subject: [plt-scheme] reindent code In-Reply-To: <932b2f1f0806010538q72729fd9xea2e9798a0ec9db@mail.gmail.com> References: <1212323617.5550.4.camel@daves-laptop> <932b2f1f0806010538q72729fd9xea2e9798a0ec9db@mail.gmail.com> Message-ID: <1212343038.5884.2.camel@daves-laptop> Thanks Robby, I can't use the framework unfortunately, but I'll have a dig around and try and extract the code... On Sun, 2008-06-01 at 07:38 -0500, Robby Findler wrote: > It is only available as methods of the scheme:text% editor > (scheme:text-mixin, more precisely), so you'd have to use the > framework (ie a GUI library). > > Robby > > On Sun, Jun 1, 2008 at 7:33 AM, Dave Griffiths wrote: > > Hi all, > > > > Is the code for the reindent function in drscheme availible as a library > > function anywhere? I've been playing with pretty-format, but it doesn't > > do quite the same thing. > > > > Cheers, > > > > dave > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > From neil at neilvandyke.org Sun Jun 1 14:29:43 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:19:04 2009 Subject: [plt-scheme] reindent code In-Reply-To: <1212343038.5884.2.camel@daves-laptop> References: <1212323617.5550.4.camel@daves-laptop> <932b2f1f0806010538q72729fd9xea2e9798a0ec9db@mail.gmail.com> <1212343038.5884.2.camel@daves-laptop> Message-ID: <4842EA97.6060505@neilvandyke.org> If, by chance, you just want a quick&dirty command-line reindenter program for internal use, you might be able to get by with making a shell script wrapper around Emacs in batch mode. You'd have Emacs require Quack, open the file, execute "quack-tidy", write the file, and exit. If you disable Emacs loading of site and user configs, you should be able to get total wall clock run time for the program in the neighborhood of 1-3 seconds on an ordinary PC, especially on repeated invocations while Emacs text is in caches. Emacs with Quack indents almost identically to DrScheme. Beware that "quack-tidy" doesn't know about PLT's here-document syntax, and will mess that up badly. From lunarc.lists at gmail.com Sun Jun 1 20:29:25 2008 From: lunarc.lists at gmail.com (Henk Boom) Date: Thu Mar 26 02:19:04 2009 Subject: [plt-scheme] Runaway Memory in Web Server In-Reply-To: References: Message-ID: 2008/5/31 Jay McCarthy : > There is not. Could you submit a feature request? > > Jay > > On Thu, May 29, 2008 at 9:43 PM, Henk Boom wrote: >> 2008/5/29 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? >> Done. http://bugs.plt-scheme.org/query/?cmd=view&pr=9444 It could also be useful to set an explicit memory limit, e.g. if more than X MB of resident memory is used wait for already started requests to finish and then do a garbage collection. From lunarc.lists at gmail.com Sun Jun 1 20:41:25 2008 From: lunarc.lists at gmail.com (Henk Boom) Date: Thu Mar 26 02:19:04 2009 Subject: [plt-scheme] rest-like keyword arguments Message-ID: Hi, I guess I was one of the few people who actually used pre-400's keyword library. In the document describing the changes in v4, I see the following: http://pre.plt-scheme.org/plt/doc/release-notes/mzscheme/MzScheme_4.txt > "Rest" > arguments, such as the `x' in `(lambda x 10)', do not capture > keyword-based arguments; keyword arguments are completely separate > from by-position arguments, and a separate "rest"-like facility is > provided for accepting all provided keyword arguments. Where can I find this rest-like facility for keyword arguments? I don't see any mention of it at http://pre.plt-scheme.org/docs/html/reference/lambda.html . Henk From eli at barzilay.org Sun Jun 1 20:45:28 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:04 2009 Subject: [plt-scheme] rest-like keyword arguments In-Reply-To: References: Message-ID: <18499.17064.407601.208624@arabic.ccs.neu.edu> On Jun 1, Henk Boom wrote: > Hi, I guess I was one of the few people who actually used pre-400's > keyword library. In the document describing the changes in v4, I see > the following: > > http://pre.plt-scheme.org/plt/doc/release-notes/mzscheme/MzScheme_4.txt > > "Rest" > > arguments, such as the `x' in `(lambda x 10)', do not capture > > keyword-based arguments; keyword arguments are completely separate > > from by-position arguments, and a separate "rest"-like facility is > > provided for accepting all provided keyword arguments. > > Where can I find this rest-like facility for keyword arguments? I > don't see any mention of it at > http://pre.plt-scheme.org/docs/html/reference/lambda.html . http://docs.plt-scheme.org/reference/procedures.html#(def._((collects._scheme._base..ss)._make-keyword-procedure)) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From martindemello at gmail.com Mon Jun 2 01:15:36 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:19:04 2009 Subject: [plt-scheme] get caret position in text% Message-ID: How do I get the row and column the caret is currently at in a text% widget? martin From robby at cs.uchicago.edu Mon Jun 2 07:20:10 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:19:04 2009 Subject: [plt-scheme] get caret position in text% In-Reply-To: References: Message-ID: <932b2f1f0806020420q471b5c5co110fdec7297a2604@mail.gmail.com> If you want the line and column according to the soft line breaks, look at the methods with the name "line" in them and if you want the line and column according only to where newlines are in the buffer, look for methods with the name "paragraph". http://docs.plt-scheme.org/gui/text_.html Robby On Mon, Jun 2, 2008 at 12:15 AM, Martin DeMello wrote: > How do I get the row and column the caret is currently at in a text% widget? > > martin > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From kondacs at yahoo.com Mon Jun 2 10:42:52 2008 From: kondacs at yahoo.com (Attila Kondacs) Date: Thu Mar 26 02:19:04 2009 Subject: [plt-scheme] problems with MrEd running under Quack emacs mode on WindowsXP Message-ID: <97773.56936.qm@web30207.mail.mud.yahoo.com> Hi, I have set up Plt-Scheme on a WindowsXP, with emacs and Quack editor mode, I followed these steps to set up emacs and quack: http://bc.tech.coop/scheme/scheme-emacs.htm My problem is that I am getting fairly strange behavior when I run MrEd as the inferior process of emacs (using Quack). For example, if I evaluate the following code: *********************************************************** ;; Make a frame by instantiating the frame% class (define frame (instantiate frame% ("Example"))) ;; Make a static text message in the frame (define msg (instantiate message% ("No events so far..." frame))) ;; Make a button in the frame (using keyword-based arguments) (instantiate button% () (label "Click Me") (parent frame) ;; Callback procedure for a button click (callback (lambda (button event) (send msg set-label "Button click")))) ;; Show the frame by calling its show method (send frame show #t) ************************************************************* in Quack/Emacs, the window with the correct title shows up, but there is nothing inside the window. If I hide the window, and give focus back to by right-clicking the tab of the window and tell it to maximize, then the widgets appears - but this time with the correct contents, i.e. with the message "No events so far..." and a button with label "Click Me". The button does not respond to any action. Interestingly, everything works fine on this machine when I run the exact same code from the DrShceme IDE. (some further setup details: instead of what the built in F5 command does, I defined my own MrEd starting procedure by replacing "mzscheme.exe" with "mred.exe -z" in my c:/home/_emacs file on windows... and it works, i.e. quack and the inferior MrEd do start.) Any ideas what might be going wrong? thanks Rudi From lunarc.lists at gmail.com Mon Jun 2 11:58:51 2008 From: lunarc.lists at gmail.com (Henk Boom) Date: Thu Mar 26 02:19:05 2009 Subject: [plt-scheme] rest-like keyword arguments In-Reply-To: <18499.17064.407601.208624@arabic.ccs.neu.edu> References: <18499.17064.407601.208624@arabic.ccs.neu.edu> Message-ID: 2008/6/1 Eli Barzilay : > http://docs.plt-scheme.org/reference/procedures.html#(def._((collects._scheme._base..ss)._make-keyword-procedure)) Thanks, that's exactly what I was looking for! Henk From martindemello at gmail.com Mon Jun 2 12:46:50 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:19:05 2009 Subject: [plt-scheme] get caret position in text% In-Reply-To: <932b2f1f0806020420q471b5c5co110fdec7297a2604@mail.gmail.com> References: <932b2f1f0806020420q471b5c5co110fdec7297a2604@mail.gmail.com> Message-ID: I went through the docs, and couldn't find anything relating to the caret. I found the following methods containing 'paragraph': last-paragraph line-paragraph paragraph-end-line paragraph-end-position paragraph-start-line paragraph-start-position position-paragraph set-paragraph-alignment set-paragraph-margins of which only last-paragraph doesn't take an argument. martin On Mon, Jun 2, 2008 at 4:20 AM, Robby Findler wrote: > If you want the line and column according to the soft line breaks, > look at the methods with the name "line" in them and if you want the > line and column according only to where newlines are in the buffer, > look for methods with the name "paragraph". > > http://docs.plt-scheme.org/gui/text_.html > > Robby > > On Mon, Jun 2, 2008 at 12:15 AM, Martin DeMello wrote: >> How do I get the row and column the caret is currently at in a text% widget? >> >> martin >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> > From robby at cs.uchicago.edu Mon Jun 2 13:18:06 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:19:05 2009 Subject: [plt-scheme] get caret position in text% In-Reply-To: References: <932b2f1f0806020420q471b5c5co110fdec7297a2604@mail.gmail.com> Message-ID: <932b2f1f0806021018j40e4c9bfr9af69234a4a60560@mail.gmail.com> You want to combine position-paragraph (which is below) with get-start-position and get-end-position. Robby On Mon, Jun 2, 2008 at 11:46 AM, Martin DeMello wrote: > I went through the docs, and couldn't find anything relating to the > caret. I found the following methods containing 'paragraph': > > last-paragraph > line-paragraph > paragraph-end-line > paragraph-end-position > paragraph-start-line > paragraph-start-position > position-paragraph > set-paragraph-alignment > set-paragraph-margins > > of which only last-paragraph doesn't take an argument. > > martin > > On Mon, Jun 2, 2008 at 4:20 AM, Robby Findler wrote: >> If you want the line and column according to the soft line breaks, >> look at the methods with the name "line" in them and if you want the >> line and column according only to where newlines are in the buffer, >> look for methods with the name "paragraph". >> >> http://docs.plt-scheme.org/gui/text_.html >> >> Robby >> >> On Mon, Jun 2, 2008 at 12:15 AM, Martin DeMello wrote: >>> How do I get the row and column the caret is currently at in a text% widget? >>> >>> martin >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>> >>> >> > > From martindemello at gmail.com Mon Jun 2 13:22:08 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:19:05 2009 Subject: [plt-scheme] get caret position in text% In-Reply-To: <932b2f1f0806021018j40e4c9bfr9af69234a4a60560@mail.gmail.com> References: <932b2f1f0806020420q471b5c5co110fdec7297a2604@mail.gmail.com> <932b2f1f0806021018j40e4c9bfr9af69234a4a60560@mail.gmail.com> Message-ID: Ah, thanks! Sorry for being slow :) I do think the docs should be clearer that the "current selection" defaults to the caret if there is no selection. martin On Mon, Jun 2, 2008 at 10:18 AM, Robby Findler wrote: > You want to combine position-paragraph (which is below) with > get-start-position and get-end-position. > > Robby > > On Mon, Jun 2, 2008 at 11:46 AM, Martin DeMello wrote: >> I went through the docs, and couldn't find anything relating to the >> caret. I found the following methods containing 'paragraph': >> >> last-paragraph >> line-paragraph >> paragraph-end-line >> paragraph-end-position >> paragraph-start-line >> paragraph-start-position >> position-paragraph >> set-paragraph-alignment >> set-paragraph-margins >> >> of which only last-paragraph doesn't take an argument. >> >> martin >> >> On Mon, Jun 2, 2008 at 4:20 AM, Robby Findler wrote: >>> If you want the line and column according to the soft line breaks, >>> look at the methods with the name "line" in them and if you want the >>> line and column according only to where newlines are in the buffer, >>> look for methods with the name "paragraph". >>> >>> http://docs.plt-scheme.org/gui/text_.html >>> >>> Robby >>> >>> On Mon, Jun 2, 2008 at 12:15 AM, Martin DeMello wrote: >>>> How do I get the row and column the caret is currently at in a text% widget? >>>> >>>> martin >>>> _________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>>> >>>> >>> >> >> > From robby at cs.uchicago.edu Mon Jun 2 14:06:19 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:19:05 2009 Subject: [plt-scheme] get caret position in text% In-Reply-To: References: <932b2f1f0806020420q471b5c5co110fdec7297a2604@mail.gmail.com> <932b2f1f0806021018j40e4c9bfr9af69234a4a60560@mail.gmail.com> Message-ID: <932b2f1f0806021106t3bbb21dake80608b24407ed12@mail.gmail.com> No problem! I've updated the docs to clarify that (in SVN). Thanks, Robby On Mon, Jun 2, 2008 at 12:22 PM, Martin DeMello wrote: > Ah, thanks! Sorry for being slow :) I do think the docs should be > clearer that the "current selection" defaults to the caret if there is > no selection. > > martin > > On Mon, Jun 2, 2008 at 10:18 AM, Robby Findler wrote: >> You want to combine position-paragraph (which is below) with >> get-start-position and get-end-position. >> >> Robby >> >> On Mon, Jun 2, 2008 at 11:46 AM, Martin DeMello wrote: >>> I went through the docs, and couldn't find anything relating to the >>> caret. I found the following methods containing 'paragraph': >>> >>> last-paragraph >>> line-paragraph >>> paragraph-end-line >>> paragraph-end-position >>> paragraph-start-line >>> paragraph-start-position >>> position-paragraph >>> set-paragraph-alignment >>> set-paragraph-margins >>> >>> of which only last-paragraph doesn't take an argument. >>> >>> martin >>> >>> On Mon, Jun 2, 2008 at 4:20 AM, Robby Findler wrote: >>>> If you want the line and column according to the soft line breaks, >>>> look at the methods with the name "line" in them and if you want the >>>> line and column according only to where newlines are in the buffer, >>>> look for methods with the name "paragraph". >>>> >>>> http://docs.plt-scheme.org/gui/text_.html >>>> >>>> Robby >>>> >>>> On Mon, Jun 2, 2008 at 12:15 AM, Martin DeMello wrote: >>>>> How do I get the row and column the caret is currently at in a text% widget? >>>>> >>>>> martin >>>>> _________________________________________________ >>>>> For list-related administrative tasks: >>>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>>>> >>>>> >>>> >>> >>> >> > > From dyoo at cs.wpi.edu Mon Jun 2 14:28:38 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:19:05 2009 Subject: [plt-scheme] Has anyone written a tabular or grid editor%? Message-ID: Hi everyone, Just wondering: has anyone already written an pasteboard editor that handles tabular or grid layout? I see MrLib's aligned-pasteboard<%>, and composing horzontal-pasteboard% and vertical-pasteboard% almost works, except that my cells aren't guaranteed to be the same size. Before I go out to implement one, I just want to make sure I'm not duplicating effort. Thanks! From pluskid at gmail.com Mon Jun 2 21:09:00 2008 From: pluskid at gmail.com (Chiyuan Zhang) Date: Thu Mar 26 02:19:06 2009 Subject: [plt-scheme] Is there any way to disable object moving in GC temporarily? Message-ID: Hi, For some reason, I can't use the MZ_GC_DECL_REG, MZ_GC_VAR_IN_REG and MZ_GC_REG related macros provided by mzscheme sometimes. I'm just wondering is there any function to prevent some pointer pointed object from being moved. Just like the scheme_dont_gc_ptr function to prevent an object from being collected. Or is it possible to write such a helper function? Thanks! -- pluskid From blockstack at gmail.com Mon Jun 2 21:33:11 2008 From: blockstack at gmail.com (blockstack) Date: Thu Mar 26 02:19:06 2009 Subject: [plt-scheme] Uninstalling MzScheme v372 Message-ID: I recently installed mzscheme v372 on windows xp using the installer. I noticed that it is not listed in the add/remove programs, nor does it come with an uninstaller. I can't delete the folder because apparently the dll's are in use. Anyone know how I uninstall it cleanly? From eli at barzilay.org Mon Jun 2 21:44:04 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:06 2009 Subject: [plt-scheme] Uninstalling MzScheme v372 In-Reply-To: References: Message-ID: <18500.41444.238516.752202@arabic.ccs.neu.edu> On Jun 2, blockstack wrote: > I recently installed mzscheme v372 on windows xp using the > installer. I noticed that it is not listed in the add/remove > programs, nor does it come with an uninstaller. Right. The first message on the installation dialog says that it's a simple installer that just creates the directory -- and you only need to remove it to uninstall it. (No registry keys or startup menu items are created.) To get the usual stuff, use the PLT Scheme installer instead. (The MzScheme distribution is more server-oriented.) > I can't delete the folder because apparently the dll's are in use. > Anyone know how I uninstall it cleanly? In this case an uninstaller would not have helped you -- it would simply tell you that it couldn't remove the offending files. You need to find the process that holds the DLL open and kill it. (Maybe you started the web server?) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Mon Jun 2 21:46:00 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:06 2009 Subject: [plt-scheme] Is there any way to disable object moving in GC temporarily? In-Reply-To: References: Message-ID: <18500.41560.71340.436462@arabic.ccs.neu.edu> On Jun 3, Chiyuan Zhang wrote: > Hi, > > For some reason, I can't use the MZ_GC_DECL_REG, MZ_GC_VAR_IN_REG and > MZ_GC_REG related macros provided by mzscheme sometimes. I'm just > wondering is there any function to prevent some pointer pointed object > from being moved. Just like the scheme_dont_gc_ptr function to prevent > an object from being collected. Or is it possible to write such a > helper function? If you use plain `malloc', the blocks are not visible to the GC so they'll stay in place. If you want pointers that the GC can see but will not move, then look for immobile boxes. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From paul at stadig.name Tue Jun 3 07:41:58 2008 From: paul at stadig.name (Paul Stadig) Date: Thu Mar 26 02:19:07 2009 Subject: [plt-scheme] Web server setup and documentation Message-ID: <3cd5de9f0806030441m33bcd82epc1fccae068ce5567@mail.gmail.com> Hi everyone, I'm new to Scheme and MzScheme, and I was trying to get the web server setup. I ran into some issues: 1. The init script on Ubuntu is wrong. It is referencing 'text-launch.ss'. I had to change it to 'private/launch-text.ss'. I'm guessing that is more of a Debian/Ubuntu issue than a MzScheme issue, but I don't know if the init script is part of the MzScheme distribution. 2. I needed some documentation, so I did what I thought was the reasonable thing and installed the Web Server manual in the help desk. The only problem is that manual was sorely out of date, and it was totally wrong in terms of how to configure the server. It seems the configuration system has changed since 12/28/2007? So I did the next most reasonable thing and looked up the documentation on the plt-scheme.org site. Click on "Documentation". Click on "All PLT Documentation". Click on "Web Server Manual", and it's the same thing that gets installed in the help desk. It was only after searching through the mailing list archives that I found this site 'docs.plt-scheme.org'. The configuration section at least seems to match what I'm seeing in the installed collection, so I'm hopeful this will help me figure out how to get started writing servlets. Is this a prerelease documentation site or something? Why isn't it linked from the plt-scheme.org site? I guess I'm just confused. 3. I tried to use instantservlet, and when I ran the example I get: standard-module-name-resolver: collection not found: "scheme/base" in any of: (# #) I can't seem to find scheme/base anywhere is this a planet or some extra collection to install? I'm running DrScheme/MzScheme 372 on Ubuntu Hardy Heron. Perhaps I should install MzScheme manually instead of using the Ubuntu distribution? Ubuntu seems to be using the latest version, though. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080603/0407f489/attachment.html From eli at barzilay.org Tue Jun 3 09:01:38 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:07 2009 Subject: [plt-scheme] Web server setup and documentation In-Reply-To: <3cd5de9f0806030441m33bcd82epc1fccae068ce5567@mail.gmail.com> References: <3cd5de9f0806030441m33bcd82epc1fccae068ce5567@mail.gmail.com> Message-ID: <18501.16562.65749.178888@arabic.ccs.neu.edu> On Jun 3, Paul Stadig wrote: > Hi everyone, > I'm new to Scheme and MzScheme, and I was trying to get the web > server setup. I ran into some issues: > > 1. The init script on Ubuntu is wrong. It is referencing > 'text-launch.ss'. I had to change it to > 'private/launch-text.ss'. I'm guessing that is more of a > Debian/Ubuntu issue than a MzScheme issue, but I don't know if the > init script is part of the MzScheme distribution. No, the init script is not part of the mzscheme distribution. > So I did the next most reasonable thing and looked up the > documentation on the plt-scheme.org site. Click on > "Documentation". Click on "All PLT Documentation". Click on "Web > Server Manual", and it's the same thing that gets installed in the > help desk. Right -- it's the version that was relevant in version 372. > It was only after searching through the mailing list archives that I > found this site 'docs.plt-scheme.org'. The configuration section at > least seems to match what I'm seeing in the installed collection, so > I'm hopeful this will help me figure out how to get started writing > servlets. Is this a prerelease documentation site or something? Why > isn't it linked from the plt-scheme.org site? I guess I'm just > confused. Right again -- it's the pre-release documentation, so it's not linked. But the new version (4.0) is going to be released in a few days, so you can just as well get and use the pre-release builds (from pre.plt-scheme.org). > 3. I tried to use instantservlet, and when I ran the example I get: > > standard-module-name-resolver: collection not found: "scheme/base" > in any of: (# > #) > > I can't seem to find scheme/base anywhere is this a planet or some > extra collection to install? No, it's a part of the new version, which will work if you get the above, -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From kondacs at yahoo.com Tue Jun 3 09:20:00 2008 From: kondacs at yahoo.com (Attila Kondacs) Date: Thu Mar 26 02:19:07 2009 Subject: [plt-scheme] problems with (require ..) Message-ID: <924528.87127.qm@web30206.mail.mud.yahoo.com> Hi, sorry for this rarther newbie question: I cannot seem to get the "require" command to work as described all over the docs -- say, here: http://docs.plt-scheme.org/guide/module-basics.html. In WindowsXP DrScheme version 372, using "module" language, one of the first examples from the above link: #lang scheme (require setup/dirs) does not work - it cannot find collection scheme. If I change scheme to mzscheme it works, but #lang mzscheme (require setup/dirs) still does not work -- it says "require: unknown module: setup/dirs". The following works under windows: #lang mzscheme (require "collects/setup/dirs.ss") and (find-collects-dir) returns # (which seems to be the correct path). Is there a way to get (require setup/dir) to work correctly for libraries distributed with drscheme? The same issue comes up in DrScheme stable version running on Ubuntu linux (Gutsy Gibbon): evaluating #lang scheme (require setup/dirs) leads to this output: "Welcome to DrScheme, version 360. Language: (module ...). read: bad syntax `#l'" Does "require" work for others for libraries in the collects directories? Help! thanks Rudi From paul at stadig.name Tue Jun 3 09:38:38 2008 From: paul at stadig.name (Paul Stadig) Date: Thu Mar 26 02:19:07 2009 Subject: [plt-scheme] Web server setup and documentation In-Reply-To: <18501.16562.65749.178888@arabic.ccs.neu.edu> References: <3cd5de9f0806030441m33bcd82epc1fccae068ce5567@mail.gmail.com> <18501.16562.65749.178888@arabic.ccs.neu.edu> Message-ID: <3cd5de9f0806030638qc53c447oc26cb98faf4d5270@mail.gmail.com> Thanks for the reply. When you say the documentation on plt-scheme.org are the docs relevant to 372 what do you mean? The docs on the website talk about constructing configurations using 'load-configuration and 'load-configuration-sexpr which don't exist in the 372 distribution. The descriptions of the 'serve function are also different than what I'm seeing in my installation. Should I be using the prerelease docs, or are the prerelease docs going to be more up-to-date than my distribution (i.e. they may mention new features that don't exist in 372)? Is there a place to find documentation that will match the 372 distribution of web-server, or should I just look through the code to figure it out? I have no problem doing that, I just want to try to save some time. Paul On Tue, Jun 3, 2008 at 9:01 AM, Eli Barzilay wrote: > On Jun 3, Paul Stadig wrote: > > Hi everyone, > > I'm new to Scheme and MzScheme, and I was trying to get the web > > server setup. I ran into some issues: > > > > 1. The init script on Ubuntu is wrong. It is referencing > > 'text-launch.ss'. I had to change it to > > 'private/launch-text.ss'. I'm guessing that is more of a > > Debian/Ubuntu issue than a MzScheme issue, but I don't know if the > > init script is part of the MzScheme distribution. > > No, the init script is not part of the mzscheme distribution. > > > > So I did the next most reasonable thing and looked up the > > documentation on the plt-scheme.org site. Click on > > "Documentation". Click on "All PLT Documentation". Click on "Web > > Server Manual", and it's the same thing that gets installed in the > > help desk. > > Right -- it's the version that was relevant in version 372. > > > > It was only after searching through the mailing list archives that I > > found this site 'docs.plt-scheme.org'. The configuration section at > > least seems to match what I'm seeing in the installed collection, so > > I'm hopeful this will help me figure out how to get started writing > > servlets. Is this a prerelease documentation site or something? Why > > isn't it linked from the plt-scheme.org site? I guess I'm just > > confused. > > Right again -- it's the pre-release documentation, so it's not > linked. But the new version (4.0) is going to be released in a few > days, so you can just as well get and use the pre-release builds (from > pre.plt-scheme.org). > > > > 3. I tried to use instantservlet, and when I ran the example I get: > > > > standard-module-name-resolver: collection not found: "scheme/base" > > in any of: (# > > #) > > > > I can't seem to find scheme/base anywhere is this a planet or some > > extra collection to install? > > No, it's a part of the new version, which will work if you get the > above, > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080603/21cc689d/attachment.htm From eli at barzilay.org Tue Jun 3 09:45:53 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:08 2009 Subject: [plt-scheme] Web server setup and documentation In-Reply-To: <3cd5de9f0806030638qc53c447oc26cb98faf4d5270@mail.gmail.com> References: <3cd5de9f0806030441m33bcd82epc1fccae068ce5567@mail.gmail.com> <18501.16562.65749.178888@arabic.ccs.neu.edu> <3cd5de9f0806030638qc53c447oc26cb98faf4d5270@mail.gmail.com> Message-ID: <18501.19217.275683.503033@arabic.ccs.neu.edu> Summary: * The download.plt-scheme.org/doc stuff is relevant for 372, docs.plt-scheme.org is relevant for the pre-release. * The reason the 372 docs are not good is (I think, I'm not the one who wrote or maintained them) that they weren't kept in line with the code. * Your best option is to get the nightly builds. On Jun 3, Paul Stadig wrote: > Thanks for the reply. When you say the documentation on > plt-scheme.org are the docs relevant to 372 what do you mean? > > The docs on the website talk about constructing configurations using > 'load-configuration and 'load-configuration-sexpr which don't exist > in the 372 distribution. The descriptions of the 'serve function are > also different than what I'm seeing in my installation. Should I be > using the prerelease docs, or are the prerelease docs going to be > more up-to-date than my distribution (i.e. they may mention new > features that don't exist in 372)? > > Is there a place to find documentation that will match the 372 distribution > of web-server, or should I just look through the code to figure it out? I > have no problem doing that, I just want to try to save some time. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From steven.huwig at gmail.com Tue Jun 3 10:10:17 2008 From: steven.huwig at gmail.com (steven_h@acm.org) Date: Thu Mar 26 02:19:08 2009 Subject: [plt-scheme] PLT Scheme equivalent of destructuring-bind Message-ID: <1fafb547-a81f-4573-8290-b2793560c5b3@f63g2000hsf.googlegroups.com> Hello, Is match-let a good way to get the effect of destructuring-bind in PLT Scheme? It's working for me, but I wanted to make sure that there was no reason not to use it before throwing it around everywhere in my code. (I like destructuring-bind.) Thanks, Steve From noelwelsh at gmail.com Tue Jun 3 10:12:31 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:19:08 2009 Subject: [plt-scheme] problems with (require ..) In-Reply-To: <924528.87127.qm@web30206.mail.mud.yahoo.com> References: <924528.87127.qm@web30206.mail.mud.yahoo.com> Message-ID: You're reading the docs for 4.0 but using version 3. I suggest upgrading to 3.99, which will be released as version 4 very soon. Available here: http://pre.plt-scheme.org/ N. On Tue, Jun 3, 2008 at 2:20 PM, Attila Kondacs wrote: > Hi, > > sorry for this rarther newbie question: > I cannot seem to get the "require" command to work as described all over the docs -- say, here: http://docs.plt-scheme.org/guide/module-basics.html. ... From dherman at ccs.neu.edu Tue Jun 3 10:51:15 2008 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Mar 26 02:19:08 2009 Subject: [plt-scheme] PLT Scheme equivalent of destructuring-bind In-Reply-To: <1fafb547-a81f-4573-8290-b2793560c5b3@f63g2000hsf.googlegroups.com> References: <1fafb547-a81f-4573-8290-b2793560c5b3@f63g2000hsf.googlegroups.com> Message-ID: <48455A63.7090504@ccs.neu.edu> Some people prefer let-values for the special case of binding a sequence of names to a sequence of values, but that's a personal taste thing. But generally match-let is the right tool for destructuring bind. Dave steven_h@acm.org wrote: > Hello, > > Is match-let a good way to get the effect of destructuring-bind in PLT > Scheme? It's working for me, but I wanted to make sure that there was > no reason not to use it before throwing it around everywhere in my > code. (I like destructuring-bind.) > > Thanks, > Steve > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From hendrik at topoi.pooq.com Tue Jun 3 11:06:07 2008 From: hendrik at topoi.pooq.com (hendrik@topoi.pooq.com) Date: Thu Mar 26 02:19:08 2009 Subject: [plt-scheme] Web server setup and documentation In-Reply-To: <18501.19217.275683.503033@arabic.ccs.neu.edu> References: <3cd5de9f0806030441m33bcd82epc1fccae068ce5567@mail.gmail.com> <18501.16562.65749.178888@arabic.ccs.neu.edu> <3cd5de9f0806030638qc53c447oc26cb98faf4d5270@mail.gmail.com> <18501.19217.275683.503033@arabic.ccs.neu.edu> Message-ID: <20080603150607.GA6334@topoi.pooq.com> On Tue, Jun 03, 2008 at 09:45:53AM -0400, Eli Barzilay wrote: > Summary: > > * The download.plt-scheme.org/doc stuff is relevant for 372, > docs.plt-scheme.org is relevant for the pre-release. > > * The reason the 372 docs are not good is (I think, I'm not the one > who wrote or maintained them) that they weren't kept in line with > the code. It looks as if the docs should be considered part of the code, and maintained within the same revision control system. -- hendrik From eli at barzilay.org Tue Jun 3 11:23:35 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:08 2009 Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing Message-ID: <200806031523.m53FNZEE030117@winooski.ccs.neu.edu> Version 3.99.0.26 is now available for testing from http://pre.plt-scheme.org/installers/ (Note that this not available from the usual download site.) If all goes well, we will turn this version into a v4.0 release within several days. Your help and feedback in testing this new release candidate, especially the new javascript-based help system would be much appreciated. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at cs.uchicago.edu Tue Jun 3 12:17:11 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:19:08 2009 Subject: [plt-scheme] Web server setup and documentation In-Reply-To: <20080603150607.GA6334@topoi.pooq.com> References: <3cd5de9f0806030441m33bcd82epc1fccae068ce5567@mail.gmail.com> <18501.16562.65749.178888@arabic.ccs.neu.edu> <3cd5de9f0806030638qc53c447oc26cb98faf4d5270@mail.gmail.com> <18501.19217.275683.503033@arabic.ccs.neu.edu> <20080603150607.GA6334@topoi.pooq.com> Message-ID: <932b2f1f0806030917s20c0e4c0jce56c7d72c492a33@mail.gmail.com> They are. On Tue, Jun 3, 2008 at 10:06 AM, wrote: > On Tue, Jun 03, 2008 at 09:45:53AM -0400, Eli Barzilay wrote: >> Summary: >> >> * The download.plt-scheme.org/doc stuff is relevant for 372, >> docs.plt-scheme.org is relevant for the pre-release. >> >> * The reason the 372 docs are not good is (I think, I'm not the one >> who wrote or maintained them) that they weren't kept in line with >> the code. > > It looks as if the docs should be considered part of the code, and > maintained within the same revision control system. > > -- hendrik > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From jos.koot at telefonica.net Tue Jun 3 14:56:50 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:09 2009 Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing References: <200806031523.m53FNZEE030117@winooski.ccs.neu.edu> Message-ID: <000d01c8c5ab$95603990$2101a8c0@uw2b2dff239c4d> All programs I checked run well, but help / help desk in DrScheme gives: build-path: expects type as 2nd argument, given: #f; other arguments were: # === context === core C:\Program Files\PLT-FULL-3.99.0.26\collects\drscheme\private\frame.ss:593:6 C:\Program Files\PLT-FULL-3.99.0.26\collects\mred\private\mrmenu.ss:237:17: command method in basic-selectable-menu-item% C:\Program Files\PLT-FULL-3.99.0.26\collects\scheme\private\more-scheme.ss:155:2: call-with-break-parameterization C:\Program Files\PLT-FULL-3.99.0.26\collects\scheme\private\more-scheme.ss:260:2: call-with-exception-handler This is with Windows XP home. In hope this info is useful. Jos ----- Original Message ----- From: "Eli Barzilay" To: Sent: Tuesday, June 03, 2008 5:23 PM Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing > Version 3.99.0.26 is now available for testing from > > http://pre.plt-scheme.org/installers/ > > (Note that this not available from the usual download site.) > > If all goes well, we will turn this version into a v4.0 release > within several days. > > Your help and feedback in testing this new release candidate, > especially the new javascript-based help system would be much > appreciated. > -- > ((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 Tue Jun 3 14:59:19 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:19:09 2009 Subject: [plt-scheme] Can't produce planet packages; weird scribble error message Message-ID: I'm seeing the following error message when I try to create a PLaneT package now: ########################################################################## dyoo@kfisler-ra1:~/work/projects/plt-misc$ planet create calm-evt Building: manual.scrbl WARNING: open-input-file: cannot open input file: "/home/dyoo/work/projects/plt-misc/calm-evt/doc/manual/out.sxref" (No such file or directory; errno=2) PLaneT packager: Error generating scribble documentation: with-output-to-file: "/home/dyoo/work/projects/plt-misc/calm-evt/planet-docs/manual/" exists as a directory Refusing to continue packaging. ########################################################################## Unfortunately, my public source repository is still down. Ironically, my co-lo is also hosted in a datacenter call "The Planet"... ;) But I can send tarballs if that will help track down what's happening here. Thanks! From geb_a at yahoo.com Tue Jun 3 14:54:03 2008 From: geb_a at yahoo.com (geb a) Date: Thu Mar 26 02:19:10 2009 Subject: [plt-scheme] (no subject) Message-ID: <123426.76796.qm@web50903.mail.re2.yahoo.com> I had a student program using htmlprag that was working great up until last week. Since then when we run the program we get the following error. http://finance.yahoo.com/q/hp?s=KYN&a=4&b=13&c=2008&d=5&e=2&f=2008&g=d&z=66&y=0: close-output-port: expects argument of type ; given # . %htmlprag:parse-html : invalid input type: #f Has anyone else had a similar problem? Thanks in advance for the help! -------------- next part -------------- A non-text attachment was scrubbed... Name: testfile.scm Type: application/octet-stream Size: 569 bytes Desc: testfile.scm Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080603/3f9f0927/testfile.obj From cce at ccs.neu.edu Tue Jun 3 15:35:29 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:19:10 2009 Subject: [plt-scheme] Can't produce planet packages; weird scribble error message In-Reply-To: References: Message-ID: <990e0c030806031235y2a90aa2cyf979bc22829cf3e9@mail.gmail.com> I've already reported something like this as bug 9430, which you can view here: http://bugs.plt-scheme.org/query/?cmd=view&pr=9430 I gave Jacob files to duplicate this bug, which are attached to related bug report 9428. --Carl On Tue, Jun 3, 2008 at 2:59 PM, Danny Yoo wrote: > I'm seeing the following error message when I try to create a PLaneT package > now: > > ########################################################################## > dyoo@kfisler-ra1:~/work/projects/plt-misc$ planet create calm-evt > Building: manual.scrbl > WARNING: open-input-file: cannot open input file: > "/home/dyoo/work/projects/plt-misc/calm-evt/doc/manual/out.sxref" (No such > file or directory; errno=2) > PLaneT packager: Error generating scribble documentation: > with-output-to-file: > "/home/dyoo/work/projects/plt-misc/calm-evt/planet-docs/manual/" exists as a > directory > Refusing to continue packaging. > ########################################################################## > > > Unfortunately, my public source repository is still down. Ironically, my > co-lo is also hosted in a datacenter call "The Planet"... ;) But I can send > tarballs if that will help track down what's happening here. > > > Thanks! From mark.engelberg at gmail.com Tue Jun 3 17:07:06 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:10 2009 Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing In-Reply-To: <000d01c8c5ab$95603990$2101a8c0@uw2b2dff239c4d> References: <200806031523.m53FNZEE030117@winooski.ccs.neu.edu> <000d01c8c5ab$95603990$2101a8c0@uw2b2dff239c4d> Message-ID: I get the same error. Also, the menu bar looks odd on my computer. Although the bar is gray, the labels for the various menus are black text on a white background (the size of the bounding box of the text). As I move the mouse over the menu, more of the menu bar turns white. --Mark On Tue, Jun 3, 2008 at 11:56 AM, Jos Koot wrote: > All programs I checked run well, but help / help desk in DrScheme gives: > > build-path: expects type as 2nd argument, given: > #f; other arguments were: # Settings\HP_Eigenaar\Application Data\PLT Scheme\3.99.0.26\doc> > > > === context === > core > C:\Program Files\PLT-FULL-3.99.0.26\collects\drscheme\private\frame.ss:593:6 > C:\Program Files\PLT-FULL-3.99.0.26\collects\mred\private\mrmenu.ss:237:17: > command method in basic-selectable-menu-item% > C:\Program > Files\PLT-FULL-3.99.0.26\collects\scheme\private\more-scheme.ss:155:2: > call-with-break-parameterization > C:\Program > Files\PLT-FULL-3.99.0.26\collects\scheme\private\more-scheme.ss:260:2: > call-with-exception-handler > > This is with Windows XP home. > In hope this info is useful. > Jos > > > ----- Original Message ----- From: "Eli Barzilay" > To: > Sent: Tuesday, June 03, 2008 5:23 PM > Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing > > >> Version 3.99.0.26 is now available for testing from >> >> http://pre.plt-scheme.org/installers/ >> >> (Note that this not available from the usual download site.) >> >> If all goes well, we will turn this version into a v4.0 release >> within several days. >> >> Your help and feedback in testing this new release candidate, >> especially the new javascript-based help system would be much >> appreciated. >> -- >> ((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 > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From jos.koot at telefonica.net Tue Jun 3 17:09:35 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:10 2009 Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing References: <200806031523.m53FNZEE030117@winooski.ccs.neu.edu> Message-ID: <000801c8c5be$207c3c10$2101a8c0@uw2b2dff239c4d> In addition to my previous mail: Calling PLT help directly from the windows start menu provides a search at least 10 times faster as before. That's nice, for it was a little bit slow before now. Jos ----- Original Message ----- From: "Eli Barzilay" To: Sent: Tuesday, June 03, 2008 5:23 PM Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing > Version 3.99.0.26 is now available for testing from > > http://pre.plt-scheme.org/installers/ > > (Note that this not available from the usual download site.) > > If all goes well, we will turn this version into a v4.0 release > within several days. > > Your help and feedback in testing this new release candidate, > especially the new javascript-based help system would be much > appreciated. > -- > ((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 eli at barzilay.org Tue Jun 3 18:47:28 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:10 2009 Subject: [plt-scheme] PLT Scheme v3.99.0.26 is available for testing In-Reply-To: <000d01c8c5ab$95603990$2101a8c0@uw2b2dff239c4d> References: <200806031523.m53FNZEE030117@winooski.ccs.neu.edu> <000d01c8c5ab$95603990$2101a8c0@uw2b2dff239c4d> Message-ID: <18501.51712.659288.624848@arabic.ccs.neu.edu> On Jun 3, Jos Koot wrote: > All programs I checked run well, but help / help desk in DrScheme > gives: > > build-path: expects type as 2nd argument, > given: #f; other arguments were: # Settings\HP_Eigenaar\Application Data\PLT Scheme\3.99.0.26\doc> That was a small glitch that was fixed a few minutes after I posted the message, and the installers are now updated with the fix. (And thanks for trying it out!) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mark.engelberg at gmail.com Wed Jun 4 01:37:31 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:10 2009 Subject: [plt-scheme] primitive vs. procedure in 3.99 Message-ID: Is this a bug? In 3.72, some things were categorized as primitives, and some were categorized as procedures. For example, + is a primitive, and is reported as such by the REPL. On the other hand, (lambda (x) x) is a procedure. The distinction matters, because some functions, such as primitive-result-arity only work on primitives. However, in 3.99, all primitives are reported as procedures by the REPL. They are still internally classified as primitives, so they work with primitive-result-arity, but there is no easy way to find out from the REPL whether they are primitives or procedures. --Mark From neil at neilvandyke.org Wed Jun 4 02:46:59 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:19:11 2009 Subject: [plt-scheme] (no subject) In-Reply-To: <123426.76796.qm@web50903.mail.re2.yahoo.com> References: <123426.76796.qm@web50903.mail.re2.yahoo.com> Message-ID: <48463A63.2050804@neilvandyke.org> I don't know where "open-input-resource" comes from, but looks like there is a small bug inside it or code it calls, that the exception from the bug is caught, and then "open-input-resource" returns #f, which HtmlPrag's code then complains about. (plt-edu removed from the distribution list of this email) From jos.koot at telefonica.net Wed Jun 4 02:55:01 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:11 2009 Subject: [plt-scheme] primitive vs. procedure in 3.99 References: Message-ID: <000801c8c60f$e9471ce0$2101a8c0@uw2b2dff239c4d> I see no problem: Welcome to DrScheme, version 3.99.0.26-svn3jun2008 [3m]. Language: Module custom. > (primitive? +) #t > (procedure? +) #t > (procedure? (lambda () '())) #t > (primitive? (lambda () '())) #f > All primitive procedures are procedures, of course. Jos ----- Original Message ----- From: "Mark Engelberg" To: "pltscheme" Sent: Wednesday, June 04, 2008 7:37 AM Subject: [plt-scheme] primitive vs. procedure in 3.99 > Is this a bug? > > In 3.72, some things were categorized as primitives, and some were > categorized as procedures. For example, + is a primitive, and is > reported as such by the REPL. On the other hand, (lambda (x) x) is a > procedure. > > The distinction matters, because some functions, such as > primitive-result-arity only work on primitives. > > However, in 3.99, all primitives are reported as procedures by the > REPL. They are still internally classified as primitives, so they > work with primitive-result-arity, but there is no easy way to find out > from the REPL whether they are primitives or procedures. > > --Mark > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From jacobm at cs.uchicago.edu Wed Jun 4 03:18:48 2008 From: jacobm at cs.uchicago.edu (Jacob Matthews) Date: Thu Mar 26 02:19:11 2009 Subject: [plt-scheme] Can't produce planet packages; weird scribble error message In-Reply-To: <990e0c030806031235y2a90aa2cyf979bc22829cf3e9@mail.gmail.com> References: <990e0c030806031235y2a90aa2cyf979bc22829cf3e9@mail.gmail.com> Message-ID: <46b603df0806040018y21e21843sa47042f08b0f3d12@mail.gmail.com> Quick status update: I can reproduce this bug, but I haven't tracked down the root cause yet. -jacob On Tue, Jun 3, 2008 at 12:35 PM, Carl Eastlund wrote: > I've already reported something like this as bug 9430, which you can view here: > > http://bugs.plt-scheme.org/query/?cmd=view&pr=9430 > > I gave Jacob files to duplicate this bug, which are attached to > related bug report 9428. > > --Carl > > On Tue, Jun 3, 2008 at 2:59 PM, Danny Yoo wrote: >> I'm seeing the following error message when I try to create a PLaneT package >> now: >> >> ########################################################################## >> dyoo@kfisler-ra1:~/work/projects/plt-misc$ planet create calm-evt >> Building: manual.scrbl >> WARNING: open-input-file: cannot open input file: >> "/home/dyoo/work/projects/plt-misc/calm-evt/doc/manual/out.sxref" (No such >> file or directory; errno=2) >> PLaneT packager: Error generating scribble documentation: >> with-output-to-file: >> "/home/dyoo/work/projects/plt-misc/calm-evt/planet-docs/manual/" exists as a >> directory >> Refusing to continue packaging. >> ########################################################################## >> >> >> Unfortunately, my public source repository is still down. Ironically, my >> co-lo is also hosted in a datacenter call "The Planet"... ;) But I can send >> tarballs if that will help track down what's happening here. >> >> >> Thanks! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From mark.engelberg at gmail.com Wed Jun 4 04:09:24 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:11 2009 Subject: [plt-scheme] primitive vs. procedure in 3.99 In-Reply-To: <000801c8c60f$e9471ce0$2101a8c0@uw2b2dff239c4d> References: <000801c8c60f$e9471ce0$2101a8c0@uw2b2dff239c4d> Message-ID: I'm referring to this behavior: > + # as opposed to something like # On Tue, Jun 3, 2008 at 11:55 PM, Jos Koot wrote: > I see no problem: > > Welcome to DrScheme, version 3.99.0.26-svn3jun2008 [3m]. > Language: Module custom. >> >> (primitive? +) > > #t >> >> (procedure? +) > > #t >> >> (procedure? (lambda () '())) > > #t >> >> (primitive? (lambda () '())) > > #f >> > > All primitive procedures are procedures, of course. > Jos > ----- Original Message ----- From: "Mark Engelberg" > > To: "pltscheme" > Sent: Wednesday, June 04, 2008 7:37 AM > Subject: [plt-scheme] primitive vs. procedure in 3.99 > > >> Is this a bug? >> >> In 3.72, some things were categorized as primitives, and some were >> categorized as procedures. For example, + is a primitive, and is >> reported as such by the REPL. On the other hand, (lambda (x) x) is a >> procedure. >> >> The distinction matters, because some functions, such as >> primitive-result-arity only work on primitives. >> >> However, in 3.99, all primitives are reported as procedures by the >> REPL. They are still internally classified as primitives, so they >> work with primitive-result-arity, but there is no easy way to find out >> from the REPL whether they are primitives or procedures. >> >> --Mark >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From jos.koot at telefonica.net Wed Jun 4 05:57:27 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:11 2009 Subject: [plt-scheme] primitive vs. procedure in 3.99 References: <000801c8c60f$e9471ce0$2101a8c0@uw2b2dff239c4d> Message-ID: <000801c8c629$65b468a0$2101a8c0@uw2b2dff239c4d> Understood. Jos ----- Original Message ----- From: "Mark Engelberg" To: "Jos Koot" Cc: "pltscheme" Sent: Wednesday, June 04, 2008 10:09 AM Subject: Re: [plt-scheme] primitive vs. procedure in 3.99 > I'm referring to this behavior: >> + > # > > as opposed to something like > # > snip From mflatt at cs.utah.edu Wed Jun 4 07:14:11 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:11 2009 Subject: [plt-scheme] primitive vs. procedure in 3.99 In-Reply-To: References: <000801c8c60f$e9471ce0$2101a8c0@uw2b2dff239c4d> Message-ID: <20080604111414.45F8865008C@mail-svr1.cs.utah.edu> Yes, that's an intentional change. (Actually, it's even listed in the "MzScheme_4.txt" release notes.) The term "primitive" is misleading; it really just means "implemented in C". We changed the printing because "implemented using C" is rarely useful information, and we'd like to be able to re-implement functions in Scheme at any time. The `primitive-result-arity' function is an odd bit of reflection that probably should be replaced by a table mapping bindings (as opposed to values) with information about the binding; that would be equally useful to compiler tools, at least. Matthew At Wed, 4 Jun 2008 01:09:24 -0700, "Mark Engelberg" wrote: > I'm referring to this behavior: > > + > # > > as opposed to something like > # > > On Tue, Jun 3, 2008 at 11:55 PM, Jos Koot wrote: > > I see no problem: > > > > Welcome to DrScheme, version 3.99.0.26-svn3jun2008 [3m]. > > Language: Module custom. > >> > >> (primitive? +) > > > > #t > >> > >> (procedure? +) > > > > #t > >> > >> (procedure? (lambda () '())) > > > > #t > >> > >> (primitive? (lambda () '())) > > > > #f > >> > > > > All primitive procedures are procedures, of course. > > Jos > > ----- Original Message ----- From: "Mark Engelberg" > > > > To: "pltscheme" > > Sent: Wednesday, June 04, 2008 7:37 AM > > Subject: [plt-scheme] primitive vs. procedure in 3.99 > > > > > >> Is this a bug? > >> > >> In 3.72, some things were categorized as primitives, and some were > >> categorized as procedures. For example, + is a primitive, and is > >> reported as such by the REPL. On the other hand, (lambda (x) x) is a > >> procedure. > >> > >> The distinction matters, because some functions, such as > >> primitive-result-arity only work on primitives. > >> > >> However, in 3.99, all primitives are reported as procedures by the > >> REPL. They are still internally classified as primitives, so they > >> work with primitive-result-arity, but there is no easy way to find out > >> from the REPL whether they are primitives or procedures. > >> > >> --Mark From plragde at uwaterloo.ca Wed Jun 4 08:06:00 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:19:12 2009 Subject: [plt-scheme] OS X Quick Look support? Message-ID: <48468528.8020900@uwaterloo.ca> It might be nice to have this feature, which lets one look at .ss or .scm files created by DrScheme in OS X's Finder, without opening DrScheme. Users can arrange this, but building it into the distributed application would be better. http://www.macosxhints.com/article.php?story=20071028184428583 --PR From stephen at degabrielle.name Wed Jun 4 09:16:19 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:19:12 2009 Subject: [plt-scheme] OS X Quick Look support? In-Reply-To: <48468528.8020900@uwaterloo.ca> References: <48468528.8020900@uwaterloo.ca> Message-ID: <595b9ab20806040616n57a76bbao9a3068f88e93ad1f@mail.gmail.com> Good idea, and would work fine a lot of the time - but would fail on .scm or .ss files with snips as they are not plain text. Tempting as a quick hack though! thanks for the tip. Stephen On Wed, Jun 4, 2008 at 1:06 PM, Prabhakar Ragde wrote: > It might be nice to have this feature, which lets one look at .ss or .scm > files created by DrScheme in OS X's Finder, without opening DrScheme. Users > can arrange this, but building it into the distributed application would be > better. > > http://www.macosxhints.com/article.php?story=20071028184428583 > > --PR > _________________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080604/c2fea040/attachment.htm From d.j.gurnell at gmail.com Wed Jun 4 09:30:55 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:19:13 2009 Subject: [plt-scheme] OS X Quick Look support? In-Reply-To: <595b9ab20806040616n57a76bbao9a3068f88e93ad1f@mail.gmail.com> References: <48468528.8020900@uwaterloo.ca> <595b9ab20806040616n57a76bbao9a3068f88e93ad1f@mail.gmail.com> Message-ID: <565A5369-450F-4D51-9A6A-31BF352A5B57@gmail.com> I just got it to work with the information in the macosxhints article and this code: UTExportedTypeDeclarations UTTypeConformsTo public.text public.plain-text UTTypeDescription PLT source file UTTypeIdentifier org.plt-scheme.source UTTypeTagSpecification com.apple.ostype TEXT public.filename-extension ss scm (The string "org.plt-scheme.source" is an arbitrary one.) Ah, Quick Look, how I love thee. I wonder how easy it is to get Spotlight to index *.ss and *.scm... -- Dave > Good idea, and would work fine a lot of the time - but would fail > on .scm or .ss files with snips as they are not plain text. > > Tempting as a quick hack though! > > thanks for the tip. > > Stephen > > > On Wed, Jun 4, 2008 at 1:06 PM, Prabhakar Ragde > wrote: > It might be nice to have this feature, which lets one look at .ss > or .scm files created by DrScheme in OS X's Finder, without opening > DrScheme. Users can arrange this, but building it into the > distributed application would be better. > > http://www.macosxhints.com/article.php?story=20071028184428583 > > --PR > > -- > Cheers, > > Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080604/1fe93605/attachment.html From mflatt at cs.utah.edu Wed Jun 4 10:18:22 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:13 2009 Subject: [plt-scheme] OS X Quick Look support? In-Reply-To: <565A5369-450F-4D51-9A6A-31BF352A5B57@gmail.com> References: <48468528.8020900@uwaterloo.ca> <595b9ab20806040616n57a76bbao9a3068f88e93ad1f@mail.gmail.com> <565A5369-450F-4D51-9A6A-31BF352A5B57@gmail.com> Message-ID: <20080604141823.7820665009E@mail-svr1.cs.utah.edu> I've added support for UTI export declarations in PLT-generated executables, and it's used to include the content below in DrScheme's "Info.plist". Thanks, Matthew At Wed, 4 Jun 2008 14:30:55 +0100, Dave Gurnell wrote: > I just got it to work with the information in the macosxhints article > and this code: > > UTExportedTypeDeclarations > > > UTTypeConformsTo > > public.text > public.plain-text > > UTTypeDescription > PLT source file > UTTypeIdentifier > org.plt-scheme.source > UTTypeTagSpecification > > com.apple.ostype > TEXT > public.filename-extension > > ss > scm > > > > > > (The string "org.plt-scheme.source" is an arbitrary one.) > > Ah, Quick Look, how I love thee. I wonder how easy it is to get > Spotlight to index *.ss and *.scm... > > -- Dave > > > Good idea, and would work fine a lot of the time - but would fail > > on .scm or .ss files with snips as they are not plain text. > > > > Tempting as a quick hack though! > > > > thanks for the tip. > > > > Stephen > > > > > > On Wed, Jun 4, 2008 at 1:06 PM, Prabhakar Ragde > > wrote: > > It might be nice to have this feature, which lets one look at .ss > > or .scm files created by DrScheme in OS X's Finder, without opening > > DrScheme. Users can arrange this, but building it into the > > distributed application would be better. > > > > http://www.macosxhints.com/article.php?story=20071028184428583 > > > > --PR > > > > -- > > Cheers, > > > > Stephen > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From plragde at uwaterloo.ca Wed Jun 4 10:24:22 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:19:13 2009 Subject: [plt-scheme] OS X Quick Look support? In-Reply-To: <595b9ab20806040616n57a76bbao9a3068f88e93ad1f@mail.gmail.com> References: <48468528.8020900@uwaterloo.ca> <595b9ab20806040616n57a76bbao9a3068f88e93ad1f@mail.gmail.com> Message-ID: <4846A596.8090907@uwaterloo.ca> Stephen De Gabrielle wrote: > Good idea, and would work fine a lot of the time - but would fail on > .scm or .ss files with snips as they are not plain text. They look like hell, but they are a textual representation, I believe. So it wouldn't be particularly useful, but it wouldn't fail. --PR From nik at fo.am Wed Jun 4 10:36:41 2008 From: nik at fo.am (nik gaffney) Date: Thu Mar 26 02:19:14 2009 Subject: [plt-scheme] OS X Quick Look support? In-Reply-To: <565A5369-450F-4D51-9A6A-31BF352A5B57@gmail.com> References: <48468528.8020900@uwaterloo.ca> <595b9ab20806040616n57a76bbao9a3068f88e93ad1f@mail.gmail.com> <565A5369-450F-4D51-9A6A-31BF352A5B57@gmail.com> Message-ID: <4846A879.7030008@fo.am> > Ah, Quick Look, how I love thee. I wonder how easy it is to get > Spotlight to index *.ss and *.scm... As a starting point - John Wiseman wrote a spotlight metadata importer for common lisp files along with a decent description of how it works. The source is available on the disk image linked from the post -> http://lemonodor.com/archives/2005/09/lisp_metadata_i_1.html From erich at snafu.de Wed Jun 4 10:22:22 2008 From: erich at snafu.de (Erich Rast) Date: Thu Mar 26 02:19:14 2009 Subject: [plt-scheme] Find-files exception when encountering unreadable directory Message-ID: <1212589342.10486.11.camel@darkstar> Hi, I have troubles using find-files in scheme/file (3.99) to traverse a directory hierarchy. For some reason, some some mounted .dmg images on OS X tend to have a .Trashes folders that isn't readable by the user, and find-files yields an exception when it encounters the volume's top-level .Trashes folder. I cannot get rid of these exceptions, no matter what I put into the predicate for find-files. Am I missing something obvious? Or does anyone have another find-files function at hand? (I'm dealing with rather large directories, so it should be iterative/use accumulators.) Best, Erich P.S. No, this is not a homework assignment. I know it's a good excercise to write my own, but I'm pretty busy at the moment. From tom at zwizwa.be Wed Jun 4 11:02:15 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:14 2009 Subject: [plt-scheme] sandbox + scheme/control Message-ID: hello, is there a way to make (prompt (e '(abort 123))) work as expected using a scheme/sandbox evaluator? the abort thunk seems to be passed as an exception.. bug or feature? cheers, tom ;; MzScheme v3.99.0.23 [3m] #lang scheme/base (require scheme/control scheme/sandbox) (define e (make-evaluator 'scheme/base)) (e '(require scheme/control)) (prompt (abort 123)) ;; => 123 (prompt (e '(abort 123))) ;; raises exception (with-handlers ((void (lambda (thunk) (thunk)))) (e '(abort 123))) ;; => 123 From mflatt at cs.utah.edu Wed Jun 4 11:12:42 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:14 2009 Subject: [plt-scheme] sandbox + scheme/control In-Reply-To: References: Message-ID: <20080604151242.9847E6500A3@mail-svr1.cs.utah.edu> At Wed, 04 Jun 2008 17:02:15 +0200, Tom Schouten wrote: > is there a way to make (prompt (e '(abort 123))) work as expected > using a scheme/sandbox evaluator? the abort thunk seems to be passed > as an exception.. bug or feature? Bug, but fixed a couple of weeks ago in SVN. Matthew From icfp.publicity at googlemail.com Wed Jun 4 12:53:25 2008 From: icfp.publicity at googlemail.com (Matthew Fluet (ICFP Publicity Chair)) Date: Thu Mar 26 02:19:14 2009 Subject: [plt-scheme] ICFP2008 Call for Poster proposals Message-ID: <53ff55480806040953l71c18837kf9afdcda907ea26c@mail.gmail.com> ICFP 2008 poster session September 21, 2008 Call for presentation proposals ICFP 2008 will feature a poster session for researchers and practitioners, including students. The session will provide friendly feedback for work that is in gestation or ongoing, as well as opportunities to meet each other and exchange ideas. We welcome poster submissions on all ICFP topics, especially presentations of - applications of and to functional programming; - recent work presented at more distant venues; and - ongoing work, whether or not submitted to ICFP. There will be no formal proceedings, but presenters will be invited to submit working notes, demo code, and other materials to supplement their abstract and poster. These materials will be released informally on a Web page dedicated to the poster session. An accepted submission is not intended to replace conference or journal publication. Persons interested in presenting a poster are invited to submit a one-page abstract in SIGPLAN conference style http://www.acm.org/sigs/sigplan/authorInformation.htm to the Web site https://www.softconf.com/s08/icfp08-posters/submit.html by June 30, 2008. The program committee will review the submissions for relevance and interest, and notify the authors by July 14, 2008. Accepted posters must be presented by the authors in person on Sunday, September 21, 2008. Important dates: Submission: Monday, June 30, 2008 Notification: Monday, July 14, 2008 Presentation: Sunday, September 21, 2008 Program committee: Benjamin Pierce (University of Pennsylvania) Colin Runciman (University of York) Chung-chieh Shan (Rutgers University) From tom at zwizwa.be Wed Jun 4 13:44:22 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:14 2009 Subject: [plt-scheme] sandbox + scheme/control In-Reply-To: <20080604151242.9847E6500A3@mail-svr1.cs.utah.edu> References: <20080604151242.9847E6500A3@mail-svr1.cs.utah.edu> Message-ID: <20080604174422.GA4053@zzz.i> tOn Wed, Jun 04, 2008 at 09:12:42AM -0600, Matthew Flatt wrote: > At Wed, 04 Jun 2008 17:02:15 +0200, Tom Schouten wrote: > > is there a way to make (prompt (e '(abort 123))) work as expected > > using a scheme/sandbox evaluator? the abort thunk seems to be passed > > as an exception.. bug or feature? > > Bug, but fixed a couple of weeks ago in SVN. thanks! sorry for not checking latest.. From neil at neilvandyke.org Wed Jun 4 17:12:59 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:19:14 2009 Subject: [plt-scheme] experience rewriting scheme systems in common lisp? Message-ID: <4847055B.1070401@neilvandyke.org> Does anyone have experience with tools help for rewriting Scheme code as Common Lisp, such as with Dorai Sitaram's "scm2cl"? Or perhaps even with Pseudoscheme? A client has a decent-sized production Web system implemented in Scheme that, for various reasons (no fault of Scheme), might need to be moved to CL. My tentative strategy is to replace the general purpose Scheme libraries with API wrappers for their CL analogues (and perhaps later change the call sites to use the CL library API directly), semiautomatically transliterate the remaining Scheme code, get it to compile, and then start working through runtime problems. The good news is that the Scheme code I've seen so far isn't especially idiomatic, and I expect it will translate to CL more easily than average Scheme code. Any thoughts? http://www.ccs.neu.edu/home/dorai/scmxlate/scm2cl.html http://mumble.net/~jar/pseudoscheme/ From mike at sharedlogic.ca Wed Jun 4 17:31:49 2008 From: mike at sharedlogic.ca (Michael Forster) Date: Thu Mar 26 02:19:15 2009 Subject: [plt-scheme] define-struct vs make-struct-type: struct type descriptor Message-ID: Hi, I'm using v372, and I've defined tuple structure type as shown below. I also want to define a constructor, foo, supplementary to make-foo as make-list is to list. #lang mzscheme (define-struct foo (bar)) (define foo (lambda (bar) (make-foo bar))) When I run this, I get the following: Welcome to DrScheme, version 372 [3m]. Language: Textual (MzScheme, includes R5RS). module: duplicate definition for identifier in: foo If I use make-struct-type instead, following the style illustrated in the Help Desk, as shown below, I don't get the collision between identitiers. #lang mzscheme (define-values (struct:foo make-foo foo? foo-ref foo-set!) (make-struct-type 'foo #f 1 0)) (define foo (lambda (bar) (make-foo bar))) My interpretation of the v372 Help Desk reference for define-struct and make-struct-type is that these should be equivalent. If so, why does define-struct result in the definition of a foo identifier, while make-struct-type does not? Thanks, Mike From czhu at cs.utah.edu Wed Jun 4 17:36:54 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:15 2009 Subject: [plt-scheme] define-struct vs make-struct-type: struct type descriptor In-Reply-To: References: Message-ID: <48470AF6.7080509@cs.utah.edu> If you read the doc of v372: A define-struct expression with n fields defines 4 + 2n names: * struct:s, a structure type descriptor value that represents the new datatype. This value is rarely used directly. * make-s, a constructor procedure that takes n arguments and returns a new structure value. * s?, a predicate procedure that returns #t for a value constructed by make-s (or the constructor for a subtype; see section 4.2) and #f for any other value. * s-field, for each field, an accessor procedure that takes a structure value and extracts the value for field. * set-s-field!, for each field, a mutator procedure that takes a structure and a new field value. The field value in the structure is destructively updated with the new value, and void is returned. * s, a syntax binding that encapsulates information about the structure type declaration. This binding is used to define subtypes (see section 4.2). It also works with the shared and match forms (see Chapter 44 and Chapter 27 in PLT MzLib: Libraries Manual). For detailed information about the expansion-time information stored in s, see section 12.6.4. ============== So "(define-struct foo (bar))" defines the name foo. While make-struct-type doesn't do the syntax binding. Chongkai Michael Forster wrote: > Hi, > > I'm using v372, and I've defined tuple structure type as shown below. > I also want to define a constructor, foo, supplementary to make-foo > as make-list is to list. > > #lang mzscheme > (define-struct foo (bar)) > (define foo (lambda (bar) (make-foo bar))) > > > When I run this, I get the following: > > Welcome to DrScheme, version 372 [3m]. > Language: Textual (MzScheme, includes R5RS). > module: duplicate definition for identifier in: foo > > > If I use make-struct-type instead, following the style illustrated > in the Help Desk, as shown below, I don't get the collision > between identitiers. > > #lang mzscheme > (define-values (struct:foo > make-foo > foo? > foo-ref > foo-set!) > (make-struct-type 'foo #f 1 0)) > (define foo (lambda (bar) (make-foo bar))) > > > My interpretation of the v372 Help Desk reference for define-struct > and make-struct-type is that these should be equivalent. If so, why > does define-struct result in the definition of a foo identifier, while > make-struct-type does not? > > > Thanks, > > Mike > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From mike at sharedlogic.ca Wed Jun 4 18:11:16 2008 From: mike at sharedlogic.ca (Michael Forster) Date: Thu Mar 26 02:19:15 2009 Subject: [plt-scheme] define-struct vs make-struct-type: struct type descriptor In-Reply-To: <48470AF6.7080509@cs.utah.edu> References: <48470AF6.7080509@cs.utah.edu> Message-ID: On Wed, Jun 4, 2008 at 4:36 PM, Chongkai Zhu wrote: > If you read the doc of v372: [...] > * s, a syntax binding that encapsulates information about the structure type > declaration. This binding is used to define subtypes (see section 4.2). [...] Doh! Thanks very much. I'll blame it on the choice of font colour ;-) -Mike From mark.engelberg at gmail.com Wed Jun 4 21:21:51 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:15 2009 Subject: [plt-scheme] PLT v 4.0 discussion - planet browser Message-ID: So I've used this "almost-final" release as an opportunity to download and see what's in store for v 4.0. There's a lot of great changes here! Perhaps most importantly (to me), the new features, and better organization of the existing features gives v 4.0 a much greater feeling of "batteries included". You just type in #lang scheme, and you're ready to go -- 90% of what you need is probably already in there. If I had been the one making the decisions, I probably would have erred on the side of including even more, but what's there is definitely good. And with the simplified require statements, and better organization of the documentation, it's much easier to find and include that remaining 10%. It is now significantly more pleasurable to program in PLT Scheme. Now, seeing how much things have been improved, I'm brimming with lots of ideas for further refinements. Rather than post it all in one big brain dump, I'm going to break each idea into separate emails, to aid discussion. Topic #1: Planet browser Eli mentioned in an earlier post, that the role of the planet will continue to grow, rather than throwing more and more libraries into the main distribution. This means that planet packages should be just as easy as using built-in libraries. Right now, when I want to use the memoization planet package, I can't possibly remember the exact syntax and version number to include this in my file. I inevitably have to find and open another file where I used the package, or browse the planet repository to find the right require line. Some have proposed that the planet require statement be simplified syntactically, but I don't think this goes far enough. I would like to see an integrated planet browser, that makes it at least as easy to find and use a planet package as it is to add a teachpack in the learning languages. Here's what I imagine: When you want to add a planet package, you select "Add planet package" from a menu, or use a keyboard shortcut, to pop-up the planet browser. The planet browser shows you a list of all locally-installed planet packages. The reality is that most people use the same packages repeatedly, so listing the locally-installed packages is a huge timesaver. Click on the package, and the appropriate require statement is added to the top of your file. Under the list is "add other package", which lets you browse and select from the other packages. Also, it would be great if locally installed packages become part of the help desk documentation. Going back to the planet to look up something in the documentation is tedious. --Mark From mark.engelberg at gmail.com Wed Jun 4 21:22:34 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:15 2009 Subject: [plt-scheme] PLT v 4.0 discussion - sequences Message-ID: Sequences play an important role in v 4.0, especially in comprehensions. The current mechanism for creating new sequences seems rather clunky (make-do-sequence of a thunk producing values of six sequencing functions, two of which are usually irrelevant, and you better get them all in the right order). Creating new sequences should be easy. It seems like at a minimum, you'd want to use comprehension syntax to be able to express map and filter over existing sequences. For example, the sequence of all square numbers could be: (for/sequence ([i (in-naturals)]) (* i i)) (BTW, it seems a pity that in-naturals doesn't support an optional step parameter). What other easy ways could there be to express and create sequences? Python uses "yield" to concisely express many generators, which are essentially the same as PLT Scheme's sequences, but I don't know whether yield is a good fit for the Scheme way of doing things. Any other ideas? --Mark From mark.engelberg at gmail.com Wed Jun 4 21:22:41 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:15 2009 Subject: [plt-scheme] PLT v 4.0 discussion - separating interfaces from implementation Message-ID: Increasingly, programming is all about learning how to separate interfaces from implementation. PLT 4.0 offers at least two standard mechanisms for doing this. 1. Class and object-based programming. OO is one of the most popular mechanisms for separating interfaces from implementation, and it's good that you can do it in Scheme. One disadvantage is that your code gets cluttered with send statements. And of course, with the exception of the MrEd library, OO doesn't seem to be used much by the core libraries, so you can't really leverage OO design principles to extend the built-in functions of Scheme to operate over new data structures. 2. Units. These don't seem to get much use, possibly because they seem complex? 3. Interestingly, PLT 4.0 does give us a taste of what it would be like to have common interfaces for important categories of datatypes. Sequences and dictionaries are the most obvious examples (are there more that I didn't notice?) I find it curious that rather than use either of the above mechanisms for achieving this goal, both are written in sort of an ad-hoc manner. To create a new datatype that is categorized as a sequence, you need to set a certain property flag in the struct, and then create a thunk returning six functions as values. To create a new datatype that implements the dict interface, you need to set a property flag, and then create a vector of ten functions. Values for one, and vector for another? Rather inconsistent. Furthermore, it just doesn't feel like a scalable approach to separating interface from implementation. Passing in a vector of ten functions (better get the order right!) already seems borderline-laughable; what if your interface grows even bigger? So why did the developers choose to separate interface from implementation by using an ad hoc mechanism rather than one of the standardized mechanisms for doing this? Is it a performance issue, or are the standardized mechanisms simply too complicated and/or burdened by excessive syntax demands? I think that arriving at a solid, consistent way of doing this would be a great goal to consider in future versions of PLT Scheme. --Mark From mark.engelberg at gmail.com Wed Jun 4 21:22:51 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:16 2009 Subject: [plt-scheme] PLT v 4.0 discussion - essential data structures Message-ID: PLT v 4.0 has a much stronger sense of "batteries included", but there are still many data structures that are standard in other languages, and lacking in PLT Scheme. Some of these are addressed via planet packages or srfis, but many of these aren't tightly integrated with other aspects of PLT Scheme, such as match and comprehensions. I'm curious -- what are the data structures that others feel would be worthy of first-class status? For me, I'd say the biggest things I'm missing are streams, an implementation of both mutable and immutable sets analagous to hash-tables, extensible vectors, and mutable/immutable deque options. --Mark From kondacs at yahoo.com Thu Jun 5 04:36:56 2008 From: kondacs at yahoo.com (Attila Kondacs) Date: Thu Mar 26 02:19:16 2009 Subject: [plt-scheme] problems with (require ..) In-Reply-To: Message-ID: <343107.29160.qm@web30207.mail.mud.yahoo.com> thanks - that helps! --- On Tue, 6/3/08, Noel Welsh wrote: > From: Noel Welsh > Subject: Re: [plt-scheme] problems with (require ..) > To: kondacs@yahoo.com > Cc: plt-scheme@list.cs.brown.edu > Date: Tuesday, June 3, 2008, 10:12 AM > You're reading the docs for 4.0 but using version 3. I > suggest > upgrading to 3.99, which will be released as version 4 very > soon. > Available here: > > http://pre.plt-scheme.org/ > > N. > > On Tue, Jun 3, 2008 at 2:20 PM, Attila Kondacs > wrote: > > Hi, > > > > sorry for this rarther newbie question: > > I cannot seem to get the "require" command > to work as described all over the docs -- say, here: > http://docs.plt-scheme.org/guide/module-basics.html. > ... From mflatt at cs.utah.edu Thu Jun 5 08:27:43 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:16 2009 Subject: [plt-scheme] PLT v 4.0 discussion - planet browser In-Reply-To: References: Message-ID: <20080605122745.CFC4F6500B1@mail-svr1.cs.utah.edu> At Wed, 4 Jun 2008 18:21:51 -0700, "Mark Engelberg" wrote: > Here's what I imagine: > When you want to add a planet package, you select "Add planet package" > from a menu, or use a keyboard shortcut, to pop-up the planet browser. > The planet browser shows you a list of all locally-installed planet > packages. The reality is that most people use the same packages > repeatedly, so listing the locally-installed packages is a huge > timesaver. Click on the package, and the appropriate require > statement is added to the top of your file. Under the list is "add > other package", which lets you browse and select from the other > packages. That sounds like an interesting idea. > Also, it would be great if locally installed packages become part of > the help desk documentation. Going back to the planet to look up > something in the documentation is tedious. Yes: if you install a Planet package that includes Scribble-based documentation, it becomes part of your local documentation (just like the libraries included in the distribution). Matthew From mflatt at cs.utah.edu Thu Jun 5 08:27:46 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:16 2009 Subject: [plt-scheme] PLT v 4.0 discussion - separating interfaces from implementation In-Reply-To: References: Message-ID: <20080605122749.117F16500B1@mail-svr1.cs.utah.edu> At Wed, 4 Jun 2008 18:22:41 -0700, "Mark Engelberg" wrote: > Increasingly, programming is all about learning how to separate > interfaces from implementation. > > PLT 4.0 offers at least two standard mechanisms for doing this. > > 1. Class and object-based programming. [...] > > 2. Units. [...] > > 3. Interestingly, PLT 4.0 does give us a taste of what it would be > like to have common interfaces for important categories of datatypes. > Sequences and dictionaries are the most obvious examples (are there > more that I didn't notice?) I find it curious that rather than use > either of the above mechanisms for achieving this goal, both are > written in sort of an ad-hoc manner. [...] Eli has implemented "generics", which turn the pattern behind the dictionary abstraction into a syntactic form. We ran out of time to get it into 4.0. The functions for a sequence, meanwhile, go through a thunk, because they need to generate an instance of the sequence. If we wanted to squeeze that into the same sort of abstraction as dictionaries, I guess we'd have the thunk return an "object" (in the sense that dictionary is an object) that supplies the functions, instead of returning multiple functions. And that also points to "object" in the class sense. The implementation of generics is based on the same core construct as the implementation of the class system. For classes, though, there's a level of indirection that allows inheritance and symbolic lookup of methods. Maybe there's a smooth path between all these points... > I think that arriving at a solid, consistent way of doing this would > be a great goal to consider in future versions of PLT Scheme. That's PL research in a nutshell. :) Hopefully we'll continue to make progress. Matthew From eli at barzilay.org Thu Jun 5 08:38:35 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:16 2009 Subject: [plt-scheme] PLT v 4.0 discussion - sequences In-Reply-To: References: Message-ID: <18503.56907.177591.117935@arabic.ccs.neu.edu> On Jun 4, Mark Engelberg wrote: > It seems like at a minimum, you'd want to use comprehension syntax > to be able to express map and filter over existing sequences. For > example, the sequence of all square numbers could be: > (for/sequence ([i (in-naturals)]) (* i i)) This sounds to me like a good idea at a first glance, but of further thought I don't see any practical use for it. IIUC, your suggestion is that I can do something like this: ;; print n^2 for all even numbers (for ([i (for/sequence ([i (in-naturals)]) (* 2 i))]) (printf ">>> ~s\n" (* i i))) The two big problems with this is that it's more complex to write (the nesting is awkward), and that in practical situations I'd almost always try to avoid the extra cost. Plus, in at least cases that I imagined (like the above), refactoring the code is straightforward: ;; print n^2 for all even numbers (for ([i (in-naturals)]) (let ([i (* 2 i)]) (printf ">>> ~s\n" (* i i)))) The only problem with this is that clear code can result in the "right drift" problem. For some of these cases, the new `nest' macro can be convenient, for example, the above can be written like this: ;; print n^2 for all even numbers (nest ([for ([i (in-naturals)])] [let ([i (* 2 i)])]) (printf ">>> ~s\n" (* i i))) Finally, don't forget that there's another way to define new kinds of `for/*' which work for most cases: just use a macro. `for/fold' is particularly useful here. For example: > (define-syntax-rule (for/sum (clause ...) expr) (for/fold ([s 0]) (clause ...) (+ s expr))) > (for/sum ([i (in-range 0 10)]) (* i i)) 285 There are even the derived forms (look for "iteration forms") that are designed to make it better: > (define-syntax (for/sum stx) (syntax-case stx () [(for/sum (clause ...) expr) #`(for/fold/derived #,stx ([s 0]) (clause ...) (+ s expr))])) > (for/sum (meh) (* i i)) stdin::123: for/sum: bad sequence bindingq clause at: meh in: (for/sum (meh) (* i i)) > What other easy ways could there be to express and create sequences? > Python uses "yield" to concisely express many generators, which are > essentially the same as PLT Scheme's sequences, but I don't know > whether yield is a good fit for the Scheme way of doing things. Any > other ideas? There was a discussion recently with an implementation of a yield kind of sequence. (But note that continuation have a runtime price.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Thu Jun 5 08:38:41 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:16 2009 Subject: [plt-scheme] PLT v 4.0 discussion - planet browser In-Reply-To: References: Message-ID: <18503.56913.65828.678150@arabic.ccs.neu.edu> On Jun 4, Mark Engelberg wrote: > Perhaps most importantly (to me), the new features, and better > organization of the existing features gives v 4.0 a much greater > feeling of "batteries included". You just type in #lang scheme, and > you're ready to go -- 90% of what you need is probably already in > there. If I had been the one making the decisions, I probably would > have erred on the side of including even more, but what's there is > definitely good. And with the simplified require statements, and > better organization of the documentation, it's much easier to find and > include that remaining 10%. That's the intention of the `scheme' language, and `scheme/base' is for a (much) smaller subset, which is more stable and takes less time to load. For example, when you develop a script, you'd probably use `scheme' first when you just want to get it working, then move to `scheme/base' when it grows (so it takes less time to load, and you have a better control of names that are bound). > Right now, when I want to use the memoization planet package, I can't > possibly remember the exact syntax and version number to include this > in my file. I inevitably have to find and open another file where I > used the package, or browse the planet repository to find the right > require line. This is easy, since you don't need a version (even though many people say that it's a mistake not to have one -- but for quick scripts it's probably fine), and if the package has a "main.ss" file then you don't even need to specify the file. So "Foo" can write a "Bar" package that you'd access with a simple: (require (planet foo/bar)) and that, IMO, is simple enough to be memorable -- I don't see how it can be any simpler... > When you want to add a planet package, you select "Add planet > package" from a menu, or use a keyboard shortcut, to pop-up the > planet browser. The planet browser shows you a list of all > locally-installed planet packages. The reality is that most people > use the same packages repeatedly, so listing the locally-installed > packages is a huge timesaver. Click on the package, and the > appropriate require statement is added to the top of your file. > Under the list is "add other package", which lets you browse and > select from the other packages. While this sounds appealing, my (personal!) opinion is that doing this kind of browser is better done through ... a web browser. Translation: I think that it's a better idea to stick with a browser, and perhaps use some more black magic (=javascript) to get things to look like an application. But either web- or custom-browser, there is definitely lots of improvements that can be done to lots of components, including planet. > Also, it would be great if locally installed packages become part of > the help desk documentation. Going back to the planet to look up > something in the documentation is tedious. (This should work. IIUC, there were a few problems (including at least one that I still didn't commit), but it should be in for the v4 release.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Thu Jun 5 10:20:10 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:17 2009 Subject: [plt-scheme] Find-files exception when encountering unreadable directory In-Reply-To: <1212589342.10486.11.camel@darkstar> References: <1212589342.10486.11.camel@darkstar> Message-ID: <18503.63002.412414.582366@arabic.ccs.neu.edu> On Jun 4, Erich Rast wrote: > I have troubles using find-files in scheme/file (3.99) to traverse a > directory hierarchy. For some reason, some some mounted .dmg images > on OS X tend to have a .Trashes folders that isn't readable by the > user, and find-files yields an exception when it encounters the > volume's top-level .Trashes folder. I cannot get rid of these > exceptions, no matter what I put into the predicate for find-files. > > Am I missing something obvious? Or does anyone have another > find-files function at hand? (I'm dealing with rather large > directories, so it should be iterative/use accumulators.) It sounds like checking permissions of directories before scanning them would solve the problem, but I don't think that it's a good idea to do that always, since it will make it do more IO. But I'm not sure what the difference is, and if you have large directories then it might be a good data point. To try and make it check persmissions you should probably start with eth currend definition of the function and change [(directory-exists? path) ...] to something like [(directory-exists? path) (if (memq 'read (file-or-directory-permissions path)) ... ...)] -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From atmamta at gmail.com Thu Jun 5 10:32:22 2008 From: atmamta at gmail.com (Atmam Ta) Date: Thu Mar 26 02:19:17 2009 Subject: [plt-scheme] audio Message-ID: Hi, I would like to play a sound file and be able to pause it in response to a user event (or alternatively, play a short segment of an audio file). Is this possible in PLT-Scheme? I have not found any library for such tasks... Cheers, Atmam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080605/c378b479/attachment.htm From matthias at ccs.neu.edu Thu Jun 5 10:40:12 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:17 2009 Subject: [plt-scheme] PLT v 4.0 discussion - planet browser In-Reply-To: References: Message-ID: <0B9A044B-2CE7-4068-8CB7-C18A078CB855@ccs.neu.edu> Mark, I do like your proposals, especially the data structure and planet idea: * data structures: I think it would be fantastic to have a comprehensive functional data structure library in the core, especially because many of us reimplement such things all the time. * planet requires: i totally agree that the syntax isn't as simple as it should get and the idea of a planet browser is good. I'd go even further. While a drop-down menu for currently installed packages is a neat idea, you could include ALL planet packages at the point when people download their drscheme. (They must access the web at that point, so getting one more URL then should be fine.) The Insert menu would naturally be split into locally available planet packages and remote packages. ;; --- Now having said that, I think that *you* are in a perfect position to take on the two tasks and develop this software. I know the guy who trained you in the first course and the other one who had you in the second semester, and I think they got you started in the right direction :-) This is also an effort where getting a non-core member to get this started is just the right thing. Also, you don't have to do it all by yourself. You could coordinate the efforts of others on this list. This is especially true for the data structures proposal, where it takes an API designer/coordinator and several implementors. Last but not least, neither of these tasks is on a critical path so delays and hick-ups won't kill anyone. How about it? -- Matthias From jacobm at cs.uchicago.edu Thu Jun 5 11:33:49 2008 From: jacobm at cs.uchicago.edu (Jacob Matthews) Date: Thu Mar 26 02:19:18 2009 Subject: [plt-scheme] PLT v 4.0 discussion - planet browser In-Reply-To: <0B9A044B-2CE7-4068-8CB7-C18A078CB855@ccs.neu.edu> References: <0B9A044B-2CE7-4068-8CB7-C18A078CB855@ccs.neu.edu> Message-ID: <46b603df0806050833o24d2041w4a31a80cf6f4775e@mail.gmail.com> On Thu, Jun 5, 2008 at 7:40 AM, Matthias Felleisen wrote: > Also, you don't have to do it all by yourself. You could coordinate > the efforts of others on this list. This is especially true for the data > structures proposal, where it takes an API designer/coordinator and several > implementors. Note that the galore.plt package has already made significant strides here. I'd encourage you to pursue the planet autocompletion feature as well. If you haven't already, look at the documentation for planet/util.ss, which was built with tools like this in mind. But you don't have to write any code yet to make significant progress. An easy way to make progress on a feature like this is to make fake "screenshots" (drawn on a piece of paper, or maybe composited together in photoshop or something) of how the feature will work for the user and send them out to interested parties. It will help you flesh out your idea and it will let people give you feedback on alternate design proposals very quickly --- it's a lot easier to change the hypothetical behavior of a fake screenshot than the actual behavior of a prototype. :) -jacob From vyzo at media.mit.edu Thu Jun 5 14:27:16 2008 From: vyzo at media.mit.edu (Dimitris Vyzovitis) Date: Thu Mar 26 02:19:18 2009 Subject: [plt-scheme] PLT v 4.0 discussion - planet browser In-Reply-To: <0B9A044B-2CE7-4068-8CB7-C18A078CB855@ccs.neu.edu> Message-ID: On Thu, 5 Jun 2008, Matthias Felleisen wrote: > > Mark, I do like your proposals, especially the data structure and > planet idea: > > * planet requires: i totally agree that the syntax isn't as simple as > it should get and the idea of a planet browser is good. I'd go even > further. While a drop-down menu for currently installed packages is a > neat idea, you could include ALL planet packages at the point when > people download their drscheme. (They must access the web at that > point, so getting one more URL then should be fine.) The Insert menu > would naturally be split into locally available planet packages and > remote packages. This is an excellent proposal - I have been having gripes with not being able to use the shiny new require syntax for module paths with planet. What I would like to see, similar to matthias's menu, is to have a meta-data interface for local installations (and planet install modules) that provide aliases in the local environment. To make this more concrete: Let's say you have language module foo foo/main.ss foo/lang/reader.ss ... Here, in the reader, you want to wrap the module in your main language. When you are in a lib installation, it works wonderfully, just (module reader syntax/module-reader foo/main) Alas, this breaks for planet distributed; the module itself has to be aware of being a planet module from the begining or use the ugly old school string paths in require. This gets even worse when there are multiple dependent (in some way or another) packages all distributed via planet. However, let's say you have in install.ss (or a special planet.ss file, or just info.ss) a module path alias definition facility, something like: (define-module-path foo (planet jrandomhacker/foo)) ... This also provides an easy path for implementation independent use of modules, based on their external interface, and external dependency documentation. -- vyzo From filcab at gmail.com Thu Jun 5 14:45:51 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:19:19 2009 Subject: [plt-scheme] Mac gcc flag no longer needed Message-ID: <4A5094B9-4D50-4797-BF88-63D2B3541F0B@gmail.com> Hi, Could someone submit this patch to remove a compilation flag that is no longer used and breaks the build process with gcc 4.2 (on a mac)? Reference: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-June/015095.html Thanks, - Filipe Cabecinhas -------------- next part -------------- A non-text attachment was scrubbed... Name: plt-mac-gcc.patch Type: application/octet-stream Size: 465 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080605/266ff676/plt-mac-gcc.obj From mflatt at cs.utah.edu Thu Jun 5 14:50:52 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:19 2009 Subject: [plt-scheme] Mac gcc flag no longer needed In-Reply-To: <4A5094B9-4D50-4797-BF88-63D2B3541F0B@gmail.com> References: <4A5094B9-4D50-4797-BF88-63D2B3541F0B@gmail.com> Message-ID: <20080605185053.244706500E2@mail-svr1.cs.utah.edu> Done in SVN. Thanks, Matthew At Thu, 5 Jun 2008 19:45:51 +0100, Filipe Cabecinhas wrote: > Hi, > > Could someone submit this patch to remove a compilation flag that is > no longer used and breaks the build process with gcc 4.2 (on a mac)? > Reference: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-June/015095.html > > Thanks, > > - Filipe Cabecinhas > > > > ------------------------------------------------------------------------------ > [application/octet-stream "plt-mac-gcc.patch"] [save to ~/Desktop/ & open] > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From filcab at gmail.com Thu Jun 5 15:48:31 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:19:20 2009 Subject: [plt-scheme] Mac gcc flag no longer needed In-Reply-To: <20080605185053.244706500E2@mail-svr1.cs.utah.edu> References: <4A5094B9-4D50-4797-BF88-63D2B3541F0B@gmail.com> <20080605185053.244706500E2@mail-svr1.cs.utah.edu> Message-ID: Hi, Hehe... Sorry for my lousy patch. Here is a corrected version, that doesn't break so easily (and was actually tested). at least I think it's not worth it to keep the variable if it's not being used. - Filipe Cabecinhas -------------- next part -------------- A non-text attachment was scrubbed... Name: plt-mac-gcc.patch Type: application/octet-stream Size: 20988 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080605/d30e18c8/plt-mac-gcc.obj From anh at cs.rit.edu Thu Jun 5 15:52:24 2008 From: anh at cs.rit.edu (Arthur Nunes-Harwit) Date: Thu Mar 26 02:19:20 2009 Subject: [plt-scheme] On understanding performance In-Reply-To: <4A5094B9-4D50-4797-BF88-63D2B3541F0B@gmail.com> References: <4A5094B9-4D50-4797-BF88-63D2B3541F0B@gmail.com> Message-ID: I writing a small PROLOG implementation using DrScheme (MrEd) version 350. I decided to see about improving performance using Marc Feeley's compilation to closures technique. An initial benchmark (the naive Fibonacci predicate) shows little difference in speed. When implementing Scheme-like languages in other environments, I am used to a significant improvement. Any guesses about why I am seeing so little improvement here? I saw a hint that profiling tools exist somewhere. Can anyone give me a little more information about how to use them? My implementation is currently leaning heavily on gensyming. What performance/gc issues are involved with gensym? In particular, are gensyms garbage collected? Thanks. -Arthur From anh at cs.rit.edu Thu Jun 5 16:04:21 2008 From: anh at cs.rit.edu (Arthur Nunes-Harwit) Date: Thu Mar 26 02:19:20 2009 Subject: [plt-scheme] Syntax question Message-ID: I am hoping to get unbiased opinions from this group concerning questions of syntax. Java uses + as its string concatenation operator. This is reasonable, since + is often used as the name of the operator in a monoid. Further, I can imagine using + for append (as opposed to Haskell's ++) since lists with append also form a monoid. If that's the case, then the cons operator (say ML's ::) should have higher precedence than +. EG We'd rather write (2+1)::2::1::[] + 0::[] rather than (2+1::2::1[]) + (0::[]) Yes? -Arthur From mark.engelberg at gmail.com Thu Jun 5 19:59:15 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:20 2009 Subject: [plt-scheme] PLT v 4.0 discussion - sequences In-Reply-To: <18503.56907.177591.117935@arabic.ccs.neu.edu> References: <18503.56907.177591.117935@arabic.ccs.neu.edu> Message-ID: Eli wrote: > This sounds to me like a good idea at a first glance, but of further > thought I don't see any practical use for it. IIUC, your suggestion > is that I can do something like this: > > ;; print n^2 for all even numbers > (for ([i (for/sequence ([i (in-naturals)]) (* 2 i))]) > (printf ">>> ~s\n" (* i i))) > > The two big problems with this is that it's more complex to write (the > nesting is awkward), and that in practical situations I'd almost > always try to avoid the extra cost. Plus, in at least cases that I > imagined (like the above), refactoring the code is straightforward: > > ;; print n^2 for all even numbers > (for ([i (in-naturals)]) > (let ([i (* 2 i)]) > (printf ">>> ~s\n" (* i i)))) If you're just going to turn around and use the sequence locally, then yes. But your argument is like saying that we don't need to be able to do (define (square x) (* x x)) because you could just as easily use (lambda (x) (* x x)) every time you want to square something. Obviously, that's absurd, because the value comes from being able to name for reuse, pass around, and use the function. The same goes for sequences. If I want to name and pass around a generating sequence of even numbers, I should be able to easily do that. And for more complex sorts of sequences, this becomes even more valuable. Consider the common problem of needing to "visit" every permutation of a list in lexicographic order, perhaps looking for a specific permutation that obeys a certain property. Creating a list of all the permutations is wasteful, because I don't really need to use up all that space and store them all at once. I really just want to iterate through the permutations. Generated sequences are perfect for that, and I should be able to define it as follows: (define (in-permutations l) (cond [(empty? l) (list empty)] [else (for*/sequence ((i l) (perm (in-permutations (remove i l)))) (cons i perm))])) Then, I can use it later: (for ((perm (in-permutations '(1 2 3)))) (display perm)) So I feel that for/sequence adds real value. I've been giving some more thought this afternoon to what other Scheme-like ways could be used to generate sequences. Yes, a yield like construct, based on continuations, is one way to generate sequences. But perhaps adding the option of an accumulator to for/sequence would be enough to cover common cases without the overhead of continuations. Here's an example of what I've been thinking about: (define (in-fibonacci) (for/sequence ((a 1) (b 1)) ;;accumulators ((n (in-naturals))) ;;generator (in this example, we don't really use n, but it makes the sequence infinite) a ;; value to collect in sequence (values b (+ a b)))) ;;update the accumulators Then, you have an easy way to iterate through all the fibonacci numbers using the comprehension syntax. --Mark From mark.engelberg at gmail.com Thu Jun 5 20:21:50 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:20 2009 Subject: [plt-scheme] PLT v 4.0 discussion - values Message-ID: Even though "values" have been around a while in Scheme, I've never really used them. In most languages, if you want to return multiple values, you just bundle them up in something like a "tuple" and use a match-like construct to deconstruct at the receiving end. This always worked fine for me, and so I tend to use a similar strategy in Scheme. The nice thing about this approach is that if you *want* to delay destructuring the return values, this is easy to do. You just pass them around as a structure until you're ready to use the individual parts. Use of "values" seems to impose a higher burden on the caller, who needs to use special constructs (define/values, let/values, etc.) to capture and manipulate the multiple values. I see that in v 4.0, values get a lot more mainstream use (for example, in comprehension syntax with multiple accumulators), so I guess I better start getting used to them. I assume they have superior performance, which is why they are used in preference to the structuring/destructing technique. But I propose values->list and values->vector macros be included to ease the situation where you really don't want to bind the values to individual names right away. Possible implementation: (define-syntax-rule (values->list exp) (call-with-values (lambda () exp) list)) Example: (values->list (quotient/remainder 10 3)) evaluates to (list 3 1) Same for values->vector. --Mark From neil at neilvandyke.org Thu Jun 5 20:43:14 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:19:21 2009 Subject: [plt-scheme] PLT v 4.0 discussion - values In-Reply-To: References: Message-ID: <48488822.5000100@neilvandyke.org> Mark Engelberg wrote at 06/05/2008 08:21 PM: > Use of "values" seems to impose a higher burden on the caller, > who needs to use special constructs (define/values, let/values, etc.) > to capture and manipulate the multiple values. > FWIW, I think multiple-value returns are a great idea, and I wish I'd used them more in my earlier Scheme code. I think the fact that "let/values" appears to be a special construct is due to the historical artifact of "let" only supporting single-value binding clauses. (Indeed, I believe that PLT actually implements "let" as syntactic sugar that expands to "let-values".) I do long for the day that a standard backward-compatible multiple-value "let" is supported widely by Scheme implementations. From dyoo at cs.wpi.edu Thu Jun 5 22:47:18 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:19:21 2009 Subject: [plt-scheme] dynamic required modules and scheme/sandbox Message-ID: Hi everyone, I chased down a problem with my use of scheme/sandbox with some other dynamic-required modules that I had placed in a namespace. I wanted to get some module sharing going on with those, but my naive use of the sandbox didn't let sharing happen. I finally fixed my problem and wanted to share my solution with others. Also, if someone sees a better way to do this, that would also be appreciated! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang scheme/base (require scheme/list) (define libraries-to-attach (list '(lib "world.ss" "htdp") '(lib "mrpict.ss" "texpict") '(lib "cache-image-snip.ss" "mrlib"))) ;; make-sandboxed-evaluator/dynamic: module-path -> void ;; Creates a sandboxed evaluator from a dynamic context. ;; We need to do this if we've dynamic-required the other libraries that ;; we want to attach to. ;; ;; Call in the dynamic context of the namespace that's attaches ;; to the libraries-to-attach modules. (define (make-sandboxed-evaluator/dynamic language) (let ([sandbox-security-guard (dynamic-require 'scheme/sandbox 'sandbox-security-guard)] [sandbox-namespace-specs (dynamic-require 'scheme/sandbox 'sandbox-namespace-specs)] [make-evaluator (dynamic-require 'scheme/sandbox 'make-evaluator)]) (parameterize ([sandbox-security-guard (current-security-guard)] [sandbox-namespace-specs (let-values ([(ns paths) (values (first (sandbox-namespace-specs)) (rest (sandbox-namespace-specs)))]) (cons ns (append libraries-to-attach paths)))]) (make-evaluator language)))) From eli at barzilay.org Thu Jun 5 23:01:32 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:21 2009 Subject: [plt-scheme] dynamic required modules and scheme/sandbox In-Reply-To: References: Message-ID: <18504.43148.274653.319055@arabic.ccs.neu.edu> On Jun 5, Danny Yoo wrote: > I chased down a problem with my use of scheme/sandbox with some > other dynamic-required modules that I had placed in a namespace. I > wanted to get some module sharing going on with those, but my naive > use of the sandbox didn't let sharing happen. I finally fixed my > problem and wanted to share my solution with others. Also, if > someone sees a better way to do this, that would also be > appreciated! > [...] That's exactly the intention of `sandbox-namespace-specs', if you see a way to improve the docs, then tell me... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From andrew-scheme at areilly.bpc-users.org Thu Jun 5 20:02:48 2008 From: andrew-scheme at areilly.bpc-users.org (Andrew Reilly) Date: Thu Mar 26 02:19:21 2009 Subject: [plt-scheme] Syntax question In-Reply-To: References: Message-ID: <20080606000248.GA29822@duncan.reilly.home> On Thu, Jun 05, 2008 at 04:04:21PM -0400, Arthur Nunes-Harwit wrote: > I am hoping to get unbiased opinions from this group concerning > questions of syntax. Kind of a strange forum to ask this question: I would have thought that most participants here would be more in favour of (cons 2 1) and (append '(2) '(1)), rather than operators with implicit precedance. But if you're taking a poll, I prefer cons to have higher precedence than append, I think. Cheers, Andrew From mark.engelberg at gmail.com Fri Jun 6 00:49:14 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:21 2009 Subject: [plt-scheme] PLT v 4.0 discussion - planet browser In-Reply-To: <0B9A044B-2CE7-4068-8CB7-C18A078CB855@ccs.neu.edu> References: <0B9A044B-2CE7-4068-8CB7-C18A078CB855@ccs.neu.edu> Message-ID: On Thu, Jun 5, 2008 at 7:40 AM, Matthias Felleisen wrote: > Now having said that, I think that *you* are in a perfect position to take > on the two tasks and develop this software. I know the guy who trained you > in the first course and the other one who had you in the second semester, > and I think they got you started in the right direction :-) This is also an > effort where getting a non-core member to get this started is just the right > thing. Also, you don't have to do it all by yourself. You could coordinate > the efforts of others on this list. This is especially true for the data > structures proposal, where it takes an API designer/coordinator and several > implementors. Last but not least, neither of these tasks is on a critical > path so delays and hick-ups won't kill anyone. > > How about it? -- Matthias > As with most things, it's all about time. I'm more interested in working on the data structures library, but if Eli's got a "generic function" framework in development that will improve the ease and elegance of separating interfaces from implementation, I'll wait until that's done before thinking seriously about it. --Mark From jpc-ml at zenburn.net Fri Jun 6 06:07:21 2008 From: jpc-ml at zenburn.net (=?UTF-8?B?SmFrdWIgUGlvdHIgQ8WCYXBh?=) Date: Thu Mar 26 02:19:22 2009 Subject: [plt-scheme] PLT v 4.0 discussion - values In-Reply-To: <48488822.5000100@neilvandyke.org> References: <48488822.5000100@neilvandyke.org> Message-ID: <48490C59.7030204@zenburn.net> Neil Van Dyke wrote: > I do long for the day that a standard backward-compatible multiple-value > "let" is supported widely by Scheme implementations. Wouldn't simply checking whether car of the binding clause is a pair or a symbol do the trick? AFAIR only simple symbols were allowed in R5RS. This would make multiple values more idiomatic and would be probably a good thing to do considering the new direction given for PLT 4.0. -- regards, Jakub Piotr C?apa From neil at neilvandyke.org Fri Jun 6 06:36:35 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:19:22 2009 Subject: [plt-scheme] PLT v 4.0 discussion - values In-Reply-To: <48490C59.7030204@zenburn.net> References: <48488822.5000100@neilvandyke.org> <48490C59.7030204@zenburn.net> Message-ID: <48491333.9070609@neilvandyke.org> Jakub Piotr C?apa wrote at 06/06/2008 06:07 AM: > Neil Van Dyke wrote: >> I do long for the day that a standard backward-compatible >> multiple-value "let" is supported widely by Scheme implementations. > > Wouldn't simply checking whether car of the binding clause is a pair > or a symbol do the trick? AFAIR only simple symbols were allowed in R5RS. That's my own favorite idea. The only unfortunate thing about it is that it has no analogue for "(lambda all-args ...)". > > This would make multiple values more idiomatic and would be probably a > good thing to do considering the new direction given for PLT 4.0. > From dekudekuplex at yahoo.com Fri Jun 6 07:58:28 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:19:22 2009 Subject: [plt-scheme] Syntax question Message-ID: <812587.68794.qm@web30206.mail.mud.yahoo.com> (Andrew: I think that you probably meant (cons 2 '(1)) which yields (2 1) instead of > (cons 2 1) which yields (2 . 1) ) Arthur: This is an interesting and unusual question for this mailing list; for a moment, I thought that was reading Haskell-Cafe by mistake! To answer your question, yes, I agree with your conclusion. IMHO, in general, cons (adding an element to the head of a list) should probably have a higher precedence than append (concatenating two lists). (I think you made a typo when you wrote > (2+1::2::1[]) + (0::[]) Notice that there is no '::' (cons in ML) operator in front of the first '[]' (empty list). Therefore, I am assuming that you actually meant (2+1::2::1::[]) + (0::[]) ) For the sake of simplicity, since I am personally not familiar with ML syntax, but happen to be familiar with both Haskell and Scheme syntax, I am going to translate your examples into both Haskell (which allows infix operators) and Scheme (which does not, but which is the programming language understood on this mailing list), and then investigate the implications of both assumptions. Case 1: Suppose that cons has higher precedence than append. I.e., suppose that we prefer to write (2+1)::2::1::[] + 0::[] instead of (2+1::2::1::[]) + (0::[]) Then: In Haskell: (2+1) : 2 : 1 : [] ++ 0 : [] yields [3,2,1,0] (The list consisting of the elements 3, 2, 1, and 0.) In Scheme: (append (cons (+ 2 1) (cons 2 (cons 1 '()))) (cons 0 '())) yields (3 2 1 0) (The list consisting of the elements 3, 2, 1, and 0.) Comments: This is the current default behavior for both languages (Scheme and Haskell), as far as I know (Scheme uses prefix notation, and I was unable to find an operator precedence table for Haskell). Since lists are composed of elements, the cons operator (prefix 'cons in Scheme (equivalent to (quote cons) in Scheme syntax), infix ':' in Haskell) takes one element and one list as arguments, and adds the element to the head of the list, whereas the append operator (prefix 'append in Scheme (equivalent to (quote append) in Scheme syntax), infix '++' in Haskell) takes two lists and concatenates the lists such that the elements of the first list precede the elements of the second list in the resulting list, so the operator precedence of this case example seems a natural operator precedence. Case 2: Suppose that append has higher precedence than cons. I.e., suppose that we prefer to write (2+1::2::1::[]) + (0::[]) instead of (2+1)::2::1::[] + 0::[] Then: In Haskell: (2+1 : 2 : 1 : []) ++ (0 : []) yields [3,2,1,0] (The list consisting of the elements 3, 2, 1, and 0.) In Scheme: (append (cons (+ 2 1) (cons 2 (cons 1 '()))) (cons 0 '())) (no difference!) yields (3 2 1 0) (The list consisting of the elements 3, 2, 1, and 0.) Comments: Notice that Scheme's prefix notation yields equivalent expressions for both cases, regardless of operator precedence. In the Haskell expression, in this case, an extra set of parentheses is now required on the right-hand side of the append operation. Intuitively speaking, since the append operator takes arguments (lists) that are themselves composed of what are normally arguments (elements) of the cons operator, it seems more natural to assign higher operator precedence to the operator whose arguments are more elementary: in this case, cons. So, to conclude: Yes. Benjamin L. Russell --- On Fri, 6/6/08, Andrew Reilly wrote: > From: Andrew Reilly > Subject: Re: [plt-scheme] Syntax question > To: "Arthur Nunes-Harwit" > Cc: "PLT Scheme List" > Date: Friday, June 6, 2008, 9:02 AM > On Thu, Jun 05, 2008 at 04:04:21PM -0400, Arthur > Nunes-Harwit wrote: > > I am hoping to get unbiased opinions from this group > concerning > > questions of syntax. > > Kind of a strange forum to ask this question: I would have > thought that most participants here would be more in favour > of > (cons 2 1) and (append '(2) '(1)), rather than > operators with > implicit precedance. But if you're taking a poll, I > prefer cons > to have higher precedence than append, I think. > > Cheers, > > Andrew > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From czhu at cs.utah.edu Fri Jun 6 09:38:56 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:22 2009 Subject: [plt-scheme] On understanding performance In-Reply-To: References: <4A5094B9-4D50-4797-BF88-63D2B3541F0B@gmail.com> Message-ID: <48493DF0.2040809@cs.utah.edu> Arthur Nunes-Harwit wrote: > > I writing a small PROLOG implementation using DrScheme (MrEd) > version 350. > > I decided to see about improving performance using Marc Feeley's > compilation to closures technique. An initial benchmark (the naive > Fibonacci predicate) shows little difference in speed. When > implementing Scheme-like languages in other environments, I am used to > a significant improvement. Any guesses about why I am seeing so > little improvement here? > > I saw a hint that profiling tools exist somewhere. Can anyone give > me a little more information about how to use them? > http://www.cs.utah.edu/plt/mailarch/plt-scheme-2002/msg00426.html? > My implementation is currently leaning heavily on gensyming. What > performance/gc issues are involved with gensym? In particular, are > gensyms garbage collected? > gensyms are garbage collected. > Thanks. > > -Arthur > Chongkai From billclem at gmail.com Fri Jun 6 14:02:09 2008 From: billclem at gmail.com (Bill Clementson) Date: Thu Mar 26 02:19:22 2009 Subject: [plt-scheme] Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme for Game Development Message-ID: <8757cb490806061102y31e32d54qdaa78a1e84b1b076@mail.gmail.com> Hi all, Vancouver is often called "Hollywood North" because so many movies are filmed in the city. However, what may not be as well known is that Vancouver is also a hot location for another type of entertainment industry: Computer Games! With companies like Electronic Arts and Slant Six Games located in Vancouver, the city is a real hotbed for computer game development. I've written in the past about using Lisp for game development (see here - my write-up actually got referenced in Wikipedia, so it must be authoritative! ;-) ). Well, this month, we'll be hearing about using Lisp for game development from someone who is in a position to really know what he's talking about. Dean Giberson is currently a Senior Software Engineer at Slant Six Games and previously worked at EA. Here's a short bio: Dean Giberson was a tool developer for 4 years working on several Star Wars game titles. After a short period teaching and contracting he returned to professional game development working on Sports titles for 3 years. He is currently employed at Slant Six Games working on "SOCOM: Confrontation" developing the next generation of workflow tools. Although we were hoping to be moving to a new location (with a projector and a special meeting room!) for this month's meeting, the new location is still under construction. Therefore, we will be meeting again this month at Calhoun's Coffee House and Restaurant There won't be a projector, so we'll have to VNC a couple of laptops so that we aren't all crowded around one laptop. We've done that in the past, so this shouldn't be a problem (so long as some people remember to bring laptops! ;-) ). Here's the "official" meeting notice: Topic: Using PLT Scheme for Game Development Presenter: Dean Giberson Date: Thursday, June 19, 2008 Time: 7pm - 10pm (or whenever) Venue: Calhoun's, 3035 West Broadway, Vancouver (see map) Summary: Inspired by tools such as DabbleDb, Fluxus, Alice or Processing and driven by the problems of programming in the large Dean will explore the use of PLT Scheme in game development. Solutions to distributed development, complex tools, and dynamic languages are explored with current solutions explained. Concepts explored: Live coding Web interface for development Connecting external tools Version control Searching Join us for a beer/coffee and a chance to see/discuss how Lisp can be used for game development. Any updates and links will be on my blog entry for the meeting: http://bc.tech.coop/blog/080606.html If possible, I will do a screencast of the presentation and link to it in a subsequent blog post. -- Bill Clementson From tom at zwizwa.be Fri Jun 6 14:22:49 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:23 2009 Subject: [plt-scheme] LinkedIn Message-ID: Hello, I was wondering if there are people interested in starting a PLT Scheme group on LinkedIn (if there isn't one already.. search seems to not be implemented, and I can't find it with google). Cheers, Tom From dyoo at cs.wpi.edu Fri Jun 6 15:10:44 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:19:23 2009 Subject: [plt-scheme] Preferred exception structure to inherit: exn or exn:fail? Message-ID: I've always assumed that new exception structures should try to extend the exn:fail structure, but every so often, I see error structures that extend the base 'exn' type. For example, the error type in the htdp teachpacks (collects/htdp/error.ss) is defined as: (define-struct (tp-exn exn) ()) I expected this as: (define-struct (tp-exn exn:fail) ()) and was a little surprised to see otherwise. Is there a reason for preferring one vs the other? From clements at brinckerhoff.org Fri Jun 6 15:21:09 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:19:23 2009 Subject: [plt-scheme] audio In-Reply-To: References: Message-ID: <8C8B555A-F6CD-4118-A13F-4D43851DA4DC@brinckerhoff.org> On Jun 5, 2008, at 7:32 AM, Atmam Ta wrote: > Hi, > > I would like to play a sound file and be able to pause it in > response to a user event (or alternatively, play a short segment of > an audio file). Is this possible in PLT-Scheme? I have not found any > library for such tasks... I'm not aware of such a library. I'm guessing that the difficulty here is in supplying something cross-platform. It would probably be (relatively) simple, though, to use the FFI to construct a PLaneT package that works on one particular platform. John Clements -------------- 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/20080606/74ad6aba/smime.bin From clements at brinckerhoff.org Fri Jun 6 15:26:42 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:19:24 2009 Subject: [plt-scheme] audio In-Reply-To: <8C8B555A-F6CD-4118-A13F-4D43851DA4DC@brinckerhoff.org> References: <8C8B555A-F6CD-4118-A13F-4D43851DA4DC@brinckerhoff.org> Message-ID: On Jun 6, 2008, at 12:21 PM, John Clements wrote: > > On Jun 5, 2008, at 7:32 AM, Atmam Ta wrote: > >> Hi, >> >> I would like to play a sound file and be able to pause it in >> response to a user event (or alternatively, play a short segment of >> an audio file). Is this possible in PLT-Scheme? I have not found >> any library for such tasks... > > I'm not aware of such a library. I'm guessing that the difficulty > here is in supplying something cross-platform. It would probably be > (relatively) simple, though, to use the FFI to construct a PLaneT > package that works on one particular platform. FWIW, I just took a look at how to do it in OS X, and I came up with this interface: http://developer.apple.com/documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQPlayback/chapter_4_section_1.html#/ /apple_ref/doc/uid/TP40005343-CH3-SW1 Unfortunately, the interface is a bit too low-level to be a one- or two-hour project... Ah well. John Clements -------------- 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/20080606/27cabb9e/smime.bin From eli at barzilay.org Fri Jun 6 15:27:13 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:24 2009 Subject: [plt-scheme] audio In-Reply-To: <8C8B555A-F6CD-4118-A13F-4D43851DA4DC@brinckerhoff.org> References: <8C8B555A-F6CD-4118-A13F-4D43851DA4DC@brinckerhoff.org> Message-ID: <18505.36753.402457.926153@arabic.ccs.neu.edu> On Jun 6, John Clements wrote: > > On Jun 5, 2008, at 7:32 AM, Atmam Ta wrote: > > > Hi, > > > > I would like to play a sound file and be able to pause it in > > response to a user event (or alternatively, play a short segment of > > an audio file). Is this possible in PLT-Scheme? I have not found any > > library for such tasks... > > I'm not aware of such a library. I'm guessing that the difficulty here > is in supplying something cross-platform. It would probably be > (relatively) simple, though, to use the FFI to construct a PLaneT > package that works on one particular platform. In case you're on Windows, I have some code (sketch quality but working fine) for an MCI interface, using the string version means that the FFI part is pretty simple (http://msdn.microsoft.com/en-us/library/ms709461.aspx, look for "MCI Command Strings"). -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mvanier at cs.caltech.edu Sat Jun 7 05:17:42 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:24 2009 Subject: [plt-scheme] macro question Message-ID: <484A5236.6010605@cs.caltech.edu> I've run into a problem with a macro I don't know how to solve. Here's the macro: (define-syntax get-stack-vals (syntax-rules () ((_ n (env first rest) expr ...) (let*-values (((env stk) (es-values es)) ((first rest) (take n stk))) expr ...)))) Here's a use: (define (do-def es) (get-stack-vals 2 (env first rest) (let ((sym (cadr first)) (val (car first))) (if (symbol? sym) (let ((env2 (env-add env sym val))) (make-es env2 rest)) (error "cannot define non-symbol: " sym))))) which should expand to: (define (do-def es) (let*-values (((env stk) (es-values es)) ((first rest) (take 2 stk))) (let ((sym (cadr first)) (val (car first))) (if (symbol? sym) (let ((env2 (env-add env sym val))) (make-es env2 rest)) (error "cannot define non-symbol: " sym))))) and apparently does, at least according to the macro stepper. However, when I call do-def I get an error message: "reference to undefined identifier: es". This seems odd, because es is in scope at the macro expansion location. Is the es in the get-stack-vals macro bound in the lexical scope of that macro? All the other external identifiers in the macro are bound at the top-level, so it works either way for them. If this is the case, how do I get es to be bound the way I want it to be? I realize that I'm trying to do something a bit naughty since I'm assuming a binding for es will exist at all macro expansion locations; alternative suggestions are welcome (other than "don't give up your day job"). I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro system is an intricate and beautiful thing that I'm just beginning to wrap my head around. Mike From jos.koot at telefonica.net Sat Jun 7 05:56:28 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:25 2009 Subject: [plt-scheme] macro question References: <484A5236.6010605@cs.caltech.edu> Message-ID: <001c01c8c884$c1e381d0$2101a8c0@uw2b2dff239c4d> 'es' introduced in the macro is not identified with the local variable 'es' of the environment from which the macro is called. This is hygienic. The hygienic behaviour avoids unintentional identifications. Besides there might also hang around a global variable of the same name, in which case your macro would identify 'es' with the global variable, not the local one. Below two solutions, the first one non hygienic, the second one hygienic by requiring the variable to be mentioned in the macro call. In general hygienic solutions are to be preferred, I think. Jos (define-syntax (get-stack-vals stx) (syntax-case stx () ((_ n (env first rest) expr ...) #`(let*-values (((env stk) (es-values #,(datum->syntax stx 'es))) ((first rest) (take n stk))) expr ...)))) (define-syntax get-stack-vals (syntax-rules () ((_ n (env first rest) es expr ...) ; ^^^ (let*-values (((env stk) (es-values es)) ((first rest) (take n stk))) expr ...)))) ----- Original Message ----- From: "Michael Vanier" To: "mzscheme Mailing List" Sent: Saturday, June 07, 2008 11:17 AM Subject: [plt-scheme] macro question > I've run into a problem with a macro I don't know how to solve. Here's > the macro: > > (define-syntax get-stack-vals > (syntax-rules () > ((_ n (env first rest) expr ...) > (let*-values (((env stk) (es-values es)) > ((first rest) (take n stk))) > expr ...)))) > > Here's a use: > > (define (do-def es) > (get-stack-vals 2 (env first rest) > (let ((sym (cadr first)) > (val (car first))) > (if (symbol? sym) > (let ((env2 (env-add env sym val))) > (make-es env2 rest)) > (error "cannot define non-symbol: " sym))))) > > which should expand to: > > (define (do-def es) > (let*-values (((env stk) (es-values es)) > ((first rest) (take 2 stk))) > (let ((sym (cadr first)) > (val (car first))) > (if (symbol? sym) > (let ((env2 (env-add env sym val))) > (make-es env2 rest)) > (error "cannot define non-symbol: " sym))))) > > and apparently does, at least according to the macro stepper. However, > when I call do-def I get an error message: "reference to undefined > identifier: es". This seems odd, because es is in scope at the macro > expansion location. Is the es in the get-stack-vals macro bound in the > lexical scope of that macro? All the other external identifiers in the > macro are bound at the top-level, so it works either way for them. If > this is the case, how do I get es to be bound the way I want it to be? I > realize that I'm trying to do something a bit naughty since I'm assuming a > binding for es will exist at all macro expansion locations; alternative > suggestions are welcome (other than "don't give up your day job"). > > I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro system is > an intricate and beautiful thing that I'm just beginning to wrap my head > around. > > Mike > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mvanier at cs.caltech.edu Sat Jun 7 05:59:49 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:25 2009 Subject: [plt-scheme] macro question In-Reply-To: <001c01c8c884$c1e381d0$2101a8c0@uw2b2dff239c4d> References: <484A5236.6010605@cs.caltech.edu> <001c01c8c884$c1e381d0$2101a8c0@uw2b2dff239c4d> Message-ID: <484A5C15.6090100@cs.caltech.edu> Thanks very much! Jos Koot wrote: > 'es' introduced in the macro is not identified with the local variable > 'es' of the environment from which the macro is called. This is > hygienic. The hygienic behaviour avoids unintentional identifications. > Besides there might also hang around a global variable of the same name, > in which case your macro would identify 'es' with the global variable, > not the local one. Below two solutions, the first one non hygienic, the > second one hygienic by requiring the variable to be mentioned in the > macro call. In general hygienic solutions are to be preferred, I think. > Jos > > (define-syntax (get-stack-vals stx) > (syntax-case stx () > ((_ n (env first rest) expr ...) > #`(let*-values (((env stk) (es-values #,(datum->syntax stx 'es))) > ((first rest) (take n stk))) > expr ...)))) > > (define-syntax get-stack-vals > (syntax-rules () > ((_ n (env first rest) es expr ...) > ; ^^^ > (let*-values (((env stk) (es-values es)) > ((first rest) (take n stk))) > expr ...)))) > > ----- Original Message ----- From: "Michael Vanier" > > To: "mzscheme Mailing List" > Sent: Saturday, June 07, 2008 11:17 AM > Subject: [plt-scheme] macro question > > >> I've run into a problem with a macro I don't know how to solve. >> Here's the macro: >> >> (define-syntax get-stack-vals >> (syntax-rules () >> ((_ n (env first rest) expr ...) >> (let*-values (((env stk) (es-values es)) >> ((first rest) (take n stk))) >> expr ...)))) >> >> Here's a use: >> >> (define (do-def es) >> (get-stack-vals 2 (env first rest) >> (let ((sym (cadr first)) >> (val (car first))) >> (if (symbol? sym) >> (let ((env2 (env-add env sym val))) >> (make-es env2 rest)) >> (error "cannot define non-symbol: " sym))))) >> >> which should expand to: >> >> (define (do-def es) >> (let*-values (((env stk) (es-values es)) >> ((first rest) (take 2 stk))) >> (let ((sym (cadr first)) >> (val (car first))) >> (if (symbol? sym) >> (let ((env2 (env-add env sym val))) >> (make-es env2 rest)) >> (error "cannot define non-symbol: " sym))))) >> >> and apparently does, at least according to the macro stepper. >> However, when I call do-def I get an error message: "reference to >> undefined identifier: es". This seems odd, because es is in scope at >> the macro expansion location. Is the es in the get-stack-vals macro >> bound in the lexical scope of that macro? All the other external >> identifiers in the macro are bound at the top-level, so it works >> either way for them. If this is the case, how do I get es to be bound >> the way I want it to be? I realize that I'm trying to do something a >> bit naughty since I'm assuming a binding for es will exist at all >> macro expansion locations; alternative suggestions are welcome (other >> than "don't give up your day job"). >> >> I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro system >> is an intricate and beautiful thing that I'm just beginning to wrap my >> head around. >> >> Mike >> >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From mvanier at cs.caltech.edu Sat Jun 7 06:02:35 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:25 2009 Subject: [plt-scheme] macro question In-Reply-To: <484A5C15.6090100@cs.caltech.edu> References: <484A5236.6010605@cs.caltech.edu> <001c01c8c884$c1e381d0$2101a8c0@uw2b2dff239c4d> <484A5C15.6090100@cs.caltech.edu> Message-ID: <484A5CBB.3090600@cs.caltech.edu> But don't you mean datum->syntax-object, not datum->syntax? Michael Vanier wrote: > Thanks very much! > > Jos Koot wrote: >> 'es' introduced in the macro is not identified with the local variable >> 'es' of the environment from which the macro is called. This is >> hygienic. The hygienic behaviour avoids unintentional identifications. >> Besides there might also hang around a global variable of the same >> name, in which case your macro would identify 'es' with the global >> variable, not the local one. Below two solutions, the first one non >> hygienic, the second one hygienic by requiring the variable to be >> mentioned in the macro call. In general hygienic solutions are to be >> preferred, I think. >> Jos >> >> (define-syntax (get-stack-vals stx) >> (syntax-case stx () >> ((_ n (env first rest) expr ...) >> #`(let*-values (((env stk) (es-values #,(datum->syntax stx 'es))) >> ((first rest) (take n stk))) >> expr ...)))) >> >> (define-syntax get-stack-vals >> (syntax-rules () >> ((_ n (env first rest) es expr ...) >> ; ^^^ >> (let*-values (((env stk) (es-values es)) >> ((first rest) (take n stk))) >> expr ...)))) >> >> ----- Original Message ----- From: "Michael Vanier" >> >> To: "mzscheme Mailing List" >> Sent: Saturday, June 07, 2008 11:17 AM >> Subject: [plt-scheme] macro question >> >> >>> I've run into a problem with a macro I don't know how to solve. >>> Here's the macro: >>> >>> (define-syntax get-stack-vals >>> (syntax-rules () >>> ((_ n (env first rest) expr ...) >>> (let*-values (((env stk) (es-values es)) >>> ((first rest) (take n stk))) >>> expr ...)))) >>> >>> Here's a use: >>> >>> (define (do-def es) >>> (get-stack-vals 2 (env first rest) >>> (let ((sym (cadr first)) >>> (val (car first))) >>> (if (symbol? sym) >>> (let ((env2 (env-add env sym val))) >>> (make-es env2 rest)) >>> (error "cannot define non-symbol: " sym))))) >>> >>> which should expand to: >>> >>> (define (do-def es) >>> (let*-values (((env stk) (es-values es)) >>> ((first rest) (take 2 stk))) >>> (let ((sym (cadr first)) >>> (val (car first))) >>> (if (symbol? sym) >>> (let ((env2 (env-add env sym val))) >>> (make-es env2 rest)) >>> (error "cannot define non-symbol: " sym))))) >>> >>> and apparently does, at least according to the macro stepper. >>> However, when I call do-def I get an error message: "reference to >>> undefined identifier: es". This seems odd, because es is in scope at >>> the macro expansion location. Is the es in the get-stack-vals macro >>> bound in the lexical scope of that macro? All the other external >>> identifiers in the macro are bound at the top-level, so it works >>> either way for them. If this is the case, how do I get es to be >>> bound the way I want it to be? I realize that I'm trying to do >>> something a bit naughty since I'm assuming a binding for es will >>> exist at all macro expansion locations; alternative suggestions are >>> welcome (other than "don't give up your day job"). >>> >>> I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro >>> system is an intricate and beautiful thing that I'm just beginning to >>> wrap my head around. >>> >>> Mike >>> >>> >>> _________________________________________________ >>> 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 jos.koot at telefonica.net Sat Jun 7 06:13:46 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:25 2009 Subject: [plt-scheme] macro question References: <484A5236.6010605@cs.caltech.edu> <001c01c8c884$c1e381d0$2101a8c0@uw2b2dff239c4d> <484A5C15.6090100@cs.caltech.edu> <484A5CBB.3090600@cs.caltech.edu> Message-ID: <000f01c8c887$2cb72780$2101a8c0@uw2b2dff239c4d> ----- Original Message ----- From: "Michael Vanier" To: "Jos Koot" Cc: "mzscheme Mailing List" Sent: Saturday, June 07, 2008 12:02 PM Subject: Re: [plt-scheme] macro question > But don't you mean datum->syntax-object, not datum->syntax? That depends on the language you are using. Apparently you should use datum->syntax-object indeed. Jos > > Michael Vanier wrote: >> Thanks very much! >> >> Jos Koot wrote: >>> 'es' introduced in the macro is not identified with the local variable >>> 'es' of the environment from which the macro is called. This is >>> hygienic. The hygienic behaviour avoids unintentional identifications. >>> Besides there might also hang around a global variable of the same >>> name, in which case your macro would identify 'es' with the global >>> variable, not the local one. Below two solutions, the first one non >>> hygienic, the second one hygienic by requiring the variable to be >>> mentioned in the macro call. In general hygienic solutions are to be >>> preferred, I think. >>> Jos >>> >>> (define-syntax (get-stack-vals stx) >>> (syntax-case stx () >>> ((_ n (env first rest) expr ...) >>> #`(let*-values (((env stk) (es-values #,(datum->syntax stx 'es))) >>> ((first rest) (take n stk))) >>> expr ...)))) >>> >>> (define-syntax get-stack-vals >>> (syntax-rules () >>> ((_ n (env first rest) es expr ...) >>> ; ^^^ >>> (let*-values (((env stk) (es-values es)) >>> ((first rest) (take n stk))) >>> expr ...)))) >>> >>> ----- Original Message ----- From: "Michael Vanier" >>> >>> To: "mzscheme Mailing List" >>> Sent: Saturday, June 07, 2008 11:17 AM >>> Subject: [plt-scheme] macro question >>> >>> >>>> I've run into a problem with a macro I don't know how to solve. >>>> Here's the macro: >>>> >>>> (define-syntax get-stack-vals >>>> (syntax-rules () >>>> ((_ n (env first rest) expr ...) >>>> (let*-values (((env stk) (es-values es)) >>>> ((first rest) (take n stk))) >>>> expr ...)))) >>>> >>>> Here's a use: >>>> >>>> (define (do-def es) >>>> (get-stack-vals 2 (env first rest) >>>> (let ((sym (cadr first)) >>>> (val (car first))) >>>> (if (symbol? sym) >>>> (let ((env2 (env-add env sym val))) >>>> (make-es env2 rest)) >>>> (error "cannot define non-symbol: " sym))))) >>>> >>>> which should expand to: >>>> >>>> (define (do-def es) >>>> (let*-values (((env stk) (es-values es)) >>>> ((first rest) (take 2 stk))) >>>> (let ((sym (cadr first)) >>>> (val (car first))) >>>> (if (symbol? sym) >>>> (let ((env2 (env-add env sym val))) >>>> (make-es env2 rest)) >>>> (error "cannot define non-symbol: " sym))))) >>>> >>>> and apparently does, at least according to the macro stepper. >>>> However, when I call do-def I get an error message: "reference to >>>> undefined identifier: es". This seems odd, because es is in scope at >>>> the macro expansion location. Is the es in the get-stack-vals macro >>>> bound in the lexical scope of that macro? All the other external >>>> identifiers in the macro are bound at the top-level, so it works >>>> either way for them. If this is the case, how do I get es to be >>>> bound the way I want it to be? I realize that I'm trying to do >>>> something a bit naughty since I'm assuming a binding for es will >>>> exist at all macro expansion locations; alternative suggestions are >>>> welcome (other than "don't give up your day job"). >>>> >>>> I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro >>>> system is an intricate and beautiful thing that I'm just beginning to >>>> wrap my head around. >>>> >>>> Mike >>>> >>>> >>>> _________________________________________________ >>>> 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 jos.koot at telefonica.net Sat Jun 7 07:11:16 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:25 2009 Subject: [plt-scheme] macro question References: <484A5236.6010605@cs.caltech.edu> <001c01c8c884$c1e381d0$2101a8c0@uw2b2dff239c4d> <484A5C15.6090100@cs.caltech.edu> <484A5CBB.3090600@cs.caltech.edu> Message-ID: <000a01c8c88f$34b67370$2101a8c0@uw2b2dff239c4d> I should have added the following: Be aware that the non hygienic macro requires the variable always to be called 'es'. Use the hygienic version, which allows a variable of arbitrary name within the macro call. Jos ----- Original Message ----- From: "Michael Vanier" To: "Jos Koot" Cc: "mzscheme Mailing List" Sent: Saturday, June 07, 2008 12:02 PM Subject: Re: [plt-scheme] macro question > But don't you mean datum->syntax-object, not datum->syntax? > > Michael Vanier wrote: >> Thanks very much! >> >> Jos Koot wrote: >>> 'es' introduced in the macro is not identified with the local variable >>> 'es' of the environment from which the macro is called. This is >>> hygienic. The hygienic behaviour avoids unintentional identifications. >>> Besides there might also hang around a global variable of the same name, >>> in which case your macro would identify 'es' with the global variable, >>> not the local one. Below two solutions, the first one non hygienic, the >>> second one hygienic by requiring the variable to be mentioned in the >>> macro call. In general hygienic solutions are to be preferred, I think. >>> Jos >>> >>> (define-syntax (get-stack-vals stx) >>> (syntax-case stx () >>> ((_ n (env first rest) expr ...) >>> #`(let*-values (((env stk) (es-values #,(datum->syntax stx 'es))) >>> ((first rest) (take n stk))) >>> expr ...)))) >>> >>> (define-syntax get-stack-vals >>> (syntax-rules () >>> ((_ n (env first rest) es expr ...) >>> ; ^^^ >>> (let*-values (((env stk) (es-values es)) >>> ((first rest) (take n stk))) >>> expr ...)))) >>> >>> ----- Original Message ----- From: "Michael Vanier" >>> >>> To: "mzscheme Mailing List" >>> Sent: Saturday, June 07, 2008 11:17 AM >>> Subject: [plt-scheme] macro question >>> >>> >>>> I've run into a problem with a macro I don't know how to solve. Here's >>>> the macro: >>>> >>>> (define-syntax get-stack-vals >>>> (syntax-rules () >>>> ((_ n (env first rest) expr ...) >>>> (let*-values (((env stk) (es-values es)) >>>> ((first rest) (take n stk))) >>>> expr ...)))) >>>> >>>> Here's a use: >>>> >>>> (define (do-def es) >>>> (get-stack-vals 2 (env first rest) >>>> (let ((sym (cadr first)) >>>> (val (car first))) >>>> (if (symbol? sym) >>>> (let ((env2 (env-add env sym val))) >>>> (make-es env2 rest)) >>>> (error "cannot define non-symbol: " sym))))) >>>> >>>> which should expand to: >>>> >>>> (define (do-def es) >>>> (let*-values (((env stk) (es-values es)) >>>> ((first rest) (take 2 stk))) >>>> (let ((sym (cadr first)) >>>> (val (car first))) >>>> (if (symbol? sym) >>>> (let ((env2 (env-add env sym val))) >>>> (make-es env2 rest)) >>>> (error "cannot define non-symbol: " sym))))) >>>> >>>> and apparently does, at least according to the macro stepper. However, >>>> when I call do-def I get an error message: "reference to undefined >>>> identifier: es". This seems odd, because es is in scope at the macro >>>> expansion location. Is the es in the get-stack-vals macro bound in the >>>> lexical scope of that macro? All the other external identifiers in the >>>> macro are bound at the top-level, so it works either way for them. If >>>> this is the case, how do I get es to be bound the way I want it to be? >>>> I realize that I'm trying to do something a bit naughty since I'm >>>> assuming a binding for es will exist at all macro expansion locations; >>>> alternative suggestions are welcome (other than "don't give up your day >>>> job"). >>>> >>>> I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro system >>>> is an intricate and beautiful thing that I'm just beginning to wrap my >>>> head around. >>>> >>>> Mike >>>> >>>> >>>> _________________________________________________ >>>> 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 andrew-scheme at areilly.bpc-users.org Sat Jun 7 00:59:57 2008 From: andrew-scheme at areilly.bpc-users.org (Andrew Reilly) Date: Thu Mar 26 02:19:25 2009 Subject: [plt-scheme] audio In-Reply-To: <8C8B555A-F6CD-4118-A13F-4D43851DA4DC@brinckerhoff.org> References: <8C8B555A-F6CD-4118-A13F-4D43851DA4DC@brinckerhoff.org> Message-ID: <20080607045957.GA45592@duncan.reilly.home> On Fri, Jun 06, 2008 at 12:21:09PM -0700, John Clements wrote: > On Jun 5, 2008, at 7:32 AM, Atmam Ta wrote: > > >Hi, > > > >I would like to play a sound file and be able to pause it in > >response to a user event (or alternatively, play a short segment of > >an audio file). Is this possible in PLT-Scheme? I have not found any > >library for such tasks... > > I'm not aware of such a library. I'm guessing that the difficulty here > is in supplying something cross-platform. It would probably be > (relatively) simple, though, to use the FFI to construct a PLaneT > package that works on one particular platform. In the C world, I've had a lot of good milage from the "portaudio" library, which is open source, quite high performance, and cross-platform. That is, the library exposes a common API across a variety of platforms that at least matches those of PLT. So: that would seem to be a good starting point, but the gotcha is that it fairly fundamentally relies on host-platform threads and callbacks (the audio-IO happens in a callback in a different thread from the main program). Not sure how much of a problem that will be for FFI, because I've not attempted to do any of that yet. Might be worth investigating, anyway. Cheers, Andrew From matthias at ccs.neu.edu Sat Jun 7 13:06:46 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:26 2009 Subject: [plt-scheme] macro question In-Reply-To: <484A5236.6010605@cs.caltech.edu> References: <484A5236.6010605@cs.caltech.edu> Message-ID: <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> Michael, when I run the macro stepper (in 4.0), I get > expand: unbound variable in module > es with high-lighting, exactly where I expected it. Same for RUN. Jos explained the why and the how to fix it. I'm surprised to hear that the macro stepper wouldn't show you this error. What version are you using? What language? Thanks -- Matthias On Jun 7, 2008, at 5:17 AM, Michael Vanier wrote: > I've run into a problem with a macro I don't know how to solve. > Here's the macro: > > (define-syntax get-stack-vals > (syntax-rules () > ((_ n (env first rest) expr ...) > (let*-values (((env stk) (es-values es)) > ((first rest) (take n stk))) > expr ...)))) > > Here's a use: > > (define (do-def es) > (get-stack-vals 2 (env first rest) > (let ((sym (cadr first)) > (val (car first))) > (if (symbol? sym) > (let ((env2 (env-add env sym val))) > (make-es env2 rest)) > (error "cannot define non-symbol: " sym))))) > > which should expand to: > > (define (do-def es) > (let*-values (((env stk) (es-values es)) > ((first rest) (take 2 stk))) > (let ((sym (cadr first)) > (val (car first))) > (if (symbol? sym) > (let ((env2 (env-add env sym val))) > (make-es env2 rest)) > (error "cannot define non-symbol: " sym))))) > > and apparently does, at least according to the macro stepper. > However, when I call do-def I get an error message: "reference to > undefined identifier: es". This seems odd, because es is in scope > at the macro expansion location. Is the es in the get-stack-vals > macro bound in the lexical scope of that macro? All the other > external identifiers in the macro are bound at the top-level, so it > works either way for them. If this is the case, how do I get es to > be bound the way I want it to be? I realize that I'm trying to do > something a bit naughty since I'm assuming a binding for es will > exist at all macro expansion locations; alternative suggestions are > welcome (other than "don't give up your day job"). > > I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro > system is an intricate and beautiful thing that I'm just beginning > to wrap my head around. > > Mike > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mvanier at cs.caltech.edu Sat Jun 7 15:49:16 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:26 2009 Subject: [plt-scheme] macro question In-Reply-To: <000a01c8c88f$34b67370$2101a8c0@uw2b2dff239c4d> References: <484A5236.6010605@cs.caltech.edu> <001c01c8c884$c1e381d0$2101a8c0@uw2b2dff239c4d> <484A5C15.6090100@cs.caltech.edu> <484A5CBB.3090600@cs.caltech.edu> <000a01c8c88f$34b67370$2101a8c0@uw2b2dff239c4d> Message-ID: <484AE63C.7030506@cs.caltech.edu> Yet another argument for hygiene, as if we needed one. I implemented your hygienic version and it works great. Thanks again! Mike Jos Koot wrote: > I should have added the following: > Be aware that the non hygienic macro requires the variable always to be > called 'es'. > Use the hygienic version, which allows a variable of arbitrary name > within the macro call. > Jos > ----- Original Message ----- From: "Michael Vanier" > > To: "Jos Koot" > Cc: "mzscheme Mailing List" > Sent: Saturday, June 07, 2008 12:02 PM > Subject: Re: [plt-scheme] macro question > > >> But don't you mean datum->syntax-object, not datum->syntax? >> >> Michael Vanier wrote: >>> Thanks very much! >>> >>> Jos Koot wrote: >>>> 'es' introduced in the macro is not identified with the local >>>> variable 'es' of the environment from which the macro is called. >>>> This is hygienic. The hygienic behaviour avoids unintentional >>>> identifications. Besides there might also hang around a global >>>> variable of the same name, in which case your macro would identify >>>> 'es' with the global variable, not the local one. Below two >>>> solutions, the first one non hygienic, the second one hygienic by >>>> requiring the variable to be mentioned in the macro call. In general >>>> hygienic solutions are to be preferred, I think. >>>> Jos >>>> >>>> (define-syntax (get-stack-vals stx) >>>> (syntax-case stx () >>>> ((_ n (env first rest) expr ...) >>>> #`(let*-values (((env stk) (es-values #,(datum->syntax stx 'es))) >>>> ((first rest) (take n stk))) >>>> expr ...)))) >>>> >>>> (define-syntax get-stack-vals >>>> (syntax-rules () >>>> ((_ n (env first rest) es expr ...) >>>> ; ^^^ >>>> (let*-values (((env stk) (es-values es)) >>>> ((first rest) (take n stk))) >>>> expr ...)))) >>>> >>>> ----- Original Message ----- From: "Michael Vanier" >>>> >>>> To: "mzscheme Mailing List" >>>> Sent: Saturday, June 07, 2008 11:17 AM >>>> Subject: [plt-scheme] macro question >>>> >>>> >>>>> I've run into a problem with a macro I don't know how to solve. >>>>> Here's the macro: >>>>> >>>>> (define-syntax get-stack-vals >>>>> (syntax-rules () >>>>> ((_ n (env first rest) expr ...) >>>>> (let*-values (((env stk) (es-values es)) >>>>> ((first rest) (take n stk))) >>>>> expr ...)))) >>>>> >>>>> Here's a use: >>>>> >>>>> (define (do-def es) >>>>> (get-stack-vals 2 (env first rest) >>>>> (let ((sym (cadr first)) >>>>> (val (car first))) >>>>> (if (symbol? sym) >>>>> (let ((env2 (env-add env sym val))) >>>>> (make-es env2 rest)) >>>>> (error "cannot define non-symbol: " sym))))) >>>>> >>>>> which should expand to: >>>>> >>>>> (define (do-def es) >>>>> (let*-values (((env stk) (es-values es)) >>>>> ((first rest) (take 2 stk))) >>>>> (let ((sym (cadr first)) >>>>> (val (car first))) >>>>> (if (symbol? sym) >>>>> (let ((env2 (env-add env sym val))) >>>>> (make-es env2 rest)) >>>>> (error "cannot define non-symbol: " sym))))) >>>>> >>>>> and apparently does, at least according to the macro stepper. >>>>> However, when I call do-def I get an error message: "reference to >>>>> undefined identifier: es". This seems odd, because es is in scope >>>>> at the macro expansion location. Is the es in the get-stack-vals >>>>> macro bound in the lexical scope of that macro? All the other >>>>> external identifiers in the macro are bound at the top-level, so it >>>>> works either way for them. If this is the case, how do I get es to >>>>> be bound the way I want it to be? I realize that I'm trying to do >>>>> something a bit naughty since I'm assuming a binding for es will >>>>> exist at all macro expansion locations; alternative suggestions are >>>>> welcome (other than "don't give up your day job"). >>>>> >>>>> I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro >>>>> system is an intricate and beautiful thing that I'm just beginning >>>>> to wrap my head around. >>>>> >>>>> Mike >>>>> >>>>> >>>>> _________________________________________________ >>>>> 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 mvanier at cs.caltech.edu Sat Jun 7 15:58:13 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:26 2009 Subject: [plt-scheme] macro question In-Reply-To: <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> References: <484A5236.6010605@cs.caltech.edu> <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> Message-ID: <484AE855.50401@cs.caltech.edu> I'm using 3.72[3m]; I didn't know that 4.0 was ready yet. I may not know what I'm doing, but when I hit the "macro stepper" button it expands the entire Scheme file form-by-form. When it gets to the get-stack-values macro calls it just expands them naively with no error messages. I don't know if this is a bug in 3.72 or if I'm not doing it right. Completely off-topic, I have to say that I am really keen on the idea of typed Scheme (which I haven't used yet, though I've read the paper). I found that about 90% of the bugs in my code were stupid type errors. Contracts would probably have helped a lot too. Mike Matthias Felleisen wrote: > > Michael, when I run the macro stepper (in 4.0), I get > >> expand: unbound variable in module >> es > > with high-lighting, exactly where I expected it. Same for RUN. > > Jos explained the why and the how to fix it. > > I'm surprised to hear that the macro stepper wouldn't show you this > error. What version are you using? What language? > > Thanks -- Matthias > > > > > On Jun 7, 2008, at 5:17 AM, Michael Vanier wrote: > >> I've run into a problem with a macro I don't know how to solve. >> Here's the macro: >> >> (define-syntax get-stack-vals >> (syntax-rules () >> ((_ n (env first rest) expr ...) >> (let*-values (((env stk) (es-values es)) >> ((first rest) (take n stk))) >> expr ...)))) >> >> Here's a use: >> >> (define (do-def es) >> (get-stack-vals 2 (env first rest) >> (let ((sym (cadr first)) >> (val (car first))) >> (if (symbol? sym) >> (let ((env2 (env-add env sym val))) >> (make-es env2 rest)) >> (error "cannot define non-symbol: " sym))))) >> >> which should expand to: >> >> (define (do-def es) >> (let*-values (((env stk) (es-values es)) >> ((first rest) (take 2 stk))) >> (let ((sym (cadr first)) >> (val (car first))) >> (if (symbol? sym) >> (let ((env2 (env-add env sym val))) >> (make-es env2 rest)) >> (error "cannot define non-symbol: " sym))))) >> >> and apparently does, at least according to the macro stepper. >> However, when I call do-def I get an error message: "reference to >> undefined identifier: es". This seems odd, because es is in scope at >> the macro expansion location. Is the es in the get-stack-vals macro >> bound in the lexical scope of that macro? All the other external >> identifiers in the macro are bound at the top-level, so it works >> either way for them. If this is the case, how do I get es to be bound >> the way I want it to be? I realize that I'm trying to do something a >> bit naughty since I'm assuming a binding for es will exist at all >> macro expansion locations; alternative suggestions are welcome (other >> than "don't give up your day job"). >> >> I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro system >> is an intricate and beautiful thing that I'm just beginning to wrap my >> head around. >> >> Mike >> >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From jos.koot at telefonica.net Sat Jun 7 16:47:00 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:26 2009 Subject: Fw: [plt-scheme] macro question Message-ID: <002d01c8c8df$a2560df0$2101a8c0@uw2b2dff239c4d> No, it is not a bug. I think you are programming at top level, where every variable that has no other binding is bound at top level. Your problem would have been exposed when programming in modules. Jos > > ----- Original Message ----- > From: "Michael Vanier" > To: "Matthias Felleisen" > Cc: "mzscheme Mailing List" > Sent: Saturday, June 07, 2008 9:58 PM > Subject: Re: [plt-scheme] macro question > > >> I'm using 3.72[3m]; I didn't know that 4.0 was ready yet. I may not know >> what I'm doing, but when I hit the "macro stepper" button it expands the >> entire Scheme file form-by-form. When it gets to the get-stack-values >> macro calls it just expands them naively with no error messages. I don't >> know if this is a bug in 3.72 or if I'm not doing it right. >> >> Completely off-topic, I have to say that I am really keen on the idea of >> typed Scheme (which I haven't used yet, though I've read the paper). I >> found that about 90% of the bugs in my code were stupid type errors. >> Contracts would probably have helped a lot too. >> >> Mike >> >> Matthias Felleisen wrote: >>> >>> Michael, when I run the macro stepper (in 4.0), I get >>> >>>> expand: unbound variable in module >>>> es >>> >>> with high-lighting, exactly where I expected it. Same for RUN. >>> >>> Jos explained the why and the how to fix it. >>> >>> I'm surprised to hear that the macro stepper wouldn't show you this >>> error. What version are you using? What language? >>> >>> Thanks -- Matthias >>> >>> >>> >>> >>> On Jun 7, 2008, at 5:17 AM, Michael Vanier wrote: >>> >>>> I've run into a problem with a macro I don't know how to solve. Here's >>>> the macro: >>>> >>>> (define-syntax get-stack-vals >>>> (syntax-rules () >>>> ((_ n (env first rest) expr ...) >>>> (let*-values (((env stk) (es-values es)) >>>> ((first rest) (take n stk))) >>>> expr ...)))) >>>> >>>> Here's a use: >>>> >>>> (define (do-def es) >>>> (get-stack-vals 2 (env first rest) >>>> (let ((sym (cadr first)) >>>> (val (car first))) >>>> (if (symbol? sym) >>>> (let ((env2 (env-add env sym val))) >>>> (make-es env2 rest)) >>>> (error "cannot define non-symbol: " sym))))) >>>> >>>> which should expand to: >>>> >>>> (define (do-def es) >>>> (let*-values (((env stk) (es-values es)) >>>> ((first rest) (take 2 stk))) >>>> (let ((sym (cadr first)) >>>> (val (car first))) >>>> (if (symbol? sym) >>>> (let ((env2 (env-add env sym val))) >>>> (make-es env2 rest)) >>>> (error "cannot define non-symbol: " sym))))) >>>> >>>> and apparently does, at least according to the macro stepper. However, >>>> when I call do-def I get an error message: "reference to undefined >>>> identifier: es". This seems odd, because es is in scope at the macro >>>> expansion location. Is the es in the get-stack-vals macro bound in the >>>> lexical scope of that macro? All the other external identifiers in the >>>> macro are bound at the top-level, so it works either way for them. If >>>> this is the case, how do I get es to be bound the way I want it to be? >>>> I realize that I'm trying to do something a bit naughty since I'm >>>> assuming a binding for es will exist at all macro expansion locations; >>>> alternative suggestions are welcome (other than "don't give up your day >>>> job"). >>>> >>>> I'm a macro newbie, so please be gentle ;-) PLT Scheme's macro system >>>> is an intricate and beautiful thing that I'm just beginning to wrap my >>>> head around. >>>> >>>> Mike >>>> >>>> >>>> _________________________________________________ >>>> 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 jos.koot at telefonica.net Sat Jun 7 17:12:09 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:26 2009 Subject: Fw: [plt-scheme] macro question Message-ID: <004001c8c8e3$26307360$2101a8c0@uw2b2dff239c4d> For good understanding: I am not a member of the PLT team. Unintentionally I may have eroused that impressionn. But I am a great fan on PLT for sure. Jos From matthias at ccs.neu.edu Sat Jun 7 20:01:33 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:26 2009 Subject: [plt-scheme] macro question In-Reply-To: <484AE855.50401@cs.caltech.edu> References: <484A5236.6010605@cs.caltech.edu> <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> <484AE855.50401@cs.caltech.edu> Message-ID: <79FB66D6-C49C-4B71-AA0B-CC2CED325D3D@ccs.neu.edu> On Jun 7, 2008, at 3:58 PM, Michael Vanier wrote: > Completely off-topic, I have to say that I am really keen on the > idea of typed Scheme (which I haven't used yet, though I've read > the paper). I found that about 90% of the bugs in my code were > stupid type errors. Contracts would probably have helped a lot too. 1. Typed Scheme will be released as a part of 4.0 so you can play with it as you wish. 2. I consider it a nothing but an unfounded rumor that significant errors are discovered with type systems. I wouldn't conduct this research if finding typo-level errors were the only benefit of types. Basic unit testing exposes even more of these typo-level bugs, plus some significant ones. -- Matthias From mvanier at cs.caltech.edu Sat Jun 7 20:10:44 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:26 2009 Subject: [plt-scheme] macro question In-Reply-To: <79FB66D6-C49C-4B71-AA0B-CC2CED325D3D@ccs.neu.edu> References: <484A5236.6010605@cs.caltech.edu> <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> <484AE855.50401@cs.caltech.edu> <79FB66D6-C49C-4B71-AA0B-CC2CED325D3D@ccs.neu.edu> Message-ID: <484B2384.1010202@cs.caltech.edu> Your statement is confusing. Are you conducting research on typed Scheme to provide evidence for the thus-far unfounded rumor that significant errors are discovered with type systems? I wouldn't knock the importance of typo-level bugs, even if they aren't sexy or good research fodder. Having tools that can automatically pick them out (as opposed to having to write unit tests for this) is very convenient. Then unit tests can be used to check more significant logical properties of code. Of course, very sophisticated type systems may have that property too. Mike Matthias Felleisen wrote: > > On Jun 7, 2008, at 3:58 PM, Michael Vanier wrote: > >> Completely off-topic, I have to say that I am really keen on the idea >> of typed Scheme (which I haven't used yet, though I've read the >> paper). I found that about 90% of the bugs in my code were stupid >> type errors. Contracts would probably have helped a lot too. > > 1. Typed Scheme will be released as a part of 4.0 so you can play with > it as you wish. > > 2. I consider it a nothing but an unfounded rumor that significant > errors are discovered with type systems. I wouldn't conduct this > research if finding typo-level errors were the only benefit of types. > Basic unit testing exposes even more of these typo-level bugs, plus some > significant ones. > > -- Matthias > From constant.beta at gmail.com Sun Jun 8 06:31:15 2008 From: constant.beta at gmail.com (Michal Kwiatkowski) Date: Thu Mar 26 02:19:27 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: References: Message-ID: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> Tom Schouten wrote: > I was wondering if there are people interested in starting a PLT > Scheme group on LinkedIn (if there isn't one already.. search seems to > not be implemented, and I can't find it with google). Hi Tom, I'm interested and I haven't seen a PLT group on LinkedIn either. Cheers, mk From grettke at acm.org Sun Jun 8 07:01:27 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:19:27 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> Message-ID: <756daca50806080401x7e2c38a4x70054fa17ff9938@mail.gmail.com> > I was wondering if there are people interested in starting a PLT > Scheme group on LinkedIn How do/would people normally use LinkedIn for such a group? From tom at zwizwa.be Sun Jun 8 07:45:11 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:27 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <756daca50806080401x7e2c38a4x70054fa17ff9938@mail.gmail.com> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <756daca50806080401x7e2c38a4x70054fa17ff9938@mail.gmail.com> Message-ID: <20080608114511.GA18409@zzz.i> On Sun, Jun 08, 2008 at 06:01:27PM +0700, Grant Rettke wrote: > > I was wondering if there are people interested in starting a PLT > > Scheme group on LinkedIn > > How do/would people normally use LinkedIn for such a group? LinkedIn is mainly a pool of professional resumes organized in a social graph of person-to-person connections. It gives you access to a local view in this network, up to 3 hops at least in my account. A group provides a more general way to connect yourself to people other than person-to-person links, and can be used to filter searches in your personal network. One could use this for example to build professional relationships related to a certain topic without having to spam a public list with messages like "Hey I'm looking for a job, and by the way I know PLT Scheme." But there are other uses too I bet. Tom From neil at neilvandyke.org Sun Jun 8 07:58:44 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:19:27 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> Message-ID: <484BC974.8090405@neilvandyke.org> A "PLT Scheme Users" group on LinkedIn seems like an OK idea to me. LinkedIn is the only social networking site I'm willing to be on. Creating and administering a LinkedIn group looks easy. I almost created it myself just now, then decided that an official PLT person might be a better impresario. (I'm having flashbacks to when the "scheme.org" domain name was controlled by a person who dropped off the face of the planet.) -- http://www.neilvandyke.org/ From tom at zwizwa.be Sun Jun 8 08:19:13 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:27 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <484BC974.8090405@neilvandyke.org> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <484BC974.8090405@neilvandyke.org> Message-ID: <20080608121913.GA7846@zzz.i> On Sun, Jun 08, 2008 at 07:58:44AM -0400, Neil Van Dyke wrote: > A "PLT Scheme Users" group on LinkedIn seems like an OK idea to me. > LinkedIn is the only social networking site I'm willing to be on. > > Creating and administering a LinkedIn group looks easy. I almost > created it myself just now, then decided that an official PLT person > might be a better impresario. > > (I'm having flashbacks to when the "scheme.org" domain name was > controlled by a person who dropped off the face of the planet.) > Good point. Unfortunately I didn't think that far ahead and already created the group, which is now pending approval. I'm of course more than happy to transfer administration to an offical PLT member. I used the lambda logo in collects/icons/PLT-206.png and the short decription from the main website, which is set as the home page. From samth at ccs.neu.edu Sun Jun 8 08:56:18 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:19:27 2009 Subject: [plt-scheme] macro question In-Reply-To: <484B2384.1010202@cs.caltech.edu> References: <484A5236.6010605@cs.caltech.edu> <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> <484AE855.50401@cs.caltech.edu> <79FB66D6-C49C-4B71-AA0B-CC2CED325D3D@ccs.neu.edu> <484B2384.1010202@cs.caltech.edu> Message-ID: <63bb19ae0806080556x6a2d546bw1f2cbead2cdad5a1@mail.gmail.com> I would describe three kinds of benefits, potentially, from a type system: 1 - finding stupid mistakes. As Benjamin Pierce recently put it, this is a consequence of trying to prove basically any non-trivial theorem about your program, no matter what it is. 2 - finding more complicated mistakes, that is, encoding your invariants in the type system. This is hard, and might be rewarding, but not our research area. 3 - maintainability. When you look at a function, or a datastructure, you immediately know something about how it works, and when you perform maintenance in one place, you're prevented from screwing things up in other places. For Typed Scheme, we've focused mainly on benefit 3. Certainly you also get benefit 1 from Typed Scheme, as from any type system, but as Matthias said, that isn't why we've developed it. sam th samth@ccs.neu.edu On Sat, Jun 7, 2008 at 8:10 PM, Michael Vanier wrote: > Your statement is confusing. Are you conducting research on typed Scheme to > provide evidence for the thus-far unfounded rumor that significant errors > are discovered with type systems? > > I wouldn't knock the importance of typo-level bugs, even if they aren't sexy > or good research fodder. Having tools that can automatically pick them out > (as opposed to having to write unit tests for this) is very convenient. > Then unit tests can be used to check more significant logical properties of > code. Of course, very sophisticated type systems may have that property > too. > > Mike > > Matthias Felleisen wrote: >> >> On Jun 7, 2008, at 3:58 PM, Michael Vanier wrote: >> >>> Completely off-topic, I have to say that I am really keen on the idea of >>> typed Scheme (which I haven't used yet, though I've read the paper). I >>> found that about 90% of the bugs in my code were stupid type errors. >>> Contracts would probably have helped a lot too. >> >> 1. Typed Scheme will be released as a part of 4.0 so you can play with it >> as you wish. >> >> 2. I consider it a nothing but an unfounded rumor that significant errors >> are discovered with type systems. I wouldn't conduct this research if >> finding typo-level errors were the only benefit of types. Basic unit testing >> exposes even more of these typo-level bugs, plus some significant ones. >> >> -- Matthias >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From grettke at acm.org Sun Jun 8 10:32:47 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:19:28 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <20080608114511.GA18409@zzz.i> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <756daca50806080401x7e2c38a4x70054fa17ff9938@mail.gmail.com> <20080608114511.GA18409@zzz.i> Message-ID: <756daca50806080732t7e6271d0n5d0be09657ce0015@mail.gmail.com> > A group provides a more general way to connect yourself to people other than > person-to-person links, and can be used to filter searches in your personal > network. Sounds good. From grettke at acm.org Sun Jun 8 10:33:43 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:19:28 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <484BC974.8090405@neilvandyke.org> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <484BC974.8090405@neilvandyke.org> Message-ID: <756daca50806080733i28335cc2j4dded73d5b7ef8b1@mail.gmail.com> > (I'm having flashbacks to when the "scheme.org" domain name was controlled > by a person who dropped off the face of the planet.) What happened? From plragde at uwaterloo.ca Sun Jun 8 11:50:24 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:19:28 2009 Subject: [plt-scheme] macro question In-Reply-To: <63bb19ae0806080556x6a2d546bw1f2cbead2cdad5a1@mail.gmail.com> Message-ID: <484BFFC0.3000005@uwaterloo.ca> Sam TH wrote: > 3 - maintainability. When you look at a function, or a datastructure, > you immediately know something about how it works, and when you > perform maintenance in one place, you're prevented from screwing > things up in other places. > > For Typed Scheme, we've focused mainly on benefit 3. How do contracts fit into this view? Are they an alternative, orthogonal, or do both types and contracts need further development in order to be used effectively in tandem? (My knowledge of type theory is only at about the senior undergraduate level at this point, and I haven't looked seriously at PLT contracts yet.) Thanks. --PR From eli at barzilay.org Sun Jun 8 12:51:35 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:28 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <756daca50806080733i28335cc2j4dded73d5b7ef8b1@mail.gmail.com> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <484BC974.8090405@neilvandyke.org> <756daca50806080733i28335cc2j4dded73d5b7ef8b1@mail.gmail.com> Message-ID: <18508.3607.264909.474000@arabic.ccs.neu.edu> On Jun 8, Grant Rettke wrote: > > (I'm having flashbacks to when the "scheme.org" domain name was controlled > > by a person who dropped off the face of the planet.) > > What happened? The name was (and still is) registered by someone who used Scheme in the past -- contacting him and convincing him that it'll be used for all Scheme implementations was difficult. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Sun Jun 8 12:53:11 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:28 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <20080608121913.GA7846@zzz.i> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <484BC974.8090405@neilvandyke.org> <20080608121913.GA7846@zzz.i> Message-ID: <18508.3703.294593.49716@arabic.ccs.neu.edu> On Jun 8, Tom Schouten wrote: > On Sun, Jun 08, 2008 at 07:58:44AM -0400, Neil Van Dyke wrote: > > A "PLT Scheme Users" group on LinkedIn seems like an OK idea to me. > > LinkedIn is the only social networking site I'm willing to be on. > > > > Creating and administering a LinkedIn group looks easy. I almost > > created it myself just now, then decided that an official PLT person > > might be a better impresario. > > > > (I'm having flashbacks to when the "scheme.org" domain name was > > controlled by a person who dropped off the face of the planet.) > > Good point. > > Unfortunately I didn't think that far ahead and already created the > group, which is now pending approval. I'm of course more than happy > to transfer administration to an offical PLT member. > > I used the lambda logo in collects/icons/PLT-206.png and the short > decription from the main website, which is set as the home page. Ugh, I should have read more emails and see this... I kept getting an error about the "PLT Scheme" group name not being available. In any case, I don't see any way to see the group that you created, or do anything with it... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From matthias at ccs.neu.edu Sun Jun 8 12:54:29 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:28 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <20080608121913.GA7846@zzz.i> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <484BC974.8090405@neilvandyke.org> <20080608121913.GA7846@zzz.i> Message-ID: <0F735CB9-3419-47BC-90BF-7460637D4B2A@ccs.neu.edu> By all means, manage the group. If you do 'retire', recruit a successor. Thanks! -- Matthias On Jun 8, 2008, at 8:19 AM, Tom Schouten wrote: > On Sun, Jun 08, 2008 at 07:58:44AM -0400, Neil Van Dyke wrote: >> A "PLT Scheme Users" group on LinkedIn seems like an OK idea to me. >> LinkedIn is the only social networking site I'm willing to be on. >> >> Creating and administering a LinkedIn group looks easy. I almost >> created it myself just now, then decided that an official PLT person >> might be a better impresario. >> >> (I'm having flashbacks to when the "scheme.org" domain name was >> controlled by a person who dropped off the face of the planet.) >> > > Good point. > > Unfortunately I didn't think that far ahead and already created the > group, > which is now pending approval. I'm of course more than happy to > transfer > administration to an offical PLT member. > > I used the lambda logo in collects/icons/PLT-206.png and the short > decription from the main website, which is set as the home page. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From tom at zwizwa.be Sun Jun 8 13:42:43 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:29 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <18508.3703.294593.49716@arabic.ccs.neu.edu> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <484BC974.8090405@neilvandyke.org> <20080608121913.GA7846@zzz.i> <18508.3703.294593.49716@arabic.ccs.neu.edu> Message-ID: <20080608174243.GA2216@zzz.i> > In any case, I don't see any way to see the group that you created, or > do anything with it... It still needs to go through some approval process. I should hear about it in 1-2 work days. I'll post a link to it if there turns out to be something that's linkable externally, otherwise it's probably easiest to click on it from my profile. Seems the group feature is not implemented fully.. From filcab at gmail.com Sun Jun 8 15:35:09 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:19:29 2009 Subject: [plt-scheme] macro question In-Reply-To: <79FB66D6-C49C-4B71-AA0B-CC2CED325D3D@ccs.neu.edu> References: <484A5236.6010605@cs.caltech.edu> <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> <484AE855.50401@cs.caltech.edu> <79FB66D6-C49C-4B71-AA0B-CC2CED325D3D@ccs.neu.edu> Message-ID: <1D50E76D-5D52-4533-BA01-E6CDB039C11F@gmail.com> Hi, Does the compiler use the types to produce more efficient code? Or are the types used just for maintainability purposes? Also: does the compiler make any kind of type inferencing on user defined functions to optimize the compiled code or does it just optimize stuff that it already knew about and inline functions/ propagate results where it knew it could without analyzing user code? I would assume it can optimize user code but I'd like to know some more details. s/compiler/JIT/g if it's appropriate. - Filipe Cabecinhas From matthias at ccs.neu.edu Sun Jun 8 16:01:02 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:29 2009 Subject: [plt-scheme] macro question In-Reply-To: <484BFFC0.3000005@uwaterloo.ca> References: <484BFFC0.3000005@uwaterloo.ca> Message-ID: <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> On Jun 8, 2008, at 11:50 AM, Prabhakar Ragde wrote: > How do contracts fit into this view? I am giving two answers because I am not sure what the question aims at: Technically: Typed Scheme and Scheme modules may export to and import from each other. In order to make such interaction safe (type soundness), programmers must specify contracts at the boundaries of typed modules. These modules must be strong enough to enable the type checker to prove the correctness of the specified types. (In our original theory, we had design an automatic synthesis and we may still implement something along those lines.) We have not yet integrated the type system with the contract system. In other words, you cannot supplement typed exports with contracts yet. Future work. ;; --- Pedagogically: Types in TS play the role of contracts in HtDP. All programs could be assigned types, and the type checker should 'bless' them all. In the long run, I am considering using Typed Scheme for the introduction of types into the HtD curriculum. Some unnamed schools switch to ML for this purpose, but I think type inference gets in the way of understanding the power of a rich type language. (Having said that, TS supports 'local' type inference and we may develop tools based on past soft typing work (inference via HM or SBA) to help programmers port untyped modules into the typed world.) -- Matthias > Are they an alternative, orthogonal, or do both types and contracts > need further development in order to be used effectively in tandem? > (My knowledge of type theory is only at about the senior > undergraduate level at this point, and I haven't looked seriously > at PLT contracts yet.) From matthias at ccs.neu.edu Sun Jun 8 16:02:30 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:29 2009 Subject: [plt-scheme] macro question In-Reply-To: <1D50E76D-5D52-4533-BA01-E6CDB039C11F@gmail.com> References: <484A5236.6010605@cs.caltech.edu> <3EB859D2-5EB7-451C-8C96-AAB4380137F6@ccs.neu.edu> <484AE855.50401@cs.caltech.edu> <79FB66D6-C49C-4B71-AA0B-CC2CED325D3D@ccs.neu.edu> <1D50E76D-5D52-4533-BA01-E6CDB039C11F@gmail.com> Message-ID: <2A06E215-CD9B-4991-ACCD-7AE7313B2DB0@ccs.neu.edu> On Jun 8, 2008, at 3:35 PM, Filipe Cabecinhas wrote: > Does the compiler use the types to produce more efficient code? Not yet. Future work. (And always keeping the system sound.) > Or are the types used just for maintainability purposes? For now, yes. > As for inference, see previous message to PR: it's local only. ;; --- The type system is implemented via macros. -- Matthias > Also: does the compiler make any kind of type inferencing on user > defined functions to optimize the compiled code or does it just > optimize stuff that it already knew about and inline functions/ > propagate results where it knew it could without analyzing user code? > > I would assume it can optimize user code but I'd like to know some > more details. > > s/compiler/JIT/g if it's appropriate. > > - Filipe Cabecinhas > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From deinst at gmail.com Sun Jun 8 16:25:37 2008 From: deinst at gmail.com (David Einstein) Date: Thu Mar 26 02:19:30 2009 Subject: [plt-scheme] How do optional parameters work Message-ID: <56750b780806081325q2805e33frb56f7c730b4f041c@mail.gmail.com> If I enter the following module into DrScheme, version 3.99.0.26-svn6jun2008 (self compiled on a ubuntu zmd64 (module language) #lang scheme (provide foo) (define (foo a #:optional (b #f)) #t) and hit check syntax I get an internal error path->complete-path: expects argument of type ; given |expanded module| and Dr scheme is in a confused state with nothing showing up in the definitions window (it does not want to look at my code, and so it assumes that I don't either) I'm not sure whether I am screwed up, or this is a bug. Probably both. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080608/7a5c492d/attachment.html From jos.koot at telefonica.net Sun Jun 8 16:32:34 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:31 2009 Subject: [plt-scheme] How do optional parameters work References: <56750b780806081325q2805e33frb56f7c730b4f041c@mail.gmail.com> Message-ID: <001701c8c9a6$c934e460$2101a8c0@uw2b2dff239c4d> Has been solved. With thanks to Matthew Flatt (and PLT in general) See http://bugs.plt-scheme.org/query/?cmd=view&pr=9466 Jos ----- Original Message ----- From: David Einstein To: PLT Scheme Mailing List Sent: Sunday, June 08, 2008 10:25 PM Subject: [plt-scheme] How do optional parameters work If I enter the following module into DrScheme, version 3.99.0.26-svn6jun2008 (self compiled on a ubuntu zmd64 (module language) #lang scheme (provide foo) (define (foo a #:optional (b #f)) #t) and hit check syntax I get an internal error path->complete-path: expects argument of type ; given |expanded module| and Dr scheme is in a confused state with nothing showing up in the definitions window (it does not want to look at my code, and so it assumes that I don't either) I'm not sure whether I am screwed up, or this is a bug. Probably both. ------------------------------------------------------------------------------ _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080608/281bbd58/attachment.htm From mike at sharedlogic.ca Sun Jun 8 17:50:26 2008 From: mike at sharedlogic.ca (Michael Forster) Date: Thu Mar 26 02:19:31 2009 Subject: [plt-scheme] eval, modules, namespaces, servlet ... um help? Message-ID: Hi, I'm in a bit of pickle. Any help would be greatly appreciated. I've written a REL.SS module that maintains a database by serializing/deserializing database transactions to/from disk (using PLT's SERIALIZE.SS). A transaction is a list of a symbol naming the database update procedure followed by the name of the table to update and some update-specific args. For example, as serialized to disk: (0 () 0 () () (c! tx-delete/by-key c! customer-contact c! (c! contact-no c! 13))) (0 () 0 () () (c! tx-delete/all c! customer-contact c! ())) In REL.SS (shown below), to reload a database, I first read and deserialize the transactions from disk, then I evaluate the car of each resulting list to obtain the update procedure, and then I call that procedure on the database table and update arguments (also from the list). Basically, I replay the transactions. In SERVLET.SS (shown below), I have written a servlet (using INSTASERVLET.SS, slightly hacked to work with v372) that queries the user for customer data and inserts the data into the customer database table using execute-transaction and tx-insert from REL.SS. If I open up and run SERVLET.SS in DrScheme, then type (go! servlet) the servlet loads okay, and I can fill out the customer entry form, but when I submit it, the call to execute-transaction fails with the following message: rel.ss::50317: Servlet exception: reference to undefined identifier: tx-insert My understanding is that the eval call in REL.SS below can't identify the tx-insert procedure in the 'current namespace', even though tx-insert is defined in the same module where the eval call takes place. However, if I open up and run SERVLET.SS in DrScheme, then type (require "model.ss" "rel.ss" "instaservlet.ss" "obo-ems-insta.ss") (execute-transaction db 'tx-insert 'customer (list (make-tuple ...))) it works. Clearly, tx-insert can be identified in the 'current namespace' in this case, and it seems to me that the namespace is different than the when running the servlet. So, what namespace or environment do I pass to eval to make this work? Or do I need to configure instaservlet to load/require REL.SS? I've looked at http://schemecookbook.org/Cookbook/DynamicEvalCustomNamespace, but I'm stabbing in the dark at this point, and I sure could use a flashlight. Thanks in advance for any help! -Mike ;; REL.SS (module rel mzscheme (require ...) (provide ... tx-insert execute-transaction ...) (define tx-insert (lambda (r arglist) ...) (define execute-transaction (lambda (db proc-name relvar-name arglist) (let ((r ((eval proc-name) (hash-table-get (database-relvars db) relvar-name) arglist))) ...))) ;; SERVLET.SS #lang mzscheme (require ... "rel.ss" "instaservlet.ss" ...) (define db (make-database ...)) (define create/customer (lambda () (let ((results (query/form ...))) (if results (execute-transaction db 'tx-insert 'customer (list (make-tuple results))) #f)))) (define servlet (lambda (initial-request) (create/customer))) From plragde at uwaterloo.ca Sun Jun 8 18:01:14 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:19:31 2009 Subject: [plt-scheme] macro question In-Reply-To: <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> Message-ID: <484C56AA.4090600@uwaterloo.ca> Matthias Felleisen wrote: >> How do contracts fit into this view? > > I am giving two answers because I am not sure what the question aims at: Thanks, Matthias. My question was aiming on the technical side, but the pedagogical side is also intriguing. Understanding the error messages that result when HM-style type inference fails (at least in my limited experience with SML and GHC) seems to me to be the largest barrier to moving freshmen or sophomores from HtDP into a statically-typed environment with a sensible type system. --PR From andre.mayers at usherbrooke.ca Sun Jun 8 18:06:39 2008 From: andre.mayers at usherbrooke.ca (Andre Mayers) Date: Thu Mar 26 02:19:32 2009 Subject: [plt-scheme] problem with check syntax : was "How do optional parameters work" In-Reply-To: <56750b780806081325q2805e33frb56f7c730b4f041c@mail.gmail.com> References: <56750b780806081325q2805e33frb56f7c730b4f041c@mail.gmail.com> Message-ID: <000c01c8c9b3$eddad650$c99082f0$@mayers@usherbrooke.ca> I have exactly the same error with vista 64 bits with any programs in module language path->complete-path: expects argument of type ; given |expanded module| === context === C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\setup\path-relativize.ss:36:2: path->main-relative* C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\basic.ss:103:0: module-path-index->taglet C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\search.ss:60:9: loop C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\xref.ss:89:2: xref-binding-tag C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\xref.ss:119:0: xref-binding->definition-tag C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:2474:4: document-variable C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1773:30 C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1736:4: annotate-variables C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1182:38 C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1179:35 De : plt-scheme-bounces@list.cs.brown.edu [mailto:plt-scheme-bounces@list.cs.brown.edu] De la part de David Einstein Envoy? : June-08-08 4:26 PM ? : PLT Scheme Mailing List Objet : [plt-scheme] How do optional parameters work If I enter the following module into DrScheme, version 3.99.0.26-svn6jun2008 (self compiled on a ubuntu zmd64 (module language) #lang scheme (provide foo) (define (foo a #:optional (b #f)) #t) and hit check syntax I get an internal error path->complete-path: expects argument of type ; given |expanded module| and Dr scheme is in a confused state with nothing showing up in the definitions window (it does not want to look at my code, and so it assumes that I don't either) I'm not sure whether I am screwed up, or this is a bug. Probably both. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080608/7df7a28c/attachment.html From matthias at ccs.neu.edu Sun Jun 8 19:29:28 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:32 2009 Subject: [plt-scheme] macro question In-Reply-To: <484C56AA.4090600@uwaterloo.ca> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <484C56AA.4090600@uwaterloo.ca> Message-ID: On Jun 8, 2008, at 6:01 PM, Prabhakar Ragde wrote: > Matthias Felleisen wrote: > >>> How do contracts fit into this view? >> I am giving two answers because I am not sure what the question >> aims at: > > Thanks, Matthias. My question was aiming on the technical side, but > the pedagogical side is also intriguing. Understanding the error > messages that result when HM-style type inference fails (at least > in my limited experience with SML and GHC) seems to me to be the > largest barrier to moving freshmen or sophomores from HtDP into a > statically-typed environment with a sensible type system. The XML work (Harper/Mitchell) and Cardelli's tech rpts from around the same time makes one thing pretty clear: type inference is a tool, types are what matters. In this spirit, your statement is wrong because we can easily avoid type inference in Typed Scheme _and_ move freshmen to a fairly sophisticated type system in the first year. Indeed, Typed Scheme's type system is somewhat more sophisticated than ML's, with (for example) first-class polymorphic functions, which ML doesn't have. So what's the real problem with type systems? A type system is a theorem checker. When type systems get complicated (allow the statement of complex thoughts about programs), they tend to include some fair amount of local (not HM) inference so that programmers don't have to spell out every single detail of thee complex claims. BUT, when then the theorem checker becomes a theorem prover, and we don't understand to this day, how to inform people why theorem provers failed and how to restate the theorem and its lemmas in order to get the proof through. However, I consider this problem secondary in the context of Typed Scheme because we can always state types and get the checker to report reasonable precise failure messages. I would never ever use HM type inference (with SML's mechanism) on freshmen. That's torture. -- Matthias From notnorwegian at yahoo.se Sun Jun 8 19:46:52 2008 From: notnorwegian at yahoo.se (not norwegian swede) Date: Thu Mar 26 02:19:33 2009 Subject: [plt-scheme] unsubscribing? Message-ID: <923087.76504.qm@web27904.mail.ukl.yahoo.com> how do i unsubscribe from the mailing list? __________________________________________________________ G?r det l?ngsamt? Skaffa dig en snabbare bredbandsuppkoppling. S?k och j?mf?r hos Yahoo! Shopping. http://shopping.yahoo.se/c-100015813-bredband.html?partnerId=96914325 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080608/f04327f5/attachment.htm From robby at cs.uchicago.edu Sun Jun 8 19:48:26 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:19:33 2009 Subject: [plt-scheme] unsubscribing? In-Reply-To: <923087.76504.qm@web27904.mail.ukl.yahoo.com> References: <923087.76504.qm@web27904.mail.ukl.yahoo.com> Message-ID: <932b2f1f0806081648q6c56d408iac8b13896a220800@mail.gmail.com> Follow the link at the bottom of any message on the list. Robby 2008/6/8 not norwegian swede : > how do i unsubscribe from the mailing list? > > ________________________________ > L?na pengar utan s?kerhet. > S?k och j?mf?r hos Yahoo! Shopping. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From jos.koot at telefonica.net Mon Jun 9 04:23:17 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:34 2009 Subject: [plt-scheme] problem with check syntax : was "How do optionalparameters work" References: <56750b780806081325q2805e33frb56f7c730b4f041c@mail.gmail.com> <000c01c8c9b3$eddad650$c99082f0$@mayers@usherbrooke.ca> Message-ID: <003601c8ca0a$120ffae0$2101a8c0@uw2b2dff239c4d> I already mailed on the PLT list that the PLT team has already solved this problem. Load the newest nightly build (june 8) I did download it and Check Syntax works great and fast. I am not a PLT man, but a user. Long ago Matthias Felleisen once reprimanded me that errors should be reported by filing a bug report (after checking whether or not the error was already filed by someone else) The archive is easily found at http://www.plt-scheme.org/support.html Filing a bug report is easy from the help menu in DrScheme. Jos Has been solved. With thanks to Matthew Flatt (and PLT in general) See http://bugs.plt-scheme.org/query/?cmd=view&pr=9466 Jos ----- Original Message ----- ----- Original Message ----- From: Andre Mayers To: 'PLT Scheme Mailing List' Sent: Monday, June 09, 2008 12:06 AM Subject: [plt-scheme] problem with check syntax : was "How do optionalparameters work" I have exactly the same error with vista 64 bits with any programs in module language path->complete-path: expects argument of type ; given |expanded module| === context === C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\setup\path-relativize.ss:36:2: path->main-relative* C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\basic.ss:103:0: module-path-index->taglet C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\search.ss:60:9: loop C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\xref.ss:89:2: xref-binding-tag C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\scribble\xref.ss:119:0: xref-binding->definition-tag C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:2474:4: document-variable C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1773:30 C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1736:4: annotate-variables C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1182:38 C:\Program Files (x86)\PLT-FULL-3.99.0.26\collects\drscheme\syncheck.ss:1179:35 De : plt-scheme-bounces@list.cs.brown.edu [mailto:plt-scheme-bounces@list.cs.brown.edu] De la part de David Einstein Envoy? : June-08-08 4:26 PM ? : PLT Scheme Mailing List Objet : [plt-scheme] How do optional parameters work If I enter the following module into DrScheme, version 3.99.0.26-svn6jun2008 (self compiled on a ubuntu zmd64 (module language) #lang scheme (provide foo) (define (foo a #:optional (b #f)) #t) and hit check syntax I get an internal error path->complete-path: expects argument of type ; given |expanded module| and Dr scheme is in a confused state with nothing showing up in the definitions window (it does not want to look at my code, and so it assumes that I don't either) I'm not sure whether I am screwed up, or this is a bug. Probably both. ------------------------------------------------------------------------------ _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080609/53dc11cd/attachment.html From noelwelsh at gmail.com Mon Jun 9 11:07:46 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:19:34 2009 Subject: [plt-scheme] Preferred exception structure to inherit: exn or exn:fail? In-Reply-To: References: Message-ID: Our current practice is to extend exn:fail but old code may still extend exn directly -- because we haven't updated it due to oversight or laziness. I imagine it's the same situation in HtDP code. N. On Fri, Jun 6, 2008 at 8:10 PM, Danny Yoo wrote: > I've always assumed that new exception structures should try to extend the > exn:fail structure, but every so often, I see error structures that extend > the base 'exn' type. ... > > and was a little surprised to see otherwise. Is there a reason for > preferring one vs the other? From matthias at ccs.neu.edu Mon Jun 9 11:30:03 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:34 2009 Subject: [plt-scheme] meta-topic: responding on plt-scheme References: <001101c8ca45$0b86d8c0$2101a8c0@uw2b2dff239c4d> Message-ID: Someone wrote: > Sometimes I cannot refrain from answering questions posted on the > PLT list. Of course I do not respond when not being asbsolutely > sure about being correct. Nevertheless I wonder what you and and > more generallay the PLT team as a whole think about a user like me > answering questions of other users. I am not sure which etiquette > is in charge in this respect. Just in case others are wondering, I am answering in public. BY ALL MEANS, respond! Quick responses to questions are the whole point of a mailing list. Even a partially correct answer is useful to the questioner AND the core team. We can tell from such partial answers where we need to improve docs, the language, the environment, the tools, etc. Thanks to everyone who answers questions on plt-scheme. If I had rewards, I'd assign reward points, just like airlines. (Of course those are useless too these days.) Since I don't, a heartfelt 'thank you' to everyone. -- Matthias From tom at zwizwa.be Mon Jun 9 12:11:21 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:34 2009 Subject: [plt-scheme] LinkedIn (group activated) In-Reply-To: References: Message-ID: <20080609161121.GA5027@zzz.i> Hello, The LinkedIn group is activated. The ID is 119028 and the name is "PLT Scheme". To join, follow this link: http://www.linkedin.com/search?search=&sortCriteria=3&groupFilter=119028 Then click on the profile of a group member and request to join the group from that page. Happy networking, Tom From spdegabrielle at gmail.com Mon Jun 9 14:13:59 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:19:35 2009 Subject: [plt-scheme] updating demo using SGL is teapot.ss, a rendering of the Newell Teapot. Message-ID: <595b9ab20806091113r615cde93n809474647c8c00a7@mail.gmail.com> Hi, I've been fiddling with the opengl stuff and have got teapost.ss [http://www.neilvandyke.org/opengl-plt/] going. I'm still getting an error, and I'm not sure what I'm doing wrong?; [ladybird-bug] Scheme->C: expects argument of type ; given false I'd appreciate any hints. I've attached my conversion of the code, and here is the offending snip; -- (unless teapot-dl (set! teapot-dl (glGenLists 1)) (printf "teapot-dl:~V~N" teapot-dl) (glNewList teapot-dl GL_COMPILE) (teapot 24 0.6 GL_FILL) (gl-end-list))))) (define/override (on-paint) (with-gl-context (lambda () (gl-clear-color 0.0 0.0 0.0 0.0) (gl-clear 'color-buffer-bit 'depth-buffer-bit) (gl-push-matrix) (glRotatef view-rotx 1.0 0.0 0.0) (glRotatef view-roty 0.0 1.0 0.0) (glRotatef view-rotz 0.0 0.0 1.0) (glCallList teapot-dl) ;;; error happens here (gl-pop-matrix) -- [I hope it's ok to mix C and Scheme-style! sgl code- it seems to work] 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 -------------- A non-text attachment was scrubbed... Name: teapot.scm Type: application/octet-stream Size: 11438 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080609/8dbe1927/teapot.obj From pivanyi at freemail.hu Mon Jun 9 15:15:43 2008 From: pivanyi at freemail.hu (Ivanyi Peter) Date: Thu Mar 26 02:19:35 2009 Subject: [plt-scheme] updating demo using SGL is teapot.ss, a ren In-Reply-To: <595b9ab20806091113r615cde93n809474647c8c00a7@mail.gmail.com> Message-ID: Stephen De Gabrielle ?rta: > [ladybird-bug] Scheme->C: expects argument of type ; given false Hi, The problem is (I think) that there is no guarantee that the on-size event will occur before the on-paint event. So when the on-paint event occurs first, the teapot-dl is not yet initialized. In my view you should put the display list compilation into the on-paint event. Best regards, Peter Ivanyi ________________________________________________________ Te m?r megn?zted, hogy diszlexi?sak-e a gyerekeid? Tal?ltam egy sz?l?knek sz?l? diszlexiatesztet, amit egy perc alatt kit?lthetsz. A legjobb, hogy ha gond van, akkor abban is seg?tenek, hogy kihez fordulj. Ja, ?s ez egy ingyenes oldal, nem ker?l semmibe. Kattints ide: www.diszlexiateszt.hu/i.php?id=fr080609 From cr-service at hotmail.it Mon Jun 9 16:27:14 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:35 2009 Subject: [plt-scheme] solution for exercise 11.2.4 Message-ID: hi i have problem with this exercise. can you help me? _________________________________________________________________ Una cena tra amici? Cerca il ristorante con Live Search Maps http://maps.live.it From constant.beta at gmail.com Mon Jun 9 16:49:34 2008 From: constant.beta at gmail.com (=?ISO-8859-2?Q?Micha=B3_Kwiatkowski?=) Date: Thu Mar 26 02:19:35 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: <5e8b0f6b0806091349g46fc5fddm53414c9c26d97e88@mail.gmail.com> On Mon, Jun 9, 2008 at 10:27 PM, carlo ambrogio wrote: > i have problem with this exercise. can you help me? Maybe, depending on what is the exercise content (is the exercise from HTDP?) and what specific problem you have with the solution. Posting your thought process and describing at which point you got stuck may also be helpful. Cheers, mk From cr-service at hotmail.it Mon Jun 9 17:00:13 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:36 2009 Subject: [plt-scheme] solution for exercise 11.2.4 Message-ID: yes it's the 11.2.4 exercise of "how to design programs" book I've got problems with a list of list. the solution could be something like this (define (depth adl) (cond [(symbol? adl) 0)] [(list? (first adl))... and then???? _________________________________________________________________ Crea il tuo blog su Spaces, condividi le tue esperienze con il mondo! http://home.services.spaces.live.com/ From matthias at ccs.neu.edu Mon Jun 9 17:01:59 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:36 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: <52C095EA-3C9C-4326-BD40-89F9E4F8A0CE@ccs.neu.edu> Why don't you try to follow the recipe and I promise that someone on the list will help you along. What's the data definition? On Jun 9, 2008, at 5:00 PM, carlo ambrogio wrote: > > yes it's the 11.2.4 exercise of "how to design programs" book > > > I've got problems with a list of list. > > the solution could be something like this > > > (define (depth adl) > (cond > [(symbol? adl) 0)] > [(list? (first adl))... > > > and then???? > _________________________________________________________________ > Crea il tuo blog su Spaces, condividi le tue esperienze con il mondo! > http://home.services.spaces.live.com/ > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From cr-service at hotmail.it Mon Jun 9 17:44:47 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:36 2009 Subject: [plt-scheme] solution for esercise 11.2.4 Message-ID: the data definition is: A deep-list (dl) is either - s where s is some symbol or - (cons dl empty), where dl is a deep list. _________________________________________________________________ Divertiti con le nuove EMOTICON per Messenger! http://intrattenimento.it.msn.com/emoticon From matthias at ccs.neu.edu Mon Jun 9 17:54:53 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:36 2009 Subject: [plt-scheme] solution for esercise 11.2.4 In-Reply-To: References: Message-ID: <801AD85F-239C-42BC-8540-5EE0245CD4BF@ccs.neu.edu> On Jun 9, 2008, at 5:44 PM, carlo ambrogio wrote: > > the data definition is: > > A deep-list (dl) is either > > - s where s is some symbol or > > - (cons dl empty), where dl is a deep list. Sounds like a plan. Can you show us some data examples? Can you show us some functional examples? From cr-service at hotmail.it Mon Jun 9 18:12:09 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:36 2009 Subject: [plt-scheme] solution for exercise 11.2.4 Message-ID: ok it is the moment where I find problems. How it is conctructed a list of list?? Is it something like (cons (cons asymbol empty) empty)?? How can I count the "cons"??? I can say: if the first element of a list is still a list sum 1...but how? _________________________________________________________________ Sai che con Messenger guardi la TV con i tuoi amici? http://www.messenger.it/messengertv.html From matthias at ccs.neu.edu Mon Jun 9 18:14:49 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:36 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: <77DC558A-7DCC-4881-AD79-089E021CD4D3@ccs.neu.edu> A data definition is a "series of instructions" for how to construct examples for the defined set of data. Can you follow those instructions and make me at least five data examples with four involving cons? Don't worry about counting cons-es yet. On Jun 9, 2008, at 6:12 PM, carlo ambrogio wrote: > > ok it is the moment where I find problems. > How it is conctructed a list of list?? > Is it something like (cons (cons asymbol empty) empty)?? > How can I count the "cons"??? > I can say: if the first element of a list is still a list sum > 1...but how? > > > _________________________________________________________________ > Sai che con Messenger guardi la TV con i tuoi amici? > http://www.messenger.it/ > messengertv.html_________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From sk at cs.brown.edu Mon Jun 9 18:23:37 2008 From: sk at cs.brown.edu (Shriram Krishnamurthi) Date: Thu Mar 26 02:19:36 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: Why don't you first show us an example of one list? Then we can consider how to construct a list of lists. I wonder if you did the list exercises first, before jumping to the list of lists. Or did your professor start from the middle of the book? Shriram On Mon, Jun 9, 2008 at 6:12 PM, carlo ambrogio wrote: > > ok it is the moment where I find problems. > How it is conctructed a list of list?? > Is it something like (cons (cons asymbol empty) empty)?? > How can I count the "cons"??? > I can say: if the first element of a list is still a list sum 1...but how? > > > _________________________________________________________________ > Sai che con Messenger guardi la TV con i tuoi amici? > http://www.messenger.it/messengertv.html_________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From cr-service at hotmail.it Mon Jun 9 18:29:49 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:37 2009 Subject: [plt-scheme] solution for exercise 11.2.4 Message-ID: for example if i give these inputs: asymbol (cons asymbol empty) (cons (cons asymbol empty) empty) (cons (cons (cons asymbol empty) empty) empty) I should obtain respectively: 0 1 2 3 _________________________________________________________________ Scarica Windows Live, un mondo di programmi per te! http://get.live.com/ From matthias at ccs.neu.edu Mon Jun 9 18:33:06 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:37 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: <71CA0405-7CC4-4293-B75D-A3FE40768A2D@ccs.neu.edu> Let's assume you know that asymbol isn't a symbol but 'asymbol is one. Step #4 is the construction of a template. Question 1: how many clauses does the data def have? (how many clauses must the function def have?) how do you formulate the conditions in the function def that correspond to the respective clause in the data def? -- Matthias On Jun 9, 2008, at 6:29 PM, carlo ambrogio wrote: > > for example > > if i give these inputs: > > asymbol > > (cons asymbol empty) > > (cons (cons asymbol empty) empty) > > (cons (cons (cons asymbol empty) empty) empty) > > I should obtain respectively: > > 0 > > 1 > > 2 > > 3 > > > > > > _________________________________________________________________ > Scarica Windows Live, un mondo di programmi per te! > http://get.live.com/_________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From cr-service at hotmail.it Mon Jun 9 18:53:37 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:37 2009 Subject: [plt-scheme] solution for exercise 11.2.4 Message-ID: the template could be: (define (depth a-dl) (cond [(symbol? a-dl) ...] [else ... (first a-dl) ... (depth (rest a-dl)) ...])) how many clauses does the data def have? (how many clauses must the function def have?) I think 2 (the data can be a symbol or a list) _________________________________________________________________ Crea il tuo blog su Spaces, condividi le tue esperienze con il mondo! http://home.services.spaces.live.com/ From clements at brinckerhoff.org Mon Jun 9 19:45:15 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:19:37 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: On Jun 9, 2008, at 3:53 PM, carlo ambrogio wrote: > > the template could be: > > (define (depth a-dl) > (cond > [(symbol? a-dl) ...] > [else ... (first a-dl) ... (depth (rest a-dl)) ...])) If I recall the data definition you just posted correctly, this doesn't match it. Which elements of the data definition are self- referential? What does this imply about the template? > > how many clauses does the data def have? (how many clauses must the > function def have?) > > I think 2 (the data can be a symbol or a list) Yes, this part looks correct to me. It looks to me like you got the right number of clauses and the right number of pieces in each clause; it's just the very last step that needs fixing. John Clements -------------- 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/20080609/8143f2b1/smime.bin From cr-service at hotmail.it Mon Jun 9 19:59:03 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:38 2009 Subject: [plt-scheme] solution for exercise 11.2.4 Message-ID: If I recall the data definition you just posted correctly, this doesn't match it. Which elements of the data definition are self- referential? What does this imply about the template? (define (depth a-dl) > (cond > [(symbol? a-dl) ...] > [else ... (list? a-dl) ... (depth (rest a-dl)) ...])) is it right???? _________________________________________________________________ Sai che con Messenger guardi la TV con i tuoi amici? http://www.messenger.it/messengertv.html From matthias at ccs.neu.edu Mon Jun 9 20:38:29 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:38 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: Let me rephrase John's criticism: you jumped the gun and shot yourself. Just answer the questions that I asked. Not more, not less. On Jun 9, 2008, at 6:53 PM, carlo ambrogio wrote: > > the template could be: > > (define (depth a-dl) > (cond > [(symbol? a-dl) ...] > [else ... (first a-dl) ... (depth (rest a-dl)) ...])) > > how many clauses does the data def have? (how many clauses must the > function def have?) > > I think 2 (the data can be a symbol or a list) > > > > > _________________________________________________________________ > Crea il tuo blog su Spaces, condividi le tue esperienze con il mondo! > http://home.services.spaces.live.com/ > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From cr-service at hotmail.it Mon Jun 9 20:58:55 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:38 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: ok now i'm stucked... ---------------------------------------- > CC: plt-scheme@list.cs.brown.edu > From: matthias@ccs.neu.edu > Subject: Re: [plt-scheme] solution for exercise 11.2.4 > Date: Mon, 9 Jun 2008 20:38:29 -0400 > To: cr-service@hotmail.it > > > Let me rephrase John's criticism: you jumped the gun and shot yourself. > > Just answer the questions that I asked. Not more, not less. > > > On Jun 9, 2008, at 6:53 PM, carlo ambrogio wrote: > >> >> the template could be: >> >> (define (depth a-dl) >> (cond >> [(symbol? a-dl) ...] >> [else ... (first a-dl) ... (depth (rest a-dl)) ...])) >> >> how many clauses does the data def have? (how many clauses must the >> function def have?) >> >> I think 2 (the data can be a symbol or a list) >> >> >> >> >> _________________________________________________________________ >> Crea il tuo blog su Spaces, condividi le tue esperienze con il mondo! >> http://home.services.spaces.live.com/ >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > _________________________________________________________________ Una cena tra amici? Cerca il ristorante con Live Search Maps http://maps.live.it From matthias at ccs.neu.edu Mon Jun 9 21:10:25 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:38 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: Message-ID: <0408F3D6-6CB0-4D1A-B262-535121AADC4A@ccs.neu.edu> Not true. You answered the question already and they are *trivial* question. I just want you to learn to think about what you're doing instead of just following something in a rote manner. Once you know how to think about it, you'll internalize and empower yourself to apply such things in situations where you never expected it. Try again. I expect an answer in 10 mins. On Jun 9, 2008, at 8:58 PM, carlo ambrogio wrote: > > ok now i'm stucked... > ---------------------------------------- >> CC: plt-scheme@list.cs.brown.edu >> From: matthias@ccs.neu.edu >> Subject: Re: [plt-scheme] solution for exercise 11.2.4 >> Date: Mon, 9 Jun 2008 20:38:29 -0400 >> To: cr-service@hotmail.it >> >> >> Let me rephrase John's criticism: you jumped the gun and shot >> yourself. >> >> Just answer the questions that I asked. Not more, not less. >> >> >> On Jun 9, 2008, at 6:53 PM, carlo ambrogio wrote: >> >>> >>> the template could be: >>> >>> (define (depth a-dl) >>> (cond >>> [(symbol? a-dl) ...] >>> [else ... (first a-dl) ... (depth (rest a-dl)) ...])) >>> >>> how many clauses does the data def have? (how many clauses must the >>> function def have?) >>> >>> I think 2 (the data can be a symbol or a list) >>> >>> >>> >>> >>> _________________________________________________________________ >>> Crea il tuo blog su Spaces, condividi le tue esperienze con il >>> mondo! >>> http://home.services.spaces.live.com/ >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> > > _________________________________________________________________ > Una cena tra amici? Cerca il ristorante con Live Search Maps > http://maps.live.it_________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From matthias at ccs.neu.edu Mon Jun 9 21:14:06 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:38 2009 Subject: [plt-scheme] Fwd: Revenue-neutral Adjustment for Functional Programming References: <484DB5A3.5000001@cs.washington.edu> Message-ID: The ACM Curriculum board has agreed to consider a proposal on including FP as an equal to OOP (10 "hours" each) in the standard curriculum. Please consider contributing comments to the web site. A simple "Yes, I think this is a great idea" will be helpful. Thanks -- Matthias Begin forwarded message: > From: Larry Snyder > Date: June 9, 2008 6:58:43 PM EDT > To: PL-CURRC-WKSHP-INVITEES@LISTSERV.ACM.ORG > Subject: Revenue-neutral Adjustment for Functional Programming > Reply-To: Larry Snyder > > Colleagues: > > The ACM Education Board accepted our last minute input for adding > Functional Programming to the core of the revised CC2001-CS > curriculum, has posted our proposed changes on it's Web site > > http://wiki.acm.org/cs2001/index.php?title=SIGPLAN_Proposal > > and invited comments. Feel free to endorse our "revenue neutral" > workshop motion. (I quickly wrote the text in support of this for > use by the Ed Board, not expecting it to be included in the > posting; so apologies if I missed points or messed them up.) > Accordingly, crisp arguments for this change will doubtless be > helpful. -- LS > From roy at unice.fr Mon Jun 9 10:17:04 2008 From: roy at unice.fr (Jean-Paul ROY) Date: Thu Mar 26 02:19:38 2009 Subject: [plt-scheme] Checking a result with "Intermediate plus Lambda" student Language Message-ID: <5531B994-1F0F-41F6-AA7E-6C547F1C0142@unice.fr> I am moving from 372 to 399.xx. "Intermediate plus Lambda" student language How can I test a function when the result is not yet known (say with random), through a polite message : The value of the dice is 4 I tried a Scheme splice box but the students don't know lists and quasiquotation yet, and the above message within a list seems not so pretty... Do I miss a "check without already known result" primitive ? -jpr From catamorphism at gmail.com Fri Jun 6 17:22:32 2008 From: catamorphism at gmail.com (Tim Chevalier) Date: Thu Mar 26 02:19:39 2009 Subject: [plt-scheme] 2008 ICFP Programming Contest Message-ID: <4683d9370806061422j4fb4b038td73d077459778d9@mail.gmail.com> Mark your calendars for Friday, July 11, 2008 to Monday, July 14, 2008: the dates for the eleventh annual ICFP Programming Contest. The ICFP Programming Contest is one of the most advanced and prestigious programming contests, as well as being a chance to show off your programming skills, your favorite languages and tools, and your ability to work as a team. The contest is affiliated with the International Conference on Functional Programming. Teams consisting of one or more participants, from any part of the world, using any programming language, may enter. The specific task will be announced when the contest begins. In the meantime, watch the Web site for more information: http://icfpcontest.org/ Please direct any questions to Tim Sheard at sheard@cs.pdx.edu, rather than replying to this message. -Tim Chevalier, on behalf of the 2008 contest organizers (programming language devotees at Portland State University and the University of Chicago) -- Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt "...I thought the secret of life was obvious: be here now, love as if your whole life depended on it, find your life's work, and try to get hold of a giant panda." -- Anne Lamott From offby1 at blarg.net Mon Jun 9 22:37:28 2008 From: offby1 at blarg.net (Eric Hanchrow) Date: Thu Mar 26 02:19:39 2009 Subject: [plt-scheme] LinkedIn (group activated) In-Reply-To: <20080609161121.GA5027@zzz.i> (Tom Schouten's message of "Mon, 9 Jun 2008 18:11:21 +0200") References: <20080609161121.GA5027@zzz.i> Message-ID: <878wxednh3.fsf@offby1.atm01.sea.blarg.net> >>>>> "Tom" == Tom Schouten writes: Tom> Hello, The LinkedIn group is activated. The ID is 119028 and Tom> the name is "PLT Scheme". To join, follow this link: Tom> http://www.linkedin.com/search?search=&sortCriteria=3&groupFilter=119028 That didn't work for me -- I just saw a list of my contacts. -- A novice of the temple once approached the Master Programmer with a question. "Master, does Emacs have the Buddha nature?" the novice asked. The Master Programmer had been in the temple for many years and could be relied upon to know these things. He thought for several minutes before replying. "I don't see why not. It's bloody well got everything else." From matthias at ccs.neu.edu Mon Jun 9 23:00:43 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:39 2009 Subject: [plt-scheme] Checking a result with "Intermediate plus Lambda" student Language In-Reply-To: <5531B994-1F0F-41F6-AA7E-6C547F1C0142@unice.fr> References: <5531B994-1F0F-41F6-AA7E-6C547F1C0142@unice.fr> Message-ID: <2F117DC5-95AF-49CC-9C07-05E9B9B5B698@ccs.neu.edu> For now, please use (check-expect (between-1-6 (roll-dice 'useless)) true) We have check-expect-one-of but it hasn't gone in yet, and because we are literally in the process of rolling out the release, I'd rather not add it tonight. -- Matthias On Jun 9, 2008, at 10:17 AM, Jean-Paul ROY wrote: > I am moving from 372 to 399.xx. "Intermediate plus Lambda" student > language > > How can I test a function when the result is not yet known (say > with random), through a polite message : > > The value of the dice is 4 > > I tried a Scheme splice box but the students don't know lists and > quasiquotation yet, and the above message within a list seems not > so pretty... > > Do I miss a "check without already known result" primitive ? > > -jpr > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From dyoo at cs.wpi.edu Tue Jun 10 00:16:57 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:19:39 2009 Subject: [plt-scheme] Changing a snip's style Message-ID: Hi everyone, I just wanted to make sure I'm understanding the snip style system. As I understand it now, snips really don't get to control their own styles: they're really at the mercy of whatever editor they're embedded in. For example, in the following example code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang scheme/base (require scheme/gui/base scheme/class) (define f (new frame% [label ""] [width 100] [height 100])) (define e (new text%)) (define c (new editor-canvas% [parent f] [editor e])) (send f show #t) (define a-snip (new editor-snip%)) (send e insert a-snip) ;; Successfully changes the color of the editor snip's border to Green. (define (t1) (define d (new style-delta%)) (send d set-delta-foreground "Green") (send e change-style d 0 'end)) ;; Unsuccessfully tries to change the editor snip's border to Red. (define (t2) (define d (new style-delta%)) (define a-style (send a-snip get-style)) (send a-style get-delta d) (send d set-delta-foreground "Red") (send a-style set-delta d) (send a-snip set-style a-style)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; t1 seems to work, but t2 does not. I'm assuming that the state of snip styles really lives in editors, as the documentation for snip%'s set-style has the mysterious sentence: "The snip's style may be changed by the system without calling this method." Is my understanding accurate? It's really not clear from the GUI documentation, http://docs.plt-scheme.org/gui/editor-overview.html#(part._editorstyles) The documentation should make it more clear that editors will be happy to override the style of a snip when the snip gets inserted. I've had to fight the snip style system for a few days, just trying to get the styles to stick to snips without touching editors. After that didn't work, I decided to stop fighting and embrace editors, and things are working now. I've written the following helper function to make it easier for me to change snip styles. Would this be welcome in PLaneT, or is it too simple? ;; change-snip-style: snip% style-delta% -> void ;; Tries to change the delta of a snip that's already inserted into ;; an editor. If no editor's attached, this has no effect. (define (change-snip-style a-snip a-delta) (when (send a-snip get-admin) (let* ([editor (send (send a-snip get-admin) get-editor)]) (cond [(is-a? editor text%) (let* ([start-pos (send editor get-snip-position a-snip)] [end-pos (+ start-pos (send a-snip get-count))]) (send editor change-style a-delta start-pos end-pos))] [(is-a? editor pasteboard%) (send editor change-style a-delta a-snip)])))) From czhu at cs.utah.edu Tue Jun 10 00:21:40 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:39 2009 Subject: [plt-scheme] plt web server question Message-ID: <484E0154.1010107@cs.utah.edu> Hi, I have this servlet program that is nearly finished (attached). But as I run it in v372, v399.0.24, or v399.0.26(latest), I always get error message from webserver. This is the error message from v399.0.26: No valid path === context === C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks url-path? url-path? C:\Program Files\PLT-3.99.0.26\collects\web-server\dispatchers\dispatch-servlets .ss:100:2: invoke-servlet-continuation dispatcher? C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks dispatcher? dispatcher? C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: sel ect-handler/no-breaks dispatcher? dispatcher? ... Besides. the final response as the code does is (make-response/full 200 "Okay" (current-seconds) "text/plain" (list) (list "Chongkai")) But the client will always see empty string. Could anyone (Jay McCarthy?) please help? Many thanks. Chongkai From czhu at cs.utah.edu Tue Jun 10 00:22:40 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:40 2009 Subject: [plt-scheme] Re: plt web server question In-Reply-To: <484E0154.1010107@cs.utah.edu> References: <484E0154.1010107@cs.utah.edu> Message-ID: <484E0190.5050003@cs.utah.edu> Attach file. Chongkai Zhu wrote: > > Could anyone (Jay McCarthy?) please help? Many thanks. > > Chongkai > > -------------- next part -------------- (module repl mzscheme (require (lib "servlet.ss" "web-server")) (provide interface-version timeout start) (define interface-version 'v1) (define timeout 10) ; start : request -> response (define (start initial-request) (define-values (read-pipe-input read-pipe-output) (make-pipe)) (define-values (print-pipe-input print-pipe-output) (make-pipe)) (define (get-print) (let loop ((acc (list))) (if (char-ready? print-pipe-input) (loop (cons (read-char print-pipe-input) acc)) (list->string (reverse acc))))) (thread (lambda () (parameterize ([current-input-port read-pipe-input] [current-output-port print-pipe-output] [current-error-port print-pipe-output]) (read-eval-print-loop)))) (let* ((bindings (request-bindings (send/forward (lambda (k-url) `(html (head (script ([type "text/javascript"]) "var xmlHttp;\n" "function send()\n" "{\n" " var str = document.getElementById(\"readtext\").value;\n" " if (str.length==0)\n" " {\n" " return;\n" " }\n" "document.getElementById(\"readtext\").value = \"\";\n" " xmlHttp=GetXmlHttpObject();\n" " if (xmlHttp==null)\n" " {\n" " alert (\"Your browser does not support AJAX!\");\n" " return;\n" " }\n" " var url=\"" ,k-url "\";\n" " url=url+\"?i=\"+str;\n" " url=url+\"&sid=\"+Math.random();\n" " xmlHttp.onreadystatechange=stateChanged1;\n" " xmlHttp.open(\"GET\",url,true);\n" " xmlHttp.send(null);\n" "}\n" "function stateChanged1()\n" "{\n" " if (xmlHttp.readyState==4)\n" " {\n" ;for test " alert (xmlHttp.responseText);\n" " }\n" "}\n" "function receive()\n" "{\n" " xmlHttp=GetXmlHttpObject();\n" " if (xmlHttp==null)\n" " {\n" " alert (\"Your browser does not support AJAX!\");\n" " return;\n" " }\n" " var url=\"" ,k-url "\";\n" " url=url+\"&sid=\"+Math.random();\n" " xmlHttp.onreadystatechange=stateChanged2;\n" " xmlHttp.open(\"GET\",url,true);\n" " xmlHttp.send(null);\n" "}\n" "function stateChanged2()\n" "{\n" " if (xmlHttp.readyState==4)\n" " {\n" " document.getElementById(\"printtext\").value = document.getElementById(\"printtext\").value + xmlHttp.responseText;\n" " receive();\n" " }\n" "}\n" "function GetXmlHttpObject()\n" "{\n" "var xmlHttp=null;\n" "try\n" " {\n" " // Firefox, Opera 8.0+, Safari\n" " xmlHttp=new XMLHttpRequest();\n" " }\n" "catch (e)\n" " {\n" " // Internet Explorer\n" " try\n" " {\n" " xmlHttp=new ActiveXObject(\"Msxml2.XMLHTTP\");\n" " }\n" " catch (e)\n" " {\n" " xmlHttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n" " }\n" " }\n" "return xmlHttp;\n" "}\n" )) (body (form (p "Scheme REPL") (p (textarea ([rows "15"] [cols "60"] [name "printtext"] [id "printtext"] [readonly "readonly"]) "Welcome to MzScheme web interface\n")) (p (textarea ([rows "5"] [cols "50"] [name "readtext"] [id "readtext"]) "\n") (input ([type "button"] [value "Send"] [onclick "send()"])))) (script ([type "text/javascript"]) "receive();"))))))) (i (and (exists-binding? 'i bindings) (extract-binding/single 'i bindings)))) (if i (begin (write-string i print-pipe-output) (newline print-pipe-output) (write-string i read-pipe-output) (newline read-pipe-output) (make-response/full 200 "Okay" (current-seconds) "text/plain" (list) (list "Chongkai"))) (make-response/full 200 "Okay" (current-seconds) "text/plain" (list) (list (begin (sleep 1) (get-print)))))))) From clements at brinckerhoff.org Tue Jun 10 01:03:07 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:19:40 2009 Subject: [plt-scheme] LinkedIn (group activated) In-Reply-To: <878wxednh3.fsf@offby1.atm01.sea.blarg.net> References: <20080609161121.GA5027@zzz.i> <878wxednh3.fsf@offby1.atm01.sea.blarg.net> Message-ID: On Jun 9, 2008, at 7:37 PM, Eric Hanchrow wrote: >>>>>> "Tom" == Tom Schouten writes: > > Tom> Hello, The LinkedIn group is activated. The ID is 119028 and > Tom> the name is "PLT Scheme". To join, follow this link: > > Tom> http://www.linkedin.com/search? > search=&sortCriteria=3&groupFilter=119028 > > That didn't work for me -- I just saw a list of my contacts. No, me neither. Instead, search for Tom Schouten, then click on the PLT group, and ask to be added. John Clements -------------- 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/20080609/ae65e6dc/smime.bin From yinso.chen at gmail.com Tue Jun 10 01:33:36 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:19:41 2009 Subject: [plt-scheme] LinkedIn (group activated) In-Reply-To: References: <20080609161121.GA5027@zzz.i> <878wxednh3.fsf@offby1.atm01.sea.blarg.net> Message-ID: <779bf2730806092233u3086c71cy19c94cd991309703@mail.gmail.com> On Mon, Jun 9, 2008 at 10:03 PM, John Clements wrote: > > No, me neither. Instead, search for Tom Schouten, then click on the PLT > group, and ask to be added. > I think I found Tom - but didn't find PLT group... is that only available under the Business account holders? ... yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080609/74bad0e4/attachment.html From anton at appsolutions.com Tue Jun 10 03:08:16 2008 From: anton at appsolutions.com (Anton van Straaten) Date: Thu Mar 26 02:19:41 2009 Subject: [plt-scheme] LinkedIn (group activated) In-Reply-To: <779bf2730806092233u3086c71cy19c94cd991309703@mail.gmail.com> References: <20080609161121.GA5027@zzz.i> <878wxednh3.fsf@offby1.atm01.sea.blarg.net> <779bf2730806092233u3086c71cy19c94cd991309703@mail.gmail.com> Message-ID: <484E2860.7010900@appsolutions.com> YC wrote: > > On Mon, Jun 9, 2008 at 10:03 PM, John Clements > > wrote: > > > No, me neither. Instead, search for Tom Schouten, then click on the > PLT group, and ask to be added. > > > I think I found Tom - but didn't find PLT group... is that only > available under the Business account holders? ... No, free accounts can see it. See whether you see the PLT logo near the bottom of this page: http://www.linkedin.com/in/tomschouten ...and if so, click on it. From yinso.chen at gmail.com Tue Jun 10 02:57:34 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:19:42 2009 Subject: [plt-scheme] LinkedIn (group activated) In-Reply-To: <484E2860.7010900@appsolutions.com> References: <20080609161121.GA5027@zzz.i> <878wxednh3.fsf@offby1.atm01.sea.blarg.net> <779bf2730806092233u3086c71cy19c94cd991309703@mail.gmail.com> <484E2860.7010900@appsolutions.com> Message-ID: <779bf2730806092357p2e20beedx67cdceb00ef94d59@mail.gmail.com> On Tue, Jun 10, 2008 at 12:08 AM, Anton van Straaten wrote: > No, free accounts can see it. See whether you see the PLT logo near the > bottom of this page: > > http://www.linkedin.com/in/tomschouten > > ...and if so, click on it. > > Found it - thanks! yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080609/ffda4adf/attachment.htm From mark.engelberg at gmail.com Tue Jun 10 03:09:01 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:42 2009 Subject: [plt-scheme] Typed Scheme - Faster code, or just "safer"? Message-ID: Is code written in typed scheme better optimized for performance by the compiler? --Mark From frijam27 at yahoo.com Tue Jun 10 03:24:44 2008 From: frijam27 at yahoo.com (james firman) Date: Thu Mar 26 02:19:42 2009 Subject: [plt-scheme] Re: plt-scheme Digest, Vol 34, Issue 28 In-Reply-To: <20080610050348.538FF402A8@qua.cs.brown.edu> Message-ID: <156214.47327.qm@web53612.mail.re2.yahoo.com> to the organizer of PLT SCHEME please dont send me any issues of plt SCHME thanks i dont need it anymore.. more power -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080610/f98a4eef/attachment.html From noelwelsh at gmail.com Tue Jun 10 04:19:35 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:19:43 2009 Subject: [plt-scheme] Typed Scheme - Faster code, or just "safer"? In-Reply-To: References: Message-ID: Wasn't there justa t hread on this? Answer is there are currently no extra optimisations in typed scheme. N. On Tue, Jun 10, 2008 at 8:09 AM, Mark Engelberg wrote: > Is code written in typed scheme better optimized for performance by > the compiler? > > --Mark > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From mflatt at cs.utah.edu Tue Jun 10 08:31:55 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:43 2009 Subject: [plt-scheme] Changing a snip's style In-Reply-To: References: Message-ID: <20080610123157.571026500B1@mail-svr1.cs.utah.edu> At Tue, 10 Jun 2008 00:16:57 -0400 (EDT), Danny Yoo wrote: > I just wanted to make sure I'm understanding the snip style system. As I > understand it now, snips really don't get to control their own styles: > they're really at the mercy of whatever editor they're embedded in. That's correct. A snip gets to draw itself, and in doing so it can ignore the style that an editor gives the snip. So, the style is intended as a request from the enclosing editor, and that's why the editor is in control of a snip's style. Matthew From icfp.publicity at googlemail.com Tue Jun 10 08:47:45 2008 From: icfp.publicity at googlemail.com (Matthew Fluet (ICFP Publicity Chair)) Date: Thu Mar 26 02:19:43 2009 Subject: [plt-scheme] DEFUN08: Final Call for Talks & Tutorials (deadline: June 27) Message-ID: <53ff55480806100547u62fad86q9f1feb10cba74eed@mail.gmail.com> Final Call for Talks and Tutorials ACM SIGPLAN 2008 Developer Tracks on Functional Programming http://www.deinprogramm.de/defun-2008/ Victoria, BC, Canada, 25, 27 September, 2008 The workshop will be held in conjunction with ICFP 2008. http://www.icfpconference.org/icfp2008/ Important dates Proposal Deadline: June 27, 2008, 0:00 UTC Notification: July 14, 2008 DEFUN 2008 invites functional programmers who know how to solve problems with functional progamming to give talks and lead tutorials at the The ICFP Developer Tracks. We want to know about your favorite programming techniques, powerful libraries, and engineering approaches you've used that the world should know about and apply to other projects. We want to know how to be productive using functional programming, write better code, and avoid common pitfalls. We invite proposals for presentations in the following categories: How-to talks: 45-minute "how-to" talks that provide specific information on how to solve specific problems using functional programming. These talks focus on concrete examples, but provide useful information for developers working on different projects or in different contexts. Examples: - "How I made Haskell an extension language for SAP R/3." - "How I replaced /sbin/init by a Scheme program." - "How I hooked up my home appliances to an Erlang control system." - "How I got an SML program to drive my BMW." General language tutorials: Half-day general language tutorials for specific functional languages, given by recognized experts for the respective languages. Technology tutorials: Half-day tutorials on techniques, technologies, or solving specific problems in functional programming. Examples: - how to make the best use of specific FP programming techniques - how to inject FP into a development team used to more conventional technologies - how to connect FP to existing libraries / frameworks / platforms - how to deliver high-performance systems with FP - how to deliver high-reliability systems with FP Remember that your audience will include computing professionals who are not academics and who may not already be experts on functional programming. Presenters of tutorials will receive free registration to ICFP 2008. Submission guidelines Submit a proposal of 150 words or less for either a 45-minute talk with a short Q&A session at the end, or a 300-word-or-less proposal for a 3-hour tutorial, where you present your material, but also give participants a chance to practice it on their own laptops. Some advice: - Give it a simple and straightforward title or name; avoid fancy titles or puns that would make it harder for attendees to figure out what you'll be talking about. - Clearly identify the level of the talk: What knowledge should people have when they come to the presentation or tutorial? - Explain why people will want to attend: is the language or library useful for a wide range of attendees? Is the pitfall you're identifying common enough that a wide range of attendees is likely to encounter it? - Explain what benefits attendees are expected to take home to their own projects. - For a tutorial, explain how you want to structure the time, and what you expect to have attendees to do on their laptops. List what software you'll expect attendees to have installed prior to coming. Submit your proposal in plain text electronically to defun-2008-submission-AT-deinprogramm.de by the beginning of Friday, June 27, Universal Coordinated Time. Organizers Kathleen Fisher AT&T Labs Simon Peyton Jones Microsoft Research Mike Sperber (co-chair) DeinProgramm Don Stewart (co-chair) Galois From jay.mccarthy at gmail.com Tue Jun 10 08:49:11 2008 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Thu Mar 26 02:19:43 2009 Subject: [plt-scheme] plt web server question In-Reply-To: <484E0154.1010107@cs.utah.edu> References: <484E0154.1010107@cs.utah.edu> Message-ID: I'm a little unclear about how you get the error. That error means that you went to a file that does not exist. Normally that exception is converted into a particular page, but for some reason it is not for you. What is the exact sequence of URLs you go to? What is the dispatcher sequence you have set up? (Your run.ss) Jay On Mon, Jun 9, 2008 at 10:21 PM, Chongkai Zhu wrote: > Hi, > > I have this servlet program that is nearly finished (attached). But as I run > it in v372, v399.0.24, or v399.0.26(latest), I always get error message from > webserver. This is the error message from v399.0.26: > > No valid path > > === context === > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > url-path? > url-path? > C:\Program > Files\PLT-3.99.0.26\collects\web-server\dispatchers\dispatch-servlets > .ss:100:2: invoke-servlet-continuation > dispatcher? > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > dispatcher? > dispatcher? > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: > sel > ect-handler/no-breaks > dispatcher? > dispatcher? > ... > > > Besides. the final response as the code does is > > (make-response/full 200 > "Okay" > (current-seconds) > "text/plain" > (list) > (list "Chongkai")) > > But the client will always see empty string. > > Could anyone (Jay McCarthy?) please help? Many thanks. > > Chongkai > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- Jay McCarthy http://jay.teammccarthy.org From czhu at cs.utah.edu Tue Jun 10 11:14:48 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:44 2009 Subject: [plt-scheme] plt web server question In-Reply-To: References: <484E0154.1010107@cs.utah.edu> Message-ID: <484E9A68.6030406@cs.utah.edu> The servlet program is attached. I put the file under "C:\Program Files\PLT\collects\web-server\default-web-root\servlets", and run "C:\Program Files\PLT\PLT Web Server Text.exe" or "C:\Program Files\PLT-3.99.0.26\plt-web-server.exe". Then using URL "http://127.0.0.1/servlets/repl.ss" to access it in by browser. So no fancy stuff here. There is only one call to "send/forward" in my whole servlet, which caused the error, but I couldn't see why. Thanks, Chongkai Jay McCarthy wrote: > I'm a little unclear about how you get the error. > > That error means that you went to a file that does not exist. Normally > that exception is converted into a particular page, but for some > reason it is not for you. > > What is the exact sequence of URLs you go to? What is the dispatcher > sequence you have set up? (Your run.ss) > > Jay > > On Mon, Jun 9, 2008 at 10:21 PM, Chongkai Zhu wrote: > >> Hi, >> >> I have this servlet program that is nearly finished (attached). But as I run >> it in v372, v399.0.24, or v399.0.26(latest), I always get error message from >> webserver. This is the error message from v399.0.26: >> >> No valid path >> >> === context === >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> url-path? >> url-path? >> C:\Program >> Files\PLT-3.99.0.26\collects\web-server\dispatchers\dispatch-servlets >> .ss:100:2: invoke-servlet-continuation >> dispatcher? >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> dispatcher? >> dispatcher? >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> C:\Program Files\PLT-3.99.0.26\collects\scheme\private\more-scheme.ss:170:2: >> sel >> ect-handler/no-breaks >> dispatcher? >> dispatcher? >> ... >> >> >> Besides. the final response as the code does is >> >> (make-response/full 200 >> "Okay" >> (current-seconds) >> "text/plain" >> (list) >> (list "Chongkai")) >> >> But the client will always see empty string. >> >> Could anyone (Jay McCarthy?) please help? Many thanks. >> >> Chongkai >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> > > > > -------------- next part -------------- (module repl mzscheme (require (lib "servlet.ss" "web-server")) (provide interface-version timeout start) (define interface-version 'v1) (define timeout 10) ; start : request -> response (define (start initial-request) (define-values (read-pipe-input read-pipe-output) (make-pipe)) (define-values (print-pipe-input print-pipe-output) (make-pipe)) (define (get-print) (let loop ((acc (list))) (if (char-ready? print-pipe-input) (loop (cons (read-char print-pipe-input) acc)) (list->string (reverse acc))))) (thread (lambda () (parameterize ([current-input-port read-pipe-input] [current-output-port print-pipe-output] [current-error-port print-pipe-output]) (read-eval-print-loop)))) (let* ((bindings (request-bindings (send/forward (lambda (k-url) `(html (head (script ([type "text/javascript"]) "var xmlHttp;\n" "function send()\n" "{\n" " var str = document.getElementById(\"readtext\").value;\n" " if (str.length==0)\n" " {\n" " return;\n" " }\n" "document.getElementById(\"readtext\").value = \"\";\n" " xmlHttp=GetXmlHttpObject();\n" " if (xmlHttp==null)\n" " {\n" " alert (\"Your browser does not support AJAX!\");\n" " return;\n" " }\n" " var url=\"" ,k-url "\";\n" " url=url+\"?i=\"+str;\n" " url=url+\"&sid=\"+Math.random();\n" " xmlHttp.onreadystatechange=stateChanged1;\n" " xmlHttp.open(\"GET\",url,true);\n" " xmlHttp.send(null);\n" "}\n" "function stateChanged1()\n" "{\n" " if (xmlHttp.readyState==4)\n" " {\n" ;for test " alert (xmlHttp.responseText);\n" " document.getElementById(\"printtext\").value = document.getElementById(\"printtext\").value + \"send succed\";\n" ;end for test " }\n" "}\n" "function receive()\n" "{\n" " xmlHttp=GetXmlHttpObject();\n" " if (xmlHttp==null)\n" " {\n" " alert (\"Your browser does not support AJAX!\");\n" " return;\n" " }\n" " var url=\"" ,k-url "\";\n" " url=url+\"&sid=\"+Math.random();\n" " xmlHttp.onreadystatechange=stateChanged2;\n" " xmlHttp.open(\"GET\",url,true);\n" " xmlHttp.send(null);\n" "}\n" "function stateChanged2()\n" "{\n" " if (xmlHttp.readyState==4)\n" " {\n" " document.getElementById(\"printtext\").value = document.getElementById(\"printtext\").value + xmlHttp.responseText;\n" " receive();\n" " }\n" "}\n" "function GetXmlHttpObject()\n" "{\n" "var xmlHttp=null;\n" "try\n" " {\n" " // Firefox, Opera 8.0+, Safari\n" " xmlHttp=new XMLHttpRequest();\n" " }\n" "catch (e)\n" " {\n" " // Internet Explorer\n" " try\n" " {\n" " xmlHttp=new ActiveXObject(\"Msxml2.XMLHTTP\");\n" " }\n" " catch (e)\n" " {\n" " xmlHttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n" " }\n" " }\n" "return xmlHttp;\n" "}\n" )) (body (form (p "Scheme REPL") (p (textarea ([rows "15"] [cols "60"] [name "printtext"] [id "printtext"] [readonly "readonly"]) "Welcome to MzScheme web interface\n")) (p (textarea ([rows "5"] [cols "50"] [name "readtext"] [id "readtext"]) "\n") (input ([type "button"] [value "Send"] [onclick "send()"])))) (script ([type "text/javascript"]) "receive();"))))))) (i (and (exists-binding? 'i bindings) (extract-binding/single 'i bindings)))) (if i (begin (write-string i print-pipe-output) (newline print-pipe-output) (write-string i read-pipe-output) (newline read-pipe-output) (make-response/full 200 "Okay" (current-seconds) #"text/plain" (list) (list "For test"))) (make-response/full 200 "Okay" (current-seconds) #"text/plain" (list) (list (begin (sleep 1) (get-print)))))))) From hendrik at topoi.pooq.com Tue Jun 10 11:27:08 2008 From: hendrik at topoi.pooq.com (hendrik@topoi.pooq.com) Date: Thu Mar 26 02:19:44 2009 Subject: [plt-scheme] LinkedIn In-Reply-To: <0F735CB9-3419-47BC-90BF-7460637D4B2A@ccs.neu.edu> References: <4937598a-dedf-445a-94ce-00ba03ef6d6b@8g2000hse.googlegroups.com> <484BC974.8090405@neilvandyke.org> <20080608121913.GA7846@zzz.i> <0F735CB9-3419-47BC-90BF-7460637D4B2A@ccs.neu.edu> Message-ID: <20080610152708.GA1761@topoi.pooq.com> On Sun, Jun 08, 2008 at 12:54:29PM -0400, Matthias Felleisen wrote: > > By all means, manage the group. If you do 'retire', recruit a > successor. Thanks! -- Matthias Recruit a successor *before* you drop off the face of the planet! -- hendrik From hendrik at topoi.pooq.com Tue Jun 10 11:40:17 2008 From: hendrik at topoi.pooq.com (hendrik@topoi.pooq.com) Date: Thu Mar 26 02:19:44 2009 Subject: [plt-scheme] macro question In-Reply-To: <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> Message-ID: <20080610154017.GB1761@topoi.pooq.com> On Sun, Jun 08, 2008 at 04:01:02PM -0400, Matthias Felleisen wrote: > Pedagogically: Types in TS play the role of contracts in HtDP. All > programs could be assigned types, and the type checker should 'bless' > them all. In the long run, I am considering using Typed Scheme for > the introduction of types into the HtD curriculum. Some unnamed > schools switch to ML for this purpose, but I think type inference > gets in the way of understanding the power of a rich type language. Type inference gets in the way of understanding programs in the language. I need to see the types when I'm reading the program, so I know what it all means. It's not enough to know that there exists a way of attaching types to the code. > > (Having said that, TS supports 'local' type inference and we may > develop tools based on past soft typing work (inference via HM or > SBA) to help programmers port untyped modules into the typed world.) There are a few type inferences that do not seem to harm the readability of a program. Type information can flow: (a) from the declaration of an identifier to its use (b) from the leaves of a parse tree towards its root (the usual direction of expressino evaluation) (c) from the root of a parse tree towards the leaves (called coercion in Algol 68; a mechanism whereby the context of an expression affects its meaning. Used for determining the types of initializers in C. I haven't yet seen anything else that didn't become obscure. -- hendrik From noelwelsh at gmail.com Tue Jun 10 11:50:19 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:19:44 2009 Subject: [plt-scheme] plt web server question In-Reply-To: <484E9A68.6030406@cs.utah.edu> References: <484E0154.1010107@cs.utah.edu> <484E9A68.6030406@cs.utah.edu> Message-ID: I ran the servlet w/ Instaweb (code below) and observe the following behaviour: There is a textarea with the following text: Welcome to MzScheme web interface followed by the entire text of the HTML document. Below this textarea is another text area. I enter (+ 1 1) and press Send. I get an empty Javascript alert and nothing else. I noticed that is the first textarea additional text is appended: send succed That's it. N. #lang scheme/base (require (planet schematics/instaweb/instaweb)) (instaweb #:servlet-path "repl.ss") From lunarc.lists at gmail.com Tue Jun 10 11:59:43 2008 From: lunarc.lists at gmail.com (Henk Boom) Date: Thu Mar 26 02:19:44 2009 Subject: [plt-scheme] plt web server question In-Reply-To: References: <484E0154.1010107@cs.utah.edu> <484E9A68.6030406@cs.utah.edu> Message-ID: 2008/6/10 Noel Welsh : > I ran the servlet w/ Instaweb (code below) and observe the following behaviour: > > There is a textarea with the following text: > > Welcome to MzScheme web interface > > followed by the entire text of the HTML document. Use view source to check what's actually going on. If I remember correctly I had trouble with Firefox doing that when I closed the textarea tag using the shorthand My real problem is why PLT web server reports error messages, and the "make-response/full" is never correctly received at the browser side. That's why I'm asking question here. Thanks, Chongkai Henk Boom wrote: > 2008/6/10 Noel Welsh : > >> I ran the servlet w/ Instaweb (code below) and observe the following behaviour: >> >> There is a textarea with the following text: >> >> Welcome to MzScheme web interface >> >> followed by the entire text of the HTML document. >> > > Use view source to check what's actually going on. If I remember > correctly I had trouble with Firefox doing that when I closed the > textarea tag using the shorthand

" )))))) (i (and (exists-binding? 'i bindings) (extract-binding/single 'i bindings)))) (cond (i (write-string i print-pipe-output) (newline print-pipe-output) (write-string i read-pipe-output) (newline read-pipe-output) (make-response/full 200 "Okay" (current-seconds) #"text/plain" (list) (list))) ((exists-binding? 's bindings) (break-thread th) (make-response/full 200 "Okay" (current-seconds) #"text/plain" (list) (list))) (else (make-response/full 200 "Okay" (current-seconds) #"text/plain" (list) (list (begin (sleep 1) (get-print))))))))) From mvanier at cs.caltech.edu Tue Jun 10 18:56:28 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:48 2009 Subject: [plt-scheme] macro question In-Reply-To: <20080610154017.GB1761@topoi.pooq.com> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> Message-ID: <484F069C.9040002@cs.caltech.edu> My experience with ML and Haskell suggests that local type inference is a big win, global type inference much less so. In both Haskell and ML, you usually end up declaring the types of many functions somewhere anyway (in module declarations for ML, and in Haskell it's customary to annotate all top-level functions with their types). Not having global types explicitly spelled out often leads to very obscure error messages as the inference engine finds the most general type, which is often not at all what the programmer had in mind. So I would like TS to have local type inference (to avoid lots of distracting annotations a la Java) but not global type inference. Parenthetically, both Python and Perl are considering adopting some kind of explicit type annotations to the language. It would be cool for PLT Scheme to do it earlier and better than either of them. Mike hendrik@topoi.pooq.com wrote: > On Sun, Jun 08, 2008 at 04:01:02PM -0400, Matthias Felleisen wrote: > >> Pedagogically: Types in TS play the role of contracts in HtDP. All >> programs could be assigned types, and the type checker should 'bless' >> them all. In the long run, I am considering using Typed Scheme for >> the introduction of types into the HtD curriculum. Some unnamed >> schools switch to ML for this purpose, but I think type inference >> gets in the way of understanding the power of a rich type language. > > Type inference gets in the way of understanding programs in the > language. I need to see the types when I'm reading the program, so I > know what it all means. It's not enough to know that there exists a > way of attaching types to the code. > >> (Having said that, TS supports 'local' type inference and we may >> develop tools based on past soft typing work (inference via HM or >> SBA) to help programmers port untyped modules into the typed world.) > > There are a few type inferences that do not seem to harm the > readability of a program. Type information can flow: > > (a) from the declaration of an identifier to its use > > (b) from the leaves of a parse tree towards its root (the usual > direction of expressino evaluation) > > (c) from the root of a parse tree towards the leaves (called coercion in > Algol 68; a mechanism whereby the context of an expression affects its > meaning. Used for determining the types of initializers in C. > > I haven't yet seen anything else that didn't become obscure. > > -- hendrik > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From cr-service at hotmail.it Tue Jun 10 19:00:12 2008 From: cr-service at hotmail.it (carlo ambrogio) Date: Thu Mar 26 02:19:48 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: <7145D9EB-0FDD-46A4-9985-1427058E49D1@ccs.neu.edu> References: <0408F3D6-6CB0-4D1A-B262-535121AADC4A@ccs.neu.edu> <7145D9EB-0FDD-46A4-9985-1427058E49D1@ccs.neu.edu> Message-ID: ok maybe I found a solution: (define (depth a-dl) (cond [(symbol? a-dl) 0] [else (+ 1 (depth (first a-dl)))])) ---------------------------------------- > CC: plt-scheme@list.cs.brown.edu > From: matthias@ccs.neu.edu > Subject: Re: [plt-scheme] solution for exercise 11.2.4 > Date: Tue, 10 Jun 2008 14:08:20 -0400 > To: cr-service@hotmail.it > > > No. Try following the recipe. > > On Jun 10, 2008, at 2:08 PM, carlo ambrogio wrote: > >> >> could it be right? >> >> (define (depth a-dl) >> (cond >> [(symbol? a-dl) 0] >> [else (list? (first a-dl)) (+ 1 (depth (rest a-dl)))])) >> >> >> N.B. at the moment I'm away from my Dr.Scheme program...so I cannot >> run the code above... >> >> ---------------------------------------- >>> CC: plt-scheme@list.cs.brown.edu >>> From: matthias@ccs.neu.edu >>> Subject: Re: [plt-scheme] solution for exercise 11.2.4 >>> Date: Mon, 9 Jun 2008 21:10:25 -0400 >>> To: cr-service@hotmail.it >>> >>> >>> Not true. You answered the question already and they are *trivial* >>> question. I just want you to learn to think about what you're doing >>> instead of just following something in a rote manner. Once you know >>> how to think about it, you'll internalize and empower yourself to >>> apply such things in situations where you never expected it. >>> >>> Try again. I expect an answer in 10 mins. >>> >>> >>> On Jun 9, 2008, at 8:58 PM, carlo ambrogio wrote: >>> >>>> >>>> ok now i'm stucked... >>>> ---------------------------------------- >>>>> CC: plt-scheme@list.cs.brown.edu >>>>> From: matthias@ccs.neu.edu >>>>> Subject: Re: [plt-scheme] solution for exercise 11.2.4 >>>>> Date: Mon, 9 Jun 2008 20:38:29 -0400 >>>>> To: cr-service@hotmail.it >>>>> >>>>> >>>>> Let me rephrase John's criticism: you jumped the gun and shot >>>>> yourself. >>>>> >>>>> Just answer the questions that I asked. Not more, not less. >>>>> >>>>> >>>>> On Jun 9, 2008, at 6:53 PM, carlo ambrogio wrote: >>>>> >>>>>> >>>>>> the template could be: >>>>>> >>>>>> (define (depth a-dl) >>>>>> (cond >>>>>> [(symbol? a-dl) ...] >>>>>> [else ... (first a-dl) ... (depth (rest a-dl)) ...])) >>>>>> >>>>>> how many clauses does the data def have? (how many clauses must >>>>>> the >>>>>> function def have?) >>>>>> >>>>>> I think 2 (the data can be a symbol or a list) >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________________________ >>>>>> Crea il tuo blog su Spaces, condividi le tue esperienze con il >>>>>> mondo! >>>>>> http://home.services.spaces.live.com/ >>>>>> _________________________________________________ >>>>>> For list-related administrative tasks: >>>>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>>>> >>>> >>>> _________________________________________________________________ >>>> Una cena tra amici? Cerca il ristorante con Live Search Maps >>>> http:// >>>> maps.live.it_________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>> >> >> _________________________________________________________________ >> Una cena tra amici? Cerca il ristorante con Live Search Maps >> http://maps.live.it > _________________________________________________________________ Sai che con Messenger guardi la TV con i tuoi amici? http://www.messenger.it/messengertv.html From matthias at ccs.neu.edu Tue Jun 10 19:19:10 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:48 2009 Subject: [plt-scheme] solution for exercise 11.2.4 In-Reply-To: References: <0408F3D6-6CB0-4D1A-B262-535121AADC4A@ccs.neu.edu> <7145D9EB-0FDD-46A4-9985-1427058E49D1@ccs.neu.edu> Message-ID: You'd get a 60% in my course for that one. On Jun 10, 2008, at 7:00 PM, carlo ambrogio wrote: > > ok maybe I found a solution: > > (define (depth a-dl) > (cond > [(symbol? a-dl) 0] > [else (+ 1 (depth (first a-dl)))])) > ---------------------------------------- >> CC: plt-scheme@list.cs.brown.edu >> From: matthias@ccs.neu.edu >> Subject: Re: [plt-scheme] solution for exercise 11.2.4 >> Date: Tue, 10 Jun 2008 14:08:20 -0400 >> To: cr-service@hotmail.it >> >> >> No. Try following the recipe. >> >> On Jun 10, 2008, at 2:08 PM, carlo ambrogio wrote: >> >>> >>> could it be right? >>> >>> (define (depth a-dl) >>> (cond >>> [(symbol? a-dl) 0] >>> [else (list? (first a-dl)) (+ 1 (depth (rest a-dl)))])) >>> >>> >>> N.B. at the moment I'm away from my Dr.Scheme program...so I cannot >>> run the code above... >>> >>> ---------------------------------------- >>>> CC: plt-scheme@list.cs.brown.edu >>>> From: matthias@ccs.neu.edu >>>> Subject: Re: [plt-scheme] solution for exercise 11.2.4 >>>> Date: Mon, 9 Jun 2008 21:10:25 -0400 >>>> To: cr-service@hotmail.it >>>> >>>> >>>> Not true. You answered the question already and they are *trivial* >>>> question. I just want you to learn to think about what you're doing >>>> instead of just following something in a rote manner. Once you know >>>> how to think about it, you'll internalize and empower yourself to >>>> apply such things in situations where you never expected it. >>>> >>>> Try again. I expect an answer in 10 mins. >>>> >>>> >>>> On Jun 9, 2008, at 8:58 PM, carlo ambrogio wrote: >>>> >>>>> >>>>> ok now i'm stucked... >>>>> ---------------------------------------- >>>>>> CC: plt-scheme@list.cs.brown.edu >>>>>> From: matthias@ccs.neu.edu >>>>>> Subject: Re: [plt-scheme] solution for exercise 11.2.4 >>>>>> Date: Mon, 9 Jun 2008 20:38:29 -0400 >>>>>> To: cr-service@hotmail.it >>>>>> >>>>>> >>>>>> Let me rephrase John's criticism: you jumped the gun and shot >>>>>> yourself. >>>>>> >>>>>> Just answer the questions that I asked. Not more, not less. >>>>>> >>>>>> >>>>>> On Jun 9, 2008, at 6:53 PM, carlo ambrogio wrote: >>>>>> >>>>>>> >>>>>>> the template could be: >>>>>>> >>>>>>> (define (depth a-dl) >>>>>>> (cond >>>>>>> [(symbol? a-dl) ...] >>>>>>> [else ... (first a-dl) ... (depth (rest a-dl)) ...])) >>>>>>> >>>>>>> how many clauses does the data def have? (how many clauses must >>>>>>> the >>>>>>> function def have?) >>>>>>> >>>>>>> I think 2 (the data can be a symbol or a list) >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> ________________________________________________________________ >>>>>>> _ >>>>>>> Crea il tuo blog su Spaces, condividi le tue esperienze con il >>>>>>> mondo! >>>>>>> http://home.services.spaces.live.com/ >>>>>>> _________________________________________________ >>>>>>> For list-related administrative tasks: >>>>>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>>>>> >>>>> >>>>> _________________________________________________________________ >>>>> Una cena tra amici? Cerca il ristorante con Live Search Maps >>>>> http:// >>>>> maps.live.it_________________________________________________ >>>>> For list-related administrative tasks: >>>>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >>>> >>> >>> _________________________________________________________________ >>> Una cena tra amici? Cerca il ristorante con Live Search Maps >>> http://maps.live.it >> > > _________________________________________________________________ > Sai che con Messenger guardi la TV con i tuoi amici? > http://www.messenger.it/messengertv.html From clements at brinckerhoff.org Tue Jun 10 19:27:31 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:19:49 2009 Subject: [plt-scheme] macro question In-Reply-To: <484EABDC.3070203@neilvandyke.org> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> <484EABDC.3070203@neilvandyke.org> Message-ID: <89FF0FED-BF1A-4618-8E61-896D82EC2CED@brinckerhoff.org> On Jun 10, 2008, at 9:29 AM, Neil Van Dyke wrote: > (I haven't had a chance yet to look at Typed Scheme, so please > disregard if this doesn't make sense.) > > What if the type inference info is presented to you as part of the > normal view of the program? It's there for you to read, but you > just don't usually edit it yourself. > > I don't know what DrScheme currently does for Typed Scheme, but... > Inferred type info could be conveyed by overlaying the source code > view, such as by inline annotations or maybe mouseovers. Visual- > design-wise, there's an obvious HCI metaphor that might be used: > inferred:express::ephemeral:concrete. You can add an explicit type > qualification by turning an ephemeral concrete and editing it. I'd > imagine that feature useful for both pedagogic and practical use. > > This would also make for another snazzy YouTube video. :) This sounds like a great tool/UI for dealing with HM-style inference. I wouldn't be surprised if something like this already existed for e.g. Haskell. I do recall Joe Wells giving a talk at some point on a graphical tool that would illustrate the "flow of types" showing the path along which a type A and a different type B were in collision. John Clements -------------- 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/20080610/079c49f8/smime.bin From matthias at ccs.neu.edu Tue Jun 10 20:25:40 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:49 2009 Subject: [plt-scheme] macro question In-Reply-To: <484F069C.9040002@cs.caltech.edu> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> <484F069C.9040002@cs.caltech.edu> Message-ID: <0B79F5F8-C303-4FE5-BABE-6733A82EE7D1@ccs.neu.edu> On Jun 10, 2008, at 6:56 PM, Michael Vanier wrote: > Parenthetically, both Python and Perl are considering adopting some > kind of explicit type annotations to the language. It would be > cool for PLT Scheme to do it earlier and better than either of them. The Rice Scheme community has been working on types for untyped language since 1987/8. I could be wrong but I think that Python wasn't even around then. The Typed Scheme project is now close to 18 months old. The 4.0 release is the first release that includes Typed Scheme as a core language rather than as a PLaneT package. We published our first paper within a month of the 'gradual typing' guys who chose a non-selective venue (the Scheme workshop) while we chose a selective one (the Dynamic Language Symposium). The Python and Perl 6 people claim to follow the lead of that work. If they understood that just adding type annotations at random places is unsound, they might pay attention to Typed Scheme. BUT, these people don't even know what 'unsound' could mean, so I have no hope that they would ever understand the word 'type' either. Citations for Typed Scheme available from http://www.ccs.neu.edu/ scheme/pubs/ (Tobin-Hochstadt). -- Matthias From workmin at ccs.neu.edu Tue Jun 10 21:59:03 2008 From: workmin at ccs.neu.edu (Jon Rafkind) Date: Thu Mar 26 02:19:49 2009 Subject: [plt-scheme] plt web server question In-Reply-To: <484F040C.5010802@cs.utah.edu> References: <484E0154.1010107@cs.utah.edu> <484E9A68.6030406@cs.utah.edu> <484F040C.5010802@cs.utah.edu> Message-ID: <484F3167.8060301@ccs.neu.edu> Chongkai Zhu wrote: > Many thanks. Finally I finished it (for now). For anyone interested: > it is a Scheme REPL through web interface (attached). > > I just used HTML textarea to hold information. So it's pretty simple: > only pure text is allowed, and I don't know for now how to (by using > javascript) to control the scrolling in the textarea. If anyone is > interested in puting more fancy Javacript into it to make it feel more > like DrScheme, feel free to do so. That is neat but if I type enough enough expressions are printed in the upper window and I try to scroll down after about half a second the scrollbar will reset to the top rendering the system mostly unuseable after inputting about 7 expressions. Firefox 2.0.0.14. I briefly looked at the javascript you used but I'm not sure what the issue is. From czhu at cs.utah.edu Tue Jun 10 22:53:38 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:49 2009 Subject: [plt-scheme] plt web server question In-Reply-To: <484F3167.8060301@ccs.neu.edu> References: <484E0154.1010107@cs.utah.edu> <484E9A68.6030406@cs.utah.edu> <484F040C.5010802@cs.utah.edu> <484F3167.8060301@ccs.neu.edu> Message-ID: <484F3E32.7040007@cs.utah.edu> The print textarea is locked because obviously user is not allowed to edit it. This cause the problem that user can't scroll it down either, and I don't know how to control that in Javascript. I search online but failed to find any useful information. One thing you can try is to unlock the textarea, maybe just before new data is written to the textarea, and lock it afterwards. Chongkai Jon Rafkind wrote: > Chongkai Zhu wrote: >> Many thanks. Finally I finished it (for now). For anyone interested: >> it is a Scheme REPL through web interface (attached). >> >> I just used HTML textarea to hold information. So it's pretty simple: >> only pure text is allowed, and I don't know for now how to (by using >> javascript) to control the scrolling in the textarea. If anyone is >> interested in puting more fancy Javacript into it to make it feel >> more like DrScheme, feel free to do so. > That is neat but if I type enough enough expressions are printed in > the upper window and I try to scroll down after about half a second > the scrollbar will reset to the top rendering the system mostly > unuseable after inputting about 7 expressions. Firefox 2.0.0.14. I > briefly looked at the javascript you used but I'm not sure what the > issue is. From mhcoffin at gmail.com Tue Jun 10 23:29:04 2008 From: mhcoffin at gmail.com (mhcoffin) Date: Thu Mar 26 02:19:49 2009 Subject: [plt-scheme] Re: macro question In-Reply-To: <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> References: <484BFFC0.3000005@uwaterloo.ca><0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu><20080610154017.GB1761@topoi.pooq.com><6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu><20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> Message-ID: > > My personal opinion is that types do not significantly improve readability > of programs. A good similarity between data structure and the structure of > the procedures acting on these data is far more important, I think (this I > did experience, but not invent by myself, of course) I don't know if this falls under "readability", but it's enormously easier to provide good IDE support for a language with an explicit type system. When I'm reading unfamiliar Java code, I can use Eclipse to navigate directly from the use of a variable to its declaration to the definition of its type, etc. On the other hand, if I'm reading unfamiliar Python code, each of those steps is difficult and error- prone. For a small program, that might not make much difference, but when I'm faced with trying to understand a tiny corner of a 10-million- line code base, explicit types are awfully useful sign posts. -mike From vijay.the.schemer at gmail.com Wed Jun 11 00:26:01 2008 From: vijay.the.schemer at gmail.com (Vijay Mathew) Date: Thu Mar 26 02:19:50 2009 Subject: [plt-scheme] compiling mzscheme without collects Message-ID: <9c57dec20806102126g692b9467hca49a8271bd4ddb8@mail.gmail.com> Is it possible to build mzscheme on Linux, without the libraries in "collects"? I need a bare minimum MzScheme interpreter shell and static library. thank you, -- Vijay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080611/a83c49df/attachment.html From eli at barzilay.org Wed Jun 11 00:32:30 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:50 2009 Subject: [plt-scheme] compiling mzscheme without collects In-Reply-To: <9c57dec20806102126g692b9467hca49a8271bd4ddb8@mail.gmail.com> References: <9c57dec20806102126g692b9467hca49a8271bd4ddb8@mail.gmail.com> Message-ID: <18511.21854.427961.971640@arabic.ccs.neu.edu> On Jun 11, Vijay Mathew wrote: > Is it possible to build mzscheme on Linux, without the libraries in > "collects"? I need a bare minimum MzScheme interpreter shell and > static library. You need the libraries because the build itself is using them, but you can remove them afterwards. However, it's questionable how useful the result will be -- especially with the new release where a lot more of `mzscheme' is implemented in libraries. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From clements at brinckerhoff.org Wed Jun 11 02:15:54 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:19:51 2009 Subject: [plt-scheme] simple question about call/cc? Message-ID: <1014F5F0-811E-40B8-85E1-E8F75287D10A@brinckerhoff.org> I'm grading student assignments, and their job is to convert evaluators to CPS so that implementing continuations is easy. In my sample solution, I evaluate all the arguments in the current continuation and then, if the function position evaluates to a continuation, I apply the enclosed continuation procedure (c) rather than the current k to the value that corresponds to the first argument. All fine and well. Some of my students, though, discover whether the function is a continuation before evaluating the argument; if it is, they evaluate the argument using c as the continuation. As I thought about this, though, it occurred to me that unless you have "fancy stuff" like escape continuations, dynamic wind, or continuation marks, you can't distinguish between these two implementations except by measuring memory use. That's because a continuation captured in this context is going to have a long "tail" (or not) that can never be observed unless you have some operation on the continuation other than simply calling it. Am I correct? John Clements -------------- 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/20080610/91706fb4/smime.bin From jos.koot at telefonica.net Wed Jun 11 04:14:48 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:51 2009 Subject: [plt-scheme] macro question References: <484BFFC0.3000005@uwaterloo.ca><0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu><20080610154017.GB1761@topoi.pooq.com><6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu><20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> <29D82EEF-004D-4459-A5A3-CC75808AAED0@ccs.neu.edu> <002301c8cb2c$a3963970$2101a8c0@uw2b2dff239c4d> Message-ID: <000801c8cb9b$3784ab30$2101a8c0@uw2b2dff239c4d> Thanks, I admit that in the example the adition of the compact type information does in fact improve readability. And of course it is nice that it is checked. You convinced me. Thanks. Jos ----- Original Message ----- From: "Matthias Felleisen" To: "Jos Koot" Cc: Sent: Tuesday, June 10, 2008 11:41 PM Subject: Re: [plt-scheme] macro question > > On Jun 10, 2008, at 3:03 PM, Jos Koot wrote: > snip> > > Before we talk too abstractly here, let's look at an example: > > UNTYPED > >> #lang scheme >> >> ;; An A is one of: >> ;; -- Number >> ;; -- Boolean >> ;; -- (cons A A) >> >> ;; A -> Number >> ;; compute the sum of all numbers in the tree >> (define (Sigma tree) >> (cond >> [(number? tree) tree] >> [(boolean? tree) 0] >> [else (+ (Sigma (car tree)) (Sigma (cdr tree)))])) >> >> (= (Sigma (cons (cons #t 5) 0)) 5) > > TYPED: > >> #lang typed-scheme >> >> (define-type-alias A (mu A (U Number Boolean (cons A A)))) >> >> (: Sigma (A -> Number)) >> ;; compute the sum of all numbers in the tree >> (define (Sigma tree) >> (cond >> [(number? tree) tree] >> [(boolean? tree) 0] >> [else (+ (Sigma (car tree)) (Sigma (cdr tree)))])) >> >> (= (Sigma (cons (cons #t 5) 0)) 5) >> > > > In general, Typed Scheme is as compact as untyped Scheme in HtDP style. > And it is checked for you. -- Matthias > From jos.koot at telefonica.net Wed Jun 11 04:22:30 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:51 2009 Subject: [plt-scheme] Re: macro question References: <484BFFC0.3000005@uwaterloo.ca><0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu><20080610154017.GB1761@topoi.pooq.com><6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu><20080610164110.GE1761@topoi.pooq.com><001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> Message-ID: <002601c8cb9c$4ae90120$2101a8c0@uw2b2dff239c4d> Earlier I wrote: > Much of this discussion is above my head. Yet a few short, may be silly, > remarks. snip > My personal opinion is that types do not significantly improve readability > of programs. A good similarity between data structure and the structure of > the procedures acting on these data is far more important, I think (this I > did experience, but not invent by myself, of course) snip Thanks to all who reponded on my >silly< remarks. You all did indead clear up things for me and I'll have to reconsider, my opion. Thanks Jos From jos.koot at telefonica.net Wed Jun 11 04:30:49 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:52 2009 Subject: [plt-scheme] macro question References: <484BFFC0.3000005@uwaterloo.ca><0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu><20080610154017.GB1761@topoi.pooq.com><6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu><20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> Message-ID: <005901c8cb9d$742ded10$2101a8c0@uw2b2dff239c4d> ----- Original Message ----- From: "Filipe Cabecinhas" To: "Jos Koot" Cc: Sent: Tuesday, June 10, 2008 10:35 PM Subject: Re: [plt-scheme] macro question Hi On 10 Jun, 2008, at 18:46, Jos Koot wrote: > Much of this discussion is above my head. Yet a few short, may be silly, > remarks. Ditto :-) > My personal opinion is that types do not significantly improve > readability of programs. A good similarity between data structure and the > structure of the procedures acting on these data is far more important, I > think (this I did experience, but not invent by myself, of course) Are you thinking in types "? l? C"? As in, having to type (almost) every expression by hand? Or do you feel that even with a type system like Haskell's? I did not think of a particular type system. I have not much knwoledge of them. But as you may have guessed I was worried that a type system would put me in an inflexible cuirass (as in C) I have been convinced by this thread that my fear is not needed. Thanks, Jos > And of course a typed Scheme should not decrease the possibility to write > generic procedures (as is easily done in Scheme) Mho. Indeed, it shouldn't. You should be able to write polymorphic functions in it, at least. > And how is this related to writing very general procedures that are > independent of the data representation? For example, when parameterized > for the correct accessor and comparator, a binary search in a sorted > string can be exactly the same as one in a sorted vector. Please don't > convert Scheme into C++, which requires explicit overloading of > operators. I never felt comfortable with the overloading tools of C++. > How would a typed Scheme handle procedure *sort*? It should, if possible > at compile time, check that the object to be sorted and the comparator > are compatible with each other. If you use a system like Haskell's type classes, you don't have operator overloading, you have functions which operate on type classes (instead of types) and, when your type belongs to that class, you can use it in any function for that type class. That's how the numeric operators are written, for example. You just have to provide some functions for your type and then you "unlock" the whole type class and its functions. So, your parameterized sort would receive an accessor, a comparator and a sequence/collection. With type classes you wouldn't even need the accessor and comparator, you would just make the sequence type implement the IndexedSequence (for example) type class, and make the element type an instance of Ord. Trying to derive a type blindly, I would say: sort :: (IndexedSequence a, Ord b) => a b -> a b If you wanted, you could really pass it a function, for when you don't want to use < (or >), but your own predicate (without disturbing the Ord declaration or without having to make one). sortWith :: (IndexedSequence a) => a b -> (b -> b -> Bool) -> a b I hope I didn't add too much noise :-) - Filipe Cabecinhas From mark.engelberg at gmail.com Wed Jun 11 04:33:46 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:52 2009 Subject: [plt-scheme] macro question In-Reply-To: References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> <6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu> <20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> <29D82EEF-004D-4459-A5A3-CC75808AAED0@ccs.neu.edu> <002301c8cb2c$a3963970$2101a8c0@uw2b2dff239c4d> Message-ID: If you want to use contracts in Typed Scheme, do you have to restate all the aspects of the contract that are already checked by the type system, or can you just focus on the properties that are not enforced by the type system (e.g. input must be a *positive* integer)? --Mark On Tue, Jun 10, 2008 at 2:41 PM, Matthias Felleisen wrote: > Before we talk too abstractly here, let's look at an example: > > UNTYPED > >> #lang scheme >> >> ;; An A is one of: >> ;; -- Number >> ;; -- Boolean >> ;; -- (cons A A) >> >> ;; A -> Number >> ;; compute the sum of all numbers in the tree >> (define (Sigma tree) >> (cond >> [(number? tree) tree] >> [(boolean? tree) 0] >> [else (+ (Sigma (car tree)) (Sigma (cdr tree)))])) >> >> (= (Sigma (cons (cons #t 5) 0)) 5) > > TYPED: > >> #lang typed-scheme >> >> (define-type-alias A (mu A (U Number Boolean (cons A A)))) >> >> (: Sigma (A -> Number)) >> ;; compute the sum of all numbers in the tree >> (define (Sigma tree) >> (cond >> [(number? tree) tree] >> [(boolean? tree) 0] >> [else (+ (Sigma (car tree)) (Sigma (cdr tree)))])) >> >> (= (Sigma (cons (cons #t 5) 0)) 5) >> > > > In general, Typed Scheme is as compact as untyped Scheme in HtDP style. And > it is checked for you. -- Matthias > From cristi at ot.onrc.ro Wed Jun 11 05:02:09 2008 From: cristi at ot.onrc.ro (Cristian Baboi) Date: Thu Mar 26 02:19:52 2009 Subject: [plt-scheme] call/cc behavior in gambit-c vs. plt-scheme Message-ID: Hello! Trying to learn scheme, I've made this small test file and tried it in gambit-c and plt-scheme. (define (call/ccc x) (call-with-current-continuation x)) (define coco 1) (begin (display "begin") (newline) (call/ccc (lambda (c) (set! coco c))) (display "again") (newline) (display "end") (newline) ) (coco 13) The result was: - plt-scheme printed: begin again end 13 - gambit-c printed: begin again end again end again end ... My question: which one is the intended behavior ? Thank you! ________ Information from NOD32 ________ This message was checked by NOD32 Antivirus System for Linux Mail Servers. part000.txt - is OK http://www.eset.com From filcab at gmail.com Wed Jun 11 06:03:06 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:19:52 2009 Subject: [plt-scheme] call/cc behavior in gambit-c vs. plt-scheme In-Reply-To: References: Message-ID: <47C91D81-3A8B-4609-BF50-C1F7EFA5DCBE@gmail.com> Hi, I'm no expert, but I'll give you my interpretation. I think the difference is because mzscheme has a delimited continuation at the top-level so you can't capture anything beyond that with call/cc. And I suppose it will also "merge" the begin with the top-level (making it a no-op) so you won't even get the "again \nend" twice. But you better wait for a reply from someone that knows mzscheme better :-) - Filipe Cabecinhas From cristi at ot.onrc.ro Wed Jun 11 06:29:03 2008 From: cristi at ot.onrc.ro (Cristian Baboi) Date: Thu Mar 26 02:19:52 2009 Subject: [plt-scheme] call/cc behavior in gambit-c vs. plt-scheme In-Reply-To: <47C91D81-3A8B-4609-BF50-C1F7EFA5DCBE@gmail.com> References: <47C91D81-3A8B-4609-BF50-C1F7EFA5DCBE@gmail.com> Message-ID: I think you are right. I tryed this: (define (call/ccc x) (call-with-current-continuation x)) (define coco 1) (define (run) (begin (display "begin") (newline) (call/ccc (lambda (c) (set! coco c))) (display "again") (newline) (display "end") (newline) ) ) (run) (coco 13) and this time I've got: - mzscheme: begin again end again end - gambit-c: begin again end again end again end again end again end .... On Wed, 11 Jun 2008 13:03:06 +0300, Filipe Cabecinhas wrote: > Hi, > > I'm no expert, but I'll give you my interpretation. > > I think the difference is because mzscheme has a delimited continuation > at the top-level so you can't capture anything beyond that with call/cc. > And I suppose it will also "merge" the begin with the top-level (making > it a no-op) so you won't even get the "again\nend" twice. > > But you better wait for a reply from someone that knows mzscheme better > :-) > > - Filipe Cabecinhas > ________ Information from NOD32 ________ This message was checked by NOD32 Antivirus System for Linux Mail Servers. part000.txt - is OK http://www.eset.com From matthias at ccs.neu.edu Wed Jun 11 07:53:19 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:52 2009 Subject: [plt-scheme] call/cc behavior in gambit-c vs. plt-scheme In-Reply-To: References: <47C91D81-3A8B-4609-BF50-C1F7EFA5DCBE@gmail.com> Message-ID: Now add (coco 14) to the begin sequence. -- Matthias On Jun 11, 2008, at 6:29 AM, Cristian Baboi wrote: > I think you are right. I tryed this: > > (define (call/ccc x) (call-with-current-continuation x)) > > (define coco 1) > (define (run) > (begin > (display "begin") (newline) > (call/ccc (lambda (c) (set! coco c))) > (display "again") (newline) > (display "end") (newline) > ) > ) > > > (run) > (coco 13) > > and this time I've got: > - mzscheme: > begin > again > end > again > end > > - gambit-c: > begin > again > end > again > end > again > end > again > end > again > end > .... > > > > On Wed, 11 Jun 2008 13:03:06 +0300, Filipe Cabecinhas > wrote: > >> Hi, >> >> I'm no expert, but I'll give you my interpretation. >> >> I think the difference is because mzscheme has a delimited >> continuation at the top-level so you can't capture anything beyond >> that with call/cc. And I suppose it will also "merge" the begin >> with the top-level (making it a no-op) so you won't even get the >> "again\nend" twice. >> >> But you better wait for a reply from someone that knows mzscheme >> better :-) >> >> - Filipe Cabecinhas >> > > > ________ Information from NOD32 ________ > This message was checked by NOD32 Antivirus System for Linux Mail > Servers. > part000.txt - is OK > http://www.eset.com > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From matthias at ccs.neu.edu Wed Jun 11 07:54:52 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:53 2009 Subject: [plt-scheme] Re: macro question In-Reply-To: References: <484BFFC0.3000005@uwaterloo.ca><0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu><20080610154017.GB1761@topoi.pooq.com><6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu><20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> Message-ID: <8994BE0C-00E2-4D2D-8F8F-840ADEF5C687@ccs.neu.edu> Now try DrScheme to get *real* support for navigation, in an UNtyped language. When Eclipse can draw the arrows, I might consider switching -- Matthias On Jun 10, 2008, at 11:29 PM, mhcoffin wrote: >> >> My personal opinion is that types do not significantly improve >> readability >> of programs. A good similarity between data structure and the >> structure of >> the procedures acting on these data is far more important, I think >> (this I >> did experience, but not invent by myself, of course) > > I don't know if this falls under "readability", but it's enormously > easier to provide good IDE support for a language with an explicit > type system. When I'm reading unfamiliar Java code, I can use Eclipse > to navigate directly from the use of a variable to its declaration to > the definition of its type, etc. On the other hand, if I'm reading > unfamiliar Python code, each of those steps is difficult and error- > prone. For a small program, that might not make much difference, but > when I'm faced with trying to understand a tiny corner of a 10- > million- > line code base, explicit types are awfully useful sign posts. > > -mike > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From matthias at ccs.neu.edu Wed Jun 11 07:55:25 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:53 2009 Subject: [plt-scheme] macro question In-Reply-To: References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> <6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu> <20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> <29D82EEF-004D-4459-A5A3-CC75808AAED0@ccs.neu.edu> <002301c8cb2c$a3963970$2101a8c0@uw2b2dff239c4d> Message-ID: TS and contracts aren't integrated yet. See earlier reply -- Matthias On Jun 11, 2008, at 4:33 AM, Mark Engelberg wrote: > If you want to use contracts in Typed Scheme, do you have to restate > all the aspects of the contract that are already checked by the type > system, or can you just focus on the properties that are not enforced > by the type system (e.g. input must be a *positive* integer)? > > --Mark > > On Tue, Jun 10, 2008 at 2:41 PM, Matthias Felleisen > wrote: > >> Before we talk too abstractly here, let's look at an example: >> >> UNTYPED >> >>> #lang scheme >>> >>> ;; An A is one of: >>> ;; -- Number >>> ;; -- Boolean >>> ;; -- (cons A A) >>> >>> ;; A -> Number >>> ;; compute the sum of all numbers in the tree >>> (define (Sigma tree) >>> (cond >>> [(number? tree) tree] >>> [(boolean? tree) 0] >>> [else (+ (Sigma (car tree)) (Sigma (cdr tree)))])) >>> >>> (= (Sigma (cons (cons #t 5) 0)) 5) >> >> TYPED: >> >>> #lang typed-scheme >>> >>> (define-type-alias A (mu A (U Number Boolean (cons A A)))) >>> >>> (: Sigma (A -> Number)) >>> ;; compute the sum of all numbers in the tree >>> (define (Sigma tree) >>> (cond >>> [(number? tree) tree] >>> [(boolean? tree) 0] >>> [else (+ (Sigma (car tree)) (Sigma (cdr tree)))])) >>> >>> (= (Sigma (cons (cons #t 5) 0)) 5) >>> >> >> >> In general, Typed Scheme is as compact as untyped Scheme in HtDP >> style. And >> it is checked for you. -- Matthias >> From hendrik at topoi.pooq.com Wed Jun 11 08:02:17 2008 From: hendrik at topoi.pooq.com (hendrik@topoi.pooq.com) Date: Thu Mar 26 02:19:53 2009 Subject: [plt-scheme] macro question In-Reply-To: <484F069C.9040002@cs.caltech.edu> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> <484F069C.9040002@cs.caltech.edu> Message-ID: <20080611120217.GA1760@topoi.pooq.com> On Tue, Jun 10, 2008 at 03:56:28PM -0700, Michael Vanier wrote: > My experience with ML and Haskell suggests that local type inference is a > big win, global type inference much less so. Thanks for the terminology -- local vs. global type inference. It's a clean separation between the kind of type inference I find useful and the kind I find confusing (though I do understand how it works). -- hendrik From hendrik at topoi.pooq.com Wed Jun 11 08:16:01 2008 From: hendrik at topoi.pooq.com (hendrik@topoi.pooq.com) Date: Thu Mar 26 02:19:53 2009 Subject: [plt-scheme] macro question In-Reply-To: References: <20080610154017.GB1761@topoi.pooq.com> <6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu> <20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> <29D82EEF-004D-4459-A5A3-CC75808AAED0@ccs.neu.edu> <002301c8cb2c$a3963970$2101a8c0@uw2b2dff239c4d> Message-ID: <20080611121601.GB1760@topoi.pooq.com> On Wed, Jun 11, 2008 at 07:55:25AM -0400, Matthias Felleisen wrote: > > TS and contracts aren't integrated yet. See earlier reply -- Matthias Doesn't TS convert types to contracts at module boundaries? -- hendrik From matthias at ccs.neu.edu Wed Jun 11 08:45:29 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:53 2009 Subject: [plt-scheme] macro question In-Reply-To: <20080611121601.GB1760@topoi.pooq.com> References: <20080610154017.GB1761@topoi.pooq.com> <6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu> <20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> <29D82EEF-004D-4459-A5A3-CC75808AAED0@ccs.neu.edu> <002301c8cb2c$a3963970$2101a8c0@uw2b2dff239c4d> <20080611121601.GB1760@topoi.pooq.com> Message-ID: <5314828D-9D6D-4E1B-A1A2-DA34EC30C5D0@ccs.neu.edu> On Jun 11, 2008, at 8:16 AM, hendrik@topoi.pooq.com wrote: > On Wed, Jun 11, 2008 at 07:55:25AM -0400, Matthias Felleisen wrote: >> >> TS and contracts aren't integrated yet. See earlier reply -- Matthias > > Doesn't TS convert types to contracts at module boundaries? It does. But integration would mean something like this: (provide/contract/typed [retrieve ((listof X) (contract int (lambda (l i) (<= 0 i (- (length l) 1)))) -> X)]) That is, you can impose contracts AND types on an exported identifiers. -- Matthias From matthias at ccs.neu.edu Wed Jun 11 09:21:59 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:53 2009 Subject: [plt-scheme] simple question about call/cc? In-Reply-To: <1014F5F0-811E-40B8-85E1-E8F75287D10A@brinckerhoff.org> References: <1014F5F0-811E-40B8-85E1-E8F75287D10A@brinckerhoff.org> Message-ID: On Jun 11, 2008, at 2:15 AM, John Clements wrote: > I'm grading student assignments, and their job is to convert > evaluators to CPS so that implementing continuations is easy. In my > sample solution, I evaluate all the arguments in the current > continuation and then, if the function position evaluates to a > continuation, I apply the enclosed continuation procedure (c) > rather than the current k to the value that corresponds to the > first argument. It is great to see that you're teaching CPSing in an undergraduate PL course, the way life should be. > > All fine and well. > > Some of my students, though, discover whether the function is a > continuation before evaluating the argument; if it is, they > evaluate the argument using c as the continuation. > > As I thought about this, though, it occurred to me that unless you > have "fancy stuff" like escape continuations, dynamic wind, or > continuation marks, you can't distinguish between these two > implementations except by measuring memory use. That's because a > continuation captured in this context is going to have a long > "tail" (or not) that can never be observed unless you have some > operation on the continuation other than simply calling it. > > Am I correct? I think so. Write a Redex model and run subject-reduction tests. This should be fairly easy. -- Matthias From spdegabrielle at gmail.com Wed Jun 11 10:41:36 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:19:54 2009 Subject: [plt-scheme] mail-parse.ss In-Reply-To: <595b9ab20806060409s1823bdf5v40e5337b6015be7@mail.gmail.com> References: <595b9ab20806060409s1823bdf5v40e5337b6015be7@mail.gmail.com> Message-ID: <595b9ab20806110741p754b707eh307f0ebf04316f3f@mail.gmail.com> Hi, I've been fiddling with the mail-parse.ss library. (planet "mail-parse.ss" ("mburns" "mail-parse.plt" 1 0)) I've version-4-ised it and changed a regular expression to handle 'eml' and 'mail' files (ala thunderbird and outlook express): ;; Is this line the start of a new email? (define (new-email? line) (pregexp-match "^(?mi:From|To|Envelope.*|Received|Return-Path|Date|Subject|Content\\-.*|MIME-Version|Forwarded|Message.*|From\\s)" line)) I stole the regex from the Greenstone Digital Library: http://trac.greenstone.org/browser/gsdl/trunk/perllib/plugins/EmailPlugin.pm (html page of the code via a trac instance) I haven't updated it on planet, because it's not my library. (I've email the author, but got no response) Should I update it on planet myself? Is it appropriate without permission. (the author asserts copyright, but I don't know what license LGPL perhaps?) 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 -- 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 spdegabrielle at gmail.com Wed Jun 11 10:47:13 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:19:54 2009 Subject: [plt-scheme] Re: mail-parse.ss In-Reply-To: <595b9ab20806060431i13ad3bcex2766cbc65e4cbaf2@mail.gmail.com> References: <595b9ab20806060409s1823bdf5v40e5337b6015be7@mail.gmail.com> <595b9ab20806060431i13ad3bcex2766cbc65e4cbaf2@mail.gmail.com> Message-ID: <595b9ab20806110747n63e881a0gcaa40a6076cbcdce@mail.gmail.com> Sorry, I forgot to actually attach my modified version Cheers, Stephen -------------- next part -------------- A non-text attachment was scrubbed... Name: mail-parse.ss Type: application/octet-stream Size: 5360 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080611/f96a4c51/mail-parse.obj From matthias at ccs.neu.edu Wed Jun 11 10:47:45 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:54 2009 Subject: [plt-scheme] Re: mail-parse.ss In-Reply-To: <595b9ab20806110747n63e881a0gcaa40a6076cbcdce@mail.gmail.com> References: <595b9ab20806060409s1823bdf5v40e5337b6015be7@mail.gmail.com> <595b9ab20806060431i13ad3bcex2766cbc65e4cbaf2@mail.gmail.com> <595b9ab20806110747n63e881a0gcaa40a6076cbcdce@mail.gmail.com> Message-ID: <28A8D8B1-E88F-4804-8410-DF195DFFDCE1@ccs.neu.edu> Please update as soon as PLaneT 4.0 is stable. On Jun 11, 2008, at 10:47 AM, Stephen De Gabrielle wrote: > Sorry, I forgot to actually attach my modified version > > Cheers, > > Stephen parse.ss>_________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mflatt at cs.utah.edu Wed Jun 11 10:59:13 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:55 2009 Subject: [plt-scheme] call/cc behavior in gambit-c vs. plt-scheme In-Reply-To: <47C91D81-3A8B-4609-BF50-C1F7EFA5DCBE@gmail.com> References: <47C91D81-3A8B-4609-BF50-C1F7EFA5DCBE@gmail.com> Message-ID: <20080611145914.ACA22650091@mail-svr1.cs.utah.edu> At Wed, 11 Jun 2008 11:03:06 +0100, Filipe Cabecinhas wrote: > I think the difference is because mzscheme has a delimited > continuation at the top-level so you can't capture anything beyond > that with call/cc. And I suppose it will also "merge" the begin with > the top-level (making it a no-op) so you won't even get the "again > \nend" twice. That's all correct. Matthew From dherman at ccs.neu.edu Wed Jun 11 11:39:45 2008 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Mar 26 02:19:55 2009 Subject: [plt-scheme] macro question In-Reply-To: <89FF0FED-BF1A-4618-8E61-896D82EC2CED@brinckerhoff.org> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> <484EABDC.3070203@neilvandyke.org> <89FF0FED-BF1A-4618-8E61-896D82EC2CED@brinckerhoff.org> Message-ID: <484FF1C1.2010509@ccs.neu.edu> I'm pretty sure there are a couple such tools for HM languages. I played with SML.NET a while ago, which IIRC provides incremental type inference and gives you types of subexpressions when you hover over them. It was pretty brittle (and slooooow) when last I tried it, but I think it was just a proof-of-concept. One of the UI issues is figuring out which subexpression the user wants type information for when they hover over a position in the program. It made it pretty frustrating as tiny movements of the mouse would totally change the feedback I was getting. Dave John Clements wrote: > > On Jun 10, 2008, at 9:29 AM, Neil Van Dyke wrote: > >> (I haven't had a chance yet to look at Typed Scheme, so please >> disregard if this doesn't make sense.) >> >> What if the type inference info is presented to you as part of the >> normal view of the program? It's there for you to read, but you just >> don't usually edit it yourself. >> >> I don't know what DrScheme currently does for Typed Scheme, but... >> Inferred type info could be conveyed by overlaying the source code >> view, such as by inline annotations or maybe mouseovers. >> Visual-design-wise, there's an obvious HCI metaphor that might be >> used: inferred:express::ephemeral:concrete. You can add an explicit >> type qualification by turning an ephemeral concrete and editing it. >> I'd imagine that feature useful for both pedagogic and practical use. >> >> This would also make for another snazzy YouTube video. :) > > This sounds like a great tool/UI for dealing with HM-style inference. I > wouldn't be surprised if something like this already existed for e.g. > Haskell. I do recall Joe Wells giving a talk at some point on a > graphical tool that would illustrate the "flow of types" showing the > path along which a type A and a different type B were in collision. > > John Clements > > > ------------------------------------------------------------------------ > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mhcoffin at gmail.com Wed Jun 11 12:30:33 2008 From: mhcoffin at gmail.com (Michael Coffin) Date: Thu Mar 26 02:19:56 2009 Subject: [plt-scheme] Re: macro question In-Reply-To: <8994BE0C-00E2-4D2D-8F8F-840ADEF5C687@ccs.neu.edu> References: <484BFFC0.3000005@uwaterloo.ca> <0F7E05E4-1E9F-4898-B28A-7895243C5CB1@ccs.neu.edu> <20080610154017.GB1761@topoi.pooq.com> <6E85DD1C-73AD-4342-8189-088408407AD3@ccs.neu.edu> <20080610164110.GE1761@topoi.pooq.com> <001a01c8cb21$e27050f0$2101a8c0@uw2b2dff239c4d> <8994BE0C-00E2-4D2D-8F8F-840ADEF5C687@ccs.neu.edu> Message-ID: <8a96949d0806110930j41775362k9cf8c4b31d8141cf@mail.gmail.com> Maybe I'm just missing something; I haven't done anything very serious with drscheme. Suppose I'm reading along and encounter a function parameter that appears to be an instance of some class. How do I get it to draw an arrow to the definition of that class? On Wed, Jun 11, 2008 at 4:54 AM, Matthias Felleisen wrote: > > Now try DrScheme to get *real* support for navigation, in an UNtyped > language. When Eclipse can draw the arrows, I might consider switching -- > Matthias > > > > > On Jun 10, 2008, at 11:29 PM, mhcoffin wrote: > > >>> My personal opinion is that types do not significantly improve >>> readability >>> of programs. A good similarity between data structure and the structure >>> of >>> the procedures acting on these data is far more important, I think (this >>> I >>> did experience, but not invent by myself, of course) >>> >> >> I don't know if this falls under "readability", but it's enormously >> easier to provide good IDE support for a language with an explicit >> type system. When I'm reading unfamiliar Java code, I can use Eclipse >> to navigate directly from the use of a variable to its declaration to >> the definition of its type, etc. On the other hand, if I'm reading >> unfamiliar Python code, each of those steps is difficult and error- >> prone. For a small program, that might not make much difference, but >> when I'm faced with trying to understand a tiny corner of a 10-million- >> line code base, explicit types are awfully useful sign posts. >> >> -mike >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080611/8ce22c11/attachment.htm From narutocanada at gmail.com Wed Jun 11 15:03:54 2008 From: narutocanada at gmail.com (narutocanada@gmail.com) Date: Thu Mar 26 02:19:56 2009 Subject: [plt-scheme] mz-372 does not allow -O3 optimization Message-ID: <92940b3b-adfe-48c8-bbca-3db1eb4c38e9@r37g2000prm.googlegroups.com> hi I tried to compile mz-372 with -O3 optimization but failed, Copying /build/mz-372/collects/mzlib/private/cm-ctime.ss to /build/ mz-372/src/mzscheme/gc2/xform-collects/mzlib/private/cm-ctime.ss Compiling xform support... Done making xform-collects. make[4]: *** [xsrc/precomp.h] Segmentation fault make[4]: Leaving directory `/build/mz-372/src/mzscheme/gc2' make[3]: *** [all] Error 2 make[3]: Leaving directory `/build/mz-372/src/mzscheme/gc2' make[2]: *** [3m] Error 2 make[2]: Leaving directory `/build/mz-372/src/mzscheme' make[1]: *** [3m] Error 2 make[1]: Leaving directory `/build/mz-372/src' make: *** [all] Error 2 -O2 works OK. I don't really need any optimization, just reporting this problem. From spdegabrielle at gmail.com Wed Jun 11 16:31:39 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:19:56 2009 Subject: [plt-scheme] FYI: Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme for Game Development Message-ID: <595b9ab20806111331r79ad70d1gf1b50c904fde9bba@mail.gmail.com> " Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme for Game Development" -- http://bc.tech.coop/blog/080606.html Cheers, Stephen From filcab at gmail.com Wed Jun 11 17:05:10 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:19:56 2009 Subject: [plt-scheme] mz-372 does not allow -O3 optimization In-Reply-To: <92940b3b-adfe-48c8-bbca-3db1eb4c38e9@r37g2000prm.googlegroups.com> References: <92940b3b-adfe-48c8-bbca-3db1eb4c38e9@r37g2000prm.googlegroups.com> Message-ID: <8D946D28-1EE5-4B5E-B3EA-981E9C8225EA@gmail.com> Hi, On 11 Jun, 2008, at 20:03, narutocanada@gmail.com wrote: > I tried to compile mz-372 with -O3 optimization but failed, You should be warned that -O3 has some dangerous optimizations which may even make the program slower (it unrolls more loops more aggressively (among other things) and will easily trash your instruction cache, making your program slower). Normally you get the best results at -O2 or -Os (last time I checked - Os was a bit more unstable... But the Linux kernel is often built with -Os so it should be pretty stable). As for the errors... You should check it with a debug utility (gdb, valgrind) to see where it blows up. - Filipe Cabecinhas From lunarc.lists at gmail.com Wed Jun 11 18:24:51 2008 From: lunarc.lists at gmail.com (Henk Boom) Date: Thu Mar 26 02:19:56 2009 Subject: [plt-scheme] FYI: Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme for Game Development In-Reply-To: <595b9ab20806111331r79ad70d1gf1b50c904fde9bba@mail.gmail.com> References: <595b9ab20806111331r79ad70d1gf1b50c904fde9bba@mail.gmail.com> Message-ID: 2008/6/11 Stephen De Gabrielle : > " Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme > for Game Development" -- http://bc.tech.coop/blog/080606.html Anyone know if there will be notes of some sort available afterwards? This is a subject which I'm interested in but it's on the other side of the country. Henk From matthias at ccs.neu.edu Wed Jun 11 19:21:12 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] FYI: Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme for Game Development In-Reply-To: References: <595b9ab20806111331r79ad70d1gf1b50c904fde9bba@mail.gmail.com> Message-ID: How about a youtube video? -- Matthias On Jun 11, 2008, at 6:24 PM, Henk Boom wrote: > 2008/6/11 Stephen De Gabrielle : >> " Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme >> for Game Development" -- http://bc.tech.coop/blog/080606.html > > Anyone know if there will be notes of some sort available afterwards? > This is a subject which I'm interested in but it's on the other side > of the country. > > Henk > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robby at cs.uchicago.edu Wed Jun 11 20:52:32 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] Fwd: [Haskell] 2008 ICFP Programming Contest In-Reply-To: <4683d9370806111741u50ae96fcl81818371426d42b3@mail.gmail.com> References: <4683d9370806061422j4fb4b038td73d077459778d9@mail.gmail.com> <4683d9370806111741u50ae96fcl81818371426d42b3@mail.gmail.com> Message-ID: <932b2f1f0806111752q5d0fd768kd3b55c2045a355b5@mail.gmail.com> FYI. Robby ---------- Forwarded message ---------- From: Tim Chevalier Date: Wed, Jun 11, 2008 at 7:41 PM Subject: [Haskell] 2008 ICFP Programming Contest To: haskell@haskell.org [Re-posting since the first message was apparently held due to the large number of recipients. Apologies if this shows up more than once, and please forward to any appropriate lists where it hasn't showed up already.] Mark your calendars for Friday, July 11, 2008 to Monday, July 14, 2008: the dates for the eleventh annual ICFP Programming Contest. The ICFP Programming Contest is one of the most advanced and prestigious programming contests, as well as being a chance to show off your programming skills, your favorite languages and tools, and your ability to work as a team. The contest is affiliated with the International Conference on Functional Programming. Teams consisting of one or more participants, from any part of the world, using any programming language, may enter. The specific task will be announced when the contest begins. In the meantime, watch the Web site for more information: http://icfpcontest.org/ Please direct any questions to Tim Sheard at sheard@cs.pdx.edu, rather than replying to this message. -Tim Chevalier, on behalf of the 2008 contest organizers (programming language devotees at Portland State University and the University of Chicago) -- Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt "Time flies like an arrow. Fruit flies like a banana. Syntax rules like a macro." -- Albert Lai _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell From dyoo at cs.wpi.edu Thu Jun 12 00:29:31 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] Odd error message: is 4.0 really too old? :) Message-ID: I'm currently running 4.0-svn11jun2008, and after trying to recompile some source, I'm seeing the following error: ###################################################################################### setup-plt: require: PLaneT could not find the requested package: Server had no matching package: Your version of PLT Scheme is too old to run the specified package in: (planet "combinators.ss" ("cce" "combinators.plt" 1 (= 1))) ###################################################################################### This is showing up because Galore has a dependency on the combinators library, which isn't available for 4.0. (I hacked up my local copy of Galore and SchemeUnit 1.2 to make things run again, and will send my changes upstream tomorrow...) From cce at ccs.neu.edu Thu Jun 12 00:43:02 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] Odd error message: is 4.0 really too old? :) In-Reply-To: References: Message-ID: <990e0c030806112143g45e97524h84c03a8fc07bb492@mail.gmail.com> Heheh. Yeah, the planet error messages haven't caught on that sometimes a version is too new as well as too old now. :) I took most of my planet packages out of the 4.0 repository; if I hadn't, I believe you'd be getting a build error instead of a version error, anyway. I'll try to get Galore working for 4.0 soon. It shouldn't be hard, I ported most of cce/combinators.plt into cce/scheme.plt anyway. Thanks for keeping us updated. --Carl On Thu, Jun 12, 2008 at 12:29 AM, Danny Yoo wrote: > I'm currently running 4.0-svn11jun2008, and after trying to recompile > some source, I'm seeing the following error: > > ###################################################################################### > setup-plt: require: PLaneT could not find the requested package: > Server had no matching package: Your version of PLT Scheme is too old > to run the specified package in: (planet "combinators.ss" ("cce" > "combinators.plt" 1 (= 1))) > ###################################################################################### > > This is showing up because Galore has a dependency on the combinators > library, which isn't available for 4.0. > > (I hacked up my local copy of Galore and SchemeUnit 1.2 to make things > run again, and will send my changes upstream tomorrow...) -- Carl Eastlund From farr at MIT.EDU Thu Jun 12 00:52:39 2008 From: farr at MIT.EDU (Will Farr) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] Odd error message: is 4.0 really too old? :) In-Reply-To: <990e0c030806112143g45e97524h84c03a8fc07bb492@mail.gmail.com> References: <990e0c030806112143g45e97524h84c03a8fc07bb492@mail.gmail.com> Message-ID: <5BC2CA51-2C7D-4569-9FB6-B087E727E2A8@mit.edu> Carl (and other Galore maintainers), I've been using Galore 3.6 with the pre-release PLT Scheme for a while now, and it seems to work fine. There is a build error because the test suite depends on SchemeUnit 1.something, and that doesn't build on v4, but I haven't found any troubles with my modest usage of sets and tables. Should I be more careful, or could things really be working ok with version 4? Thanks, Will On Jun 12, 2008, at 12:43 AM, Carl Eastlund wrote: > Heheh. Yeah, the planet error messages haven't caught on that > sometimes a version is too new as well as too old now. :) > > I took most of my planet packages out of the 4.0 repository; if I > hadn't, I believe you'd be getting a build error instead of a version > error, anyway. I'll try to get Galore working for 4.0 soon. It > shouldn't be hard, I ported most of cce/combinators.plt into > cce/scheme.plt anyway. Thanks for keeping us updated. > > --Carl > > On Thu, Jun 12, 2008 at 12:29 AM, Danny Yoo wrote: >> I'm currently running 4.0-svn11jun2008, and after trying to recompile >> some source, I'm seeing the following error: >> >> ###################################################################################### >> setup-plt: require: PLaneT could not find the requested package: >> Server had no matching package: Your version of PLT Scheme is too old >> to run the specified package in: (planet "combinators.ss" ("cce" >> "combinators.plt" 1 (= 1))) >> ###################################################################################### >> >> This is showing up because Galore has a dependency on the combinators >> library, which isn't available for 4.0. >> >> (I hacked up my local copy of Galore and SchemeUnit 1.2 to make >> things >> run again, and will send my changes upstream tomorrow...) > > -- > Carl Eastlund > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From eli at barzilay.org Thu Jun 12 02:03:05 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] PLT Scheme v4.0 Message-ID: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> PLT Scheme version 4.0 is now available from http://plt-scheme.org/ This major new release offers many improvements over version 372, and we encourage everyone to upgrade. * The PLT Scheme language now provides better syntax for modules, better support for optional and keyword arguments to functions, a more complete syntax for structure types, new syntax for list comprehensions and iterations, a more complete and consistent set of list operations, a more complete set of string operations, and streamlined hash-table operations. * The documentation has been re-organized and re-written. New tutorials and overviews offer a clearer introduction to Scheme and PLT Scheme. * New documentation tools help programmers create and install documentation for libraries and Planet packages. All installed documentation can be read though the user's web browser, and even searching within the browser works on local files. The language for writing documentation is an extension of Scheme, and document sources are linked to implementations through the module system. The module connection allows, for example, reliable automatic hyperlinking of identifiers mentioned in documentation to their specifications in other documentation. * R6RS programs are supported in two ways: though the `plt-r6rs' executable and through the `#!r6rs' prefix. The latter allows an R6RS library or program to serve as a PLT Scheme module. * Legacy R5RS support is improved, partly through a separate `plt-r5rs' executable. * Pairs are immutable within the PLT Scheme language; mutable pairs (which are the same as R6RS and R5RS pairs) are provided as a separate datatype. For more information, see http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html * ProfessorJ uses a new and improved parser, it evaluates programs faster, and it includes a Java-specific indenter. * Testing frameworks for the HtDP and HtDC (ProfessorJ) teaching languages have been unified. Both support systematic unit testing in a comprehensive fashion. When programs lack tests, students are asked to add test cases. When all tests succeed, a simple message says so; otherwise, a pop-up window (dockable) displays URLs to the failed test cases and explains why the cases failed. * Typed Scheme, a statically typed dialect of Scheme, is now included with PLT Scheme. While Typed Scheme is still in its early stages of development, it supports modular programming with types and full interaction with existing untyped code. Safe interactions between typed and untyped modules are enforced via contracts. Typed Scheme also features a novel type system designed to accommodate Scheme programming idioms. For more information, see http://www.ccs.neu.edu/~samth/typed-scheme/ . Feedback Welcome, -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mark.engelberg at gmail.com Thu Jun 12 02:13:08 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] Redefining function from scheme/base Message-ID: I'd like to redefine real->decimal-string in a module, and provide the redefinition to other modules, but I'm not sure how to do this. I'm using the module language, with #lang scheme at the top, and I get the "module: identifier is already imported in: real->decimal-string" error when I try to redefine. It looks liike real->decimal-string comes from the scheme/base module, but I'm not explicitly requiring it... it's just automatically included as part of the scheme language. So how do I redefine this, and once I succeed at doing this, how do the consumer modules choose my redefinition over the base version? Thanks, Mark From czhu at cs.utah.edu Thu Jun 12 02:41:30 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:19:57 2009 Subject: [plt-scheme] Redefining function from scheme/base In-Reply-To: References: Message-ID: <4850C51A.4060107@cs.utah.edu> Do you have to call your function 'real->decimal-string'? Will 'my:real->decimal-string' work for you? If your answer to the first question is yes, then the old trick is to make you own language (as a module) that exports your 'real->decimal-string' and everything else from scheme. Then you can base you other modules on your own language instead of scheme/base. Chongkai Mark Engelberg wrote: > I'd like to redefine real->decimal-string in a module, and provide the > redefinition to other modules, but I'm not sure how to do this. > > I'm using the module language, with #lang scheme at the top, and I get > the "module: identifier is already imported in: real->decimal-string" > error when I try to redefine. > > It looks liike real->decimal-string comes from the scheme/base module, > but I'm not explicitly requiring it... it's just automatically > included as part of the scheme language. So how do I redefine this, > and once I succeed at doing this, how do the consumer modules choose > my redefinition over the base version? > > Thanks, > > Mark > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From stephen at degabrielle.name Thu Jun 12 03:58:02 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:19:58 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: <595b9ab20806120058m19d6bcf8s782e4a2d9188358a@mail.gmail.com> Well done! Stephen On Thu, Jun 12, 2008 at 7:03 AM, Eli Barzilay wrote: > PLT Scheme version 4.0 is now available from > > http://plt-scheme.org/ > > This major new release offers many improvements over version 372, and > we encourage everyone to upgrade. > > * The PLT Scheme language now provides better syntax for modules, > better support for optional and keyword arguments to functions, a > more complete syntax for structure types, new syntax for list > comprehensions and iterations, a more complete and consistent set > of list operations, a more complete set of string operations, and > streamlined hash-table operations. > > * The documentation has been re-organized and re-written. New > tutorials and overviews offer a clearer introduction to Scheme and > PLT Scheme. > > * New documentation tools help programmers create and install > documentation for libraries and Planet packages. All installed > documentation can be read though the user's web browser, and even > searching within the browser works on local files. > > The language for writing documentation is an extension of Scheme, > and document sources are linked to implementations through the > module system. The module connection allows, for example, > reliable automatic hyperlinking of identifiers mentioned in > documentation to their specifications in other documentation. > > * R6RS programs are supported in two ways: though the `plt-r6rs' > executable and through the `#!r6rs' prefix. The latter allows an > R6RS library or program to serve as a PLT Scheme module. > > * Legacy R5RS support is improved, partly through a separate > `plt-r5rs' executable. > > * Pairs are immutable within the PLT Scheme language; mutable pairs > (which are the same as R6RS and R5RS pairs) are provided as a > separate datatype. For more information, see > > http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html > > * ProfessorJ uses a new and improved parser, it evaluates programs > faster, and it includes a Java-specific indenter. > > * Testing frameworks for the HtDP and HtDC (ProfessorJ) teaching > languages have been unified. Both support systematic unit testing > in a comprehensive fashion. When programs lack tests, students > are asked to add test cases. When all tests succeed, a simple > message says so; otherwise, a pop-up window (dockable) displays > URLs to the failed test cases and explains why the cases failed. > > * Typed Scheme, a statically typed dialect of Scheme, is now > included with PLT Scheme. While Typed Scheme is still in its > early stages of development, it supports modular programming with > types and full interaction with existing untyped code. Safe > interactions between typed and untyped modules are enforced via > contracts. Typed Scheme also features a novel type system > designed to accommodate Scheme programming idioms. For more > information, see http://www.ccs.neu.edu/~samth/typed-scheme/ . > > Feedback Welcome, > -- > ((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 > -- 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 mvanier at cs.caltech.edu Thu Jun 12 04:22:21 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:58 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: <4850DCBD.7000903@cs.caltech.edu> Hmm. I just compiled and installed PLT Scheme 4.0 from source on my Linux box. Then I tried to go through the tutorial at http://docs.plt-scheme.org/quick/ and it failed when I tried to run the #lang slideshow line (I'd already switched into the module language). The error message was: standard-module-name-resolver: collection not found: # in any of: () Any idea what's going on? Mike Eli Barzilay wrote: > PLT Scheme version 4.0 is now available from > > http://plt-scheme.org/ > > This major new release offers many improvements over version 372, and > we encourage everyone to upgrade. > > * The PLT Scheme language now provides better syntax for modules, > better support for optional and keyword arguments to functions, a > more complete syntax for structure types, new syntax for list > comprehensions and iterations, a more complete and consistent set > of list operations, a more complete set of string operations, and > streamlined hash-table operations. > > * The documentation has been re-organized and re-written. New > tutorials and overviews offer a clearer introduction to Scheme and > PLT Scheme. > > * New documentation tools help programmers create and install > documentation for libraries and Planet packages. All installed > documentation can be read though the user's web browser, and even > searching within the browser works on local files. > > The language for writing documentation is an extension of Scheme, > and document sources are linked to implementations through the > module system. The module connection allows, for example, > reliable automatic hyperlinking of identifiers mentioned in > documentation to their specifications in other documentation. > > * R6RS programs are supported in two ways: though the `plt-r6rs' > executable and through the `#!r6rs' prefix. The latter allows an > R6RS library or program to serve as a PLT Scheme module. > > * Legacy R5RS support is improved, partly through a separate > `plt-r5rs' executable. > > * Pairs are immutable within the PLT Scheme language; mutable pairs > (which are the same as R6RS and R5RS pairs) are provided as a > separate datatype. For more information, see > > http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html > > * ProfessorJ uses a new and improved parser, it evaluates programs > faster, and it includes a Java-specific indenter. > > * Testing frameworks for the HtDP and HtDC (ProfessorJ) teaching > languages have been unified. Both support systematic unit testing > in a comprehensive fashion. When programs lack tests, students > are asked to add test cases. When all tests succeed, a simple > message says so; otherwise, a pop-up window (dockable) displays > URLs to the failed test cases and explains why the cases failed. > > * Typed Scheme, a statically typed dialect of Scheme, is now > included with PLT Scheme. While Typed Scheme is still in its > early stages of development, it supports modular programming with > types and full interaction with existing untyped code. Safe > interactions between typed and untyped modules are enforced via > contracts. Typed Scheme also features a novel type system > designed to accommodate Scheme programming idioms. For more > information, see http://www.ccs.neu.edu/~samth/typed-scheme/ . > > Feedback Welcome, From mvanier at cs.caltech.edu Thu Jun 12 04:31:29 2008 From: mvanier at cs.caltech.edu (Michael Vanier) Date: Thu Mar 26 02:19:58 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <4850DCBD.7000903@cs.caltech.edu> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> <4850DCBD.7000903@cs.caltech.edu> Message-ID: <4850DEE1.3020809@cs.caltech.edu> Never mind. I found the problem: my old .plt-scheme directory was lying around, and when I deleted it everything worked correctly. Mike Michael Vanier wrote: > Hmm. I just compiled and installed PLT Scheme 4.0 from source on my Linux box. Then I tried to go > through the tutorial at > > http://docs.plt-scheme.org/quick/ > > and it failed when I tried to run the > > #lang slideshow > > line (I'd already switched into the module language). The error message was: > > standard-module-name-resolver: collection not found: # in any of: () > > Any idea what's going on? > > Mike > > Eli Barzilay wrote: >> PLT Scheme version 4.0 is now available from >> >> http://plt-scheme.org/ >> >> This major new release offers many improvements over version 372, and >> we encourage everyone to upgrade. >> >> * The PLT Scheme language now provides better syntax for modules, >> better support for optional and keyword arguments to functions, a >> more complete syntax for structure types, new syntax for list >> comprehensions and iterations, a more complete and consistent set >> of list operations, a more complete set of string operations, and >> streamlined hash-table operations. >> >> * The documentation has been re-organized and re-written. New >> tutorials and overviews offer a clearer introduction to Scheme and >> PLT Scheme. >> >> * New documentation tools help programmers create and install >> documentation for libraries and Planet packages. All installed >> documentation can be read though the user's web browser, and even >> searching within the browser works on local files. >> >> The language for writing documentation is an extension of Scheme, >> and document sources are linked to implementations through the >> module system. The module connection allows, for example, >> reliable automatic hyperlinking of identifiers mentioned in >> documentation to their specifications in other documentation. >> >> * R6RS programs are supported in two ways: though the `plt-r6rs' >> executable and through the `#!r6rs' prefix. The latter allows an >> R6RS library or program to serve as a PLT Scheme module. >> >> * Legacy R5RS support is improved, partly through a separate >> `plt-r5rs' executable. >> >> * Pairs are immutable within the PLT Scheme language; mutable pairs >> (which are the same as R6RS and R5RS pairs) are provided as a >> separate datatype. For more information, see >> >> http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html >> >> * ProfessorJ uses a new and improved parser, it evaluates programs >> faster, and it includes a Java-specific indenter. >> >> * Testing frameworks for the HtDP and HtDC (ProfessorJ) teaching >> languages have been unified. Both support systematic unit testing >> in a comprehensive fashion. When programs lack tests, students >> are asked to add test cases. When all tests succeed, a simple >> message says so; otherwise, a pop-up window (dockable) displays >> URLs to the failed test cases and explains why the cases failed. >> >> * Typed Scheme, a statically typed dialect of Scheme, is now >> included with PLT Scheme. While Typed Scheme is still in its >> early stages of development, it supports modular programming with >> types and full interaction with existing untyped code. Safe >> interactions between typed and untyped modules are enforced via >> contracts. Typed Scheme also features a novel type system >> designed to accommodate Scheme programming idioms. For more >> information, see http://www.ccs.neu.edu/~samth/typed-scheme/ . >> >> Feedback Welcome, > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From noelwelsh at gmail.com Thu Jun 12 04:39:08 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:19:58 2009 Subject: [plt-scheme] Odd error message: is 4.0 really too old? :) In-Reply-To: <990e0c030806112143g45e97524h84c03a8fc07bb492@mail.gmail.com> References: <990e0c030806112143g45e97524h84c03a8fc07bb492@mail.gmail.com> Message-ID: Let me just note that SchemeUnit 2 includes an upgrade script for version 1 tests. There is no excuse for being a dinosaur! ;-) N. On Thu, Jun 12, 2008 at 5:43 AM, Carl Eastlund wrote: > On Thu, Jun 12, 2008 at 12:29 AM, Danny Yoo wrote: ... >> (I hacked up my local copy of Galore and SchemeUnit 1.2 to make things >> run again, and will send my changes upstream tomorrow...) From noelwelsh at gmail.com Thu Jun 12 04:43:21 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:19:58 2009 Subject: [plt-scheme] Redefining function from scheme/base In-Reply-To: <4850C51A.4060107@cs.utah.edu> References: <4850C51A.4060107@cs.utah.edu> Message-ID: On Thu, Jun 12, 2008 at 7:41 AM, Chongkai Zhu wrote: > If your answer to the first question is yes, then the old trick is to make > you own language (as a module) that exports your 'real->decimal-string' and > everything else from scheme. Then you can base you other modules on your > own language instead of scheme/base. You can do this without defining a new language, which I believe is preferable. Clients will have to import that identifier with a prefix to avoid name collisions (as is done, for example, with SRFI-1). Untested example code: defining module: #lang scheme/base (define (my-real->decimal-string ...) ...) (provide (rename-out my-real->decimal-string real->decimal-string)) client module: #lang scheme/base (require (prefix-in s: defining-module)) ;; use (s:real->decimal-string ...) From spdegabrielle at gmail.com Thu Jun 12 05:27:24 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:19:58 2009 Subject: [plt-scheme] Re: mail-parse.ss In-Reply-To: <28A8D8B1-E88F-4804-8410-DF195DFFDCE1@ccs.neu.edu> References: <595b9ab20806060409s1823bdf5v40e5337b6015be7@mail.gmail.com> <595b9ab20806060431i13ad3bcex2766cbc65e4cbaf2@mail.gmail.com> <595b9ab20806110747n63e881a0gcaa40a6076cbcdce@mail.gmail.com> <28A8D8B1-E88F-4804-8410-DF195DFFDCE1@ccs.neu.edu> Message-ID: <595b9ab20806120227k2ee7e69ai6c084f2700643188@mail.gmail.com> Done, it is available at (require (planet "mail-parse.ss" ("spdegabrielle" "mail-parse.plt" 1 0))) Please note I have stuffed up the tests that came with it (not included in the .plt). It works ok for me[1], but let me know if there are any problems and I'll do my best to fix them . Cheers, Stephen 1. I'm using it to read the Enron dataset: http://www.cs.cmu.edu/~enron/ which is a decent size, but has no attachments. I should probably try it on the plt-scheme mailing list archives at some point. On Wed, Jun 11, 2008 at 3:47 PM, Matthias Felleisen wrote: > > Please update as soon as PLaneT 4.0 is stable. > > > On Jun 11, 2008, at 10:47 AM, Stephen De Gabrielle wrote: > >> Sorry, I forgot to actually attach my modified version >> >> Cheers, >> >> Stephen_________________________________________________ >> 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 Thu Jun 12 05:38:13 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:19:59 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: <8868DEED-ED6B-47E4-933E-5D78AB668BCF@gmail.com> Congratulations! Let's keep up the good work ;-) - Filipe Cabecinhas From tom at zwizwa.be Thu Jun 12 05:42:25 2008 From: tom at zwizwa.be (Tom Schouten) Date: Thu Mar 26 02:19:59 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: <20080612094225.GC18973@zzz.i> Many thanks to PLT for this magnificent piece of software! From spdegabrielle at gmail.com Thu Jun 12 06:17:30 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:19:59 2009 Subject: [plt-scheme] Re: mail-parse.ss In-Reply-To: <595b9ab20806120227k2ee7e69ai6c084f2700643188@mail.gmail.com> References: <595b9ab20806060409s1823bdf5v40e5337b6015be7@mail.gmail.com> <595b9ab20806060431i13ad3bcex2766cbc65e4cbaf2@mail.gmail.com> <595b9ab20806110747n63e881a0gcaa40a6076cbcdce@mail.gmail.com> <28A8D8B1-E88F-4804-8410-DF195DFFDCE1@ccs.neu.edu> <595b9ab20806120227k2ee7e69ai6c084f2700643188@mail.gmail.com> Message-ID: <595b9ab20806120317n6f43bee7o463c0e5757e3b518@mail.gmail.com> sorry, I now think it is broken in a significant way. s. On Thu, Jun 12, 2008 at 10:27 AM, Stephen De Gabrielle wrote: > Done, > it is available at > (require (planet "mail-parse.ss" ("spdegabrielle" "mail-parse.plt" 1 0))) > > Please note I have stuffed up the tests that came with it (not > included in the .plt). > > It works ok for me[1], but let me know if there are any problems and > I'll do my best to fix them . > > Cheers, > > Stephen > > 1. I'm using it to read the Enron dataset: > http://www.cs.cmu.edu/~enron/ which is a decent size, but has no > attachments. I should probably try it on the plt-scheme mailing list > archives at some point. > > On Wed, Jun 11, 2008 at 3:47 PM, Matthias Felleisen > wrote: >> >> Please update as soon as PLaneT 4.0 is stable. >> >> >> On Jun 11, 2008, at 10:47 AM, Stephen De Gabrielle wrote: >> >>> Sorry, I forgot to actually attach my modified version >>> >>> Cheers, >>> >>> Stephen_________________________________________________ >>> 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 > -- 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 d.j.gurnell at gmail.com Thu Jun 12 06:50:41 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:19:59 2009 Subject: [plt-scheme] Scribble path conversion? Message-ID: Hi all, Another problem with Scribble and paths. I recently upgraded my SVN from 3.99.0.23 to 3.99.0.26 and the Scribble docs for Unlib won't compile. I've placed the critical part of the output from setup-plt at the end of this email. It looks like the problem is coming from the following PLaneT path: (planet "doc/../exn.ss" ("untyped" "unlib.plt" 3 (= 6))) I think the ".." part is causing problems. From what I can tell, this path is being generated from the require form: (require (file "../exn.ss")) in the file: unlib.plt/3/6/doc/base.ss which contains utility procedures for the Scribble docs. Does this seem like a likely cause, and is it a bug or is there a workaround? Many thanks, -- Dave ===== OUTPUT FROM setup-plt ===== Trillian:~/untyped/unlib/trunk/src$ setup-plt -P untyped unlib.plt 3 6 setup-plt: version: 3.99.0.26 [3m] setup-plt: variants: 3m setup-plt: main collects: /usr/local/plt/collects setup-plt: collects paths: setup-plt: /Users/dave/Library/PLT Scheme/3.99.0.26/collects setup-plt: /usr/local/plt/collects setup-plt: making: /Users/dave/planet/untyped/unlib.plt/3/6 (unlib) setup-plt: making: /Users/dave/planet/untyped/unlib.plt/3/6/check setup-plt: making: /Users/dave/planet/untyped/unlib.plt/3/6/server setup-plt: updating: /Users/dave/Library/PLT Scheme/planet/ 300/3.99.0.26/cache.ss setup-plt: --- building documentation --- setup-plt: skipping: /Users/dave/planet/untyped/delirium.plt/2/0/doc/ delirium.scrbl setup-plt: skipping: /Users/dave/planet/untyped/snooze.plt/3/0/doc/ snooze.scrbl setup-plt: using: /Users/dave/planet/untyped/mirrors.plt/1/2/doc/ mirrors.scrbl setup-plt: skipping: /Users/dave/planet/untyped/dispatch.plt/1/2/doc/ dispatch.scrbl setup-plt: skipping: /Users/dave/planet/untyped/instaservlet.plt/1/3/ doc/instaservlet.scrbl setup-plt: running: /Users/dave/planet/untyped/unlib.plt/3/6/doc/ unlib.scrbl "modcollapse.ss" broke the contract (-> (or/c symbol? module-path-index?) (or/c (-> (or/c (and/c module-path? (or/c symbol? (cons/c (symbols 'lib) any/c) (cons/c (symbols 'file) any/c) (cons/c (symbols 'planet) any/c) (cons/c (symbols 'quote) any/c))) path?)) (or/c (and/c module-path? (or/c symbol? (cons/c (symbols 'lib) any/c) (cons/c (symbols 'file) any/c) (cons/c (symbols 'planet) any/c) (cons/c (symbols 'quote) any/c))) path?) path?) (or/c (and/c module-path? (or/c symbol? (cons/c (symbols 'lib) any/c) (cons/c (symbols 'file) any/c) (cons/c (symbols 'planet) any/c) (cons/c (symbols 'quote) any/c))) path?)) on collapse-module-path-index; expected <(or/c (and/c module-path? (or/ c symbol? (cons/c (symbols (quote lib)) any/c) (cons/c (symbols (quote file)) any/c) (cons/c (symbols (quote planet)) any/c) (cons/c (symbols (quote quote)) any/c))) path?)>, given: (planet "doc/../ exn.ss" ("untyped" "unlib.plt" 3 (= 6))) ========== From mflatt at cs.utah.edu Thu Jun 12 08:19:27 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:19:59 2009 Subject: [plt-scheme] Scribble path conversion? In-Reply-To: References: Message-ID: <20080612121928.EBEE96500EA@mail-svr1.cs.utah.edu> Fixed in SVN. Thanks, Matthew At Thu, 12 Jun 2008 11:50:41 +0100, Dave Gurnell wrote: > Hi all, > > Another problem with Scribble and paths. > > I recently upgraded my SVN from 3.99.0.23 to 3.99.0.26 and the > Scribble docs for Unlib won't compile. I've placed the critical part > of the output from setup-plt at the end of this email. > > It looks like the problem is coming from the following PLaneT path: > > (planet "doc/../exn.ss" ("untyped" "unlib.plt" 3 (= 6))) > > I think the ".." part is causing problems. From what I can tell, this > path is being generated from the require form: > > (require (file "../exn.ss")) > > in the file: > > unlib.plt/3/6/doc/base.ss > > which contains utility procedures for the Scribble docs. > > Does this seem like a likely cause, and is it a bug or is there a > workaround? > > Many thanks, > > -- Dave > > ===== OUTPUT FROM setup-plt ===== > Trillian:~/untyped/unlib/trunk/src$ setup-plt -P untyped unlib.plt 3 6 > setup-plt: version: 3.99.0.26 [3m] > setup-plt: variants: 3m > setup-plt: main collects: /usr/local/plt/collects > setup-plt: collects paths: > setup-plt: /Users/dave/Library/PLT Scheme/3.99.0.26/collects > setup-plt: /usr/local/plt/collects > setup-plt: making: /Users/dave/planet/untyped/unlib.plt/3/6 (unlib) > setup-plt: making: /Users/dave/planet/untyped/unlib.plt/3/6/check > setup-plt: making: /Users/dave/planet/untyped/unlib.plt/3/6/server > setup-plt: updating: /Users/dave/Library/PLT Scheme/planet/ > 300/3.99.0.26/cache.ss > setup-plt: --- building documentation --- > setup-plt: skipping: /Users/dave/planet/untyped/delirium.plt/2/0/doc/ > delirium.scrbl > setup-plt: skipping: /Users/dave/planet/untyped/snooze.plt/3/0/doc/ > snooze.scrbl > setup-plt: using: /Users/dave/planet/untyped/mirrors.plt/1/2/doc/ > mirrors.scrbl > setup-plt: skipping: /Users/dave/planet/untyped/dispatch.plt/1/2/doc/ > dispatch.scrbl > setup-plt: skipping: /Users/dave/planet/untyped/instaservlet.plt/1/3/ > doc/instaservlet.scrbl > setup-plt: running: /Users/dave/planet/untyped/unlib.plt/3/6/doc/ > unlib.scrbl > "modcollapse.ss" broke the contract > (-> > (or/c symbol? module-path-index?) > (or/c > (-> > (or/c > (and/c > module-path? > (or/c > symbol? > (cons/c (symbols 'lib) any/c) > (cons/c (symbols 'file) any/c) > (cons/c (symbols 'planet) any/c) > (cons/c (symbols 'quote) any/c))) > path?)) > (or/c > (and/c > module-path? > (or/c > symbol? > (cons/c (symbols 'lib) any/c) > (cons/c (symbols 'file) any/c) > (cons/c (symbols 'planet) any/c) > (cons/c (symbols 'quote) any/c))) > path?) > path?) > (or/c > (and/c > module-path? > (or/c > symbol? > (cons/c (symbols 'lib) any/c) > (cons/c (symbols 'file) any/c) > (cons/c (symbols 'planet) any/c) > (cons/c (symbols 'quote) any/c))) > path?)) > on collapse-module-path-index; expected <(or/c (and/c module-path? (or/ > c symbol? (cons/c (symbols (quote lib)) any/c) (cons/c (symbols (quote > file)) any/c) (cons/c (symbols (quote planet)) any/c) (cons/c (symbols > (quote quote)) any/c))) path?)>, given: (planet "doc/../ > exn.ss" ("untyped" "unlib.plt" 3 (= 6))) > ========== > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From jos.koot at telefonica.net Thu Jun 12 09:28:35 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:19:59 2009 Subject: [plt-scheme] Redefining function from scheme/base References: Message-ID: <001c01c8cc90$37e72030$2101a8c0@uw2b2dff239c4d> You are probably using an outdated subversion. #lang scheme (define add1 sub1) (add1 3) Welcome to DrScheme, version 3.99.0.26-svn8jun2008 [3m]. Language: Module custom. 2 > Jos ----- Original Message ----- From: "Mark Engelberg" To: "pltscheme" Sent: Thursday, June 12, 2008 8:13 AM Subject: [plt-scheme] Redefining function from scheme/base > I'd like to redefine real->decimal-string in a module, and provide the > redefinition to other modules, but I'm not sure how to do this. > > I'm using the module language, with #lang scheme at the top, and I get > the "module: identifier is already imported in: real->decimal-string" > error when I try to redefine. > > It looks liike real->decimal-string comes from the scheme/base module, > but I'm not explicitly requiring it... it's just automatically > included as part of the scheme language. So how do I redefine this, > and once I succeed at doing this, how do the consumer modules choose > my redefinition over the base version? > > Thanks, > > Mark > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From plragde at uwaterloo.ca Thu Jun 12 09:34:25 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:19:59 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: <485125E1.2070904@uwaterloo.ca> This is a major achievement. Thanks to all that made it happen, from one who will reap much benefit. I have one very minor quibble. I hate bulleted points, but I hate sentence fragments even more, and the new main page at http://www.plt-scheme.org is dominated by them. Could you perhaps consider getting off the fence and either bulleting these or (my preference) making them into full sentences? --PR From jos.koot at telefonica.net Thu Jun 12 09:38:27 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:20:00 2009 Subject: [plt-scheme] PLT Scheme v4.0 References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: <005e01c8cc91$98722200$2101a8c0@uw2b2dff239c4d> Great. Congratulations. Jos ----- Original Message ----- From: "Eli Barzilay" To: Sent: Thursday, June 12, 2008 8:03 AM Subject: [plt-scheme] PLT Scheme v4.0 > PLT Scheme version 4.0 is now available from > > http://plt-scheme.org/ > From jos.koot at telefonica.net Thu Jun 12 09:42:23 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:20:00 2009 Subject: [plt-scheme] Redefining function from scheme/base Message-ID: <008701c8cc92$25134310$2101a8c0@uw2b2dff239c4d> Works for 4.0 too. Notice however that you cannot redefined variables that are loaded by an explicit require-form. Jos ----- Original Message ----- From: "Jos Koot" To: "Mark Engelberg" ; "pltscheme" Sent: Thursday, June 12, 2008 3:28 PM Subject: Re: [plt-scheme] Redefining function from scheme/base > You are probably using an outdated subversion. > #lang scheme > (define add1 sub1) > (add1 3) > > Welcome to DrScheme, version 3.99.0.26-svn8jun2008 [3m]. > Language: Module custom. > 2 >> > > Jos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080612/0410ccb0/attachment.html From jos.koot at telefonica.net Thu Jun 12 09:34:43 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:20:01 2009 Subject: Fw: [plt-scheme] Redefining function from scheme/base Message-ID: <003701c8cc91$1329f460$2101a8c0@uw2b2dff239c4d> Works for 4.0 too. Notice however that you cannot redefined variables that are loaded by an explicit require-form. Jos ----- Original Message ----- From: "Jos Koot" To: "Mark Engelberg" ; "pltscheme" Sent: Thursday, June 12, 2008 3:28 PM Subject: Re: [plt-scheme] Redefining function from scheme/base > You are probably using an outdated subversion. > #lang scheme > (define add1 sub1) > (add1 3) > > Welcome to DrScheme, version 3.99.0.26-svn8jun2008 [3m]. > Language: Module custom. > 2 >> > > Jos > > ----- Original Message ----- > From: "Mark Engelberg" > To: "pltscheme" > Sent: Thursday, June 12, 2008 8:13 AM > Subject: [plt-scheme] Redefining function from scheme/base > > >> I'd like to redefine real->decimal-string in a module, and provide the >> redefinition to other modules, but I'm not sure how to do this. >> >> I'm using the module language, with #lang scheme at the top, and I get >> the "module: identifier is already imported in: real->decimal-string" >> error when I try to redefine. >> >> It looks liike real->decimal-string comes from the scheme/base module, >> but I'm not explicitly requiring it... it's just automatically >> included as part of the scheme language. So how do I redefine this, >> and once I succeed at doing this, how do the consumer modules choose >> my redefinition over the base version? >> >> Thanks, >> >> Mark >> _________________________________________________ >> 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 cce at ccs.neu.edu Thu Jun 12 10:19:28 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:20:01 2009 Subject: [plt-scheme] Odd error message: is 4.0 really too old? :) In-Reply-To: <5BC2CA51-2C7D-4569-9FB6-B087E727E2A8@mit.edu> References: <990e0c030806112143g45e97524h84c03a8fc07bb492@mail.gmail.com> <5BC2CA51-2C7D-4569-9FB6-B087E727E2A8@mit.edu> Message-ID: <990e0c030806120719y6c5949bfve568403ee12fc5a5@mail.gmail.com> On Thu, Jun 12, 2008 at 12:52 AM, Will Farr wrote: > Carl (and other Galore maintainers), > > I've been using Galore 3.6 with the pre-release PLT Scheme for a while now, > and it seems to work fine. There is a build error because the test suite > depends on SchemeUnit 1.something, and that doesn't build on v4, but I > haven't found any troubles with my modest usage of sets and tables. > > Should I be more careful, or could things really be working ok with version > 4? Hmm. It sounds like Galore was depending on packages that would have worked, if I hadn't disabled them when I added a new 4.0-compatible version. Furthermore, you installed your Galore before I changed their availability (or possibly before the new planet server), so your dependencies aren't broken. If you installed from scratch, it probably wouldn't work. --Carl From farr at MIT.EDU Thu Jun 12 10:33:17 2008 From: farr at MIT.EDU (Will Farr) Date: Thu Mar 26 02:20:01 2009 Subject: [plt-scheme] Odd error message: is 4.0 really too old? :) In-Reply-To: <990e0c030806120719y6c5949bfve568403ee12fc5a5@mail.gmail.com> References: <990e0c030806112143g45e97524h84c03a8fc07bb492@mail.gmail.com> <5BC2CA51-2C7D-4569-9FB6-B087E727E2A8@mit.edu> <990e0c030806120719y6c5949bfve568403ee12fc5a5@mail.gmail.com> Message-ID: <3076EED3-6B15-478D-9CE4-BFF6D0B0D327@mit.edu> On Jun 12, 2008, at 10:19 AM, Carl Eastlund wrote: > version. Furthermore, you installed your Galore before I changed > their availability (or possibly before the new planet server), so your > dependencies aren't broken. If you installed from scratch, it > probably wouldn't work. That's right. I've had the 3.6 package lying around in my local cache since long before the 4.x server. So it definitely wasn't from scratch. Will From j.russell at alum.mit.edu Thu Jun 12 11:58:04 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:01 2009 Subject: [plt-scheme] Link to bugs page? Message-ID: <58925be00806120858y3fe9869ekf44ae785c84c300c@mail.gmail.com> I couldn't find any obvious link to the bugs page on the redesigned web site. I know it's not hard to find with, say, google, but it seems like an omission. -James From matthias at ccs.neu.edu Thu Jun 12 12:00:29 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:01 2009 Subject: [plt-scheme] Link to bugs page? In-Reply-To: <58925be00806120858y3fe9869ekf44ae785c84c300c@mail.gmail.com> References: <58925be00806120858y3fe9869ekf44ae785c84c300c@mail.gmail.com> Message-ID: The web pages are, eh, under construction. Eli will resume the construction process tonight. Sorry for any inconvenience -- Matthias On Jun 12, 2008, at 11:58 AM, James Russell wrote: > I couldn't find any obvious link to the bugs page > on the redesigned web site. > > I know it's not hard to find with, say, google, > but it seems like an omission. > > -James > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From jos.koot at telefonica.net Thu Jun 12 12:12:24 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:20:01 2009 Subject: [plt-scheme] Link to bugs page? References: <58925be00806120858y3fe9869ekf44ae785c84c300c@mail.gmail.com> Message-ID: <005501c8cca7$1a86dd70$2101a8c0@uw2b2dff239c4d> Are you, Matthias, and your group ever sleeping, let alone have some free time to spend on other nice things? If I recall well, you like cooking. Again congrats and thanks for 4.0. Jos ----- Original Message ----- From: "Matthias Felleisen" To: "James Russell" Cc: Sent: Thursday, June 12, 2008 6:00 PM Subject: Re: [plt-scheme] Link to bugs page? > > The web pages are, eh, under construction. Eli will resume the > construction process tonight. Sorry for any inconvenience -- Matthias > > > > On Jun 12, 2008, at 11:58 AM, James Russell wrote: > >> I couldn't find any obvious link to the bugs page >> on the redesigned web site. >> >> I know it's not hard to find with, say, google, >> but it seems like an omission. >> >> -James >> _________________________________________________ >> 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 martindemello at gmail.com Thu Jun 12 12:19:28 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:02 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: On Wed, Jun 11, 2008 at 11:03 PM, Eli Barzilay wrote: > PLT Scheme version 4.0 is now available from > > http://plt-scheme.org/ Congratulations :) martin From plragde at uwaterloo.ca Thu Jun 12 13:07:37 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:20:02 2009 Subject: [plt-scheme] writing teachpacks Message-ID: <485157D9.4020708@uwaterloo.ca> I'm not having much luck in v4.0. In the Module language, I save the following in io.ss: #lang scheme (provide read) I then switch to a new window, switch to Beginning Student, try to add this as a user-installed teachpack, and get the dreaded: Users/plragde/Library/PLT Scheme/4.0/collects/installed-teachpacks/io.ss:1:0: compile: bad syntax; function application is not allowed, because no #%app syntax transformer is bound in: (module io scheme (provide read)) This seems to happen to me in 3.99.0.23, so I'm sorry that I didn't try it earlier. --PR From matthias at ccs.neu.edu Thu Jun 12 13:16:05 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:02 2009 Subject: [plt-scheme] writing teachpacks In-Reply-To: <485157D9.4020708@uwaterloo.ca> References: <485157D9.4020708@uwaterloo.ca> Message-ID: <628F638A-E7F7-49CE-9409-7085672F648A@ccs.neu.edu> It's a bug. Already reported On Jun 12, 2008, at 1:07 PM, Prabhakar Ragde wrote: > I'm not having much luck in v4.0. > > In the Module language, I save the following in io.ss: > > #lang scheme > > (provide read) > > I then switch to a new window, switch to Beginning Student, try to > add this as a user-installed teachpack, and get the dreaded: > > Users/plragde/Library/PLT Scheme/4.0/collects/installed-teachpacks/ > io.ss:1:0: compile: bad syntax; function application is not > allowed, because no #%app syntax transformer is bound in: (module > io scheme (provide read)) > > This seems to happen to me in 3.99.0.23, so I'm sorry that I didn't > try it earlier. --PR > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From martindemello at gmail.com Thu Jun 12 13:50:44 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:02 2009 Subject: [plt-scheme] implementation benefits of immutable pairs Message-ID: Does making pairs immutable offer any potential for compiler optimisations? Or is it just a matter of greater code correctness? martin From martindemello at gmail.com Thu Jun 12 14:04:05 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:02 2009 Subject: [plt-scheme] implementation benefits of immutable pairs In-Reply-To: <485164A9.1060902@soegaard.net> References: <485164A9.1060902@soegaard.net> Message-ID: On Thu, Jun 12, 2008 at 11:02 AM, Jens Axel Soegaard wrote: > Martin DeMello skrev: >> >> Does making pairs immutable offer any potential for compiler >> optimisations? Or is it just a matter of greater code correctness? >> > > http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html I read that, but it seems at least intuitively possible that once you've crossed that bridge, you get a range of compile-time optimisations available to you. Googled around a bit, but couldn't find any papers on the topic. martin From jensaxel at soegaard.net Thu Jun 12 14:17:22 2008 From: jensaxel at soegaard.net (Jens Axel Soegaard) Date: Thu Mar 26 02:20:02 2009 Subject: [plt-scheme] implementation benefits of immutable pairs In-Reply-To: References: <485164A9.1060902@soegaard.net> Message-ID: <48516832.8060709@soegaard.net> Martin DeMello skrev: > On Thu, Jun 12, 2008 at 11:02 AM, Jens Axel Soegaard > wrote: > >> Martin DeMello skrev: >> >>> Does making pairs immutable offer any potential for compiler >>> optimisations? Or is it just a matter of greater code correctness? >>> >>> >> http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html >> > > I read that, but it seems at least intuitively possible that > once you've crossed that bridge, you get a range of compile-time > optimisations available to you. Googled around a bit, but couldn't > find any papers on the topic. > Some compiler optimizations are possible. In, say, (let ([p (cons 1 2)]) (+ (car p) (cdr p)) One can inline a version of + that omits checking whether the two arguments are numbers. However, making compiler optimizations possible weren't the reason for the shift. The blog post mentions the reasons, improving code correctness is one reason, but not the only one. -- Jens Axel S?gaard From jensaxel at soegaard.net Thu Jun 12 14:02:17 2008 From: jensaxel at soegaard.net (Jens Axel Soegaard) Date: Thu Mar 26 02:20:02 2009 Subject: [plt-scheme] implementation benefits of immutable pairs In-Reply-To: References: Message-ID: <485164A9.1060902@soegaard.net> Martin DeMello skrev: > Does making pairs immutable offer any potential for compiler > optimisations? Or is it just a matter of greater code correctness? > http://blog.plt-scheme.org/2007/11/getting-rid-of-set-car-and-set-cdr.html -- Jens Axel S?gaard From pivanyi at freemail.hu Thu Jun 12 14:25:56 2008 From: pivanyi at freemail.hu (Ivanyi Peter) Date: Thu Mar 26 02:20:03 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: Message-ID: Hi, I hope it is never enough to hear it: Congratulations and thanks for the great work. :-) Best regards, Peter Ivanyi ________________________________________________________ Te m?r megn?zted, hogy diszlexi?sak-e a gyerekeid? Tal?ltam egy sz?l?knek sz?l? diszlexiatesztet, amit egy perc alatt kit?lthetsz. A legjobb, hogy ha gond van, akkor abban is seg?tenek, hogy kihez fordulj. Ja, ?s ez egy ingyenes oldal, nem ker?l semmibe. Kattints ide: www.diszlexiateszt.hu/i.php?id=fr080609 From martindemello at gmail.com Thu Jun 12 14:28:22 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:03 2009 Subject: [plt-scheme] implementation benefits of immutable pairs In-Reply-To: <48516832.8060709@soegaard.net> References: <485164A9.1060902@soegaard.net> <48516832.8060709@soegaard.net> Message-ID: On Thu, Jun 12, 2008 at 11:17 AM, Jens Axel Soegaard wrote: > > However, making compiler optimizations possible weren't the reason for the > shift. > The blog post mentions the reasons, improving code correctness is one > reason, > but not the only one. I'm not questioning the reasons behind the shift; I'm just curious about what performance benefits it now allows. martin From yinso.chen at gmail.com Thu Jun 12 14:50:42 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:03 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: References: Message-ID: <779bf2730806121150p7838f545mdcc37d2fc6159a40@mail.gmail.com> Congratz and thanks for the great work! I tried to install on Centos5.1 and ran into two separate errors - I bypassed one by installing to a different box. Not sure if these are known issues and how to go about resolving them? 1st error - segmentation fault during make (I had to find another box) env XFORM_PRECOMP=yes ../mzschemecgc -cqu ./xform.ss --setup . --cpp "gcc -E -DNEWGC_BTC_ACCOUNT -DMZ_USES_SHARED_LIB -I./.. -I./../include" -o xsrc/precomp.h ./precomp.c make[4]: *** [xsrc/precomp.h] Segmentation fault 2nd error - failed building sgl during make install (it seems like some optional dependency is missing) setup-plt: error: during Early Install for sgl setup-plt: make: Failed to make compiled/gl-info_ss.zo; compile-extension: command failed setup-plt: error: during making for games setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during making for games/checkers setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during making for games/doors setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during making for games/gl-board-game setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during making for games/gobblet setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during making for games/jewel setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during making for sgl setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during making for sgl/scribblings setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during Building docs for /usr/local/plt/lib/plt/collects/games/gl-board-game/gl-board-game.scrbl setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) setup-plt: error: during Building docs for /usr/local/plt/lib/plt/collects/sgl/scribblings/sgl.scrbl setup-plt: default-load-handler: cannot open input file: "/usr/local/plt/lib/plt/collects/sgl/gl-info.ss" (No such file or directory; errno=2) make[1]: *** [install-3m] Error 1 Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080612/8fe38a31/attachment.htm From jmarshall at alum.mit.edu Thu Jun 12 15:07:09 2008 From: jmarshall at alum.mit.edu (Joe Marshall) Date: Thu Mar 26 02:20:04 2009 Subject: [plt-scheme] implementation benefits of immutable pairs In-Reply-To: References: <485164A9.1060902@soegaard.net> <48516832.8060709@soegaard.net> Message-ID: On Thu, Jun 12, 2008 at 11:28 AM, Martin DeMello wrote: > On Thu, Jun 12, 2008 at 11:17 AM, Jens Axel Soegaard > wrote: >> >> However, making compiler optimizations possible weren't the reason for the >> shift. >> The blog post mentions the reasons, improving code correctness is one >> reason, >> but not the only one. > > I'm not questioning the reasons behind the shift; I'm just curious > about what performance benefits it now allows. Any code that invokes `car' or `cdr' can now cache the value without doing further analysis. Calls to car and cdr can now be re-ordered without further analysis. -- ~jrm From nifty at live.se Thu Jun 12 18:41:56 2008 From: nifty at live.se (Niklas Larsson) Date: Thu Mar 26 02:20:04 2009 Subject: [plt-scheme] Swedish keyboard bug in DrScheme Message-ID: In DrScheme 4.0 for Windows it is impossible to type a backslash character on a swedish keyboard. We use the AltGr-+ combination to get '\' on swedish keyboards, it does nothing in DrScheme, all other AltGr combinations seem to work fine (braces, @, $, ?...). This problem didn't exist in v371. A really weird bug. Niklas _________________________________________________________________ Ladda ner hela Windows Live gratis och uppt?ck f?rdelarna! http://get.live.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080613/70e0e427/attachment.html From andre.mayers at usherbrooke.ca Thu Jun 12 19:07:54 2008 From: andre.mayers at usherbrooke.ca (Andre Mayers) Date: Thu Mar 26 02:20:05 2009 Subject: [plt-scheme] Swedish keyboard bug in DrScheme In-Reply-To: References: Message-ID: <002801c8cce1$25832a00$70897e00$@mayers@usherbrooke.ca> I have the same problem with the French Canadian keyboard. The problem doesn?t occur If I switch to the Canadian Multilingual Standard keyboard which doesn?t need AltGr-# combination to type the \. De : plt-scheme-bounces@list.cs.brown.edu [mailto:plt-scheme-bounces@list.cs.brown.edu] De la part de Niklas Larsson Envoy? : June-12-08 6:42 PM ? : plt-scheme@list.cs.brown.edu Objet : [plt-scheme] Swedish keyboard bug in DrScheme In DrScheme 4.0 for Windows it is impossible to type a backslash character on a swedish keyboard. We use the AltGr-+ combination to get '\' on swedish keyboards, it does nothing in DrScheme, all other AltGr combinations seem to work fine (braces, @, $, ?...). This problem didn't exist in v371. A really weird bug. Niklas _____ V?rk?nslor? Hitta n?gon att dela dem med! MSN Dejting -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080612/0fa65cec/attachment.htm From narutocanada at gmail.com Fri Jun 13 00:16:11 2008 From: narutocanada at gmail.com (narutocanada@gmail.com) Date: Thu Mar 26 02:20:05 2009 Subject: [plt-scheme] something similar to transcript-on transcript-off? Message-ID: hi does mzscheme has something similar to "transcript-on transcript-off", described in http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.6.4 thanks. From yinso.chen at gmail.com Fri Jun 13 00:44:22 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:06 2009 Subject: [plt-scheme] are some of the file system functions atomic? Message-ID: <779bf2730806122144q7fc8edf2mcfb58ff7e4f791c7@mail.gmail.com> Hi - are functions such as open-ouput-file, make-file-or-directory-link, rename-file-or-directory implemented directly above the system calls such as open, link, and rename? The reason I am asking is because I need to rely on the atomic property (i.e. either succeed or fails) of these system calls on filesystem such as ext3, and need to know whether using them along is sufficient to retain the properties or I need to learn how to use FFI to make the system calls directly. Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080612/b819e51e/attachment.html From philrand at gmail.com Fri Jun 13 01:56:22 2008 From: philrand at gmail.com (Phil Rand) Date: Thu Mar 26 02:20:06 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> Message-ID: <5784c1b10806122256s53a8ccf0j28ec1014eb48dd3a@mail.gmail.com> Great Job! Learning this is going to be fun. Any general advice on converting from 372? (I know about immutable pairs.) -- Phil Rand philrand@pobox.com From stephen at degabrielle.name Fri Jun 13 03:28:41 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:20:06 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <5784c1b10806122256s53a8ccf0j28ec1014eb48dd3a@mail.gmail.com> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> <5784c1b10806122256s53a8ccf0j28ec1014eb48dd3a@mail.gmail.com> Message-ID: <595b9ab20806130028s39279e9wd00653d257b99056@mail.gmail.com> Hi, there is a a release notes section in the documentation that I believe has sections on porting from 3xx to 4. hth S. PS this list is very question friendly too, On Fri, Jun 13, 2008 at 6:56 AM, Phil Rand wrote: > Great Job! Learning this is going to be fun. > > Any general advice on converting from 372? (I know about immutable pairs.) > > -- > Phil Rand > philrand@pobox.com > _________________________________________________ > 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 stephen at degabrielle.name Fri Jun 13 04:05:57 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:20:07 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <595b9ab20806130028s39279e9wd00653d257b99056@mail.gmail.com> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> <5784c1b10806122256s53a8ccf0j28ec1014eb48dd3a@mail.gmail.com> <595b9ab20806130028s39279e9wd00653d257b99056@mail.gmail.com> Message-ID: <595b9ab20806130105y53494177k25d7cbe95ee922b3@mail.gmail.com> Here it is; http://docs.plt-scheme.org/release-notes/mzscheme/MzScheme_4.txt get to it via teh release notes link on the documentation home page either by calling 'help desk' from DrScheme or by going to the online version ( http://docs.plt-scheme.org/ or http://download.plt-scheme.org/doc/html/ ) It's also worth checking the 'legacy libraries' section when porting. s. On Fri, Jun 13, 2008 at 8:28 AM, Stephen De Gabrielle wrote: > Hi, there is a a release notes section in the documentation that I > believe has sections on porting from 3xx to 4. > hth > > S. > PS this list is very question friendly too, > > On Fri, Jun 13, 2008 at 6:56 AM, Phil Rand wrote: >> Great Job! Learning this is going to be fun. >> >> Any general advice on converting from 372? (I know about immutable pairs.) >> >> -- >> Phil Rand >> philrand@pobox.com >> _________________________________________________ >> 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 > -- 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 mflatt at cs.utah.edu Fri Jun 13 08:40:09 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:07 2009 Subject: [plt-scheme] are some of the file system functions atomic? In-Reply-To: <779bf2730806122144q7fc8edf2mcfb58ff7e4f791c7@mail.gmail.com> References: <779bf2730806122144q7fc8edf2mcfb58ff7e4f791c7@mail.gmail.com> Message-ID: <20080613124011.54E536500C9@mail-svr1.cs.utah.edu> At Thu, 12 Jun 2008 21:44:22 -0700, YC wrote: > are functions such as open-ouput-file, make-file-or-directory-link, > rename-file-or-directory implemented directly above the system calls such as > open, link, and rename? > > The reason I am asking is because I need to rely on the atomic property > (i.e. either succeed or fails) of these system calls on filesystem such as > ext3, and need to know whether using them along is sufficient to retain the > properties or I need to learn how to use FFI to make the system calls > directly. Yes, those operations are performed atomically when the OS supports it. Currently, only the docs for `rename-file-or-directory' mention atomicity, and in that case to clarify that there's a race condition on the check for an existing file --- which corresponds to the fact that the rename() system call always replaces existing files. Matthew From mflatt at cs.utah.edu Fri Jun 13 08:41:54 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:07 2009 Subject: [plt-scheme] something similar to transcript-on transcript-off? In-Reply-To: References: Message-ID: <20080613124155.E37BB6500C9@mail-svr1.cs.utah.edu> At Thu, 12 Jun 2008 21:16:11 -0700 (PDT), "narutocanada@gmail.com" wrote: > does mzscheme has something similar to "transcript-on transcript-off", > described in > http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.6.4 The `mzlib/transcr' library provides them. Matthew From damg.dev at googlemail.com Thu Jun 12 09:42:56 2008 From: damg.dev at googlemail.com (Dmitri Bachtin) Date: Thu Mar 26 02:20:07 2009 Subject: [plt-scheme] DESTDIR and Drscheme help path [PLT-Scheme 4.0] Message-ID: <485127E0.9030403@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, mailing list! While building a package for PLT I ran into the following problem: $ configure --prefix=/usr $ make $ make DESTDIR=/path/to/sandbox install Does everything cleanly, but after packaging and installing the application, DrScheme tries to call all the documentation from /path/to/sandbox/... instead of proper installation path. Is the path hard-written anywhere? Thank you in advance ~ -- Dmitri Bachtin - -- - -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.6 (GNU/Linux) mQGiBEf884oRBACKRrOTS+uFlytZTscHzJMVGV0FVSePFpo0YGdVopZ4YPoC1lKW avcDxREa+5eZ3lSW4xARniKHWZCULgHcUrkBQv8gfdfLs5Vfg6UaFCAyYdCK1+Me FgxVw/7GZpnMx1yIIelCUUM2tZ5fspCJcNK8Dyg+1gwWS8H/Sima2gs/UwCg3y/4 ggf1hVRUiilqxph7Yq3cSF8D/0o0kJQdV4jXzB71+2+LWiTdSsOQrvKuEgGwv3OQ h/0VW/kbbdSRMHKenyllkg4tshNOpQJ5gKKn2QkGoNPrnvUYfpDmi3kPJxnrCKn7 MIMrgSIwPlnIzyukNEt62E+eRsfkZIYVWFSJJh36J62d+8x70Ir7RDLQO3bzLJJa Vd/WA/9pMFzh00y4f8kyI8GghnVhXT0c1vXe0UXO1Bib+1XNkOaOqx2EYlHHR1iR NSDKGbqatHxgvjSFlxccLXGBNbTPjGZ6+BxMYNEQXvjQdUirgUCt+LAiXDvmBozQ x5v/6c6CgNEUT7JxNc52I5wbCkVKXSK8WNNyIQDr7dlShvn1eLQpRG1pdHJpIEJh Y2h0aW4gPGQuYmFjaHRpbkBnb29nbGVtYWlsLmNvbT6IYAQTEQIAIAUCR/zzigIb AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEFtBS6Nm870aj6gAn302VGr7oOVe ZFseaxDHeJby1nlgAJ40QPJG5ZgrtVEaRmLzcbT5qP5JMrkCDQRH/POPEAgAoVPD zyt2IiRIGDF7UOFjxFSAqY9D7gKI336rOOpuvgyPKZScQkgcG774na073m2kjPNu zYu+Z9asanrhqCPDZ8a+/cPRrmdX3dqdGLbet7ZQk/e97DrUyg55RU6gRgF3HmtK u2+08pKoMTtm6tozQopf5kD6LosbetNLe4Tg9/6yvNE2mqlhdGTawp8Zvx3m/CXh bE6PUmoCuoE/W8FCHpFDDwbaucZvVfxwAAx1EABTxDjjaRtE1Bv2N1xLzk9Qo//p lQTlz5jW/rOgLalhslpbh/LECDmHQ5NW+RyzYR30tbY+Z6IbB7a5SYzBajuij6n3 EkmDc+0BO6r15tt6JwADBwf/feGAsFQkgtRBLNbI/YP0A5SZ7mc58Y3DOHypIqkF 7GIvAmcCro46VV8e21K7SLxqjProctjZwPZe6RObriTd5Q8wAPISoR9gN3Xba/l6 gqeyFsVyQr1EwMuS/ACk+b4v+T2ML364tZxzxJ5UlDWxe+2QQInQH3BltmHGp0bO CtKrB3LZhFH6UtABf7c3Y1SEvx2bFJDWehAjI9kpPQT4Ee0ASc7DVZkfm3+W4aoq 4FOjPFiJVoCqqymSlDcomXAVKZ7CtG3UtMz7EJnLynB9EbHISqggU0u34Cx/MxRH EjB8DNY0uM63M6wqMMIbW9QAi1hoTVRlPV7VdL38NlpNuYhJBBgRAgAJBQJH/POP AhsMAAoJEFtBS6Nm870axAUAoM9d03tJ2gNGLBcJsNLH0pQjeLHwAKC5W8Yvm3y6 7kACuyLiWBWGuX5QKQ== =f7dx - -----END PGP PUBLIC KEY BLOCK----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhRJ+AACgkQW0FLo2bzvRqIJQCdHitwpFfck+L/NOEDD9iHPE+L qWwAn2dXpJtIKJGzG8y2T7d5Xc7BCIXP =Gh3c -----END PGP SIGNATURE----- From p3k at iki.fi Fri Jun 13 12:33:43 2008 From: p3k at iki.fi (Pekka Karjalainen) Date: Thu Mar 26 02:20:07 2009 Subject: [plt-scheme] Swedish keyboard bug in DrScheme In-Reply-To: References: Message-ID: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> On 6/13/08, Niklas Larsson wrote: > > In DrScheme 4.0 for Windows it is impossible to type a backslash character > on a swedish keyboard. We use the AltGr-+ combination to get '\' on swedish > keyboards, it does nothing in DrScheme, all other AltGr combinations seem to > work fine (braces, @, $, ?...). This problem didn't exist in v371. A really > weird bug. DrScheme has a default keybinding where Meta-\ means "TeX compress". This changes the names of greek letters written in TeX style to the corresponding symbols. E.g. \beta turns into the actual character for lowercase beta. I think this only works when the caret is placed right after such a string. You can change the keybinding with the help of this piece of code. It's based on a message I found in the mailing list archives, as referenced. Save this as a file mykeys.ss somewhere convenient. ;; following the msg http://www.cs.brown.edu/pipermail/plt-scheme/2006-March/012391.html (module mykeys (lib "keybinding-lang.ss" "framework") (define (make-handler s) (lambda (editor event) (send editor insert (make-object string-snip% s)))) (keybinding "M:\\" (make-handler "\\"))) Then go to Edit -> Keybindings -> Add User-defined Keybindings and choose the file you just saved. This should make the key combination do what you expect. You can remove this file from use later; an option to do this appears in the menu. If the preferred form for the above in DrScheme 4.0 is something else, I'd be happy to know about it. All I really know is that it works for me, and I'll eventually get around to learning more about snips and events... Pekka Karjalainen, with pretty much the same kind of keyboard From robby at cs.uchicago.edu Fri Jun 13 13:21:02 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:07 2009 Subject: [plt-scheme] Swedish keyboard bug in DrScheme In-Reply-To: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> Message-ID: <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> Thanks for figuring this out! I don't have a sweedish keyboard to test this on, so I wonder if one of you can help me by applying the patch below (just a simple change to two lines), exiting drscheme, running "setup-plt" from a shell/command window and then seeing if DrScheme behaves properly after that? The file in question in plt/collects/framework/private/keymap.ss. Just in case you're not familiar with the notation below, the lines with the "-" in front go away and should be replaced by the ones with the "+" in front (but don't include the "+" itself). The lines without "+" or "-" are just there for context so you can be sure you're in the right spot in the file. =================================================================== --- keymap.ss (revision 10227) +++ keymap.ss (working copy) @@ -1079,8 +1079,8 @@ (setup-mappings greek-letters #f) (setup-mappings Greek-letters #t)) - (map "c:\\" "TeX compress") - (map "m:\\" "TeX compress") + (map "~m:c:\\" "TeX compress") + (map "~c:m:\\" "TeX compress") (map-meta "c:down" "down-into-embedded-editor") (map "a:c:down" "down-into-embedded-editor") Thanks, Robby On Fri, Jun 13, 2008 at 11:33 AM, Pekka Karjalainen wrote: > On 6/13/08, Niklas Larsson wrote: >> >> In DrScheme 4.0 for Windows it is impossible to type a backslash character >> on a swedish keyboard. We use the AltGr-+ combination to get '\' on swedish >> keyboards, it does nothing in DrScheme, all other AltGr combinations seem to >> work fine (braces, @, $, ?...). This problem didn't exist in v371. A really >> weird bug. > > DrScheme has a default keybinding where Meta-\ means "TeX compress". > This changes the names of greek letters written in TeX style to the > corresponding symbols. E.g. \beta turns into the actual character for > lowercase beta. I think this only works when the caret is placed right > after such a string. > > You can change the keybinding with the help of this piece of code. > It's based on a message I found in the mailing list archives, as > referenced. Save this as a file mykeys.ss somewhere convenient. > > ;; following the msg > http://www.cs.brown.edu/pipermail/plt-scheme/2006-March/012391.html > (module mykeys (lib "keybinding-lang.ss" "framework") > (define (make-handler s) > (lambda (editor event) > (send editor insert (make-object string-snip% s)))) > > (keybinding "M:\\" (make-handler "\\"))) > > Then go to Edit -> Keybindings -> Add User-defined Keybindings and > choose the file you just saved. This should make the key combination > do what you expect. You can remove this file from use later; an option > to do this appears in the menu. > > If the preferred form for the above in DrScheme 4.0 is something else, > I'd be happy to know about it. All I really know is that it works for > me, and I'll eventually get around to learning more about snips and > events... > > Pekka Karjalainen, with pretty much the same kind of keyboard > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From andre.mayers at usherbrooke.ca Fri Jun 13 14:19:32 2008 From: andre.mayers at usherbrooke.ca (Andre Mayers) Date: Thu Mar 26 02:20:07 2009 Subject: [plt-scheme] Swedish keyboard bug in DrScheme In-Reply-To: <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> Message-ID: <000001c8cd82$06c95700$145c0500$@mayers@usherbrooke.ca> It works with the Canadian multilingual standard keyboard. Thank you Andr? Mayers, Ph.D., M. Ps. professeur agr?g? D?partement d'informatique Universit? de Sherbrooke Sherbrooke (Qu?bec) Canada J1K 2R1 t?l: +1 819-821-8000 poste 62041 fax: +1 819-821-8200 andre.mayers@usherbrooke.ca http://www.dmi.usherb.ca/~amayers Andre -----Message d'origine----- De : plt-scheme-bounces@list.cs.brown.edu [mailto:plt-scheme-bounces@list.cs.brown.edu] De la part de Robby Findler Envoy? : June-13-08 1:21 PM ? : Pekka Karjalainen Cc : PLT-Scheme Objet : Re: [plt-scheme] Swedish keyboard bug in DrScheme Thanks for figuring this out! I don't have a sweedish keyboard to test this on, so I wonder if one of you can help me by applying the patch below (just a simple change to two lines), exiting drscheme, running "setup-plt" from a shell/command window and then seeing if DrScheme behaves properly after that? The file in question in plt/collects/framework/private/keymap.ss. Just in case you're not familiar with the notation below, the lines with the "-" in front go away and should be replaced by the ones with the "+" in front (but don't include the "+" itself). The lines without "+" or "-" are just there for context so you can be sure you're in the right spot in the file. =================================================================== --- keymap.ss (revision 10227) +++ keymap.ss (working copy) @@ -1079,8 +1079,8 @@ (setup-mappings greek-letters #f) (setup-mappings Greek-letters #t)) - (map "c:\\" "TeX compress") - (map "m:\\" "TeX compress") + (map "~m:c:\\" "TeX compress") + (map "~c:m:\\" "TeX compress") (map-meta "c:down" "down-into-embedded-editor") (map "a:c:down" "down-into-embedded-editor") Thanks, Robby On Fri, Jun 13, 2008 at 11:33 AM, Pekka Karjalainen wrote: > On 6/13/08, Niklas Larsson wrote: >> >> In DrScheme 4.0 for Windows it is impossible to type a backslash >> character on a swedish keyboard. We use the AltGr-+ combination to >> get '\' on swedish keyboards, it does nothing in DrScheme, all other >> AltGr combinations seem to work fine (braces, @, $, ?...). This >> problem didn't exist in v371. A really weird bug. > > DrScheme has a default keybinding where Meta-\ means "TeX compress". > This changes the names of greek letters written in TeX style to the > corresponding symbols. E.g. \beta turns into the actual character for > lowercase beta. I think this only works when the caret is placed right > after such a string. > > You can change the keybinding with the help of this piece of code. > It's based on a message I found in the mailing list archives, as > referenced. Save this as a file mykeys.ss somewhere convenient. > > ;; following the msg > http://www.cs.brown.edu/pipermail/plt-scheme/2006-March/012391.html > (module mykeys (lib "keybinding-lang.ss" "framework") (define > (make-handler s) > (lambda (editor event) > (send editor insert (make-object string-snip% s)))) > > (keybinding "M:\\" (make-handler "\\"))) > > Then go to Edit -> Keybindings -> Add User-defined Keybindings and > choose the file you just saved. This should make the key combination > do what you expect. You can remove this file from use later; an option > to do this appears in the menu. > > If the preferred form for the above in DrScheme 4.0 is something else, > I'd be happy to know about it. All I really know is that it works for > me, and I'll eventually get around to learning more about snips and > events... > > Pekka Karjalainen, with pretty much the same kind of keyboard > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From deinst at gmail.com Fri Jun 13 14:28:15 2008 From: deinst at gmail.com (David Einstein) Date: Thu Mar 26 02:20:08 2009 Subject: [plt-scheme] Contract question Message-ID: <56750b780806131128g59230ccbm9770ef31e3aa4a82@mail.gmail.com> How do I write a contract for the following (define (foo a #:optional b) #f) I would have thought that (provide/contract [foo (->* (any/c) (any/c) false?)] ) would work, but obviously I'm missing something. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080613/0fc6bfe0/attachment.htm From robby at cs.uchicago.edu Fri Jun 13 14:31:46 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:08 2009 Subject: [plt-scheme] Contract question In-Reply-To: <56750b780806131128g59230ccbm9770ef31e3aa4a82@mail.gmail.com> References: <56750b780806131128g59230ccbm9770ef31e3aa4a82@mail.gmail.com> Message-ID: <932b2f1f0806131131o111add67wd6634c92778dabd2@mail.gmail.com> That function accepts a mandatory keyword parameter using the keyword whose name just happens to be #:optional which, I'm guessing, is not what you intended. Anyways, here is its contract: (-> any/c #:optional any/c false/c) If you wanted a function that takes either one or two arguments (as the contract suggests), I think you meant to write it like this: (define (foo a [b #f]) #f) (They keyword syntax changed a little bit from 372's (lib "kw.ss") to 4.0. Maybe that's the source of the confusion?) Robby On Fri, Jun 13, 2008 at 1:28 PM, David Einstein wrote: > How do I write a contract for the following > > (define (foo a #:optional b) #f) > > I would have thought that > > (provide/contract > [foo (->* (any/c) (any/c) false?)] > ) > > would work, but obviously I'm missing something. > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From deinst at gmail.com Fri Jun 13 14:42:59 2008 From: deinst at gmail.com (David Einstein) Date: Thu Mar 26 02:20:09 2009 Subject: [plt-scheme] Contract question In-Reply-To: <932b2f1f0806131131o111add67wd6634c92778dabd2@mail.gmail.com> References: <56750b780806131128g59230ccbm9770ef31e3aa4a82@mail.gmail.com> <932b2f1f0806131131o111add67wd6634c92778dabd2@mail.gmail.com> Message-ID: <56750b780806131142r7b9f6260ld3bb2ce7b800fa73@mail.gmail.com> Thanks. The source of the problem was that I missed the note in the documentation for scheme/kw saying that "The lambdaand procedure-application forms of scheme/base support keyword arguments, and it is *not* compatible with the mzlib/kw library." and blithely went on thinking they were the same. I'll pay more attention to the sidenotes in the future. Thanks again. On Fri, Jun 13, 2008 at 2:31 PM, Robby Findler wrote: > That function accepts a mandatory keyword parameter using the keyword > whose name just happens to be #:optional which, I'm guessing, is not > what you intended. > > Anyways, here is its contract: > > (-> any/c #:optional any/c false/c) > > If you wanted a function that takes either one or two arguments (as > the contract suggests), I think you meant to write it like this: > > (define (foo a [b #f]) #f) > > (They keyword syntax changed a little bit from 372's (lib "kw.ss") to > 4.0. Maybe that's the source of the confusion?) > > Robby > > On Fri, Jun 13, 2008 at 1:28 PM, David Einstein wrote: > > How do I write a contract for the following > > > > (define (foo a #:optional b) #f) > > > > I would have thought that > > > > (provide/contract > > [foo (->* (any/c) (any/c) false?)] > > ) > > > > would work, but obviously I'm missing something. > > > > > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080613/ef70724b/attachment.html From dyoo at cs.wpi.edu Fri Jun 13 15:24:28 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:09 2009 Subject: [plt-scheme] Updated galore to run under 4.0 Message-ID: > (I hacked up my local copy of Galore and SchemeUnit 1.2 to make things > run again, and will send my changes upstream tomorrow...) Hi Jens, Done. I've put up a git repository that should show the changes made from the 3.6 release to make it compile under PLT Scheme 4.0 without error messages. http://hashcollision.org/tmp/galore.git From p3k at iki.fi Fri Jun 13 16:15:44 2008 From: p3k at iki.fi (Pekka Karjalainen) Date: Thu Mar 26 02:20:09 2009 Subject: [plt-scheme] Fonts with proper angle brackets Message-ID: <233457100806131315q7bdff45cv567af79185543523@mail.gmail.com> I had a little trouble getting the ⟩ and ⟨ entities to display in the PLT documentation. It turns out none of the default fonts in my Windows XP installation has them, so I had to find a font that does. These stand for left and right angle bracket, and are used in syntax descriptions. It can be quite annoying to see boxes or question marks in their place. Fortunately there are several fonts that have them. I'm posting this note in the hope it'll save someone else some time hunting for a proper font. So, here is a list of various free fonts from a Wikipedia talk page. http://en.wikipedia.org/wiki/Talk:Bracket Search the page for the word 'Aboriginal' (which is part of two of the fonts' names). From yinso.chen at gmail.com Fri Jun 13 17:07:55 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:10 2009 Subject: [plt-scheme] are some of the file system functions atomic? In-Reply-To: <20080613124011.54E536500C9@mail-svr1.cs.utah.edu> References: <779bf2730806122144q7fc8edf2mcfb58ff7e4f791c7@mail.gmail.com> <20080613124011.54E536500C9@mail-svr1.cs.utah.edu> Message-ID: <779bf2730806131407k566fc001vdde566427798e7be@mail.gmail.com> Thanks! On Fri, Jun 13, 2008 at 5:40 AM, Matthew Flatt wrote: > > Yes, those operations are performed atomically when the OS supports it. > > Currently, only the docs for `rename-file-or-directory' mention > atomicity, and in that case to clarify that there's a race condition on > the check for an existing file --- which corresponds to the fact that > the rename() system call always replaces existing files. > > Matthew > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080613/c2ca962a/attachment.htm From farr at MIT.EDU Fri Jun 13 18:30:49 2008 From: farr at MIT.EDU (Will Farr) Date: Thu Mar 26 02:20:10 2009 Subject: [plt-scheme] No vector-of-functions contract? Message-ID: <41CEC6D9-CE3D-4A99-AC96-1065F4D400CB@mit.edu> Hello all, I want to have the following provide form in some of my code: (provide/contract (eta (matrix-of-dimensions/c 4 4)) (generators (vectorof (matrix-of-dimensions/c 4 4))) (exp-generators (vectorof (-> real? (matrix-of-dimensions/c 4 4))))) Note the contract on exp-generators: a vector of functions. Trying to compile this code complains about vectorof: expected a flat contract or procedure of arity 1 as argument, got: #<|->|> Is there any way to put a contract on this export more specific than (vectorof procedure?)? Is it just too hard to dig into the vector and attach the appropriate higher-order contract to its members? Thanks, Will From matthias at ccs.neu.edu Fri Jun 13 18:51:41 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:10 2009 Subject: [plt-scheme] No vector-of-functions contract? In-Reply-To: <41CEC6D9-CE3D-4A99-AC96-1065F4D400CB@mit.edu> References: <41CEC6D9-CE3D-4A99-AC96-1065F4D400CB@mit.edu> Message-ID: Vectors are mutable. We don't know how to enforce contracts on mutable compound structures well, so we don't allow it. On Jun 13, 2008, at 6:30 PM, Will Farr wrote: > Hello all, > > I want to have the following provide form in some of my code: > > (provide/contract > (eta (matrix-of-dimensions/c 4 4)) > (generators (vectorof (matrix-of-dimensions/c 4 4))) > (exp-generators (vectorof (-> real? (matrix-of-dimensions/c 4 4))))) > > Note the contract on exp-generators: a vector of functions. Trying > to compile this code complains about > > vectorof: expected a flat contract or procedure of arity 1 as > argument, got: #<|->|> > > Is there any way to put a contract on this export more specific > than (vectorof procedure?)? Is it just too hard to dig into the > vector and attach the appropriate higher-order contract to its > members? > > Thanks, > Will > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From farr at MIT.EDU Fri Jun 13 18:57:59 2008 From: farr at MIT.EDU (Will Farr) Date: Thu Mar 26 02:20:10 2009 Subject: [plt-scheme] No vector-of-functions contract? In-Reply-To: References: <41CEC6D9-CE3D-4A99-AC96-1065F4D400CB@mit.edu> Message-ID: <7FD5DB2B-BF49-4FFF-9F71-5505B673E192@MIT.EDU> Of course! (I sometimes forget about that, since I try to avoid mutating my vectors.) Thanks for clearing that up. Will On Jun 13, 2008, at 6:51 PM, Matthias Felleisen wrote: > > Vectors are mutable. We don't know how to enforce contracts on > mutable compound structures well, so we don't allow it. > > On Jun 13, 2008, at 6:30 PM, Will Farr wrote: > >> Hello all, >> >> I want to have the following provide form in some of my code: >> >> (provide/contract >> (eta (matrix-of-dimensions/c 4 4)) >> (generators (vectorof (matrix-of-dimensions/c 4 4))) >> (exp-generators (vectorof (-> real? (matrix-of-dimensions/c 4 4))))) >> >> Note the contract on exp-generators: a vector of functions. Trying >> to compile this code complains about >> >> vectorof: expected a flat contract or procedure of arity 1 as >> argument, got: #<|->|> >> >> Is there any way to put a contract on this export more specific >> than (vectorof procedure?)? Is it just too hard to dig into the >> vector and attach the appropriate higher-order contract to its >> members? >> >> Thanks, >> Will >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From nifty at live.se Fri Jun 13 18:56:38 2008 From: nifty at live.se (Niklas Larsson) Date: Thu Mar 26 02:20:11 2009 Subject: [plt-scheme] Swedish keyboard bug in DrScheme In-Reply-To: <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> Message-ID: That change in keymap.ss works fine for me. Thank you everybody! Niklas > Date: Fri, 13 Jun 2008 12:21:02 -0500> From: robby@cs.uchicago.edu> To: p3k@iki.fi> Subject: Re: [plt-scheme] Swedish keyboard bug in DrScheme> CC: plt-scheme@list.cs.brown.edu> > Thanks for figuring this out! I don't have a sweedish keyboard to test> this on, so I wonder if one of you can help me by applying the patch> below (just a simple change to two lines), exiting drscheme, running> "setup-plt" from a shell/command window and then seeing if DrScheme> behaves properly after that?> > The file in question in plt/collects/framework/private/keymap.ss. Just> in case you're not familiar with the notation below, the lines with> the "-" in front go away and should be replaced by the ones with the> "+" in front (but don't include the "+" itself). The lines without "+"> or "-" are just there for context so you can be sure you're in the> right spot in the file.> > ===================================================================> --- keymap.ss (revision 10227)> +++ keymap.ss (working copy)> @@ -1079,8 +1079,8 @@> (setup-mappings greek-letters #f)> (setup-mappings Greek-letters #t))> > - (map "c:\\" "TeX compress")> - (map "m:\\" "TeX compress")> + (map "~m:c:\\" "TeX compress")> + (map "~c:m:\\" "TeX compress")> > (map-meta "c:down" "down-into-embedded-editor")> (map "a:c:down" "down-into-embedded-editor")> > Thanks,> Robby> > On Fri, Jun 13, 2008 at 11:33 AM, Pekka Karjalainen wrote:> > On 6/13/08, Niklas Larsson wrote:> >>> >> In DrScheme 4.0 for Windows it is impossible to type a backslash character> >> on a swedish keyboard. We use the AltGr-+ combination to get '\' on swedish> >> keyboards, it does nothing in DrScheme, all other AltGr combinations seem to> >> work fine (braces, @, $, ?...). This problem didn't exist in v371. A really> >> weird bug.> >> > DrScheme has a default keybinding where Meta-\ means "TeX compress".> > This changes the names of greek letters written in TeX style to the> > corresponding symbols. E.g. \beta turns into the actual character for> > lowercase beta. I think this only works when the caret is placed right> > after such a string.> >> > You can change the keybinding with the help of this piece of code.> > It's based on a message I found in the mailing list archives, as> > referenced. Save this as a file mykeys.ss somewhere convenient.> >> > ;; following the msg> > http://www.cs.brown.edu/pipermail/plt-scheme/2006-March/012391.html> > (module mykeys (lib "keybinding-lang.ss" "framework")> > (define (make-handler s)> > (lambda (editor event)> > (send editor insert (make-object string-snip% s))))> >> > (keybinding "M:\\" (make-handler "\\")))> >> > Then go to Edit -> Keybindings -> Add User-defined Keybindings and> > choose the file you just saved. This should make the key combination> > do what you expect. You can remove this file from use later; an option> > to do this appears in the menu.> >> > If the preferred form for the above in DrScheme 4.0 is something else,> > I'd be happy to know about it. All I really know is that it works for> > me, and I'll eventually get around to learning more about snips and> > events...> >> > Pekka Karjalainen, with pretty much the same kind of keyboard> > _________________________________________________> > For list-related administrative tasks:> > http://list.cs.brown.edu/mailman/listinfo/plt-scheme> >> > _________________________________________________________________ Utmana dina kompisar i Sten, sax, p?se! http://www.live.msn.se/messenger/#/News/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080614/bcc43420/attachment.html From filcab at gmail.com Fri Jun 13 19:37:16 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:20:11 2009 Subject: [plt-scheme] No vector-of-functions contract? In-Reply-To: References: <41CEC6D9-CE3D-4A99-AC96-1065F4D400CB@mit.edu> Message-ID: <6D48E78D-2612-4D56-BED0-BB55B669C7CF@gmail.com> On 13 Jun, 2008, at 23:51, Matthias Felleisen wrote: > Vectors are mutable. We don't know how to enforce contracts on > mutable compound structures well, so we don't allow it. What about if one hammered something like a mutable flag in a vector? One would just have to turn it to false when returning it from a function with a contract. It's a bit hammered but then you could have vectors and contracts. Of course every vector-set! would need an extra if. - Filipe Cabecinhas From yinso.chen at gmail.com Fri Jun 13 20:01:35 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:12 2009 Subject: [plt-scheme] (v4) html parser Message-ID: <779bf2730806131701ie314c29sc8c53741207c3584@mail.gmail.com> Hi - A couple of questions regarding the built-in html library in PLT scheme (v4): How permissive is `(read-html)`? I tried to parse a couple of non strict pages in the wild and the parsing passed. But I have no idea how to read it back out to verify the behavior. Are there built in utility functions that would handle conversion from html structures to xml structures or xexpr? I didn't find them through the scribble doc on http://docs.plt-scheme.org/html/index.html... Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080613/1f905ad1/attachment.htm From cce at ccs.neu.edu Fri Jun 13 20:09:55 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:20:12 2009 Subject: [plt-scheme] No vector-of-functions contract? In-Reply-To: <6D48E78D-2612-4D56-BED0-BB55B669C7CF@gmail.com> References: <41CEC6D9-CE3D-4A99-AC96-1065F4D400CB@mit.edu> <6D48E78D-2612-4D56-BED0-BB55B669C7CF@gmail.com> Message-ID: <990e0c030806131709y6803d337s8270fe005b954ef5@mail.gmail.com> On Fri, Jun 13, 2008 at 7:37 PM, Filipe Cabecinhas wrote: > > On 13 Jun, 2008, at 23:51, Matthias Felleisen wrote: > >> Vectors are mutable. We don't know how to enforce contracts on mutable >> compound structures well, so we don't allow it. > > > What about if one hammered something like a mutable flag in a vector? One > would just have to turn it to false when returning it from a function with a > contract. It's a bit hammered but then you could have vectors and contracts. > > Of course every vector-set! would need an extra if. > > - Filipe Cabecinhas See vector-immutableof and vector-immutable/c; we have immutable vectors, and you can put higher-order contracts on them. -- Carl Eastlund From neil at neilvandyke.org Fri Jun 13 20:35:25 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:20:12 2009 Subject: [plt-scheme] HtmlPrag doesn't yet work with PLT 4.0 Message-ID: <4853124D.7080107@neilvandyke.org> Some people are noticing that HtmlPrag doesn't work with PLT 4.0. A solution might take a while, since I need to find time to rewrite one of the key algorithms in addition to other changes. (HtmlPrag was the first Scheme code I wrote, and I used mutable pairs heavily.) I already tried a stopgap kludge, but it was not satisfactory. If anyone's dissertation is hanging in the balance, let me know, and I can prioritize this ahead of some other things. From eli at barzilay.org Fri Jun 13 21:59:21 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:12 2009 Subject: [plt-scheme] Fonts with proper angle brackets In-Reply-To: <233457100806131315q7bdff45cv567af79185543523@mail.gmail.com> References: <233457100806131315q7bdff45cv567af79185543523@mail.gmail.com> Message-ID: <18515.9721.616442.68928@arabic.ccs.neu.edu> On Jun 13, Pekka Karjalainen wrote: > I had a little trouble getting the ⟩ and ⟨ entities to > display in the PLT documentation. It turns out none of the default > fonts in my Windows XP installation has them, so I had to find a > font that does. [...] Thanks for the link -- it has a good summary of the issue (we did have plain `<' and `>' at some point, but they looked very wrong). I've searched the Unicode names list (http://unicode.org/Public/UNIDATA/NamesList.txt) for anything that sounds vaguely relevant, and tested it in four browsers on Windows (IE, FF, Opera, Safari) and two on Linux (Galeon, FF). See the results are at http://tmp.barzilay.org/xx.html It looks like 3008,3009 are good choices, but the problem is that they render with a wide space on the left/right, and when I tried them in the PLT docs they were big enough to look like a mistake. I then tried 2039,203A (angle quotation mark), and I think that they look better, even though strictly speaking they're incorrect. I've temporarily changed the regexp reference page http://docs.plt-scheme.org/reference/regexp.html to use them, so you can see how it looks like with this choice. Any comments? (Specifically, does anyone see a problem with using these two?) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jpc-ml at zenburn.net Sat Jun 14 15:58:07 2008 From: jpc-ml at zenburn.net (=?UTF-8?B?SmFrdWIgUGlvdHIgQ8WCYXBh?=) Date: Thu Mar 26 02:20:13 2009 Subject: [plt-scheme] Fonts with proper angle brackets In-Reply-To: <18515.9721.616442.68928@arabic.ccs.neu.edu> References: <233457100806131315q7bdff45cv567af79185543523@mail.gmail.com> <18515.9721.616442.68928@arabic.ccs.neu.edu> Message-ID: <485422CF.3040309@zenburn.net> Eli Barzilay wrote: > I've searched the Unicode names list > (http://unicode.org/Public/UNIDATA/NamesList.txt) for anything that > sounds vaguely relevant, and tested it in four browsers on Windows > (IE, FF, Opera, Safari) and two on Linux (Galeon, FF). See the > results are at > > http://tmp.barzilay.org/xx.html > > It looks like 3008,3009 are good choices, but the problem is that they > render with a wide space on the left/right, On a Mac the 2329,232A render with strange spacing. (3008 and 3009 look ok) > I then > tried 2039,203A (angle quotation mark), and I think that they look > better, even though strictly speaking they're incorrect. They look nice in the docs and since that's only a notation you may create yours (the Wikipedia controversy was around showing <> as angle brackets in an article about angle brackets, not much relevant to this situation IMHO) -- regards, Jakub Piotr C?apa From info at reatlas.com Sat Jun 14 18:57:49 2008 From: info at reatlas.com (Ethan Herdrick) Date: Thu Mar 26 02:20:13 2009 Subject: [plt-scheme] PLT Scheme and Lucene In-Reply-To: <91f48dbf0806140927rcc0c565wd7582fc9849b1bf@mail.gmail.com> References: <91f48dbf0806140927rcc0c565wd7582fc9849b1bf@mail.gmail.com> Message-ID: <91f48dbf0806141557i7bdb3ff5sac01fd44d35da654@mail.gmail.com> Has anyone used Lucene with MzScheme? (Lucene is an excellent drop-in search engine written in Java.) A related question is, has there been any work on an interface to Java? I saw this message already: http://list.cs.brown.edu/pipermail/plt-scheme/2007-October/021009.html Thanks -Ethan From marek at xivilization.net Sat Jun 14 19:23:05 2008 From: marek at xivilization.net (Marek Kubica) Date: Thu Mar 26 02:20:13 2009 Subject: [plt-scheme] MrEd and the look Message-ID: <20080615012305.7e379625@halmanfloyd.lan.local> Hi! I've just unpacked the x86_64 Fedora PLT 4.0 binary and it works - great. I did a quick look into the mred source to verify the information I've read that MrEd uses wxWindows. It does. But when I did an ldd on the mred binary, it does not seem to link against wx but rather on the low-level libraries: linux-vdso.so.1 => (0x00007fff94dfe000) libSM.so.6 => /usr/lib/libSM.so.6 libICE.so.6 => /usr/lib/libICE.so.6 libXaw.so.7 => /usr/lib/libXaw.so.7 libXmu.so.6 => /usr/lib/libXmu.so.6 libXt.so.6 => /usr/lib/libXt.so.6 libX11.so.6 => /usr/lib/libX11.so.6 libXext.so.6 => /usr/lib/libXext.so.6 libGL.so.1 => /usr/lib/libGL.so.1 libXrender.so.1 => /usr/lib/libXrender.so.1 libXft.so.2 => /usr/lib/libXft.so.2 libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 libfreetype.so.6 => /usr/lib/libfreetype.so.6 libcairo.so.2 => /usr/lib/libcairo.so.2 libpng12.so.0 => /usr/lib/libpng12.so.0 libz.so.1 => /usr/lib/libz.so.1 libjpeg.so.62 => /usr/lib/libjpeg.so.62 libdl.so.2 => /lib/libdl.so.2 libstdc++.so.6 => /usr/lib/libstdc++.so.6 libm.so.6 => /lib/libm.so.6 libgcc_s.so.1 => /lib/libgcc_s.so.1 libc.so.6 => /lib/libc.so.6 libXpm.so.4 => /usr/lib/libXpm.so.4 libXau.so.6 => /usr/lib/libXau.so.6 libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 libXdamage.so.1 => /usr/lib/libXdamage.so.1 libXfixes.so.3 => /usr/lib/libXfixes.so.3 libpthread.so.0 => /lib/libpthread.so.0 libdrm.so.2 => /usr/lib/libdrm.so.2 libexpat.so.1 => /usr/lib/libexpat.so.1 libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 /lib64/ld-linux-x86-64.so.2 My question is, whether it would be possible to have a wxGTK-enabled MrEd? As far as I have used wxWidgets (via wxPython) programs written with wx should run just fine with any GUI toolkit. regards, Marek P.S.: While I'm at it: congratulations for the new release! From robby at cs.uchicago.edu Sat Jun 14 20:36:12 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:13 2009 Subject: [plt-scheme] MrEd and the look In-Reply-To: <932b2f1f0806141735v40a3f89ap890ba9e79edaef38@mail.gmail.com> References: <20080615012305.7e379625@halmanfloyd.lan.local> <932b2f1f0806141735v40a3f89ap890ba9e79edaef38@mail.gmail.com> Message-ID: <932b2f1f0806141736m4805246fq68037b07e4c52aa7@mail.gmail.com> oops lost list cc first time. Robby On 6/14/08, Robby Findler wrote: > This is becoming something of a FAQ at this point. There are more > details in the mail archives, but the short version is that we > branched from wx a very long time ago and for technical reasons it > would be very difficult to merge their changes into our world. > > At this point it is closer to the truth that we have nothing on common > w/ wxWindows. > > Sorry, > Robby > > On 6/14/08, Marek Kubica wrote: >> Hi! >> >> I've just unpacked the x86_64 Fedora PLT 4.0 binary and it works - >> great. >> >> I did a quick look into the mred source to verify the information I've >> read that MrEd uses wxWindows. It does. But when I did an ldd on the >> mred binary, it does not seem to link against wx but rather on the >> low-level libraries: >> >> linux-vdso.so.1 => (0x00007fff94dfe000) >> libSM.so.6 => /usr/lib/libSM.so.6 >> libICE.so.6 => /usr/lib/libICE.so.6 >> libXaw.so.7 => /usr/lib/libXaw.so.7 >> libXmu.so.6 => /usr/lib/libXmu.so.6 >> libXt.so.6 => /usr/lib/libXt.so.6 >> libX11.so.6 => /usr/lib/libX11.so.6 >> libXext.so.6 => /usr/lib/libXext.so.6 >> libGL.so.1 => /usr/lib/libGL.so.1 >> libXrender.so.1 => /usr/lib/libXrender.so.1 >> libXft.so.2 => /usr/lib/libXft.so.2 >> libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 >> libfreetype.so.6 => /usr/lib/libfreetype.so.6 >> libcairo.so.2 => /usr/lib/libcairo.so.2 >> libpng12.so.0 => /usr/lib/libpng12.so.0 >> libz.so.1 => /usr/lib/libz.so.1 >> libjpeg.so.62 => /usr/lib/libjpeg.so.62 >> libdl.so.2 => /lib/libdl.so.2 >> libstdc++.so.6 => /usr/lib/libstdc++.so.6 >> libm.so.6 => /lib/libm.so.6 >> libgcc_s.so.1 => /lib/libgcc_s.so.1 >> libc.so.6 => /lib/libc.so.6 >> libXpm.so.4 => /usr/lib/libXpm.so.4 >> libXau.so.6 => /usr/lib/libXau.so.6 >> libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 >> libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 >> libXdamage.so.1 => /usr/lib/libXdamage.so.1 >> libXfixes.so.3 => /usr/lib/libXfixes.so.3 >> libpthread.so.0 => /lib/libpthread.so.0 >> libdrm.so.2 => /usr/lib/libdrm.so.2 >> libexpat.so.1 => /usr/lib/libexpat.so.1 >> libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 >> /lib64/ld-linux-x86-64.so.2 >> >> My question is, whether it would be possible to have a wxGTK-enabled >> MrEd? As far as I have used wxWidgets (via wxPython) programs written >> with wx should run just fine with any GUI toolkit. >> >> regards, >> Marek >> >> P.S.: While I'm at it: congratulations for the new release! >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> > From martindemello at gmail.com Sat Jun 14 20:39:33 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:13 2009 Subject: [plt-scheme] indentation for for/fold Message-ID: How do I get the for/fold indentation shown in the example code, that is, the clause indented to the same level as the accumulator list, but the body indented relative to the for/fold? martin From martindemello at gmail.com Sat Jun 14 22:39:07 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:13 2009 Subject: [plt-scheme] help writing idiomatic plt scheme Message-ID: I've pasted a program fragment in at http://pastebin.com/f152f0ea4 - I would like some help improving it in terms of making it more concise and idiomatic, since I have the feeling I'm doing too much work for a fundamentally simple problem. martin p.s. code below if you don't feel like clicking through to pastebin ; every line of input-file starts with either "# " or "= ". ; (we assume the input is well-formed in that this always holds) ; we want to collect the lines into two global vectors, lines-o and lines-p. ; runs of "# " or "= " lines should be collected into single strings; ; that is, "# " strings and "= " strings should strictly alternate (define (append-to-car str lst) (cond [(null? lst) (list str)] [else (cons (string-append (car lst) "\n" str) (cdr lst))])) (define-values (read-o read-p _) (for/fold ([o '()] [p '()] [c "# "]) ([line (in-lines input-file)]) (match (list (substring line 0 2) (substring line 2)) [(list "# " rest) (cond [(equal? c "# ") (values (append-to-car rest o) p "# ")] [else (values (cons rest o) p "# ")])] [(list "= " rest) (cond [(equal? c "= ") (values o (append-to-car rest p) "= ")] [else (values o (cons rest p) "= ")])]))) (close-input-port input-file) (define lines-o (list->vector (reverse read-o))) (define lines-p (list->vector (reverse read-p))) From martindemello at gmail.com Sun Jun 15 05:15:41 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:13 2009 Subject: [plt-scheme] adding references to the documentation index Message-ID: I was looking for destructuring-bind just now, searched through the documentation and quite naturally didn't find anything. A few seconds on google revealed that match-let was the PLT equivalent, and I was good to go. However, I note that 'self' in the index references 'this', so there are at least a few entries in there that are simply synonyms. As someone currently learning plt scheme I'm bound to stumble across other examples - would filing documentation enhancement requests to add them to the index be useful, or just adding clutter? martin From mflatt at cs.utah.edu Sun Jun 15 07:25:33 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:14 2009 Subject: [plt-scheme] adding references to the documentation index In-Reply-To: References: Message-ID: <20080615112534.BC9C36500C9@mail-svr1.cs.utah.edu> At Sun, 15 Jun 2008 02:15:41 -0700, "Martin DeMello" wrote: > I was looking for destructuring-bind just now, searched through the > documentation and quite naturally didn't find anything. A few seconds > on google revealed that match-let was the PLT equivalent, and I was > good to go. However, I note that 'self' in the index references > 'this', so there are at least a few entries in there that are simply > synonyms. As someone currently learning plt scheme I'm bound to > stumble across other examples - would filing documentation enhancement > requests to add them to the index be useful, or just adding clutter? Yes, I think extra index entries would be useful. For now, I've added "destructuring bind". Matthew From farr at MIT.EDU Sun Jun 15 11:39:55 2008 From: farr at MIT.EDU (Will Farr) Date: Thu Mar 26 02:20:14 2009 Subject: [plt-scheme] Bug in Syntax Certification? Message-ID: Hello, I'm seeing a weird error message when I try to use iteration macros outside the module I defined them in. For example, the following breaks (in the scheme language in DrScheme, version 4.0.0.1- svn13jun2008): (require (planet wmfarr/simple-matrix:1/matrix)) (for/list ((x (in-matrix (matrix* 2 2 1 2 3 4)))) x) with the error compile: access from an uncertified context to unexported variable from module: "/Users/farr/Documents/code/simple-matrix/matrix.ss" in: matrix-elts There are two weird things about this error: 1. matrix-elts is exported from the matrix.ss module. 2. I haven't been playing with certifying identifiers at all (in fact, I have only a vague notion of what certifying an identifier means). Is this because I've used define-sequence-syntax to define in-matrix inappropriately (the code for in-matrix and its companion procedure *in-matrix is given below)? Is this a problem with the syntax expander in Friday's SVN? Should I just file this as a bug in the bug reporter, or is it a quick fix? Sorry for the trouble, and thanks for any help you all can give me! Will ----------------------- Code for in-matrix: (define (*in-matrix m) (make-do-sequence (lambda () (values (lambda (k) (vector-ref (matrix-elts m) k)) add1 0 (lambda (k) (< k (* (matrix-rows m) (matrix-cols m)))) (lambda (elt) #t) (lambda (k elt) #t))))) (define-sequence-syntax in-matrix (lambda () (syntax *in-matrix)) (lambda (stx) (syntax-case stx () (((id) (_ matrix-expr)) (syntax/loc stx ((id) (in-vector (matrix-elts matrix-expr))))) (((i-id j-id elt-id) (_ matrix-expr)) (syntax/loc stx ((i-id j-id elt-id) (:do-in (((m) matrix-expr)) ;Outer bindings. #t ; Outer check ((i-id 0) (j-id 0) (rows (matrix-rows m)) (cols (matrix- cols m))) ;Loop id (< i-id rows) ; Pos-guard (((ip1) (add1 i-id)) ((jp1) (add1 j-id)) ((elt-id) (matrix- ref m i-id j-id))) ; Inner-id. #t ; Pre-guard #t ; Post-guard ((if (>= jp1 cols) ip1 i-id) (if (>= jp1 cols) 0 jp1) rows cols)))))))) From mflatt at cs.utah.edu Sun Jun 15 12:07:03 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:14 2009 Subject: [plt-scheme] Bug in Syntax Certification? In-Reply-To: References: Message-ID: <20080615160704.EE20D650085@mail-svr1.cs.utah.edu> At Sun, 15 Jun 2008 11:39:55 -0400, Will Farr wrote: > Hello, > > I'm seeing a weird error message when I try to use iteration macros > outside the module I defined them in. For example, the following > breaks (in the scheme language in DrScheme, version 4.0.0.1- > svn13jun2008): > > (require (planet wmfarr/simple-matrix:1/matrix)) > (for/list ((x (in-matrix (matrix* 2 2 1 2 3 4)))) x) > > with the error > > compile: access from an uncertified context to unexported variable > from module: "/Users/farr/Documents/code/simple-matrix/matrix.ss" in: > matrix-elts > > There are two weird things about this error: > > 1. matrix-elts is exported from the matrix.ss module. Is it maybe exported with a contract, so that the `matrix-elts' binding within the module is different than the exported one? > 2. I haven't been playing with certifying identifiers at all (in fact, > I have only a vague notion of what certifying an identifier means). Right, you shouldn't have to do anything with them... > Is this because I've used define-sequence-syntax to define in-matrix > inappropriately (the code for in-matrix and its companion procedure > *in-matrix is given below)? Is this a problem with the syntax > expander in Friday's SVN? It's a bug within `for' (and company) in the expansion of sequences. Since `for' implements its own little expander, it needs to certify things in the same way as the normal macro expander. Although it was correctly adding certificates, it wasn't propagating certificates from a previous expansion (in this case, `in-matrix' to `in-vector') to the result of another expansion (in this case, `in-vector'). This is fixed in SVN. Matthew From farr at MIT.EDU Sun Jun 15 12:14:41 2008 From: farr at MIT.EDU (Will Farr) Date: Thu Mar 26 02:20:14 2009 Subject: [plt-scheme] Bug in Syntax Certification? In-Reply-To: <20080615160704.EE20D650085@mail-svr1.cs.utah.edu> References: <20080615160704.EE20D650085@mail-svr1.cs.utah.edu> Message-ID: Matthew, First off: thanks for the *extremely* quick turnaround on the weekend! You guys are great! On Jun 15, 2008, at 12:07 PM, Matthew Flatt wrote: > s it maybe exported with a contract, so that the `matrix-elts' binding > within the module is different than the exported one? Yep. It's part of the matrix structure, exported with a struct contract. I'll get the SVN straightaway, and see if things are fixed. Thanks again! Will From constant.beta at gmail.com Sun Jun 15 13:14:45 2008 From: constant.beta at gmail.com (=?ISO-8859-2?Q?Micha=B3_Kwiatkowski?=) Date: Thu Mar 26 02:20:14 2009 Subject: [plt-scheme] Macro expander? Message-ID: <5e8b0f6b0806151014s3bbc3892vf710a5e6a3d4ce53@mail.gmail.com> Hello, What's the state of the macro expander in PLT 4.0? Contents of collects/macro-debugger/expand.ss are commented out and the docs are broken because of that: http://docs.plt-scheme.org/macro-debugger/index.html#(part._.Macro_expansion_tools) . Will expander procedures get back? What should I use in the meantime? Cheers, mk From matthias at ccs.neu.edu Sun Jun 15 13:29:15 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:14 2009 Subject: [plt-scheme] help writing idiomatic plt scheme In-Reply-To: References: Message-ID: <67CC2024-9AA8-404F-B9F5-48D5690E7DF8@ccs.neu.edu> On Jun 14, 2008, at 10:39 PM, Martin DeMello wrote: > I've pasted a program fragment in at http://pastebin.com/f152f0ea4 - I > would like some help improving it in terms of making it more concise > and idiomatic, since I have the feeling I'm doing too much work for a > fundamentally simple problem. 1. I don't think this problem is that simple. (It's easy but it has a twist.) 2. I don't think idiomatic PLT Scheme exists but it is emerging. The addition of for & Co shows that we're trying to broaden 'idiomatic' especially for those who cross over from languages that prefer loop-y things. 3. Here is my take on 'idiomatic' coming from a design perspective. Everything is based on the data def file = eof | line * file I am using this contract: ;; InputPort ->* [Listof String] [Listof String] And I assume that your purpose statement holds. Version 1: read line by line; for each line, gather all lines that come with the same starting char; then filter and cut of beginning of each line (define (collect.v0 iport) (define (cut line) (substring line 2)) (define (drive N) (cond [(eof-object? N) '()] [else (let-values ([(N fst) (gather-same N)]) (cons fst (drive N)))])) (define (gather-same str) (define C (string-ref str 0)) (let L ([str str]) (define N (read-line iport)) (cond [(eof-object? N) (values N str)] [(char=? (string-ref N 0) C) (L (string-append str "\n" (cut N)))] [else (values N str)]))) (define all (drive (read-line iport))) (define (select str) (lambda (line) (string=? str (substring line 0 2)))) (values (list->vector (map cut (filter (select "# ") all))) (list->vector (map cut (filter (select "= ") all))))) Version 2: realize that these recursive functions can be "merged" (define (collect.v1 iport) (define (cut line) (substring line 2)) (define (drive N) (cond [(eof-object? N) '()] [else (gather-same N)])) (define (gather-same str) (define C (string-ref str 0)) (let L ([str str]) (define N (read-line iport)) (cond [(eof-object? N) (list str)] [(char=? (string-ref N 0) C) (L (string-append str "\n" (cut N)))] [else (cons str (drive N))]))) (define all (drive (read-line iport))) (define (select str) (lambda (line) (string=? str (substring line 0 2)))) (values (list->vector (map cut (filter (select "# ") all))) (list->vector (map cut (filter (select "= ") all))))) ;; Version 3: simplify syntax (define (collect iport) (define (cut line) (substring line 2)) (define (drive N) (if (eof-object? N) '() (gather-same N))) (define (gather-same str) (define C (string-ref str 0)) (let L ([str str]) (define N (read-line iport)) (cond [(eof-object? N) (list str)] [(char=? (string-ref N 0) C) (L (string-append str "\n" (cut N)))] [else (cons str (drive N))]))) (define all (drive (read-line iport))) (define (select str) (lambda (line) (string=? str (substring line 0 2)))) (values (list->vector (map cut (filter (select "# ") all))) (list->vector (map cut (filter (select "= ") all))))) I do not like that eof-object has to be tested twice. But we need to do so because we lack the knowledge that the file isn't empty. ;; --- The rest of the message is a test suite, comparing my current version with yours. -- Matthias #lang scheme (require rnrs/io/ports-6) (define input #<vector (reverse read-o)) (list->vector (reverse read-p)))) ;; --- test --- (define (run f) (define input-file (open-string-input-port input)) (f input-file)) (let*-values ([(m# m=) (run collect)] [(g# g=) (run given-solution)]) (cond [(and (equal? g# m#) (equal? g= m=)) (void)] [(equal? g# m#) (printf "differing in =:\n~a\n~a\n" g= m=)] [(equal? g= m=) (printf "differing in #:\n~a\n~a\n" g# m#)] [else (printf "differing in all:\n~a\n~a\n~a\n~a\n" g= m= g# m#)])) > > martin > > p.s. code below if you don't feel like clicking through to pastebin > > ; every line of input-file starts with either "# " or "= ". > ; (we assume the input is well-formed in that this always holds) > ; we want to collect the lines into two global vectors, lines-o and > lines-p. > ; runs of "# " or "= " lines should be collected into single strings; > ; that is, "# " strings and "= " strings should strictly alternate > > (define (append-to-car str lst) > (cond [(null? lst) (list str)] > [else (cons (string-append (car lst) "\n" str) (cdr lst))])) > > (define-values (read-o read-p _) > (for/fold ([o '()] [p '()] [c "# "]) > ([line (in-lines input-file)]) > > (match (list (substring line 0 2) (substring line 2)) > [(list "# " rest) > (cond [(equal? c "# ") (values (append-to-car rest o) p "# ")] > [else (values (cons rest o) p "# ")])] > [(list "= " rest) > (cond [(equal? c "= ") (values o (append-to-car rest p) "= ")] > [else (values o (cons rest p) "= ")])]))) > > (close-input-port input-file) > > (define lines-o (list->vector (reverse read-o))) > (define lines-p (list->vector (reverse read-p))) > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From ryanc at ccs.neu.edu Sun Jun 15 14:01:13 2008 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Thu Mar 26 02:20:15 2009 Subject: [plt-scheme] Macro expander? In-Reply-To: <5e8b0f6b0806151014s3bbc3892vf710a5e6a3d4ce53@mail.gmail.com> References: <5e8b0f6b0806151014s3bbc3892vf710a5e6a3d4ce53@mail.gmail.com> Message-ID: <485558E9.7040807@ccs.neu.edu> Micha? Kwiatkowski wrote: > Hello, > > What's the state of the macro expander in PLT 4.0? Contents of > collects/macro-debugger/expand.ss are commented out and the docs are > broken because of that: > http://docs.plt-scheme.org/macro-debugger/index.html#(part._.Macro_expansion_tools) > . Will expander procedures get back? What should I use in the > meantime? The broken docs are my fault. I'll fix them. The macro expander is a core part of mzscheme. The procedures in the macro-debugger docs call the expander and just process the results in a special way. The main expander procedures are here: http://docs.plt-scheme.org/reference/Expanding_Top-Level_Forms.html#(def._((quote._~23~25kernel)._expand)) Ryan > > Cheers, > mk > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From cppljevans at suddenlink.net Sun Jun 15 13:29:29 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:15 2009 Subject: [plt-scheme] Why frtime/demos/spreadsheet missing in 4.0? Message-ID: In version 327, there's: find . -name spreadsheet ./plt/collects/frtime/demos/spreadsheet however, version 4.0, which I downloaded from svn on June 13, doesn't have that directory. Why was that demo dropped? Was it just too difficult to implement? The reason I ask the last question is that I tried using it with 372; however, it was pretty buggy. OTOH, I'd like to see it work. Are there any plans on resurrecting it? From clements at brinckerhoff.org Sun Jun 15 14:51:47 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] help writing idiomatic plt scheme In-Reply-To: References: Message-ID: On Jun 14, 2008, at 7:39 PM, Martin DeMello wrote: > I've pasted a program fragment in at http://pastebin.com/f152f0ea4 - I > would like some help improving it in terms of making it more concise > and idiomatic, since I have the feeling I'm doing too much work for a > fundamentally simple problem. Here's how I'd write it[*]: (define (read-bundles lines) (match lines [(list (? hash-line? h) ... (? eq-line? e) ... (? hash-line? h) ... (? eq-line? e) ... super-...) (list (combine-hash-lines (h ...)) (combine-eq-lines (e ...)) super-...)])) The implementation of the "super-..." pattern is left as an exercise to the master macrologist. Also, I see that you have to double this in case the file starts with "=" lines instead, and I'm not quite sure what to do about that. John [*] if I could. -------------- 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/20080615/3909a494/smime.bin From greg at cs.brown.edu Sun Jun 15 15:05:27 2008 From: greg at cs.brown.edu (Gregory Cooper) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] Why frtime/demos/spreadsheet missing in 4.0? In-Reply-To: References: Message-ID: <65e1d50c0806151205ib376bw9f85a990b37bd94c@mail.gmail.com> Hi Larry, The spreadsheet has not been maintained for some time, and it would take a fair bit of work to bring it to a state where I'd feel comfortable including it in the distribution. I'll see what I can do during the next couple of weeks; if I can get something working again, I'll put it up on PLaneT. Best, Greg On Sun, Jun 15, 2008 at 1:29 PM, Larry Evans wrote: > In version 327, there's: > > find . -name spreadsheet > ./plt/collects/frtime/demos/spreadsheet > > however, version 4.0, which I downloaded from > svn on June 13, doesn't have that directory. > > Why was that demo dropped? Was it just > too difficult to implement? The reason > I ask the last question is that I tried > using it with 372; however, it was pretty > buggy. OTOH, I'd like to see it work. > Are there any plans on resurrecting it? > > > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From diggerrrrr at gmail.com Sun Jun 15 15:14:02 2008 From: diggerrrrr at gmail.com (Veer) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] help writing idiomatic plt scheme In-Reply-To: References: Message-ID: I might as well try : ;;multi-filter : (string->boolean) port -> (list (listof string) (listof string) string) ;;to produce a list such that it simulates (list (filter f lst) (filter neg-f lst) extra) (define (multi-filter f in) (local ((define (multi-filter-accum in L R S) (local ((define a-line (read-line in))) (cond [(eof-object? a-line) (list L R S)] [(f a-line) (multi-filter-accum in (cons a-line L) R (string-append S (substring a-line 0 1)))] [else (multi-filter-accum in L (cons a-line R) (string-append S (substring a-line 0 1)))])))) (multi-filter-accum in empty empty ""))) ;;expression (local ((define ALL (multi-filter (lambda (s) (char=? (string-ref s 0) #\#)) (open-input-file "line-ex"))) (define line-# (map (lambda (s) (substring s 1)) (first ALL))) (define line-= (map (lambda (s) (substring s 1)) (second ALL))) (define str-acc (third ALL))) (list line-# line-= str-acc)) If only S could be somehow made optional or not reqd then multi-filter can be useful in other cases i guess. Veer From martindemello at gmail.com Sun Jun 15 16:10:36 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] what are the x and y args in snip% get-extent? Message-ID: In (send a-snip get-extent dc x y boxes...), what do x and y do? The docs aren't very clear on the point. martin From diggerrrrr at gmail.com Sun Jun 15 16:22:47 2008 From: diggerrrrr at gmail.com (Veer) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] help writing idiomatic plt scheme In-Reply-To: References: Message-ID: Just ignore my code above , i incorrectly read the problem statement. Apologies to all. Veer On Mon, Jun 16, 2008 at 12:44 AM, Veer wrote: > I might as well try : > > ;;multi-filter : (string->boolean) port -> (list (listof string) > (listof string) string) > ;;to produce a list such that it simulates (list (filter f lst) > (filter neg-f lst) extra) > (define (multi-filter f in) > (local ((define (multi-filter-accum in L R S) > (local ((define a-line (read-line in))) > (cond > [(eof-object? a-line) (list L R S)] > [(f a-line) (multi-filter-accum in (cons a-line L) R > (string-append S > (substring a-line 0 1)))] > [else (multi-filter-accum in L (cons a-line R) > (string-append S (substring > a-line 0 1)))])))) > (multi-filter-accum in empty empty ""))) > > ;;expression > (local ((define ALL (multi-filter (lambda (s) (char=? (string-ref s 0) #\#)) > (open-input-file "line-ex"))) > (define line-# (map (lambda (s) (substring s 1)) (first ALL))) > (define line-= (map (lambda (s) (substring s 1)) (second ALL))) > (define str-acc (third ALL))) > (list line-# line-= str-acc)) > > > If only S could be somehow made optional or not reqd then > multi-filter can be useful in other cases i guess. > > Veer > From martindemello at gmail.com Sun Jun 15 16:44:21 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] help writing idiomatic plt scheme In-Reply-To: <67CC2024-9AA8-404F-B9F5-48D5690E7DF8@ccs.neu.edu> References: <67CC2024-9AA8-404F-B9F5-48D5690E7DF8@ccs.neu.edu> Message-ID: On Sun, Jun 15, 2008 at 10:29 AM, Matthias Felleisen wrote: > > 3. Here is my take on 'idiomatic' coming from a design perspective. > Everything is based on the data def file = eof | line * file Thanks - took me a while to wrap my head around this, since I'm one of those people who come from a loopy background :) I was trying to do the whole thing in one pass, rather than run filter twice on the list at the end, but I agree your version looks cleaner. martin From narutocanada at gmail.com Sun Jun 15 18:01:45 2008 From: narutocanada at gmail.com (narutocanada@gmail.com) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] set-car! set-cdr! not working with mz-4.0. Message-ID: hi set-car! set-cdr! not working with mz-4.0. Is this permanent, or can they be re-enabled? Thanks From filcab at gmail.com Sun Jun 15 19:04:47 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:20:16 2009 Subject: [plt-scheme] set-car! set-cdr! not working with mz-4.0. In-Reply-To: References: Message-ID: <157313E4-D71A-412D-B1B2-F47DEA1E0226@gmail.com> Hi, On 15 Jun, 2008, at 23:01, narutocanada@gmail.com wrote: > set-car! set-cdr! not working with mz-4.0. You should use languages R5RS or R6RS (module + #!r6rs at the beginning of the file) or use mcons/mcar/mcdr/set-mcar!/... MzScheme's pairs are, by default, immutable, in 4.0, mcons creates mutable pairs. - Filipe Cabecinhas From matthias at ccs.neu.edu Sun Jun 15 19:39:47 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:17 2009 Subject: [plt-scheme] help writing idiomatic plt scheme In-Reply-To: References: <67CC2024-9AA8-404F-B9F5-48D5690E7DF8@ccs.neu.edu> Message-ID: On Jun 15, 2008, at 4:44 PM, Martin DeMello wrote: > On Sun, Jun 15, 2008 at 10:29 AM, Matthias Felleisen > wrote: >> >> 3. Here is my take on 'idiomatic' coming from a design perspective. >> Everything is based on the data def file = eof | line * file > > Thanks - took me a while to wrap my head around this, since I'm one of > those people who come from a loopy background :) I was trying to do > the whole thing in one pass, rather than run filter twice on the list > at the end, but I agree your version looks cleaner. Over the years, I learned to factor such functions into distinct "loops" [*] until I encounter data sets for which this approach is too expensive. Then I "deforest" or "fuse the loops." (I have been around compiler people for long enough to know how much effort it is to compute such loop fusions automatically in Fortran and how little this gains in average cases.) -- Matthias [*] In imperative languages, loops tend to come it just two or three flavors (for, while, repeat). The problem is that loops result type is VOID so the only way to communicate results from the loop body to the outside is via SET!. If you think about loops, though, they are traversals of data structures PLUS an action applied to each node. FPLs take this to an extreme: map, fold, andmap, ormap, for/fold, etc. They separate traversal and action; you pass in the latter. Better still, you get all kinds of return types so you don't have to use SET!. And best, you can define your own LOOPs because you get higher-order functions and TCO. From martindemello at gmail.com Sun Jun 15 19:40:27 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:17 2009 Subject: [plt-scheme] unexpected regexp behaviour Message-ID: > (define a "hello\nworld\n") > (regexp-match* (regexp "(?m:^..)") a) ("he" "ll" "wo" "rl") expected ("he" "wo") word boundaries are behaving oddly too: > (regexp-match* (pregexp "(?m:\\b..)") a) ("he" "ll" "wo" "rl") martin From neil at neilvandyke.org Sun Jun 15 19:41:37 2008 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Mar 26 02:20:17 2009 Subject: [plt-scheme] set-car! set-cdr! not working with mz-4.0. In-Reply-To: <157313E4-D71A-412D-B1B2-F47DEA1E0226@gmail.com> References: <157313E4-D71A-412D-B1B2-F47DEA1E0226@gmail.com> Message-ID: <4855A8B1.6020108@neilvandyke.org> If the code in question is a library, and the mutable pairs might be exposed outside the library to arbitrary PLT 4 code, then you might be best off reworking the library to *not* expose mutable pairs. This might mean reworking algorithms to be more functional, or it might mean that the code clones `translates' structures with mutable pairs to use immutable pairs before exposing them outside the library. From eli at barzilay.org Sun Jun 15 21:46:36 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:17 2009 Subject: [plt-scheme] unexpected regexp behaviour In-Reply-To: References: Message-ID: <18517.50684.279744.585197@arabic.ccs.neu.edu> On Jun 15, Martin DeMello wrote: > > (define a "hello\nworld\n") > > (regexp-match* (regexp "(?m:^..)") a) > ("he" "ll" "wo" "rl") > > expected ("he" "wo") > > word boundaries are behaving oddly too: > > > (regexp-match* (pregexp "(?m:\\b..)") a) > ("he" "ll" "wo" "rl") This consistent with (and a result of) the way `regexp-match' works when you begin in the middle of the string: > (regexp-match #rx"(?m:^..)" "hello" 2) ("ll") > (regexp-match #px"\\b.." "hello" 2) ("ll") I believe that treating the string as if it begins at the third character in these cases makes this more uniform with matching on ports, where a `start' argument means that you discard some of the input, and then start matching. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From martindemello at gmail.com Sun Jun 15 21:54:42 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:17 2009 Subject: [plt-scheme] unexpected regexp behaviour In-Reply-To: <18517.50684.279744.585197@arabic.ccs.neu.edu> References: <18517.50684.279744.585197@arabic.ccs.neu.edu> Message-ID: On Sun, Jun 15, 2008 at 6:46 PM, Eli Barzilay wrote: > > This consistent with (and a result of) the way `regexp-match' works > when you begin in the middle of the string: > > > (regexp-match #rx"(?m:^..)" "hello" 2) > ("ll") > > (regexp-match #px"\\b.." "hello" 2) > ("ll") So how do I match, say, the first letter of every line in a multiline string? martin From eli at barzilay.org Sun Jun 15 22:11:19 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:17 2009 Subject: [plt-scheme] unexpected regexp behaviour In-Reply-To: References: <18517.50684.279744.585197@arabic.ccs.neu.edu> Message-ID: <18517.52167.193947.434478@arabic.ccs.neu.edu> On Jun 15, Martin DeMello wrote: > On Sun, Jun 15, 2008 at 6:46 PM, Eli Barzilay wrote: > > > > This consistent with (and a result of) the way `regexp-match' > > works when you begin in the middle of the string: > > > > > (regexp-match #rx"(?m:^..)" "hello" 2) > > ("ll") > > > (regexp-match #px"\\b.." "hello" 2) > > ("ll") > > So how do I match, say, the first letter of every line in a > multiline string? In most cases I'd probably split the string up into lines, which simplifies most later processing anyway. If memory is an issue, then you can use a (?<=\n) anchor in `regexp-match*', and a separate match for the first line. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From martindemello at gmail.com Sun Jun 15 22:18:32 2008 From: martindemello at gmail.com (Martin DeMello) Date: Thu Mar 26 02:20:18 2009 Subject: [plt-scheme] unexpected regexp behaviour In-Reply-To: <18517.52167.193947.434478@arabic.ccs.neu.edu> References: <18517.50684.279744.585197@arabic.ccs.neu.edu> <18517.52167.193947.434478@arabic.ccs.neu.edu> Message-ID: On Sun, Jun 15, 2008 at 7:11 PM, Eli Barzilay wrote: >> >> So how do I match, say, the first letter of every line in a >> multiline string? > > In most cases I'd probably split the string up into lines, which > simplifies most later processing anyway. If memory is an issue, then > you can use a (?<=\n) anchor in `regexp-match*', and a separate match > for the first line. Gotit. Looks like Scheme will finally beat the urge towards premature optimisation out of me :) martin From dyoo at cs.wpi.edu Sun Jun 15 22:29:45 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:18 2009 Subject: [plt-scheme] Who's the maintainer for mrlib? Message-ID: Hi everyone, I've been going through MrLib to get myself more prepared to write a grid layout thing. I've hacked up aligned-pasteboard a bit, and I've made changes to aligned-editor-snip to support the serialization protocol needed for copy and paste. Who's the maintainer of MrLib? I just want to double check that the changes I'm thinking of are compatible and can be sent upstream as soon as this is cooked. I'm temporarily putting my changes in: http://git.hashcollision.org/aligned-pasteboard/ for inspection. Hope this helps! From cppljevans at suddenlink.net Mon Jun 16 00:28:03 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:18 2009 Subject: [plt-scheme] newbie:howto use package=control.plt&owner=soegaard Message-ID: I started in DrScheme, version 4.0, with language=Module. Then, after reading: http://planet.plt-scheme.org/display.ss?package=control.plt&owner=soegaard and doing as *I think* it said (i.e.type following in definitions window): (require (planet "control.scm" ("soegaard" "control.plt" 1 2))) then hit 'Run' I got some error message about modules or something. So, I switched language=Module and tried again. This time I got: Welcome to DrScheme, version 4.0.0.1-svn13jun2008 [3m]. Language: Advanced Student custom. Teachpack: master.ss. lib: standard-module-name-resolver: collection not found: # in any of: (# #) > in the interaction window. How do I use this library. BTW, although the above error message mentioned ./plt-scheme/4.0.0.1* there's no such directory. However, there is directory: ~/.plt-scheme/planet/300/4.0.0.1: Have I got the setup wrong somehow? TIA. From dekudekuplex at yahoo.com Mon Jun 16 01:20:22 2008 From: dekudekuplex at yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:20:18 2009 Subject: [plt-scheme] bugs in installing Typed Scheme with DrScheme v372 already installed on Windows XP Pro Message-ID: <954787.29882.qm@web30204.mail.mud.yahoo.com> I would like to preserve my current installation of DrScheme, v372, English, and install v4.0 into a different directory in order to use Typed Scheme. Currently, I have v372 installed on Windows XP Professional Service Pack 2 (at work) at C:\bin\plt\. I would rather not delete this installation, and just install DrScheme v4.0 into a different directory. However, when I tried installing v4.0 into C:\bin\plt-4.0\, I could not find Typed Scheme as a language level in the "Choose Language" dialog found in the "Language" menu of DrScheme. Trying to install it with the following command (from "Typed Scheme" at http://www.ccs.neu.edu/home/samth/typed-scheme/) at the DrScheme command prompt only resulted in DrScheme complaining of trying to overwrite the existing Typed Scheme installation: > (require (planet "typed-scheme.ss" ("plt" "typed-scheme.plt" 3))) After uninstalling DrScheme 4.0 and reinstalling it, trying to run the following alternative command from the Typed Scheme manual (http://www.ccs.neu.edu/home/samth/typed-scheme/manual/) > (require (planet "typed-scheme.ss" ("plt" "typed-scheme.plt" 2))) caused DrScheme to complain of being unable to find the package at PLaneT. What should I do to use Typed Scheme in DrScheme 4.0 with v372 already installed (without uninstalling v372)? Benjamin L. Russell From mflatt at cs.utah.edu Mon Jun 16 07:56:58 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:18 2009 Subject: [plt-scheme] what are the x and y args in snip% get-extent? In-Reply-To: References: Message-ID: <20080616115702.9DABA65008D@mail-svr1.cs.utah.edu> At Sun, 15 Jun 2008 13:10:36 -0700, "Martin DeMello" wrote: > In (send a-snip get-extent dc x y boxes...), what do x and y do? The > docs aren't very clear on the point. The `x' and `y' are the snip's location within its editor, in case the snip's measurements need change with its location (but I don't know of any snip class with that property). Matthew From kibleur.christophe at gmail.com Sun Jun 15 08:51:40 2008 From: kibleur.christophe at gmail.com (kib2) Date: Thu Mar 26 02:20:19 2009 Subject: [plt-scheme] Re: Swedish keyboard bug in DrScheme In-Reply-To: References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> Message-ID: Hi, I'm new with DrScheme, and with Scheme too. I've got the same problem on a French keyboard. I've tried to apply the given patch, so now I've got this in keymap.ss : (setup-mappings greek-letters #f) (setup-mappings Greek-letters #t)) (map "~m:c:\\" "TeX compress") (map "~c:m:\\" "TeX compress") but that does not solve the problem : I can't have any backslash with Alt Gr + '\'. Any help will be appreciated. Thanks for DrScheme, Christophe K. From mflatt at cs.utah.edu Mon Jun 16 08:23:40 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:19 2009 Subject: [plt-scheme] Who's the maintainer for mrlib? In-Reply-To: References: Message-ID: <20080616122343.E4900650085@mail-svr1.cs.utah.edu> "mrlib" has different maintainers for different libraries, and I've been the de facto maintainer of the embedded-GUI library. My guess is that you've just become the new maintainer. :) Since we removed test-case boxes, I'm not aware of any particular dependencies on the embedded-GUI library. Matthew At Sun, 15 Jun 2008 22:29:45 -0400, "Danny Yoo" wrote: > Hi everyone, > > I've been going through MrLib to get myself more prepared to write a > grid layout thing. I've hacked up aligned-pasteboard a bit, and I've > made changes to aligned-editor-snip to support the serialization > protocol needed for copy and paste. > > Who's the maintainer of MrLib? I just want to double check that the > changes I'm thinking of are compatible and can be sent upstream as > soon as this is cooked. > > > I'm temporarily putting my changes in: > > http://git.hashcollision.org/aligned-pasteboard/ > > for inspection. > > > Hope this helps! > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robby at cs.uchicago.edu Mon Jun 16 08:47:47 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:19 2009 Subject: [plt-scheme] Who's the maintainer for mrlib? In-Reply-To: <20080616122343.E4900650085@mail-svr1.cs.utah.edu> References: <20080616122343.E4900650085@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0806160547v63d0d4f7g85007c0d1e99699e@mail.gmail.com> Yes, I agree the embedded GUI library is maintainerless. Robby On Mon, Jun 16, 2008 at 7:23 AM, Matthew Flatt wrote: > "mrlib" has different maintainers for different libraries, and I've > been the de facto maintainer of the embedded-GUI library. > > My guess is that you've just become the new maintainer. :) > > Since we removed test-case boxes, I'm not aware of any particular > dependencies on the embedded-GUI library. > > > Matthew > > At Sun, 15 Jun 2008 22:29:45 -0400, "Danny Yoo" wrote: >> Hi everyone, >> >> I've been going through MrLib to get myself more prepared to write a >> grid layout thing. I've hacked up aligned-pasteboard a bit, and I've >> made changes to aligned-editor-snip to support the serialization >> protocol needed for copy and paste. >> >> Who's the maintainer of MrLib? I just want to double check that the >> changes I'm thinking of are compatible and can be sent upstream as >> soon as this is cooked. >> >> >> I'm temporarily putting my changes in: >> >> http://git.hashcollision.org/aligned-pasteboard/ >> >> for inspection. >> >> >> Hope this helps! >> _________________________________________________ >> 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 andre.mayers at usherbrooke.ca Mon Jun 16 08:53:28 2008 From: andre.mayers at usherbrooke.ca (Andre Mayers) Date: Thu Mar 26 02:20:19 2009 Subject: [plt-scheme] Re: Swedish keyboard bug in DrScheme In-Reply-To: References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> Message-ID: <001401c8cfaf$f93e3850$ebbaa8f0$@mayers@usherbrooke.ca> Did you run "setup-plt" from a shell/command window before testing drscheme ? -----Message d'origine----- De?: plt-scheme-bounces@list.cs.brown.edu [mailto:plt-scheme-bounces@list.cs.brown.edu] De la part de kib2 Envoy??: June-15-08 8:52 AM ??: plt-scheme@list.cs.brown.edu Objet?: [plt-scheme] Re: Swedish keyboard bug in DrScheme Hi, I'm new with DrScheme, and with Scheme too. I've got the same problem on a French keyboard. I've tried to apply the given patch, so now I've got this in keymap.ss : (setup-mappings greek-letters #f) (setup-mappings Greek-letters #t)) (map "~m:c:\\" "TeX compress") (map "~c:m:\\" "TeX compress") but that does not solve the problem : I can't have any backslash with Alt Gr + '\'. Any help will be appreciated. Thanks for DrScheme, Christophe K. _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robby at cs.uchicago.edu Mon Jun 16 08:54:51 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:19 2009 Subject: [plt-scheme] Re: Swedish keyboard bug in DrScheme In-Reply-To: References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> Message-ID: <932b2f1f0806160554p4c2fe7ecw515717d45384c286@mail.gmail.com> Just to double check: did you run setup-plt after making that change? Robby On Sun, Jun 15, 2008 at 7:51 AM, kib2 wrote: > Hi, > > I'm new with DrScheme, and with Scheme too. > I've got the same problem on a French keyboard. I've tried to apply > the given patch, so now I've got this in keymap.ss : > > (setup-mappings greek-letters #f) > (setup-mappings Greek-letters #t)) > > (map "~m:c:\\" "TeX compress") > (map "~c:m:\\" "TeX compress") > > but that does not solve the problem : I can't have any backslash with > Alt Gr + '\'. > > Any help will be appreciated. > Thanks for DrScheme, > > Christophe K. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From noelwelsh at gmail.com Mon Jun 16 09:02:04 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:19 2009 Subject: [plt-scheme] newbie:howto use package=control.plt&owner=soegaard In-Reply-To: References: Message-ID: My guess is the package hasn't been updated to PLT 4. However, the for macros in PLT Scheme 4 makes this package fairly redundant. See: http://docs.plt-scheme.org/guide/for.html > then hit 'Run' I got some error message about modules or something. Including the full error message in future will allow others to give better help. > So, I switched language=Module and tried again. This time I got: > > Welcome to DrScheme, version 4.0.0.1-svn13jun2008 [3m]. > Language: Advanced Student custom. This line suggests you switched to "Advanced Student" instead. N. From cppljevans at suddenlink.net Mon Jun 16 09:31:59 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:20 2009 Subject: [plt-scheme] Re: newbie:howto use package=control.plt&owner=soegaard In-Reply-To: References: Message-ID: On 06/16/08 08:02, Noel Welsh wrote: > My guess is the package hasn't been updated to PLT 4. However, the > for macros in PLT Scheme 4 makes this package fairly redundant. See: > > http://docs.plt-scheme.org/guide/for.html > >> then hit 'Run' I got some error message about modules or something. > > Including the full error message in future will allow others to give > better help. Sure. I switched the lang=Module, entered: (require (planet "control.scm" ("soegaard" "control.plt" 1 2))) in the definitions window, and here's the output in the interactions window after hitting run: module-language: only module expressions are allowed in: (require (planet "control.scm" ("soegaard" "control.plt" 1 2))) > Is that better? > >> So, I switched language=Module and tried again. This time I got: >> >> Welcome to DrScheme, version 4.0.0.1-svn13jun2008 [3m]. >> Language: Advanced Student custom. > > This line suggests you switched to "Advanced Student" instead. Yes. > > N. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From samth at ccs.neu.edu Mon Jun 16 09:24:23 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:20:20 2009 Subject: [plt-scheme] bugs in installing Typed Scheme with DrScheme v372 already installed on Windows XP Pro In-Reply-To: <954787.29882.qm@web30204.mail.mud.yahoo.com> References: <954787.29882.qm@web30204.mail.mud.yahoo.com> Message-ID: <63bb19ae0806160624g235275atbd8fa7f4c6800f25@mail.gmail.com> Typed Scheme is distributed with version 4. You don't need the Planet package to use it. Just (require typed-scheme) will work, or #lang typed-scheme at the beginning of a module. sam th On Mon, Jun 16, 2008 at 1:20 AM, Benjamin L. Russell wrote: > I would like to preserve my current installation of DrScheme, v372, English, and install v4.0 into a different directory in order to use Typed Scheme. > > Currently, I have v372 installed on Windows XP Professional Service Pack 2 (at work) at C:\bin\plt\. I would rather not delete this installation, and just install DrScheme v4.0 into a different directory. > > However, when I tried installing v4.0 into C:\bin\plt-4.0\, I could not find Typed Scheme as a language level in the "Choose Language" dialog found in the "Language" menu of DrScheme. Trying to install it with the following command (from "Typed Scheme" at http://www.ccs.neu.edu/home/samth/typed-scheme/) at the DrScheme command prompt only resulted in DrScheme complaining of trying to overwrite the existing Typed Scheme installation: > > > (require (planet "typed-scheme.ss" ("plt" "typed-scheme.plt" 3))) > > After uninstalling DrScheme 4.0 and reinstalling it, trying to run the following alternative command from the Typed Scheme manual (http://www.ccs.neu.edu/home/samth/typed-scheme/manual/) > > > (require (planet "typed-scheme.ss" ("plt" "typed-scheme.plt" 2))) > > caused DrScheme to complain of being unable to find the package at PLaneT. > > What should I do to use Typed Scheme in DrScheme 4.0 with v372 already installed (without uninstalling v372)? > > Benjamin L. Russell > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- sam th samth@ccs.neu.edu From jewulo at gmail.com Mon Jun 16 09:33:49 2008 From: jewulo at gmail.com (Joshua Ewulo) Date: Thu Mar 26 02:20:21 2009 Subject: [plt-scheme] Problems with the require expression in PLT-Scheme 4.0 Message-ID: <61436f8d0806160633u2ebe0c64na0875d706bf47394@mail.gmail.com> To whom it may concern, I have just upgraded to 4.0 and I am having issues with the require statement in my exsisting files. The following for example "(require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 0)))" results in this error "string->number: expects argument of type ; given #f". How do I correct this? Regards, Joshua Ewulo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080616/e8a4719f/attachment.htm From noelwelsh at gmail.com Mon Jun 16 10:04:48 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:21 2009 Subject: [plt-scheme] Re: newbie:howto use package=control.plt&owner=soegaard In-Reply-To: References: Message-ID: On Mon, Jun 16, 2008 at 2:31 PM, Larry Evans wrote: > Sure. I switched the lang=Module, entered: > > (require (planet "control.scm" ("soegaard" "control.plt" 1 2))) > > in the definitions window, and here's the output in the interactions window > after hitting run: > > module-language: only module expressions are allowed in: (require > (planet "control.scm" ("soegaard" "control.plt" 1 2))) > > > > Is that better? Yes. You need a module declaration like #lang scheme at the top of the file. But see my first point -- this package is redundant. N. From cppljevans at suddenlink.net Mon Jun 16 10:30:17 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:21 2009 Subject: [plt-scheme] Re: newbie:howto use package=control.plt&owner=soegaard In-Reply-To: References: Message-ID: On 06/16/08 09:04, Noel Welsh wrote: > On Mon, Jun 16, 2008 at 2:31 PM, Larry Evans wrote: >> Sure. I switched the lang=Module, entered: >> >> (require (planet "control.scm" ("soegaard" "control.plt" 1 2))) >> >> in the definitions window, and here's the output in the interactions window >> after hitting run: >> >> module-language: only module expressions are allowed in: (require >> (planet "control.scm" ("soegaard" "control.plt" 1 2))) >> > >> >> Is that better? > > Yes. You need a module declaration like > > #lang scheme Thanks. > > at the top of the file. But see my first point -- this package is redundant. > I need the statement labels to emulate fortran code. I'm interested in trying to implement the algorithm described in the reference: http://citeseer.ist.psu.edu/62170.html In particular, there's code that has goto's into a fortran do loop and prematurely exiting that same loop from 1 or more points. It's in the spice program (somewhere, I'm not sure where). http://bwrc.eecs.berkeley.edu/Classes/icbook/SPICE/ From cppljevans at suddenlink.net Mon Jun 16 10:46:34 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:21 2009 Subject: [plt-scheme] Re: newbie:howto use package=control.plt&owner=soegaard In-Reply-To: References: Message-ID: On 06/16/08 09:04, Noel Welsh wrote: > On Mon, Jun 16, 2008 at 2:31 PM, Larry Evans wrote: [snip] >> Sure. I switched the lang=Module, entered: >> >> (require (planet "control.scm" ("soegaard" "control.plt" 1 2))) >> [snip] >> Is that better? > > Yes. You need a module declaration like > > #lang scheme > > at the top of the file. [snip] Thanks. Did that, but then got similar error as for the lang=Advanced Student. I guess what you said in your OP: > My guess is the package hasn't been updated to PLT 4. is what's the problem :( From noelwelsh at gmail.com Mon Jun 16 11:08:59 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:21 2009 Subject: [plt-scheme] Re: newbie:howto use package=control.plt&owner=soegaard In-Reply-To: References: Message-ID: I tried to load the package and saw a bunch of errors. However I'm not sure they all matter, as they seem to refer to tests and other files that are non-core. So you might be able to use it as is (I haven't tried). For implementing labelled gotos you can use mutually recursive functions. Escape continuations give you early exits. Here's a contrived example: (let/ec break (define counter 10) (define (label-1) (if (zero? counter) (label-2) (begin (set! counter (sub1 counter)) (label-1)))) (define (label-2) (break 'bye)) (label-1)) HTH, N. From grettke at acm.org Mon Jun 16 12:57:33 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:20:21 2009 Subject: [plt-scheme] DESTDIR and Drscheme help path [PLT-Scheme 4.0] In-Reply-To: <485127E0.9030403@gmail.com> References: <485127E0.9030403@gmail.com> Message-ID: <756daca50806160957w5d919e1dh42f7e5da076d91f3@mail.gmail.com> Hi Dmitri, I think that you need the argument: --enable-origtree To let you run it from any install location. From cppljevans at suddenlink.net Mon Jun 16 14:20:09 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:22 2009 Subject: [plt-scheme] re make install fails because missing ~/.plt-scheme files Message-ID: I renamed the /usr/local/plt/lib to /usr/local/plt/lib~1 and tried to recreate a fresh copy of lib with make install from: ~/download/plt-scheme/svn/plt/src However, toward the last, I got error messages about missing files: <--- cut here --- setup-plt: load-handler: expected a `module' declaration for `sample1' in #, but found something else setup-plt: error: during making for /soegaard/control.plt/1/2 (Control) setup-plt: /home/evansl/.plt-scheme/planet/300/4.0.0.1/cache/soegaard/srfi.plt/2/1/42-new/extra-generators.scm:313:22: lib: standard-module-name-resolver: collection not found: # in any of: (# #) in: (lib "private/match/gen-match.ss") setup-plt: error: during making for /soegaard/control.plt/1/2/test setup-plt: load-handler: expected a `module' declaration for `test' in #, but found something else setup-plt: error: during making for /soegaard/srfi.plt/2/1 (Srfi) setup-plt: 42-new/extra-generators.scm:313:22: lib: standard-module-name-resolver: collection not found: # in any of: (# #) in: (lib "private/match/gen-match.ss") setup-plt: error: during making for /soegaard/srfi.plt/2/1/42-eager-comprehensions setup-plt: info.ss:10:2: infotab-module: not a well-formed definition at: (define required-core-version field "360") in: (#%module-begin (define name "Srfi") (define blurb (list (quote (div (p (b "SRFI Extensions")) (p "This package provides extensions to:") (p (b "SRFI 42") "- Eager comprehensions: " "Extra generators :match, :plt-match, :let-value, :pairs, :do-until, a... setup-plt: error: during making for /soegaard/srfi.plt/2/1/42-new setup-plt: load-handler: expected a `module' declaration for `test' in #, but found something else setup-plt: error: during making for /soegaard/srfi.plt/2/1/78-lightweight-testing setup-plt: load-handler: expected a `module' declaration for `examples' in #, but found something else make[1]: *** [install-3m] Error 1 make[1]: Leaving directory `/home/evansl/download/plt-scheme/svn/plt/src' make: *** [install] Error 2 >--- cut here --- What am I doing wrong? TIA. -Larry From jensaxel at soegaard.net Mon Jun 16 15:20:57 2008 From: jensaxel at soegaard.net (Jens Axel Soegaard) Date: Thu Mar 26 02:20:22 2009 Subject: [plt-scheme] Re: newbie:howto use package=control.plt&owner=soegaard In-Reply-To: References: Message-ID: <4856BD19.9080107@soegaard.net> Larry Evans wrote: > I need the statement labels to emulate fortran code. A v400-friendly version of tagged-begin.scm is attached. I'll soonish update the PLaneT package - it depends on two other packages that also needs updating. /Jens Axel -------------- next part -------------- ;;; tagged-begin.scm -- Jens Axel S??gaard -- 16th June 2008 (module tagged-begin mzscheme (provide tagged-begin) ;;; INTRODUCTION ; This is a little macro that resembles the Common Lisp tagbody construct ; ; See also "Applications of Continuations" of Daniel P. Friedman. ;;; MOTIVATION ; Many algorithms is specified in an imperative manner ; in the literature [See Example 5 from Knuth]. For a no-brain- ; conversion to Scheme tagged-begin is convenient. ;;; SYNTAX ; (tagged-begin ; ( | )* ) ; where is a symbol and duplicate tags are not allowed. ;;; SEMANTICS ; The form evaluates the expressions in a lexical environment ; that provides functions go and return both of one argument to ; transfer control. ; The expressions in tagged-begin are evaluated sequentially. ; If no expressions are left (void) is returned. ; If an expression evaluates (go tag) then control is transfered ; to the expression following tag. The tags have lexical scope. ; The dynamic extent of tag is indefinite. An (go tag) is allowed ; to tranfer control to an outer tagbody. The call (go tag) has the ; proper tail recursive property, even in situation where the call ; syntactically is not in tail position. ; If (return ) is evaluted, the value of is ; the value of the entire tagged-begin form. ;;; EXAMPLES ; See below the implementation. ;;; IMPLEMENTATION ; Tagged begin is here implemented as a syntax-case macro. ; The rewrite rule is taken from Daniel P. Friedmans ; "Applications of Continuations". ; (tagged-begin ; tag_1 e1 ... ; If the body doesn't begin with a tag ; ... ; the macro inserts a fresh one ; tag_n-1 e_n-1 ... ; tag_n en ...) ; expands to ; ((let/cc go ; (let ([return (lambda (v) (go (lambda () v)))]) ; (letrec ; ([tag_1 (lambda () e1 ... (tag2))] ; ... ; [tag_n-1 (lambda () e_n-1 ... (tag_n))] ; [tag_n (lambda () e_n ... (return (void)))] ; (tag_1)))))) ; where (let/cc k expr ...) is short for (call/cc (lambda (k) expr ...)))])) (require-for-syntax (lib "match.ss") ; (planet "42.ss" ("soegaard" "srfi.plt" 2 1)) (lib "list.ss" "srfi" "1")) (define-syntax (tagged-begin stx) (define tag? identifier?) (define (non-tag? o) (not (tag? o))) (define (generate-binding tag-exprs next-tag) (match tag-exprs [(tag exprs) (quasisyntax/loc stx [#,tag (lambda () #,@exprs (#,next-tag))])])) (define (generate-last-binding tag-exprs return) (match tag-exprs [(tag exprs) (quasisyntax/loc stx [#,tag (lambda () #,@exprs (#,return (void)))])])) (syntax-case stx () [(tagged-begin . tag/exprs-stx) (let ([tes (syntax->list #'tag/exprs-stx)]) ; introduce a dummy start-tag, if the tagged-begin starts with an expression (when (not (tag? (car tes))) (set! tes (cons #'start tes))) (let* ([first-tag (car tes)] [tag-exprs-list (let loop ([tes tes] [rev-result '()]) (if (null? tes) (reverse rev-result) (let ([p tes]) (if (tag? (car p)) (loop (cdr tes) (cons (list (car p) (take-while non-tag? (cdr p))) rev-result)) (loop (cdr tes) rev-result) )))) #;(list-ec (:pairs p tes) (if (tag? (car p))) (list (car p) (take-while non-tag? (cdr p)))) ] [tags (map car tag-exprs-list)]) ; tag-exprs-list = ( (tag_1 (e1 ...)) (tag_2 (e2 ...)) ... ) (with-syntax ([go (syntax-local-introduce (syntax/loc stx go))] [return (syntax-local-introduce (syntax/loc stx return))]) #`((let/cc go (let ([return (lambda (v) (go (lambda () v)))]) (letrec (#,@(map generate-binding (drop-right tag-exprs-list 1) (cdr tags)) #,(generate-last-binding (last tag-exprs-list) #'return)) (#,first-tag))))))))])) ) #; (begin ;;; EXAMPLES (require tagged-begin) (define (display/nl v) (display v) (newline)) ; Example 1 (tagged-begin returns (void)) (display/nl (let ([i 0]) (tagged-begin loop (set! i (+ i 1)) (if (< i 41) (go loop))) i)) ; Example 2 (tagged-begin returns 42) (display/nl (let ([i 0]) (tagged-begin loop (set! i (+ i 1)) (if (< i 42) (go loop)) (return i)))) ; Example 3 (tagged-begin returns 43) (display/nl (let ([i 0]) (tagged-begin loop (set! i (+ i 1)) (go b) a (if (< i 43) (go loop)) (return i) b (go a)))) ; Example 4 ( ) (let ((a 0)) (tagged-begin start (set! a 0) part-1 (set! a (+ a 1)) (display/nl a) (cond ((>= a 9) (go end)) ((even? a) (go part-1)) (else (go part-2))) part-2 (set! a (+ a 1)) (go part-1) end (display/nl "We're done printing the odd numbers between 0 and 10"))) ; Example 5 ( Knuth: "The Art of Computer Programming", vol1, p.176) ; Inplace inversion of a permutation represented as a vector. (define permutation (vector 'dummy 6 2 1 5 4 3)) ; (Knuth counts from 1 not 0 :-) ) (define n (- (vector-length permutation) 1)) (define (X i) (vector-ref permutation i)) (define (X! i j) (vector-set! permutation i j)) (let ([m 0] [i 0] [j 0]) (tagged-begin I1 ; Initialize (set! m n) (set! j -1) I2 ; Next element (set! i (X m)) (if (< i 0) (go I5)) I3 ; Invert one (X! m j) (set! j (- m)) (set! m i) (set! i (X m)) I4 ; End of cycle? (if (> i 0) (go I3)) (set! i j) I5 ; Store final value (X! m (- i)) I6 ; Loop on m (set! m (- m 1)) (if (> m 0) (go I2)))) (display/nl permutation) ; Example 6 (The CommonLisp Hyper Spec examples of tagbody) (define val 'foo) (tagged-begin (set! val 1) (go a) c (set! val (+ val 4)) (go b) (set! val (+ val 32)) a (set! val (+ val 2)) (go c) (set! val (+ val 64)) b (set! val (+ val 8))) (display/nl val) (define (f1 flag) (let ((n 1)) (tagged-begin (set! n (f2 flag (lambda () (go out)))) out (display n)))) (define (f2 flag escape) (if flag (escape) 2)) (display/nl (f1 #f)) (display/nl (f1 #t)) ; Example 7 ; Demonstrates lexical scoping of tagged-begins, ; and that an inner tagged-begin can use an outer tag. (tagged-begin a (tagged-begin (go b)) b (return 'hello-world)) ; Demonstrates that tags are lexically shadowed. (tagged-begin a (tagged-begin (go b) (return 'wrong) b (go c)) b (return 'wrong) c (return 'correct)) ) From domeshek at stottlerhenke.com Mon Jun 16 15:25:20 2008 From: domeshek at stottlerhenke.com (Eric Domeshek) Date: Thu Mar 26 02:20:22 2009 Subject: [plt-scheme] Reading New Docs Off-Line Message-ID: <4856BE20.3000807@stottlerhenke.com> Hello PLT Gang, First of all, congratulations on getting the new 4.0 release out. It looks very interesting. My question is what is the best way to read the new docs off-line? There used to be PDF file which I found very useful for printing/carrying-around (and even for searching quickly on-line). So far all I've seen for the new release is fancy web pages, that chop up the docs into lots of little pieces that are much more difficult to read. Even an attempt to print a page such as "More: Systems Programming with PLT Scheme" from Firefox doesn't seem to work very well (huge wasted right margin, bad breaks on the left margin, and left marginal comments lost entirely). Am I missing something? I've only found one blog reference to PDFs: "the total size of the documentation (about 2000 pages in PDF form)". Thanks, --Eric ==================================================================== Eric Domeshek Phone: 617-616-1291 AI Project Manager Fax: 617-616-1290 Stottler Henke Associates, Inc. EMail: domeshek@stottlerhenke.com 48 Grove St., Somerville, MA 02144 Web: www.stottlerhenke.com ==================================================================== From eli at barzilay.org Mon Jun 16 15:38:51 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:22 2009 Subject: [plt-scheme] Reading New Docs Off-Line In-Reply-To: <4856BE20.3000807@stottlerhenke.com> References: <4856BE20.3000807@stottlerhenke.com> Message-ID: <18518.49483.838862.837565@arabic.ccs.neu.edu> On Jun 16, Eric Domeshek wrote: > Hello PLT Gang, > > First of all, congratulations on getting the new 4.0 release out. It > looks very interesting. > > My question is what is the best way to read the new docs off-line? > There used to be PDF file which I found very useful for [...] See http://download.plt-scheme.org/doc/ It's not easily reachable from the main page yet, due to the reorganization of the web pages. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From matthias at ccs.neu.edu Mon Jun 16 15:41:17 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:22 2009 Subject: [plt-scheme] Reading New Docs Off-Line In-Reply-To: <18518.49483.838862.837565@arabic.ccs.neu.edu> References: <4856BE20.3000807@stottlerhenke.com> <18518.49483.838862.837565@arabic.ccs.neu.edu> Message-ID: <9D53E76E-D723-47F2-B099-780BA511855B@ccs.neu.edu> On Jun 16, 2008, at 3:38 PM, Eli Barzilay wrote: > On Jun 16, Eric Domeshek wrote: >> Hello PLT Gang, >> >> First of all, congratulations on getting the new 4.0 release out. It >> looks very interesting. >> >> My question is what is the best way to read the new docs off-line? >> There used to be PDF file which I found very useful for [...] > > See http://download.plt-scheme.org/doc/ > > It's not easily reachable from the main page yet, due to the > reorganization of the web pages. > > You don't have to be on-line for reading the docs. Just open help- desk, which will launch your default browser on a file. - Matthias From yinso.chen at gmail.com Mon Jun 16 17:01:35 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:23 2009 Subject: [plt-scheme] custom language and #lang in PLT 4 Message-ID: <779bf2730806161401h322d258eyd97b054fe518ce5f@mail.gmail.com> Hi all - how do I use a custom language that lives in the current directory (i.e. ".") in PLT 4 via #lang? I tried '#lang "file.scm"' and '#lang file' and they do not work. The manual says only alphanumeric, +, -, _, and / works in this position. Does that mean we cannot have languages live in the current directory? Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080616/046d6e8e/attachment.html From yinso.chen at gmail.com Mon Jun 16 17:28:04 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:23 2009 Subject: [plt-scheme] custom language and #lang in PLT 4 In-Reply-To: References: <779bf2730806161401h322d258eyd97b054fe518ce5f@mail.gmail.com> Message-ID: <779bf2730806161428l74af79ddl3f90b1fd8be4fd2a@mail.gmail.com> Thanks Danny! On Mon, Jun 16, 2008 at 2:10 PM, Danny Yoo wrote: > > how do I use a custom language that lives in the current directory (i.e. > > ".") in PLT 4 via #lang? > > > > I tried '#lang "file.scm"' and '#lang file' and they do not work. The > > manual says only alphanumeric, +, -, _, and / works in this position. > Does > > that mean we cannot have languages live in the current directory? > > Use the s-exp language, which will take the very next s-expression and > treat that as the language. > > i.e. > > #lang s-exp "file.scm" > ... > > I'm not sure where this is documented. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080616/488f4423/attachment.htm From stephen at degabrielle.name Mon Jun 16 17:57:51 2008 From: stephen at degabrielle.name (Stephen De Gabrielle) Date: Thu Mar 26 02:20:24 2009 Subject: [plt-scheme] Problems with the require expression in PLT-Scheme 4.0 In-Reply-To: <61436f8d0806160633u2ebe0c64na0875d706bf47394@mail.gmail.com> References: <61436f8d0806160633u2ebe0c64na0875d706bf47394@mail.gmail.com> Message-ID: <595b9ab20806161457o20476b9aqb7102f0c21bf17f@mail.gmail.com> Sorry, I can't replicate your error. your require works fine for me in a two-line consisting of #lang scheme (require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 0))) Does the two-liner work for you? s. On Mon, Jun 16, 2008 at 2:33 PM, Joshua Ewulo wrote: > To whom it may concern, > > I have just upgraded to 4.0 and I am having issues with the require > statement in my exsisting files. > > The following for example "(require (planet "sicp.ss" ("soegaard" "sicp.plt" > 1 0)))" results in this error "string->number: expects argument of type > ; given #f". > > How do I correct this? > > Regards, > Joshua Ewulo > _________________________________________________ > 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 jewulo at gmail.com Mon Jun 16 19:50:00 2008 From: jewulo at gmail.com (Joshua Ewulo) Date: Thu Mar 26 02:20:24 2009 Subject: [plt-scheme] Problems with the require expression in PLT-Scheme 4.0 In-Reply-To: <595b9ab20806161457o20476b9aqb7102f0c21bf17f@mail.gmail.com> References: <61436f8d0806160633u2ebe0c64na0875d706bf47394@mail.gmail.com> <595b9ab20806161457o20476b9aqb7102f0c21bf17f@mail.gmail.com> Message-ID: <61436f8d0806161650q56c1aad6of887b1592a0af04@mail.gmail.com> Hello, Nope it did not work, re-installed everything again but still no show; also tried all language settings and no luck. I do not actually understand the what the error means "string->number: expects argument of type ; given #f" Are you using 4.0? Regards, Joshua Ewulo 2008/6/16 Stephen De Gabrielle : > Sorry, I can't replicate your error. > > your require works fine for me in a two-line consisting of > #lang scheme > (require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 0))) > > Does the two-liner work for you? > > s. > > > On Mon, Jun 16, 2008 at 2:33 PM, Joshua Ewulo wrote: > > To whom it may concern, > > > > I have just upgraded to 4.0 and I am having issues with the require > > statement in my exsisting files. > > > > The following for example "(require (planet "sicp.ss" ("soegaard" > "sicp.plt" > > 1 0)))" results in this error "string->number: expects argument of type > > ; given #f". > > > > How do I correct this? > > > > Regards, > > Joshua Ewulo > > _________________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080617/abdf8c79/attachment.html From yinso.chen at gmail.com Mon Jun 16 20:05:20 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:25 2009 Subject: [plt-scheme] special treatment of the /lang/reader.ss file? Message-ID: <779bf2730806161705mbb30d94ma65c9316b52937db@mail.gmail.com> Hi - I noticed that the language modules seem to follow a storage convention of /lang/reader.ss in v4 (I didn't verify in 372). Is this treated specially by the module loader or is the behavior configurable? Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080616/9a8fa210/attachment.htm From czhu at cs.utah.edu Mon Jun 16 23:03:43 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:25 2009 Subject: [plt-scheme] special treatment of the /lang/reader.ss file? In-Reply-To: <779bf2730806161705mbb30d94ma65c9316b52937db@mail.gmail.com> References: <779bf2730806161705mbb30d94ma65c9316b52937db@mail.gmail.com> Message-ID: <4857298F.3030504@cs.utah.edu> For the v372 doc (v4 works in the same way): * A #reader must be followed by a datum. The datum is passed to the procedure that is the value of the current-reader-guard parameter (see section 7.9.1.3), and the result is used as a module path. The module path is passed to dynamic-require (see section 5.5) with either 'read or 'read-syntax (depending on whether parsing started with read or read-syntax). The resulting procedure should accept the same arguments as read or read-syntax (with all optional arguments as required). The procedure is given the port whose stream contained #reader, and it should produce a datum result. If the result is a syntax object in read mode it is converted to a datum using syntax-object->datum; if the result is not a syntax object in read-syntax mode, it is converted to one using datum->syntax-object. See also section 11.2.9.1 and section 11.2.9.2 for information on special-comment results and recursive reads. If the read-accept-reader parameter is set to #f, then #reader is disallowed as input. * A #lang must be followed by a single space (ASCII 32), and then a non-empty sequence of alphanumeric ASCII, plus, minus, underscore, and slash characters terminated by whitespace or an end-of-file. The sequence must not start or end with a slash. A sequence #lang name is equivalent to #reader (lib "lang/reader.ss" "name"). Chongkai YC wrote: > Hi - > > I noticed that the language modules seem to follow a storage > convention of /lang/reader.ss in v4 (I didn't verify in 372). Is > this treated specially by the module loader or is the behavior > configurable? > > Thanks, > yc > > ------------------------------------------------------------------------ > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From czhu at cs.utah.edu Mon Jun 16 23:08:31 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:25 2009 Subject: [plt-scheme] special treatment of the /lang/reader.ss file? In-Reply-To: <4857298F.3030504@cs.utah.edu> References: <779bf2730806161705mbb30d94ma65c9316b52937db@mail.gmail.com> <4857298F.3030504@cs.utah.edu> Message-ID: <48572AAF.20109@cs.utah.edu> In v4 doc, it's section 12.6.17 "Reading via an Extension" of "Reference: PLT Scheme" Chongkai Zhu wrote: > From the v372 doc (v4 works in the same way): > From yinso.chen at gmail.com Tue Jun 17 01:20:39 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:26 2009 Subject: [plt-scheme] special treatment of the /lang/reader.ss file? In-Reply-To: <48572AAF.20109@cs.utah.edu> References: <779bf2730806161705mbb30d94ma65c9316b52937db@mail.gmail.com> <4857298F.3030504@cs.utah.edu> <48572AAF.20109@cs.utah.edu> Message-ID: <779bf2730806162220l155e14bfje41bded0c761876a@mail.gmail.com> I see. I read right past the "A sequence #lang ?*name*? is equivalent to #reader ?* name*?/lang/reader" without registering what it means. Thanks for pointing it out. On Mon, Jun 16, 2008 at 8:08 PM, Chongkai Zhu wrote: > In v4 doc, it's section 12.6.17 "Reading via an Extension" of "Reference: > PLT Scheme" > > Chongkai Zhu wrote: > >> From the v372 doc (v4 works in the same way): >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080616/dcbe9172/attachment.html From yinso.chen at gmail.com Tue Jun 17 01:27:23 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:27 2009 Subject: [plt-scheme] writing to subprocess's stdin and then... Message-ID: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> Hi - I am trying to write to a subprocess's stdin (and then to read from its stdout) without much success. I roughly have the form of (let-values (((p pout pin perr) (subprocess #f #f #f cmd))) (write "this is a text" pin) (subprocess-wait p) (parameterize ((current-input-port pout)) (lambda () (read-line)))) but it doesn't work and I suspect it's due to my misunderstanding of how the port works (and most likely just how to use subprocess, period). The v4 maually mentions "All provided ports must be file-stream ports" - so does that mean I need to first write the output to a file? I found an example on http://www.cs.brown.edu/pipermail/plt-scheme/2006-February/011953.html but couldn't figure out how to adopt it toward my needs. Any pointers are appreciated, thanks. yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080616/1871c1fb/attachment.htm From eli at barzilay.org Tue Jun 17 01:40:39 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:27 2009 Subject: [plt-scheme] writing to subprocess's stdin and then... In-Reply-To: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> References: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> Message-ID: <18519.20055.614994.43328@arabic.ccs.neu.edu> On Jun 16, YC wrote: > Hi - > I am trying to write to a subprocess's stdin (and then to read from its > stdout) without much success. I roughly have the form of > > (let-values (((p pout pin perr) > (subprocess #f #f #f cmd))) > (write "this is a text" pin) > (subprocess-wait p) > (parameterize ((current-input-port pout)) > (lambda () > (read-line)))) > > but it doesn't work and I suspect it's due to my misunderstanding of how the > port works (and most likely just how to use subprocess, period). The v4 > maually mentions "All provided ports must be file-stream ports" - so does > that mean I need to first write the output to a file? I found an example on > http://www.cs.brown.edu/pipermail/plt-scheme/2006-February/011953.html but > couldn't figure out how to adopt it toward my needs. You have the rough idea, but several problems: * you have a redundant `lambda' which means that you never really get to read anything (on toy examples, this will probably be a change that will make things work, but see below) * `write' is probably not a good idea -- it will print something with the double quotes. * after you write, you'd want to flush `pin', or if you expect the program to get just that, then you'd want to close it (so your program will not sit there waiting for more stuff) * finally, the biggest problem is a conceptual one: you read stuff from the output only after the process has finished -- but what if it spits out a lot of data? In that case, it will not finish, and instead just sit there waiting for you to read that data, and you'll be getting into a very common race condision with subprocesses. What you really need is to do the reading in a thread, so the process can continue running. It might seem strange at first, but when there's a lot of data then *someone* needs to hold it, and the OS will hold only a very small amount (and for good reasons). Your thread will need to do just that accumulation (or it can just to the processing, whatever it is). (You can also see "collects/mzlib/process.ss" for a very extensive solution.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jensaxel at soegaard.net Tue Jun 17 01:57:12 2008 From: jensaxel at soegaard.net (Jens Axel Soegaard) Date: Thu Mar 26 02:20:27 2009 Subject: [plt-scheme] Problems with the require expression in PLT-Scheme 4.0 In-Reply-To: <61436f8d0806161650q56c1aad6of887b1592a0af04@mail.gmail.com> References: <61436f8d0806160633u2ebe0c64na0875d706bf47394@mail.gmail.com> <595b9ab20806161457o20476b9aqb7102f0c21bf17f@mail.gmail.com> <61436f8d0806161650q56c1aad6of887b1592a0af04@mail.gmail.com> Message-ID: <48575238.1010709@soegaard.net> > 2008/6/16 Stephen De Gabrielle >: > > Sorry, I can't replicate your error. > > your require works fine for me in a two-line consisting of > #lang scheme > (require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 0))) > > Does the two-liner work for you? > Ewulo wrote: > Nope it did not work, re-installed everything again but still no show; also tried all language settings and no luck. > I do not actually understand the what the error means > "string->number: expects argument of type ; given #f" > Are you using 4.0? I just tried the following in v400 without any problems. > (require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 1))) > (paint (number->painter 0)) > (paint diagonal-shading) > (paint-hires (below (beside diagonal-shading (rotate90 diagonal-shading)) (beside (rotate270 diagonal-shading) (rotate180 diagonal-shading)))) > (paint einstein) Ewulo, just checking: 1. Have you chosen the "module" language? 2. Are you using version 1.1 of sicp.plt ? 3. Which file and line does the error "string->number: expects argument of type ; given #f" refer to? 4. Which platform are you using? -- Jens Axel S?gaard From yinso.chen at gmail.com Tue Jun 17 03:41:14 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:28 2009 Subject: [plt-scheme] writing to subprocess's stdin and then... In-Reply-To: <18519.20055.614994.43328@arabic.ccs.neu.edu> References: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> <18519.20055.614994.43328@arabic.ccs.neu.edu> Message-ID: <779bf2730806170041g4e1c088aybfccbea8ab4541f4@mail.gmail.com> Thanks Eli - please see inline. On Mon, Jun 16, 2008 at 10:40 PM, Eli Barzilay wrote: > > You have the rough idea, but several problems: > > * you have a redundant `lambda' which means that you never really get > to read anything (on toy examples, this will probably be a change > that will make things work, but see below) > Yup - it worked after removing the lambda. > * `write' is probably not a good idea -- it will print something with > the double quotes. > Makes sense. > * after you write, you'd want to flush `pin', or if you expect the > program to get just that, then you'd want to close it (so your > program will not sit there waiting for more stuff) > Ah ha! I first tried to write eof to the stream and it didn't work... thanks for the pointer! > > * finally, the biggest problem is a conceptual one: you read stuff > from the output only after the process has finished -- but what if > it spits out a lot of data? In that case, it will not finish, and > instead just sit there waiting for you to read that data, and you'll > be getting into a very common race condision with subprocesses. > > What you really need is to do the reading in a thread, so the > process can continue running. It might seem strange at first, but > when there's a lot of data then *someone* needs to hold it, and the > OS will hold only a very small amount (and for good reasons). Your > thread will need to do just that accumulation (or it can just to the > processing, whatever it is). > After re-reading your example, I think I started to grok what you were doing on http://www.cs.brown.edu/pipermail/plt-scheme/2006-February/011953.html: ... (define-values (in out) (make-pipe)) ... ... (thread (lambda () (copy-port pout out) (close-output-port out) (subprocess-wait p))) You first created a pipe for holding the accumulation, and then you started a thread to read the data from pout into pipe's out, and when out is closed the data gets piped to in (perhaps this is happening in the background without you have to close it too?), and finally the process exits... correct? But shouldn't the ports be closed after subprocess-wait? > > (You can also see "collects/mzlib/process.ss" for a very extensive > solution.) > Thanks for the pointer - time to learn the concurrency primitives in the module... ;) Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080617/42571076/attachment.html From jewulo at gmail.com Tue Jun 17 04:19:11 2008 From: jewulo at gmail.com (Joshua Ewulo) Date: Thu Mar 26 02:20:29 2009 Subject: [plt-scheme] Problems with the require expression in PLT-Scheme 4.0 In-Reply-To: <48575238.1010709@soegaard.net> References: <61436f8d0806160633u2ebe0c64na0875d706bf47394@mail.gmail.com> <595b9ab20806161457o20476b9aqb7102f0c21bf17f@mail.gmail.com> <61436f8d0806161650q56c1aad6of887b1592a0af04@mail.gmail.com> <48575238.1010709@soegaard.net> Message-ID: <61436f8d0806170119u5aca8769v42d6d1e16b80eaf5@mail.gmail.com> Dear Jens, In answer to your questions, *1. Have you chosen the "module" language? Yes I choose the "module" langauage. * 2. Are you using version 1.1 of sicp.plt ? *Tried 1.0 and 1.1 - with same result. * 3. Which file and line does the error "string->number: expects argument of type ; given #f" refer to? *I think it refers to the (require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 1))) expression itself, it does not explicitly state a file name nor line number. When I remove this line the functions within the package are not referenceable. * 4. Which platform are you using? * I am using Windows-XP Pro with Service Pack 2.* Regards, Joshua Ewulo 2008/6/17 Jens Axel Soegaard : > > 2008/6/16 Stephen De Gabrielle > stephen@degabrielle.name>>: >> >> Sorry, I can't replicate your error. >> >> your require works fine for me in a two-line consisting of >> #lang scheme >> (require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 0))) >> >> Does the two-liner work for you? >> >> Ewulo wrote: > > > Nope it did not work, re-installed everything again but still no show; > also tried all language settings and no luck. > > > I do not actually understand the what the error means > > "string->number: expects argument of type ; given #f" > > > Are you using 4.0? > > I just tried the following in v400 without any problems. > > > (require (planet "sicp.ss" ("soegaard" "sicp.plt" 1 1))) > > (paint (number->painter 0)) > > (paint diagonal-shading) > > (paint-hires (below (beside diagonal-shading > (rotate90 diagonal-shading)) > (beside (rotate270 diagonal-shading) > (rotate180 diagonal-shading)))) > > (paint einstein) > > Ewulo, just checking: > 1. Have you chosen the "module" language? > 2. Are you using version 1.1 of sicp.plt ? > 3. Which file and line does the error "string->number: expects argument of > type ; given #f" > refer to? > 4. Which platform are you using? > > -- > Jens Axel S?gaard > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080617/25a60547/attachment.htm From noelwelsh at gmail.com Tue Jun 17 04:23:14 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:29 2009 Subject: [plt-scheme] re make install fails because missing ~/.plt-scheme files In-Reply-To: References: Message-ID: I think these are all errors from packages that haven't been ported to 4.0. Does DrScheme / mzscheme still work for you? If so, you can ignore the errors. If not, you should be able to nuke your .plt-scheme dir with no ill effect. N. On Mon, Jun 16, 2008 at 7:20 PM, Larry Evans wrote: > I renamed the /usr/local/plt/lib to /usr/local/plt/lib~1 and tried > to recreate a fresh copy of lib with make install from: > > ~/download/plt-scheme/svn/plt/src > > However, toward the last, I got error messages about missing files: > <--- cut here --- > > setup-plt: load-handler: expected a `module' declaration for `sample1' in > #, > but found something else > setup-plt: error: during making for /soegaard/control.plt/1/2 > (Control) > setup-plt: > /home/evansl/.plt-scheme/planet/300/4.0.0.1/cache/soegaard/srfi.plt/2/1/42-new/extra-generators.scm:313:22: > lib: standard-module-name-resolver: collection not found: > # in any of: > (# > #) in: (lib > "private/match/gen-match.ss") > setup-plt: error: during making for /soegaard/control.plt/1/2/test > setup-plt: load-handler: expected a `module' declaration for `test' in > #, > but found something else > setup-plt: error: during making for /soegaard/srfi.plt/2/1 (Srfi) > setup-plt: 42-new/extra-generators.scm:313:22: lib: > standard-module-name-resolver: collection not found: # > in any of: (# > #) in: (lib > "private/match/gen-match.ss") > setup-plt: error: during making for > /soegaard/srfi.plt/2/1/42-eager-comprehensions > setup-plt: info.ss:10:2: infotab-module: not a well-formed definition at: > (define required-core-version field "360") in: (#%module-begin (define name > "Srfi") (define blurb (list (quote (div (p (b "SRFI Extensions")) (p "This > package provides extensions to:") (p (b "SRFI 42") "- Eager comprehensions: > " "Extra generators :match, :plt-match, :let-value, :pairs, :do-until, a... > setup-plt: error: during making for /soegaard/srfi.plt/2/1/42-new > setup-plt: load-handler: expected a `module' declaration for `test' in > #, > but found something else > setup-plt: error: during making for > /soegaard/srfi.plt/2/1/78-lightweight-testing > setup-plt: load-handler: expected a `module' declaration for `examples' in > #, > but found something else > make[1]: *** [install-3m] Error 1 > make[1]: Leaving directory `/home/evansl/download/plt-scheme/svn/plt/src' > make: *** [install] Error 2 > >>--- cut here --- > What am I doing wrong? > > TIA. > > -Larry > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From eli at barzilay.org Tue Jun 17 04:49:10 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:29 2009 Subject: [plt-scheme] writing to subprocess's stdin and then... In-Reply-To: <779bf2730806170041g4e1c088aybfccbea8ab4541f4@mail.gmail.com> References: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> <18519.20055.614994.43328@arabic.ccs.neu.edu> <779bf2730806170041g4e1c088aybfccbea8ab4541f4@mail.gmail.com> Message-ID: <18519.31366.252359.306914@arabic.ccs.neu.edu> On Jun 17, YC wrote: > On Mon, Jun 16, 2008 at 10:40 PM, Eli Barzilay wrote: > > > > * finally, the biggest problem is a conceptual one: you read stuff > > from the output only after the process has finished -- but what > > if it spits out a lot of data? In that case, it will not > > finish, and instead just sit there waiting for you to read that > > data, and you'll be getting into a very common race condision > > with subprocesses. > > > > What you really need is to do the reading in a thread, so the > > process can continue running. It might seem strange at first, > > but when there's a lot of data then *someone* needs to hold it, > > and the OS will hold only a very small amount (and for good > > reasons). Your thread will need to do just that accumulation > > (or it can just to the processing, whatever it is). > > After re-reading your example, I think I started to grok what you were doing > on http://www.cs.brown.edu/pipermail/plt-scheme/2006-February/011953.html: > > ... > (define-values (in out) (make-pipe)) ... > ... > (thread (lambda () > (copy-port pout out) > (close-output-port out) > (subprocess-wait p))) > > You first created a pipe for holding the accumulation, and then you > started a thread to read the data from pout into pipe's out, and > when out is closed the data gets piped to in (perhaps this is > happening in the background without you have to close it too?), and > finally the process exits... correct? Actually that extra pipe and thread are not strictly needed. Same for the use of /dev/null -- it can just close the subprocess's input right after it fires it up. Below is a more compact and 4.0-ized example. > But shouldn't the ports be closed after subprocess-wait? You usually want to close the ports input so it will finish, since many usefule processes (at least on unix) work until their stdin runs out. Here's the revised example -- with no use of threads. | #lang scheme | | (require scheme/port) | (define (with-input-from-subprocess exe thunk) | (define-values (p pout pin perr) | (subprocess #f #f (current-error-port) | (find-executable-path exe))) | (close-output-port pin) | (parameterize ([current-input-port pout]) | (begin0 (thunk) | (subprocess-wait p)))) | | (with-input-from-subprocess "du" | (lambda () | (for ([line (in-lines)]) | (printf ">> ~s\n" (regexp-split #rx"[/\t]" line))))) But it still relies on using (current-error-port) for the subprocess's stderr, which might not be true if this function is called from a `parameterize'. The mzlib/process code takes care of such cases -- you can just run (parameterize ([current-output-port (open-output-bytes)]) (system "du") (get-output-bytes (current-output-port))) If you look at that file, you'll see that in this case the code will make the necessary pipes and a thread to transfer their contents. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From lizorkin at ispras.ru Tue Jun 17 05:21:22 2008 From: lizorkin at ispras.ru (Dmitry Lizorkin) Date: Thu Mar 26 02:20:29 2009 Subject: [plt-scheme] backward compatibility? Message-ID: <01e101c8d05b$821cdc70$4cc69553@fiona> Hello! I noticed that (version) ==> "4.0" in PLT 4.0, althouth (version) ==> "360" in PLT 360, for instance, i.e. the version number has recently been divided by 100. What is then the reliable backward-compatible (and forward-compatible) way of writing something like "if version < 299 then ... else ...", resulting in the else-branch activated for PLT 4.0 and higher? An alternative suitable variant would be a reliable backward-and-forward-compatible check with semantics "if-defined 'bytes? then ... else ..." at macro-expansion time (I recently noticed that the identifier bytes? is defined at macro-expansion time for 299 < version < 399 IIANM, but is not defined for later versions). Regards, Dmitry From cppljevans at suddenlink.net Tue Jun 17 06:46:38 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:30 2009 Subject: [plt-scheme] Essentials of Prog. Lang. 6-grammar.scm bad scanner Message-ID: The 6-grammar.scm in http://www.cs.indiana.edu/eopl/code.tar when opened (from File menu in DrScheme 4.0) and then Run, produces the error: {--- cut here --- Welcome to DrScheme, version 4.0.0.1-svn16jun2008 [3m]. Language: Essentials of Programming Languages (2nd ed.). grammar.scm: 2000-12-15 15:18 . sllgen:make-define-datatypes: bad scanner specification in: the-lexical-spec > }--- cut here --- in the interactions window. The language was Essentials of Programming Languages(2nd Ed.) Is this just error due to incompatibility between an old plt-scheme and the 4.0 plt-scheme? IOW, should I just let the book authors know about the error? From dyoo at cs.wpi.edu Tue Jun 17 07:07:39 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:30 2009 Subject: [plt-scheme] backward compatibility? In-Reply-To: <01e101c8d05b$821cdc70$4cc69553@fiona> References: <01e101c8d05b$821cdc70$4cc69553@fiona> Message-ID: On Tue, Jun 17, 2008 at 5:21 AM, Dmitry Lizorkin wrote: > Hello! > I noticed that > (version) > ==> "4.0" > in PLT 4.0, althouth > (version) > ==> "360" > in PLT 360, for instance, i.e. the version number has recently been divided > by 100. > What is then the reliable backward-compatible (and forward-compatible) way > of writing something like > "if version < 299 then ... else ...", > resulting in the else-branch activated for PLT 4.0 and higher? Are you using version-case from PLaneT? It should handle this detail. http://planet.plt-scheme.org/display.ss?package=version-case.plt&owner=dyoo From plragde at uwaterloo.ca Tue Jun 17 08:32:47 2008 From: plragde at uwaterloo.ca (Prabhakar Ragde) Date: Thu Mar 26 02:20:30 2009 Subject: [plt-scheme] writing teachpacks In-Reply-To: <628F638A-E7F7-49CE-9409-7085672F648A@ccs.neu.edu> References: <485157D9.4020708@uwaterloo.ca> <628F638A-E7F7-49CE-9409-7085672F648A@ccs.neu.edu> Message-ID: <4857AEEF.8090108@uwaterloo.ca> Matthias Felleisen wrote: > On Jun 12, 2008, at 1:07 PM, Prabhakar Ragde wrote: > >> I then switch to a new window, switch to Beginning Student, try to add >> this as a user-installed teachpack, and get [an error] > > It's a bug. Already reported > I found it in the bug database, 9483. But I'm unsure of what happens now. The inability to add teachpacks is pretty much a show-stopper for educational purposes, so we can't install v4.0 in our labs. Hopefully it gets fixed in 4.1, but that comes out in August, meaning no summer testing and prep (never mind sysadmin vacation issues). I remember patches being available for v370 last summer (though my sysadmins missed those, causing problems with our use of a teachpack which contained inline images for the first assignment). Is there going to be a patch for v4.0? Thanks. --PR From robby at cs.uchicago.edu Tue Jun 17 08:39:32 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:30 2009 Subject: [plt-scheme] writing teachpacks In-Reply-To: <4857AEEF.8090108@uwaterloo.ca> References: <485157D9.4020708@uwaterloo.ca> <628F638A-E7F7-49CE-9409-7085672F648A@ccs.neu.edu> <4857AEEF.8090108@uwaterloo.ca> Message-ID: <932b2f1f0806170539s2ca508c2h373a9c7ce2a42cab@mail.gmail.com> We hope to release 4.0.1 soon with this bug fix and a few others. Robby On Tue, Jun 17, 2008 at 7:32 AM, Prabhakar Ragde wrote: > Matthias Felleisen wrote: > >> On Jun 12, 2008, at 1:07 PM, Prabhakar Ragde wrote: >> >>> I then switch to a new window, switch to Beginning Student, try to add >>> this as a user-installed teachpack, and get [an error] >> >> It's a bug. Already reported >> > > I found it in the bug database, 9483. But I'm unsure of what happens now. > The inability to add teachpacks is pretty much a show-stopper for > educational purposes, so we can't install v4.0 in our labs. Hopefully it > gets fixed in 4.1, but that comes out in August, meaning no summer testing > and prep (never mind sysadmin vacation issues). > > I remember patches being available for v370 last summer (though my sysadmins > missed those, causing problems with our use of a teachpack which contained > inline images for the first assignment). Is there going to be a patch for > v4.0? Thanks. --PR > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From lizorkin at ispras.ru Tue Jun 17 08:57:27 2008 From: lizorkin at ispras.ru (Dmitry Lizorkin) Date: Thu Mar 26 02:20:30 2009 Subject: [plt-scheme] backward compatibility? References: <01e101c8d05b$821cdc70$4cc69553@fiona> Message-ID: <023d01c8d079$b2330f10$4cc69553@fiona> > Are you using version-case from PLaneT? It should handle this detail. > > http://planet.plt-scheme.org/display.ss?package=version-case.plt&owner=dyoo Thank you for the link, I was not aware of your package. However, I need a solution that would work for PLT version >= 204. Since PLaneT support was introduced to PLT since version >= 207 IIAMN (and since PLaneT repositiory is probably no longer supported for versions < 299), one faces the same problem before being able to import your package with (require (planet ...)) Any ideas? Dmitry From robby at cs.uchicago.edu Tue Jun 17 09:03:29 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:30 2009 Subject: [plt-scheme] backward compatibility? In-Reply-To: <023d01c8d079$b2330f10$4cc69553@fiona> References: <01e101c8d05b$821cdc70$4cc69553@fiona> <023d01c8d079$b2330f10$4cc69553@fiona> Message-ID: <932b2f1f0806170603kfe9739et64704f1734ba415d@mail.gmail.com> You can use dynamic-require to load that on the condition that the version is at least 207 (or whenever that planet package was put up there)? Robby On Tue, Jun 17, 2008 at 7:57 AM, Dmitry Lizorkin wrote: >> Are you using version-case from PLaneT? It should handle this detail. >> >> >> http://planet.plt-scheme.org/display.ss?package=version-case.plt&owner=dyoo > > Thank you for the link, I was not aware of your package. However, I need a > solution that would work for PLT version >= 204. Since PLaneT support was > introduced to PLT since version >= 207 IIAMN (and since PLaneT repositiory > is probably no longer supported for versions < 299), one faces the same > problem before being able to import your package with (require (planet ...)) > Any ideas? > > Dmitry > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From andrew-scheme at areilly.bpc-users.org Tue Jun 17 06:56:33 2008 From: andrew-scheme at areilly.bpc-users.org (Andrew Reilly) Date: Thu Mar 26 02:20:31 2009 Subject: [plt-scheme] writing to subprocess's stdin and then... In-Reply-To: <18519.31366.252359.306914@arabic.ccs.neu.edu> References: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> <18519.20055.614994.43328@arabic.ccs.neu.edu> <779bf2730806170041g4e1c088aybfccbea8ab4541f4@mail.gmail.com> <18519.31366.252359.306914@arabic.ccs.neu.edu> Message-ID: <20080617205633.270420b8@duncan.reilly.home> Hi Eli, I'm glad that this topic came up, because I was playing with just these issues last weekend. I had been using process rather than subprocess (so I had to make up some amusing string quoting to pass in complicated, space-containing file names), and it mostly worked, but I got the occasional hang, which I suspect was because of the blocking/deadlock issues that you mentioned. Anyway, I've just tried a variation on your version: On Tue, 17 Jun 2008 04:49:10 -0400 Eli Barzilay wrote: > Here's the revised example -- with no use of threads. > > | #lang scheme > | > | (require scheme/port) > | (define (with-input-from-subprocess exe thunk) > | (define-values (p pout pin perr) > | (subprocess #f #f (current-error-port) > | (find-executable-path exe))) > | (close-output-port pin) > | (parameterize ([current-input-port pout]) > | (begin0 (thunk) > | (subprocess-wait p)))) > | > | (with-input-from-subprocess "du" > | (lambda () > | (for ([line (in-lines)]) > | (printf ">> ~s\n" (regexp-split #rx"[/\t]" line))))) Specifically, my version looks like: (define (with-input-from-subprocess thunk exe . args) (define-values (p pout pin perr) (apply subprocess (append (list #f #f (current-error-port) (find-executable-path exe)) args))) (close-output-port pin) (parameterize ((current-input-port pout)) (begin0 (thunk) (subprocess-wait p)))) ; process individual tracks: do the real work (define (get-flac-meta file) (make-immutable-hash (with-input-from-subprocess (lambda () (let all () (match (read-line) ((regexp #rx"(.*)=(.*)" (list _ tag val)) (cons (cons tag val) (all))) (_ '())))) "metaflac" "--export-tags-to=-" (path->string file)))) The problem is that this produces an error at run-time: subprocess: expects type as 3rd argument, given: #; other arguments were: #f #f # "--export-tags-to=-" "some file name..." Should subprocess really be so picky? I suppose that it has to be, because the unix process wants a real file descriptor. The current-error-port in this case is that of the drscheme environment. Seems to work OK from mzscheme on the command line. Cheers, -- Andrew From czhu at cs.utah.edu Tue Jun 17 10:28:31 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:31 2009 Subject: [plt-scheme] writing to subprocess's stdin and then... In-Reply-To: <20080617205633.270420b8@duncan.reilly.home> References: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> <18519.20055.614994.43328@arabic.ccs.neu.edu> <779bf2730806170041g4e1c088aybfccbea8ab4541f4@mail.gmail.com> <18519.31366.252359.306914@arabic.ccs.neu.edu> <20080617205633.270420b8@duncan.reilly.home> Message-ID: <4857CA0F.7060209@cs.utah.edu> I have been through the same topic. First I tried to just pass #f to subprocess, and as Eli said, if the process write too much data, deadlock happens. Then I also noticed that file-port instead of a normal port, so my final code looks like: (let ((f2 (make-temporary-file))) (let-values (((process dummy stdin stderr) (subprocess (open-output-file f2 'replace) #f #f "command line" ))) (subprocess-wait process) (close-output-port stdin) (unless (eof-object? (read stderr)) (error (read-line stderr))) (close-input-port stderr)) (let ((stdout (open-input-file f2))) (read stdout) Hope that helps. Chongkai Andrew Reilly wrote: > Hi Eli, > > I'm glad that this topic came up, because I was playing with just > these issues last weekend. I had been using process rather than > subprocess (so I had to make up some amusing string quoting to > pass in complicated, space-containing file names), and it mostly > worked, but I got the occasional hang, which I suspect was > because of the blocking/deadlock issues that you mentioned. > > Anyway, I've just tried a variation on your version: > > On Tue, 17 Jun 2008 04:49:10 -0400 > Eli Barzilay wrote: > >> Here's the revised example -- with no use of threads. >> >> | #lang scheme >> | >> | (require scheme/port) >> | (define (with-input-from-subprocess exe thunk) >> | (define-values (p pout pin perr) >> | (subprocess #f #f (current-error-port) >> | (find-executable-path exe))) >> | (close-output-port pin) >> | (parameterize ([current-input-port pout]) >> | (begin0 (thunk) >> | (subprocess-wait p)))) >> | >> | (with-input-from-subprocess "du" >> | (lambda () >> | (for ([line (in-lines)]) >> | (printf ">> ~s\n" (regexp-split #rx"[/\t]" line))))) >> > > Specifically, my version looks like: > > (define (with-input-from-subprocess thunk exe . args) > (define-values (p pout pin perr) > (apply subprocess (append (list #f #f (current-error-port) > (find-executable-path exe)) > args))) > (close-output-port pin) > (parameterize ((current-input-port pout)) > (begin0 (thunk) > (subprocess-wait p)))) > > ; process individual tracks: do the real work > > (define (get-flac-meta file) > (make-immutable-hash > (with-input-from-subprocess > (lambda () > (let all () > (match (read-line) > ((regexp #rx"(.*)=(.*)" (list _ tag val)) (cons (cons tag val) (all))) > (_ '())))) > "metaflac" "--export-tags-to=-" (path->string file)))) > > The problem is that this produces an error at run-time: > subprocess: expects type as 3rd > argument, given: #; other arguments were: #f #f > # "--export-tags-to=-" "some file > name..." > > Should subprocess really be so picky? I suppose that it has to > be, because the unix process wants a real file descriptor. The > current-error-port in this case is that of the drscheme > environment. Seems to work OK from mzscheme on the command line. > > Cheers, > > From dyoo at cs.wpi.edu Tue Jun 17 10:49:06 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:31 2009 Subject: [plt-scheme] Lunch and meeting Message-ID: We'll be meeting outside the ilab at 11:45am for lunch. Afterwards, we'll have Arjun's presentation. From dyoo at cs.wpi.edu Tue Jun 17 10:49:51 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:31 2009 Subject: [plt-scheme] Re: Lunch and meeting In-Reply-To: References: Message-ID: > We'll be meeting ... My apologies, wrong mailing list! From maurizio.ferreira at seling.it Mon Jun 16 08:22:17 2008 From: maurizio.ferreira at seling.it (Ferreira Maurizio) Date: Thu Mar 26 02:20:31 2009 Subject: [plt-scheme] Uncorrect enter! behaviour Message-ID: <863055B715B9D04CB4320CFCDEE0837FC2E1F7@mailing.selesta.it> I tried to follow the example in the document titled 'More: Systems Programming with PLT Scheme' So I writed the serve.ss example as follows : #lang scheme (define (go) 'yep-it-works) And loaded it with (enter! "serve.ss") After that, I tried to modify the example, but reevaluating the enter! statement, it doesn't reload my changes. In order to see them I have to quit MzScheme and restart it. I'm using MzScheme vers. 4.0 [3m], under Windows 2000 sp4. Any suggestion ? Regards Maurizio. From kibleur.christophe at gmail.com Mon Jun 16 12:12:59 2008 From: kibleur.christophe at gmail.com (kib2) Date: Thu Mar 26 02:20:31 2009 Subject: [plt-scheme] Re: Swedish keyboard bug in DrScheme In-Reply-To: <932b2f1f0806160554p4c2fe7ecw515717d45384c286@mail.gmail.com> References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> <932b2f1f0806160554p4c2fe7ecw515717d45384c286@mail.gmail.com> Message-ID: <84150348-e180-4fdd-aa98-50ba74bfc4a8@a1g2000hsb.googlegroups.com> Andre and Robby, sorry, I should have told you that I've run setup-plt.exe after making the changes, but the problem persists. From kibleur.christophe at gmail.com Mon Jun 16 13:18:31 2008 From: kibleur.christophe at gmail.com (kib2) Date: Thu Mar 26 02:20:32 2009 Subject: [plt-scheme] Re: Swedish keyboard bug in DrScheme In-Reply-To: <932b2f1f0806160554p4c2fe7ecw515717d45384c286@mail.gmail.com> References: <233457100806130933t21f4ebc0w689306a63c4305a6@mail.gmail.com> <932b2f1f0806131021s2e95eb3cpa6c7f2bdac078810@mail.gmail.com> <932b2f1f0806160554p4c2fe7ecw515717d45384c286@mail.gmail.com> Message-ID: <4fe18b85-baea-4284-96ba-ba8b01659cfb@e39g2000hsf.googlegroups.com> Oops, I was working in the wrong directory, I've installed PLT-3.99.0.26 before then removed it to install the 4.0 version. But nothing seems to have been removed with the 3.99.0.26 uninstaller. It works like a charm now, see you, Christophe K. From luifer448 at gmail.com Mon Jun 16 23:26:44 2008 From: luifer448 at gmail.com (Luis Fernando Pino Duque) Date: Thu Mar 26 02:20:32 2009 Subject: [plt-scheme] PLT SCHEME 4.0 - SLLGEN Message-ID: I would like to know how to use the sllgen in the version 4.0 of PLT Scheme, because i'm compilling my old programs (v.372) and they throws the error "sllgen:make-define-datatypes: bad scanner specification in: the-lexical-spec". I think it is because the sllgen:make... functions have changed but i didn't found the new specification on internet, Thanks for read the mail. -- Luis Fernando Pino Duque Estudiante Ingenier?a de Sistemas Universidad del Valle Cali - Colombia -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080616/b79a1306/attachment.html From chenyu_kang at yahoo.com.cn Tue Jun 17 11:00:10 2008 From: chenyu_kang at yahoo.com.cn (=?gb2312?q?=B3=C2=D3=DA=BF=B5?=) Date: Thu Mar 26 02:20:32 2009 Subject: [plt-scheme] Question Message-ID: <828884.76506.qm@web15907.mail.cnb.yahoo.com> hello ! Can anyone can tell me the answer to Exercise 21.1.3 in HTDP.. I can't figure it out. THANKS..... ___________________________________________________________ ÑÅ»¢ÓÊÏ䣬ÄúµÄÖÕÉúÓÊÏ䣡 http://cn.mail.yahoo.com/ From eli at barzilay.org Tue Jun 17 11:15:32 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:32 2009 Subject: [plt-scheme] writing to subprocess's stdin and then... In-Reply-To: <20080617205633.270420b8@duncan.reilly.home> References: <779bf2730806162227v5df4295bx27e3e8df71d13cf6@mail.gmail.com> <18519.20055.614994.43328@arabic.ccs.neu.edu> <779bf2730806170041g4e1c088aybfccbea8ab4541f4@mail.gmail.com> <18519.31366.252359.306914@arabic.ccs.neu.edu> <20080617205633.270420b8@duncan.reilly.home> Message-ID: <18519.54548.638509.859936@arabic.ccs.neu.edu> On Jun 17, Andrew Reilly wrote: > Hi Eli, > > I'm glad that this topic came up, because I was playing with just > these issues last weekend. I had been using process rather than > subprocess (so I had to make up some amusing string quoting to pass > in complicated, space-containing file names), There's the ---* versions of functions which get the executable and arguments in Scheme, so you don't need to deal with any quoting. (Except from Scheme strings, of course.) > [...] > > The problem is that this produces an error at run-time: > subprocess: expects type as 3rd > argument, given: #; other arguments were: #f #f > # "--export-tags-to=-" "some file > name..." Yes, DrScheme is an obvious example where the error/output ports are redirected in Scheme. > Should subprocess really be so picky? I suppose that it has to be, > because the unix process wants a real file descriptor. The > current-error-port in this case is that of the drscheme environment. > Seems to work OK from mzscheme on the command line. Exactly. As for the pickiness -- that's exactly why there's the scheme/system library -- it abstracts these details for you. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robert.matovinovic at web.de Tue Jun 17 11:22:51 2008 From: robert.matovinovic at web.de (Robert Matovinovic) Date: Thu Mar 26 02:20:33 2009 Subject: [plt-scheme] scribbling docs in different versions of DrScheme Message-ID: Hi, First, thank you to all involved for v4 of DrScheme. It is getting better every time and it is great to see the development. Hope it will go on forever. It may be of interest for the developers so I want to share my experience preparing docs with scribble. I use the include-section command to nest files which otherwise become to long. Index-section I use in the main file to get the indices. Under Windows XP I used version 4.0.0.1-svn16jun2008 [3m] version 4.0 [3m] version 3.99.0.25-svn25may2008 [3m] To compile my collection on the command line with setup-plt -l collect. Under version 4.0.0.1-svn16jun2008 [3m] compilation doesn't show any errors, docs are produced, but I don't get the entries in help desk. F1 or search for the documents doesn't work. For version 4.0 [3m] it is the same behaviour after compilation. But compilation takes a looong time since there are many warnings for duplicate tags in other collections. So I switched back to version 3.99.0.25-svn25may2008 [3m]. Here everything works fine. For information example files here: main.scrbl: #lang scribble/doc @(require scribble/manual (for-label scheme "commands.ss") ) @(declare-exporting mycollect/commands) @title{Reference} @table-of-contents[] @section{Overview} @include-section["extensions.scrbl"] @index-section[] extensions.scrbl: #lang scribble/doc @(require scribble/manual (for-label scheme "commands.ss") ) @(declare-exporting mycollect/commands) @title{Scheme Extensions} @include-section["abl.scrbl"] abl.scrbl: #lang scribble/doc @(require scribble/manual (for-label scheme "commands.ss") ) @(declare-exporting mycollect/commands) @title{abl} @defform[(position x y z)] Sets a position in world coordinates. Regards 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 robert.matovinovic at web.de Tue Jun 17 11:22:51 2008 From: robert.matovinovic at web.de (Robert Matovinovic) Date: Thu Mar 26 02:20:33 2009 Subject: AW: [plt-scheme] word completion for module based languages In-Reply-To: <359743D681F4463E84A51184156D20FE@IBMI> Message-ID: <96B9C467207B4C14B4D3D792F6A6D839@IBMI> Hello, some time ago I opened this thread and could fix part of my problems thanks you to all the replies. Since then I looked at line 2811 of framework/text.ss which Robby mentioned in the mail below, because autocompletion does only seem to work for something like scheme/base. I tested that Robby is right in that the list which is prepared for the completions holds actually every word that appears in any of the manual's indicies. But on the way before it is shown something happens to the content so that a lot of it doesn't show up. I wasn't able to find where this happens. But perhaps this is helpful to somebody who knows better than me to fix it. Robert -----Urspr?ngliche Nachricht----- Von: plt-scheme-bounces@list.cs.brown.edu [mailto:plt-scheme-bounces@list.cs.brown.edu] Im Auftrag von Robert Matovinovic Gesendet: Mittwoch, 21. Mai 2008 18:56 An: plt-scheme@list.cs.brown.edu Betreff: AW: [plt-scheme] word completion for module based languages 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 > > _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mflatt at cs.utah.edu Tue Jun 17 13:38:40 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:33 2009 Subject: [plt-scheme] PLT SCHEME 4.0 - SLLGEN In-Reply-To: References: Message-ID: <20080617173842.7F7006500B7@mail-svr1.cs.utah.edu> At Mon, 16 Jun 2008 22:26:44 -0500, "Luis Fernando Pino Duque" wrote: > I would like to know how to use the sllgen in the version 4.0 of PLT Scheme, > because i'm compilling my old programs (v.372) > and they throws the error "sllgen:make-define-datatypes: bad scanner > specification in: the-lexical-spec". I see that the EoPL support in v4.0 is completely broken. I've committed fixes in SVN, and they'll be part of v4.0.1. Matthew From yinso.chen at gmail.com Tue Jun 17 22:22:49 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:34 2009 Subject: hard link? ==> Re: [plt-scheme] are some of the file system functions atomic? Message-ID: <779bf2730806171922u75769727l8e067deb145698ac@mail.gmail.com> Hi - Is there a function for creating hardlinks (in supported OS)? I thought make-file-or-directory-link will do the trick but not according to the doc at http://docs.plt-scheme.org/reference/Filesystem.html#(def._((quote._~23~25kernel)._make-file-or-directory-link)) . Thanks, yc On Fri, Jun 13, 2008 at 5:40 AM, Matthew Flatt wrote: > >> >> Yes, those operations are performed atomically when the OS supports it. >> >> Currently, only the docs for `rename-file-or-directory' mention >> atomicity, and in that case to clarify that there's a race condition on >> the check for an existing file --- which corresponds to the fact that >> the rename() system call always replaces existing files. >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080617/547bd1a6/attachment.htm From DekuDekuplex at Yahoo.com Tue Jun 17 23:13:52 2008 From: DekuDekuplex at Yahoo.com (Benjamin L. Russell) Date: Thu Mar 26 02:20:34 2009 Subject: [plt-scheme] Re: Question In-Reply-To: <828884.76506.qm@web15907.mail.cnb.yahoo.com> References: <828884.76506.qm@web15907.mail.cnb.yahoo.com> Message-ID: <48587D70.6080008@Yahoo.com> While we all welcome homework questions here, it would help if you could mention where you got stuck, so that we can better assist you. If we just give you the answer, you will not learn nearly so much as if you let us give you hints so that you can try to figure the solution out yourself. Where did you get stuck? Benjamin L. Russell ³ÂÓÚ¿µ wrote: > hello ! > > Can anyone can tell me the answer to Exercise 21.1.3 > in HTDP.. I can't figure it out. > > THANKS..... > > > > > > > > > ___________________________________________________________ > ÑÅ»¢ÓÊÏ䣬ÄúµÄÖÕÉúÓÊÏ䣡 > http://cn.mail.yahoo.com/ > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From badescu.costin at gmail.com Wed Jun 18 00:52:13 2008 From: badescu.costin at gmail.com (Costin Badescu) Date: Thu Mar 26 02:20:35 2009 Subject: [plt-scheme] Error Reporting in Cygwin w/ Rxvt or xterm and Quack Message-ID: <48585C3D.25313.24CD3CE@badescu.costin.gmail.com> Hello, I've tried the newest version of MzScheme, 4.0, with Cygwin and Rxvt and it doesn't print out errors from the REPL. It gathers all the errors and prints them out when you exit from the REPL. It seems that similar problems were encountered with much earlier versions such as 204. I tried installing the X server and xterm and the same thing happens with that. Is there any setting that I might alter either on Cygwin/Rxvt or MzScheme to fix this? PS: In Emacs w/Quack I get the same result as in Cygwin. Costin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080618/1ce1f684/attachment.html From robby at cs.uchicago.edu Wed Jun 18 01:22:44 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:35 2009 Subject: [plt-scheme] word completion for module based languages In-Reply-To: <96B9C467207B4C14B4D3D792F6A6D839@IBMI> References: <359743D681F4463E84A51184156D20FE@IBMI> <96B9C467207B4C14B4D3D792F6A6D839@IBMI> Message-ID: <932b2f1f0806172222o2c287522qd2a5b066cf723095@mail.gmail.com> I've checked in something so that the completion now should complete all of the indexed variables (it now works for mysterx, when it didn't before). Thanks, Robby On Tue, Jun 17, 2008 at 10:22 AM, Robert Matovinovic wrote: > Hello, > some time ago I opened this thread and could fix part of my problems thanks > you to all the replies. > > Since then I looked at line 2811 of framework/text.ss which Robby mentioned > in the mail below, because autocompletion does only seem to work for > something like scheme/base. I tested that Robby is right in that the list > which is prepared for the completions holds actually every word that appears > in any of the manual's indicies. But on the way before it is shown something > happens to the content so that a lot of it doesn't show up. I wasn't able to > find where this happens. But perhaps this is helpful to somebody who knows > better than me to fix it. > > Robert > > -----Urspr?ngliche Nachricht----- > Von: plt-scheme-bounces@list.cs.brown.edu > [mailto:plt-scheme-bounces@list.cs.brown.edu] Im Auftrag von Robert > Matovinovic > Gesendet: Mittwoch, 21. Mai 2008 18:56 > An: plt-scheme@list.cs.brown.edu > Betreff: AW: [plt-scheme] word completion for module based languages > > > 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 >> >> > > _________________________________________________ > 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 chan_dhf at yahoo.de Wed Jun 18 07:07:40 2008 From: chan_dhf at yahoo.de (Danny Chan) Date: Thu Mar 26 02:20:35 2009 Subject: [plt-scheme] Newbie question: non-blocking IO Message-ID: <660027.15093.qm@web26207.mail.ukl.yahoo.com> Hi! I'd like to write a program that captures a video flow from a camera developed in my company. I already found out how to talk to the low level C libraries that are needed to talk to our hardware using the FFI. However, the functions to grab images from the camera are blocking until a data buffer has been filled. But to get the necessary frame rate, I need to process the last captured frame while waiting for the next frame. If I read the documentation correctly, PLT Scheme uses green threads, so that the call to my C function will block the scheme process even if it is done in a dedicated scheme thread. If this is correct, is there a simple way to achieve a non-blocking call to a C function? Thanks, Danny __________________________________________________________ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080618/7d7cb752/attachment.htm From mflatt at cs.utah.edu Wed Jun 18 08:32:33 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:35 2009 Subject: [plt-scheme] Uncorrect enter! behaviour In-Reply-To: <863055B715B9D04CB4320CFCDEE0837FC2E1F7@mailing.selesta.it> References: <863055B715B9D04CB4320CFCDEE0837FC2E1F7@mailing.selesta.it> Message-ID: <20080618123235.044A66500AC@mail-svr1.cs.utah.edu> [Re-sending, because my reply yesterday doesn't seem to have gone through.] At Mon, 16 Jun 2008 14:22:17 +0200, "Ferreira Maurizio" wrote: > (enter! "serve.ss") > > After that, I tried to modify the example, but reevaluating the enter! > statement, > it doesn't reload my changes. > > In order to see them I have to quit MzScheme and restart it. > > I'm using MzScheme vers. 4.0 [3m], under Windows 2000 sp4. This is a bug that only shows up under Windows (related to case-normalizing paths). It's fixed in SVN for the forthcoming 4.0.1 release. Matthew From mflatt at cs.utah.edu Wed Jun 18 08:36:21 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:36 2009 Subject: hard link? ==> Re: [plt-scheme] are some of the file system functions atomic? In-Reply-To: <779bf2730806171922u75769727l8e067deb145698ac@mail.gmail.com> References: <779bf2730806171922u75769727l8e067deb145698ac@mail.gmail.com> Message-ID: <20080618123622.ECC146500AC@mail-svr1.cs.utah.edu> At Tue, 17 Jun 2008 19:22:49 -0700, YC wrote: > Is there a function for creating hardlinks (in supported OS)? No, not currently. You'd have to use `scheme/foriegn' to access link(). Matthew > I thought > make-file-or-directory-link will do the trick but not according to the doc > at > http://docs.plt- > scheme.org/reference/Filesystem.html#(def._((quote._~23~25kernel)._make-file- > or-directory-link)) > . > > Thanks, > yc > > On Fri, Jun 13, 2008 at 5:40 AM, Matthew Flatt wrote: > > > >> > >> Yes, those operations are performed atomically when the OS supports it. > >> > >> Currently, only the docs for `rename-file-or-directory' mention > >> atomicity, and in that case to clarify that there's a race condition on > >> the check for an existing file --- which corresponds to the fact that > >> the rename() system call always replaces existing files. > >> > >> From czhu at cs.utah.edu Wed Jun 18 09:51:09 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:36 2009 Subject: [plt-scheme] Newbie question: non-blocking IO In-Reply-To: <660027.15093.qm@web26207.mail.ukl.yahoo.com> References: <660027.15093.qm@web26207.mail.ukl.yahoo.com> Message-ID: <485912CD.30606@cs.utah.edu> The only solution I can see is to implement you own thread in C, and make sure only your main thread talks to Scheme. Chongkai Danny Chan wrote: > Hi! > I'd like to write a program that captures a video flow from a camera > developed in my company. I already found out how to talk to the low > level C libraries that are needed to talk to our hardware using the > FFI. However, the functions to grab images from the camera are > blocking until a data buffer has been filled. But to get the necessary > frame rate, I need to process the last captured frame while waiting > for the next frame. If I read the documentation correctly, PLT Scheme > uses green threads, so that the call to my C function will block the > scheme process even if it is done in a dedicated scheme thread. If > this is correct, is there a simple way to achieve a non-blocking call > to a C function? > > Thanks, Danny > > From cppljevans at suddenlink.net Wed Jun 18 13:24:45 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:20:36 2009 Subject: [plt-scheme] Re: PLT SCHEME 4.0 - SLLGEN In-Reply-To: <20080617173842.7F7006500B7@mail-svr1.cs.utah.edu> References: <20080617173842.7F7006500B7@mail-svr1.cs.utah.edu> Message-ID: On 06/17/08 12:38, Matthew Flatt wrote: > At Mon, 16 Jun 2008 22:26:44 -0500, "Luis Fernando Pino Duque" wrote: >> I would like to know how to use the sllgen in the version 4.0 of PLT Scheme, [snip] > I see that the EoPL support in v4.0 is completely broken. I've > committed fixes in SVN, and they'll be part of v4.0.1. > Thanks Matthew. That'll probably solve the problem reported earlier in my post with headers: Subject: Essentials of Prog. Lang. 6-grammar.scm bad scanner Date: Tue, 17 Jun 2008 05:46:38 -0500 However, it's unclear what to do after `svn update`, Is `make install ` sufficient or must that be preceded by `make `? From mflatt at cs.utah.edu Wed Jun 18 13:28:30 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:36 2009 Subject: [plt-scheme] Re: PLT SCHEME 4.0 - SLLGEN In-Reply-To: References: <20080617173842.7F7006500B7@mail-svr1.cs.utah.edu> Message-ID: <20080618172832.930FF6500AC@mail-svr1.cs.utah.edu> At Wed, 18 Jun 2008 12:24:45 -0500, Larry Evans wrote: > On 06/17/08 12:38, Matthew Flatt wrote: > > At Mon, 16 Jun 2008 22:26:44 -0500, "Luis Fernando Pino Duque" wrote: > >> I would like to know how to use the sllgen in the version 4.0 of PLT Scheme, > [snip] > > I see that the EoPL support in v4.0 is completely broken. I've > > committed fixes in SVN, and they'll be part of v4.0.1. > > > Thanks Matthew. That'll probably solve the problem reported earlier in > my post with headers: > > Subject: Essentials of Prog. Lang. 6-grammar.scm bad scanner > Date: Tue, 17 Jun 2008 05:46:38 -0500 > > However, it's unclear what to do after `svn update`, > Is `make install ` sufficient or must that be > preceded by `make `? In this case, if you already have an SVN-based installation, then `setup-plt' is enough. Matthew From yinso.chen at gmail.com Wed Jun 18 18:06:26 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:37 2009 Subject: [plt-scheme] Newbie question: non-blocking IO In-Reply-To: <485912CD.30606@cs.utah.edu> References: <660027.15093.qm@web26207.mail.ukl.yahoo.com> <485912CD.30606@cs.utah.edu> Message-ID: <779bf2730806181506j627eabc3y3e1231f5a9f3436b@mail.gmail.com> There is a proposal for ffi+thread in http://www.cs.brown.edu/pipermail/plt-scheme/2007-July/019592.html - does anyone knows what happened there? I imagine that the default file ports do not block if they are running in separate scheme threads - is it correct? Perhaps that can be leveraged (i.e. pipe the FFI result to a port and then read from it)? (I don't really know about the details here - just making guesses...) On Wed, Jun 18, 2008 at 6:51 AM, Chongkai Zhu wrote: > The only solution I can see is to implement you own thread in C, and make > sure only your main thread talks to Scheme. > > Chongkai > > > > Danny Chan wrote: > >> Hi! >> I'd like to write a program that captures a video flow from a camera >> developed in my company. I already found out how to talk to the low level C >> libraries that are needed to talk to our hardware using the FFI. However, >> the functions to grab images from the camera are blocking until a data >> buffer has been filled. But to get the necessary frame rate, I need to >> process the last captured frame while waiting for the next frame. If I read >> the documentation correctly, PLT Scheme uses green threads, so that the call >> to my C function will block the scheme process even if it is done in a >> dedicated scheme thread. If this is correct, is there a simple way to >> achieve a non-blocking call to a C function? >> >> Thanks, Danny >> >> >> _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080618/55784986/attachment.html From dyoo at cs.wpi.edu Wed Jun 18 19:13:45 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:37 2009 Subject: [plt-scheme] Just to confirm: the embedded-gui library preferred over mrlib? Message-ID: Hi everyone, It looks like the 'embedded-gui' collection does pretty much the same stuff as the 'aligned-pasteboard' in 'mrlib'. I wanted to make sure: should mrlib be treated as a deprecated library, and to prefer new development on 'embedded-gui'? From jadudm at gmail.com Wed Jun 18 19:24:52 2008 From: jadudm at gmail.com (Matt Jadud) Date: Thu Mar 26 02:20:37 2009 Subject: [plt-scheme] webit in v400? Message-ID: Hi all, Webit! shows up in the 4x PLaneT repository... has anyone used it? I'm trying to bring a piece of code up to v400, but it relies on a number of libraries that may or may not have been ported... and I'm not yet familiar with the errors that result from the v3 to v4 migration. For example, when I update my require statements to the most recent versions of the libraries available, and try and run a set of test suites (with a clean planet cache), I get a whole bunch of errors, some related to files that aren't even involved in my process... load-handler: expected a `module' declaration for `poem' in #, but found something else ... setup-plt: error: during making for /jim/webit.plt/1/5/example/parse-examples ... setup-plt: read-one: file has more than one expression; expected a module declaration only in: /Users/jadudm/Library/PLT Scheme/planet/300/4.0.1/cache/jim/webit.plt/1/5/tests/tests.ss Are these signs that the library is actually not 4x ready? (That's my guess.) Cheers, Matt From benderjg2 at aol.com Wed Jun 18 19:34:14 2008 From: benderjg2 at aol.com (benderjg2@aol.com) Date: Thu Mar 26 02:20:37 2009 Subject: [plt-scheme] webit in v400? In-Reply-To: References: Message-ID: <260273988-1213832062-cardhu_decombobulator_blackberry.rim.net-258816650-@bxe127.bisx.prod.on.blackberry> The examples and possibly other files now choke under v400 as they are not in modules. I realized this a few days ago but did not get a chance over the weekend to update the Webit package in planet. I'll work on it this evening. Jim Sent via BlackBerry by AT&T -----Original Message----- From: "Matt Jadud" Date: Wed, 18 Jun 2008 19:24:52 To:"PLT Scheme List" Subject: [plt-scheme] webit in v400? Hi all, Webit! shows up in the 4x PLaneT repository... has anyone used it? I'm trying to bring a piece of code up to v400, but it relies on a number of libraries that may or may not have been ported... and I'm not yet familiar with the errors that result from the v3 to v4 migration. For example, when I update my require statements to the most recent versions of the libraries available, and try and run a set of test suites (with a clean planet cache), I get a whole bunch of errors, some related to files that aren't even involved in my process... load-handler: expected a `module' declaration for `poem' in #, but found something else ... setup-plt: error: during making for /jim/webit.plt/1/5/example/parse-examples ... setup-plt: read-one: file has more than one expression; expected a module declaration only in: /Users/jadudm/Library/PLT Scheme/planet/300/4.0.1/cache/jim/webit.plt/1/5/tests/tests.ss Are these signs that the library is actually not 4x ready? (That's my guess.) Cheers, Matt _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme From jbdatabus at gmail.com Wed Jun 18 20:35:07 2008 From: jbdatabus at gmail.com (Jeff) Date: Thu Mar 26 02:20:38 2009 Subject: [plt-scheme] Errors on PlaneT Message-ID: Hi, I'm getting errors when I try to install DivaScheme from the PlaneT 4.x repository on DrScheme 4.0. Any ideas on how to fix? command: (require (planet "install.ss" ("divascheme" "divascheme.plt" 1 3))) results: Welcome to DrScheme, version 4.0 [3m]. Language: Module custom; memory limit: 128 megabytes. (require (planet "install.ss" ("divascheme" "divascheme.plt" 1 3))) Internal PLaneT error: trying to install already-installed package setup-plt: error: during making for /dyoo/rope.plt/2/3 (rope) setup-plt: Internal PLaneT error: trying to install already-installed package compile: unbound variable in module compile: unbound variable in module compile: unbound variable in module setup-plt: error: during making for /divascheme/divascheme.plt/1/3 (DivaScheme) setup-plt: compile: unbound variable in module setup-plt: error: during making for /divascheme/divascheme.plt/1/3/semi-read-syntax setup-plt: compile: unbound variable in module setup-plt: error: during making for /divascheme/divascheme.plt/1/3/tests setup-plt: compile: unbound variable in module Internal PLaneT error: trying to install already-installed package -When I quit and restart DrScheme I receive a bunch more errors relating to DivaScheme. -On a related note: is there a package uninstall for cases like this? thanks jeff From dyoo at cs.wpi.edu Wed Jun 18 21:19:07 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:38 2009 Subject: [plt-scheme] Errors on PlaneT In-Reply-To: References: Message-ID: > Hi, I'm getting errors when I try to install DivaScheme from the PlaneT 4.x > repository on DrScheme 4.0. Any ideas on how to fix? [errors cut] Hi Jeff, My apologies! The first error you see: Internal PLaneT error: trying to install already-installed package is due to the PLaneT versioning code doing something funky from the transition of the older version numbering scheme to the new numbering scheme. I sent a patch over to fix the issue, so that should be fixed in PLT Scheme 4.0.1. The other error you're seeing about unbound variables is something that's puzzling me. I'll look into it. We'll release a DivaScheme release that's 4.0-compatible release in a day or so. > -On a related note: is there a package uninstall for cases like this? You might want to try at your command line: $ planet remove divascheme divascheme.plt 1 3 From dyoo at cs.wpi.edu Wed Jun 18 21:19:07 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:38 2009 Subject: [plt-scheme] Errors on PlaneT In-Reply-To: References: Message-ID: > Hi, I'm getting errors when I try to install DivaScheme from the PlaneT 4.x > repository on DrScheme 4.0. Any ideas on how to fix? [errors cut] Hi Jeff, My apologies! The first error you see: Internal PLaneT error: trying to install already-installed package is due to the PLaneT versioning code doing something funky from the transition of the older version numbering scheme to the new numbering scheme. I sent a patch over to fix the issue, so that should be fixed in PLT Scheme 4.0.1. The other error you're seeing about unbound variables is something that's puzzling me. I'll look into it. We'll release a DivaScheme release that's 4.0-compatible release in a day or so. > -On a related note: is there a package uninstall for cases like this? You might want to try at your command line: $ planet remove divascheme divascheme.plt 1 3 From eli at barzilay.org Wed Jun 18 22:06:53 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:38 2009 Subject: [plt-scheme] Just to confirm: the embedded-gui library preferred over mrlib? In-Reply-To: References: Message-ID: <18521.48957.624105.32182@arabic.ccs.neu.edu> On Jun 18, Danny Yoo wrote: > Hi everyone, > > It looks like the 'embedded-gui' collection does pretty much the > same stuff as the 'aligned-pasteboard' in 'mrlib'. I wanted to make > sure: should mrlib be treated as a deprecated library, and to prefer > new development on 'embedded-gui'? It's better to use mrlib -- there is the "hierlist" that should also move inside, and IIUC, embedded-gui should move in too. For old code, the toplevel collections should turn to stubs that simple reprovide things from the mrlib libraries. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From j.russell at alum.mit.edu Wed Jun 18 22:58:33 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:38 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme Message-ID: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> Are there any plans to overhaul the built-in indentation facility in MrEd/DrScheme, perhaps providing more flexible customization alternatives? At this point it seems manifestly inadequate, in that there is no way to make it correctly indent what are now standard syntactic forms, like (the immensely cool) 'for/fold'; where 'correctly' is defined either by 'how it's done in the manual', or 'what a lisp person might expect'. The situation is, of course, just as bad for any macros that I might care to define that don't fit the begin/define/lambda indentation patterns. And, yes, I can just use emacs, but that's not really the point. -James Russell From sk at cs.brown.edu Wed Jun 18 23:32:26 2008 From: sk at cs.brown.edu (Shriram Krishnamurthi) Date: Thu Mar 26 02:20:38 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> Message-ID: You mean as opposed to the indentation customization options? Shriram On Wed, Jun 18, 2008 at 10:58 PM, James Russell wrote: > Are there any plans to overhaul the built-in indentation facility in > MrEd/DrScheme, perhaps providing more flexible customization > alternatives? > > At this point it seems manifestly inadequate, in that there is no way > to make it correctly indent what are now standard syntactic forms, > like (the immensely cool) 'for/fold'; where 'correctly' is defined > either by 'how it's done in the manual', or 'what a lisp person might > expect'. > > The situation is, of course, just as bad for any macros that I might > care to define that don't fit the begin/define/lambda indentation > patterns. > > And, yes, I can just use emacs, but that's not really the point. > > -James Russell > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From dyoo at cs.wpi.edu Wed Jun 18 23:38:06 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:38 2009 Subject: [plt-scheme] Strange issue in getting DivaScheme prepared for 4.0: compilation time and memory is huge! Message-ID: I just put up a new DivaScheme package up on PLaneT that should work with PLT Scheme 4.0. However, I'm seeing some strange issues with DrScheme compilation. It takes an unusual amount of time and memory to install DivaScheme on a clean DrScheme 4.0, and I haven't been able to trace why. Basically, if I have a virgin DrScheme 4.0 installation, I must initially tell DrScheme to use at least 256MB of memory before evaluating: (require (planet "install.ss" ("divascheme" "divascheme.plt" 1 4))) If I instead keep the 128MB memory ceiling, compilation will fail because it hits the memory ceiling. (And what's also surprising to me is how darn long it takes to compile.) This is violating my expectations on how expensive compilation is! Does anyone know what's going on? From j.russell at alum.mit.edu Wed Jun 18 23:48:56 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:39 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> Message-ID: <58925be00806182048j53e320f5o4cf24bc5ad3bac9a@mail.gmail.com> On Wed, Jun 18, 2008 at 11:32 PM, Shriram Krishnamurthi wrote: > You mean as opposed to the indentation customization options? > Well, either in addition to or instead of, unless I've missed something obvious. My, admittedly cursory, inspection of framework/private/scheme.ss suggests that the indenting framework is pretty rigid and doesn't handle something like 'for/fold' that should have two distinguished forms followed by body forms. If this is the case then it seems that something more radical needs to be done. > Shriram > > On Wed, Jun 18, 2008 at 10:58 PM, James Russell wrote: >> Are there any plans to overhaul the built-in indentation facility in >> MrEd/DrScheme, perhaps providing more flexible customization >> alternatives? >> >> At this point it seems manifestly inadequate, in that there is no way >> to make it correctly indent what are now standard syntactic forms, >> like (the immensely cool) 'for/fold'; where 'correctly' is defined >> either by 'how it's done in the manual', or 'what a lisp person might >> expect'. >> >> The situation is, of course, just as bad for any macros that I might >> care to define that don't fit the begin/define/lambda indentation >> patterns. >> >> And, yes, I can just use emacs, but that's not really the point. >> >> -James Russell >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> > -- "The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." -- H.P.Lovecraft From jadudm at gmail.com Thu Jun 19 00:31:26 2008 From: jadudm at gmail.com (Matt Jadud) Date: Thu Mar 26 02:20:39 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806182048j53e320f5o4cf24bc5ad3bac9a@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <58925be00806182048j53e320f5o4cf24bc5ad3bac9a@mail.gmail.com> Message-ID: On 6/18/08, James Russell wrote: > On Wed, Jun 18, 2008 at 11:32 PM, Shriram Krishnamurthi wrote: > > You mean as opposed to the indentation customization options? > My, admittedly cursory, inspection of framework/private/scheme.ss I'm confused. I am able to customize indentation through a variety of preferences, and get letrec-like (or documentation-like) indentation without any difficulty. You've explained very little; what kind of indentation are you trying to achieve, and what are you seeing? Cheers, Matt From j.russell at alum.mit.edu Thu Jun 19 00:49:25 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:39 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <58925be00806182048j53e320f5o4cf24bc5ad3bac9a@mail.gmail.com> Message-ID: <58925be00806182149r295d5b79had39330bce5b787f@mail.gmail.com> On Thu, Jun 19, 2008 at 12:31 AM, Matt Jadud wrote: > On 6/18/08, James Russell wrote: >> On Wed, Jun 18, 2008 at 11:32 PM, Shriram Krishnamurthi wrote: >> > You mean as opposed to the indentation customization options? > >> My, admittedly cursory, inspection of framework/private/scheme.ss > > I'm confused. I am able to customize indentation through a variety of > preferences, and get letrec-like (or documentation-like) indentation > without any difficulty. > > You've explained very little; what kind of indentation are you trying > to achieve, and what are you seeing? > I'm not talking about indentation customization in general, which I can do using the preferences form in DrScheme. I'm talking about a very specific set of forms that I cannot make DrScheme indent properly. I'm trying, for instance, to get a syntax form like 'for/fold' (but this is only an example), which has two binding sub-forms before the body sub-forms, to indent like it does in the manual or like it might in emacs, where I can specify that multiple sub-forms (not just one) should indent four rather than two spaces. In emacs I would say: (put 'for/fold 'scheme-indent-function 2) If DrScheme can do this, I can't figure it out. In the manual, for/fold looks roughly like (for/fold (foo...) (bar...) body body ...) I'd be happy with (as emacs might indent): (for/fold (foo...) (bar...) body body ...) or (for/fold (foo...) (bar...) body body ...) All I can get DrScheme to do, by making 'for/fold' lambda like is: (for/fold (foo...) (bar...) body body ...) or (for/fold (foo...) (bar...) body body ...) but '(bar...)' is a binding-form and should not be indented like a body form. One can further imagine other macros that have 2 binding forms, or that even have 3 or more binding sub-forms, which would suffer from the same problem. > Cheers, > Matt > From j.russell at alum.mit.edu Thu Jun 19 01:13:41 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:39 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806182149r295d5b79had39330bce5b787f@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <58925be00806182048j53e320f5o4cf24bc5ad3bac9a@mail.gmail.com> <58925be00806182149r295d5b79had39330bce5b787f@mail.gmail.com> Message-ID: <58925be00806182213p5f18f277r57c3be6de4de413d@mail.gmail.com> On Thu, Jun 19, 2008 at 12:49 AM, James Russell wrote: > On Thu, Jun 19, 2008 at 12:31 AM, Matt Jadud wrote: >> On 6/18/08, James Russell wrote: >>> On Wed, Jun 18, 2008 at 11:32 PM, Shriram Krishnamurthi wrote: >>> > You mean as opposed to the indentation customization options? >> >>> My, admittedly cursory, inspection of framework/private/scheme.ss >> >> I'm confused. I am able to customize indentation through a variety of >> preferences, and get letrec-like (or documentation-like) indentation >> without any difficulty. >> >> You've explained very little; what kind of indentation are you trying >> to achieve, and what are you seeing? >> > > I'm not talking about indentation customization in general, > which I can do using the preferences form in DrScheme. > I'm talking about a very specific set of forms that I cannot > make DrScheme indent properly. > > I'm trying, for instance, to get a syntax form like > 'for/fold' (but this is only an example), which > has two binding sub-forms before the body sub-forms, > to indent like it does in the manual or like it might in emacs, > where I can specify that multiple sub-forms (not just one) > should indent four rather than two spaces. > > In emacs I would say: > (put 'for/fold 'scheme-indent-function 2) > > If DrScheme can do this, I can't figure it out. > > In the manual, for/fold looks roughly like > > (for/fold (foo...) > (bar...) > body > body > ...) > > I'd be happy with (as emacs might indent): > > (for/fold (foo...) > (bar...) > body > body > ...) > > or > > (for/fold > (foo...) > (bar...) > body > body > ...) > > All I can get DrScheme to do, by making 'for/fold' > lambda like is: > > (for/fold (foo...) > (bar...) > body > body > ...) > > or > > (for/fold > (foo...) > (bar...) > body > body > ...) > > but '(bar...)' is a binding-form and should not be indented like a body form. > > One can further imagine other macros that have 2 binding forms, > or that even have 3 or more binding sub-forms, which would suffer > from the same problem. > And just to dispel any idea that I'm carping about some obscure syntax form, that no one but me cares about: other forms that indent wrong, by traditional standards, include 'do' and 'let loop', both of which should indent the second sub-form four spaces not two (if it stands on a new line). I do, however, realize that 'let loop' (or whatever it should be called), is an unpleasant special case. > >> Cheers, >> Matt >> > -- "The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." -- H.P.Lovecraft From j.russell at alum.mit.edu Thu Jun 19 01:15:54 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:39 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806182213p5f18f277r57c3be6de4de413d@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <58925be00806182048j53e320f5o4cf24bc5ad3bac9a@mail.gmail.com> <58925be00806182149r295d5b79had39330bce5b787f@mail.gmail.com> <58925be00806182213p5f18f277r57c3be6de4de413d@mail.gmail.com> Message-ID: <58925be00806182215p48303177p49d3ec20695a16c1@mail.gmail.com> On Thu, Jun 19, 2008 at 1:13 AM, James Russell wrote: > other forms that indent wrong, by traditional standards, include > 'do' and 'let loop', both of which should indent the second sub-form four spaces Sorry, that's the second sub-form exclusive of the 'do' or 'let'. > not two (if it stands on a new line). > I do, however, realize that 'let loop' (or whatever it should be called), > is an unpleasant special case. From dyoo at cs.wpi.edu Thu Jun 19 01:55:30 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:39 2009 Subject: [plt-scheme] on-event on snips seems a little weird Message-ID: I'm trying to get a snip to do something when I hover my mouse over it; I suspect I need to have the snip somehow have keyboard focus. Is there a way to get a snip to get events even if it doesn't have keyboard focus? I cooked up a simple example that shows an editor-snip with "hi" in it. I'd like to see my on-event handler fire off when I hover into and out of the editor snip. What trick am I missing? Thanks! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang scheme/gui (define my-editor-snip% (class editor-snip% (define/override (on-event dc x y editorx editory event) (printf "I see an event~n") (match (send event get-event-type) ['enter (printf "I see enter~n")] ['leave (printf "I see leave~n")] [else (void)]) (super on-event dc x y editorx editory event)) (super-new) (inherit set-flags get-flags) (set-flags (cons 'handles-events (get-flags))))) (define f (new frame% [label ""])) (define e (new text%)) (define c (new editor-canvas% [parent f] [editor e])) (define snip (make-object my-editor-snip%)) (send (send snip get-editor) insert "hi") (send e insert snip) (send f show #t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From chan_dhf at yahoo.de Thu Jun 19 02:53:15 2008 From: chan_dhf at yahoo.de (Danny Chan) Date: Thu Mar 26 02:20:40 2009 Subject: [plt-scheme] Newbie question: non-blocking IO In-Reply-To: <779bf2730806181506j627eabc3y3e1231f5a9f3436b@mail.gmail.com> Message-ID: <13735.17831.qm@web26207.mail.ukl.yahoo.com> Something I would love to see is a mechanism like the one in the Visualworks Smalltalk FFI. In VW you can add a _threaded flag to the definition of your external procedure, and the rest will work automatically. You then wrap this in a green thread and you're done. To make garbage collection possible, memory used in such calls are moved to a special place where the memory location is guaranteed to not change during the threaded call. For performance, the FFI machinery starts up a couple of worker threads and hands the threaded procedure calls over to the first free worker thread. I've heard that there are some possible pitfalls, but for the simple case it works amazingly well. Danny --- YC schrieb am Do, 19.6.2008: Von: YC Betreff: Re: [plt-scheme] Newbie question: non-blocking IO An: "pltscheme" CC: chan_dhf@yahoo.de Datum: Donnerstag, 19. Juni 2008, 0:06 There is a proposal for ffi+thread in? http://www.cs.brown.edu/pipermail/plt-scheme/2007-July/019592.html - does anyone knows what happened there? I imagine that the default file ports do not block if they are running in separate scheme threads - is it correct?? Perhaps that can be leveraged (i.e. pipe the FFI result to a port and then read from it)?? (I don't really know about the details here - just making guesses...) On Wed, Jun 18, 2008 at 6:51 AM, Chongkai Zhu wrote: The only solution I can see is to implement you own thread in C, and make sure only your main thread talks to Scheme. Chongkai Danny Chan wrote: Hi! I'd like to write a program that captures a video flow from a camera developed in my company. I already found out how to talk to the low level C libraries that are needed to talk to our hardware using the FFI. However, the functions to grab images from the camera are blocking until a data buffer has been filled. But to get the necessary frame rate, I need to process the last captured frame while waiting for the next frame. If I read the documentation correctly, PLT Scheme uses green threads, so that the call to my C function will block the scheme process even if it is done in a dedicated scheme thread. If this is correct, is there a simple way to achieve a non-blocking call to a C function? Thanks, Danny _________________________________________________ ?For list-related administrative tasks: ?http://list.cs.brown.edu/mailman/listinfo/plt-scheme __________________________________________________________ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080619/fa29f12d/attachment.htm From michel.sylvan at gmail.com Thu Jun 19 02:59:38 2008 From: michel.sylvan at gmail.com (Michel Salim) Date: Thu Mar 26 02:20:40 2009 Subject: [plt-scheme] Typed Scheme: type of filter ? Message-ID: <485A03DA.7070001@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In the POPL 08 paper, the type of filter is given as (All (a b) ((a --b--> Boolean) (listof a) -> (Listof b)) which would allow one to do things like (map add1 (filter number? '(1 #t 2 #f 3)) in fact, Sam gave this example on Lambda the Ultimate In the released version of PLT Scheme 4.0, however, this is the type of filter: (All (a) (( -> Boolean) (Listof ) -> (Listof ))) which means the above failed. As can be verified: (filter number? '(1 #t #f)) - - : (Listof (U Integer #f #t)) (1) The handling of booleans also strikes me as a bit odd. > > (define: bools : (Listof Boolean) '(#t #f)) > > bools - - : (Listof Boolean) (#t #f) > > (define bools2 bools) > > bools2 - - : (Listof Boolean) (#t #f) > > (define bools3 '(#t #f)) > > bools3 - - : (List #t #f) (#t #f) A similar behavior is exhibited for lists of numbers: '(1 1.5 2) : (List Integer Number Integer), so heterogenous lists are treated just like tuples in Haskell or ML, but is there any reason #t and #f are not treated as just instances of Boolean ? Thanks, - -- Michel Salim -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhaA9kACgkQWt0J3fd+7ZDjrwCbBdDegJPsKbpD6P6eYsgq0h81 1BMAn2H5+gi5a+4UVnuLEp6AHJ37tL4B =CTfP -----END PGP SIGNATURE----- From dyoo at cs.wpi.edu Thu Jun 19 03:04:39 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:41 2009 Subject: [plt-scheme] Re: on-event on snips seems a little weird In-Reply-To: References: Message-ID: On Thu, Jun 19, 2008 at 1:55 AM, Danny Yoo wrote: > I'm trying to get a snip to do something when I hover my mouse over > it; I suspect I need to have the snip somehow have keyboard focus. Is > there a way to get a snip to get events even if it doesn't have > keyboard focus? Ah, ok. I see how syncheck is doing it now. Ok, that works well enough. I end up firing off the events manually from the enclosing editor, so that I get to control when the snip gets the event, regardless of focus. Here's my example, just in case it comes in handy to others. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang scheme/gui ;; event-in-snip? mouse-event snip -> void ;; Returns true if the mouse event is hovering over the snip. ;; If the snip isn't attached to an admin, or isn't visible, returns #f. (define (event-hovering-over-snip? an-event a-snip) (cond [(and (send a-snip get-admin) (send (send a-snip get-admin) get-dc)) (let ([dc (send (send a-snip get-admin) get-dc)] [editor (send (send a-snip get-admin) get-editor)]) (let-values ([(x-box y-box) (values (box 0) (box 0))] [(w-box h-box) (values (box 0) (box 0))]) (send editor get-snip-location a-snip x-box y-box) (send a-snip get-extent dc (unbox x-box) (unbox y-box) w-box h-box #f #f #f #f) (and (<= (unbox x-box) (send an-event get-x) (+ (unbox x-box) (unbox w-box))) (<= (unbox y-box) (send an-event get-y) (+ (unbox y-box) (unbox h-box))))))] [else #f])) ;; event-editor-mixin: editor<%> -> editor<%> ;; Adds an interface for doing event listening to an editor. (define (event-editor-mixin super%) (class super% (define listeners (make-weak-hasheq)) (define/public (add-event-listener a-listener) (hash-set! listeners a-listener #t)) (define/override (on-event event) (for ([listener (in-hash-keys listeners)]) (with-handlers ([exn:fail? (lambda (exn) (void))]) (listener event))) (super on-event event)) (super-new))) ;; exercising code, not really a test case. (define (test) (define my-editor-snip% (class editor-snip% (define over? #f) (define/public (handle-event an-event) (cond [(and (not over?) (event-hovering-over-snip? an-event this)) (printf "over~n") (set! over? #t)] [(and over? (not (event-hovering-over-snip? an-event this))) (printf "not over~n") (set! over? #f)])) (super-new))) (define f (new frame% [label ""])) (define e (new (event-editor-mixin text%))) (define c (new editor-canvas% [parent f] [editor e])) (define snip (make-object my-editor-snip%)) (send e add-event-listener (lambda (evt) (send snip handle-event evt))) (send (send snip get-editor) insert "hi") (send e insert snip) (send f show #t)) From grettke at acm.org Thu Jun 19 04:31:00 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:20:41 2009 Subject: [plt-scheme] Understanding begin Message-ID: <756daca50806190131x47126761w2f032f80db458b74@mail.gmail.com> While studying Scheme, I had wondered how 'begin' might reduce to something simpler. While reading "Lambda: The Ultimate Imperative", I see that in Scheme, because of eager evaluation (aka call-by-value aka applicative order), lambda can be used to model imperative statements. So, these expressions are equivalent (each prints 'abc'): (begin (display 'a) (display 'b) (display 'c)) ((lambda (x) ((lambda (x) (display 'c)) (display 'b))) (display 'a)) Is this the right way to understand begin? To implement it? From czhu at cs.utah.edu Thu Jun 19 05:03:46 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:41 2009 Subject: [plt-scheme] Understanding begin In-Reply-To: <756daca50806190131x47126761w2f032f80db458b74@mail.gmail.com> References: <756daca50806190131x47126761w2f032f80db458b74@mail.gmail.com> Message-ID: <485A20F2.6030601@cs.utah.edu> No. See http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_idx_418 " The keyword has two different roles, depending on its context:" What you are taking about only models the second form/role of begin. Chongkai Grant Rettke wrote: > While studying Scheme, I had wondered how 'begin' might reduce to > something simpler. > > While reading "Lambda: The Ultimate Imperative", I see that in > Scheme, because of eager evaluation (aka call-by-value aka applicative > order), lambda can be used to model imperative statements. So, these > expressions are equivalent (each prints 'abc'): > > (begin > (display 'a) > (display 'b) > (display 'c)) > > ((lambda (x) ((lambda (x) (display 'c)) (display 'b))) (display 'a)) > > Is this the right way to understand begin? To implement it? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From pocm at soton.ac.uk Thu Jun 19 06:20:34 2008 From: pocm at soton.ac.uk (Paulo J. Matos) Date: Thu Mar 26 02:20:41 2009 Subject: [plt-scheme] Gallery of Turtle Programs Message-ID: <11b141710806190320q3d1babc9rb46d01be6ec5c02e@mail.gmail.com> Hello, I am wondering if any of you as any gallery of turtle programs. I am going show PLT Scheme to 12y.o. and I think this would be an interesting way to start. Cheers, -- Paulo Jorge Matos - pocm at soton.ac.uk http://www.personal.soton.ac.uk/pocm PhD Student @ ECS University of Southampton, UK From pocm at soton.ac.uk Thu Jun 19 06:38:26 2008 From: pocm at soton.ac.uk (Paulo J. Matos) Date: Thu Mar 26 02:20:41 2009 Subject: [plt-scheme] Compiling 4.0 Message-ID: <11b141710806190338g676a75c5mac0185f32b2fd82b@mail.gmail.com> Hello all, I am compiling 4.0 in Gentoo Linux and I got this: make[4]: Entering directory `/home/pmatos/plt-4.0/src/mred/gc2' ../../mzscheme/mzscheme3m -cqu "./gen-deps.ss" procedure application: expected procedure, given: #; arguments were: (quote #%utils) #f #f #t for-each: expects type as 1st argument, given: #; other arguments were: () make[4]: *** [gen-deps] Error 1 I just configured it with: ./configure --prefix=/usr/local/plt/plt-4.0 Cheers, -- Paulo Jorge Matos - pocm at soton.ac.uk http://www.personal.soton.ac.uk/pocm PhD Student @ ECS University of Southampton, UK From matthias at ccs.neu.edu Thu Jun 19 08:20:48 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:41 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> Message-ID: <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> In principle: I think you're right and we have discussed a meta- programming facility that would allow macro-defined languages (like the one for looping constructs) not only to specify a semantics but also IDE attributes such as indentation. We discussed this a year ago, when we moved to #lang and reader; I am certain that one year we'll add it in. (I don't know of any other language that provides such meta-programming facilities so this is a task with a research-y flavor.) In detail: My answer has no relation to the specific details of your inquiry concerning for* -- Matthias From matthias at ccs.neu.edu Thu Jun 19 08:21:42 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:41 2009 Subject: [plt-scheme] Typed Scheme: type of filter ? In-Reply-To: <485A03DA.7070001@gmail.com> References: <485A03DA.7070001@gmail.com> Message-ID: <087620C2-94AC-4B27-99A5-50BC4BFAA01F@ccs.neu.edu> This looks like a bug -- Matthias On Jun 19, 2008, at 2:59 AM, Michel Salim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > In the POPL 08 paper, the type of filter is given as > > (All (a b) ((a --b--> Boolean) (listof a) -> (Listof b)) > > which would allow one to do things like > > (map add1 (filter number? '(1 #t 2 #f 3)) > > in fact, Sam gave this example on Lambda the Ultimate > > In the released version of PLT Scheme 4.0, however, this is the type > of filter: > (All (a) (( -> Boolean) (Listof ) -> (Listof ))) > > which means the above failed. As can be verified: > > (filter number? '(1 #t #f)) > - - : (Listof (U Integer #f #t)) > (1) > > The handling of booleans also strikes me as a bit odd. > >>> (define: bools : (Listof Boolean) '(#t #f)) >>> bools > - - : (Listof Boolean) > (#t #f) >>> (define bools2 bools) >>> bools2 > - - : (Listof Boolean) > (#t #f) >>> (define bools3 '(#t #f)) >>> bools3 > - - : (List #t #f) > (#t #f) > > A similar behavior is exhibited for lists of numbers: '(1 1.5 2) : > (List Integer Number Integer), so heterogenous lists are treated just > like tuples in Haskell or ML, but is there any reason #t and #f are > not treated as just instances of Boolean ? > > Thanks, > > - -- > Michel Salim > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkhaA9kACgkQWt0J3fd+7ZDjrwCbBdDegJPsKbpD6P6eYsgq0h81 > 1BMAn2H5+gi5a+4UVnuLEp6AHJ37tL4B > =CTfP > -----END PGP SIGNATURE----- > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From matthias at ccs.neu.edu Thu Jun 19 08:24:00 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:42 2009 Subject: [plt-scheme] Gallery of Turtle Programs In-Reply-To: <11b141710806190320q3d1babc9rb46d01be6ec5c02e@mail.gmail.com> References: <11b141710806190320q3d1babc9rb46d01be6ec5c02e@mail.gmail.com> Message-ID: <5AF850F4-23BA-46A4-8557-F1FBB57B2B07@ccs.neu.edu> Consider an introduction that uses world.ss http://www.ccs.neu.edu/home/matthias/HtDP/Prologue/book.html and is derived from the idea in http://www.ccs.neu.edu/home/matthias/Essays/not-matter.html i.e., algebra isn't useless, you can make movies with it. (We are doing this locally with middle school kids of this age group.) On Jun 19, 2008, at 6:20 AM, Paulo J. Matos wrote: > Hello, > > I am wondering if any of you as any gallery of turtle programs. I am > going show PLT Scheme to 12y.o. and I think this would be an > interesting way to start. > > Cheers, > > -- > Paulo Jorge Matos - pocm at soton.ac.uk > http://www.personal.soton.ac.uk/pocm > PhD Student @ ECS > University of Southampton, UK > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From mflatt at cs.utah.edu Thu Jun 19 08:25:25 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:20:42 2009 Subject: [plt-scheme] Compiling 4.0 In-Reply-To: <11b141710806190338g676a75c5mac0185f32b2fd82b@mail.gmail.com> References: <11b141710806190338g676a75c5mac0185f32b2fd82b@mail.gmail.com> Message-ID: <20080619122526.C75666500A9@mail-svr1.cs.utah.edu> When # shows up, it's a MzScheme crash. What kind of processor does you machine have, and what are the gcc compiler options on your machine? Matthew At Thu, 19 Jun 2008 11:38:26 +0100, "Paulo J. Matos" wrote: > Hello all, > > I am compiling 4.0 in Gentoo Linux and I got this: > make[4]: Entering directory `/home/pmatos/plt-4.0/src/mred/gc2' > ../../mzscheme/mzscheme3m -cqu "./gen-deps.ss" > procedure application: expected procedure, given: #; > arguments were: (quote #%utils) #f #f #t > for-each: expects type as 1st argument, given: > #; other arguments were: () > make[4]: *** [gen-deps] Error 1 > > I just configured it with: > ./configure --prefix=/usr/local/plt/plt-4.0 > > Cheers, > > -- > Paulo Jorge Matos - pocm at soton.ac.uk > http://www.personal.soton.ac.uk/pocm > PhD Student @ ECS > University of Southampton, UK > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From sk at cs.brown.edu Thu Jun 19 08:59:21 2008 From: sk at cs.brown.edu (Shriram Krishnamurthi) Date: Thu Mar 26 02:20:42 2009 Subject: [plt-scheme] Understanding begin In-Reply-To: <756daca50806190131x47126761w2f032f80db458b74@mail.gmail.com> References: <756daca50806190131x47126761w2f032f80db458b74@mail.gmail.com> Message-ID: Despite Chongkai's more detailed message, I would say yes, this is a perfectly good way to understand it. On Thu, Jun 19, 2008 at 4:31 AM, Grant Rettke wrote: > While studying Scheme, I had wondered how 'begin' might reduce to > something simpler. > > While reading "Lambda: The Ultimate Imperative", I see that in > Scheme, because of eager evaluation (aka call-by-value aka applicative > order), lambda can be used to model imperative statements. So, these > expressions are equivalent (each prints 'abc'): > > (begin > (display 'a) > (display 'b) > (display 'c)) > > ((lambda (x) ((lambda (x) (display 'c)) (display 'b))) (display 'a)) > > Is this the right way to understand begin? To implement it? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From matthias at ccs.neu.edu Thu Jun 19 09:14:38 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:42 2009 Subject: [plt-scheme] Understanding begin In-Reply-To: References: <756daca50806190131x47126761w2f032f80db458b74@mail.gmail.com> Message-ID: <0AE5273E-E352-4BEF-AA2F-54769B941B3C@ccs.neu.edu> +1 On Jun 19, 2008, at 8:59 AM, Shriram Krishnamurthi wrote: > Despite Chongkai's more detailed message, I would say yes, > this is a perfectly good way to understand it. > > On Thu, Jun 19, 2008 at 4:31 AM, Grant Rettke wrote: >> While studying Scheme, I had wondered how 'begin' might reduce to >> something simpler. >> >> While reading "Lambda: The Ultimate Imperative", I see that in >> Scheme, because of eager evaluation (aka call-by-value aka >> applicative >> order), lambda can be used to model imperative statements. So, these >> expressions are equivalent (each prints 'abc'): >> >> (begin >> (display 'a) >> (display 'b) >> (display 'c)) >> >> ((lambda (x) ((lambda (x) (display 'c)) (display 'b))) (display 'a)) >> >> Is this the right way to understand begin? To implement it? >> _________________________________________________ >> 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 pocm at soton.ac.uk Thu Jun 19 09:42:25 2008 From: pocm at soton.ac.uk (Paulo J. Matos) Date: Thu Mar 26 02:20:42 2009 Subject: [plt-scheme] Syntax in teachpack doesn't work. Message-ID: <11b141710806190642m4fb7dcdq39e951daca699b40@mail.gmail.com> Hello, I am trying to create a simple syntax teachpack and I have: (module iteration mzscheme ;; Simplified do (define-syntax for (syntax-rules () ((for (var init cond step) command ...) (let loop ((var init)) (if (not cond) (void) (begin command ... (loop step))))))) ;; Simplified^2 do (define-syntax repeat (syntax-rules () ((repeat num command ...) (for (x 0 (< x num) (+ x 1)) command ...)))) (provide (all-defined))) Then I do add the teachpack and load it but when I try to use repeat: repeat: name is not defined, not a parameter, and not a primitive name I am surely missing something but don't know what (this is still version 372). Cheers, -- Paulo Jorge Matos - pocm at soton.ac.uk http://www.personal.soton.ac.uk/pocm PhD Student @ ECS University of Southampton, UK From j.russell at alum.mit.edu Thu Jun 19 09:48:47 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:42 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> Message-ID: <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> On Thu, Jun 19, 2008 at 8:20 AM, Matthias Felleisen wrote: > > In principle: I think you're right and we have discussed a meta-programming > facility that would allow macro-defined languages (like the one for looping > constructs) not only to specify a semantics but also IDE attributes such as > indentation. We discussed this a year ago, when we moved to #lang and > reader; I am certain that one year we'll add it in. (I don't know of any > other language that provides such meta-programming facilities so this is a > task with a research-y flavor.) > That would be cool, but it's really more ambitious than anything I was seriously expecting. Now that I've thought about it a little more, I think that the 80% (or 90%) solution would simply be to extend the 'lambda-like keywords' part of the indentation customization with the ability to specify the number of distinguished sub-forms (that get four spaces rather than two), if it's greater than one. I imagine that it could even look to the user like the 'cond-like keywords' in the square bracket customization, with the number of sub-forms specified in parentheses. Of course, the actual indenting code would have to be changed, but this solution would entail fairly localized changes, I think. Maybe I'll try it out at some point if no one else is interested. I'm frankly surprised that this doesn't come up more often. I'm sure I'm not the first person to have noticed this, but it's inadequacy is, manifestly, not as manifest as I believed. Maybe I'm just really picky. Or does everyone else just use emacs for hard-core development in PLT scheme? That's what I had always done in the past, but I thought to give the built-in editor a try, and I noticed this almost right away. All the best, James Russell > In detail: My answer has no relation to the specific details of your inquiry > concerning for* > > -- Matthias > > From robby at cs.uchicago.edu Thu Jun 19 10:09:23 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:42 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> Message-ID: <932b2f1f0806190709rbb1acc0v3b7523ae8e8c42ca@mail.gmail.com> I routinely use DrScheme to develop DrScheme and I think of is fairly routinely used but there we many people who prefer Emacs, no doubt. Robby On 6/19/08, James Russell wrote: > On Thu, Jun 19, 2008 at 8:20 AM, Matthias Felleisen > wrote: >> >> In principle: I think you're right and we have discussed a >> meta-programming >> facility that would allow macro-defined languages (like the one for >> looping >> constructs) not only to specify a semantics but also IDE attributes such >> as >> indentation. We discussed this a year ago, when we moved to #lang and >> reader; I am certain that one year we'll add it in. (I don't know of any >> other language that provides such meta-programming facilities so this is a >> task with a research-y flavor.) >> > > That would be cool, but it's really more ambitious than anything I was > seriously expecting. > > Now that I've thought about it a little more, I think that the 80% (or > 90%) solution > would simply be to extend the 'lambda-like keywords' part of the indentation > customization with the ability to specify the number of distinguished > sub-forms > (that get four spaces rather than two), if it's greater than one. > > I imagine that it could even look to the user like the 'cond-like > keywords' in the > square bracket customization, with the number of sub-forms specified in > parentheses. > > Of course, the actual indenting code would have to be changed, but this > solution > would entail fairly localized changes, I think. Maybe I'll try it out > at some point > if no one else is interested. > > I'm frankly surprised that this doesn't come up more often. I'm sure > I'm not the > first person to have noticed this, but it's inadequacy is, manifestly, > not as manifest > as I believed. Maybe I'm just really picky. > > Or does everyone else just use emacs for hard-core development in PLT > scheme? > That's what I had always done in the past, but I thought to give the > built-in editor a try, > and I noticed this almost right away. > > All the best, > James Russell > >> In detail: My answer has no relation to the specific details of your >> inquiry >> concerning for* >> >> -- Matthias >> >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From j.russell at alum.mit.edu Thu Jun 19 10:38:14 2008 From: j.russell at alum.mit.edu (James Russell) Date: Thu Mar 26 02:20:43 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806182149r295d5b79had39330bce5b787f@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <58925be00806182048j53e320f5o4cf24bc5ad3bac9a@mail.gmail.com> <58925be00806182149r295d5b79had39330bce5b787f@mail.gmail.com> Message-ID: <58925be00806190738m3ccd990s70f70e64d09f409b@mail.gmail.com> On Thu, Jun 19, 2008 at 12:49 AM, James Russell wrote: > > In the manual, for/fold looks roughly like > > (for/fold (foo...) > (bar...) > body > body > ...) > In an off-list email a correspondent has justly chided me for being lazy here, and making it look like perhaps I'm using for/fold incorrectly. 'foo' and 'bar' are not, in fact, meant to be bindings themselves, but (foo...) is meant to stand for the whole list of accumulator bindings, and (bar...) for the whole list of sequence bindings. Sorry for any confusion, James Russell From doolagarl2002 at yahoo.com.au Thu Jun 19 11:37:23 2008 From: doolagarl2002 at yahoo.com.au (Scott Brown) Date: Thu Mar 26 02:20:43 2009 Subject: [plt-scheme] plt-scheme 4.0 error - set!: cannot modify a constant: Message-ID: <281839.47736.qm@web56404.mail.re3.yahoo.com> In earlier versions of plt-scheme I could trace functions like this: (require (lib "trace.ss")) (trace foo) But in plt-scheme 4.0 this gives an error: set!: cannot modify a constant: foo How can I fix this? Get the name you always wanted with the new y7mail email address. www.yahoo7.com.au/mail From samth at ccs.neu.edu Thu Jun 19 12:11:47 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:20:43 2009 Subject: [plt-scheme] Typed Scheme: type of filter ? In-Reply-To: <485A03DA.7070001@gmail.com> References: <485A03DA.7070001@gmail.com> Message-ID: <63bb19ae0806190911i50f51996v9c93b6eb70e20a2c@mail.gmail.com> The type of `filter' in the initial environment was incorrectly given as the simple version. This has now been fixed in SVN. Thanks, sam th On Thu, Jun 19, 2008 at 2:59 AM, Michel Salim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > In the POPL 08 paper, the type of filter is given as > > (All (a b) ((a --b--> Boolean) (listof a) -> (Listof b)) > > which would allow one to do things like > > (map add1 (filter number? '(1 #t 2 #f 3)) > > in fact, Sam gave this example on Lambda the Ultimate > > In the released version of PLT Scheme 4.0, however, this is the type > of filter: > (All (a) (( -> Boolean) (Listof ) -> (Listof ))) > > which means the above failed. As can be verified: > > (filter number? '(1 #t #f)) > - - : (Listof (U Integer #f #t)) > (1) > > The handling of booleans also strikes me as a bit odd. > >> > (define: bools : (Listof Boolean) '(#t #f)) >> > bools > - - : (Listof Boolean) > (#t #f) >> > (define bools2 bools) >> > bools2 > - - : (Listof Boolean) > (#t #f) >> > (define bools3 '(#t #f)) >> > bools3 > - - : (List #t #f) > (#t #f) > > A similar behavior is exhibited for lists of numbers: '(1 1.5 2) : > (List Integer Number Integer), so heterogenous lists are treated just > like tuples in Haskell or ML, but is there any reason #t and #f are > not treated as just instances of Boolean ? > > Thanks, > > - -- > Michel Salim > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkhaA9kACgkQWt0J3fd+7ZDjrwCbBdDegJPsKbpD6P6eYsgq0h81 > 1BMAn2H5+gi5a+4UVnuLEp6AHJ37tL4B > =CTfP > -----END PGP SIGNATURE----- > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- sam th samth@ccs.neu.edu From czhu at cs.utah.edu Thu Jun 19 12:11:32 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:43 2009 Subject: [plt-scheme] plt-scheme 4.0 error - set!: cannot modify a constant: In-Reply-To: <281839.47736.qm@web56404.mail.re3.yahoo.com> References: <281839.47736.qm@web56404.mail.re3.yahoo.com> Message-ID: <485A8534.4000700@cs.utah.edu> I don't think this is about v4. In v3xx, you use the MzScheme langauge (or similar), and do trace in the REPL, which is all fine In v4 now, you are using the module language (#lang scheme, or similar), and still want to do the trace in REPL, which is not allowed. Just move your (require (lib "trace.ss")) (trace foo) lines into the body of the module will solve the problem. Chongkai Scott Brown wrote: > In earlier versions of plt-scheme I could trace functions like this: > > (require (lib "trace.ss")) > (trace foo) > > But in plt-scheme 4.0 this gives an error: > > set!: cannot modify a constant: foo > > How can I fix this? > > > Get the name you always wanted with the new y7mail email address. > www.yahoo7.com.au/mail > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From clements at brinckerhoff.org Thu Jun 19 16:33:11 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:20:44 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> Message-ID: On Jun 19, 2008, at 6:48 AM, James Russell wrote: > > Or does everyone else just use emacs for hard-core development in > PLT scheme? Nope, not I. It has long been the goal of PLT to "eat our own dog food" by doing all PLT Scheme in DrScheme, and I think that approximately all of the most energetic developers follow this rule. John Clements ` -------------- 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/20080619/2c6eef17/smime.bin From filcab at gmail.com Thu Jun 19 16:46:09 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:20:44 2009 Subject: [plt-scheme] plt-scheme 4.0 error - set!: cannot modify a constant: In-Reply-To: <281839.47736.qm@web56404.mail.re3.yahoo.com> References: <281839.47736.qm@web56404.mail.re3.yahoo.com> Message-ID: On 19 Jun, 2008, at 16:37, Scott Brown wrote: > In earlier versions of plt-scheme I could trace functions like this: > > (require (lib "trace.ss")) > (trace foo) > > But in plt-scheme 4.0 this gives an error: > > set!: cannot modify a constant: foo > > How can I fix this? > Are you trying to trace a required function? I think you can't change identifiers that were required. Could we know what function are you tracing and how you get that binding? - Filipe Cabecinhas From dyrueta at gmail.com Thu Jun 19 23:49:12 2008 From: dyrueta at gmail.com (dave yrueta) Date: Thu Mar 26 02:20:44 2009 Subject: [plt-scheme] HtDP 18.1.13 Help Requested Message-ID: <61b89c9c-a394-43ab-af67-60ad87b67fe7@q27g2000prf.googlegroups.com> 18.1.13 Before hitting this problem, I was able to successfully apply the ?backtracking? technique to solve earlier HtDP exercises such as 14.2.2, 15.3.4, 16.3.4. and 18.1.12. However, the ?Pragmatics? discussion leading up to exercise 18.1.13 left me utterly dazed and confused. As a result, I have very little sense of how to ?backtrack? using local expressions. My best guess is just a start?. (define(to-blue-eyed-ancestor a-ftn) (cond [(symbol=? ?blue (child-ec a-ftn)) empty] [(and(empty? (child-m a-ftn))(empty? (child-f a-ftn))) false] [else?])) Again, I have no idea how a local expression would fit into a solution. Any and all help is appreciated. Thanks, Dave Yrueta From andrew-scheme at areilly.bpc-users.org Thu Jun 19 20:15:51 2008 From: andrew-scheme at areilly.bpc-users.org (Andrew Reilly) Date: Thu Mar 26 02:20:44 2009 Subject: [plt-scheme] Compiling 4.0 In-Reply-To: <11b141710806190338g676a75c5mac0185f32b2fd82b@mail.gmail.com> References: <11b141710806190338g676a75c5mac0185f32b2fd82b@mail.gmail.com> Message-ID: <20080620001551.GA17980@duncan.reilly.home> On Thu, Jun 19, 2008 at 11:38:26AM +0100, Paulo J. Matos wrote: > I am compiling 4.0 in Gentoo Linux and I got this: > make[4]: Entering directory `/home/pmatos/plt-4.0/src/mred/gc2' > ../../mzscheme/mzscheme3m -cqu "./gen-deps.ss" > procedure application: expected procedure, given: #; > arguments were: (quote #%utils) #f #f #t > for-each: expects type as 1st argument, given: > #; other arguments were: () > make[4]: *** [gen-deps] Error 1 I'm afraid that I havent' seen this particular problem before, but... > I just configured it with: > ./configure --prefix=/usr/local/plt/plt-4.0 It's been my recent experience that some parts of the tree are badly behaved if configured at top level. Things work nicely if you build in a sub-tree, instead: cd src mkdir build cd build ../configure ...(configure args) gmake Might or might not help that particular problem, but it appears to be necessary on FreeBSD, particularly something in the FFI code. Cheers, Andrew From d.j.gurnell at gmail.com Fri Jun 20 04:28:08 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:20:45 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> Message-ID: Dear all, I work regular office hours developing commercial software using DrScheme. I find the indentation engine to be mostly fine. There are a couple of mildly annoying cases that I've noticed, which I've mentioned at the bottom of this email in case anyone is thinking of tackling the issue. However, I don't consider these issues to be show- stoppers by any means. There are some features which I would like to see in DrScheme (in roughly this order): - add regular expression search and replace; - make pressing TAB in the "find" or "replace" boxes move you to the next box (rather than inserting a tab character); - make the tab list scroll or compress or show all the tabs when you have more tabs than the width of the window (or add a vertical tab list feature that can list more stuff); - make every entry on the "indenting" preference pane a regular expression (make it easier to add rules); (or maybe allow the definition of extra indentation rules in PLaneT packages). I'd be happy to help out implementing some of these where I'm able. I tried the regular expression search and replace a while back but I didn't get very far (I may try again in the future). I personally have never been able to make Emacs more of a help rather than a hinderance (goodbye, programmer street cred), so I am very glad DrScheme exists and is such a viable editor for "real" programmers as well as being a teaching tool. Cheers, -- Dave ----- for/fold ----- (for/fold ([accum null]) ([i (in-range 1 10)]) (cons i accum)) should probably be: (for/fold ([accum null]) ([i (in-range 1 10)]) (cons i accum)) ----- ->* with long lists of keyword arguments ----- (provide/contract [some-procedure (->* () (#:key1 integer? #:key2 integer? #:key3 integer?) integer?)]) instead of: (provide/contract [some-procedure (->* () (#:key1 integer? #:key2 integer? #:key3 integer?) integer?)]) ----- quasiquote when producing HTML output ----- `("Hi, my name is " ,name "and I am " ,age "years old.") would be better as: `("Hi, my name is " ,name "and I am " ,age "years old.") -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080620/b73cb2df/attachment.htm From noelwelsh at gmail.com Fri Jun 20 05:21:16 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:45 2009 Subject: [plt-scheme] Strange issue in getting DivaScheme prepared for 4.0: compilation time and memory is huge! In-Reply-To: References: Message-ID: It might be the documentation compilation. N. On Thu, Jun 19, 2008 at 4:38 AM, Danny Yoo wrote: ... > If I instead keep the 128MB memory ceiling, compilation will fail > because it hits the memory ceiling. (And what's also surprising to me > is how darn long it takes to compile.) This is violating my > expectations on how expensive compilation is! Does anyone know what's > going on? From matthias at ccs.neu.edu Fri Jun 20 07:29:07 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:45 2009 Subject: [plt-scheme] HtDP 18.1.13 Help Requested In-Reply-To: <61b89c9c-a394-43ab-af67-60ad87b67fe7@q27g2000prf.googlegroups.com> References: <61b89c9c-a394-43ab-af67-60ad87b67fe7@q27g2000prf.googlegroups.com> Message-ID: Use the design recipe Dave! -- Matthias On Jun 19, 2008, at 11:49 PM, dave yrueta wrote: > 18.1.13 > > Before hitting this problem, I was able to successfully apply the > ?backtracking? technique to solve earlier HtDP exercises such as > 14.2.2, 15.3.4, 16.3.4. and 18.1.12. However, the ?Pragmatics? > discussion leading up to exercise 18.1.13 left me utterly dazed and > confused. As a result, I have very little sense of how to ?backtrack? > using local expressions. > > My best guess is just a start?. > > (define(to-blue-eyed-ancestor a-ftn) > (cond > [(symbol=? ?blue (child-ec a-ftn)) empty] > [(and(empty? (child-m a-ftn))(empty? (child-f a-ftn))) false] > [else?])) > > Again, I have no idea how a local expression would fit into a > solution. Any and all help is appreciated. > > Thanks, > Dave Yrueta > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From nymbyl at gmail.com Wed Jun 18 15:54:48 2008 From: nymbyl at gmail.com (nymbyl@gmail.com) Date: Thu Mar 26 02:20:45 2009 Subject: [plt-scheme] Internal PLaneT error: trying to install already-installed package Message-ID: <5794ce46-5cfa-44e2-ab71-14ff7b4a2c7e@z72g2000hsb.googlegroups.com> I'm trying to use the new DrScheme 4.0 installing the pgsql schematics Planet package (require (planet "spgsql.ss" ("schematics" "spgsql.plt" 2 3))) gives me the following error: Internal PLaneT error: trying to install already-installed package and will not run any code after that. I was curious if anyone else has encountered this error? I tried it both on Windows XP and Mac OS X 10.5.2. If I comment out the check that throws the error in "collects/planet/resolver.ss" it just returns a void package - even though I can see all the files there in ~/PLT Scheme/planet/300/packages and ~/PLT Scheme/planet/ 300/4.0/cache. Does anybody have any ideas why this would be happening? From hendrik at topoi.pooq.com Fri Jun 20 08:46:32 2008 From: hendrik at topoi.pooq.com (hendrik@topoi.pooq.com) Date: Thu Mar 26 02:20:45 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> Message-ID: <20080620124632.GA18924@topoi.pooq.com> On Fri, Jun 20, 2008 at 09:28:08AM +0100, Dave Gurnell wrote: > Dear all, > > There are some features which I would like to see in DrScheme (in > roughly this order): > > - add regular expression search and replace; > - make pressing TAB in the "find" or "replace" boxes move you to > the next box (rather than inserting a tab character); > - make the tab list scroll or compress or show all the tabs when > you have more tabs than the width of the window > (or add a vertical tab list feature that can list more stuff); > - make every entry on the "indenting" preference pane a regular > expression (make it easier to add rules); > (or maybe allow the definition of extra indentation rules in > PLaneT packages). I've always thought that emacs should have been built on Scheme instead of an erzatz Lisp (without even proper function closures, as far as I know). Maybe we shoud start an emacs port? -- hendrik From cce at ccs.neu.edu Fri Jun 20 08:51:31 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:20:45 2009 Subject: [plt-scheme] Internal PLaneT error: trying to install already-installed package In-Reply-To: <5794ce46-5cfa-44e2-ab71-14ff7b4a2c7e@z72g2000hsb.googlegroups.com> References: <5794ce46-5cfa-44e2-ab71-14ff7b4a2c7e@z72g2000hsb.googlegroups.com> Message-ID: <990e0c030806200551y4221863hbcc47dbb51d2bb26@mail.gmail.com> This is a known bug that has been fixed in our sources. We plan to release the fix soon. Sorry for the inconvenience. --Carl On Wed, Jun 18, 2008 at 3:54 PM, nymbyl@gmail.com wrote: > I'm trying to use the new DrScheme 4.0 installing the pgsql schematics > Planet package > > (require (planet "spgsql.ss" ("schematics" "spgsql.plt" 2 3))) > > gives me the following error: > > Internal PLaneT error: trying to install already-installed package > > and will not run any code after that. > > I was curious if anyone else has encountered this error? > > I tried it both on Windows XP and Mac OS X 10.5.2. If I comment out > the check that throws the error in "collects/planet/resolver.ss" it > just returns a void package - even though I can see all the files > there in ~/PLT Scheme/planet/300/packages and ~/PLT Scheme/planet/ > 300/4.0/cache. > > Does anybody have any ideas why this would be happening? From doolagarl2002 at yahoo.com.au Fri Jun 20 09:19:28 2008 From: doolagarl2002 at yahoo.com.au (Scott Brown) Date: Thu Mar 26 02:20:46 2009 Subject: [plt-scheme] plt-scheme 4.0 error - set!: cannot modify a constant: In-Reply-To: <485A8534.4000700@cs.utah.edu> Message-ID: <391062.992.qm@web56406.mail.re3.yahoo.com> That worked, thank you. --- On Fri, 20/6/08, Chongkai Zhu wrote: > From: Chongkai Zhu > Subject: Re: [plt-scheme] plt-scheme 4.0 error - set!: cannot modify a constant: > To: doolagarl2002@yahoo.com.au > Cc: plt-scheme@list.cs.brown.edu > Received: Friday, 20 June, 2008, 2:11 AM > I don't think this is about v4. > > In v3xx, you use the MzScheme langauge (or similar), and do > trace in the > REPL, which is all fine > > In v4 now, you are using the module language (#lang scheme, > or similar), > and still want to do the trace in REPL, which is not > allowed. > > Just move your > > (require (lib "trace.ss")) > (trace foo) > > lines into the body of the module will solve the problem. > > Chongkai > > > Scott Brown wrote: > > In earlier versions of plt-scheme I could trace > functions like this: > > > > (require (lib "trace.ss")) > > (trace foo) > > > > But in plt-scheme 4.0 this gives an error: > > > > set!: cannot modify a constant: foo > > > > How can I fix this? > > > > > > Get the name you always wanted with the new > y7mail email address. > > www.yahoo7.com.au/mail > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > Get the name you always wanted with the new y7mail email address. www.yahoo7.com.au/mail From robby at cs.uchicago.edu Fri Jun 20 09:27:42 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:46 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> Message-ID: <932b2f1f0806200627r73bd7d63qedb38fb63364f37a@mail.gmail.com> On Fri, Jun 20, 2008 at 3:28 AM, Dave Gurnell wrote: > - make pressing TAB in the "find" or "replace" boxes move you to the next > box (rather than inserting a tab character); This one was easy to fix, so I've just checked that in to SVN. Robby From eli at barzilay.org Fri Jun 20 09:30:30 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:46 2009 Subject: [plt-scheme] Compiling 4.0 In-Reply-To: <20080620001551.GA17980@duncan.reilly.home> References: <11b141710806190338g676a75c5mac0185f32b2fd82b@mail.gmail.com> <20080620001551.GA17980@duncan.reilly.home> Message-ID: <18523.45302.926703.575168@arabic.ccs.neu.edu> On Jun 20, Andrew Reilly wrote: > On Thu, Jun 19, 2008 at 11:38:26AM +0100, Paulo J. Matos wrote: > > I am compiling 4.0 in Gentoo Linux and I got this: > > make[4]: Entering directory `/home/pmatos/plt-4.0/src/mred/gc2' > > ../../mzscheme/mzscheme3m -cqu "./gen-deps.ss" > > procedure application: expected procedure, given: #; > > arguments were: (quote #%utils) #f #f #t > > for-each: expects type as 1st argument, given: > > #; other arguments were: () > > make[4]: *** [gen-deps] Error 1 > > I'm afraid that I havent' seen this particular problem before, > but... > > > I just configured it with: > > ./configure --prefix=/usr/local/plt/plt-4.0 > > It's been my recent experience that some parts of the tree are badly > behaved if configured at top level. Things work nicely if you build > in a sub-tree, instead: > > cd src > mkdir build > cd build > ../configure ...(configure args) > gmake That's generally a good idea, but the above is more likely a problem with -O2 and a newer GCC. > Might or might not help that particular problem, but it appears > to be necessary on FreeBSD, particularly something in the FFI > code. (Yes, the FFI auto-whatever scripts are especially problematic with in-source builds.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From czhu at cs.utah.edu Fri Jun 20 10:39:18 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:46 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <20080620124632.GA18924@topoi.pooq.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> <20080620124632.GA18924@topoi.pooq.com> Message-ID: <485BC116.2080609@cs.utah.edu> +1 hendrik@topoi.pooq.com wrote: > I've always thought that emacs should have been built on Scheme instead > of an erzatz Lisp (without even proper function closures, as far as I > know). Maybe we shoud start an emacs port? > > -- hendrik > > From phnglui at gmail.com Fri Jun 20 11:04:31 2008 From: phnglui at gmail.com (James Russell) Date: Thu Mar 26 02:20:46 2009 Subject: [plt-scheme] Re: Inadequate indentation facility in MrEd/DrScheme References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> <20080620124632.GA18924@topoi.pooq.com> <485BC116.2080609@cs.utah.edu> Message-ID: (Sorry if this is a dupe) Chongkai Zhu writes: > > +1 > > hendrik@... wrote: > > I've always thought that emacs should have been built on Scheme instead > > of an erzatz Lisp (without even proper function closures, as far as I > > know). Maybe we shoud start an emacs port? > > > > -- hendrik > > > > An obvious place to start would be edwin, the emacs-y editor built in to MIT Scheme. It is written almost entirely in scheme. It also already has many moons of development behind it. -James Russell > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From matthias at ccs.neu.edu Fri Jun 20 11:30:38 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:47 2009 Subject: [plt-scheme] Re: Inadequate indentation facility in MrEd/DrScheme In-Reply-To: References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> <20080620124632.GA18924@topoi.pooq.com> <485BC116.2080609@cs.utah.edu> Message-ID: Olin Shivers is working on getting Edwin integrated into S'48. -- Matthias On Jun 20, 2008, at 11:04 AM, James Russell wrote: > (Sorry if this is a dupe) > > Chongkai Zhu writes: > >> >> +1 >> >> hendrik@... wrote: >>> I've always thought that emacs should have been built on Scheme >>> instead >>> of an erzatz Lisp (without even proper function closures, as far >>> as I >>> know). Maybe we shoud start an emacs port? >>> >>> -- hendrik >>> >>> > > An obvious place to start would be edwin, the emacs-y editor > built in to MIT Scheme. It is written almost entirely in scheme. > > It also already has many moons of development behind it. > > -James 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 d.j.gurnell at gmail.com Fri Jun 20 11:45:37 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:20:47 2009 Subject: [plt-scheme] Inadequate indentation facility in MrEd/DrScheme In-Reply-To: <932b2f1f0806200627r73bd7d63qedb38fb63364f37a@mail.gmail.com> References: <58925be00806181958i599e9f8ch8e25132f8723dcfa@mail.gmail.com> <810C921E-3C87-4042-9711-A8B41FA4D154@ccs.neu.edu> <58925be00806190648y96032ddp210b2da32a6b903c@mail.gmail.com> <932b2f1f0806200627r73bd7d63qedb38fb63364f37a@mail.gmail.com> Message-ID: >> >> - make pressing TAB in the "find" or "replace" boxes move you to >> the next >> box (rather than inserting a tab character); > > This one was easy to fix, so I've just checked that in to SVN. > > Robby Thanks very much for this. It's a small but significant tweak. -- Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080620/78ec2d89/attachment.html From billclem at gmail.com Fri Jun 20 13:06:28 2008 From: billclem at gmail.com (Bill Clementson) Date: Thu Mar 26 02:20:47 2009 Subject: [plt-scheme] Re: Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme for Game Development In-Reply-To: <8757cb490806061102y31e32d54qdaa78a1e84b1b076@mail.gmail.com> References: <8757cb490806061102y31e32d54qdaa78a1e84b1b076@mail.gmail.com> Message-ID: <8757cb490806201006t77ebeb4ydf27e6728f86da9d@mail.gmail.com> Hi all, Thanks to Dean for an interesting lispvan presentation last night. I've uploaded a screencast of the meeting on my blog: http://bc.tech.coop/blog/080620.html -- Bill Clementson On Fri, Jun 6, 2008 at 11:02 AM, Bill Clementson wrote: > Hi all, > > Vancouver is often called "Hollywood North" because so many movies are > filmed in the city. However, what may not be as well known is that > Vancouver is also a hot location for another type of entertainment > industry: Computer Games! With companies like Electronic Arts and > Slant Six Games located in Vancouver, the city is a real hotbed for > computer game development. I've written in the past about using Lisp > for game development (see here - my write-up actually got referenced > in Wikipedia, so it must be authoritative! ;-) ). Well, this month, > we'll be hearing about using Lisp for game development from someone > who is in a position to really know what he's talking about. Dean > Giberson is currently a Senior Software Engineer at Slant Six Games > and previously worked at EA. Here's a short bio: > > Dean Giberson was a tool developer for 4 years working on several Star > Wars game titles. After a short period teaching and contracting he > returned to professional game development working on Sports titles for > 3 years. He is currently employed at Slant Six Games working on > "SOCOM: Confrontation" developing the next generation of workflow > tools. > Although we were hoping to be moving to a new location (with a > projector and a special meeting room!) for this month's meeting, the > new location is still under construction. Therefore, we will be > meeting again this month at Calhoun's Coffee House and Restaurant > There won't be a projector, so we'll have to VNC a couple of laptops > so that we aren't all crowded around one laptop. We've done that in > the past, so this shouldn't be a problem (so long as some people > remember to bring laptops! ;-) ). > > Here's the "official" meeting notice: > > Topic: Using PLT Scheme for Game Development > Presenter: Dean Giberson > Date: Thursday, June 19, 2008 > Time: 7pm - 10pm (or whenever) > Venue: Calhoun's, 3035 West Broadway, Vancouver (see map) > Summary: Inspired by tools such as DabbleDb, Fluxus, Alice or > Processing and driven by the problems of programming in the large Dean > will explore the use of PLT Scheme in game development. > > Solutions to distributed development, complex tools, and dynamic > languages are explored with current solutions explained. > > Concepts explored: > Live coding > Web interface for development > Connecting external tools > Version control > Searching > Join us for a beer/coffee and a chance to see/discuss how Lisp can be > used for game development. > > Any updates and links will be on my blog entry for the meeting: > http://bc.tech.coop/blog/080606.html > > If possible, I will do a screencast of the presentation and link to it > in a subsequent blog post. > > -- > Bill Clementson > From nymbyl at gmail.com Fri Jun 20 14:14:15 2008 From: nymbyl at gmail.com (nymbyl@gmail.com) Date: Thu Mar 26 02:20:48 2009 Subject: [plt-scheme] Re: Internal PLaneT error: trying to install already-installed package In-Reply-To: <990e0c030806200551y4221863hbcc47dbb51d2bb26@mail.gmail.com> References: <5794ce46-5cfa-44e2-ab71-14ff7b4a2c7e@z72g2000hsb.googlegroups.com> <990e0c030806200551y4221863hbcc47dbb51d2bb26@mail.gmail.com> Message-ID: <2a057411-4d00-474c-95de-f402b4f70e91@f63g2000hsf.googlegroups.com> No problem. It looks like there is a patch slated for the 4.01 release. Otherwise great work on getting 4.0 out the door! On Jun 20, 7:51 am, "Carl Eastlund" wrote: > This is a known bug that has been fixed in our sources. We plan to > release the fix soon. Sorry for the inconvenience. > > --Carl > > > > On Wed, Jun 18, 2008 at 3:54 PM, nym...@gmail.com wrote: > > I'm trying to use the new DrScheme 4.0 installing the pgsql schematics > > Planet package > > > (require (planet "spgsql.ss" ("schematics" "spgsql.plt" 2 3))) > > > gives me the following error: > > > Internal PLaneT error: trying to install already-installed package > > > and will not run any code after that. > > > I was curious if anyone else has encountered this error? > > > I tried it both on Windows XP and Mac OS X 10.5.2. If I comment out > > the check that throws the error in "collects/planet/resolver.ss" it > > just returns a void package - even though I can see all the files > > there in ~/PLT Scheme/planet/300/packages and ~/PLT Scheme/planet/ > > 300/4.0/cache. > > > Does anybody have any ideas why this would be happening? > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From jpc-ml at zenburn.net Fri Jun 20 16:21:54 2008 From: jpc-ml at zenburn.net (=?UTF-8?B?SmFrdWIgUGlvdHIgQ8WCYXBh?=) Date: Thu Mar 26 02:20:48 2009 Subject: [plt-scheme] plt web server question In-Reply-To: <484F3E32.7040007@cs.utah.edu> References: <484E0154.1010107@cs.utah.edu> <484E9A68.6030406@cs.utah.edu> <484F040C.5010802@cs.utah.edu> <484F3167.8060301@ccs.neu.edu> <484F3E32.7040007@cs.utah.edu> Message-ID: <485C1162.7080605@zenburn.net> Chongkai Zhu wrote: > The print textarea is locked because obviously user is not allowed to > edit it. This cause the problem that user can't scroll it down either, > and I don't know how to control that in Javascript. I search online but > failed to find any useful information. One thing you can try is to > unlock the textarea, maybe just before new data is written to the > textarea, and lock it afterwards. Maybe try to put the output in normal HTML divs? They can be styled this way and an iframe will solve the problem with scrolling. -- regards, Jakub Piotr C?apa From jay.mccarthy at gmail.com Fri Jun 20 16:41:24 2008 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Thu Mar 26 02:20:48 2009 Subject: [plt-scheme] Stand-alone Scribble Message-ID: I'm trying to use Scribble to write something. The `scribble' command-line tool has no documentation. I can't seem to get `setup-plt' to allow me to give a collection path (".") on the command-line. Is there something I'm missing? Jay -- Jay McCarthy http://jay.teammccarthy.org From yinso.chen at gmail.com Fri Jun 20 18:53:51 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:49 2009 Subject: [plt-scheme] gensym & comparison Message-ID: <779bf2730806201553r49072f6bx59b5df55a19087e6@mail.gmail.com> Hi - Is there a way to compare gensym symbols with a manually created symbol, short of converting them to strings? It's okay if not - just want to know the reason that they cannot be compared? > (define sym (gensym)) > sym g30043 > (equal? sym 'g30043) #f > (equal? 'g30043 'g30043) #t Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080620/b080aed6/attachment.htm From filcab at gmail.com Fri Jun 20 18:58:10 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:20:49 2009 Subject: [plt-scheme] gensym & comparison In-Reply-To: <779bf2730806201553r49072f6bx59b5df55a19087e6@mail.gmail.com> References: <779bf2730806201553r49072f6bx59b5df55a19087e6@mail.gmail.com> Message-ID: On 20 Jun, 2008, at 23:53, YC wrote: > Hi - > > Is there a way to compare gensym symbols with a manually created > symbol, short of converting them to strings? It's okay if not - > just want to know the reason that they cannot be compared? > > > (define sym (gensym)) > > sym > g30043 > > (equal? sym 'g30043) > #f > > (equal? 'g30043 'g30043) > #t > The purpose of gensym is to create an uninterned symbol, that no one can produce again. Normally a symbol that is read is interned and everytime a symbol with the same name is read, the same symbol is returned. So that is the desired behaviour. I don't know if there's a way to intern a "gensymmed" symbol, but you could hammer it by creating you own gensym that would use string- >symbol and a counter you had. - Filipe Cabecinhas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080620/a8a9e1ff/attachment.html From czhu at cs.utah.edu Fri Jun 20 18:58:14 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:49 2009 Subject: [plt-scheme] gensym & comparison In-Reply-To: <779bf2730806201553r49072f6bx59b5df55a19087e6@mail.gmail.com> References: <779bf2730806201553r49072f6bx59b5df55a19087e6@mail.gmail.com> Message-ID: <485C3606.1080903@cs.utah.edu> The idea of gensym is to generate symbol that is not eq? to any other symbol. So I don't know what you are asking here. You can always convert symbol->string, and then compare string, but that's something against the reason to have gensym. Chongkai YC wrote: > Hi - > > Is there a way to compare gensym symbols with a manually created > symbol, short of converting them to strings? It's okay if not - just > want to know the reason that they cannot be compared? > > > (define sym (gensym)) > > sym > g30043 > > (equal? sym 'g30043) > #f > > (equal? 'g30043 'g30043) > #t > > Thanks, > yc > From yinso.chen at gmail.com Fri Jun 20 19:10:10 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:20:50 2009 Subject: [plt-scheme] gensym & comparison In-Reply-To: <485C3606.1080903@cs.utah.edu> References: <779bf2730806201553r49072f6bx59b5df55a19087e6@mail.gmail.com> <485C3606.1080903@cs.utah.edu> Message-ID: <779bf2730806201610y162821e5i15264c89d61175bb@mail.gmail.com> On Fri, Jun 20, 2008 at 3:58 PM, Chongkai Zhu wrote: > The idea of gensym is to generate symbol that is not eq? to any other > symbol. So I don't know what you are asking here. You can always convert > symbol->string, and then compare string, but that's something against the > reason to have gensym. > > Chongkai Thanks Filipe and Chongkai for the clarification - I missed the word "uninterned". I currently use gensym as a hack for keys in a hashtable, hence my need to compare. But as Filipe says there are other solutions, and I'll look elsewhere. Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080620/c110b593/attachment.htm From dyoo at cs.wpi.edu Sat Jun 21 00:15:41 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:50 2009 Subject: [plt-scheme] Weird selection behavior with editor snips Message-ID: I have the following test code: ;;; #lang scheme/gui (require framework) (define editor-snip (new editor-snip% [editor (new scheme:text%)])) (send (send editor-snip get-editor) insert "hello") (define frame (new frame% [label ""])) (define canvas (new editor-canvas% [parent frame] [editor (new text%)])) (send (send canvas get-editor) insert editor-snip) (send (send canvas get-editor) insert "world") (send frame show #t) ;;; If I double click the content of the editor snip, it selects everything in that snip, which is good. However, if I then click to "world", then the selection highlight persists on the editor snip, even though it doesn't have focus anymore. Is there a workaround for this? From robby at cs.uchicago.edu Sat Jun 21 01:05:16 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:50 2009 Subject: [plt-scheme] Syntax in teachpack doesn't work. In-Reply-To: <11b141710806190642m4fb7dcdq39e951daca699b40@mail.gmail.com> References: <11b141710806190642m4fb7dcdq39e951daca699b40@mail.gmail.com> Message-ID: <932b2f1f0806202205o67b82dbel3b720197f0c4da2e@mail.gmail.com> I was able to use that teachpack successfully under v372 (and in the soon-to-be-released version). This is what I see, for example: Welcome to DrScheme, version 372 [3m]. Language: Advanced Student custom; memory limit: 128 megabytes. Teachpack: iteration.ss. > repeat repeat: bad syntax > (repeat 2 (printf "hi\n")) hi hi > On Thu, Jun 19, 2008 at 8:42 AM, Paulo J. Matos wrote: > Hello, I am trying to create a simple syntax teachpack and I have: > (module iteration mzscheme > > ;; Simplified do > (define-syntax for > (syntax-rules () > ((for (var init cond step) > command ...) > (let loop ((var init)) > (if (not cond) > (void) > (begin > command > ... > (loop step))))))) > > ;; Simplified^2 do > (define-syntax repeat > (syntax-rules () > ((repeat num command ...) > (for (x 0 (< x num) (+ x 1)) > command ...)))) > > (provide > (all-defined))) > > Then I do add the teachpack and load it but when I try to use repeat: > repeat: name is not defined, not a parameter, and not a primitive name > > I am surely missing something but don't know what (this is still version 372). > > Cheers, > -- > Paulo Jorge Matos - pocm at soton.ac.uk > http://www.personal.soton.ac.uk/pocm > PhD Student @ ECS > University of Southampton, UK > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From etanter at dcc.uchile.cl Sat Jun 21 01:42:13 2008 From: etanter at dcc.uchile.cl (Eric Tanter) Date: Thu Mar 26 02:20:50 2009 Subject: [plt-scheme] Syntax in teachpack doesn't work. In-Reply-To: <932b2f1f0806202205o67b82dbel3b720197f0c4da2e@mail.gmail.com> References: <11b141710806190642m4fb7dcdq39e951daca699b40@mail.gmail.com> <932b2f1f0806202205o67b82dbel3b720197f0c4da2e@mail.gmail.com> Message-ID: <1CA7926B-939D-4E69-B2D5-DC4A4323CF17@dcc.uchile.cl> I tried to use that teachpack and ran into similar problems as Paulo. The issue is not in the definition of the module, which as Robby points out is correct, but seems to appear when one modifies the definition of the teachpack, and accidentally saves the modified module using the advanced student (custom) language, rather than the module language. Just make sure you're in the good language when editing/saving the teachpack, and it should work nicely. Hope this helps, -- ?ric On Jun 21, 2008, at 07:05 , Robby Findler wrote: > I was able to use that teachpack successfully under v372 (and in the > soon-to-be-released version). This is what I see, for example: > > Welcome to DrScheme, version 372 [3m]. > Language: Advanced Student custom; memory limit: 128 megabytes. > Teachpack: iteration.ss. >> repeat > repeat: bad syntax >> (repeat 2 (printf "hi\n")) > hi > hi >> > > On Thu, Jun 19, 2008 at 8:42 AM, Paulo J. Matos > wrote: >> Hello, I am trying to create a simple syntax teachpack and I have: >> (module iteration mzscheme >> >> ;; Simplified do >> (define-syntax for >> (syntax-rules () >> ((for (var init cond step) >> command ...) >> (let loop ((var init)) >> (if (not cond) >> (void) >> (begin >> command >> ... >> (loop step))))))) >> >> ;; Simplified^2 do >> (define-syntax repeat >> (syntax-rules () >> ((repeat num command ...) >> (for (x 0 (< x num) (+ x 1)) >> command ...)))) >> >> (provide >> (all-defined))) >> >> Then I do add the teachpack and load it but when I try to use repeat: >> repeat: name is not defined, not a parameter, and not a primitive >> name >> >> I am surely missing something but don't know what (this is still >> version 372). >> >> Cheers, >> -- >> Paulo Jorge Matos - pocm at soton.ac.uk >> http://www.personal.soton.ac.uk/pocm >> PhD Student @ ECS >> University of Southampton, UK >> _________________________________________________ >> 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 d.j.gurnell at gmail.com Sat Jun 21 03:12:47 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:20:51 2009 Subject: [plt-scheme] plt web server question In-Reply-To: <484EAC5E.3020801@cs.utah.edu> References: <484E0154.1010107@cs.utah.edu> <484E9A68.6030406@cs.utah.edu> <484EAC5E.3020801@cs.utah.edu> Message-ID: > ...and then at lease the page looks correct in Firefox, as the HTML > code is > > FWIW, Mirrors.plt will take care of this kind of thing for you. -- Dave From dyoo at cs.wpi.edu Sat Jun 21 16:28:21 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:51 2009 Subject: [plt-scheme] Weird selection behavior with editor snips In-Reply-To: <485D5808.5030206@zenburn.net> References: <485D5808.5030206@zenburn.net> Message-ID: On Sat, Jun 21, 2008 at 3:35 PM, Jakub Piotr C?apa wrote: > Danny Yoo wrote: >> >> If I double click the content of the editor snip, it selects >> everything in that snip, which is good. However, if I then click to >> "world", then the selection highlight persists on the editor snip, >> even though it doesn't have focus anymore. >> >> Is there a workaround for this? > > I cannot reproduce this on v4.0 on OS X. Ok, so maybe this isn't such a problem: I see it only on my Linux box. I wonder if it's possible to set x selection mode locally... Thanks again everyone! From jay.mccarthy at gmail.com Sat Jun 21 17:37:57 2008 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Thu Mar 26 02:20:51 2009 Subject: [plt-scheme] Stand-alone Scribble In-Reply-To: References: Message-ID: The main problem I am having is that it appears to only way to get "multi-page" behaviour is to put it in the info.ss file. Since the scribble command-line doesn't use that, I don't seem to be able to do it. Jay > On Sat, Jun 21, 2008 at 3:15 AM, Noel Welsh wrote: >> I run >> >> scribble --html file.scrbl >> >> to use Scribble for standalone docs (and also to see how my docs >> render w/o running setup-plt). Now this isn't answering the question >> you asked, but perhaps it is useful anyway. >> >> N. >> > > > > -- > Jay McCarthy > http://jay.teammccarthy.org > -- Jay McCarthy http://jay.teammccarthy.org From matthias at ccs.neu.edu Sat Jun 21 17:42:42 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:51 2009 Subject: [plt-scheme] Stand-alone Scribble In-Reply-To: References: Message-ID: <573AB3F1-28D5-4383-8AF0-FBA49742D7D1@ccs.neu.edu> --htmls vs --html On Jun 21, 2008, at 5:37 PM, Jay McCarthy wrote: > The main problem I am having is that it appears to only way to get > "multi-page" behaviour is to put it in the info.ss file. Since the > scribble command-line doesn't use that, I don't seem to be able to do > it. > > Jay > >> On Sat, Jun 21, 2008 at 3:15 AM, Noel Welsh >> wrote: >>> I run >>> >>> scribble --html file.scrbl >>> >>> to use Scribble for standalone docs (and also to see how my docs >>> render w/o running setup-plt). Now this isn't answering the >>> question >>> you asked, but perhaps it is useful anyway. >>> >>> N. >>> >> >> >> >> -- >> Jay McCarthy >> http://jay.teammccarthy.org >> > > > > -- > Jay McCarthy > http://jay.teammccarthy.org > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From dyoo at cs.wpi.edu Sat Jun 21 19:57:18 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:51 2009 Subject: [plt-scheme] Can compile-omit-paths return an error message if a path is given that isn't "immediate"? Message-ID: The compile-omit-paths variable in info.ss files is a little subtle: I didn't realize before that it only filters out immediate subdirectories, and not any nested subdirectories. If I have directory structure like: project/ project/info.ss project/helper-module project/helper-module/test then to keep setup-plt from touching anything in project/helper-module/test, it appears ineffective to try putting (define compile-omit-paths '("helper-module/test")) in project/info.ss. Rather, I've had to create a separate project/helper-module/info.ss file with the content (define compile-omit-paths '("test")) Is this a correct understanding of the meaning of compile-omit-paths? If so, can we include this example in the documentation? This came up a lot for my own projects, and I couldn't figure out what was going wrong until recently. Also, it seems like info's checking of compile-omit-paths should point out an error if there's a nested sub path in compile-omit-paths, since that usage is erroneous. From dyoo at cs.wpi.edu Sun Jun 22 00:58:24 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:51 2009 Subject: [plt-scheme] Strange issue in getting DivaScheme prepared for 4.0: compilation time and memory is huge! In-Reply-To: References: Message-ID: On Fri, Jun 20, 2008 at 5:21 AM, Noel Welsh wrote: > It might be the documentation compilation. Possibly; I still don't know what's quite happening. Here's how long things take at the command line: ################################ dyoo@mithril:~/work/bootstrap$ planet remove divascheme divascheme.plt 1 4 dyoo@mithril:~/work/bootstrap$ planet remove dyoo rope.plt 3 2 dyoo@mithril:~/work/bootstrap$ planet remove dyoo join-forest.plt 1 2 [just to get things in a fairly clean state] dyoo@mithril:~/work/bootstrap$ time planet install divascheme divascheme.plt 1 4 real 0m12.619s ################################ Basically, it takes about 12 seconds on the command line. Under raw mred, I see similar installation times: ########################################################## Welcome to MrEd v4.0.1 [3m]. Copyright (c) 2004-2008 PLT Scheme Inc. This is a simple window for evaluating MrEd Scheme expressions. Quit now and run DrScheme to get a better window. The current input port always returns eof. > (time (dynamic-require '(planet "install.ss" ("divascheme" "divascheme.plt" 1 4)) #f)) DivaScheme should now be installed. To finish the installation, please restart DrScheme. Once restarted, F4 will toggle DivaScheme on and off. If you wish to install the launcher for generate-stags, see Help Desk on 'generate-stags' for details. cpu time: 10276 real time: 12311 gc time: 2400 ########################################################## About ten seconds. But when I do this on a clean install on DrScheme, I can't even install it properly without bumping the memory ceiling to 256MB, and it seems to take a much longer time getting there. If the ceiling is left at the default (128 MB), compilation actually fails. What's worse at this point is that the PLaneT cache is left in a bad state, where it thinks things are installed, but the DivaScheme tool hasn't been installed through setup-plt, and that's bad. This is concerning to me just because it complicates installation instructions... :( Here's what I see when I try it through DrScheme with no memory ceiling (and with the three packages divascheme rope and join-forest removed from the PLaneT cache.) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; in the definitions window #lang scheme/base (time (dynamic-require '(planet "install.ss" ("divascheme" "divascheme.plt" 1 4)) #f)) ;; in the interactions window Welcome to DrScheme, version 4.0.1-svn20jun2008 [3m]. Language: Module. DivaScheme should now be installed. To finish the installation, please restart DrScheme. Once restarted, F4 will toggle DivaScheme on and off. If you wish to install the launcher for generate-stags, see Help Desk on 'generate-stags' for details. cpu time: 95730 real time: 101784 gc time: 16993 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; It takes significantly more time (about 1.5 minutes) in compilation, and that's is bothering me: the cost of running under DrScheme seems much higher than I expected. From chenyu_kang at yahoo.com.cn Sun Jun 22 03:34:37 2008 From: chenyu_kang at yahoo.com.cn (Chen Yukang) Date: Thu Mar 26 02:20:52 2009 Subject: [plt-scheme] debug scheme in Emacs Message-ID: <372662.87765.qm@web15901.mail.cnb.yahoo.com> hello All: I Run Scheme as an inferior process under gnu-emacs . It seems no Text debugging interface for Scheme in Emacs. So how to debug the program in scheme buffer? THANKS! ___________________________________________________________ ÑÅ»¢ÓÊÏ䣬ÄúµÄÖÕÉúÓÊÏ䣡 http://cn.mail.yahoo.com/ From kbohdan at mail.ru Sun Jun 22 16:00:10 2008 From: kbohdan at mail.ru (kbohdan@mail.ru) Date: Thu Mar 26 02:20:52 2009 Subject: [plt-scheme] r6rs import problem Message-ID: Have problem importing following simple library: #!r6rs (library (internal utils) (export record record-case) (import (rnrs base) (rnrs syntax-case)) (define-syntax record (syntax-rules () ((_ vars val exp ...) (apply (lambda vars exp ...) val))))) Importing top-level program: #!r6rs (import (rnrs) (for (internal utils) expand)) (record (r g b) '(aa bb cc) (b g r)) ; <<< causes ERROR: "expand: unbound variable in module in: record" Any ideas ? Thanks ahead. -- Bohdan From kbohdan at mail.ru Sun Jun 22 16:34:56 2008 From: kbohdan at mail.ru (kbohdan@mail.ru) Date: Thu Mar 26 02:20:52 2009 Subject: [plt-scheme] Re: r6rs import problem In-Reply-To: References: Message-ID: Answering to myself :) : > > #!r6rs > > (import (rnrs) > (for (internal utils) expand)) It was just metter of my misinterpretation of 'expand' modfier. Without it everything is ok. Sorry for buzz. > > (record (r g b) '(aa bb cc) (b g r)) > ; <<< causes ERROR: "expand: unbound variable in module in: record" > > > Any ideas ? > > Thanks ahead. > > -- > Bohdan > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From dyoo at cs.wpi.edu Sun Jun 22 23:06:25 2008 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Thu Mar 26 02:20:52 2009 Subject: [plt-scheme] Is there a direct way to get at an embedded snip's parent editor? Message-ID: Is there an easy way to get at an embedded snip's parent toplevel editor? I cooked up the following code, but I feel a little hesitant and would like some confirmation on this. Thank you for any suggestions! #lang scheme/base (require scheme/gui/base scheme/class) ;; get-top-editor: snip -> (or/c editor #f) ;; Returns the topmost editor of a-snip, or #f if we can't do it. (define (get-top-editor a-snip) (cond [(send a-snip get-admin) (let* ([editor (send (send a-snip get-admin) get-editor)] [editor-admin (send editor get-admin)]) (cond [(is-a? editor-admin editor-snip-editor-admin<%>) (get-top-editor (send editor-admin get-snip))] [else editor]))] [else #f])) ;; test: -> boolean ;; should return true. FIXME: make this an automated test. (define (test) (define e-parent (new text%)) (define e1 (new editor-snip%)) (define e2 (new editor-snip%)) (define e3 (new editor-snip%)) (send e-parent insert e1) (send (send e1 get-editor) insert e2) (send (send e2 get-editor) insert e3) (and (eq? (get-top-editor e3) e-parent) (eq? (get-top-editor e2) e-parent) From robby at cs.uchicago.edu Sun Jun 22 23:10:01 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:20:52 2009 Subject: [plt-scheme] Is there a direct way to get at an embedded snip's parent editor? In-Reply-To: References: Message-ID: <932b2f1f0806222010l2e0f2f9v679d1dd076b6d9c4@mail.gmail.com> You've got it right. Robby On Sun, Jun 22, 2008 at 10:06 PM, Danny Yoo wrote: > Is there an easy way to get at an embedded snip's parent toplevel > editor? I cooked up the following code, but I feel a little hesitant > and would like some confirmation on this. Thank you for any > suggestions! > > > #lang scheme/base > (require scheme/gui/base > scheme/class) > > ;; get-top-editor: snip -> (or/c editor #f) > ;; Returns the topmost editor of a-snip, or #f if we can't do it. > (define (get-top-editor a-snip) > (cond [(send a-snip get-admin) > (let* ([editor (send (send a-snip get-admin) get-editor)] > [editor-admin (send editor get-admin)]) > (cond [(is-a? editor-admin editor-snip-editor-admin<%>) > (get-top-editor (send editor-admin get-snip))] > [else > editor]))] > [else > #f])) > > > ;; test: -> boolean > ;; should return true. FIXME: make this an automated test. > (define (test) > (define e-parent (new text%)) > > (define e1 (new editor-snip%)) > (define e2 (new editor-snip%)) > (define e3 (new editor-snip%)) > > (send e-parent insert e1) > (send (send e1 get-editor) insert e2) > (send (send e2 get-editor) insert e3) > (and > (eq? (get-top-editor e3) e-parent) > (eq? (get-top-editor e2) e-parent) > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From chris.khoo at gmail.com Sun Jun 22 19:18:20 2008 From: chris.khoo at gmail.com (Khookie) Date: Thu Mar 26 02:20:52 2009 Subject: [plt-scheme] Going through SICP (newb) Message-ID: Hi I've just downloaded PLT Scheme and am interested in going through SICP. Which language should I use (R5RS, Pretty Big, etc.)? Chris From czhu at cs.utah.edu Sun Jun 22 23:26:48 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:52 2009 Subject: [plt-scheme] Going through SICP (newb) In-Reply-To: References: Message-ID: <485F17F8.3010901@cs.utah.edu> Pretty Big Khookie wrote: > Hi > > I've just downloaded PLT Scheme and am interested in going through > SICP. > > Which language should I use (R5RS, Pretty Big, etc.)? > > Chris > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From czhu at cs.utah.edu Sun Jun 22 23:28:14 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:53 2009 Subject: [plt-scheme] Going through SICP (newb) In-Reply-To: References: Message-ID: <485F184E.7080701@cs.utah.edu> And you might need this for one section of SICP: http://planet.plt-scheme.org/display.ss?package=sicp.plt&owner=soegaard Khookie wrote: > Hi > > I've just downloaded PLT Scheme and am interested in going through > SICP. > > Which language should I use (R5RS, Pretty Big, etc.)? > > Chris > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From eli at barzilay.org Sun Jun 22 23:41:44 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:53 2009 Subject: [plt-scheme] PLT Scheme v4.0.1 Message-ID: <200806230341.m5N3fiX6027573@winooski.ccs.neu.edu> PLT Scheme version 4.0.1 is now available from http://plt-scheme.org/ This release fixes a number of bugs. Most noteworthy, the "Internal Error" message when requiring a PLaneT package has been fixed and user-defined teachpacks now work properly. Feedback Welcome, -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mark.engelberg at gmail.com Mon Jun 23 00:25:28 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:20:53 2009 Subject: [plt-scheme] Semantics of quote Message-ID: Can anyone point me to a fairly precise explanation of quote? Sometimes I encounter subtle things that make me wonder whether my mental model of how quote works is accurate. --Mark From czhu at cs.utah.edu Mon Jun 23 00:28:03 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:20:53 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: Message-ID: <485F2653.4080209@cs.utah.edu> I'm no expert, but writing a Scheme interpreter did helped me to get a deep understanding of 'quote. Chongkai Mark Engelberg wrote: > Can anyone point me to a fairly precise explanation of quote? > Sometimes I encounter subtle things that make me wonder whether my > mental model of how quote works is accurate. > > --Mark > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From sk at cs.brown.edu Mon Jun 23 00:39:37 2008 From: sk at cs.brown.edu (Shriram Krishnamurthi) Date: Thu Mar 26 02:20:53 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: Message-ID: Mark, I'm not sure the question you asked is the one you meant to ask. QUOTE in Scheme is pretty straightforward. The interaction of QUOTE and QUASIQUOTE + UNQUOTE takes a little more work. The interaction of QUOTE and QUASIQUOTE + UNQUOTE-SPLICING is more subtle. The interaction of all these with macros is vastly more subtle. So, I don't think it's QUOTE you really want to understand, so much as QUOTE in context. And when you've had your fill of understanding, you can start to call it QUITE. Or even QUIT. (-: 'shriram From michel.sylvan at gmail.com Mon Jun 23 02:05:11 2008 From: michel.sylvan at gmail.com (Michel Salim) Date: Thu Mar 26 02:20:53 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: Message-ID: <485F3D17.8090008@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark Engelberg wrote: > Can anyone point me to a fairly precise explanation of quote? > Sometimes I encounter subtle things that make me wonder whether my > mental model of how quote works is accurate. > The R5RS section on quote is quite explanatory (I don't think it has changed in R6RS?) http://www-swiss.ai.mit.edu/~jaffer/r5rs_6.html - -- Michel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkhfPPcACgkQWt0J3fd+7ZBXewCdFchtYxlqGsTpX0RXvbJHc3qU YmkAn2FguyfhXc7I1G/9wYVDQvdG5uZK =P1Xl -----END PGP SIGNATURE----- From chris at atdesk.com Mon Jun 23 08:35:58 2008 From: chris at atdesk.com (Chris Uzdavinis) Date: Thu Mar 26 02:20:53 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: (Mark Engelberg's message of "Sun, 22 Jun 2008 21:25:28 -0700") References: Message-ID: "Mark Engelberg" writes: > Can anyone point me to a fairly precise explanation of quote? > Sometimes I encounter subtle things that make me wonder whether my > mental model of how quote works is accurate. Perhaps you could provide a representative situation with surprising behavior that lead to you asking this question? Early on in CL, I remember one use of quoting that caught me off guard: passing a quoted list to a macro. The '(...) form was converted to (quote ...) by the reader, and so the macro saw the 'quote' symbol as the first element of my argument list. I expected it to only see my list as written. -- Chris From etanter at dcc.uchile.cl Mon Jun 23 10:39:50 2008 From: etanter at dcc.uchile.cl (Eric Tanter) Date: Thu Mar 26 02:20:54 2009 Subject: [plt-scheme] Syntax in teachpack doesn't work. In-Reply-To: <932b2f1f0806210520v659f2043r92f0932a6a6b7df6@mail.gmail.com> References: <11b141710806190642m4fb7dcdq39e951daca699b40@mail.gmail.com> <932b2f1f0806202205o67b82dbel3b720197f0c4da2e@mail.gmail.com> <1CA7926B-939D-4E69-B2D5-DC4A4323CF17@dcc.uchile.cl> <932b2f1f0806210520v659f2043r92f0932a6a6b7df6@mail.gmail.com> Message-ID: <93E2D522-8853-4347-A11C-F4D910D6D4A0@dcc.uchile.cl> I went through several paths (while I was trying to figure out what was going wrong) and I had cases where at the time of selecting the teachpack, there was an error, and others where the error was in the interaction window. Can't remember the exact paths though, sorry. -- ?ric On Jun 21, 2008, at 14:20 , Robby Findler wrote: > Ah, yes. I should have thought of that myself. > > But if you do do that, don't you get an error message somewhat > earlier? > > Robby > > On Sat, Jun 21, 2008 at 12:42 AM, Eric Tanter > wrote: >> I tried to use that teachpack and ran into similar problems as Paulo. >> >> The issue is not in the definition of the module, which as Robby >> points out >> is correct, but seems to appear when one modifies the definition of >> the >> teachpack, and accidentally saves the modified module using the >> advanced >> student (custom) language, rather than the module language. >> >> Just make sure you're in the good language when editing/saving the >> teachpack, and it should work nicely. >> >> Hope this helps, >> >> -- ?ric >> >> >> On Jun 21, 2008, at 07:05 , Robby Findler wrote: >> >>> I was able to use that teachpack successfully under v372 (and in the >>> soon-to-be-released version). This is what I see, for example: >>> >>> Welcome to DrScheme, version 372 [3m]. >>> Language: Advanced Student custom; memory limit: 128 megabytes. >>> Teachpack: iteration.ss. >>>> >>>> repeat >>> >>> repeat: bad syntax >>>> >>>> (repeat 2 (printf "hi\n")) >>> >>> hi >>> hi >>>> >>> >>> On Thu, Jun 19, 2008 at 8:42 AM, Paulo J. Matos >>> wrote: >>>> >>>> Hello, I am trying to create a simple syntax teachpack and I have: >>>> (module iteration mzscheme >>>> >>>> ;; Simplified do >>>> (define-syntax for >>>> (syntax-rules () >>>> ((for (var init cond step) >>>> command ...) >>>> (let loop ((var init)) >>>> (if (not cond) >>>> (void) >>>> (begin >>>> command >>>> ... >>>> (loop step))))))) >>>> >>>> ;; Simplified^2 do >>>> (define-syntax repeat >>>> (syntax-rules () >>>> ((repeat num command ...) >>>> (for (x 0 (< x num) (+ x 1)) >>>> command ...)))) >>>> >>>> (provide >>>> (all-defined))) >>>> >>>> Then I do add the teachpack and load it but when I try to use >>>> repeat: >>>> repeat: name is not defined, not a parameter, and not a primitive >>>> name >>>> >>>> I am surely missing something but don't know what (this is still >>>> version >>>> 372). >>>> >>>> Cheers, >>>> -- >>>> Paulo Jorge Matos - pocm at soton.ac.uk >>>> http://www.personal.soton.ac.uk/pocm >>>> PhD Student @ ECS >>>> University of Southampton, UK >>>> _________________________________________________ >>>> 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 jos.koot at telefonica.net Mon Jun 23 10:52:55 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:20:54 2009 Subject: [plt-scheme] Semantics of quote References: Message-ID: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> Can you be somewhat more specific? What kind of subtle things do you encounter? jos ----- Original Message ----- From: "Mark Engelberg" To: "pltscheme" Sent: Monday, June 23, 2008 6:25 AM Subject: [plt-scheme] Semantics of quote > Can anyone point me to a fairly precise explanation of quote? > Sometimes I encounter subtle things that make me wonder whether my > mental model of how quote works is accurate. > > --Mark > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From noelwelsh at gmail.com Mon Jun 23 10:55:04 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:54 2009 Subject: [plt-scheme] Defining resource constrained producer/consumer in the simulation package Message-ID: Hi, I am trying to define the following producer/consumer process using the simulation package: There is a queue of resources of type A. Process X takes an A and produces a B (which contains the A). The B is placed in a queue of fixed size Process Y takes a B, returns the A its queue and throws away the B. If any queue is empty a process that needs a resource of that type must wait. If any queue is full a process that creates a resource of that type must wait. I can't work out how to model this. If I model the As and Bs as resources, I have the problem that "It is an error to attempt to release more units than the process has allocated." (http://planet.plt-scheme.org/package-source/williams/simulation.plt/2/2/html/simulation-Z-H-8.html#node_sec_7.2.2). Since X takes A and never releases them, and Y releases As but never takes them, this is a problem. If I schedule As and Bs as events how do I enforce the resource limits? This kind of simulation is simple in a message passing thread system but I don't see how it fits into the simulation package's model. Also: the documentation for the simulation package would benefit from an introductory section that lays out the model used by the package. Thanks, Noel From m.douglas.williams at gmail.com Mon Jun 23 11:53:30 2008 From: m.douglas.williams at gmail.com (Doug Williams) Date: Thu Mar 26 02:20:55 2009 Subject: [plt-scheme] Defining resource constrained producer/consumer in the simulation package In-Reply-To: References: Message-ID: The resources in the simulation collection are more simplistic than what you want. In particular, there is no way to pass a particular resource between processes - they are always owned by the process that allocated them. [You could have one controller process that allocates the resource and controls the execution of A and B, but that seems too artificial.] The simplest solution is to use sets to implement the queues (and enforce the limits yourself). The sets can contain any type of objects you want to pass around. In the examples, the furnace model(s) use sets - model-1 is a discrete-event simulation and might be closer to what you're doing. The harbor model example also uses sets and also shows more advances control constructs. I'll reload 3.72 on one of my machines and send you a quick solution. I'll still having problems with V4.0 (and V4.0.1) and haven't gotten the simulation and inference collections ported yet. Doug On Mon, Jun 23, 2008 at 8:55 AM, Noel Welsh wrote: > Hi, > > I am trying to define the following producer/consumer process using > the simulation package: > > There is a queue of resources of type A. > > Process X takes an A and produces a B (which contains the A). The B > is placed in a queue of fixed size > > Process Y takes a B, returns the A its queue and throws away the B. > > If any queue is empty a process that needs a resource of that type > must wait. If any queue is full a process that creates a resource of > that type must wait. > > I can't work out how to model this. If I model the As and Bs as > resources, I have the problem that "It is an error to attempt to > release more units than the process has allocated." > ( > http://planet.plt-scheme.org/package-source/williams/simulation.plt/2/2/html/simulation-Z-H-8.html#node_sec_7.2.2 > ). > Since X takes A and never releases them, and Y releases As but never > takes them, this is a problem. > > If I schedule As and Bs as events how do I enforce the resource limits? > > This kind of simulation is simple in a message passing thread system > but I don't see how it fits into the simulation package's model. > > Also: the documentation for the simulation package would benefit from > an introductory section that lays out the model used by the package. > > Thanks, > Noel > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/4dbbe574/attachment.html From anton.tayanovskyy at gmail.com Mon Jun 23 13:02:27 2008 From: anton.tayanovskyy at gmail.com (Anton Tayanovskyy) Date: Thu Mar 26 02:20:55 2009 Subject: [plt-scheme] SXML or XEXPR? SXML pattern-matching? Message-ID: Hi group, My question is - how do you usually pattern-match XML? With built into PLT Scheme XML objects, Xexpr'essions, SXML, sxml-match, or PLT's default pattern matcher? I can cope with either, I am just curious, being new to Scheme, what is the best practice. I might be missing the obvious. What I am doing is some XML transformations with PLT Scheme 4. A wonderful change after XSLT. But it was a bit hard to decide between Xexpr and the Lizorkin's SXML library; I settled on the latter as it seems easier. However, what I would really appreciate is a pattern-matcher for either of these representations. I have seen the sxml-match library and it is quite powerful but afaik it is not integrated into the PLT pattern language. I guess what I am looking for is sxml-match.ss functionality as a PLT match-expander, primarily the ability to match tag attributes regardless of their order, with semantics like: (match '(div (@ (id "header"))) "header-body") [( 'div (@ ,id ,(title "title")) (list body)) (list id title body)]) ; gives ("header" "title" "body") where is a 2- or 3-parameter match expander I defined, here: http://scheme.paste.f-box.org/73 Thanks, Anton From eli at barzilay.org Mon Jun 23 13:05:02 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:20:55 2009 Subject: [plt-scheme] Interactive Message-ID: <18527.55230.39178.553840@arabic.ccs.neu.edu> I have upgraded my interactive to work with v4.0. It has many new features now, some are due to new things in PLT. It's available at http://barzilay.org/misc/interactive.ss Here is the blurb from the top of the file: This file provides some useful facilities for interactive use of mzscheme. It is best used as (or loaded from) a ".mzschemerc" file or "mzschemerc.ss" on Windows (evaluate `(find-system-path 'init-file)' to know where this file is on your system). Some highlights are: * Defines a 'debug module (can also be used as '* for brevity) that provides a few useful utilities for use in code while debugging: > (eprintf fmt arg ...) Like `printf', but uses the current error port. > (eeprintf fmt arg ...) Like `eprintf', but the original error port. Useful for printouts from code where `current-error-port' might be redirected. > (warn ...) Same as `error', but only prints the error message. > *** > (*** value) > (*** fmt args ...) This is macro that is useful for debugging printouts: the first form prints (on stderr) the source file and line number, the second also prints a value (and returns it), and the third uses a format string. For example, to see where a problem happens in a function, you spread ***s around, and the printout will show a trace of location (and possibly values). > (define*** (name args ...) ...) Macro that defines `name' as a traced function. (The idea is that you append a `***' to `define' for functions that you want to trace.) This is a cheap hack: it kills tail-recursiveness. The `***' is supposed to be a token that stands out textually in *your* code while you're debugging it, so it is customizable: set the `MZ_DEBUGGER_TOKEN' environment variable to whatever you want -- for example, set it to "@@" and you'll get bindings for `@@' and `define@@' instead of the above. The following REPL functionality is used only when the REPL is actually used, so non-interactive use (eg, scripts) are not affected (but note that .mzschemerc is not read in such cases anyway (by default)). * Uses the readline library if you're running in an xterm (and if it's present). (Again, triggered by repl interaction.) * Toplevel commands, in the form of ",cmd". These commands make it convenient to perform many otherwise-tedious operations in MzScheme. Use ",h" for a list of available commands and for help on a specific command. Note that some of these commands look similar to existing mzscheme functionality, but are extended. Most commands consume arguments, ,help will tell you about the relevant syntax. Note that arguments usually do not need to be quoted, for example ",cd .." goes up a directory; this is also relevant for commands that consume an expression, a require specification, a symbol, etc. Some highlights: - ,time: improved timing output, and can run an expression multiple times - ,require: if you use it with an argument that looks like a file, it will do the right thing to require that file - ,syntax: not only is this a poor man's syntax stepper -- it can actually use the real syntax stepper - ,apropos: search the available bindings - ,describe: tell you how you got to have some binding - ,require-reloadable ,reload ,enter: require a module so it can be reloaded later, and a convenient command for `enter!' (with the prompt showing you where you are) - ,trace ,untrace ,errortrace ,profile: convenient commands for those features you always knew how to use but was lazy to actually type what's needed. * Previous toplevel results are accessible: `^' is the last result, `^^' is the second to last (or the second value of the last multiple-value result) etc. This is done in a way that is trying to avoid clobbering a binding that you already have for these identifiers. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From noelwelsh at gmail.com Mon Jun 23 13:15:55 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:55 2009 Subject: [plt-scheme] SXML or XEXPR? SXML pattern-matching? In-Reply-To: References: Message-ID: On Mon, Jun 23, 2008 at 6:02 PM, Anton Tayanovskyy wrote: > I guess what I am looking for is sxml-match.ss functionality as a PLT > match-expander, primarily the ability to match tag attributes > regardless of their order, with semantics like: The WebIt! package has a nice pattern matcher that matches attributes regardless of order. This is its main advantage over match, IMO. I don't know if the package has been ported to v4 yet, but it is what I used when I had to process XML. I think SXML is the right library to use. Although there are some quirky bits to the SXML library it is more feature complete than the Xexpr library. N. From anton.tayanovskyy at gmail.com Mon Jun 23 13:29:31 2008 From: anton.tayanovskyy at gmail.com (Anton Tayanovskyy) Date: Thu Mar 26 02:20:55 2009 Subject: [plt-scheme] SXML or XEXPR? SXML pattern-matching? In-Reply-To: References: Message-ID: Thanks, Noel, for the quick reply. Webit does works for PLT v4, in fact I believe sxml-match library is part of Webit. I will give it another look. My biggest complaint about Webit matching is that it's a bit too rigid. Mostly this is the problem: I want to match an element with any tag name, not a given tag name. Judging from this Webit grammar piece: element-pattern ::= (tag-symbol attribute-pattern*) | (tag-symbol attribute-pattern* nodeset-pattern) | (tag-symbol attribute-pattern* nodeset-pattern . pat-var-or-cata) element pattern must start with tag-symbol, not tag-pattern. PLT's match, on the other hand, is extremely flexible. I guess I'll proceed with my small macro for now (thankfully Scheme is tolerant of individualism). Was good to know your SXML / Xexpr opinion. Bests, --A On Mon, Jun 23, 2008 at 8:15 PM, Noel Welsh wrote: > On Mon, Jun 23, 2008 at 6:02 PM, Anton Tayanovskyy > wrote: > >> I guess what I am looking for is sxml-match.ss functionality as a PLT >> match-expander, primarily the ability to match tag attributes >> regardless of their order, with semantics like: > > The WebIt! package has a nice pattern matcher that matches attributes > regardless of order. This is its main advantage over match, IMO. I > don't know if the package has been ported to v4 yet, but it is what I > used when I had to process XML. > > I think SXML is the right library to use. Although there are some > quirky bits to the SXML library it is more feature complete than the > Xexpr library. > > N. > From anton.tayanovskyy at gmail.com Mon Jun 23 13:29:31 2008 From: anton.tayanovskyy at gmail.com (Anton Tayanovskyy) Date: Thu Mar 26 02:20:56 2009 Subject: [plt-scheme] SXML or XEXPR? SXML pattern-matching? In-Reply-To: References: Message-ID: Thanks, Noel, for the quick reply. Webit does works for PLT v4, in fact I believe sxml-match library is part of Webit. I will give it another look. My biggest complaint about Webit matching is that it's a bit too rigid. Mostly this is the problem: I want to match an element with any tag name, not a given tag name. Judging from this Webit grammar piece: element-pattern ::= (tag-symbol attribute-pattern*) | (tag-symbol attribute-pattern* nodeset-pattern) | (tag-symbol attribute-pattern* nodeset-pattern . pat-var-or-cata) element pattern must start with tag-symbol, not tag-pattern. PLT's match, on the other hand, is extremely flexible. I guess I'll proceed with my small macro for now (thankfully Scheme is tolerant of individualism). Was good to know your SXML / Xexpr opinion. Bests, --A On Mon, Jun 23, 2008 at 8:15 PM, Noel Welsh wrote: > On Mon, Jun 23, 2008 at 6:02 PM, Anton Tayanovskyy > wrote: > >> I guess what I am looking for is sxml-match.ss functionality as a PLT >> match-expander, primarily the ability to match tag attributes >> regardless of their order, with semantics like: > > The WebIt! package has a nice pattern matcher that matches attributes > regardless of order. This is its main advantage over match, IMO. I > don't know if the package has been ported to v4 yet, but it is what I > used when I had to process XML. > > I think SXML is the right library to use. Although there are some > quirky bits to the SXML library it is more feature complete than the > Xexpr library. > > N. > From noelwelsh at gmail.com Mon Jun 23 13:52:25 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:56 2009 Subject: [plt-scheme] Defining resource constrained producer/consumer in the simulation package In-Reply-To: References: Message-ID: On Mon, Jun 23, 2008 at 4:53 PM, Doug Williams wrote: > I'll reload 3.72 on one of my machines and send you a quick solution. I'll > still having problems with V4.0 (and V4.0.1) and haven't gotten the > simulation and inference collections ported yet. Don't worry about it too much. My problem is so simple that it might be easier to just implement it directly. N. From mark.engelberg at gmail.com Mon Jun 23 15:08:29 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:20:56 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> Message-ID: Some examples: (cons 'quote (cons 'a empty)) prints as 'a Consider: (define-syntax my-quote (syntax-rules () ((my-quote expr) (quote expr)))) (quote (quote a)) and (quote (my-quote a)) yield different outputs. --Mark On Mon, Jun 23, 2008 at 7:52 AM, Jos Koot wrote: > Can you be somewhat more specific? What kind of subtle things do you > encounter? > jos > ----- Original Message ----- From: "Mark Engelberg" > > To: "pltscheme" > Sent: Monday, June 23, 2008 6:25 AM > Subject: [plt-scheme] Semantics of quote > > >> Can anyone point me to a fairly precise explanation of quote? >> Sometimes I encounter subtle things that make me wonder whether my >> mental model of how quote works is accurate. >> >> --Mark >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From matthias at ccs.neu.edu Mon Jun 23 15:15:25 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:56 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> Message-ID: Yeap, isn't it confusing? :-) Quoted expressions are self-evaluating, but not self-printing a point of endless confusion to beginners -- as you may recall from 1991. On Jun 23, 2008, at 3:08 PM, Mark Engelberg wrote: > Some examples: > > (cons 'quote (cons 'a empty)) prints as 'a But what does 'a mean? Where did it come from? How does 'a print in a "real" Scheme, after evaluating to itself? ''a print in a "real" Scheme, after evaluating to itself? '''a print in a "real" Scheme, after evaluating to itself? ''''a print in a "real" Scheme, after evaluating to itself? -- Matthias > > Consider: > (define-syntax my-quote > (syntax-rules () > ((my-quote expr) > (quote expr)))) > > (quote (quote a)) > and > (quote (my-quote a)) > > yield different outputs. > > --Mark > > On Mon, Jun 23, 2008 at 7:52 AM, Jos Koot > wrote: >> Can you be somewhat more specific? What kind of subtle things do you >> encounter? >> jos >> ----- Original Message ----- From: "Mark Engelberg" >> >> To: "pltscheme" >> Sent: Monday, June 23, 2008 6:25 AM >> Subject: [plt-scheme] Semantics of quote >> >> >>> Can anyone point me to a fairly precise explanation of quote? >>> Sometimes I encounter subtle things that make me wonder whether my >>> mental model of how quote works is accurate. >>> >>> --Mark >>> _________________________________________________ >>> 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 m.douglas.williams at gmail.com Mon Jun 23 15:36:06 2008 From: m.douglas.williams at gmail.com (Doug Williams) Date: Thu Mar 26 02:20:57 2009 Subject: [plt-scheme] Defining resource constrained producer/consumer in the simulation package In-Reply-To: References: Message-ID: Here's a simple version using a single process and two resources. ;;; Noels' e-mail: ;;; I am trying to define the following producer/consumer process using ;;; the simulation package: ;;; ;;; There is a queue of resources of type A. ;;; ;;; Process X takes an A and produces a B (which contains the A). The B ;;; is placed in a queue of fixed size ;;; ;;; Process Y takes a B, returns the A its queue and throws away the B. ;;; ;;; If any queue is empty a process that needs a resource of that type ;;; must wait. If any queue is full a process that creates a resource of ;;; that type must wait. ;;; ;;; I can't work out how to model this. If I model the As and Bs as ;;; resources, I have the problem that "It is an error to attempt to ;;; release more units than the process has allocated." ;;; (http://planet.plt-scheme.org/package-source/williams/simulation.plt/ ;;; 2/2/html/simulation-Z-H-8.html#node_sec_7.2.2). ;;; Since X takes A and never releases them, and Y releases As but never ;;; takes them, this is a problem. ;;; ;;; If I schedule As and Bs as events how do I enforce the resource limits? ;;; ;;; This kind of simulation is simple in a message passing thread system ;;; but I don't see how it fits into the simulation package's model. ;;; ;;; Also: the documentation for the simulation package would benefit from ;;; an introductory section that lays out the model used by the package. ;;; ;;; Doug's Response: ;;; I'm not sure what A and B are in you example, but I assume A is something ;;; that is required by both processes - like a work cell or jig - and that ;;; B is something only required by Y. Also, I'm assuming that X and Y can ;;; be done at independent speeds. ;;; ;;; Let's assume a 'widget' represents the end product/result of X and Y using ;;; an A and a B. (require (planet "simulation-with-graphics.ss" ("williams" "simulation.plt"))) (require (planet "random-distributions.ss" ("williams" "science.plt"))) (define n 0) (define A #f) (define B #f) (define (scheduler) (do ((i 1 (+ i 1))) ((> i n) ()) (wait (random-exponential 1.5)) (schedule now (widget i)))) (define-process (widget i) ;; Allocate an A for X and Y (with-resource (A) (printf "~a: Widget ~a acquires an A~n" (current-simulation-time) i) (work (random-flat 4.0 8.0)) ; X ;; Allocate a B for Y (with-resource (B) (printf "~a: Widget ~a acquires a B~n" (current-simulation-time) i) (work (random-flat 8.0 20.0)) ; Y (printf "~a: Widget ~a releases its B~n" (current-simulation-time) i)) (printf "~a: Widget ~a releases its A~n" (current-simulation-time) i))) (define (run-simulation n-widgets n-As n-Bs) (with-new-simulation-environment (set! n n-widgets) (set! A (make-resource n-As)) (set! B (make-resource n-Bs)) (schedule (at 0.0) (scheduler)) (start-simulation))) (run-simulation 20 4 2) On Mon, Jun 23, 2008 at 11:52 AM, Noel Welsh wrote: > On Mon, Jun 23, 2008 at 4:53 PM, Doug Williams > wrote: > > I'll reload 3.72 on one of my machines and send you a quick solution. > I'll > > still having problems with V4.0 (and V4.0.1) and haven't gotten the > > simulation and inference collections ported yet. > > Don't worry about it too much. My problem is so simple that it might > be easier to just implement it directly. > > N. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/12ae6d7a/attachment.htm From filcab at gmail.com Mon Jun 23 15:42:30 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:20:57 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> Message-ID: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> On 23 Jun, 2008, at 20:15, Matthias Felleisen wrote: > > But what does 'a mean? Where did it come from? How does > > 'a print in a "real" Scheme, after evaluating to itself? > ''a print in a "real" Scheme, after evaluating to itself? > '''a print in a "real" Scheme, after evaluating to itself? > ''''a print in a "real" Scheme, after evaluating to itself? > > -- Matthias > But... 'a (or ') doesn't evaluate to itself :s 'a will evaluate to the symbol... 'a (a symbol that has "a" as its name) wouldn't it? Also, just to see if I understand it right... All your examples would just lose one ': a <- symbol, with a symbol-name = "a" 'a <- list with symbol 'quote and the symbol a ''a <- same thing, recursively (quote (quote a)) ... - Filipe Cabecinhas From mark.engelberg at gmail.com Mon Jun 23 15:45:14 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:20:57 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> Message-ID: My mental model is usually to think of quote as a keyword that prevents the contents from explicitly being evaluated (so 'a means don't evaluate the a as variable, just think of it as symbol, and '(a b c) means not to treat the list as a function application, but just the actual list). I don't really deal much with nested quotations, or think much about the printing aspect, so my mental model is clearly a bit naive, but it works for common purposes. Perhaps I once had a deeper mental model of quote, but after being away from Scheme for many years, this is what I retained. I never expected that consing in the atom 'quote into a list would trigger the quotation printing mechanism. It makes me wonder what else I'm forgetting about quote. --Mark On Mon, Jun 23, 2008 at 12:15 PM, Matthias Felleisen wrote: > > Yeap, isn't it confusing? :-) > > Quoted expressions are self-evaluating, but not self-printing a point of > endless confusion to beginners -- as you may recall from 1991. > > > On Jun 23, 2008, at 3:08 PM, Mark Engelberg wrote: > >> Some examples: >> >> (cons 'quote (cons 'a empty)) prints as 'a > > > But what does 'a mean? Where did it come from? How does > > 'a print in a "real" Scheme, after evaluating to itself? > ''a print in a "real" Scheme, after evaluating to itself? > '''a print in a "real" Scheme, after evaluating to itself? > ''''a print in a "real" Scheme, after evaluating to itself? > > -- Matthias > > > > >> >> Consider: >> (define-syntax my-quote >> (syntax-rules () >> ((my-quote expr) >> (quote expr)))) >> >> (quote (quote a)) >> and >> (quote (my-quote a)) >> >> yield different outputs. >> >> --Mark >> >> On Mon, Jun 23, 2008 at 7:52 AM, Jos Koot wrote: >>> >>> Can you be somewhat more specific? What kind of subtle things do you >>> encounter? >>> jos >>> ----- Original Message ----- From: "Mark Engelberg" >>> >>> To: "pltscheme" >>> Sent: Monday, June 23, 2008 6:25 AM >>> Subject: [plt-scheme] Semantics of quote >>> >>> >>>> Can anyone point me to a fairly precise explanation of quote? >>>> Sometimes I encounter subtle things that make me wonder whether my >>>> mental model of how quote works is accurate. >>>> >>>> --Mark >>>> _________________________________________________ >>>> 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 filcab at gmail.com Mon Jun 23 15:45:38 2008 From: filcab at gmail.com (Filipe Cabecinhas) Date: Thu Mar 26 02:20:57 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> Message-ID: On 23 Jun, 2008, at 20:42, Filipe Cabecinhas wrote: > > On 23 Jun, 2008, at 20:15, Matthias Felleisen wrote: > >> >> But what does 'a mean? Where did it come from? How does >> >> 'a print in a "real" Scheme, after evaluating to itself? >> ''a print in a "real" Scheme, after evaluating to itself? >> '''a print in a "real" Scheme, after evaluating to itself? >> ''''a print in a "real" Scheme, after evaluating to itself? >> >> -- Matthias >> > > Sorry. Missed the "print" part... I would accept printing them either as a 'a ''a '''a or a (quote a) (quote (quote a)) (quote (quote (quote a))) Or a special case just for the one-level quote. - Filipe Cabecinhas From entarter at gmail.com Mon Jun 23 15:53:27 2008 From: entarter at gmail.com (Killian McCutcheon) Date: Thu Mar 26 02:20:58 2009 Subject: [plt-scheme] Macro troubles Message-ID: <310ea7f60806231253h3f53de95gd46c92bdf9b2811f@mail.gmail.com> I'm having a bit of trouble re-implementing a DSL using macros (I'm a macro newbie). The DSL is very simple, looks like this: (commands player "Please Sir! Can I have some more?" show-item "soup" play-sound "sfx_aghast" skip-next-wait npc "MORE!?!?" show-item "scowl" wait-input) Its a script for a game, with lists of commands that are performed in certain situations. Some of the commands take a string or a number as a parameter, others have no parameters. Now, the script is not written by a programmer, so to make it easier for the designer, I offered him this syntax where there are only parentheses around the whole form, and not around each individual command in the list. My solution without macros was to define commands as evaluating to symbols of the same name, and just pass all arguments to the commands function to a parsing function. It worked well, but there was a lot of repetitive code. Now as an exercise I'm reimplementing the DSL using macros. The commands are defined using a macro, which seems to work fine. Then I try to define the commands form like this: (define-syntax (commands stx) (syntax-case stx () [(_ unary arg rest ...) (eq? 1 (procedure-arity (syntax-object->datum (syntax unary)))) (syntax (cons (unary arg) (_ rest ...)))] [(_ nullary rest ...) (eq? 0 (procedure-arity (syntax-object->datum (syntax nullary)))) (syntax (cons (nullary) (_ rest ...)))] [(_ '()) (syntax '())])) but that gives me the error: procedure-arity: expects argument of type ; given player So Im guessing either the definitions of my commands aren't available in the compile-environment, or I have to jump through extra syntax hoops to get at them. I try to make do with second best: (define-syntax (start stx) (syntax-case stx () [(_ unary arg rest ...) (or (string? (syntax-object->datum (syntax arg))) (number? (syntax-object->datum (syntax arg)))) (syntax (cons (unary arg) (_ rest ...)))] [(_ nullary rest ...) (syntax (cons (nullary) (_ rest ...)))] [(_ '()) (syntax '())])) but that gives me the error: commands: bad syntax in: commands and highlights the recursive call to the macro in the first template. Thing is I don't know why, and the Dybvig paper "Writing Hygienic Macros in Scheme with Syntax-Case" seems to contain very similar code in the cond macros. So basically I'm flummoxed, and any help would be appreciated. Cheers, Killian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/2234e3d0/attachment.html From cobbe at ccs.neu.edu Mon Jun 23 15:53:49 2008 From: cobbe at ccs.neu.edu (Richard Cobbe) Date: Thu Mar 26 02:20:58 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> Message-ID: <20080623195349.GC18101@weatherwax.ccs.neu.edu> On Mon, Jun 23, 2008 at 12:08:29PM -0700, Mark Engelberg wrote: > Some examples: > > (cons 'quote (cons 'a empty)) prints as 'a > > Consider: > (define-syntax my-quote > (syntax-rules () > ((my-quote expr) > (quote expr)))) > > (quote (quote a)) > and > (quote (my-quote a)) > > yield different outputs. As Matthias's reply points out, the REPL's printer treats (quote ...) specially, which leads to confusion in certain cases. It's also worth pointing out that you get the same output from your second example above even if you leave out the definition of `my-quote'. The built-in `quote' form suppresses not only evaluation of its argument but also macro expansion. Therefore, (equal? (quote my-quote a) (cons 'my-quote (cons 'a null))) is #t, both with and without the definition of the `my-quote' macro. Richard From matthias at ccs.neu.edu Mon Jun 23 16:06:55 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:59 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> Message-ID: <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> 'a really, truly evaluates to 'a, which means for an reduction semantics, you can really view 'a as a value. But the PRINTER renders 'a as a and ''a as 'a, which you correctly identified. The sad thing is that this is needlessly confusing, especially for beginners. It is one of the reasons we have teaching languages that (1) don't allow quote for anything but symbols (pop quiz: is ''a a symbol?) and (2) renders things as constructed values (think abstract or universal algebra, if you're familiar with that). -- Matthias From anton.tayanovskyy at gmail.com Mon Jun 23 16:15:49 2008 From: anton.tayanovskyy at gmail.com (Anton Tayanovskyy) Date: Thu Mar 26 02:20:59 2009 Subject: [plt-scheme] Macro troubles In-Reply-To: <310ea7f60806231253h3f53de95gd46c92bdf9b2811f@mail.gmail.com> References: <310ea7f60806231253h3f53de95gd46c92bdf9b2811f@mail.gmail.com> Message-ID: Hi Killian, I am a Scheme newbie as well, but have been recently also struggling through macros :) What I can tell you immediately that procedure-arity will not work in macros as expected. In Scheme macro expansion is a phase that precedes evaluation, and code executed at that phase cannot access the run-time bindings. So, for code working in the macro stage, foo is always 'foo, never its value, such as (lambda ...) Do you really need procedure-arity? Can you give an example of your macro and what you want it to expand to? Finally, have you checked syntax-rules and define-macro macros? I find those simpler than syntax-case. Bests, --Anton On Mon, Jun 23, 2008 at 10:53 PM, Killian McCutcheon wrote: > I'm having a bit of trouble re-implementing a DSL using macros (I'm a macro > newbie). The DSL is very simple, looks like this: > (commands > player "Please Sir! Can I have some more?" > show-item "soup" > play-sound "sfx_aghast" > skip-next-wait > npc "MORE!?!?" > show-item "scowl" > wait-input) > Its a script for a game, with lists of commands that are performed in > certain situations. Some of the commands take a string or a number as a > parameter, others have no parameters. Now, the script is not written by a > programmer, so to make it easier for the designer, I offered him this syntax > where there are only parentheses around the whole form, and not around each > individual command in the list. My solution without macros was to define > commands as evaluating to symbols of the same name, and just pass all > arguments to the commands function to a parsing function. It worked well, > but there was a lot of repetitive code. > Now as an exercise I'm reimplementing the DSL using macros. The commands are > defined using a macro, which seems to work fine. Then I try to define > the commands form like this: > (define-syntax (commands stx) > (syntax-case stx () > [(_ unary arg rest ...) > (eq? 1 (procedure-arity (syntax-object->datum (syntax unary)))) > (syntax (cons (unary arg) (_ rest ...)))] > [(_ nullary rest ...) > (eq? 0 (procedure-arity (syntax-object->datum (syntax nullary)))) > (syntax (cons (nullary) (_ rest ...)))] > [(_ '()) (syntax '())])) > > > but that gives me the error: > > procedure-arity: expects argument of type ; given player > So Im guessing either the definitions of my commands aren't available in the > compile-environment, or I have to jump through extra syntax hoops to get at > them. I try to make do with second best: > (define-syntax (start stx) > (syntax-case stx () > [(_ unary arg rest ...) > (or (string? (syntax-object->datum (syntax arg))) > (number? (syntax-object->datum (syntax arg)))) > (syntax (cons (unary arg) (_ rest ...)))] > [(_ nullary rest ...) > (syntax (cons (nullary) (_ rest ...)))] > [(_ '()) (syntax '())])) > but that gives me the error: > commands: bad syntax in: commands > and highlights the recursive call to the macro in the first template. Thing > is I don't know why, and the Dybvig paper "Writing Hygienic Macros in Scheme > with Syntax-Case" seems to contain very similar code in the cond macros. > So basically I'm flummoxed, and any help would be appreciated. > Cheers, > Killian > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From anton.tayanovskyy at gmail.com Mon Jun 23 16:28:56 2008 From: anton.tayanovskyy at gmail.com (Anton Tayanovskyy) Date: Thu Mar 26 02:20:59 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> Message-ID: Hi Mark, A few weeks ago I was asking myself the same question. Glad I'm not alone being confused. However, consider: guile> (cons 'quote (cons 'a '())) (quote a) So not all Schemes print 'a instead of (quote a). As for your second example, besides the quote issue, it's a nice illustration of how macros work. They don't really work as procedures - the arguments are not evaluated. I banged my head at this for a while, read Oleg Kiselyov's _Systematic Macro Programming_, tried those CPS style macros in PLT Scheme, was amazed at how long the expansion takes, and then discovered define-macro... Regards, Anton On Mon, Jun 23, 2008 at 11:06 PM, Matthias Felleisen wrote: > > 'a really, truly evaluates to 'a, which means for an reduction semantics, > you can really view 'a as a value. > > But the PRINTER renders 'a as a and ''a as 'a, which you correctly > identified. > > The sad thing is that this is needlessly confusing, especially for > beginners. It is one of the reasons we have teaching languages that (1) > don't allow quote for anything but symbols (pop quiz: is ''a a symbol?) and > (2) renders things as constructed values (think abstract or universal > algebra, if you're familiar with that). > > -- Matthias > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From noelwelsh at gmail.com Mon Jun 23 16:30:25 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:20:59 2009 Subject: [plt-scheme] Macro troubles In-Reply-To: <310ea7f60806231253h3f53de95gd46c92bdf9b2811f@mail.gmail.com> References: <310ea7f60806231253h3f53de95gd46c92bdf9b2811f@mail.gmail.com> Message-ID: I really don't see any advantage in implementing this as macros, and indeed you get yourself a whole heap of extra issue to figure out. It seems that you could implement this fairly simply with match: #lang scheme (define (commands . args) (match args [(list) (display "I'm done\n")] [(list-rest 'player sentence rest) (printf "Player says: ~a\n" sentence) (apply commands rest)] [(list-rest 'show-item item rest) (printf "You see: ~a\n" item) (apply commands rest)] [else (printf "Don't know what to do with ~a\n" else)])) (commands 'player "Please Sir! Can I have some more?" 'show-item "soup") (commands 'player "Please Sir! Can I have some more?" 'show-item "soup" 'unknown "foo-bar") HTH, N. On Mon, Jun 23, 2008 at 8:53 PM, Killian McCutcheon wrote: > I'm having a bit of trouble re-implementing a DSL using macros (I'm a macro > newbie).... From matthias at ccs.neu.edu Mon Jun 23 16:35:51 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:20:59 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> Message-ID: <7EFF6FA9-F317-4109-925A-CFBEB3C98A9C@ccs.neu.edu> On Jun 23, 2008, at 4:28 PM, Anton Tayanovskyy wrote: > So not all Schemes print 'a instead of (quote a). I consider those two identical as far as semantics is concerned. Of course, you realize that when Scheme is printing 'a, the value that is being printed responds with #f to symbol? From anton.tayanovskyy at gmail.com Mon Jun 23 16:39:09 2008 From: anton.tayanovskyy at gmail.com (Anton Tayanovskyy) Date: Thu Mar 26 02:21:00 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <7EFF6FA9-F317-4109-925A-CFBEB3C98A9C@ccs.neu.edu> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <7EFF6FA9-F317-4109-925A-CFBEB3C98A9C@ccs.neu.edu> Message-ID: Yep, it's a pair. Thanks. > (pair? '(quote a)) #t --A On Mon, Jun 23, 2008 at 11:35 PM, Matthias Felleisen wrote: > > On Jun 23, 2008, at 4:28 PM, Anton Tayanovskyy wrote: > >> So not all Schemes print 'a instead of (quote a). > > I consider those two identical as far as semantics is concerned. > Of course, you realize that when Scheme is printing 'a, the value > that is being printed responds with #f to symbol? > From yinso.chen at gmail.com Mon Jun 23 18:32:51 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:00 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression Message-ID: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> Hi - It seems that in v4 `_` can no longer exist in the expression position for syntax-case, is there a reason for the change? Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/6662600a/attachment.htm From aleks at cs.brown.edu Mon Jun 23 18:57:55 2008 From: aleks at cs.brown.edu (Aleks Bromfield) Date: Thu Mar 26 02:21:01 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> Message-ID: <20080623225755.GA20467@cs.brown.edu> On Mon, Jun 23, 2008 at 04:06:55PM -0400, Matthias Felleisen wrote: > The sad thing is that this is needlessly confusing, especially for > beginners. It is one of the reasons we have teaching languages that > (1) don't allow quote for anything but symbols (pop quiz: is ''a a > symbol?) and (2) renders things as constructed values (think abstract > or universal algebra, if you're familiar with that). Out of curiosity, why isn't constructor-style printing the default for the module language as well? ~ Aleks From cce at ccs.neu.edu Mon Jun 23 19:10:01 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:21:01 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <20080623225755.GA20467@cs.brown.edu> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> Message-ID: <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> On Mon, Jun 23, 2008 at 6:57 PM, Aleks Bromfield wrote: > On Mon, Jun 23, 2008 at 04:06:55PM -0400, Matthias Felleisen wrote: >> The sad thing is that this is needlessly confusing, especially for >> beginners. It is one of the reasons we have teaching languages that >> (1) don't allow quote for anything but symbols (pop quiz: is ''a a >> symbol?) and (2) renders things as constructed values (think abstract >> or universal algebra, if you're familiar with that). > > Out of curiosity, why isn't constructor-style printing the default for > the module language as well? One reason is that there's no way to know what the constructors "look like" in the user's language. They could be named anything; the language's syntax may even vary from Scheme. Student languages are simpler; all the constructors are known ahead of time. A given language can always set up a custom printer based on its own constructors, but DrScheme can't do that automatically. -- Carl Eastlund From robby at cs.uchicago.edu Mon Jun 23 19:24:16 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:21:01 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> Message-ID: <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> While what Carl says is true, I believe the spirit of the question is more like "why isn't constructor (or quasiquote) printing the default for the 'scheme' and related languages"? To which I say "I have suggested this myself! :)" Robby On Mon, Jun 23, 2008 at 6:10 PM, Carl Eastlund wrote: > On Mon, Jun 23, 2008 at 6:57 PM, Aleks Bromfield wrote: >> On Mon, Jun 23, 2008 at 04:06:55PM -0400, Matthias Felleisen wrote: >>> The sad thing is that this is needlessly confusing, especially for >>> beginners. It is one of the reasons we have teaching languages that >>> (1) don't allow quote for anything but symbols (pop quiz: is ''a a >>> symbol?) and (2) renders things as constructed values (think abstract >>> or universal algebra, if you're familiar with that). >> >> Out of curiosity, why isn't constructor-style printing the default for >> the module language as well? > > One reason is that there's no way to know what the constructors "look > like" in the user's language. They could be named anything; the > language's syntax may even vary from Scheme. Student languages are > simpler; all the constructors are known ahead of time. > > A given language can always set up a custom printer based on its own > constructors, but DrScheme can't do that automatically. > > -- > Carl Eastlund > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From matthias at ccs.neu.edu Mon Jun 23 20:34:54 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:01 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> Message-ID: <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> On Jun 23, 2008, at 7:24 PM, Robby Findler wrote: > While what Carl says is true, I believe the spirit of the question is > more like "why isn't constructor (or quasiquote) printing the default > for the 'scheme' and related languages"? > > To which I say "I have suggested this myself! :)" By all means, go for it! > > Robby > > On Mon, Jun 23, 2008 at 6:10 PM, Carl Eastlund > wrote: >> On Mon, Jun 23, 2008 at 6:57 PM, Aleks Bromfield >> wrote: >>> On Mon, Jun 23, 2008 at 04:06:55PM -0400, Matthias Felleisen wrote: >>>> The sad thing is that this is needlessly confusing, especially for >>>> beginners. It is one of the reasons we have teaching languages that >>>> (1) don't allow quote for anything but symbols (pop quiz: is ''a a >>>> symbol?) and (2) renders things as constructed values (think >>>> abstract >>>> or universal algebra, if you're familiar with that). >>> >>> Out of curiosity, why isn't constructor-style printing the >>> default for >>> the module language as well? >> >> One reason is that there's no way to know what the constructors "look >> like" in the user's language. They could be named anything; the >> language's syntax may even vary from Scheme. Student languages are >> simpler; all the constructors are known ahead of time. >> >> A given language can always set up a custom printer based on its own >> constructors, but DrScheme can't do that automatically. >> >> -- >> Carl Eastlund >> _________________________________________________ >> 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 jos.koot at telefonica.net Mon Jun 23 20:39:18 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:02 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> Message-ID: <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> It works for me though: #lang scheme (define-syntax x (syntax-rules () ((_ 1 _) 'one) ((_ _ 2) 'two))) (x 1 monkey) ; one (x monkey 2) ; two Welcome to DrScheme, version 4.0.0.1-svn16jun2008 [3m]. Language: Module. Jos ----- Original Message ----- From: YC To: pltscheme Sent: Tuesday, June 24, 2008 12:32 AM Subject: [plt-scheme] (v4) wildcard not allowed in expression Hi - It seems that in v4 `_` can no longer exist in the expression position for syntax-case, is there a reason for the change? Thanks, yc ------------------------------------------------------------------------------ _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080624/f7403eaa/attachment.html From jos.koot at telefonica.net Mon Jun 23 20:44:23 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:03 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> Message-ID: <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> May be you missed the fact that _ has become a wild-card. Jos ----- Original Message ----- From: Jos Koot To: YC ; pltscheme Sent: Tuesday, June 24, 2008 2:39 AM Subject: Re: [plt-scheme] (v4) wildcard not allowed in expression It works for me though: #lang scheme (define-syntax x (syntax-rules () ((_ 1 _) 'one) ((_ _ 2) 'two))) (x 1 monkey) ; one (x monkey 2) ; two Welcome to DrScheme, version 4.0.0.1-svn16jun2008 [3m]. Language: Module. Jos ----- Original Message ----- From: YC To: pltscheme Sent: Tuesday, June 24, 2008 12:32 AM Subject: [plt-scheme] (v4) wildcard not allowed in expression Hi - It seems that in v4 `_` can no longer exist in the expression position for syntax-case, is there a reason for the change? Thanks, yc ---------------------------------------------------------------------------- _________________________________________________ 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 -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080624/b4940e8f/attachment.htm From jos.koot at telefonica.net Mon Jun 23 20:57:18 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:03 2009 Subject: [plt-scheme] Semantics of quote References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> Message-ID: <006301c8d595$40dd56b0$2101a8c0@uw2b2dff239c4d> I just got home from a midsummernight feast. The answers have already been given. It appears that you only were confused by getting 'a where you expected (quote a). Your concept of quote is right. 'a is just another way of writing (quote a), both in input nd output. I have no opinion on whether to prefer 'a or (quote a) in the output. According to your own concept (quote (my-quote a)) must indeed yield (my-quote a) The macro is not called. Quote makes (my-quote a)) data that is not to be evaluated. As another example: (quote (quasiquote x)) may yield `x or (quasiquote x) depending on the Scheme you are using, Even (list 'quasiquote 'a) may yield (quasiquote a) or `a. It's just a matter of notation. Jos ----- Original Message ----- From: "Mark Engelberg" To: "Jos Koot" Cc: "pltscheme" Sent: Monday, June 23, 2008 9:08 PM Subject: Re: [plt-scheme] Semantics of quote > Some examples: > > (cons 'quote (cons 'a empty)) prints as 'a > > Consider: > (define-syntax my-quote > (syntax-rules () > ((my-quote expr) > (quote expr)))) > > (quote (quote a)) > and > (quote (my-quote a)) > > yield different outputs. > > --Mark > > On Mon, Jun 23, 2008 at 7:52 AM, Jos Koot wrote: >> Can you be somewhat more specific? What kind of subtle things do you >> encounter? >> jos >> ----- Original Message ----- From: "Mark Engelberg" >> >> To: "pltscheme" >> Sent: Monday, June 23, 2008 6:25 AM >> Subject: [plt-scheme] Semantics of quote >> >> >>> Can anyone point me to a fairly precise explanation of quote? >>> Sometimes I encounter subtle things that make me wonder whether my >>> mental model of how quote works is accurate. >>> >>> --Mark >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> From yinso.chen at gmail.com Mon Jun 23 21:31:54 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:04 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression In-Reply-To: <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> Message-ID: <779bf2730806231831i4e5f218et9203bf5d4b7ab471@mail.gmail.com> I used to write _ in the expression as a shorthand to the head of the pattern as follows: Welcome to DrScheme, version 371 [3m]. Language: Pretty Big (includes MrEd and Advanced Student). > (define-syntax (and2 stx) (syntax-case stx () ((_ a b c d ...) #'(_ a (_ b c d ...))) ;;; works ((_ a b) #'(if a b #f)))) > (and2 #t #t #t) #t > (and2 #t #t #t #f) #f In v4 - the above causes the error of "_: wildcard not allowed as an expression in (_ #t (_ #t #f))". I noticed this error using emacs & v4 on Linux. I tried to replicate it using DrScheme (on Windows) and found that with the Module language it will cause the same error, but if using legacy language of Pretty Big, it appears to be behave the same as in 37x. Welcome to DrScheme, version 4.0 [3m]. Language: Module; memory limit: 128 megabytes. > (and2 #t #t #f) ;; throw error . _: wildcard not allowed as an expression in: (_ #t (_ #t #f)) Welcome to DrScheme, version 4.0 [3m]. Language: Pretty Big (includes MrEd and Advanced Student); memory limit: 128 megabytes. > (and #t #t #f) ;; works #f On Mon, Jun 23, 2008 at 5:44 PM, Jos Koot wrote: > May be you missed the fact that _ has become a wild-card. > Jos > > ----- Original Message ----- > *From:* Jos Koot > *To:* YC ; pltscheme > *Sent:* Tuesday, June 24, 2008 2:39 AM > *Subject:* Re: [plt-scheme] (v4) wildcard not allowed in expression > > It works for me though: > > #lang scheme > > (define-syntax x > (syntax-rules () > ((_ 1 _) 'one) > ((_ _ 2) 'two))) > > (x 1 monkey) ; one > (x monkey 2) ; two > > Welcome to DrScheme, version 4.0.0.1-svn16jun2008 [3m]. > Language: Module. > > Jos > > ----- Original Message ----- > *From:* YC > *To:* pltscheme > *Sent:* Tuesday, June 24, 2008 12:32 AM > *Subject:* [plt-scheme] (v4) wildcard not allowed in expression > > Hi - > > It seems that in v4 `_` can no longer exist in the expression position for > syntax-case, is there a reason for the change? > > Thanks, > yc > > ------------------------------ > > _________________________________________________ > 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 -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/3467dba4/attachment.html From jos.koot at telefonica.net Mon Jun 23 21:47:28 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:04 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> <779bf2730806231831i4e5f218et9203bf5d4b7ab471@mail.gmail.com> Message-ID: <007001c8d59c$42c99220$2101a8c0@uw2b2dff239c4d> Correct. _ has become a wild-card that is bound to a syntax that does not want to be called. You can no longer use _ like other symbols. Hence the wild card may appear in a pattern, but you should not use it in a template. That is in R6RS or PLT 4. In 371 _ was just a symbol like any other one. Why in Pretty Big it still works as an ordinary symbol in old fashion, I don't know. If you want a symbol that is associated with the name of the syntax use anything else than a wild-card. The wild-card is not bound to a pattern element (except may be in Pretty Big, I don't know) Jos ----- Original Message ----- From: YC To: Jos Koot Cc: pltscheme Sent: Tuesday, June 24, 2008 3:31 AM Subject: Re: [plt-scheme] (v4) wildcard not allowed in expression I used to write _ in the expression as a shorthand to the head of the pattern as follows: Welcome to DrScheme, version 371 [3m]. Language: Pretty Big (includes MrEd and Advanced Student). > (define-syntax (and2 stx) (syntax-case stx () ((_ a b c d ...) #'(_ a (_ b c d ...))) ;;; works ((_ a b) #'(if a b #f)))) > (and2 #t #t #t) #t > (and2 #t #t #t #f) #f In v4 - the above causes the error of "_: wildcard not allowed as an expression in (_ #t (_ #t #f))". I noticed this error using emacs & v4 on Linux. I tried to replicate it using DrScheme (on Windows) and found that with the Module language it will cause the same error, but if using legacy language of Pretty Big, it appears to be behave the same as in 37x. Welcome to DrScheme, version 4.0 [3m]. Language: Module; memory limit: 128 megabytes. > (and2 #t #t #f) ;; throw error . _: wildcard not allowed as an expression in: (_ #t (_ #t #f)) Welcome to DrScheme, version 4.0 [3m]. Language: Pretty Big (includes MrEd and Advanced Student); memory limit: 128 megabytes. > (and #t #t #f) ;; works #f On Mon, Jun 23, 2008 at 5:44 PM, Jos Koot wrote: May be you missed the fact that _ has become a wild-card. Jos ----- Original Message ----- From: Jos Koot To: YC ; pltscheme Sent: Tuesday, June 24, 2008 2:39 AM Subject: Re: [plt-scheme] (v4) wildcard not allowed in expression It works for me though: #lang scheme (define-syntax x (syntax-rules () ((_ 1 _) 'one) ((_ _ 2) 'two))) (x 1 monkey) ; one (x monkey 2) ; two Welcome to DrScheme, version 4.0.0.1-svn16jun2008 [3m]. Language: Module. Jos ----- Original Message ----- From: YC To: pltscheme Sent: Tuesday, June 24, 2008 12:32 AM Subject: [plt-scheme] (v4) wildcard not allowed in expression Hi - It seems that in v4 `_` can no longer exist in the expression position for syntax-case, is there a reason for the change? Thanks, yc ------------------------------------------------------------------------ _________________________________________________ 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 -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080624/bf72da4c/attachment.htm From yinso.chen at gmail.com Mon Jun 23 22:04:51 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:05 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression In-Reply-To: <007001c8d59c$42c99220$2101a8c0@uw2b2dff239c4d> References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> <779bf2730806231831i4e5f218et9203bf5d4b7ab471@mail.gmail.com> <007001c8d59c$42c99220$2101a8c0@uw2b2dff239c4d> Message-ID: <779bf2730806231904p96c6308j18a376d791958a55@mail.gmail.com> Thanks Jos for the explanation. I do not grok how prohibiting a wildcard appearing in a template makes it useful. Is there a place that explains the rationale behind the change? I tried searching the docs but are not successful so far except for a short description of what you've said in http://docs.plt-scheme.org/reference/stx-patterns.html#(form._((lib._scheme/private/stxcase-scheme..ss)._......)) Thanks, yc On Mon, Jun 23, 2008 at 6:47 PM, Jos Koot wrote: > Correct. _ has become a wild-card that is bound to a syntax that does not > want to be called. You can no longer use _ like other symbols. Hence the > wild card may appear in a pattern, but you should not use it in a template. > That is in R6RS or PLT 4. In 371 _ was just a symbol like any other one. Why > in Pretty Big it still works as an ordinary symbol in old fashion, I don't > know. > If you want a symbol that is associated with the name of the syntax use > anything else than a wild-card. The wild-card is not bound to a pattern > element (except may be in Pretty Big, I don't know) > Jos > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/da9b6600/attachment.html From jos.koot at telefonica.net Mon Jun 23 22:53:14 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:06 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> <779bf2730806231831i4e5f218et9203bf5d4b7ab471@mail.gmail.com> <007001c8d59c$42c99220$2101a8c0@uw2b2dff239c4d> <779bf2730806231904p96c6308j18a376d791958a55@mail.gmail.com> Message-ID: <008001c8d5a5$72e85cd0$2101a8c0@uw2b2dff239c4d> I am not aware to have contributed anything to http://docs.plt-scheme.org/reference/stx-patterns.html#(form._((lib._scheme/private/stxcase-scheme..ss)._......)) :) Wildcards in a pattern are useful though, I think. It is as though saying "i dont care what it is and dont want to know what it is". But if you realy don't care, there is no issue by binding the wild-card. It is possible to do without the wild-card. There are two things that make the wild-card different: 1 : it may appear more than once in a pattern. Other symbols in a pattern do not have this privilege. 2 : The wild-card is completely ignored. Wild cards are a method in pattern matching (thats what syntax-rules and syntax-case are about) I must admit that I use the _ only as in (syntax-case stx () ((_ whatever ...) template)) I admit that in most cases a macro writer is interested in what the user did write in the macro call. I cannot answer the "why". But the "how" is clear to you now, I am sure. I have done many courses on how to use a computer (dating from decades from now) Students often asked me "why do I have this to do in this way?" Answer: because that is the way that makes it work. On the PLT list or bug-report form you have the opportunity to express how you want to work things (which a few decades ago was unthinkable) My experience is that the PLT team is susceptible for new ideas. But in the present case I think that the wild-card is a commonly accepted and wanted feature that is not going to be altered. May be you are experiencing, just as I do, that improvements on the language require efforts of the user on adapting his/her code. That's annoying of course, but without a posotive attitude of the users, software providers cannot implement improvements. MHO, Jos ----- Original Message ----- From: YC To: Jos Koot Cc: pltscheme Sent: Tuesday, June 24, 2008 4:04 AM Subject: Re: [plt-scheme] (v4) wildcard not allowed in expression Thanks Jos for the explanation. I do not grok how prohibiting a wildcard appearing in a template makes it useful. Is there a place that explains the rationale behind the change? I tried searching the docs but are not successful so far except for a short description of what you've said in http://docs.plt-scheme.org/reference/stx-patterns.html#(form._((lib._scheme/private/stxcase-scheme..ss)._......)) Thanks, yc On Mon, Jun 23, 2008 at 6:47 PM, Jos Koot wrote: Correct. _ has become a wild-card that is bound to a syntax that does not want to be called. You can no longer use _ like other symbols. Hence the wild card may appear in a pattern, but you should not use it in a template. That is in R6RS or PLT 4. In 371 _ was just a symbol like any other one. Why in Pretty Big it still works as an ordinary symbol in old fashion, I don't know. If you want a symbol that is associated with the name of the syntax use anything else than a wild-card. The wild-card is not bound to a pattern element (except may be in Pretty Big, I don't know) Jos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080624/31c15124/attachment.htm From robby at cs.uchicago.edu Mon Jun 23 22:57:43 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:21:06 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression In-Reply-To: <779bf2730806231904p96c6308j18a376d791958a55@mail.gmail.com> References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> <779bf2730806231831i4e5f218et9203bf5d4b7ab471@mail.gmail.com> <007001c8d59c$42c99220$2101a8c0@uw2b2dff239c4d> <779bf2730806231904p96c6308j18a376d791958a55@mail.gmail.com> Message-ID: <932b2f1f0806231957v22477ad5gba44af094e1c180b@mail.gmail.com> I believe the idea was that if someone writes an underscore in a macro pattern it is a signal to the reader that this part of the pattern is not looked at and that a little bit of language support would be a Good Thing (tm) for this convention. I believe that the change is at least mentioned in the mzscheme v4 change notes. (You may find other goodies there :). Robby On Mon, Jun 23, 2008 at 9:04 PM, YC wrote: > Thanks Jos for the explanation. > > I do not grok how prohibiting a wildcard appearing in a template makes it > useful. Is there a place that explains the rationale behind the change? I > tried searching the docs but are not successful so far except for a short > description of what you've said in > http://docs.plt-scheme.org/reference/stx-patterns.html#(form._((lib._scheme/private/stxcase-scheme..ss)._......)) > > Thanks, > yc > > On Mon, Jun 23, 2008 at 6:47 PM, Jos Koot wrote: >> >> Correct. _ has become a wild-card that is bound to a syntax that does not >> want to be called. You can no longer use _ like other symbols. Hence the >> wild card may appear in a pattern, but you should not use it in a template. >> That is in R6RS or PLT 4. In 371 _ was just a symbol like any other one. Why >> in Pretty Big it still works as an ordinary symbol in old fashion, I don't >> know. >> If you want a symbol that is associated with the name of the syntax use >> anything else than a wild-card. The wild-card is not bound to a pattern >> element (except may be in Pretty Big, I don't know) >> Jos > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > From eli at barzilay.org Tue Jun 24 00:20:52 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:06 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> Message-ID: <18528.30244.830694.452888@arabic.ccs.neu.edu> On Jun 23, Matthias Felleisen wrote: > > On Jun 23, 2008, at 7:24 PM, Robby Findler wrote: > > > While what Carl says is true, I believe the spirit of the question is > > more like "why isn't constructor (or quasiquote) printing the default > > for the 'scheme' and related languages"? > > > > To which I say "I have suggested this myself! :)" > > By all means, go for it! -1 -- since this runs into a bunch of messes like not going well with pretty printing, or unprintable values like (list +)... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at cs.uchicago.edu Tue Jun 24 00:52:33 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:21:06 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <18528.30244.830694.452888@arabic.ccs.neu.edu> References: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> <18528.30244.830694.452888@arabic.ccs.neu.edu> Message-ID: <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> (list +) is fine. In general, there are exactly as many unprintable values as there were before, I believe (or at least there should be ...). Pretty-printing also seems okay, but I'm not sure where you're going with that one. Robby On Mon, Jun 23, 2008 at 11:20 PM, Eli Barzilay wrote: > On Jun 23, Matthias Felleisen wrote: >> >> On Jun 23, 2008, at 7:24 PM, Robby Findler wrote: >> >> > While what Carl says is true, I believe the spirit of the question is >> > more like "why isn't constructor (or quasiquote) printing the default >> > for the 'scheme' and related languages"? >> > >> > To which I say "I have suggested this myself! :)" >> >> By all means, go for it! > > -1 -- since this runs into a bunch of messes like not going well with > pretty printing, or unprintable values like (list +)... > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > > From robby at cs.uchicago.edu Tue Jun 24 00:53:12 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:21:07 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> References: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> Message-ID: <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> Oops, forgot to include this in my message below: Welcome to DrScheme, version 4.0.1-svn21jun2008 [3m]. Language: Module custom; memory limit: 128 megabytes. > (list +) (list +) > On Mon, Jun 23, 2008 at 11:52 PM, Robby Findler wrote: > (list +) is fine. In general, there are exactly as many unprintable > values as there were before, I believe (or at least there should be > ...). Pretty-printing also seems okay, but I'm not sure where you're > going with that one. > > Robby > > > On Mon, Jun 23, 2008 at 11:20 PM, Eli Barzilay wrote: >> On Jun 23, Matthias Felleisen wrote: >>> >>> On Jun 23, 2008, at 7:24 PM, Robby Findler wrote: >>> >>> > While what Carl says is true, I believe the spirit of the question is >>> > more like "why isn't constructor (or quasiquote) printing the default >>> > for the 'scheme' and related languages"? >>> > >>> > To which I say "I have suggested this myself! :)" >>> >>> By all means, go for it! >> >> -1 -- since this runs into a bunch of messes like not going well with >> pretty printing, or unprintable values like (list +)... >> -- >> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: >> http://www.barzilay.org/ Maze is Life! >> >> > From eli at barzilay.org Tue Jun 24 01:01:42 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:07 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> References: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> Message-ID: <18528.32694.25991.64606@arabic.ccs.neu.edu> On Jun 23, Robby Findler wrote: > (list +) is fine. If it's '(+) then how is this different than (list '+); and if it's '(#) then the quote is meaningless as a consructor (eg, you can't copy the result as an expression) and you'll also want '# which quickly turns it into a character displayed in front of all values, which makes little sense. (This is just what Carl said: with the teaching languages you can actually print stuff in a way that can be evaluated back.) > In general, there are exactly as many unprintable values as there > were before, I believe (or at least there should be > ...). Obviously. Same as any output prefix. > Pretty-printing also seems okay, but I'm not sure where you're going > with that one. Assuming a narrow screen, how does (list 'define 'define 'define) print: '(define define define) or '(define define define) IMO, if you add quote, you should go for the first option or better not use pretty printing. The contradicting goals are quote trying to make results look like values and pretty-printing makes them look like code. > On Mon, Jun 23, 2008 at 11:20 PM, Eli Barzilay wrote: > > On Jun 23, Matthias Felleisen wrote: > >> > >> On Jun 23, 2008, at 7:24 PM, Robby Findler wrote: > >> > >> > While what Carl says is true, I believe the spirit of the question is > >> > more like "why isn't constructor (or quasiquote) printing the default > >> > for the 'scheme' and related languages"? > >> > > >> > To which I say "I have suggested this myself! :)" > >> > >> By all means, go for it! > > > > -1 -- since this runs into a bunch of messes like not going well with > > pretty printing, or unprintable values like (list +)... > > -- > > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > > http://www.barzilay.org/ Maze is Life! > > > > -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Tue Jun 24 01:10:33 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:07 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> References: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> Message-ID: <18528.33225.480520.529197@arabic.ccs.neu.edu> On Jun 23, Robby Findler wrote: > Oops, forgot to include this in my message below: > > Welcome to DrScheme, version 4.0.1-svn21jun2008 [3m]. > Language: Module custom; memory limit: 128 megabytes. > > (list +) > (list +) I take it that you'll want to see this then: > '(+) (list '+) > ''(+) (list 'quote (list '+)) > '''(+) (list 'quote (list 'quote (list '+))) > '(if (< x y) (+ x y) -1) (list 'if (list '< 'x 'y) (list '+ 'x 'y) -1) This is even worse. I spent a few years working on getting the advantages of a constant-size addition for quotation (where each level of quotation can be represented by a constant (or at least linear) addition) -- in other words, I spent nearly a decade talking about why quoting is good, and you want to throw this natural advantage and intentionally make it print with the exponential representation. > On Mon, Jun 23, 2008 at 11:52 PM, Robby Findler wrote: > > (list +) is fine. In general, there are exactly as many unprintable > > values as there were before, I believe (or at least there should be > > ...). Pretty-printing also seems okay, but I'm not sure where you're > > going with that one. > > > > Robby > > > > > > On Mon, Jun 23, 2008 at 11:20 PM, Eli Barzilay wrote: > >> On Jun 23, Matthias Felleisen wrote: > >>> > >>> On Jun 23, 2008, at 7:24 PM, Robby Findler wrote: > >>> > >>> > While what Carl says is true, I believe the spirit of the question is > >>> > more like "why isn't constructor (or quasiquote) printing the default > >>> > for the 'scheme' and related languages"? > >>> > > >>> > To which I say "I have suggested this myself! :)" > >>> > >>> By all means, go for it! > >> > >> -1 -- since this runs into a bunch of messes like not going well with > >> pretty printing, or unprintable values like (list +)... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at cs.uchicago.edu Tue Jun 24 01:11:39 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:21:07 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <18528.32694.25991.64606@arabic.ccs.neu.edu> References: <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> Message-ID: <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> On Tue, Jun 24, 2008 at 12:01 AM, Eli Barzilay wrote: > On Jun 23, Robby Findler wrote: >> (list +) is fine. > > If it's > > '(+) > > then how is this different than (list '+); and if it's > > '(#) > > then the quote is meaningless as a consructor (eg, you can't copy the > result as an expression) and you'll also want > > '# > > which quickly turns it into a character displayed in front of all > values, which makes little sense. None of those seem like good ideas. I can see why you don't like that! I wouldn't suggest that. FWIW, you can actually try this stuff out. There's the constructor-style printing in drscheme where you get: > (list +) (list +) > `(,+) (list +) and there's the quasiquote style printing where you get: > (list +) `(,+) > `(,+) `(,+) >> In general, there are exactly as many unprintable values as there >> were before, I believe (or at least there should be >> ...). > > Obviously. Same as any output prefix. Sorry, I took that comment from you as a reason why you didn't like my suggestion. >> Pretty-printing also seems okay, but I'm not sure where you're going >> with that one. > > Assuming a narrow screen, how does (list 'define 'define 'define) > print: > > '(define > define > define) > > or > > '(define define > define) That isn't specific to the printing style I'm proposing. Pretty-print with or without stripping off the quote still has issues. > IMO, if you add quote, you should go for the first option or better > not use pretty printing. The contradicting goals are quote trying to > make results look like values and pretty-printing makes them look like > code. "add quote" is the wrong way to put it, I believe. "Avoid removing quote" is the right way to say it, IMO. But that's just terminology. The contradiction is still manifest in what I'm suggesting, but it shows up in the choice of "quasiquote" printing vs "constructor style" printing. All I'm trying to fix is to make the output use input notation (I really just want input and output notation to match up and I suppose one coudl try to make input use the current output notation but that seems like the wrong choice.) Robby From robby at cs.uchicago.edu Tue Jun 24 01:14:49 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:21:07 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <18528.33225.480520.529197@arabic.ccs.neu.edu> References: <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> Message-ID: <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> On Tue, Jun 24, 2008 at 12:10 AM, Eli Barzilay wrote: > On Jun 23, Robby Findler wrote: >> Oops, forgot to include this in my message below: >> >> Welcome to DrScheme, version 4.0.1-svn21jun2008 [3m]. >> Language: Module custom; memory limit: 128 megabytes. >> > (list +) >> (list +) > > I take it that you'll want to see this then: > > > '(+) > (list '+) > > ''(+) > (list 'quote (list '+)) > > '''(+) > (list 'quote (list 'quote (list '+))) > > '(if (< x y) (+ x y) -1) > (list 'if (list '< 'x 'y) (list '+ 'x 'y) -1) > > This is even worse. I spent a few years working on getting the > advantages of a constant-size addition for quotation (where each level > of quotation can be represented by a constant (or at least linear) > addition) -- in other words, I spent nearly a decade talking about why > quoting is good, and you want to throw this natural advantage and > intentionally make it print with the exponential representation. Quoting is good. Of course. I never said it wasn't. Let me remind you again about the quasiquote printer. The "exponential representation" you're talking about is presumably situations like this: (define x1 (list 'x)) (define x2 (list x1 x1)) (define x3 (list x2 x2)) .. (define xn (list xn-1 xn-1)) But again, that's completely separate from the issue of how the printer prints. If you don't turn on cycle detection with mzscheme's current printer you get huge terms for that stuff too. "shared" is how one detects & prints cycles for that stuff in my world. Robby From eli at barzilay.org Tue Jun 24 01:28:00 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:08 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> References: <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> <990e0c030806231610x6bcafd49n8c9379b6d803233b@mail.gmail.com> <932b2f1f0806231624h2ae5c443kcabbadbd4e8d6780@mail.gmail.com> <497D978D-6222-4E43-9B1D-E2FA2E91B917@ccs.neu.edu> <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> Message-ID: <18528.34272.416626.680000@arabic.ccs.neu.edu> On Jun 24, Robby Findler wrote: > > None of those seem like good ideas. I can see why you don't like that! > I wouldn't suggest that. FWIW, you can actually try this stuff out. > There's the constructor-style printing in drscheme where you get: I know about it, of course, and it's a bad idea for general hacking. (define (a) 1) (define (b) 2) (list a b) > > IMO, if you add quote, you should go for the first option or > > better not use pretty printing. The contradicting goals are quote > > trying to make results look like values and pretty-printing makes > > them look like code. > > "add quote" is the wrong way to put it, I believe. "Avoid removing > quote" is the right way to say it, IMO. But that's just terminology. I can say the opposite and have a perfectly valid view of the world... > The contradiction is still manifest in what I'm suggesting, but it > shows up in the choice of "quasiquote" printing vs "constructor > style" printing. All I'm trying to fix is to make the output use > input notation (I really just want input and output notation to > match up and I suppose one coudl try to make input use the current > output notation but that seems like the wrong choice.) But that doesn't work for cases like functions and other unpritable values. On Jun 24, Robby Findler wrote: > On Tue, Jun 24, 2008 at 12:10 AM, Eli Barzilay wrote: > > On Jun 23, Robby Findler wrote: > >> Oops, forgot to include this in my message below: > >> > >> Welcome to DrScheme, version 4.0.1-svn21jun2008 [3m]. > >> Language: Module custom; memory limit: 128 megabytes. > >> > (list +) > >> (list +) > > > > I take it that you'll want to see this then: > > > > > '(+) > > (list '+) > > > ''(+) > > (list 'quote (list '+)) > > > '''(+) > > (list 'quote (list 'quote (list '+))) > > > '(if (< x y) (+ x y) -1) > > (list 'if (list '< 'x 'y) (list '+ 'x 'y) -1) > > > > This is even worse. I spent a few years working on getting the > > advantages of a constant-size addition for quotation (where each level > > of quotation can be represented by a constant (or at least linear) > > addition) -- in other words, I spent nearly a decade talking about why > > quoting is good, and you want to throw this natural advantage and > > intentionally make it print with the exponential representation. > > Quoting is good. Of course. I never said it wasn't. Let me remind you > again about the quasiquote printer. > > The "exponential representation" you're talking about is presumably > situations like this: > > (define x1 (list 'x)) > (define x2 (list x1 x1)) > (define x3 (list x2 x2)) > .. > (define xn (list xn-1 xn-1)) > ... Not at all. Using the above terms what I'm talking about is the fact that with constructor style (and quasiquote style, for things that are not lists), printout size is exponential to the level of quotedness, because each construtor needs to be quoted itself. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at cs.uchicago.edu Tue Jun 24 01:34:34 2008 From: robby at cs.uchicago.edu (Robby Findler) Date: Thu Mar 26 02:21:08 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <18528.34272.416626.680000@arabic.ccs.neu.edu> References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> Message-ID: <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> On Tue, Jun 24, 2008 at 12:28 AM, Eli Barzilay wrote: > On Jun 24, Robby Findler wrote: >> >> None of those seem like good ideas. I can see why you don't like that! >> I wouldn't suggest that. FWIW, you can actually try this stuff out. >> There's the constructor-style printing in drscheme where you get: > > I know about it, of course, and it's a bad idea for general > hacking. > > (define (a) 1) > (define (b) 2) > (list a b) Obviously, this prints as (list a b) or `(,a ,b) which seems just as good as '(# #) But I'd be fine with a different way to print (unquoted) procedures. Something like we do in the teaching languages perhaps: (list function:a function:b) or a variation on that. >> > IMO, if you add quote, you should go for the first option or >> > better not use pretty printing. The contradicting goals are quote >> > trying to make results look like values and pretty-printing makes >> > them look like code. >> >> "add quote" is the wrong way to put it, I believe. "Avoid removing >> quote" is the right way to say it, IMO. But that's just terminology. > > I can say the opposite and have a perfectly valid view of the world... Right. Except that the quote is really there. >> The contradiction is still manifest in what I'm suggesting, but it >> shows up in the choice of "quasiquote" printing vs "constructor >> style" printing. All I'm trying to fix is to make the output use >> input notation (I really just want input and output notation to >> match up and I suppose one coudl try to make input use the current >> output notation but that seems like the wrong choice.) > > But that doesn't work for cases like functions and other unpritable > values. As I wrote, it continues to not work in the same ways, except you don't have to make up new notations in a few cases (ie, primitive names are the same). > what I'm talking about is the fact > that with constructor style (and quasiquote style, for things that are > not lists), printout size is exponential to the level of quotedness, > because each construtor needs to be quoted itself. This seems to be wrong. Here's what I tried. I guess you still haven't taken me up on my invitation to try this out in drscheme. ;; in constructor mode: > ''''(? (x) x) (list 'quote (list 'quote (list 'quote (list '? (list 'x) 'x)))) ;; in qq mode: > ''''(? (x) x) `'''(? (x) x) Robby From yinso.chen at gmail.com Tue Jun 24 01:36:23 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:09 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression In-Reply-To: <008001c8d5a5$72e85cd0$2101a8c0@uw2b2dff239c4d> References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> <779bf2730806231831i4e5f218et9203bf5d4b7ab471@mail.gmail.com> <007001c8d59c$42c99220$2101a8c0@uw2b2dff239c4d> <779bf2730806231904p96c6308j18a376d791958a55@mail.gmail.com> <008001c8d5a5$72e85cd0$2101a8c0@uw2b2dff239c4d> Message-ID: <779bf2730806232236u5b43b979s53f9dfd75380a80b@mail.gmail.com> On Mon, Jun 23, 2008 at 7:53 PM, Jos Koot wrote: > > Wild cards are a method in pattern matching (thats what syntax-rules and > syntax-case are about) > I must admit that I use the _ only as in (syntax-case stx () ((_ whatever > ...) template)) > Most of my macros fall into this case as well... unfortuantely ;) May be you are experiencing, just as I do, that improvements on the language > require efforts of the user on adapting his/her code. That's annoying of > course, but without a posotive attitude of the users, software providers > cannot implement improvements. > Hopefully I didn't sound like I'm griping :) To me - understanding the rationale helps me know how best to adapt and take advantage of the changes. Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/f262826e/attachment.html From yinso.chen at gmail.com Tue Jun 24 01:45:18 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:09 2009 Subject: [plt-scheme] (v4) wildcard not allowed in expression In-Reply-To: <932b2f1f0806231957v22477ad5gba44af094e1c180b@mail.gmail.com> References: <779bf2730806231532l7a16548dr50dbf6566060fbf3@mail.gmail.com> <004401c8d592$bd4fbc40$2101a8c0@uw2b2dff239c4d> <005701c8d593$72f75620$2101a8c0@uw2b2dff239c4d> <779bf2730806231831i4e5f218et9203bf5d4b7ab471@mail.gmail.com> <007001c8d59c$42c99220$2101a8c0@uw2b2dff239c4d> <779bf2730806231904p96c6308j18a376d791958a55@mail.gmail.com> <932b2f1f0806231957v22477ad5gba44af094e1c180b@mail.gmail.com> Message-ID: <779bf2730806232245r6435ebbcm142c2ed5da49ed03@mail.gmail.com> On Mon, Jun 23, 2008 at 7:57 PM, Robby Findler wrote: > I believe that the change is at least mentioned in the mzscheme v4 > change notes. (You may find other goodies there :). > Somehow I didn't locate the release notes ( http://docs.plt-scheme.org/release-notes/mzscheme/MzScheme_4.txt) until you point out that it exists...! Yes there *are* a lot of gems that woudl have saved me quite a bit of time had I found it earlier... Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080623/a4d8cce2/attachment.htm From eli at barzilay.org Tue Jun 24 01:50:14 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:09 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> Message-ID: <18528.35606.914993.279937@arabic.ccs.neu.edu> On Jun 24, Robby Findler wrote: > On Tue, Jun 24, 2008 at 12:28 AM, Eli Barzilay wrote: > > On Jun 24, Robby Findler wrote: > >> > >> None of those seem like good ideas. I can see why you don't like that! > >> I wouldn't suggest that. FWIW, you can actually try this stuff out. > >> There's the constructor-style printing in drscheme where you get: > > > > I know about it, of course, and it's a bad idea for general > > hacking. > > > > (define (a) 1) > > (define (b) 2) > > (list a b) > > Obviously, this prints as > > (list a b) > > or > > `(,a ,b) That's not what it does now, and trying to do this properly won't work with (list (let ([a (lambda () 1)]) a) (let ([a (lambda () 2)]) a)) > which seems just as good as > > '(# #) That's the whole point -- the "'" is a kind of a "I'm readable, you can type me" signal, and "#<" is the opposite. Mixing them is bad. > But I'd be fine with a different way to print (unquoted) procedures. > Something like we do in the teaching languages perhaps: > > (list function:a function:b) > > or a variation on that. Then I no longer see any point in all this. I thought it was supposed to be printing values in a way that is readable (or looks like it's readable) and this is now getting to just having verbose descriptions that are unrelated to source. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From entarter at gmail.com Tue Jun 24 04:51:09 2008 From: entarter at gmail.com (Killian McCutcheon) Date: Thu Mar 26 02:21:10 2009 Subject: [plt-scheme] Macro troubles In-Reply-To: <310ea7f60806240147g14d5b4fdv2c8ceefc6e8676be@mail.gmail.com> References: <310ea7f60806231253h3f53de95gd46c92bdf9b2811f@mail.gmail.com> <310ea7f60806240147g14d5b4fdv2c8ceefc6e8676be@mail.gmail.com> Message-ID: <310ea7f60806240151u14105112u19346b5ccce071fc@mail.gmail.com> On 6/23/08, Noel Welsh wrote: > > I really don't see any advantage in implementing this as macros, and > > indeed you get yourself a whole heap of extra issue to figure out. > I guess that's what I needed to hear. It's really just an exercise for myself to learn macros, the game is already finished. I can think of a few other ways to implement this, I just figured macros would result in the least and most flexible code. I had a feeling the problem with procedure-arity was the disparity between runtime and 'compile' time environments. Can anyone point to a document that clearly describes what is available at macro expansion time? I'm still confused as to the syntax error for the second version. Doesn't matter though, the point is moot. Thanks all for the speedy feedback Cheers, Killian > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080624/4c2e3004/attachment.html From mflatt at cs.utah.edu Tue Jun 24 07:36:08 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:10 2009 Subject: [plt-scheme] Macro troubles In-Reply-To: <310ea7f60806240151u14105112u19346b5ccce071fc@mail.gmail.com> References: <310ea7f60806231253h3f53de95gd46c92bdf9b2811f@mail.gmail.com> <310ea7f60806240147g14d5b4fdv2c8ceefc6e8676be@mail.gmail.com> <310ea7f60806240151u14105112u19346b5ccce071fc@mail.gmail.com> Message-ID: <20080624113611.B32566500CB@mail-svr1.cs.utah.edu> At Tue, 24 Jun 2008 10:51:09 +0200, "Killian McCutcheon" wrote: > I had a feeling the problem with procedure-arity was the disparity between > runtime and 'compile' time environments. Can anyone point to a document that > clearly describes what is available at macro expansion time? The "Macros" chapter of the new guide may help: http://docs.plt-scheme.org/guide/macros.html Section 16.2.4 discusses compile-time versus run-time phases. Matthew From mflatt at cs.utah.edu Tue Jun 24 07:47:48 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:11 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <20080623225755.GA20467@cs.brown.edu> References: <000e01c8d540$d242b730$2101a8c0@uw2b2dff239c4d> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <7CFE6B58-8954-4F45-8F49-31B5C430FEBC@ccs.neu.edu> <20080623225755.GA20467@cs.brown.edu> Message-ID: <20080624114751.01DAE6500AF@mail-svr1.cs.utah.edu> At Mon, 23 Jun 2008 18:57:55 -0400, Aleks Bromfield wrote: > On Mon, Jun 23, 2008 at 04:06:55PM -0400, Matthias Felleisen wrote: > > The sad thing is that this is needlessly confusing, especially for > > beginners. It is one of the reasons we have teaching languages that > > (1) don't allow quote for anything but symbols (pop quiz: is ''a a > > symbol?) and (2) renders things as constructed values (think abstract > > or universal algebra, if you're familiar with that). > > Out of curiosity, why isn't constructor-style printing the default for > the module language as well? The conversation has moved on, but I can explain some history to answer to the original question: Early in planning for v4.0, we decided not to change Scheme output printing; at the time, it seemed too big a change to tackle. In retrospect, it doesn't sound much bigger than the changes that we did make. But the question is tied up with the general problem of configuring output printing for different languages, which is something we still don't have a handle on. (Maybe it would have been better to force that question earlier rather than later; I don't know.) Matthew From matthias at ccs.neu.edu Tue Jun 24 07:55:16 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:11 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <18528.35606.914993.279937@arabic.ccs.neu.edu> References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> <18528.35606.914993.279937@arabic.ccs.neu.edu> Message-ID: On Jun 24, 2008, at 1:50 AM, Eli Barzilay wrote: > I thought it was supposed > to be printing values in a way that is readable (or looks like it's > readable) > the quote is meaningless as a consructor Eli, QUOTE is NOT a constructor. As you well know, QUOTE doesn't even exist anymore at compile time. It's gone. Constructor-style means "algebraic construction of the data, plus sharing" (cons, make-foo, vector, etc). This has nothing to do with reading but comprehension. QUOTE is incomprehensible for the novice and living w/o is impossible, too, especially QUASI and QUINE. Constructor style printing is a bridge between the two worlds. -- Matthias From eli at barzilay.org Tue Jun 24 08:50:29 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:11 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> <18528.35606.914993.279937@arabic.ccs.neu.edu> Message-ID: <18528.60821.434139.6594@arabic.ccs.neu.edu> On Jun 24, Matthias Felleisen wrote: > > On Jun 24, 2008, at 1:50 AM, Eli Barzilay wrote: > > > I thought it was supposed > > to be printing values in a way that is readable (or looks like it's > > readable) > > > the quote is meaningless as a consructor > > Eli, QUOTE is NOT a constructor. Right, I should have said "constructor-shorthand" or something along these lines. > As you well know, QUOTE doesn't even exist anymore at compile > time. It's gone. Yes, one point I made was just that -- that printing a quote means adding it to the output. > Constructor-style means "algebraic construction of the data, plus > sharing" (cons, make-foo, vector, etc). In both cases you're trying to print out things in a way that can be entered back in to reconstruct the value (with quasiquote being just a shorthand for the case of pairs) -- and since that is not possible you're forced to mix some descriptions (for stuff that you describe) with things like #. So instead of "algebraic" printouts you get some confused mix of - limited "algebraic-like" subset - "here's roughly how it looks like" subset (eg, "(lambda (a1) ...)", or `lazy' that prints as `delay') - plain unreadable stuff (like input ports) and in the process you step over custom struct writers. > This has nothing to do with reading but comprehension. > > QUOTE is incomprehensible for the novice and living w/o is > impossible, too, especially QUASI and QUINE. Constructor style > printing is a bridge between the two worlds. I agree with the problems novices have, but that's exactly an argument for wiring the printer to the language, so htdp languages can have the algebraic printout/quasi shorthands that can actually work in that world. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From matthias at ccs.neu.edu Tue Jun 24 09:36:21 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:11 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <18528.60821.434139.6594@arabic.ccs.neu.edu> References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> <18528.35606.914993.279937@arabic.ccs.neu.edu> <18528.60821.434139.6594@arabic.ccs.neu.edu> Message-ID: <3BEF02AF-CB23-4FE1-873A-05EADAE3B1F7@ccs.neu.edu> On Jun 24, 2008, at 8:50 AM, Eli Barzilay wrote: > ... but that's exactly an argument > for wiring the printer to the language, so htdp languages can have the > algebraic printout/quasi shorthands that can actually work in that > world. Nothing is an argument for hard-wiring a specific printer to any language. LISP got that wrong, big time, and Scheme inherited it and failed. PLT Scheme separates the two and allows you to plug in your own printer. Have you ever worked in a language with a constructor-style printer? I know Robby and I have a significant amount of experience. -- Matthias From eli at barzilay.org Tue Jun 24 10:00:26 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:11 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <3BEF02AF-CB23-4FE1-873A-05EADAE3B1F7@ccs.neu.edu> References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> <18528.35606.914993.279937@arabic.ccs.neu.edu> <18528.60821.434139.6594@arabic.ccs.neu.edu> <3BEF02AF-CB23-4FE1-873A-05EADAE3B1F7@ccs.neu.edu> Message-ID: <18528.65018.436242.347685@arabic.ccs.neu.edu> On Jun 24, Matthias Felleisen wrote: > > On Jun 24, 2008, at 8:50 AM, Eli Barzilay wrote: > > > ... but that's exactly an argument > > for wiring the printer to the language, so htdp languages can have the > > algebraic printout/quasi shorthands that can actually work in that > > world. > > > Nothing is an argument for hard-wiring a specific printer to any > language. LISP got that wrong, Actually common lisp had local struct printers for ages, and a way to change printouts globally by making them a generic function. > big time, and Scheme inherited it and failed. PLT Scheme separates > the two and allows you to plug in your own printer. Not in a convenient way (eg, Swindle has a few major hoops to jump through, and it's still incomplete), and not wired into a language. > Have you ever worked in a language with a constructor-style printer? > I know Robby and I have a significant amount of experience. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From matthias at ccs.neu.edu Tue Jun 24 10:05:08 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:11 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <18528.65018.436242.347685@arabic.ccs.neu.edu> References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> <18528.35606.914993.279937@arabic.ccs.neu.edu> <18528.60821.434139.6594@arabic.ccs.neu.edu> <3BEF02AF-CB23-4FE1-873A-05EADAE3B1F7@ccs.neu.edu> <18528.65018.436242.347685@arabic.ccs.neu.edu> Message-ID: <7CE12C0E-60C6-411D-9466-16B4B859AB73@ccs.neu.edu> On Jun 24, 2008, at 10:00 AM, Eli Barzilay wrote: > On Jun 24, Matthias Felleisen wrote: >> >> On Jun 24, 2008, at 8:50 AM, Eli Barzilay wrote: >> >>> ... but that's exactly an argument >>> for wiring the printer to the language, so htdp languages can >>> have the >>> algebraic printout/quasi shorthands that can actually work in that >>> world. >> >> >> Nothing is an argument for hard-wiring a specific printer to any >> language. LISP got that wrong, > > Actually common lisp had local struct printers for ages, That's not the same! > and a way to change printouts globally by making them a generic > function. I sit corrected especially if it applies to lists. > Not in a convenient way Then it's time to work harder and to do so we must experiment. >> Have you ever worked in a language with a constructor-style printer? >> I know Robby and I have a significant amount of experience. ??? From eli at barzilay.org Tue Jun 24 10:17:56 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:12 2009 Subject: [plt-scheme] Semantics of quote In-Reply-To: <7CE12C0E-60C6-411D-9466-16B4B859AB73@ccs.neu.edu> References: <18528.30244.830694.452888@arabic.ccs.neu.edu> <932b2f1f0806232152r7f7745c1id6d783eff704614c@mail.gmail.com> <932b2f1f0806232153k3c51e2ck75db35f5b75631e4@mail.gmail.com> <18528.33225.480520.529197@arabic.ccs.neu.edu> <932b2f1f0806232214l72009dc0q36780fafa3cadcbe@mail.gmail.com> <415DF254-6418-4836-B490-1EDE6D283000@gmail.com> <18528.32694.25991.64606@arabic.ccs.neu.edu> <932b2f1f0806232211h69e3f888x886bbb21b9260506@mail.gmail.com> <18528.34272.416626.680000@arabic.ccs.neu.edu> <932b2f1f0806232234y5af77a63ye9c7b0a16592a09c@mail.gmail.com> <18528.35606.914993.279937@arabic.ccs.neu.edu> <18528.60821.434139.6594@arabic.ccs.neu.edu> <3BEF02AF-CB23-4FE1-873A-05EADAE3B1F7@ccs.neu.edu> <18528.65018.436242.347685@arabic.ccs.neu.edu> <7CE12C0E-60C6-411D-9466-16B4B859AB73@ccs.neu.edu> Message-ID: <18529.532.618182.360504@arabic.ccs.neu.edu> On Jun 24, Matthias Felleisen wrote: > > On Jun 24, 2008, at 10:00 AM, Eli Barzilay wrote: > > > On Jun 24, Matthias Felleisen wrote: > >> > >> On Jun 24, 2008, at 8:50 AM, Eli Barzilay wrote: > >> > >>> ... but that's exactly an argument > >>> for wiring the printer to the language, so htdp languages can > >>> have the > >>> algebraic printout/quasi shorthands that can actually work in that > >>> world. > >> > >> > >> Nothing is an argument for hard-wiring a specific printer to any > >> language. LISP got that wrong, > > > > Actually common lisp had local struct printers for ages, > > That's not the same! > > > and a way to change printouts globally by making them a generic > > function. > > I sit corrected especially if it applies to lists. Yes. It's the `print-object' generic function, and it's there even in cltl2. > > Not in a convenient way > > Then it's time to work harder and to do so we must experiment. > > > >> Have you ever worked in a language with a constructor-style printer? > >> I know Robby and I have a significant amount of experience. > > ??? Yes. Do I have to go into the flames? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From cppljevans at suddenlink.net Tue Jun 24 10:48:00 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:21:12 2009 Subject: [plt-scheme] [library doc bug?]combinators.plt/doc.txt curry yrruc same def Message-ID: > http://planet.plt-scheme.org/package-source/cce/combinators.plt/1/4/doc.txt has the same definition for curry and yrruc. I assume that since the letters in 'yrruc' are the reverse of those in 'curry' that one function is a kind of inverse of the other; however, the definition does not reflect that. From cce at ccs.neu.edu Tue Jun 24 10:46:32 2008 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Mar 26 02:21:12 2009 Subject: [plt-scheme] [library doc bug?]combinators.plt/doc.txt curry yrruc same def In-Reply-To: References: Message-ID: <990e0c030806240746r7fc743f5qa284073f81438a65@mail.gmail.com> On Tue, Jun 24, 2008 at 10:48 AM, Larry Evans wrote: >> >> http://planet.plt-scheme.org/package-source/cce/combinators.plt/1/4/doc.txt > > has the same definition for curry and yrruc. I assume > that since the letters in 'yrruc' are the reverse of > those in 'curry' that one function is a kind of > inverse of the other; however, the definition > does not reflect that. The 'yrruc' function appends the argument lists in the opposite order (although it does not reverse the order of the individual arguments in each list). For instance: ((curry list 1 2) 3 4) = (list 1 2 3 4) ((yrruc list 1 2) 3 4) = (list 3 4 1 2) I plan to add PLT 4.0.1-compatible, keyword-supporting versions of these functions to cce/scheme.plt version 1.2 (as yet unreleased) by the names curry1 and curry1r. The new scheme/function library (provided by default in #lang scheme) provides curry and curryr, which have a similar purpose but different behavior. -- Carl Eastlund From cppljevans at suddenlink.net Tue Jun 24 11:15:01 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:21:12 2009 Subject: [plt-scheme] Re: [library doc bug?]combinators.plt/doc.txt curry yrruc same def In-Reply-To: <990e0c030806240746r7fc743f5qa284073f81438a65@mail.gmail.com> References: <990e0c030806240746r7fc743f5qa284073f81438a65@mail.gmail.com> Message-ID: On 06/24/08 09:46, Carl Eastlund wrote: > On Tue, Jun 24, 2008 at 10:48 AM, Larry Evans wrote: >>> http://planet.plt-scheme.org/package-source/cce/combinators.plt/1/4/doc.txt >> has the same definition for curry and yrruc. [snip] > The 'yrruc' function appends the argument lists in the opposite order > (although it does not reverse the order of the individual arguments in > each list). > > For instance: > ((curry list 1 2) 3 4) = (list 1 2 3 4) > ((yrruc list 1 2) 3 4) = (list 3 4 1 2) OOPS. I misread the docs which clearly reflect this. I just missed the different placement of 'initial' and 'final' and the reversal of 'arg' and 'more' on the rhs'. Sorry about that. The example you provide above makes it easy to see. Thanks. From andrew-scheme at areilly.bpc-users.org Mon Jun 23 23:00:32 2008 From: andrew-scheme at areilly.bpc-users.org (Andrew Reilly) Date: Thu Mar 26 02:21:12 2009 Subject: [plt-scheme] SXML or XEXPR? SXML pattern-matching? In-Reply-To: References: Message-ID: <20080624030032.GA61325@duncan.reilly.home> On Mon, Jun 23, 2008 at 08:29:31PM +0300, Anton Tayanovskyy wrote: > PLT's match, on the other hand, is extremely flexible. I guess I'll > proceed with my small macro for now (thankfully Scheme is tolerant of > individualism). I do a little XML parsing in my current project. I started with sxml and sxml-match from PLaneT, but shifted to the "batteries included" xml and match as I ported my code to the 3.99 series. I have found it to work beautifully, and it's quite a lot more concise than the explicit DOM shennanigans that I had to go through in an earlier, Python version. The match in scheme/match and scheme has (list-no-order ...), which is great for attributes. Cheers, -- Andrew From cobbe at ccs.neu.edu Tue Jun 24 14:12:16 2008 From: cobbe at ccs.neu.edu (Richard Cobbe) Date: Thu Mar 26 02:21:12 2009 Subject: [plt-scheme] problems with scribble/text language Message-ID: <20080624181216.GA52461@weatherwax.ccs.neu.edu> I'm having some difficulty with the scribble/text language in 4.0.1.1 and I hope someone can suggest a way to proceed. Here's the basic structure of my problem. Simple scribble/text document, test.ss: #lang scribble/text @(define (foo x y) (format "foo: x = ~a; y = ~a" x y))@; blah @foo[3 4] blah This works as I expect; when I run "mzscheme test.ss", I get the output blah foo: x = 3; y = 4 blah All well and good. But I'm having problems when one of the arguments to foo is itself in text mode. I know that @{...} treats the stuff inside the brackets as text, but this doesn't fit into the larger expression: @foo[@{\three} 4] gets read as (foo ("\\three") 4) and of course this fails during evaluation: procedure application: expected procedure, given: "\\three" (no arguments) So I tried the following instead: @(define (foo* x y) (format "foo: x = ~a; y = ~a" x y))@; @; the following inserts blank lines, but I don't care for now. @(define-syntax (foo stx) (syntax-case stx () [(foo ((arg ...) ...)) #'(foo* (list arg ...) ...)])) blah @foo[@{\three} 4] blah and then running 'mzscheme test.ss' gives me test.ss:5:3: compile: bad syntax; function application is not allowed, because no #%app syntax transformer is bound in: (syntax-case stx () ((foo ((arg ...) ...)) (syntax (foo* (list arg ...) ...)))) I tried splitting this into two files (which was the way I had it before I tried to find a minimal test case), and I get different behavior. test-funs.ss: #lang scheme (define (foo* x y) (format "foo: x = ~a; y = ~a" x y)) (define-syntax (foo stx) (syntax-case stx () [(foo ((arg ...) ...)) #'(foo* (list arg ...) ...)])) (provide foo) test.ss: #lang scribble/text @(require "test-funs.ss") blah @foo[@{\three} 4] blah And now, running 'mzscheme test.ss' gives me test.ss:4:0: foo: bad syntax in: (foo ("\\three") 4) so it looks like macro expansion isn't happening here. Is there a way to do this without having to explicitly quote all of foo's arguments? Thanks, Richard From cobbe at ccs.neu.edu Tue Jun 24 14:24:34 2008 From: cobbe at ccs.neu.edu (Richard Cobbe) Date: Thu Mar 26 02:21:13 2009 Subject: [plt-scheme] problems with scribble/text language In-Reply-To: <20080624181216.GA52461@weatherwax.ccs.neu.edu> References: <20080624181216.GA52461@weatherwax.ccs.neu.edu> Message-ID: <20080624182434.GB52461@weatherwax.ccs.neu.edu> On Tue, Jun 24, 2008 at 02:12:16PM -0400, Richard Cobbe wrote: Never mind, figured it out. > @(define (foo* x y) (format "foo: x = ~a; y = ~a" x y))@; > @; the following inserts blank lines, but I don't care for now. > @(define-syntax (foo stx) > (syntax-case stx () > [(foo ((arg ...) ...)) > #'(foo* (list arg ...) ...)])) > blah > @foo[@{\three} 4] > blah > > and then running 'mzscheme test.ss' gives me > > test.ss:5:3: compile: bad syntax; function application is not allowed, because no #%app syntax transformer is bound in: (syntax-case stx () ((foo ((arg ...) ...)) (syntax (foo* (list arg ...) ...)))) Sam suggested adding @(require (for-syntax scheme/base)) which does indeed solve the #%app error. Leaves the second one, though, but that's my problem: > test-funs.ss: > #lang scheme > (define (foo* x y) (format "foo: x = ~a; y = ~a" x y)) > (define-syntax (foo stx) > (syntax-case stx () > [(foo ((arg ...) ...)) > #'(foo* (list arg ...) ...)])) > (provide foo) > > test.ss: > #lang scribble/text > @(require "test-funs.ss") > blah > @foo[@{\three} 4] > blah > > And now, running 'mzscheme test.ss' gives me > > test.ss:4:0: foo: bad syntax in: (foo ("\\three") 4) > > so it looks like macro expansion isn't happening here. > Macro expansion is happening, but my pattern doesn't match the use. Replacing the definition of foo with (define-syntax (expand-arg stx) (syntax-case stx () [(expand-arg (arg ...)) #'(list arg ...)] [(expand-arg arg) #'arg])) (define-syntax (foo stx) (syntax-case stx () [(foo arg ...) #'(foo* (expand-arg arg) ...)])) works; the file now produces blah foo: x = (\three); y = 4 blah And I can get rid of the extra parens around \three easily enough. Richard From eli at barzilay.org Tue Jun 24 14:31:03 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:13 2009 Subject: [plt-scheme] problems with scribble/text language In-Reply-To: <20080624181216.GA52461@weatherwax.ccs.neu.edu> References: <20080624181216.GA52461@weatherwax.ccs.neu.edu> Message-ID: <18529.15719.844780.369423@arabic.ccs.neu.edu> On Jun 24, Richard Cobbe wrote: > I'm having some difficulty with the scribble/text language in > 4.0.1.1 and I hope someone can suggest a way to proceed. Here's the > basic structure of my problem. Simple scribble/text document, > test.ss: > > #lang scribble/text > @(define (foo x y) (format "foo: x = ~a; y = ~a" x y))@; > blah > @foo[3 4] > blah > > This works as I expect; when I run "mzscheme test.ss", I get the output > > blah > foo: x = 3; y = 4 > blah > > All well and good. > > But I'm having problems when one of the arguments to foo is itself > in text mode. I know that @{...} treats the stuff inside the > brackets as text, but this doesn't fit into the larger expression: > > @foo[@{\three} 4] > > gets read as > > (foo ("\\three") 4) > [...] A common solutions that I use is to dump things into a function: @foo[@string-append{\three} 4] that works better when you have a shorter name for `string-append'. But another option is to just use pairs as a general device for concatenation, which means that you can use @foo[@list{\three} 4] or @foo[@'{\three} 4] the second one is read as '("\\three"). But note also that the scribble/text language uses pairs for the same purpose, so you caan use something like this: #lang scribble/text @(define (foo x y) @list{foo: x = @x; y = @y})@; blah @foo[3 4] @foo[@list{\three} 5] blah > So I tried the following instead: > [...] BTW, unrelated -- but, with macros you can get much more sophisticated things going on, using the scribble syntax properties. > I tried splitting this into two files (which was the way I had it before I > tried to find a minimal test case), and I get different behavior. > > test-funs.ss: > #lang scheme > (define (foo* x y) (format "foo: x = ~a; y = ~a" x y)) > (define-syntax (foo stx) > (syntax-case stx () > [(foo ((arg ...) ...)) > #'(foo* (list arg ...) ...)])) > (provide foo) > > test.ss: > #lang scribble/text > @(require "test-funs.ss") > blah > @foo[@{\three} 4] > blah > > And now, running 'mzscheme test.ss' gives me > > test.ss:4:0: foo: bad syntax in: (foo ("\\three") 4) > > so it looks like macro expansion isn't happening here. It does, but you got the syntax pattern wrong... With this wrong template, this would work: @foo[(@{\three} (4))] ...but you probably want to change the template... ...but you probably don't need any of the macro stuff anyway... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From cppljevans at suddenlink.net Tue Jun 24 16:06:01 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:21:13 2009 Subject: [plt-scheme] define-unit meaning in combinator-example.ss? Message-ID: While trying to understand: (define-unit lambda-calc ...) in: plt/collects/combinator-parser/examples/combinator-example.ss I first searched the index: /doc/guide/doc-index.html for 'define-unit'. Since it wasn't there, I thought maybe it was defined in the current language. Looking at the top of */combinator-example.ss, I saw: (require scheme/unit parser-tools/lex combinator-parser/combinator-unit) So, I grep'ed the files scheme/unit and found: find . -name \*.ss -exec grep -e 'define-unit' {} \; -ls (define-unit name imports exports elem ...))])) 16960391 4 -rw-r--r-- 1 evansl evansl 3302 Jun 13 20:50 ./unit/lang.ss which, with more context, is: (define-syntax (finish-a-unit stx) (syntax-case stx (import export) [(_ orig-stx name imports exports elem ...) #'(begin (provide name) (define-unit name imports exports elem ...))])) So, I looked in the index to find that define-syntax defined: doc/guide/pattern-macros.html#(part._define-syntax_and_syntax-rules) however, there it's defined as: (define-syntax id (syntax-id-rules (literal-id ...) [pattern template] ...)) which doesn't seem to match the: (define-syntax (finish-a-unit stx) in ./unit/lang.ss since (finish-a-unit stx) does not match, AFAICT, the id in '(define-syntax id'. So, how can I figure out what the 'define-unit' in combinator-example.ss means? Any help is appreciated. -regards, Larry From czhu at cs.utah.edu Tue Jun 24 15:59:52 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:21:13 2009 Subject: [plt-scheme] define-unit meaning in combinator-example.ss? In-Reply-To: References: Message-ID: <48615238.9010203@cs.utah.edu> You need to read chapter 7 "units' in the "*Reference*: PLT Scheme" doc. Chongkai Larry Evans wrote: > While trying to understand: > > (define-unit lambda-calc > ...) > > in: > > plt/collects/combinator-parser/examples/combinator-example.ss > > I first searched the index: > > /doc/guide/doc-index.html > > for 'define-unit'. Since it wasn't there, I thought maybe it was > defined in the current language. Looking at the top of > */combinator-example.ss, I saw: > > (require scheme/unit > parser-tools/lex > combinator-parser/combinator-unit) > > So, I grep'ed the files scheme/unit and found: > > find . -name \*.ss -exec grep -e 'define-unit' {} \; -ls > (define-unit name imports exports elem ...))])) > 16960391 4 -rw-r--r-- 1 evansl evansl 3302 Jun 13 20:50 > ./unit/lang.ss > > which, with more context, is: > > (define-syntax (finish-a-unit stx) > (syntax-case stx (import export) > [(_ orig-stx name imports exports elem ...) > #'(begin > (provide name) > (define-unit name imports exports elem ...))])) > > So, I looked in the index to find that define-syntax defined: > > doc/guide/pattern-macros.html#(part._define-syntax_and_syntax-rules) > > however, there it's defined as: > > (define-syntax id > > (syntax-id-rules (literal-id ...) > > [pattern template] > > ...)) > > which doesn't seem to match the: > > > (define-syntax (finish-a-unit stx) > > in ./unit/lang.ss since (finish-a-unit stx) does not match, AFAICT, > the id in '(define-syntax id'. > > So, how can I figure out what the 'define-unit' in > combinator-example.ss means? > > Any help is appreciated. > > > -regards, > Larry > From eli at barzilay.org Tue Jun 24 16:05:36 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:13 2009 Subject: [plt-scheme] define-unit meaning in combinator-example.ss? In-Reply-To: References: Message-ID: <18529.21392.277042.468931@arabic.ccs.neu.edu> On Jun 24, Larry Evans wrote: > While trying to understand: > > (define-unit lambda-calc > ...) > > in: > > plt/collects/combinator-parser/examples/combinator-example.ss > > I first searched the index: > > /doc/guide/doc-index.html > > for 'define-unit'. Why did you search only the index of the guide? The documentation is there if you do a plain search. http://docs.plt-scheme.org/reference/linkinference.html#(form._((lib._mzlib/unit..ss)._define-unit)) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From Scott.Owens at cl.cam.ac.uk Tue Jun 24 16:49:16 2008 From: Scott.Owens at cl.cam.ac.uk (Scott Owens) Date: Thu Mar 26 02:21:14 2009 Subject: [plt-scheme] Scheme Workshop 2008 Message-ID: <187918B5-589E-4680-BA05-2090344DEDD7@cl.cam.ac.uk> Hi all, This is just a quick heads-up that the deadline for submissions to the Scheme workshop has been extended until the 29th of June. We'd like to fill out the program with a couple more good papers. If you have something to say, please consider sending us a paper. The workshop is accepting both short (typically 6 pages) and long (8 to 12 pages) papers. The workshop itself will be held in Victoria, British Columbia, on Saturday, 20 September, two days before ICFP. For details, see http://www.schemeworkshop.org/2008/ -Scott Owens From jos.koot at telefonica.net Tue Jun 24 20:44:06 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:14 2009 Subject: [plt-scheme] define-for-syntax and R6RS Message-ID: <000f01c8d65c$92feb340$2101a8c0@uw2b2dff239c4d> Because in R6RS I cannot find anything with the same functionality as define-for-syntax or begin-for-syntax, I do the following: #!r6rs (library (mylib) (export mystuff) (import (for (rnrs base (6)) run) (for (only (scheme base) define-for-syntax) run) (for (rnrs base (6)) expand)) etc) I am surprised that define-for-syntax must be imported for phase and does not need an import for phase . Any light on this would be very welcome. Is there in R6RS something with the same functionality as define-for-syntax or begin-for-syntax. I have looked hard around, but did not catch anything. Greetings, Jos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080625/5d11d385/attachment.htm From samth at ccs.neu.edu Tue Jun 24 22:52:35 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:21:15 2009 Subject: [plt-scheme] define-for-syntax and R6RS In-Reply-To: <000f01c8d65c$92feb340$2101a8c0@uw2b2dff239c4d> References: <000f01c8d65c$92feb340$2101a8c0@uw2b2dff239c4d> Message-ID: <63bb19ae0806241952w5ff2384eyb2fc25eb062dab74@mail.gmail.com> Here's an implementation of begin-for-syntax (but it doesn't handle define). (define-syntax begin-for-syntax (syntax-rules () [(_ . e) (define-syntax fresh (begin (begin . e) #f))])) I do not believe there's an R6RS equivalent to define-for-syntax - you have to use a separate module. As for why you need to import begin-for-syntax for run, it's because the `begin-for-syntax' macro itself occurs in phase 0. The expressions *inside* the begin-for-syntax are in phase 1. Similarly, in the macro I defined, `define-syntax' appears at phase 0, but `syntax-rules' appears at phase 1. sam th On Tue, Jun 24, 2008 at 8:44 PM, Jos Koot wrote: > Because in R6RS I cannot find anything with the same functionality as > define-for-syntax or begin-for-syntax, I do the following: > > #!r6rs > (library (mylib) > (export mystuff) > (import > (for (rnrs base (6)) run) > (for (only (scheme base) define-for-syntax) run) > (for (rnrs base (6)) expand)) > etc) > > I am surprised that define-for-syntax must be imported for phase and > does not need an import for phase . Any light on this would be very > welcome. > > Is there in R6RS something with the same functionality as define-for-syntax > or begin-for-syntax. I have looked hard around, but did not catch anything. > > Greetings, > Jos > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > -- sam th samth@ccs.neu.edu From cppljevans at suddenlink.net Tue Jun 24 23:26:57 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:21:15 2009 Subject: [plt-scheme] Re: define-unit meaning in combinator-example.ss? In-Reply-To: <18529.21392.277042.468931@arabic.ccs.neu.edu> References: <18529.21392.277042.468931@arabic.ccs.neu.edu> Message-ID: In the following: _Guide_ means http://docs.plt-scheme.org/guide/ _Reference_ means http://docs.plt-scheme.org/reference/index.html On 06/24/08 15:05, Eli Barzilay wrote: > On Jun 24, Larry Evans wrote: >> While trying to understand: >> >> (define-unit lambda-calc >> ...) >> >> in: >> >> plt/collects/combinator-parser/examples/combinator-example.ss >> >> I first searched the index: >> >> /doc/guide/doc-index.html >> >> for 'define-unit'. > > Why did you search only the index of the guide? > I just didn't think of the _Reference_ even though the _Guide_ mentions the _Reference_ at the beginning: From Chapter 3 on, this guide dives into details ? covering much of the PLT Scheme toolbox, but leaving precise details to Reference: PLT Scheme and other reference manuals. In the back of my mind, I knew there was a separate doc because I remember reading the above quoted paragraph. I guess that I was too focused on finding the answer in the document I was currently reading (i.e. the _Guide_) and didn't think of the other one. My mistake. From grettke at acm.org Wed Jun 25 00:11:45 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:21:15 2009 Subject: [plt-scheme] FYI: Vancouver Lisp Users Group meeting for June 2008 - Using PLT Scheme for Game Development In-Reply-To: References: <595b9ab20806111331r79ad70d1gf1b50c904fde9bba@mail.gmail.com> Message-ID: <756daca50806242111x26e1b8erfbb9c77fe57c61dd@mail.gmail.com> Bill posted his screencasts: http://bc.tech.coop/blog/080620.html From jos.koot at telefonica.net Wed Jun 25 05:37:39 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:15 2009 Subject: [plt-scheme] define-for-syntax and R6RS References: <000f01c8d65c$92feb340$2101a8c0@uw2b2dff239c4d> <63bb19ae0806241952w5ff2384eyb2fc25eb062dab74@mail.gmail.com> Message-ID: <000601c8d6a7$1c3866c0$2101a8c0@uw2b2dff239c4d> Thanks for your clear response. As to the need to use a separate module, you confirmed my surmise. Jos ----- Original Message ----- From: "Sam TH" To: "Jos Koot" Cc: Sent: Wednesday, June 25, 2008 4:52 AM Subject: Re: [plt-scheme] define-for-syntax and R6RS > Here's an implementation of begin-for-syntax (but it doesn't handle > define). > > (define-syntax begin-for-syntax > (syntax-rules () > [(_ . e) (define-syntax fresh (begin (begin . e) #f))])) > > I do not believe there's an R6RS equivalent to define-for-syntax - you > have to use a separate module. > > As for why you need to import begin-for-syntax for run, it's because > the `begin-for-syntax' macro itself occurs in phase 0. The > expressions *inside* the begin-for-syntax are in phase 1. Similarly, > in the macro I defined, `define-syntax' appears at phase 0, but > `syntax-rules' appears at phase 1. > > sam th > > On Tue, Jun 24, 2008 at 8:44 PM, Jos Koot wrote: >> Because in R6RS I cannot find anything with the same functionality as >> define-for-syntax or begin-for-syntax, I do the following: >> >> #!r6rs >> (library (mylib) >> (export mystuff) >> (import >> (for (rnrs base (6)) run) >> (for (only (scheme base) define-for-syntax) run) >> (for (rnrs base (6)) expand)) >> etc) >> >> I am surprised that define-for-syntax must be imported for phase >> and >> does not need an import for phase . Any light on this would be >> very >> welcome. >> >> Is there in R6RS something with the same functionality as >> define-for-syntax >> or begin-for-syntax. I have looked hard around, but did not catch >> anything. >> >> Greetings, >> Jos >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> > > > > -- > sam th > samth@ccs.neu.edu From noelwelsh at gmail.com Wed Jun 25 08:47:36 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:21:15 2009 Subject: [plt-scheme] A suggestion for Scribble CSS Message-ID: As currently rendered headings in Scribble are equidistant to the paragraph above and the paragraph below. Increasing the distance above a heading makes the structure of the document more apparent. I have found the following snippet of CSS improves the appearance of Scribble pages in all reasonable web browsers (unreasonable browsers have not been tested): h1, h2, h3, h4, h5, h6, h7, h8 { margin-top: 1.75em; margin-bottom: 0.5em; } N. From mflatt at cs.utah.edu Wed Jun 25 09:05:48 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:15 2009 Subject: [plt-scheme] A suggestion for Scribble CSS In-Reply-To: References: Message-ID: <20080625130549.CD94C6500A3@mail-svr1.cs.utah.edu> At Wed, 25 Jun 2008 13:47:36 +0100, "Noel Welsh" wrote: > As currently rendered headings in Scribble are equidistant to the > paragraph above and the paragraph below. Increasing the distance > above a heading makes the structure of the document more apparent. I > have found the following snippet of CSS improves the appearance of > Scribble pages in all reasonable web browsers (unreasonable browsers > have not been tested): > > > h1, h2, h3, h4, h5, h6, h7, h8 { > margin-top: 1.75em; > margin-bottom: 0.5em; > } That's a good idea. Committed in SVN, except that I dropped h1 and h2. (In Scribble output currently, h1 is unused, and h2 always appears at the top of a page.) Matthew From cppljevans at suddenlink.net Wed Jun 25 09:39:13 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:21:15 2009 Subject: [plt-scheme] [doc suggestion]unit-body-expr-or-defn in doc/reference/linkinference.html#(form._((lib._mzlib/unit..ss)._define-unit)) Message-ID: While reading: file:///usr/local/plt/share/plt/doc/reference/linkinference.html#(form._((lib._mzlib/unit..ss)._define-unit)) I couldn't find where: unit-body-expr-or-defn was defined. Looking elsewhere, I also found it used in the "syntax template" for unit, located here: file:///usr/local/plt/share/plt/doc/reference/creatingunits.html However, again, there was no "explicit" link to it's definition; however, there was a "sorta" definition in the 1st paragraph which contained: Expressions in the unit body can refer to identifiers bound by the sig-specs of the import clause, and the body must include one definition for each identifier of a sig-spec in the export clause. However, the reader must infer that 'unit body' refers to the 'unit-body-expr-or-defn' in the. IMO it would be better if there were some definition of 'unit-body-expr-or-defn' with references to 'unit-body-expr-or-defn' in "syntax-templates" (just I name I made up) that are actually links (e.g. like the unit, import, and export links in creatingunits.html) to the definition. From cppljevans at suddenlink.net Wed Jun 25 10:07:41 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:21:16 2009 Subject: [plt-scheme] Re: define-unit meaning in combinator-example.ss? In-Reply-To: <18529.21392.277042.468931@arabic.ccs.neu.edu> References: <18529.21392.277042.468931@arabic.ccs.neu.edu> Message-ID: On 06/24/08 15:05, Eli Barzilay wrote: > On Jun 24, Larry Evans wrote: [snip] >> I first searched the index: >> >> /doc/guide/doc-index.html >> >> for 'define-unit'. > > Why did you search only the index of the guide? The documentation is > there if you do a plain search. > > http://docs.plt-scheme.org/reference/linkinference.html#(form._((lib._mzlib/unit..ss)._define-unit)) > Or I could have just used: plt-help define-unit plt-help is nice! From icfp.publicity at googlemail.com Wed Jun 25 10:00:45 2008 From: icfp.publicity at googlemail.com (Matthew Fluet (ICFP Publicity Chair)) Date: Thu Mar 26 02:21:16 2009 Subject: [plt-scheme] ICFP08 Final Call for posters Message-ID: <53ff55480806250700p5b71cc31g7edd89644813548d@mail.gmail.com> ICFP 2008 poster session September 21, 2008 Call for presentation proposals ICFP 2008 will feature a poster session for researchers and practitioners, including students. The session will provide friendly feedback for work that is in gestation or ongoing, as well as opportunities to meet each other and exchange ideas. We welcome poster submissions on all ICFP topics, especially presentations of - applications of and to functional programming; - recent work presented at more distant venues; and - ongoing work, whether or not submitted to ICFP. There will be no formal proceedings, but presenters will be invited to submit working notes, demo code, and other materials to supplement their abstract and poster. These materials will be released informally on a Web page dedicated to the poster session. An accepted submission is not intended to replace conference or journal publication. Persons interested in presenting a poster are invited to submit a one-page abstract in SIGPLAN conference style http://www.acm.org/sigs/sigplan/authorInformation.htm to the Web site https://www.softconf.com/s08/icfp08-posters/submit.html by June 30, 2008. The program committee will review the submissions for relevance and interest, and notify the authors by July 14, 2008. Accepted posters must be presented by the authors in person on Sunday, September 21, 2008. Important dates: Submission: Monday, June 30, 2008 Notification: Monday, July 14, 2008 Presentation: Sunday, September 21, 2008 Program committee: Benjamin Pierce (University of Pennsylvania) Colin Runciman (University of York) Chung-chieh Shan (Rutgers University) From eli at barzilay.org Wed Jun 25 13:07:39 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:16 2009 Subject: [plt-scheme] Re: define-unit meaning in combinator-example.ss? In-Reply-To: References: <18529.21392.277042.468931@arabic.ccs.neu.edu> Message-ID: <18530.31579.728463.544649@arabic.ccs.neu.edu> On Jun 25, Larry Evans wrote: > On 06/24/08 15:05, Eli Barzilay wrote: > > On Jun 24, Larry Evans wrote: > [snip] > >> I first searched the index: > >> > >> /doc/guide/doc-index.html > >> > >> for 'define-unit'. > > > > Why did you search only the index of the guide? The documentation is > > there if you do a plain search. > > > > http://docs.plt-scheme.org/reference/linkinference.html#(form._((lib._mzlib/unit..ss)._define-unit)) > > > Or I could have just used: > > plt-help define-unit > > plt-help is nice! There is a search input box at the top of all pages, which is exactly what `plt-help' is using. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From cppljevans at suddenlink.net Wed Jun 25 14:05:48 2008 From: cppljevans at suddenlink.net (Larry Evans) Date: Thu Mar 26 02:21:16 2009 Subject: [plt-scheme] Re: define-unit meaning in combinator-example.ss? In-Reply-To: <18530.31579.728463.544649@arabic.ccs.neu.edu> References: <18529.21392.277042.468931@arabic.ccs.neu.edu> <18530.31579.728463.544649@arabic.ccs.neu.edu> Message-ID: On 06/25/08 12:07, Eli Barzilay wrote: > On Jun 25, Larry Evans wrote: [snip] >> Or I could have just used: >> >> plt-help define-unit >> >> plt-help is nice! > > There is a search input box at the top of all pages, which is exactly > what `plt-help' is using. > When I put the cursor over it (appearing as ...search...), nothing happened, like I assumed. So, I tried typing something, and it worked! I just made the wrong assumption :( Of course: search:_____________ would have been more what I'm used to. The limited screen real-estate is, I guess, one reason why that wasn't done. From eli at barzilay.org Wed Jun 25 14:11:39 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:16 2009 Subject: [plt-scheme] Re: define-unit meaning in combinator-example.ss? In-Reply-To: References: <18529.21392.277042.468931@arabic.ccs.neu.edu> <18530.31579.728463.544649@arabic.ccs.neu.edu> Message-ID: <18530.35419.728100.417454@arabic.ccs.neu.edu> On Jun 25, Larry Evans wrote: > > When I put the cursor over it (appearing as ...search...), nothing > happened, like I assumed. So, I tried typing something, and > it worked! I just made the wrong assumption :( > Of course: > > search:_____________ > > would have been more what I'm used to. The limited screen > real-estate is, I guess, one reason why that wasn't done. Yes, I tried to make it take as little as possible. If there are any suggestion on improving this, please tell me. (But no promises, since it's a style issue...) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mflatt at cs.utah.edu Wed Jun 25 14:55:06 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:16 2009 Subject: [plt-scheme] eval and phases (v4.0.1.2) Message-ID: <20080625185507.692A16500A8@mail-svr1.cs.utah.edu> As of version 4.0.1.2 (now in SVN): 1. Each namespace has a "base phase" that is used by `eval', `dynamic-require', etc., instead of always starting in phase 0. 2. While compile-time expressions are evaluated (such as the body of a macro transformer or the right-hand side of `define-for-syntax'), the current namespace is set to one whose base phase matches the evaluation phase. For example, running #lang scheme/load (define x 5) (define-for-syntax x 8) (begin-for-syntax (printf "~s\n" (eval 'x))) now produces the output 8 instead of 5, since the expansion-time call to `eval' uses a namespace whose base phase is 1. This change fixes two specific problems: * Using deserialization at macro-expansion time didn't work before, as Danny noticed: http://list.cs.brown.edu/pipermail/plt-scheme/2008-February/022986.html * Catching R6RS exceptions from uses of `eval' at macro expansion time didn't work before, as Steve noticed: http://list.cs.brown.edu/pipermail/plt-scheme/2008-May/024712.html More generally, `eval' no longer skips across phases boundaries. Unless you find anther route from one phase to another, if you're running in phase N, you'll only see namespaces with base phase N. [I know of two remaining ways to pass data across phases: via "3-D syntax', where a value is wrapped in a syntax object and embedded in an expression as a "constant", and via built-in parameters, such as a module-name resolver. Closing those holes is future work.] As usual, the `module' form plays a crucial role in keeping everything coherent. Suppose that you're expanding module M, and a macro transformer used by expansion needs to compile another module N. (This happens all the time when a `require' form is expanded and N is not already compiled to bytecode.) The current namespace for compiling N starts at base phase 1. When the `module' form starts expanding the body of N, however, it creates a new namespace that is back at phase 0. Globally, this works out because phase 1 for expanding N is distinct from other phase 1 namespaces; in particular, macro transformers running to expand N don't contaminate the (temporarily suspended) expansion of M. Locally, it means that you can reason about modules and phases the same as before. [If you're writing a load handler for `module' forms (few people do that), then you need to be careful to inject a `module' identifier with a binding in right phase, since the load handle could be triggered at an arbitrary phase. The new `namespace-module-identifier' function helps get such an identifier.] I don't expect this change to create much trouble, but let me know if you run into behavior that looks like a bug. It wasn't especially difficult to implement the change, but there are more opportunities than usual for me to get something wrong or to overlook modes/combinations in testing. Matthew From yinso.chen at gmail.com Wed Jun 25 18:47:47 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:17 2009 Subject: [plt-scheme] `load` from custom port? Message-ID: <779bf2730806251547v4e057e39n604bf360ddfe274d@mail.gmail.com> Hi - is there a way to have `load` to read from a custom port instead of from filesystem? Basically my goal is to abstract the filesystem access from built-in procedures such as `load`, `load-compiled` etc, such as reading from database or network. Please let me know if this is doable, or if there are alternatives, thanks. yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080625/e225ebfa/attachment.html From circularfunc at yahoo.se Wed Jun 25 20:13:02 2008 From: circularfunc at yahoo.se (Circular Function) Date: Thu Mar 26 02:21:18 2009 Subject: [plt-scheme] downloaded drscheme 4/pltscheme 4, list of operators? Message-ID: <822696.63737.qm@web28303.mail.ukl.yahoo.com> I have downloaded and use the latest PLTScheme, pltscheem 4.0 and dr shceme IDE. it seems a lot of operators are missing. where can i find a complete list of operators? it is really annoying not being able to just copy scheme-code and have it work. ___________________________________________________ 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/20080626/de4727a6/attachment.htm From matthias at ccs.neu.edu Wed Jun 25 20:47:01 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:18 2009 Subject: [plt-scheme] downloaded drscheme 4/pltscheme 4, list of operators? In-Reply-To: <822696.63737.qm@web28303.mail.ukl.yahoo.com> References: <822696.63737.qm@web28303.mail.ukl.yahoo.com> Message-ID: <0C20D2D5-F40E-44D9-9932-0BBBF445C882@ccs.neu.edu> On Jun 25, 2008, at 8:13 PM, Circular Function wrote: > I have downloaded and use the latest PLTScheme, pltscheem 4.0 and > dr shceme IDE. > > it seems a lot of operators are missing. > > where can i find a complete list of operators? it is really > annoying not being able to just copy scheme-code and have it work. The documentation has some 1200 pages of libraries, with all operators listed. As far as we know, PLT Scheme is the most comprehensive Scheme implementation in the world. If you find anything missing, let us know and we'll add it if jives with our taste. If you use a nice tone and ask specific questions, the people on this list may even help you. > > > > > 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 > > --===============0300951295==-- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080625/72844b31/attachment.html From eli at barzilay.org Wed Jun 25 21:11:39 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:18 2009 Subject: [plt-scheme] `load` from custom port? In-Reply-To: <779bf2730806251547v4e057e39n604bf360ddfe274d@mail.gmail.com> References: <779bf2730806251547v4e057e39n604bf360ddfe274d@mail.gmail.com> Message-ID: <18530.60619.73692.900963@arabic.ccs.neu.edu> On Jun 25, YC wrote: > is there a way to have `load` to read from a custom port instead of > from filesystem? You can write a loop that will read expressions from the port and pass them to `eval'. It's basically what `load' does. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From yinso.chen at gmail.com Wed Jun 25 21:26:20 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:19 2009 Subject: [plt-scheme] `load` from custom port? In-Reply-To: <18530.60619.73692.900963@arabic.ccs.neu.edu> References: <779bf2730806251547v4e057e39n604bf360ddfe274d@mail.gmail.com> <18530.60619.73692.900963@arabic.ccs.neu.edu> Message-ID: <779bf2730806251826w546e70b4n1fa8c6dae6902ff3@mail.gmail.com> On Wed, Jun 25, 2008 at 6:11 PM, Eli Barzilay wrote: > > You can write a loop that will read expressions from the port and pass > them to `eval'. It's basically what `load' does. > Yeah that's what I'm doing now - I was hoping there is a way to customize mzscheme at this level without having to provide my own `load` and `read` family symbols - oh well ;) Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080625/557f9c67/attachment.htm From mflatt at cs.utah.edu Wed Jun 25 21:31:17 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:19 2009 Subject: [plt-scheme] `load` from custom port? In-Reply-To: <779bf2730806251826w546e70b4n1fa8c6dae6902ff3@mail.gmail.com> References: <779bf2730806251547v4e057e39n604bf360ddfe274d@mail.gmail.com> <18530.60619.73692.900963@arabic.ccs.neu.edu> <779bf2730806251826w546e70b4n1fa8c6dae6902ff3@mail.gmail.com> Message-ID: <20080626013119.2131C6500BA@mail-svr1.cs.utah.edu> At Wed, 25 Jun 2008 18:26:20 -0700, YC wrote: > On Wed, Jun 25, 2008 at 6:11 PM, Eli Barzilay wrote: > > > > > You can write a loop that will read expressions from the port and pass > > them to `eval'. It's basically what `load' does. > > > > Yeah that's what I'm doing now - I was hoping there is a way to customize > mzscheme at this level without having to provide my own `load` and `read` > family symbols - oh well ;) Does it work to set the load handler via `current-load'? Matthew From tom.gordon at mac.com Wed Jun 25 13:38:46 2008 From: tom.gordon at mac.com (Tom Gordon) Date: Thu Mar 26 02:21:20 2009 Subject: [plt-scheme] R6RS Interoperability Message-ID: I've been looking forward to version 4.x of PLT Scheme because of its support for R6RS. We've begun porting a system we wrote in PLT Scheme to R6RS using version 4.0 We had hoped to be able to do this at our leisure, on a module by module basis, because as noted in the manual > an R6RS library can refer to modules that are implemented in other dialects supported by PLT Scheme, and other PLT Scheme modules can refer to libraries that are implemented in R6RS. The manual clearly warns, however: > Beware that a pair in R6RS corresponds to a mutable pair in scheme/base. We hadn't anticipated just how severe the consequences of this would be. It made it impossible to incrementally port our system, since lists in a module ported to R6RS could no longer be used by the modules using the PLT dialect of Scheme. Rather than trying to patch the PLT modules to convert between lists and mlists, we decided to set other tasks aside to port everything to R6RS. But this opened a can of worms. Some of the SRFIs our code depends on could no longer be used, or rather the standard PLT Scheme ports of these SRFIs couldn't be used. Thankfully Derrick Eddington has ported many of the SRFIs to R6RS: https://code.launchpad.net/~ikarus-libraries-team/ikarus-libraries/srfi But since there are many interdependencies between the SRFIs, it has become clear that by the time we are finished we may need R6RS versions of most of them. The next hurdle is the SSAX library for processing XML. You guessed it, we can no longer use the PLT version on the PlaneT Package Repository. Unfortunately, as far as we can tell no one has ported SSAX to R6RS yet, so we may have to tackle this task ourselves. I'm sorry this message is getting so long. The bottom line is that it now seems that the interoperability between R6RS libraries and PLT modules is actually very weak. After all, pairs and lists are pretty pervasive in Scheme programs. While PLT Scheme can be used as an R6RS implementation, be forewarned that a decision to us R6RS comes with a fairly high price tag: You will not be able to use many, maybe most, PLT modules in your R6RS libraries and those who prefer to write their code using the PLT dialect of Scheme may not be able to use your R6RS library. I realize that Version 4 is the first to support R6RS at all. I am grateful for this and don't want to seem to be complaining. But are their any plans for overcoming these interoperability problems? Or have I overlooked some obvious solution to this problem? -Tom Gordon From matthias at ccs.neu.edu Wed Jun 25 22:16:31 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:20 2009 Subject: [plt-scheme] R6RS Interoperability In-Reply-To: References: Message-ID: On Jun 25, 2008, at 1:38 PM, Tom Gordon wrote: > While PLT Scheme can be used as an R6RS implementation, be forewarned > that a decision to us R6RS comes with a fairly high price tag: You > will > not be able to use many, maybe most, PLT modules in your R6RS > libraries > and those who prefer to write their code using the PLT dialect of > Scheme > may not be able to use your R6RS library. > > I realize that Version 4 is the first to support R6RS at all. I am > grateful for this and don't want to seem to be complaining. But are > their any plans for overcoming these interoperability problems? Or > have > I overlooked some obvious solution to this problem? We are about to formulate a request for funding for just such activities. People's input and support letters are highly welcome. -- Matthias From yinso.chen at gmail.com Wed Jun 25 22:35:35 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:20 2009 Subject: [plt-scheme] `load` from custom port? In-Reply-To: <20080626013119.2131C6500BA@mail-svr1.cs.utah.edu> References: <779bf2730806251547v4e057e39n604bf360ddfe274d@mail.gmail.com> <18530.60619.73692.900963@arabic.ccs.neu.edu> <779bf2730806251826w546e70b4n1fa8c6dae6902ff3@mail.gmail.com> <20080626013119.2131C6500BA@mail-svr1.cs.utah.edu> Message-ID: <779bf2730806251935qe04d9f5xb15537c2b04dda27@mail.gmail.com> On Wed, Jun 25, 2008 at 6:31 PM, Matthew Flatt wrote: > > Yeah that's what I'm doing now - I was hoping there is a way to customize > > mzscheme at this level without having to provide my own `load` and `read` > > family symbols - oh well ;) > > Does it work to set the load handler via `current-load'? > `current-load` expects a load-handler to take in a path and a symbol/false for module loading. So yes theoritically I can handle the path resolver here, but that requires me to be intimately familiar with how to load a module -- unfortunately I do not. So my choice was to either customize load (so I can use default-load-handler to handle loading modules) or to customize below default-load-handler (via something like `current-load-handler-path-resolver` that takes the path and returns an input-port) to provide file port abstraction. Are there other approaches? Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080625/c0e5fb2c/attachment.html From grettke at acm.org Wed Jun 25 23:28:21 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:21:21 2009 Subject: [plt-scheme] PLT Scheme v4.0 In-Reply-To: <005e01c8cc91$98722200$2101a8c0@uw2b2dff239c4d> References: <200806120603.m5C635KN011012@winooski.ccs.neu.edu> <005e01c8cc91$98722200$2101a8c0@uw2b2dff239c4d> Message-ID: <756daca50806252028w41e07169i3fe7404ef082ff69@mail.gmail.com> Awesome. Thanks guys. From jos.koot at telefonica.net Thu Jun 26 05:37:43 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:21 2009 Subject: [plt-scheme] #!r6rs braces Message-ID: <002f01c8d770$49179390$2101a8c0@uw2b2dff239c4d> The default value of print-mpair-curly-braces is #t. For scheme and scheme/base this is the right default, I think. For #!r6rs, however, I would welcome the default to be #f. What are your opinions about this? Of course I can set print-mpair-curly-braces to #f myself, but this means that I have to import a non standard procedure or module. For me the main reason of using #!r6rs is to produce code that runs an every R6RS conformant compiler/interpreter. When this conformance is not required I prefer to use the more comprehensive #lang scheme. Jos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/cab1a74c/attachment.htm From tom.gordon at mac.com Thu Jun 26 05:56:53 2008 From: tom.gordon at mac.com (Tom Gordon) Date: Thu Mar 26 02:21:21 2009 Subject: [plt-scheme] Re: R6RS Interoperability References: Message-ID: Matthias Felleisen writes: > > We are about to formulate a request for funding for just such > activities. > People's input and support letters are highly welcome. -- Matthias > I guess I was hoping there would be a quick and easy solution. But if you need funding for a project to solve this problem, its obviously less than trivial. I'm glad to hear you plan to address this. In the meantime, I wonder whether it wouldn't be preferable to make all pairs and lists immutable, also in R6RS code. This wouldn't seem to make PLT an incorrect implementation of R6RS, only a little bit incomplete, by not yet supporting one of the standard libraries, (rnrs mutable-pairs). I'd much prefer to do without (rnrs mutable-pairs) than have it at the cost of not being interoperable with PLT libraries. -Tom From grettke at acm.org Thu Jun 26 07:27:10 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:21:22 2009 Subject: [plt-scheme] Newbie question: non-blocking IO In-Reply-To: <13735.17831.qm@web26207.mail.ukl.yahoo.com> References: <779bf2730806181506j627eabc3y3e1231f5a9f3436b@mail.gmail.com> <13735.17831.qm@web26207.mail.ukl.yahoo.com> Message-ID: <756daca50806260427n57f7d54ctd18c0a6cd799eaec@mail.gmail.com> > Something I would love to see is a mechanism like the one in the Visualworks > Smalltalk FFI. How difficult would that be to implement? From grettke at acm.org Thu Jun 26 07:27:36 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:21:22 2009 Subject: [plt-scheme] Newbie question: non-blocking IO In-Reply-To: <660027.15093.qm@web26207.mail.ukl.yahoo.com> References: <660027.15093.qm@web26207.mail.ukl.yahoo.com> Message-ID: <756daca50806260427s39f0f668m8396bf2a98e3747e@mail.gmail.com> On Wed, Jun 18, 2008 at 6:07 AM, Danny Chan wrote: > I'd like to write a program that captures a video flow from a camera > developed in my company. I already found out how to talk to the low level C > libraries that are needed to talk to our hardware using the FFI. Would two threads communicating over sockets be an option? From matthias at ccs.neu.edu Thu Jun 26 07:36:29 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:22 2009 Subject: [plt-scheme] Re: R6RS Interoperability In-Reply-To: References: Message-ID: On Jun 26, 2008, at 5:56 AM, Tom Gordon wrote: > But if you need funding for a project to solve this problem, its > obviously > less than trivial. I'm glad to hear you plan to address this. Very little of the complexity of PLT Scheme is doable w/o funding, no, not Linux or BSD or whatever either. The notions of funding may differ but they exist. ;; --- I like your idea. We'll discuss -- Matthias From ray.racine at comcast.net Thu Jun 26 08:25:07 2008 From: ray.racine at comcast.net (Ray Racine) Date: Thu Mar 26 02:21:22 2009 Subject: [plt-scheme] R6RS Interoperability In-Reply-To: References: Message-ID: <1214483107.3012.5.camel@bpel.ray.na.odcorp.net> > Unfortunately, as far as we can tell no one has ported SSAX to R6RS yet, > so we may have to tackle this task ourselves. http://github.com/GreyLensman/rl3/tree/0a6e8a405cf4caa783df96f55d22cef671346d32/rl3/xml http://github.com/GreyLensman/rl3/commits/webserver It is not comprehensive but basic SXML, SXPATH and HTMLPRAG work. Partial changes include. '@' is not a valid leading char in R6RS (R5RS for that matter I think), therefore a '*' is used instead for attributes. e.g. (p (@ (id "p1")) => (p (* (id "p1")) From tom.gordon at mac.com Thu Jun 26 09:45:09 2008 From: tom.gordon at mac.com (Tom Gordon) Date: Thu Mar 26 02:21:22 2009 Subject: [plt-scheme] Re: R6RS Interoperability References: <1214483107.3012.5.camel@bpel.ray.na.odcorp.net> Message-ID: Ray Racine writes: > http://github.com/GreyLensman/rl3/tree/0a6e8a405cf4caa783df96f55d22cef671346d32/rl3/xml > > http://github.com/GreyLensman/rl3/commits/webserver > > It is not comprehensive but basic SXML, SXPATH and HTMLPRAG work. Many thanks! We'll give it a try and if we port anything further we'll be sure to share our code with you. -Tom From circularfunc at yahoo.se Thu Jun 26 13:11:13 2008 From: circularfunc at yahoo.se (Circular Function) Date: Thu Mar 26 02:21:23 2009 Subject: [plt-scheme] making a win exe-file? Message-ID: <487775.40171.qm@web28304.mail.ukl.yahoo.com> can i somehow compile a file to a windows executable? is there a good GUI-library? __________________________________________________________ Ta semester! - s?k efter resor hos Yahoo! Shopping. J?mf?r pris p? flygbiljetter och hotellrum h?r: http://shopping.yahoo.se/c-169901-resor-biljetter.html?partnerId=96914052 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/e3707609/attachment.html From czhu at cs.utah.edu Thu Jun 26 13:13:35 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:21:23 2009 Subject: [plt-scheme] making a win exe-file? In-Reply-To: <487775.40171.qm@web28304.mail.ukl.yahoo.com> References: <487775.40171.qm@web28304.mail.ukl.yahoo.com> Message-ID: <4863CE3F.1070707@cs.utah.edu> Yes you can do both. Suppose you are already using v4 + module language, just using the "create executable" command from "Scheme" menu in DrScheme. Chongkai Circular Function wrote: > can i somehow compile a file to a windows executable? > is there a good GUI-library? > From circularfunc at yahoo.se Thu Jun 26 13:15:50 2008 From: circularfunc at yahoo.se (Circular Function) Date: Thu Mar 26 02:21:24 2009 Subject: [plt-scheme] frameworks/libraries fro webapps? server? Message-ID: <670252.24309.qm@web28310.mail.ukl.yahoo.com> Are there any frameworks or libraries for writing webapps in Scheme? Is there a webserver I can run from localhost to test my apps? __________________________________________________________ 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/20080626/819f19a8/attachment.htm From mflatt at cs.utah.edu Thu Jun 26 13:16:28 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:24 2009 Subject: [plt-scheme] making a win exe-file? In-Reply-To: <487775.40171.qm@web28304.mail.ukl.yahoo.com> References: <487775.40171.qm@web28304.mail.ukl.yahoo.com> Message-ID: <20080626171629.1890B6500C6@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 17:11:13 +0000 (GMT), Circular Function wrote: > can i somehow compile a file to a windows executable? Start here: http://docs.plt-scheme.org/ and in particular here: http://docs.plt-scheme.org/guide/index.html whose section 1.3 describes how to create executables: http://docs.plt-scheme.org/guide/intro.html#(part._.Creating_.Executables) > is there a good GUI-library? Start at the same place as above, but here's the specific docs on the GUI library: http://docs.plt-scheme.org/gui/index.html Matthew From mflatt at cs.utah.edu Thu Jun 26 13:18:34 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:24 2009 Subject: [plt-scheme] frameworks/libraries fro webapps? server? In-Reply-To: <670252.24309.qm@web28310.mail.ukl.yahoo.com> References: <670252.24309.qm@web28310.mail.ukl.yahoo.com> Message-ID: <20080626171834.6E5B56500AF@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 17:15:50 +0000 (GMT), Circular Function wrote: > Are there any frameworks or libraries for writing webapps in Scheme? > Is there a webserver I can run from localhost to test my apps? This is documented, too. Start at http://docs.plt-scheme.org/ and the specific documentation on the web server is http://docs.plt-scheme.org/web-server/index.html From jay.mccarthy at gmail.com Thu Jun 26 13:20:12 2008 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Thu Mar 26 02:21:24 2009 Subject: [plt-scheme] frameworks/libraries fro webapps? server? In-Reply-To: <670252.24309.qm@web28310.mail.ukl.yahoo.com> References: <670252.24309.qm@web28310.mail.ukl.yahoo.com> Message-ID: The web-server that comes with PLT Scheme can be run on local host. As for frameworks/libraries, look at anything from "untyped" on Planet. They're all pretty useful. Especially instaweb and mirrors. Jay On Thu, Jun 26, 2008 at 11:15 AM, Circular Function wrote: > Are there any frameworks or libraries for writing webapps in Scheme? > Is there a webserver I can run from localhost to test my apps? > > ________________________________ > 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 > > -- Jay McCarthy http://jay.teammccarthy.org From jos.koot at telefonica.net Thu Jun 26 13:20:29 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:25 2009 Subject: [plt-scheme] making a win exe-file? References: <487775.40171.qm@web28304.mail.ukl.yahoo.com> Message-ID: <001301c8d7b0$eebb5710$2101a8c0@uw2b2dff239c4d> A very simple GUI tool is found in graphics/graphics. A more elaborate one in scheme/gui/base Stand alone executables and distribution packages can easily be made from DrScheme's menu Scheme/Create executable. Jos ----- Original Message ----- From: Circular Function To: plt-scheme@list.cs.brown.edu Sent: Thursday, June 26, 2008 7:11 PM Subject: [plt-scheme] making a win exe-file? can i somehow compile a file to a windows executable? is there a good GUI-library? ------------------------------------------------------------------------------ L?na pengar utan s?kerhet. S?k och j?mf?r hos Yahoo! Shopping. ------------------------------------------------------------------------------ _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/be7fe9d9/attachment.html From circularfunc at yahoo.se Thu Jun 26 13:22:13 2008 From: circularfunc at yahoo.se (Circular Function) Date: Thu Mar 26 02:21:26 2009 Subject: [plt-scheme] module: only a module expr allowed, hmm then how to? Message-ID: <927500.54804.qm@web28302.mail.ukl.yahoo.com> module-language: only a module expression is allowed, either ??? #lang ?or ??? (module ...) ?in: (print "hej") > cant i write normal code in a file and then just run it when using the module language? __________________________________________________________ Ta semester! - s?k efter resor hos Yahoo! Shopping. J?mf?r pris p? flygbiljetter och hotellrum h?r: http://shopping.yahoo.se/c-169901-resor-biljetter.html?partnerId=96914052 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/41fd1da2/attachment.htm From circularfunc at yahoo.se Thu Jun 26 13:23:16 2008 From: circularfunc at yahoo.se (Circular Function) Date: Thu Mar 26 02:21:26 2009 Subject: [plt-scheme] require, searchpath? Message-ID: <342568.94348.qm@web28306.mail.ukl.yahoo.com> when using require how do i make it look in a specific path? enter the whole path like so: (require "C:/users/meee/desktop/schemeprogs/") ? __________________________________________________________ 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/20080626/6a518af5/attachment.html From mflatt at cs.utah.edu Thu Jun 26 13:31:28 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:26 2009 Subject: [plt-scheme] module: only a module expr allowed, hmm then how to? In-Reply-To: <927500.54804.qm@web28302.mail.ukl.yahoo.com> References: <927500.54804.qm@web28302.mail.ukl.yahoo.com> Message-ID: <20080626173129.3CC0E6500C6@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 17:22:13 +0000 (GMT), Circular Function wrote: > module-language: only a module expression is allowed, either > ??? #lang > ?or > ??? (module ...) > ?in: (print "hej") > > > > cant i write normal code in a file and then just run it when using the module > language? Yes; normal PLT Scheme code starts with `#lang', typically `#lang scheme'. Matthew From mflatt at cs.utah.edu Thu Jun 26 13:32:33 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:26 2009 Subject: [plt-scheme] require, searchpath? In-Reply-To: <342568.94348.qm@web28306.mail.ukl.yahoo.com> References: <342568.94348.qm@web28306.mail.ukl.yahoo.com> Message-ID: <20080626173233.C9FB76500AF@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 17:23:16 +0000 (GMT), Circular Function wrote: > when using require how do i make it look in a specific path? > enter the whole path like so: > (require "C:/users/meee/desktop/schemeprogs/") > > ? http://docs.plt-scheme.org/guide/module-paths.html Matthew From mflatt at cs.utah.edu Thu Jun 26 13:44:53 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:27 2009 Subject: [plt-scheme] Re: R6RS Interoperability In-Reply-To: References: Message-ID: <20080626174453.8917C6500AA@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 09:56:53 +0000 (UTC), Tom Gordon wrote: > In the meantime, I wonder whether it wouldn't be preferable to make all > pairs and lists immutable, also in R6RS code. This wouldn't seem to > make PLT an incorrect implementation of R6RS, only a little bit > incomplete, by not yet supporting one of the standard libraries, (rnrs > mutable-pairs). FWIW, supporting an "R6RS but with immutable pairs" language is part of the plan: http://list.cs.brown.edu/pipermail/plt-scheme/2008-March/023485.html But we haven't gotten there, yet. Matthew From mflatt at cs.utah.edu Thu Jun 26 13:47:42 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:27 2009 Subject: [plt-scheme] #!r6rs braces In-Reply-To: <002f01c8d770$49179390$2101a8c0@uw2b2dff239c4d> References: <002f01c8d770$49179390$2101a8c0@uw2b2dff239c4d> Message-ID: <20080626174742.C97E96500B2@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 11:37:43 +0200, "Jos Koot" wrote: > The default value of print-mpair-curly-braces is #t. For scheme and > scheme/base this is the right default, I think. For #!r6rs, however, I would > welcome the default to be #f. Yes, it should be. Currently, though, DrScheme doesn't know when it's running an R6RS program. We plan to have DrScheme adapt its REPL printing for the Module language based on the `#lang' (or `#!') line in the definitions window. But that protocol is not yet in place. Matthew From matthias at ccs.neu.edu Thu Jun 26 13:46:48 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:27 2009 Subject: [plt-scheme] require, searchpath? In-Reply-To: <342568.94348.qm@web28306.mail.ukl.yahoo.com> References: <342568.94348.qm@web28306.mail.ukl.yahoo.com> Message-ID: Works fine for me: #lang scheme/gui (require (file "/Users/matthias/plt/collects/srfi/1/fold.ss")) ;; ---- Welcome to DrScheme, version 4.0.1.1-svn23jun2008 [3m]. Language: Module. > foldl # > On Jun 26, 2008, at 1:23 PM, Circular Function wrote: > when using require how do i make it look in a specific path? > enter the whole path like so: > (require "C:/users/meee/desktop/schemeprogs/") > > ? > > 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 > > --===============1248918517==-- From mflatt at cs.utah.edu Thu Jun 26 13:51:54 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:27 2009 Subject: [plt-scheme] [doc suggestion]unit-body-expr-or-defn in doc/reference/linkinference.html#(form._((lib._mzlib/unit..ss)._define-unit)) In-Reply-To: References: Message-ID: <20080626175154.6F1C46500AF@mail-svr1.cs.utah.edu> At Wed, 25 Jun 2008 08:39:13 -0500, Larry Evans wrote: > However, the reader must infer that 'unit body' refers to the > 'unit-body-expr-or-defn' in the. IMO it would be better if there > were some definition of 'unit-body-expr-or-defn' with references to > 'unit-body-expr-or-defn' in "syntax-templates" (just I name I made > up) that are actually links (e.g. like the unit, import, and export > links in creatingunits.html) to the definition. You're right. To continue my streak of "things we plan to do" messages: Scribble will eventually be able to hyperlink non-terminals in grammars to their definitions. Unfortunately, I relied on that not-yet-implemented feature too heavily when I ported the unit docs to Scribble. Matthew From jos.koot at telefonica.net Thu Jun 26 13:57:59 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:27 2009 Subject: [plt-scheme] #!r6rs braces References: <002f01c8d770$49179390$2101a8c0@uw2b2dff239c4d> <20080626174742.C97E96500B2@mail-svr1.cs.utah.edu> Message-ID: <004801c8d7b6$2bf75bb0$2101a8c0@uw2b2dff239c4d> Thanks, Jos ----- Original Message ----- From: "Matthew Flatt" To: "Jos Koot" Cc: Sent: Thursday, June 26, 2008 7:47 PM Subject: Re: [plt-scheme] #!r6rs braces > At Thu, 26 Jun 2008 11:37:43 +0200, "Jos Koot" wrote: >> The default value of print-mpair-curly-braces is #t. For scheme and >> scheme/base this is the right default, I think. For #!r6rs, however, I >> would >> welcome the default to be #f. > > Yes, it should be. Currently, though, DrScheme doesn't know when it's > running an R6RS program. > > We plan to have DrScheme adapt its REPL printing for the Module > language based on the `#lang' (or `#!') line in the definitions window. > But that protocol is not yet in place. > > > Matthew > From eli at barzilay.org Thu Jun 26 13:59:34 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:27 2009 Subject: [plt-scheme] IE Warnings Message-ID: <18531.55558.294874.409557@arabic.ccs.neu.edu> (This is in case there's anyone that has a good solution to this problem.) When you view local files with scripts, you get IE to show the warning bar, which you must use to enable javascript. This is a problem that affects practically all pages, since they all have some JS. (Quick poll: is there anyone that has this problem (and is annoyed by it)?) The only solution I've seen is to add a "mark of the web" (MOTW), which is a comment the tells IE to pretend that the page is on a different security zone. It looks like this: (This was, of course, very hard to get to work: nobody thought that it's good to mention that the comment must end the line, and its line must have a CRLF...) Anyway, adding this mark works, but if you try it you'll see that links stop working. The thing is that the above mark switches IE to the "internet" zone, and since that is lower on the hierarchy than local files, `file://' links will just not work. IIRC, the local files belong to the "my computer" zone which is higher on the zone hierarchy, but it's still more restricted because of MS's "local machine zone lockdown"... As a complement this logical set of decisions, the non-functional links are just not working when you click them -- no dialog, no information bar, no beeps, not even the small "!" icon at the bottom. Nothing. The "obvious" solution to this is to add the MOTW to *all* pages. However, there are some links to non-html pages (like in the release notes). In these cases there is no place to add the mark, and (AFAICT) no way to make this work. This makes the MOTW solution impractical, since the links are just not responding. (If they'd only have some warning message that would be fine...) Anyway, I don't see any reasonable options left. Unreasonable options include: - recommending against using IE (or Windows...); - recommending viewing the manuals on-line when possible; - making the PLT installer flip the bit that avoids the problem (personally, I'd be pissed if some installer did this behind my back); - use an obnoxious .hta wrapper around the manuals; - tell people to live with it or disable it themselves (which is effectively the current situation without the "tell" part). I've been banging my head against this stupidity for too many hours. If anyone has an advice, I'll appreciate it. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From deinst at gmail.com Thu Jun 26 14:04:18 2008 From: deinst at gmail.com (David Einstein) Date: Thu Mar 26 02:21:28 2009 Subject: [plt-scheme] What are the semantics of optional variables? Message-ID: <56750b780806261104x59c021e5tb4afc55856956a75@mail.gmail.com> If I may join Circular function in asking annoying questions (co-sinning as it were), what exactly are the semantics of optional variables? It appears from experiment that they are evaluated sequentially in environments containing the previously declared parameters, kind of like let*. In fact, it appears that evaluation of optional parameters can safely[*] mutate earlier optional and non-optional parameters. [*] but not necessarily sanely. I've probably been writing too much R code -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/e3e01afa/attachment.htm From matthias at ccs.neu.edu Thu Jun 26 14:15:19 2008 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Mar 26 02:21:28 2009 Subject: [plt-scheme] What are the semantics of optional variables? In-Reply-To: <56750b780806261104x59c021e5tb4afc55856956a75@mail.gmail.com> References: <56750b780806261104x59c021e5tb4afc55856956a75@mail.gmail.com> Message-ID: Yes. On Jun 26, 2008, at 2:04 PM, David Einstein wrote: > If I may join Circular function in asking annoying questions (co- > sinning as it were), what exactly are the semantics of optional > variables? > It appears from experiment that they are evaluated sequentially in > environments containing the previously declared parameters, kind of > like let*. > In fact, it appears that evaluation of optional parameters can > safely[*] mutate earlier optional and non-optional parameters. > > > [*] but not necessarily sanely. I've probably been writing too > much R code > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From yinso.chen at gmail.com Thu Jun 26 14:30:25 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:29 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18531.55558.294874.409557@arabic.ccs.neu.edu> References: <18531.55558.294874.409557@arabic.ccs.neu.edu> Message-ID: <779bf2730806261130w22a0983r69053b037ba6de83@mail.gmail.com> To manually disable the warning you can find the solution here - http://radio.javaranch.com/pascarello/2005/05/18/1116473896158.html. It works in XP (I don't have Vista to verify), and it's easier to do than using MOTW. If it's just for yourself - the above should do it. If it's for deployment to others, my suggestions are 1) tell others about the manual solution, 2) as you said - use the installer to flip the registry (and as you said - not the best idea), or 3) deploy a mini web server and serve the file via that mini web server that only listen to the localhost (an icon that'll start the web server then shell-execute the link to the home page ought to do it). IMHO html files is easier to read from a web server (local or remote) rather than a file system. Cheers, yc On Thu, Jun 26, 2008 at 10:59 AM, Eli Barzilay wrote: > (This is in case there's anyone that has a good solution to this > problem.) > > When you view local files with scripts, you get IE to show the warning > bar, which you must use to enable javascript. This is a problem that > affects practically all pages, since they all have some JS. > > (Quick poll: is there anyone that has this problem (and is annoyed by > it)?) > > The only solution I've seen is to add a "mark of the web" (MOTW), > which is a comment the tells IE to pretend that the page is on a > different security zone. It looks like this: > > > > (This was, of course, very hard to get to work: nobody thought that > it's good to mention that the comment must end the line, and its line > must have a CRLF...) > > Anyway, adding this mark works, but if you try it you'll see that > links stop working. The thing is that the above mark switches IE to > the "internet" zone, and since that is lower on the hierarchy than > local files, `file://' links will just not work. IIRC, the local > files belong to the "my computer" zone which is higher on the zone > hierarchy, but it's still more restricted because of MS's "local > machine zone lockdown"... As a complement this logical set of > decisions, the non-functional links are just not working when you > click them -- no dialog, no information bar, no beeps, not even the > small "!" icon at the bottom. Nothing. > > The "obvious" solution to this is to add the MOTW to *all* pages. > However, there are some links to non-html pages (like in the release > notes). In these cases there is no place to add the mark, and > (AFAICT) no way to make this work. This makes the MOTW solution > impractical, since the links are just not responding. (If they'd only > have some warning message that would be fine...) > > Anyway, I don't see any reasonable options left. Unreasonable options > include: > > - recommending against using IE (or Windows...); > > - recommending viewing the manuals on-line when possible; > > - making the PLT installer flip the bit that avoids the problem > (personally, I'd be pissed if some installer did this behind my > back); > > - use an obnoxious .hta wrapper around the manuals; > > - tell people to live with it or disable it themselves (which is > effectively the current situation without the "tell" part). > > I've been banging my head against this stupidity for too many hours. > If anyone has an advice, I'll appreciate it. > > -- > ((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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/1ff18f0c/attachment.html From eli at barzilay.org Thu Jun 26 14:44:33 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:29 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <779bf2730806261130w22a0983r69053b037ba6de83@mail.gmail.com> References: <18531.55558.294874.409557@arabic.ccs.neu.edu> <779bf2730806261130w22a0983r69053b037ba6de83@mail.gmail.com> Message-ID: <18531.58257.417246.660928@arabic.ccs.neu.edu> On Jun 26, YC wrote: > To manually disable the warning you can find the solution here - > http://radio.javaranch.com/pascarello/2005/05/18/1116473896158.html. > It works in XP (I don't have Vista to verify), and it's easier to do > than using MOTW. > > If it's just for yourself - the above should do it. > > If it's for deployment to others, That's exactly the problem. And most people won't even do the above, because disabling security measures is something that always sounds like a bad idea. (As someone said -- if there was a way to do this based on specific paths, I could make the PLT installer do the right thing for the doc directory; but what they do have is just a machine-global "off/on" switch...) > my suggestions are 1) tell others about the manual solution, 2) as > you said - use the installer to flip the registry (and as you said - > not the best idea), or 3) deploy a mini web server and serve the > file via that mini web server that only listen to the localhost (an > icon that'll start the web server then shell-execute the link to the > home page ought to do it). > > IMHO html files is easier to read from a web server (local or > remote) rather than a file system. I know, but a web server has a bunch of other problems. (Like managing another process, or complications from firewalls etc.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jos.koot at telefonica.net Thu Jun 26 14:44:35 2008 From: jos.koot at telefonica.net (Jos Koot) Date: Thu Mar 26 02:21:29 2009 Subject: [plt-scheme] IE Warnings References: <18531.55558.294874.409557@arabic.ccs.neu.edu> <779bf2730806261130w22a0983r69053b037ba6de83@mail.gmail.com> Message-ID: <000e01c8d7bc$ae917190$2101a8c0@uw2b2dff239c4d> Correct, that works, thanks, Jos ----- Original Message ----- From: YC To: Eli Barzilay Cc: plt-scheme@list.cs.brown.edu Sent: Thursday, June 26, 2008 8:30 PM Subject: Re: [plt-scheme] IE Warnings To manually disable the warning you can find the solution here - http://radio.javaranch.com/pascarello/2005/05/18/1116473896158.html. It works in XP (I don't have Vista to verify), and it's easier to do than using MOTW. If it's just for yourself - the above should do it. If it's for deployment to others, my suggestions are 1) tell others about the manual solution, 2) as you said - use the installer to flip the registry (and as you said - not the best idea), or 3) deploy a mini web server and serve the file via that mini web server that only listen to the localhost (an icon that'll start the web server then shell-execute the link to the home page ought to do it). IMHO html files is easier to read from a web server (local or remote) rather than a file system. Cheers, yc On Thu, Jun 26, 2008 at 10:59 AM, Eli Barzilay wrote: (This is in case there's anyone that has a good solution to this problem.) When you view local files with scripts, you get IE to show the warning bar, which you must use to enable javascript. This is a problem that affects practically all pages, since they all have some JS. etc ------------------------------------------------------------------------------ _________________________________________________ For list-related administrative tasks: http://list.cs.brown.edu/mailman/listinfo/plt-scheme -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/553516df/attachment.htm From eli at barzilay.org Thu Jun 26 14:45:48 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:30 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18531.55558.294874.409557@arabic.ccs.neu.edu> References: <18531.55558.294874.409557@arabic.ccs.neu.edu> Message-ID: <18531.58332.995260.576589@arabic.ccs.neu.edu> On Jun 26, Eli Barzilay wrote: > [...] I forgot to add a useful link, in case anyone is interested in more details: http://www.phdcc.com/xpsp2.htm -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From grettke at acm.org Thu Jun 26 14:46:26 2008 From: grettke at acm.org (Grant Rettke) Date: Thu Mar 26 02:21:30 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18531.55558.294874.409557@arabic.ccs.neu.edu> References: <18531.55558.294874.409557@arabic.ccs.neu.edu> Message-ID: <756daca50806261146x74953207l29e9c951e5de625b@mail.gmail.com> Recommend that people should use something other than IE. I haven't got anything against IE, but I get the same problem with other development documentation and it is not worth the hassle. From mflatt at cs.utah.edu Thu Jun 26 14:55:33 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:30 2009 Subject: [plt-scheme] What are the semantics of optional variables? In-Reply-To: References: <56750b780806261104x59c021e5tb4afc55856956a75@mail.gmail.com> Message-ID: <20080626185533.BC7FF6500B7@mail-svr1.cs.utah.edu> But it doesn't seem to be properly documented, so I'll work on that. At Thu, 26 Jun 2008 14:15:19 -0400, Matthias Felleisen wrote: > > Yes. > > On Jun 26, 2008, at 2:04 PM, David Einstein wrote: > > > If I may join Circular function in asking annoying questions (co- > > sinning as it were), what exactly are the semantics of optional > > variables? > > It appears from experiment that they are evaluated sequentially in > > environments containing the previously declared parameters, kind of > > like let*. > > In fact, it appears that evaluation of optional parameters can > > safely[*] mutate earlier optional and non-optional parameters. > > > > > > [*] but not necessarily sanely. I've probably been writing too > > much R code > > > > _________________________________________________ > > 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 yinso.chen at gmail.com Thu Jun 26 15:49:27 2008 From: yinso.chen at gmail.com (YC) Date: Thu Mar 26 02:21:31 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18531.58257.417246.660928@arabic.ccs.neu.edu> References: <18531.55558.294874.409557@arabic.ccs.neu.edu> <779bf2730806261130w22a0983r69053b037ba6de83@mail.gmail.com> <18531.58257.417246.660928@arabic.ccs.neu.edu> Message-ID: <779bf2730806261249qb1af613sd85d87448db9595d@mail.gmail.com> On Thu, Jun 26, 2008 at 11:44 AM, Eli Barzilay wrote: > > > IMHO html files is easier to read from a web server (local or > > remote) rather than a file system. > > I know, but a web server has a bunch of other problems. (Like > managing another process, or complications from firewalls etc.) > Another possible approach (if you are willing to have a window's specific solution) is to use chm files - it cleanly gets around all the above issues, but you might not be able to convert your html files into chm file cleanly. Of course - if you are willing to consider this one, you are probably considering hta already. As far as I can tell, these are fundamentally "deployment problem"s that you'll run into as long as you are deploying to client machines. The only way you can effective remove deployment problems is not to deploy at all. But that might not fit your requirement. Otherwise, it's more about which is the least of all evils. Cheers, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/61c1a300/attachment.html From samth at ccs.neu.edu Thu Jun 26 15:49:34 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:21:31 2009 Subject: [plt-scheme] eval and phases (v4.0.1.2) In-Reply-To: <20080625185507.692A16500A8@mail-svr1.cs.utah.edu> References: <20080625185507.692A16500A8@mail-svr1.cs.utah.edu> Message-ID: <63bb19ae0806261249x16edeb68n80eafec790f42394@mail.gmail.com> On Wed, Jun 25, 2008 at 2:55 PM, Matthew Flatt wrote: > As of version 4.0.1.2 (now in SVN): > > 1. Each namespace has a "base phase" that is used by `eval', > `dynamic-require', etc., instead of always starting in phase 0. > > 2. While compile-time expressions are evaluated (such as the body of a > macro transformer or the right-hand side of `define-for-syntax'), > the current namespace is set to one whose base phase matches the > evaluation phase. I have a couple issues with this. First, the following seems like a bug. If you put this module in the Module language, and hit run: #lang scheme/base (require (for-syntax scheme/base) (for-template scheme/base)) (define-namespace-anchor anch) ;; local-expand and then typecheck an expression (define-syntax (tc-expr/expand stx) (syntax-case stx () [(_ e) #`(parameterize ([current-namespace (namespace-anchor->namespace anch)]) (let ([ex (expand 'e)]) (syntax->datum ex)))])) and then enter this at the REPL: (tc-expr/expand (+ 3 3)) you get the result: (#%app + '3 '3) as expected. If you put the call in the definitions window instead, you get this error: compile: bad syntax; function application is not allowed, because no #%app syntax transformer is bound in: (+ 3 3) This discrepancy seems problematic. Second, in the new regime, how can I accomplish what this macro is trying to do, since the current version no longer works? Thanks, -- sam th samth@ccs.neu.edu From eli at barzilay.org Thu Jun 26 16:33:07 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:31 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <779bf2730806261249qb1af613sd85d87448db9595d@mail.gmail.com> References: <18531.55558.294874.409557@arabic.ccs.neu.edu> <779bf2730806261130w22a0983r69053b037ba6de83@mail.gmail.com> <18531.58257.417246.660928@arabic.ccs.neu.edu> <779bf2730806261249qb1af613sd85d87448db9595d@mail.gmail.com> Message-ID: <18531.64771.23004.721903@arabic.ccs.neu.edu> On Jun 26, YC wrote: > On Thu, Jun 26, 2008 at 11:44 AM, Eli Barzilay wrote: > > > IMHO html files is easier to read from a web server (local or > > > remote) rather than a file system. > > > > I know, but a web server has a bunch of other problems. (Like > > managing another process, or complications from firewalls etc.) > > Another possible approach (if you are willing to have a window's > specific solution) is to use chm files - it cleanly gets around all > the above issues, but you might not be able to convert your html > files into chm file cleanly. Of course - if you are willing to > consider this one, you are probably considering hta already. I don't want to deal with chm because it means a completely different package for Windows. It also breaks the file-url--online-url translation that is right now trivial. > As far as I can tell, these are fundamentally "deployment problem"s > that you'll run into as long as you are deploying to client > machines. The only way you can effective remove deployment problems > is not to deploy at all. But that might not fit your requirement. Yes, not including the docs in the Windows distributions is a working solution... Just not a very good one... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mflatt at cs.utah.edu Thu Jun 26 16:38:14 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:31 2009 Subject: [plt-scheme] eval and phases (v4.0.1.2) In-Reply-To: <63bb19ae0806261249x16edeb68n80eafec790f42394@mail.gmail.com> References: <20080625185507.692A16500A8@mail-svr1.cs.utah.edu> <63bb19ae0806261249x16edeb68n80eafec790f42394@mail.gmail.com> Message-ID: <20080626203814.688FA650094@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 15:49:34 -0400, "Sam TH" wrote: > On Wed, Jun 25, 2008 at 2:55 PM, Matthew Flatt wrote: > > As of version 4.0.1.2 (now in SVN): > > > > 1. Each namespace has a "base phase" that is used by `eval', > > `dynamic-require', etc., instead of always starting in phase 0. > > > > 2. While compile-time expressions are evaluated (such as the body of a > > macro transformer or the right-hand side of `define-for-syntax'), > > the current namespace is set to one whose base phase matches the > > evaluation phase. > > I have a couple issues with this. First, the following seems like a > bug. If you put this module in the Module language, and hit run: More simply #lang scheme/base (define-namespace-anchor anch) (parameterize ([current-namespace (namespace-anchor->namespace anch)]) (eval '(+ 3 3))) This bug is fixed in SVN. (It had to do with lazily creating the lexical information for syntax objects in the body of a module. Roughly, a `force' was missing.) > Second, in the new regime, how can I accomplish what this macro is > trying to do, since the current version no longer works? I'm not sure I understand. Is it just a question of fixing the bug above? Matthew From czhu at cs.utah.edu Thu Jun 26 16:37:46 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:21:31 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18531.64771.23004.721903@arabic.ccs.neu.edu> References: <18531.55558.294874.409557@arabic.ccs.neu.edu> <779bf2730806261130w22a0983r69053b037ba6de83@mail.gmail.com> <18531.58257.417246.660928@arabic.ccs.neu.edu> <779bf2730806261249qb1af613sd85d87448db9595d@mail.gmail.com> <18531.64771.23004.721903@arabic.ccs.neu.edu> Message-ID: <4863FE1A.3000405@cs.utah.edu> Eli Barzilay wrote: > Yes, not including the docs in the Windows distributions is a working > solution... Just not a very good one... > > Just tell users to view the doc with Firefox, probably pop up a window for that if DrScheme detects the user is using IE on Windows (at least for the first time). Chongkai From samth at ccs.neu.edu Thu Jun 26 16:42:51 2008 From: samth at ccs.neu.edu (Sam TH) Date: Thu Mar 26 02:21:32 2009 Subject: [plt-scheme] eval and phases (v4.0.1.2) In-Reply-To: <20080626203814.688FA650094@mail-svr1.cs.utah.edu> References: <20080625185507.692A16500A8@mail-svr1.cs.utah.edu> <63bb19ae0806261249x16edeb68n80eafec790f42394@mail.gmail.com> <20080626203814.688FA650094@mail-svr1.cs.utah.edu> Message-ID: <63bb19ae0806261342s5b38028y6be01c1bc7a205ed@mail.gmail.com> On Thu, Jun 26, 2008 at 4:38 PM, Matthew Flatt wrote: > At Thu, 26 Jun 2008 15:49:34 -0400, "Sam TH" wrote: >> On Wed, Jun 25, 2008 at 2:55 PM, Matthew Flatt wrote: >> > As of version 4.0.1.2 (now in SVN): >> > >> > 1. Each namespace has a "base phase" that is used by `eval', >> > `dynamic-require', etc., instead of always starting in phase 0. >> > >> > 2. While compile-time expressions are evaluated (such as the body of a >> > macro transformer or the right-hand side of `define-for-syntax'), >> > the current namespace is set to one whose base phase matches the >> > evaluation phase. >> >> I have a couple issues with this. First, the following seems like a >> bug. If you put this module in the Module language, and hit run: > > More simply > > #lang scheme/base > > (define-namespace-anchor anch) > (parameterize ([current-namespace (namespace-anchor->namespace anch)]) > (eval '(+ 3 3))) > > This bug is fixed in SVN. (It had to do with lazily creating the > lexical information for syntax objects in the body of a module. > Roughly, a `force' was missing.) Great! >> Second, in the new regime, how can I accomplish what this macro is >> trying to do, since the current version no longer works? > > I'm not sure I understand. Is it just a question of fixing the bug > above? Yes. I had thought the error was an intentional consequence of the new behavior, but I was wrong. Thanks, -- sam th samth@ccs.neu.edu From eli at barzilay.org Thu Jun 26 16:57:43 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:32 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <365603.48305.qm@web81308.mail.mud.yahoo.com> References: <365603.48305.qm@web81308.mail.mud.yahoo.com> Message-ID: <18532.711.494695.477507@arabic.ccs.neu.edu> On Jun 26, George Herson wrote: > Chongkai Zhu wrote: > > Just tell users to view the doc with Firefox, probably pop up a > > window for that if DrScheme detects the user is using IE on > > Windows (at least for the first time). > > Yes, have DrScheme offer to launch another browser, I really don't want to do that, in the same way that I wouldn't want to see IE popping up a dialg box telling people not to use PLT. > or to change the security setting in IE (unless this > no-local-javascript setting can be detected as off), at the point > where DrScheme currently launches IE. Include option in this dialog > window to not ask again. This is also not a good solution. Changing the setting is not a good idea exactly because it is there. IIUC, there were lots of security issues, and MS just diverted them all by the "local machine zone lockdown" -- but the problems are still there, and if it's renabled them people will be exposed to them. I definitely don't want to be responsible for security issues with IE killing someone's computer... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From gherson at snet.net Thu Jun 26 16:52:06 2008 From: gherson at snet.net (George Herson) Date: Thu Mar 26 02:21:32 2009 Subject: [plt-scheme] IE Warnings Message-ID: <365603.48305.qm@web81308.mail.mud.yahoo.com> Chongkai Zhu wrote: > Just tell users to view the doc with Firefox, probably pop up a window > for that > if DrScheme detects the user is using IE on Windows (at least for the > first time). Yes, have DrScheme offer to launch another browser, or to change the security setting in IE (unless this no-local-javascript setting can be detected as off), at the point where DrScheme currently launches IE. Include option in this dialog window to not ask again. George From czhu at cs.utah.edu Thu Jun 26 17:01:25 2008 From: czhu at cs.utah.edu (Chongkai Zhu) Date: Thu Mar 26 02:21:32 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18532.711.494695.477507@arabic.ccs.neu.edu> References: <365603.48305.qm@web81308.mail.mud.yahoo.com> <18532.711.494695.477507@arabic.ccs.neu.edu> Message-ID: <486403A5.5040209@cs.utah.edu> Eli Barzilay wrote: > On Jun 26, George Herson wrote: > >> Chongkai Zhu wrote: >> >>> Just tell users to view the doc with Firefox, probably pop up a >>> window for that if DrScheme detects the user is using IE on >>> Windows (at least for the first time). >>> > I really don't want to do that, in the same way that I wouldn't want > to see IE popping up a dialg box telling people not to use PLT. > > Pop out a suggestion, not an order. Give users the option to keep using IE and at their own cost, not able to view/search PLT docs. Chongkai From eli at barzilay.org Thu Jun 26 17:07:34 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:32 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <486403A5.5040209@cs.utah.edu> References: <365603.48305.qm@web81308.mail.mud.yahoo.com> <18532.711.494695.477507@arabic.ccs.neu.edu> <486403A5.5040209@cs.utah.edu> Message-ID: <18532.1302.108124.516928@arabic.ccs.neu.edu> On Jun 26, Chongkai Zhu wrote: > Eli Barzilay wrote: > > On Jun 26, George Herson wrote: > > > >> Chongkai Zhu wrote: > >> > >>> Just tell users to view the doc with Firefox, probably pop up a > >>> window for that if DrScheme detects the user is using IE on > >>> Windows (at least for the first time). > >>> > > I really don't want to do that, in the same way that I wouldn't > > want to see IE popping up a dialg box telling people not to use > > PLT. > > Pop out a suggestion, not an order. Give users the option to keep > using IE and at their own cost, not able to view/search PLT docs. I wouldn't dream of popping up an order -- it's the suggestion that is bad enough. The browser situation on Windows is bad enough (each of the four main browsers suggests setting itself as the default when you run it), and I don't think PLT should participate in this ugly game. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mark.engelberg at gmail.com Thu Jun 26 17:25:09 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:21:32 2009 Subject: [plt-scheme] R6RS Interoperability In-Reply-To: References: Message-ID: I don't know if this is already in your plans for requesting funding, but my top request would be to work on speed optimizations for typed scheme modules in order to close the performance gap between Scheme and other statically-typed languages. I'm starting to actually use PLT Scheme to get real work done (as opposed to just using it for educational purposes), and there's nothing I find more frustrating than writing something in Scheme, and then realizing I need to rewrite it in some other language for performance reasons. Of course, many applications aren't performance-sensitive, but it would be nice if there were an easy path to higher performance when necessary. --Mark On Wed, Jun 25, 2008 at 7:16 PM, Matthias Felleisen wrote: > > We are about to formulate a request for funding for just such activities. > People's input and support letters are highly welcome. -- Matthias > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From matteo.pradella at gmail.com Thu Jun 26 09:05:23 2008 From: matteo.pradella at gmail.com (Matteo Pradella) Date: Thu Mar 26 02:21:33 2009 Subject: [plt-scheme] r6rs vs module language performance Message-ID: <9d73edb9-84c1-415c-b125-65e320288fe4@2g2000hsn.googlegroups.com> Hi, I ported to r6rs a small research prototype I wrote a couple of years ago (in mzscheme v.3, I think), to "try and feel" the new standard. Just to waste some time, I tried on the same input file both the "pure mzscheme" and the r6rs versions: the former took 5.8s on my machine, while the latter 1m14s. The application core resides in a single r6rs library, installed (and compiled) through plt-r6rs --install. I was wondering if there are performance tips to improve r6rs code in mzscheme, and what are the main differences between running r6rs vs module code (just some general ideas, I'm curious). Thanks for all your nice work, Matteo From cwbowron at gmail.com Thu Jun 26 13:17:18 2008 From: cwbowron at gmail.com (Christopher Bowron) Date: Thu Mar 26 02:21:33 2009 Subject: [plt-scheme] Interacting with win32 Event Loops Message-ID: <114e756c0806261017q4988d82bn8f90f7430b412af@mail.gmail.com> I'm writing a couple extensions in C to get to some lower level platform features using mzc, and I'm having trouble figuring out good ways to achieve my goals. I want to be able to interact with some win32 features including console lock notifications and hotkey notifications. The problem is the notifications come in through the window message loop, and I don't know a good way to get that information back into the scheme environment. I've got it working for the console locks using the following method: the scheme_initialize() function starts a thread that creates a hidden dialog box with an event handler that toggles a global variable when the console gets locked or unlocked. The scheme_initialize() functions also installs a function just checks the value of this global variable and returns scheme_false or scheme_true. Then inside the scheme environment I basically poll on that function. I would like to add some global hotkeys which I would also get notifications of in the same event loop as the console lock notifications. My current thinking is to create an input port in the C code that blocks until a hot key message is processed in the event loop, and from the scheme environment launch a thread that loops while reading in from that port. There might be a better way to do this, and I'm not sure how to trigger the input port when a message does get processed if I do go with this route. My other thought is that this is inside a MrEd frame based program. If there were a way to extend the message loop of the MrEd frame itself, it would also be possible to just register the hotkey with the MrEd frame's HWND from (send frame get-handle). Can anybody offer any advice? This is for my media playback program I am working on http://www.bazquux.com/wiki/Schemep3. I want to be able to pause playback while the computer is locked, and to be able to have global hotkeys for controlling playback. Thanks for any help. -- Christopher W. Bowron [ Nothing is exciting if you know what the outcome will be ] - Joseph Campbell -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080626/82d08117/attachment.htm From graphettion at gmail.com Thu Jun 26 18:30:43 2008 From: graphettion at gmail.com (Mr. Watson) Date: Thu Mar 26 02:21:34 2009 Subject: [plt-scheme] HtDP > Chapter 2 > Exercise 2.3.3. Message-ID: <3f7831bf-868a-48e0-893d-a5d576db6da8@59g2000hsb.googlegroups.com> Hello, The problem says, "An old-style movie theater has a simple profit function. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the function total-profit. It consumes the number of attendees (of a show) and produces how much income the attendees produce." I understand the problem but I cannot get it to work (not calculate correctly) in DrScheme. Here is my working progress: (define(total-profit attendee) (- 0 (- 20 0 (* 0.5 attendee) (+ 0 (* 5 attendee))))) Any ideas on what I am doing wrong? I might be miscalculating so tell me if its right. Thank you, From mflatt at cs.utah.edu Thu Jun 26 21:41:27 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:34 2009 Subject: [plt-scheme] Interacting with win32 Event Loops In-Reply-To: <114e756c0806261017q4988d82bn8f90f7430b412af@mail.gmail.com> References: <114e756c0806261017q4988d82bn8f90f7430b412af@mail.gmail.com> Message-ID: <20080627014128.D86C76500B9@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 13:17:18 -0400, "Christopher Bowron" wrote: > I'm writing a couple extensions in C to get to some lower level platform > features using mzc, and I'm having trouble figuring out good ways to achieve > my goals. > > I want to be able to interact with some win32 features including console > lock notifications and hotkey notifications. > > The problem is the notifications come in through the window message loop, > and I don't know a good way to get that information back into the scheme > environment. > > I've got it working for the console locks using the following method: > > the scheme_initialize() function starts a thread that creates a hidden > dialog box with an event handler that toggles a global variable when the > console gets locked or unlocked. The scheme_initialize() functions also > installs a function just checks the value of this global variable and > returns scheme_false or scheme_true. Then inside the scheme environment I > basically poll on that function. That's the first thing I'd try too. I'd probably set up an sychronizable event instead of polling. To implement the event, use scheme_add_evt(). The message-loop thread would need post to a Windows sempahore; polling the event would poll the semeaphore, and the event would implemented the need-wakeup function by registering the semaphore via scheme_add_fd_handle(). > I would like to add some global hotkeys which I would also get notifications > of in the same event loop as the console lock notifications. > > My current thinking is to create an input port in the C code that blocks > until a hot key message is processed in the event loop, and from the scheme > environment launch a thread that loops while reading in from that port. > > There might be a better way to do this, and I'm not sure how to trigger the > input port when a message does get processed if I do go with this route. In principle, you don't need a whole port --- just a synchronizable event as above. When the event is ready and synchronized, it can return specific data. Unfortunately, I see that the return-a-value part of the event API isn't exposed to extensions. Still, you can use your extension-implemented object on the Scheme side as an event to determine when data is available, and then use a separate operation (also provided by the extension) to extract data from the object. > My other thought is that this is inside a MrEd frame based program. If > there were a way to extend the message loop of the MrEd frame itself, it > would also be possible to just register the hotkey with the MrEd frame's > HWND from (send frame get-handle). You can get the HWND of a `widow<%>' object through the `get-handle' method. Matthew From mflatt at cs.utah.edu Thu Jun 26 21:44:31 2008 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Mar 26 02:21:34 2009 Subject: [plt-scheme] r6rs vs module language performance In-Reply-To: <9d73edb9-84c1-415c-b125-65e320288fe4@2g2000hsn.googlegroups.com> References: <9d73edb9-84c1-415c-b125-65e320288fe4@2g2000hsn.googlegroups.com> Message-ID: <20080627014432.7758C6500B1@mail-svr1.cs.utah.edu> At Thu, 26 Jun 2008 06:05:23 -0700 (PDT), Matteo Pradella wrote: > I ported to r6rs a small research prototype I wrote a couple of years > ago (in mzscheme v.3, I think), to "try and feel" the new standard. > Just to waste some time, I tried on the same input file both the "pure > mzscheme" and the r6rs versions: the former took 5.8s on my machine, > while the latter 1m14s. The application core resides in a single r6rs > library, installed (and compiled) through plt-r6rs --install. That's a surprising difference. An R6RS program should generally run in PLT Scheme about the same speed as a `#lang scheme' or `#lang mzscheme' version. Can you say more about what the program does? Is it something we can try running? Matthew From clements at brinckerhoff.org Thu Jun 26 22:15:14 2008 From: clements at brinckerhoff.org (John Clements) Date: Thu Mar 26 02:21:34 2009 Subject: [plt-scheme] HtDP > Chapter 2 > Exercise 2.3.3. In-Reply-To: <3f7831bf-868a-48e0-893d-a5d576db6da8@59g2000hsb.googlegroups.com> References: <3f7831bf-868a-48e0-893d-a5d576db6da8@59g2000hsb.googlegroups.com> Message-ID: On Jun 26, 2008, at 3:30 PM, Mr. Watson wrote: > Hello, > > The problem says, > > "An old-style movie theater has a simple profit function. Each > customer pays $5 per ticket. Every performance costs the theater $20, > plus $.50 per attendee. Develop the function total-profit. It consumes > the number of attendees (of a show) and produces how much income the > attendees produce." > > I understand the problem but I cannot get it to work (not calculate > correctly) in DrScheme. > > Here is my working progress: > > (define(total-profit attendee) > (- 0 > (- 20 0 > (* 0.5 attendee) > (+ 0 > (* 5 attendee))))) Your work in progress doesn't seem to include the early steps of the design recipe, most notably the examples. What are your examples? All the best, John Clements -------------- 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/20080626/556b2b43/smime.bin From tom.gordon at mac.com Fri Jun 27 01:27:37 2008 From: tom.gordon at mac.com (Tom Gordon) Date: Thu Mar 26 02:21:35 2009 Subject: [plt-scheme] Re: R6RS Interoperability References: <20080626174453.8917C6500AA@mail-svr1.cs.utah.edu> Message-ID: Matthew Flatt writes: > FWIW, supporting an "R6RS but with immutable pairs" language is part of > the plan: > > http://list.cs.brown.edu/pipermail/plt-scheme/2008-March/023485.html > > But we haven't gotten there, yet. Here's the relevant passage from your earlier message: "... R6RS pairs are mutable, which means that R6RS libraries and `scheme/base' have incompatible notions of pairs and lists. We expect that few R6RS libraries will need `(r6rs mutable-pairs)' library, directly or transitively, in which case they can be trivially translated to an "R6RS/i" variant of R6RS with immutable pairs --- and then interoperate smoothly with PLT Scheme code. We plan to implement this variant of R6RS and provide a way to translate and install a given set of R6RS libraries as R6RS/i libraries." Are you suggesting the R6RS requires pairs to be mutable? Couldn't the decision of R6RS to move mutable pairs to a library be understood as deprecating mutable pairs and allowing, even encouraging, pairs to be immutable in modules which do not depend on (r6rs mutable-pairs)? Does you plan really introduce a "variant" of R6RS, or isn't it rather just a step towards optimizing your implemention of R6RS, completely in line with the standard? Anyway, I'm very to happy with your plans. Thanks. -Tom From chan_dhf at yahoo.de Fri Jun 27 01:08:04 2008 From: chan_dhf at yahoo.de (Danny Chan) Date: Thu Mar 26 02:21:35 2009 Subject: [plt-scheme] Newbie question: non-blocking IO In-Reply-To: <756daca50806260427s39f0f668m8396bf2a98e3747e@mail.gmail.com> References: <660027.15093.qm@web26207.mail.ukl.yahoo.com> <756daca50806260427s39f0f668m8396bf2a98e3747e@mail.gmail.com> Message-ID: <200806270708.05766.chan_dhf@yahoo.de> Am Donnerstag, 26. Juni 2008 13:27:36 schrieb Grant Rettke: > On Wed, Jun 18, 2008 at 6:07 AM, Danny Chan wrote: > > I'd like to write a program that captures a video flow from a camera > > developed in my company. I already found out how to talk to the low level > > C libraries that are needed to talk to our hardware using the FFI. > > Would two threads communicating over sockets be an option? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme Do you mean two separate processes? I need to transfer roughly 25 MB/s, and I fear that the overhead of using sockets and serializing/unserializing my data would be too much. Although I have to admit, that I haven't tried it. Danny From noelwelsh at gmail.com Fri Jun 27 02:14:14 2008 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Mar 26 02:21:35 2009 Subject: [plt-scheme] R6RS Interoperability In-Reply-To: References: Message-ID: On Thu, Jun 26, 2008 at 10:25 PM, Mark Engelberg wrote: > ... I'm starting to actually use > PLT Scheme to get real work done (as opposed to just using it for > educational purposes), and there's nothing I find more frustrating > than writing something in Scheme, and then realizing I need to rewrite > it in some other language for performance reasons. Of course, many > applications aren't performance-sensitive, but it would be nice if > there were an easy path to higher performance when necessary. If your application involves something for which high performance C libraries are available (e.g. BLAS for linear algebra) you can very easily create binding to those libraries using the FFI. Will Farr's plt-linalg library is a good example of this. I'd like more speed as much as the next programmer, but I expect getting funding for compiler development is very difficult as the basics have been done many times over and therefore have very little research value. N. From mark.engelberg at gmail.com Fri Jun 27 02:35:33 2008 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Thu Mar 26 02:21:35 2009 Subject: [plt-scheme] R6RS Interoperability In-Reply-To: References: Message-ID: On Thu, Jun 26, 2008 at 11:14 PM, Noel Welsh wrote: > I'd like more speed as much as the next programmer, but I expect > getting funding for compiler development is very difficult as the > basics have been done many times over and therefore have very little > research value. > > N. > Are there any mainstream languages out there which allow you to code your program quickly using a dynamically-typed language, and then gradually add type annotations to improve performance? As I understand it, "gradual typing" is an active area of research, and Typed Scheme brings new techniques to the table, in terms of providing soundness in interaction between modules and allowing fairly straightforward annotation of idiomatic Scheme code. Since performance is a key goal of gradual typing, it seems like a reasonable litmus test to apply to Typed Scheme -- does Typed Scheme's approach offer the same sorts of optimization opportunities as a statically-typed language, or are there complications caused by its interoperability with dynamically-typed modules? Seems like a genuine, useful research topic to me... --Mark From yarkun at gmail.com Fri Jun 27 03:23:39 2008 From: yarkun at gmail.com (Yavuz Arkun) Date: Thu Mar 26 02:21:36 2009 Subject: [plt-scheme] R6RS Interoperability In-Reply-To: References: Message-ID: <2748b30b0806270023u33827c05p1aecfb41c5183699@mail.gmail.com> As a newbie, I wonder if explicit typing alone would allow for a large enough performance gain. I have the vague impression that Stalin for example, touts "whole program optimization", whatever that is, as the main reason for its performance. What order of performance gains can you expect from explicitly typing vs allowing compiler to infer type, given a whole program and its typical inputs? (Just curious.) Or more generally, what would be the first 3 performance optimizations PLT people would implement, given infinite resources? --Yavuz On Fri, Jun 27, 2008 at 09:35, Mark Engelberg wrote: > On Thu, Jun 26, 2008 at 11:14 PM, Noel Welsh wrote: >> I'd like more speed as much as the next programmer, but I expect >> getting funding for compiler development is very difficult as the >> basics have been done many times over and therefore have very little >> research value. >> >> N. >> > > Are there any mainstream languages out there which allow you to code > your program quickly using a dynamically-typed language, and then > gradually add type annotations to improve performance? As I > understand it, "gradual typing" is an active area of research, and > Typed Scheme brings new techniques to the table, in terms of providing > soundness in interaction between modules and allowing fairly > straightforward annotation of idiomatic Scheme code. Since > performance is a key goal of gradual typing, it seems like a > reasonable litmus test to apply to Typed Scheme -- does Typed Scheme's > approach offer the same sorts of optimization opportunities as a > statically-typed language, or are there complications caused by its > interoperability with dynamically-typed modules? Seems like a > genuine, useful research topic to me... > > --Mark > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > From matteo.pradella at gmail.com Fri Jun 27 04:36:05 2008 From: matteo.pradella at gmail.com (Matteo Pradella) Date: Thu Mar 26 02:21:36 2009 Subject: [plt-scheme] r6rs vs module language performance In-Reply-To: <20080627014432.7758C6500B1@mail-svr1.cs.utah.edu> References: <9d73edb9-84c1-415c-b125-65e320288fe4@2g2000hsn.googlegroups.com> <20080627014432.7758C6500B1@mail-svr1.cs.utah.edu> Message-ID: <506621620806270136j330432c8u4fe4303665c6da61@mail.gmail.com> On Fri, Jun 27, 2008 at 3:44 AM, Matthew Flatt wrote: > At Thu, 26 Jun 2008 06:05:23 -0700 (PDT), Matteo Pradella wrote: >> I ported to r6rs a small research prototype I wrote a couple of years >> ago (in mzscheme v.3, I think), to "try and feel" the new standard. >> Just to waste some time, I tried on the same input file both the "pure >> mzscheme" and the r6rs versions: the former took 5.8s on my machine, >> while the latter 1m14s. The application core resides in a single r6rs >> library, installed (and compiled) through plt-r6rs --install. > > That's a surprising difference. An R6RS program should generally run in > PLT Scheme about the same speed as a `#lang scheme' or `#lang mzscheme' > version. > > Can you say more about what the program does? Is it something we can > try running? > Sure -- the tool is open-source. It is actually a parser and completer for pictures specified by tiling systems, based on a SAT-solver. I'll prepare simplified versions (without the SAT interface -- the strange behavior is in the main part of the tool, the one generating the encoding formulae, so you don't really need the SAT-solver), and send them to you asap. Thanks, Matteo From d.j.gurnell at gmail.com Fri Jun 27 05:04:50 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:21:36 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18532.1302.108124.516928@arabic.ccs.neu.edu> References: <365603.48305.qm@web81308.mail.mud.yahoo.com> <18532.711.494695.477507@arabic.ccs.neu.edu> <486403A5.5040209@cs.utah.edu> <18532.1302.108124.516928@arabic.ccs.neu.edu> Message-ID: There's an article on this here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19578 It seems like you might be able to code the files so they are run as if they are on a remote site (see solution 2). -- Dave From eli at barzilay.org Fri Jun 27 05:10:12 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:36 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: References: <365603.48305.qm@web81308.mail.mud.yahoo.com> <18532.711.494695.477507@arabic.ccs.neu.edu> <486403A5.5040209@cs.utah.edu> <18532.1302.108124.516928@arabic.ccs.neu.edu> Message-ID: <18532.44660.112822.446614@arabic.ccs.neu.edu> On Jun 27, Dave Gurnell wrote: > There's an article on this here: > > http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19578 > > It seems like you might be able to code the files so they are run as > if they are on a remote site (see solution 2). Yes, that's the solution that I described in the original post. The problem is that once you fake a lower zone like that, links from it to a higher zone don't work (silently, to get maximum annoyance factor). So you need to add these comments on *all* html pages, so the target link will also be considered in the same zone ("Internet"). But if there's a link to something that is not an html file (like the release notes text files), then there's no way to add that comment, and these links will just not work. That makes things considerabley worse. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From d.j.gurnell at gmail.com Fri Jun 27 05:14:46 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:21:36 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: References: <365603.48305.qm@web81308.mail.mud.yahoo.com> <18532.711.494695.477507@arabic.ccs.neu.edu> <486403A5.5040209@cs.utah.edu> <18532.1302.108124.516928@arabic.ccs.neu.edu> Message-ID: <48E72BB4-602F-4D8B-9992-874F99F903FF@gmail.com> > There's an article on this here: > > http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19578 > > It seems like you might be able to code the files so they are run as > if they are on a remote site (see solution 2). I've done a little further reading... the coding system described above is called a "Mark of the Web". There's more information here: http://msdn.microsoft.com/en-us/library/ms537628(VS.85).aspx It looks like adding a Mark can cause some other problems like preventing pop-ups working, but hopefully these won't be issues for Scribble. -- Dave From d.j.gurnell at gmail.com Fri Jun 27 05:16:05 2008 From: d.j.gurnell at gmail.com (Dave Gurnell) Date: Thu Mar 26 02:21:36 2009 Subject: [plt-scheme] IE Warnings In-Reply-To: <18532.44660.112822.446614@arabic.ccs.neu.edu> References: <365603.48305.qm@web81308.mail.mud.yahoo.com> <18532.711.494695.477507@arabic.ccs.neu.edu> <486403A5.5040209@cs.utah.edu> <18532.1302.108124.516928@arabic.ccs.neu.edu> <18532.44660.112822.446614@arabic.ccs.neu.edu> Message-ID: Sorry - just got this. Should've read your original post more carefully. > Yes, that's the solution that I described in the original post. The > problem is that once you fake a lower zone like that, links from it to > a higher zone don't work (silently, to get maximum annoyance factor). > So you need to add these comments on *all* html pages, so the target > link will also be considered in the same zone ("Internet"). But if > there's a link to something that is not an html file (like the release > notes text files), then there's no way to add that comment, and these > links will just not work. That makes things considerabley worse. From tpapp at Princeton.EDU Fri Jun 27 05:33:24 2008 From: tpapp at Princeton.EDU (Tamas K Papp) Date: Thu Mar 26 02:21:36 2009 Subject: [plt-scheme] collection not found error at startup Message-ID: <20080627093324.GA29098@pu100877.student.princeton.edu> Hi, I am using the debian package of mzscheme. Recently (must have been after an upgrade), it started giving me this error message at startup: Welcome to MzScheme v4.0.1 [cgc], Copyright (c) 2004-2008 PLT Scheme Inc. lib: standard-module-name-resolver: collection not found: "scheme" in any of: (# #) in: (lib "scheme/init") standard-module-name-resolver: collection not found: "scheme" in any of: (# #) Any ideas how to fix this? Thanks, Tamas From eli at barzilay.org Fri Jun 27 05:38:39 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:37 2009 Subject: [plt-scheme] collection not found error at startup In-Reply-To: <20080627093324.GA29098@pu100877.student.princeton.edu> References: <20080627093324.GA29098@pu100877.student.princeton.edu> Message-ID: <18532.46367.313022.261076@arabic.ccs.neu.edu> On Jun 27, Tamas K Papp wrote: > Hi, > > I am using the debian package of mzscheme. Recently (must have been > after an upgrade), it started giving me this error message at startup: > > Welcome to MzScheme v4.0.1 [cgc], Copyright (c) 2004-2008 PLT Scheme Inc. > lib: standard-module-name-resolver: collection not found: "scheme" in any of: (# #) in: (lib "scheme/init") > standard-module-name-resolver: collection not found: "scheme" in any of: (# #) Do you have a "/usr/lib/plt/collects/scheme" directory? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From spdegabrielle at gmail.com Fri Jun 27 05:52:45 2008 From: spdegabrielle at gmail.com (Stephen De Gabrielle) Date: Thu Mar 26 02:21:37 2009 Subject: [plt-scheme] optional arguments in function contracts Message-ID: <595b9ab20806270252s7013490fu5548bf84ee5c4505@mail.gmail.com> HI, I'm trying to do a contract with an optional argument, but I'm stuck (and can't find an example in the doc's, tests or 'plt-full' code) my provide/contract is; ;; write-email accepts an email and optionally an output-port (2 or one args) (provide/contract (write-email (email? (or/c none/c output-port?) . -> . any)) ) and my function is ;; write-email : message [output-port] -> void (define write-email (lambda (message (out-port (current-output-port))) (printf "~V:~V~N" message out-port) ) ) but calling it I get the error; procedure write-email: expects 2 arguments, given 1: Forgive me if this is a dumb question but I feel I'm missing something fundamental about how I'm specifying the contract? 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 tpapp at Princeton.EDU Fri Jun 27 05:49:24 2008 From: tpapp at Princeton.EDU (Tamas K Papp) Date: Thu Mar 26 02:21:37 2009 Subject: [plt-scheme] collection not found error at startup In-Reply-To: <18532.46367.313022.261076@arabic.ccs.neu.edu> References: <20080627093324.GA29098@pu100877.student.princeton.edu> <18532.46367.313022.261076@arabic.ccs.neu.edu> Message-ID: <20080627094924.GA29585@pu100877.student.princeton.edu> On Fri, Jun 27, 2008 at 05:38:39AM -0400, Eli Barzilay wrote: > On Jun 27, Tamas K Papp wrote: > > Hi, > > > > I am using the debian package of mzscheme. Recently (must have been > > after an upgrade), it started giving me this error message at startup: > > > > Welcome to MzScheme v4.0.1 [cgc], Copyright (c) 2004-2008 PLT Scheme Inc. > > lib: standard-module-name-resolver: collection not found: "scheme" in any of: (# #) in: (lib "scheme/init") > > standard-module-name-resolver: collection not found: "scheme" in any of: (# #) > > Do you have a "/usr/lib/plt/collects/scheme" directory? No, I have /usr/lib/plt/collects/mzscheme (not scheme), part of the mzscheme package. Is it possible that the "scheme" (vs "mzscheme") is a leftover from some earlier conf file I have? Where should I look for this? Tamas From eli at barzilay.org Fri Jun 27 06:04:10 2008 From: eli at barzilay.org (Eli Barzilay) Date: Thu Mar 26 02:21:37 2009 Subject: [plt-scheme] collection not found error at startup In-Reply-To: <20080627094924.GA29585@pu100877.student.princeton.edu> References: <20080627093324.GA29098@pu100877.student.princeton.edu> <18532.46367.313022.261076@arabic.ccs.neu.edu> <20080627094924.GA29585@pu100877.student.princeton.edu> Message-ID: <18532.47898.347301.520849@arabic.ccs.neu.edu> On Jun 27, Tamas K Papp wrote: > On Fri, Jun 27, 2008 at 05:38:39AM -0400, Eli Barzilay wrote: > > On Jun 27, Tamas K Papp wrote: > > > Hi, > > > > > > I am using the debian package of mzscheme. Recently (must have been > > > after an upgrade), it started giving me this error message at startup: > > > > > > Welcome to MzScheme v4.0.1 [cgc], Copyright (c) 2004-2008 PLT Scheme Inc. > > > lib: standard-module-name-resolver: collection not found: "scheme" in any of: (# #) in: (lib "scheme/init") > > > standard-module-name-resolver: collection not found: "scheme" in any of: (# #) > > > > Do you have a "/usr/lib/plt/collects/scheme" directory? > > No, I have /usr/lib/plt/collects