From eli at barzilay.org Fri Feb 6 00:45:02 2009 From: eli at barzilay.org (Eli Barzilay) Date: Fri Feb 6 00:45:24 2009 Subject: [plt-dev] Testing Message-ID: <18827.52830.916495.471702@arabic.ccs.neu.edu> Is this thing working? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From rafkind at cs.utah.edu Fri Feb 6 00:46:09 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Fri Feb 6 00:46:36 2009 Subject: [plt-dev] Testing In-Reply-To: <18827.52830.916495.471702@arabic.ccs.neu.edu> References: <18827.52830.916495.471702@arabic.ccs.neu.edu> Message-ID: <498BCEA1.8090007@cs.utah.edu> Eli Barzilay wrote: > Is this thing working? > polo From grettke at acm.org Fri Feb 6 11:22:17 2009 From: grettke at acm.org (Grant Rettke) Date: Fri Feb 6 11:22:36 2009 Subject: [plt-dev] Testing In-Reply-To: <18827.52830.916495.471702@arabic.ccs.neu.edu> References: <18827.52830.916495.471702@arabic.ccs.neu.edu> Message-ID: <756daca50902060822u43a2137anfb61eae4d297b88e@mail.gmail.com> On Thu, Feb 5, 2009 at 11:45 PM, Eli Barzilay wrote: > Is this thing working ACK From dherman at ccs.neu.edu Fri Feb 6 11:40:54 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 6 11:41:05 2009 Subject: [plt-dev] infix prefab literals Message-ID: <498C6816.1050400@ccs.neu.edu> Would it cause any problems to extend the reader syntax of prefab literals to allow the double-dotted-infix notation? E.g.: > (define-struct : (name binding) #:prefab) > #s(foo . : . 42) #s(: foo 42) > (equal? #s(foo . : . 42) #s(: foo 42)) #t Dave From carl.eastlund at gmail.com Fri Feb 6 11:43:11 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Fri Feb 6 11:43:30 2009 Subject: [plt-dev] infix prefab literals In-Reply-To: <498C6816.1050400@ccs.neu.edu> References: <498C6816.1050400@ccs.neu.edu> Message-ID: <990e0c030902060843sc9bd6dbj7f15311d6432105@mail.gmail.com> On Fri, Feb 6, 2009 at 11:40 AM, Dave Herman wrote: > Would it cause any problems to extend the reader syntax of prefab literals > to allow the double-dotted-infix notation? E.g.: > > > (define-struct : (name binding) #:prefab) > > #s(foo . : . 42) > #s(: foo 42) > > (equal? #s(foo . : . 42) #s(: foo 42)) > #t As an aside, I believe you shouldn't have to write that define-struct to run those expressions. Hence the word "prefab". You only need the define-struct to use the functions make-:, :?, :-name, and :-binding. -- Carl Eastlund From dherman at ccs.neu.edu Fri Feb 6 11:46:24 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 6 11:46:35 2009 Subject: [plt-dev] #hash vs. #s Message-ID: <498C6960.3090808@ccs.neu.edu> The read behavior of #hash/#hasheq and #s is different; the former always `quote' their body whereas the latter allows quasiquotation: > (define x 42) > `#hash((x . ,x)) #hash((x . ,x)) > `#hasheq((x . ,x)) #hasheq((x . ,x)) > `#s(x ,x) #s(x 42) I don't know if it's too late for an incompatible change, but allowing quasiquotation of #hash/#hasheq seems more useful, no? Dave From dherman at ccs.neu.edu Fri Feb 6 11:48:26 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 6 11:48:37 2009 Subject: [plt-dev] infix prefab literals In-Reply-To: <990e0c030902060843sc9bd6dbj7f15311d6432105@mail.gmail.com> References: <498C6816.1050400@ccs.neu.edu> <990e0c030902060843sc9bd6dbj7f15311d6432105@mail.gmail.com> Message-ID: <498C69DA.3070802@ccs.neu.edu> > As an aside, I believe you shouldn't have to write that define-struct > to run those expressions. Hence the word "prefab". You only need the > define-struct to use the functions make-:, :?, :-name, and :-binding. Yeah, don't know why I threw that in there. Consider it executable documentation. :) Dave PS Eli, any idea why the subject line of my first message had "Re:" at the beginning? I created the message with the "new message" button in my mail client, not by replying to a previous message. From mflatt at cs.utah.edu Fri Feb 6 11:53:56 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 11:54:16 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <498C6960.3090808@ccs.neu.edu> References: <498C6960.3090808@ccs.neu.edu> Message-ID: <20090206165356.682A865003B@mail-svr1.cs.utah.edu> At Fri, 06 Feb 2009 11:46:24 -0500, Dave Herman wrote: > The read behavior of #hash/#hasheq and #s is different; the former > always `quote' their body whereas the latter allows quasiquotation: > > > (define x 42) > > `#hash((x . ,x)) > #hash((x . ,x)) > > `#hasheq((x . ,x)) > #hasheq((x . ,x)) > > `#s(x ,x) > #s(x 42) > > I don't know if it's too late for an incompatible change, but allowing > quasiquotation of #hash/#hasheq seems more useful, no? Unquote for the value part of a `#hash' could work. I'm less sure that it's a good idea for the key position, since the reader constructs a hash table. Aside from the possible constraint on keys, it's not so much a reader issue as a question of what the `quasiquote' macro recognizes. The source of `quasiquote' is "collects/scheme/qq-and-or.ss". From dherman at ccs.neu.edu Fri Feb 6 11:55:07 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 6 11:55:31 2009 Subject: [plt-dev] infix prefab literals In-Reply-To: <498C69DA.3070802@ccs.neu.edu> References: <498C6816.1050400@ccs.neu.edu> <990e0c030902060843sc9bd6dbj7f15311d6432105@mail.gmail.com> <498C69DA.3070802@ccs.neu.edu> Message-ID: <498C6B6B.1000909@ccs.neu.edu> > PS Eli, any idea why the subject line of my first message had "Re:" at > the beginning? I created the message with the "new message" button in my > mail client, not by replying to a previous message. Ignore that, it appears to be a bug in my mail client's display. The message source doesn't include the "Re:" in the subject. Sorry for the noise. Dave From mflatt at cs.utah.edu Fri Feb 6 12:04:33 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 12:04:53 2009 Subject: [plt-dev] infix prefab literals In-Reply-To: <498C6816.1050400@ccs.neu.edu> References: <498C6816.1050400@ccs.neu.edu> Message-ID: <20090206170433.A78676500A9@mail-svr1.cs.utah.edu> At Fri, 06 Feb 2009 11:40:54 -0500, Dave Herman wrote: > Would it cause any problems to extend the reader syntax of prefab > literals to allow the double-dotted-infix notation? E.g.: > > > (define-struct : (name binding) #:prefab) > > #s(foo . : . 42) > #s(: foo 42) > > (equal? #s(foo . : . 42) #s(: foo 42)) > #t That seems ok to me. Any objections? From cce at ccs.neu.edu Fri Feb 6 13:48:31 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Fri Feb 6 13:48:49 2009 Subject: [plt-dev] planet remove and scribble Message-ID: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> Is there a reason why "planet remove" builds the scribble documentation for the package being removed? Is this a bug, or some odd technicality to maintain consistency of the collections? % planet remove cce dracula.plt 8 0 ============= Removing (cce dracula.plt 8 0) ============= setup-plt: version: 4.1.4.2 [3m] setup-plt: variants: 3m setup-plt: main collects: /Users/cce/plt/main/collects setup-plt: collects paths: setup-plt: /Users/cce/Library/PLT Scheme/4.1.4.2/collects setup-plt: /Users/cce/plt/main/collects setup-plt: --- cleaning collections --- setup-plt: deleting: in /cce/dracula.plt/8/0 setup-plt: deleting: in /cce/dracula.plt/8/0/acl2 setup-plt: deleting: in /cce/dracula.plt/8/0/drscheme setup-plt: deleting: in /cce/dracula.plt/8/0/guide setup-plt: deleting: in /cce/dracula.plt/8/0/lang setup-plt: deleting: in /cce/dracula.plt/8/0/lang/primitive-procedures setup-plt: deleting: in /cce/dracula.plt/8/0/modular setup-plt: deleting: in /cce/dracula.plt/8/0/modular/lang setup-plt: deleting: in /cce/dracula.plt/8/0/private setup-plt: deleting: in /cce/dracula.plt/8/0/proof setup-plt: deleting: in /cce/dracula.plt/8/0/reference setup-plt: deleting: in /cce/dracula.plt/8/0/reference/acl2 setup-plt: deleting: in /cce/dracula.plt/8/0/reference/modular setup-plt: deleting: in /cce/dracula.plt/8/0/reference/teachpacks setup-plt: deleting: in /cce/dracula.plt/8/0/teachpacks setup-plt: --- updating info-domain tables --- setup-plt: updating: /Users/cce/Library/PLT Scheme/planet/300/4.1.4.2/cache.ss setup-plt: --- building documentation --- setup-plt: running: /cce/dracula.plt/8/0/guide/guide.scrbl setup-plt: running: /cce/dracula.plt/8/0/reference/reference.scrbl [snipped lots of stuff about other documents] setup-plt: WARNING: undefined tag in /cce/dracula.plt/8/0/guide/guide.scrbl: setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defun) setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") =) setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") +) setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") t) setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defstub) setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defaxiom) setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") *) setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defthm) setup-plt: WARNING: undefined tag in /cce/dracula.plt/8/0/reference/reference.scrbl: setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") mv) setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") equal) setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") lexorder) setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") union-eq) setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") cdar) setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") make-list) [snipped lots more undefined tags like this] setup-plt: rendering: /cce/dracula.plt/8/0/guide/guide.scrbl setup-plt: rendering: /cce/dracula.plt/8/0/reference/reference.scrbl setup-plt: --- post-installing collections --- setup-plt: done Erasing metadata Deleting files in /Users/cce/Library/PLT Scheme/planet/300/4.1.4.2/cache/cce/dracula.plt/8/0 Trimming empty directories -- Carl Eastlund From robby at eecs.northwestern.edu Fri Feb 6 13:51:48 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Fri Feb 6 13:52:09 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> Message-ID: <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> I'm not sure myself, but I think that it needs to do that to rebuild the index, but perhaps it is doing it wrong? Robby On Fri, Feb 6, 2009 at 12:48 PM, Carl Eastlund wrote: > Is there a reason why "planet remove" builds the scribble > documentation for the package being removed? Is this a bug, or some > odd technicality to maintain consistency of the collections? > > % planet remove cce dracula.plt 8 0 > > ============= Removing (cce dracula.plt 8 0) ============= > setup-plt: version: 4.1.4.2 [3m] > setup-plt: variants: 3m > setup-plt: main collects: /Users/cce/plt/main/collects > setup-plt: collects paths: > setup-plt: /Users/cce/Library/PLT Scheme/4.1.4.2/collects > setup-plt: /Users/cce/plt/main/collects > setup-plt: --- cleaning collections --- > setup-plt: deleting: in /cce/dracula.plt/8/0 > setup-plt: deleting: in /cce/dracula.plt/8/0/acl2 > setup-plt: deleting: in /cce/dracula.plt/8/0/drscheme > setup-plt: deleting: in /cce/dracula.plt/8/0/guide > setup-plt: deleting: in /cce/dracula.plt/8/0/lang > setup-plt: deleting: in /cce/dracula.plt/8/0/lang/primitive-procedures > setup-plt: deleting: in /cce/dracula.plt/8/0/modular > setup-plt: deleting: in /cce/dracula.plt/8/0/modular/lang > setup-plt: deleting: in /cce/dracula.plt/8/0/private > setup-plt: deleting: in /cce/dracula.plt/8/0/proof > setup-plt: deleting: in /cce/dracula.plt/8/0/reference > setup-plt: deleting: in /cce/dracula.plt/8/0/reference/acl2 > setup-plt: deleting: in /cce/dracula.plt/8/0/reference/modular > setup-plt: deleting: in /cce/dracula.plt/8/0/reference/teachpacks > setup-plt: deleting: in /cce/dracula.plt/8/0/teachpacks > setup-plt: --- updating info-domain tables --- > setup-plt: updating: /Users/cce/Library/PLT Scheme/planet/300/4.1.4.2/cache.ss > setup-plt: --- building documentation --- > setup-plt: running: /cce/dracula.plt/8/0/guide/guide.scrbl > setup-plt: running: /cce/dracula.plt/8/0/reference/reference.scrbl > > [snipped lots of stuff about other documents] > > setup-plt: WARNING: undefined tag in > /cce/dracula.plt/8/0/guide/guide.scrbl: > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defun) > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") =) > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") +) > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") t) > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defstub) > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defaxiom) > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") *) > setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defthm) > setup-plt: WARNING: undefined tag in > /cce/dracula.plt/8/0/reference/reference.scrbl: > setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") mv) > setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") equal) > setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") lexorder) > setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") union-eq) > setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") cdar) > setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") make-list) > > [snipped lots more undefined tags like this] > > setup-plt: rendering: /cce/dracula.plt/8/0/guide/guide.scrbl > setup-plt: rendering: /cce/dracula.plt/8/0/reference/reference.scrbl > setup-plt: --- post-installing collections --- > setup-plt: done > Erasing metadata > Deleting files in /Users/cce/Library/PLT > Scheme/planet/300/4.1.4.2/cache/cce/dracula.plt/8/0 > Trimming empty directories > > -- > Carl Eastlund > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From dherman at ccs.neu.edu Fri Feb 6 14:10:54 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 6 14:11:06 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <20090206165356.682A865003B@mail-svr1.cs.utah.edu> References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> Message-ID: <498C8B3E.8080100@ccs.neu.edu> > Unquote for the value part of a `#hash' could work. I'm less sure that > it's a good idea for the key position, since the reader constructs a > hash table. Good point. For example: (define table `#hash((,(read) . foo) (,(read) . bar) (,(read) . baz))) The reader constructs a hash with a single entry whose key is the S-expression (unquote (read)), and it's too late for `qq' to reconstruct the source. > Aside from the possible constraint on keys, it's not so much a reader > issue as a question of what the `quasiquote' macro recognizes. The > source of `quasiquote' is "collects/scheme/qq-and-or.ss". I've mostly implemented this on my machine. I can submit a patch, but which behavior do you prefer? 1) qq leaves the key position quoted and interprets the value position. 2) qq errors on any occurrence of `unquote' in a key position. 3) scrap this whole extension and leave `qq' as is. Dave From jacobm at cs.uchicago.edu Fri Feb 6 14:21:53 2009 From: jacobm at cs.uchicago.edu (Jacob Matthews) Date: Fri Feb 6 14:22:14 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> Message-ID: <46b603df0902061121u5210871ax23f4126280cd2261@mail.gmail.com> FWIW, I'm pretty sure I didn't make it do that on purpose. It appears that you could fix it by just adding (make-docs #f) to the s-exp beginning (when clean? ...) in the run-single-installer/internal function in collects/setup/plt-single-installer.ss, but I don't have time right now (or a good setup) to verify that. -jacob On Fri, Feb 6, 2009 at 10:51 AM, Robby Findler wrote: > I'm not sure myself, but I think that it needs to do that to rebuild > the index, but perhaps it is doing it wrong? > > Robby > > On Fri, Feb 6, 2009 at 12:48 PM, Carl Eastlund wrote: >> Is there a reason why "planet remove" builds the scribble >> documentation for the package being removed? Is this a bug, or some >> odd technicality to maintain consistency of the collections? >> >> % planet remove cce dracula.plt 8 0 >> >> ============= Removing (cce dracula.plt 8 0) ============= >> setup-plt: version: 4.1.4.2 [3m] >> setup-plt: variants: 3m >> setup-plt: main collects: /Users/cce/plt/main/collects >> setup-plt: collects paths: >> setup-plt: /Users/cce/Library/PLT Scheme/4.1.4.2/collects >> setup-plt: /Users/cce/plt/main/collects >> setup-plt: --- cleaning collections --- >> setup-plt: deleting: in /cce/dracula.plt/8/0 >> setup-plt: deleting: in /cce/dracula.plt/8/0/acl2 >> setup-plt: deleting: in /cce/dracula.plt/8/0/drscheme >> setup-plt: deleting: in /cce/dracula.plt/8/0/guide >> setup-plt: deleting: in /cce/dracula.plt/8/0/lang >> setup-plt: deleting: in /cce/dracula.plt/8/0/lang/primitive-procedures >> setup-plt: deleting: in /cce/dracula.plt/8/0/modular >> setup-plt: deleting: in /cce/dracula.plt/8/0/modular/lang >> setup-plt: deleting: in /cce/dracula.plt/8/0/private >> setup-plt: deleting: in /cce/dracula.plt/8/0/proof >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/acl2 >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/modular >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/teachpacks >> setup-plt: deleting: in /cce/dracula.plt/8/0/teachpacks >> setup-plt: --- updating info-domain tables --- >> setup-plt: updating: /Users/cce/Library/PLT Scheme/planet/300/4.1.4.2/cache.ss >> setup-plt: --- building documentation --- >> setup-plt: running: /cce/dracula.plt/8/0/guide/guide.scrbl >> setup-plt: running: /cce/dracula.plt/8/0/reference/reference.scrbl >> >> [snipped lots of stuff about other documents] >> >> setup-plt: WARNING: undefined tag in >> /cce/dracula.plt/8/0/guide/guide.scrbl: >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defun) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") =) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") +) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") t) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defstub) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defaxiom) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") *) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defthm) >> setup-plt: WARNING: undefined tag in >> /cce/dracula.plt/8/0/reference/reference.scrbl: >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") mv) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") equal) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") lexorder) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") union-eq) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") cdar) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") make-list) >> >> [snipped lots more undefined tags like this] >> >> setup-plt: rendering: /cce/dracula.plt/8/0/guide/guide.scrbl >> setup-plt: rendering: /cce/dracula.plt/8/0/reference/reference.scrbl >> setup-plt: --- post-installing collections --- >> setup-plt: done >> Erasing metadata >> Deleting files in /Users/cce/Library/PLT >> Scheme/planet/300/4.1.4.2/cache/cce/dracula.plt/8/0 >> Trimming empty directories >> >> -- >> Carl Eastlund >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > > From cce at ccs.neu.edu Fri Feb 6 14:22:27 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Fri Feb 6 14:22:48 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> Message-ID: <990e0c030902061122r4c8c60dfj1805cac27164daf7@mail.gmail.com> Hmm. It does need to rebuild the index. And it needs to rebuild the index without the package being removed. But it doesn't want to reinstall the package if anything has a dependency on it... so it leaves the package installed. That much makes sense. Is there a way to do that, and either rebuild only the index (not any code / documentation) or else, when rebuilding other code, not follow dependencies into the package being removed? I can see why it's doing some rebuilding, and why the package is still in place, but it seems unfortunate that it gets pulled into the actual build process. We could try another tack. Remove the package, rebuild, but change the module resolver while rebuilding so that it reports an error during any attempts to retrieve that planet package. That would rebuild as much of the index as possible without the package, wouldn't traverse the package itself, and wouldn't replace it with any new download. --Carl On Fri, Feb 6, 2009 at 1:51 PM, Robby Findler wrote: > I'm not sure myself, but I think that it needs to do that to rebuild > the index, but perhaps it is doing it wrong? > > Robby > > On Fri, Feb 6, 2009 at 12:48 PM, Carl Eastlund wrote: >> Is there a reason why "planet remove" builds the scribble >> documentation for the package being removed? Is this a bug, or some >> odd technicality to maintain consistency of the collections? >> >> % planet remove cce dracula.plt 8 0 >> >> ============= Removing (cce dracula.plt 8 0) ============= >> setup-plt: version: 4.1.4.2 [3m] >> setup-plt: variants: 3m >> setup-plt: main collects: /Users/cce/plt/main/collects >> setup-plt: collects paths: >> setup-plt: /Users/cce/Library/PLT Scheme/4.1.4.2/collects >> setup-plt: /Users/cce/plt/main/collects >> setup-plt: --- cleaning collections --- >> setup-plt: deleting: in /cce/dracula.plt/8/0 >> setup-plt: deleting: in /cce/dracula.plt/8/0/acl2 >> setup-plt: deleting: in /cce/dracula.plt/8/0/drscheme >> setup-plt: deleting: in /cce/dracula.plt/8/0/guide >> setup-plt: deleting: in /cce/dracula.plt/8/0/lang >> setup-plt: deleting: in /cce/dracula.plt/8/0/lang/primitive-procedures >> setup-plt: deleting: in /cce/dracula.plt/8/0/modular >> setup-plt: deleting: in /cce/dracula.plt/8/0/modular/lang >> setup-plt: deleting: in /cce/dracula.plt/8/0/private >> setup-plt: deleting: in /cce/dracula.plt/8/0/proof >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/acl2 >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/modular >> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/teachpacks >> setup-plt: deleting: in /cce/dracula.plt/8/0/teachpacks >> setup-plt: --- updating info-domain tables --- >> setup-plt: updating: /Users/cce/Library/PLT Scheme/planet/300/4.1.4.2/cache.ss >> setup-plt: --- building documentation --- >> setup-plt: running: /cce/dracula.plt/8/0/guide/guide.scrbl >> setup-plt: running: /cce/dracula.plt/8/0/reference/reference.scrbl >> >> [snipped lots of stuff about other documents] >> >> setup-plt: WARNING: undefined tag in >> /cce/dracula.plt/8/0/guide/guide.scrbl: >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defun) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") =) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") +) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") t) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defstub) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defaxiom) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") *) >> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defthm) >> setup-plt: WARNING: undefined tag in >> /cce/dracula.plt/8/0/reference/reference.scrbl: >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") mv) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") equal) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") lexorder) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") union-eq) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") cdar) >> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") make-list) >> >> [snipped lots more undefined tags like this] >> >> setup-plt: rendering: /cce/dracula.plt/8/0/guide/guide.scrbl >> setup-plt: rendering: /cce/dracula.plt/8/0/reference/reference.scrbl >> setup-plt: --- post-installing collections --- >> setup-plt: done >> Erasing metadata >> Deleting files in /Users/cce/Library/PLT >> Scheme/planet/300/4.1.4.2/cache/cce/dracula.plt/8/0 >> Trimming empty directories >> >> -- >> Carl Eastlund From robby at eecs.northwestern.edu Fri Feb 6 14:32:01 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Fri Feb 6 14:32:19 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <990e0c030902061122r4c8c60dfj1805cac27164daf7@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> <990e0c030902061122r4c8c60dfj1805cac27164daf7@mail.gmail.com> Message-ID: <932b2f1f0902061132r3dfb3f4cvdc8a531ae566e41a@mail.gmail.com> On Fri, Feb 6, 2009 at 1:22 PM, Carl Eastlund wrote: > Hmm. It does need to rebuild the index. And it needs to rebuild the > index without the package being removed. But it doesn't want to > reinstall the package if anything has a dependency on it... so it > leaves the package installed. That much makes sense. Is there a way > to do that, and either rebuild only the index (not any code / > documentation) or else, when rebuilding other code, not follow > dependencies into the package being removed? I can see why it's doing > some rebuilding, and why the package is still in place, but it seems > unfortunate that it gets pulled into the actual build process. > > We could try another tack. Remove the package, rebuild, but change > the module resolver while rebuilding so that it reports an error > during any attempts to retrieve that planet package. That would > rebuild as much of the index as possible without the package, wouldn't > traverse the package itself, and wouldn't replace it with any new > download. That seems like an interesting thing to try. The idea is that error should never be signaled, right? Robby > --Carl > > On Fri, Feb 6, 2009 at 1:51 PM, Robby Findler > wrote: >> I'm not sure myself, but I think that it needs to do that to rebuild >> the index, but perhaps it is doing it wrong? >> >> Robby >> >> On Fri, Feb 6, 2009 at 12:48 PM, Carl Eastlund wrote: >>> Is there a reason why "planet remove" builds the scribble >>> documentation for the package being removed? Is this a bug, or some >>> odd technicality to maintain consistency of the collections? >>> >>> % planet remove cce dracula.plt 8 0 >>> >>> ============= Removing (cce dracula.plt 8 0) ============= >>> setup-plt: version: 4.1.4.2 [3m] >>> setup-plt: variants: 3m >>> setup-plt: main collects: /Users/cce/plt/main/collects >>> setup-plt: collects paths: >>> setup-plt: /Users/cce/Library/PLT Scheme/4.1.4.2/collects >>> setup-plt: /Users/cce/plt/main/collects >>> setup-plt: --- cleaning collections --- >>> setup-plt: deleting: in /cce/dracula.plt/8/0 >>> setup-plt: deleting: in /cce/dracula.plt/8/0/acl2 >>> setup-plt: deleting: in /cce/dracula.plt/8/0/drscheme >>> setup-plt: deleting: in /cce/dracula.plt/8/0/guide >>> setup-plt: deleting: in /cce/dracula.plt/8/0/lang >>> setup-plt: deleting: in /cce/dracula.plt/8/0/lang/primitive-procedures >>> setup-plt: deleting: in /cce/dracula.plt/8/0/modular >>> setup-plt: deleting: in /cce/dracula.plt/8/0/modular/lang >>> setup-plt: deleting: in /cce/dracula.plt/8/0/private >>> setup-plt: deleting: in /cce/dracula.plt/8/0/proof >>> setup-plt: deleting: in /cce/dracula.plt/8/0/reference >>> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/acl2 >>> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/modular >>> setup-plt: deleting: in /cce/dracula.plt/8/0/reference/teachpacks >>> setup-plt: deleting: in /cce/dracula.plt/8/0/teachpacks >>> setup-plt: --- updating info-domain tables --- >>> setup-plt: updating: /Users/cce/Library/PLT Scheme/planet/300/4.1.4.2/cache.ss >>> setup-plt: --- building documentation --- >>> setup-plt: running: /cce/dracula.plt/8/0/guide/guide.scrbl >>> setup-plt: running: /cce/dracula.plt/8/0/reference/reference.scrbl >>> >>> [snipped lots of stuff about other documents] >>> >>> setup-plt: WARNING: undefined tag in >>> /cce/dracula.plt/8/0/guide/guide.scrbl: >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defun) >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") =) >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") +) >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") t) >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defstub) >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defaxiom) >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") *) >>> setup-plt: ((planet "main.ss" ("cce" "dracula.plt" 8 0) "modular") defthm) >>> setup-plt: WARNING: undefined tag in >>> /cce/dracula.plt/8/0/reference/reference.scrbl: >>> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") mv) >>> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") equal) >>> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") lexorder) >>> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") union-eq) >>> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") cdar) >>> setup-plt: ((planet "dracula.ss" ("cce" "dracula.plt" 8 0) "lang") make-list) >>> >>> [snipped lots more undefined tags like this] >>> >>> setup-plt: rendering: /cce/dracula.plt/8/0/guide/guide.scrbl >>> setup-plt: rendering: /cce/dracula.plt/8/0/reference/reference.scrbl >>> setup-plt: --- post-installing collections --- >>> setup-plt: done >>> Erasing metadata >>> Deleting files in /Users/cce/Library/PLT >>> Scheme/planet/300/4.1.4.2/cache/cce/dracula.plt/8/0 >>> Trimming empty directories >>> >>> -- >>> Carl Eastlund > From cce at ccs.neu.edu Fri Feb 6 14:44:43 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Fri Feb 6 14:45:02 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <932b2f1f0902061132r3dfb3f4cvdc8a531ae566e41a@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> <990e0c030902061122r4c8c60dfj1805cac27164daf7@mail.gmail.com> <932b2f1f0902061132r3dfb3f4cvdc8a531ae566e41a@mail.gmail.com> Message-ID: <990e0c030902061144s3a2da1d9y336668324ff259f5@mail.gmail.com> On Fri, Feb 6, 2009 at 2:32 PM, Robby Findler wrote: > On Fri, Feb 6, 2009 at 1:22 PM, Carl Eastlund wrote: >> Hmm. It does need to rebuild the index. And it needs to rebuild the >> index without the package being removed. But it doesn't want to >> reinstall the package if anything has a dependency on it... so it >> leaves the package installed. That much makes sense. Is there a way >> to do that, and either rebuild only the index (not any code / >> documentation) or else, when rebuilding other code, not follow >> dependencies into the package being removed? I can see why it's doing >> some rebuilding, and why the package is still in place, but it seems >> unfortunate that it gets pulled into the actual build process. >> >> We could try another tack. Remove the package, rebuild, but change >> the module resolver while rebuilding so that it reports an error >> during any attempts to retrieve that planet package. That would >> rebuild as much of the index as possible without the package, wouldn't >> traverse the package itself, and wouldn't replace it with any new >> download. > > That seems like an interesting thing to try. The idea is that error > should never be signaled, right? No, the error may be signaled. You may have A:1.0 and B:1.0 that depends on A:1.0+. To upgrade A, you might first remove A:1.0 and then install A:1.1. While removing A:1.0, B:1.0 will signal an error because nothing satisfies its dependence on A. But that's an ok error to signal, it shouldn't interrupt setup-plt, but it does let the user know they have to replace A as their next step. If we're not trying to support this behavior of "remove a middle dependency and replace it later" -- which breaks down with multiple parts to the dependency anyway -- we should just remove the package outright and run setup-plt, and if anything depends on it that causes a re-download, the user "just shouldn't do that". Or, rather than special casing that you can't load that package, perhaps we should just disable the planet installation mechanism during planet remove -- no package should be installed, from web or from cache, during a remove. --Carl From mflatt at cs.utah.edu Fri Feb 6 17:32:28 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 17:32:48 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <498C8B3E.8080100@ccs.neu.edu> References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> Message-ID: <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> At Fri, 06 Feb 2009 14:10:54 -0500, Dave Herman wrote: > > Unquote for the value part of a `#hash' could work. I'm less sure that > > it's a good idea for the key position, since the reader constructs a > > hash table. > > Good point. For example: > > (define table > `#hash((,(read) . foo) > (,(read) . bar) > (,(read) . baz))) > > The reader constructs a hash with a single entry whose key is the > S-expression (unquote (read)), and it's too late for `qq' to reconstruct > the source. > > > Aside from the possible constraint on keys, it's not so much a reader > > issue as a question of what the `quasiquote' macro recognizes. The > > source of `quasiquote' is "collects/scheme/qq-and-or.ss". > > I've mostly implemented this on my machine. I can submit a patch, but > which behavior do you prefer? > > 1) qq leaves the key position quoted and interprets the value position. > 2) qq errors on any occurrence of `unquote' in a key position. > 3) scrap this whole extension and leave `qq' as is. I like 2. It seems like a sensible and useful extension. The change could potentially break some old code, but that seems unlikely. From dherman at ccs.neu.edu Fri Feb 6 17:44:26 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 6 17:44:39 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> Message-ID: <498CBD4A.8070906@ccs.neu.edu> >> 1) qq leaves the key position quoted and interprets the value position. >> 2) qq errors on any occurrence of `unquote' in a key position. >> 3) scrap this whole extension and leave `qq' as is. > > I like 2. It seems like a sensible and useful extension. The change > could potentially break some old code, but that seems unlikely. Okay. I've implemented everything but the check for `unquote'. Is there any easy way to traverse an entire S-expression looking for occurrences of `unquote'? I'm not sure what the full definition of mzscheme S-expression is (pairs, structs, vectors, hashes, boxes, ...). Thanks again, Dave From ryanc at ccs.neu.edu Fri Feb 6 17:47:23 2009 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Fri Feb 6 17:47:51 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> Message-ID: On Feb 6, 2009, at 5:32 PM, Matthew Flatt wrote: > At Fri, 06 Feb 2009 14:10:54 -0500, Dave Herman wrote: >>> Unquote for the value part of a `#hash' could work. I'm less sure >>> that >>> it's a good idea for the key position, since the reader constructs a >>> hash table. >> >> Good point. For example: >> >> (define table >> `#hash((,(read) . foo) >> (,(read) . bar) >> (,(read) . baz))) >> >> The reader constructs a hash with a single entry whose key is the >> S-expression (unquote (read)), and it's too late for `qq' to >> reconstruct >> the source. >> >>> Aside from the possible constraint on keys, it's not so much a >>> reader >>> issue as a question of what the `quasiquote' macro recognizes. The >>> source of `quasiquote' is "collects/scheme/qq-and-or.ss". >> >> I've mostly implemented this on my machine. I can submit a patch, but >> which behavior do you prefer? >> >> 1) qq leaves the key position quoted and interprets the value >> position. >> 2) qq errors on any occurrence of `unquote' in a key position. >> 3) scrap this whole extension and leave `qq' as is. > > I like 2. It seems like a sensible and useful extension. The change > could potentially break some old code, but that seems unlikely. Doesn't that mean that some hash tables that should have literal representations won't? What will the following code produce? (define t (make-hash)) (hash-set! t '(unquote 5) 'value) (let-values ([(in out) (make-pipe)]) (parameterize ((current-input-port in) (current-output-port out)) (write t) (read))) Ryan > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From mflatt at cs.utah.edu Fri Feb 6 17:58:59 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 17:59:19 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> Message-ID: <20090206225859.90C28650085@mail-svr1.cs.utah.edu> At Fri, 6 Feb 2009 17:47:23 -0500, Ryan Culpepper wrote: > > On Feb 6, 2009, at 5:32 PM, Matthew Flatt wrote: > > > At Fri, 06 Feb 2009 14:10:54 -0500, Dave Herman wrote: > >>> Unquote for the value part of a `#hash' could work. I'm less sure > >>> that > >>> it's a good idea for the key position, since the reader constructs a > >>> hash table. > >> > >> Good point. For example: > >> > >> (define table > >> `#hash((,(read) . foo) > >> (,(read) . bar) > >> (,(read) . baz))) > >> > >> The reader constructs a hash with a single entry whose key is the > >> S-expression (unquote (read)), and it's too late for `qq' to > >> reconstruct > >> the source. > >> > >>> Aside from the possible constraint on keys, it's not so much a > >>> reader > >>> issue as a question of what the `quasiquote' macro recognizes. The > >>> source of `quasiquote' is "collects/scheme/qq-and-or.ss". > >> > >> I've mostly implemented this on my machine. I can submit a patch, but > >> which behavior do you prefer? > >> > >> 1) qq leaves the key position quoted and interprets the value > >> position. > >> 2) qq errors on any occurrence of `unquote' in a key position. > >> 3) scrap this whole extension and leave `qq' as is. > > > > I like 2. It seems like a sensible and useful extension. The change > > could potentially break some old code, but that seems unlikely. Oops --- I meant to vote for "1", not "2". > Doesn't that mean that some hash tables that should have literal > representations won't? Yes, at least in terms of quasiquote. That's a good reason against 2. From mflatt at cs.utah.edu Fri Feb 6 18:10:55 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 18:11:18 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd Message-ID: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> For you amusement, I've put my current work here: http://svn.plt-scheme.org/plt/branches/mflatt/mred-experiment/ It's really two pieces (though currently somewhat tangled): * "wxme" subdirectory: A port of the editor class (`editor<%>', `snip%', etc.) from C++ to Scheme. There's nothing really to see, yet, except a big pile of code. It's about 75% done, and it should be worthwhile whether or not the rest of the experiment pans out. It could be ready to merge into the SVN trunk sometime in March, or maybe even sooner. * "cocoa.ss", "gtk.ss", and "win32.ss", with associated sub-directories: Proof-of-concept bindings to Cocoa, GtK, and Win32 using `scheme/foreign'. For example, under Mac OS X, you can run mzscheme cocoa.ss and a window will appear (but in the background, because the application is not wrapped in an ".app" bundle). You'll need some extra libraries to make it work: * Unix/X11: Install GtK and Cairo. (You almost certainly have them already.) * Mac OS X: Drop the following file into your "plt/lib" directory, or put it in any standard shared-library location: http://www.cs.utah.edu/~mflatt/tmp/cairo.dylib * Windows: Drop the following files into your "plt/lib" directory, or put them in any standard DLL location: http://www.cs.utah.edu/~mflatt/tmp/zlib1.dll http://www.cs.utah.edu/~mflatt/tmp/libpng12-0.dll http://www.cs.utah.edu/~mflatt/tmp/libcairo-2.dll One piece of the puzzle is easy to split from the rest: implementing the `dc<%>' classes on top of Cairo. If anyone wants to take on that task, let me know. Matthew From rafkind at cs.utah.edu Fri Feb 6 18:18:50 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Fri Feb 6 18:19:12 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> Message-ID: <498CC55A.1090909@cs.utah.edu> Matthew Flatt wrote: > For you amusement, I've put my current work here: > > http://svn.plt-scheme.org/plt/branches/mflatt/mred-experiment/ > > It's really two pieces (though currently somewhat tangled): > > * "wxme" subdirectory: A port of the editor class (`editor<%>', > `snip%', etc.) from C++ to Scheme. > > There's nothing really to see, yet, except a big pile of code. It's > about 75% done, and it should be worthwhile whether or not the rest > of the experiment pans out. It could be ready to merge into the SVN > trunk sometime in March, or maybe even sooner. > > * "cocoa.ss", "gtk.ss", and "win32.ss", with associated > sub-directories: Proof-of-concept bindings to Cocoa, GtK, and Win32 > using `scheme/foreign'. For example, under Mac OS X, you can run > > mzscheme cocoa.ss > $ mzscheme gtk.ss ffi-lib: couldn't open "libobjc.so" (libobjc.so: cannot open shared object file: No such file or directory) Under linux. I'm not sure exactly where its coming from, I took out the ffi/objc from gtk/utils.ss, but there must be other references. From rafkind at cs.utah.edu Fri Feb 6 18:23:32 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Fri Feb 6 18:23:51 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> Message-ID: <498CC674.4060504@cs.utah.edu> > * Unix/X11: Install GtK and Cairo. (You almost certainly have > them already.) > > On my system I have /usr/lib/libcairo.so.2, not libcairo.2.so, so loading (ffi-lib "libcairo.2") fails. From mflatt at cs.utah.edu Fri Feb 6 18:47:16 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 18:47:53 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <498CC55A.1090909@cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> <498CC55A.1090909@cs.utah.edu> Message-ID: <20090206234718.37C126500C2@mail-svr1.cs.utah.edu> At Fri, 06 Feb 2009 16:18:50 -0700, Jon Rafkind wrote: > $ mzscheme gtk.ss > ffi-lib: couldn't open "libobjc.so" (libobjc.so: cannot open shared > object file: No such file or directory) > > Under linux. I'm not sure exactly where its coming from, I took out the > ffi/objc from gtk/utils.ss, but there must be other references. There was another one that didn't belong in "types.ss". From mflatt at cs.utah.edu Fri Feb 6 18:47:22 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 18:47:56 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <498CC674.4060504@cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> <498CC674.4060504@cs.utah.edu> Message-ID: <20090206234723.BD1E165008C@mail-svr1.cs.utah.edu> At Fri, 06 Feb 2009 16:23:32 -0700, Jon Rafkind wrote: > > > * Unix/X11: Install GtK and Cairo. (You almost certainly have > > them already.) > > > > > On my system I have /usr/lib/libcairo.so.2, not libcairo.2.so, so > loading (ffi-lib "libcairo.2") fails. I think this is now fixed. From clements at brinckerhoff.org Fri Feb 6 19:09:53 2009 From: clements at brinckerhoff.org (John Clements) Date: Fri Feb 6 19:10:29 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> Message-ID: <8387422C-B101-4014-A808-8BA25AC94E97@brinckerhoff.org> On Feb 6, 2009, at 3:10 PM, Matthew Flatt wrote: > For you amusement, I've put my current work here: > > * Mac OS X: Drop the following file into your "plt/lib" > directory, or put it in any standard shared-library location: > > http://www.cs.utah.edu/~mflatt/tmp/cairo.dylib Two incredibly minor things under Mac OS X, PPC: 1) putting the dylib file into plt/lib didn't work until I explicitly added plt/lib to my LD_LIBRARY_PATH. 2) the supplied dylib file is intel-only. Okay, I should stop whining and go look for a PPC cairo library. Thanks! John computer:/tmp/mred-experiment clements$ mzscheme cocoa.ss ffi-lib: couldn't open "cairo.dylib" (dlopen(cairo.dylib, 10): image not found) computer:/tmp/mred-experiment clements$ which mzscheme /Users/clements/plt/bin/mzscheme computer:/tmp/mred-experiment clements$ ls ~/plt/lib PLT_MrEd.framework cairo.dylib libmzscheme3m.a starter PLT_MzScheme.framework libmzgc.a mzdyn.o buildinfo libmzscheme.a mzdyn3m.o computer:/tmp/mred-experiment clements$ echo $LD_LIBRARY_PATH /sw/lib: computer:/tmp/mred-experiment clements$ LD_LIBRARY_PATH=~/plt/lib:$ {LD_LIBRARY_PATH} computer:/tmp/mred-experiment clements$ mzscheme cocoa.ss ffi-lib: couldn't open "cairo.dylib" (dlopen(cairo.dylib, 10): no suitable image found. Did find: /Users/clements/plt/lib/cairo.dylib: mach-o, but wrong architecture /Users/clements/plt/lib/cairo.dylib: mach-o, but wrong architecture) computer:/tmp/mred-experiment 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-dev/attachments/20090206/fecb4f93/smime.bin From henk at henk.ca Fri Feb 6 20:12:06 2009 From: henk at henk.ca (Henk Boom) Date: Fri Feb 6 20:17:47 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <20090206234723.BD1E165008C@mail-svr1.cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> <498CC674.4060504@cs.utah.edu> <20090206234723.BD1E165008C@mail-svr1.cs.utah.edu> Message-ID: 2009/2/6 Matthew Flatt : > At Fri, 06 Feb 2009 16:23:32 -0700, Jon Rafkind wrote: >> >> > * Unix/X11: Install GtK and Cairo. (You almost certainly have >> > them already.) >> > >> > >> On my system I have /usr/lib/libcairo.so.2, not libcairo.2.so, so >> loading (ffi-lib "libcairo.2") fails. > > I think this is now fixed. Another library naming issue, on my Gentoo system the libraries are libgdk-x11-2.0.so libgtk-x11-2.0.so with a .0 after the 2. With that fix it seems to work =). This looks interesting! I'm curious of one thing though, why separate bindings for the three UI systems instead of one set of bindings for a new version of wxwidgets? Henk From mflatt at cs.utah.edu Fri Feb 6 21:22:36 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 6 21:22:58 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> <498CC674.4060504@cs.utah.edu> <20090206234723.BD1E165008C@mail-svr1.cs.utah.edu> Message-ID: <20090207022237.EB6BD6500C2@mail-svr1.cs.utah.edu> At Fri, 6 Feb 2009 20:12:06 -0500, Henk Boom wrote: > Another library naming issue, on my Gentoo system the libraries are > > libgdk-x11-2.0.so > libgtk-x11-2.0.so > > with a .0 after the 2. With that fix it seems to work =). Does anyone know a Right Way to find libraries, or should `ffi-lib' have a big set of search heuristics that hopefully stumble across the actual name? > This looks interesting! I'm curious of one thing though, why separate > bindings for the three UI systems instead of one set of bindings for a > new version of wxwidgets? A wxWidgets binding would be good. And a Qt binding. Probably more. I think the window<%>-to-GUI-toolkit mapping is not going to be the hard part. In the interest of minimizing dependencies, I'm starting with the most basic, standard pieces I can find --- at least among the choices that are reasonably modern (i.e., not raw X11). Matthew From dherman at ccs.neu.edu Fri Feb 6 23:52:19 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 6 23:52:45 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <20090206225859.90C28650085@mail-svr1.cs.utah.edu> References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> <20090206225859.90C28650085@mail-svr1.cs.utah.edu> Message-ID: > Oops --- I meant to vote for "1", not "2". > >> Doesn't that mean that some hash tables that should have literal >> representations won't? > > Yes, at least in terms of quasiquote. That's a good reason against 2. Okay, patch attached. Not sure if I did this right but hopefully it helps. Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: qq-and-or.patch Type: application/octet-stream Size: 1945 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090206/b37aa503/qq-and-or-0001.obj -------------- next part -------------- From robby at eecs.northwestern.edu Sat Feb 7 08:19:48 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 7 08:20:07 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <990e0c030902061144s3a2da1d9y336668324ff259f5@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> <990e0c030902061122r4c8c60dfj1805cac27164daf7@mail.gmail.com> <932b2f1f0902061132r3dfb3f4cvdc8a531ae566e41a@mail.gmail.com> <990e0c030902061144s3a2da1d9y336668324ff259f5@mail.gmail.com> Message-ID: <932b2f1f0902070519g5b1c0cf7qd06f5062cdb0d7ac@mail.gmail.com> Sounds like the best thing would be for planet to detect that some package depends on the to-be-removed package and then inform the user that and do nothing, letting the user override that decision via some flags that either give the upgrade behavior or removal of all dependents. Robby On Fri, Feb 6, 2009 at 1:44 PM, Carl Eastlund wrote: > On Fri, Feb 6, 2009 at 2:32 PM, Robby Findler > wrote: >> On Fri, Feb 6, 2009 at 1:22 PM, Carl Eastlund wrote: >>> Hmm. It does need to rebuild the index. And it needs to rebuild the >>> index without the package being removed. But it doesn't want to >>> reinstall the package if anything has a dependency on it... so it >>> leaves the package installed. That much makes sense. Is there a way >>> to do that, and either rebuild only the index (not any code / >>> documentation) or else, when rebuilding other code, not follow >>> dependencies into the package being removed? I can see why it's doing >>> some rebuilding, and why the package is still in place, but it seems >>> unfortunate that it gets pulled into the actual build process. >>> >>> We could try another tack. Remove the package, rebuild, but change >>> the module resolver while rebuilding so that it reports an error >>> during any attempts to retrieve that planet package. That would >>> rebuild as much of the index as possible without the package, wouldn't >>> traverse the package itself, and wouldn't replace it with any new >>> download. >> >> That seems like an interesting thing to try. The idea is that error >> should never be signaled, right? > > No, the error may be signaled. You may have A:1.0 and B:1.0 that > depends on A:1.0+. To upgrade A, you might first remove A:1.0 and > then install A:1.1. While removing A:1.0, B:1.0 will signal an error > because nothing satisfies its dependence on A. But that's an ok error > to signal, it shouldn't interrupt setup-plt, but it does let the user > know they have to replace A as their next step. > > If we're not trying to support this behavior of "remove a middle > dependency and replace it later" -- which breaks down with multiple > parts to the dependency anyway -- we should just remove the package > outright and run setup-plt, and if anything depends on it that causes > a re-download, the user "just shouldn't do that". > > Or, rather than special casing that you can't load that package, > perhaps we should just disable the planet installation mechanism > during planet remove -- no package should be installed, from web or > from cache, during a remove. > > --Carl > From samth at ccs.neu.edu Sat Feb 7 08:56:52 2009 From: samth at ccs.neu.edu (Sam TH) Date: Sat Feb 7 08:57:10 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <20090207022237.EB6BD6500C2@mail-svr1.cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> <498CC674.4060504@cs.utah.edu> <20090206234723.BD1E165008C@mail-svr1.cs.utah.edu> <20090207022237.EB6BD6500C2@mail-svr1.cs.utah.edu> Message-ID: <63bb19ae0902070556xbfba55exda09a9bd933a1284@mail.gmail.com> On Fri, Feb 6, 2009 at 9:22 PM, Matthew Flatt wrote: > At Fri, 6 Feb 2009 20:12:06 -0500, Henk Boom wrote: >> Another library naming issue, on my Gentoo system the libraries are >> >> libgdk-x11-2.0.so >> libgtk-x11-2.0.so >> >> with a .0 after the 2. With that fix it seems to work =). > > Does anyone know a Right Way to find libraries, or should `ffi-lib' > have a big set of search heuristics that hopefully stumble across the > actual name? So, I have the same issue as Henk. I think that the gtk/gdk libraries actually have the "2.0" in their names, so this shouldn't really be an issue of search heuristics. Unless you have some different set of libraries. Does this produce something different on the system you're using? [samth@hermes:~/sw/mred-experiment] locate gtk-x11 /usr/lib/libgtk-x11-2.0.so.0 /usr/lib/libgtk-x11-2.0.so.0.1200.9 Thanks, -- sam th samth@ccs.neu.edu From mflatt at cs.utah.edu Sat Feb 7 09:04:22 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sat Feb 7 09:04:42 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <63bb19ae0902070556xbfba55exda09a9bd933a1284@mail.gmail.com> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> <498CC674.4060504@cs.utah.edu> <20090206234723.BD1E165008C@mail-svr1.cs.utah.edu> <20090207022237.EB6BD6500C2@mail-svr1.cs.utah.edu> <63bb19ae0902070556xbfba55exda09a9bd933a1284@mail.gmail.com> Message-ID: <20090207140424.0CC996500A3@mail-svr1.cs.utah.edu> At Sat, 7 Feb 2009 08:56:52 -0500, Sam TH wrote: > On Fri, Feb 6, 2009 at 9:22 PM, Matthew Flatt wrote: > > At Fri, 6 Feb 2009 20:12:06 -0500, Henk Boom wrote: > >> Another library naming issue, on my Gentoo system the libraries are > >> > >> libgdk-x11-2.0.so > >> libgtk-x11-2.0.so > >> > >> with a .0 after the 2. With that fix it seems to work =). > > > > Does anyone know a Right Way to find libraries, or should `ffi-lib' > > have a big set of search heuristics that hopefully stumble across the > > actual name? > > So, I have the same issue as Henk. I think that the gtk/gdk libraries > actually have the "2.0" in their names, so this shouldn't really be an > issue of search heuristics. Unless you have some different set of > libraries. Does this produce something different on the system you're > using? Ah, as simple as that. Yes, I have "libgtk-x11-2.0.0.dylib" on my machine, which is consistent with "libgtk-x11-2.0.so.0". Maybe I understand the conventions after all... Thanks! Matthew From dherman at ccs.neu.edu Sat Feb 7 17:51:33 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Sat Feb 7 17:52:00 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> <20090206225859.90C28650085@mail-svr1.cs.utah.edu> Message-ID: Attached is a patch for collects/scribblings/reference/syntax.scrbl that documents the quasiquote behavior. I'll create some new quasiquote tests and send a patch for that tomorrow. Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: syntax.scrbl.patch Type: application/octet-stream Size: 1459 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090207/5e25f376/syntax.scrbl.obj -------------- next part -------------- On Feb 6, 2009, at 11:52 PM, Dave Herman wrote: >> Oops --- I meant to vote for "1", not "2". >> >>> Doesn't that mean that some hash tables that should have literal >>> representations won't? >> >> Yes, at least in terms of quasiquote. That's a good reason against 2. > > Okay, patch attached. Not sure if I did this right but hopefully it > helps. > > Dave > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From grettke at acm.org Sat Feb 7 22:38:25 2009 From: grettke at acm.org (Grant Rettke) Date: Sat Feb 7 22:38:43 2009 Subject: [plt-dev] update on experiment in re-implementing MrEd In-Reply-To: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> References: <20090206231055.BB9226500AD@mail-svr1.cs.utah.edu> Message-ID: <756daca50902071938j266e64fn26430ec5741cebd0@mail.gmail.com> On Fri, Feb 6, 2009 at 5:10 PM, Matthew Flatt wrote: > For you amusement, I've put my current work here: Thanks. There are bigger things than me being amused; but I am. It works fine on Windows Vista. From dherman at ccs.neu.edu Sun Feb 8 14:08:44 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Sun Feb 8 14:09:03 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> <20090206225859.90C28650085@mail-svr1.cs.utah.edu> Message-ID: <498F2DBC.7040001@ccs.neu.edu> Patch for collects/tests/mzscheme/syntax.ss attached. Dave Dave Herman wrote: > Attached is a patch for collects/scribblings/reference/syntax.scrbl that > documents the quasiquote behavior. I'll create some new quasiquote tests > and send a patch for that tomorrow. > > Dave > > > On Feb 6, 2009, at 11:52 PM, Dave Herman wrote: > >>> Oops --- I meant to vote for "1", not "2". >>> >>>> Doesn't that mean that some hash tables that should have literal >>>> representations won't? >>> >>> Yes, at least in terms of quasiquote. That's a good reason against 2. >> >> Okay, patch attached. Not sure if I did this right but hopefully it >> helps. >> >> Dave >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > -------------- next part -------------- --- /home/dherman/Desktop/syntax.ss 2009-02-08 14:06:49.743750000 -0500 +++ syntax.ss 2009-02-08 14:05:32.353125000 -0500 @@ -651,6 +651,28 @@ (test '(quasiquote (quasiquote (quasiquote (unquote (unquote (unquote x)))))) 'qq ````,,,x) (test '(quasiquote (quasiquote (quasiquote (unquote (unquote (unquote 5)))))) 'qq ````,,,,x) +(test '#hash() 'qq `#hash()) +(test '#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3)) + 'qq + `#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3))) +(test '#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3)) + 'qq + `#hash(("apple" . ,1) ("banana" . ,(add1 1)) ("coconut" . ,(+ 1 2)))) +(test '#hash(("foo" . (1 2 3 4 5))) + 'qq + `#hash(("foo" . (1 2 ,(+ 1 2) 4 5)))) +(test '#hash(("foo" . (1 2 3 4 5))) + 'qq + `#hash(("foo" . (1 2 ,@(list 3 4 5))))) +(test '#hash((,(read) . 1) (,(+ 1 2) . 3)) + 'qq + `#hash((,(read) . 1) (,(+ 1 2) . ,(+ 1 2)))) +(test '#hash((,(read) . 2)) + 'qq + `#hash((,(read) . 1) (,(read) . 2))) +(syntax-test #'`#hash(("foo" . ,@(list 1 2 3 4 5)))) +(error-test #'(read (open-input-string "`#hash((foo ,@(list 1 2 3 4 5)))")) exn:fail:read?) + (test '(quasiquote (unquote result)) 'qq `(quasiquote ,result)) (test (list 'quasiquote car) 'qq `(,'quasiquote ,car)) From robby at eecs.northwestern.edu Sun Feb 8 16:41:45 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sun Feb 8 16:42:06 2009 Subject: [plt-dev] Re: [plt-scheme] Progress information from PLaneT In-Reply-To: <932b2f1f0901171927j4aa7d81eh2b401e082036f9a8@mail.gmail.com> References: <49729D57.2000606@web.de> <932b2f1f0901171927j4aa7d81eh2b401e082036f9a8@mail.gmail.com> Message-ID: <932b2f1f0902081341i4bc4bae0n8f3b46331e8aed81@mail.gmail.com> Well, it took a little while, but I've finally gotten all of the pieces of this I wanted to get going. The latest piece that I've just checked in now, is that drscheme shows you a single line at the bottom of the screen with the planet status. (The other pieces, checked in earlier, were adding general information from planet to the log and adding support for viewing the logs to drscheme.) Robby On Sat, Jan 17, 2009 at 9:27 PM, Robby Findler wrote: > There should be a mode where it prints something, I agree. But just so > it is clear, the ordinary 'require' mode doesn't and shouldn't print > anything because it is just an ordinary require and so it shouldn't > produce extra (observable) effects. It has been suggested that, when a > require from planet happens inside drscheme, drscheme should show you > the progress. That should be doable, but I haven't had a chance to > actually do it yet. > > Robby > > On Sat, Jan 17, 2009 at 9:09 PM, Thomas Chust wrote: >> Hello, >> >> I wonder whether it is possible to get any progress display or messages >> that show what is happening from the long running PLaneT commands. >> >> When adding some larger package with a bunch of dependencies to a fresh >> PLT Scheme installation with planet install, one can wait for several >> minutes for the command to complete and not a single line of output is >> generated. In the documentation, the help output from the command line >> utility and by experimentation I haven't found a way to enable any kind >> of more verbose output than this total silence, except in case of errors :-( >> >> >From a package manager I would expect that it at least prints out which >> packages are being installed, preferrably together with counts of >> packages already processed and remaining to be installed to give the >> user an idea how long the setup may take. >> >> cu, >> Thomas >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme >> >> > From chust at web.de Sun Feb 8 17:42:20 2009 From: chust at web.de (Thomas Chust) Date: Sun Feb 8 17:42:38 2009 Subject: [plt-dev] Re: [plt-scheme] Progress information from PLaneT In-Reply-To: <932b2f1f0902081341i4bc4bae0n8f3b46331e8aed81@mail.gmail.com> References: <49729D57.2000606@web.de> <932b2f1f0901171927j4aa7d81eh2b401e082036f9a8@mail.gmail.com> <932b2f1f0902081341i4bc4bae0n8f3b46331e8aed81@mail.gmail.com> Message-ID: <1c1a33bc0902081442k27f19fcbxc5e2b6a6a497c20a@mail.gmail.com> 2009-02-08 Robby Findler : > [...] > The latest piece that I've just checked in now, is that drscheme shows > you a single line at the bottom of the screen with the planet status. > > (The other pieces, checked in earlier, were adding general information > from planet to the log and adding support for viewing the logs to > drscheme.) > [...] This is great, thank you :-) cu, Thomas -- When C++ is your hammer, every problem looks like your thumb. From mflatt at cs.utah.edu Sun Feb 8 19:57:56 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sun Feb 8 19:58:22 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <498F2DBC.7040001@ccs.neu.edu> References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> <20090206225859.90C28650085@mail-svr1.cs.utah.edu> <498F2DBC.7040001@ccs.neu.edu> Message-ID: <20090209005759.0C8836500A3@mail-svr1.cs.utah.edu> Thanks! Now that I try your patch, though, I see a problem that I overlooked before. In the syntax system, a hash table is not treated like pairs, vectors, boxes, or prefabs, in that lexical information is not propagated from the hash table to its content. As a result, the example (let ([x 5]) `#hash(("coconut" . ,(+ 1 x)))) doesn't work. I'll look into changing the syntax system to propagate information into the values (and not the keys) of hash tables, and I'll save your patches until that change is ready. At Sun, 08 Feb 2009 14:08:44 -0500, Dave Herman wrote: > Patch for collects/tests/mzscheme/syntax.ss attached. > > Dave > > Dave Herman wrote: > > Attached is a patch for collects/scribblings/reference/syntax.scrbl that > > documents the quasiquote behavior. I'll create some new quasiquote tests > > and send a patch for that tomorrow. > > > > Dave > > > > > > On Feb 6, 2009, at 11:52 PM, Dave Herman wrote: > > > >>> Oops --- I meant to vote for "1", not "2". > >>> > >>>> Doesn't that mean that some hash tables that should have literal > >>>> representations won't? > >>> > >>> Yes, at least in terms of quasiquote. That's a good reason against 2. > >> > >> Okay, patch attached. Not sure if I did this right but hopefully it > >> helps. > >> > >> Dave > >> > >> _________________________________________________ > >> For list-related administrative tasks: > >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > > > > --- /home/dherman/Desktop/syntax.ss 2009-02-08 14:06:49.743750000 -0500 > +++ syntax.ss 2009-02-08 14:05:32.353125000 -0500 > @@ -651,6 +651,28 @@ > (test '(quasiquote (quasiquote (quasiquote (unquote (unquote (unquote x)))))) > 'qq ````,,,x) > (test '(quasiquote (quasiquote (quasiquote (unquote (unquote (unquote 5)))))) > 'qq ````,,,,x) > > +(test '#hash() 'qq `#hash()) > +(test '#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3)) > + 'qq > + `#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3))) > +(test '#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3)) > + 'qq > + `#hash(("apple" . ,1) ("banana" . ,(add1 1)) ("coconut" . ,(+ 1 2)))) > +(test '#hash(("foo" . (1 2 3 4 5))) > + 'qq > + `#hash(("foo" . (1 2 ,(+ 1 2) 4 5)))) > +(test '#hash(("foo" . (1 2 3 4 5))) > + 'qq > + `#hash(("foo" . (1 2 ,@(list 3 4 5))))) > +(test '#hash((,(read) . 1) (,(+ 1 2) . 3)) > + 'qq > + `#hash((,(read) . 1) (,(+ 1 2) . ,(+ 1 2)))) > +(test '#hash((,(read) . 2)) > + 'qq > + `#hash((,(read) . 1) (,(read) . 2))) > +(syntax-test #'`#hash(("foo" . ,@(list 1 2 3 4 5)))) > +(error-test #'(read (open-input-string "`#hash((foo ,@(list 1 2 3 4 5)))")) > exn:fail:read?) > + > (test '(quasiquote (unquote result)) 'qq `(quasiquote ,result)) > (test (list 'quasiquote car) 'qq `(,'quasiquote ,car)) > From rafkind at cs.utah.edu Sun Feb 8 20:49:28 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Sun Feb 8 20:49:46 2009 Subject: [plt-dev] planet resets downloads this week Message-ID: <498F8BA8.1050106@cs.utah.edu> A minor bug: I updated my planet package, vi.plt, and noticed that "downloads this week" was reset to 0. From robby at eecs.northwestern.edu Sun Feb 8 20:54:32 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sun Feb 8 20:54:53 2009 Subject: [plt-dev] planet resets downloads this week In-Reply-To: <498F8BA8.1050106@cs.utah.edu> References: <498F8BA8.1050106@cs.utah.edu> Message-ID: <932b2f1f0902081754i549406fm945f3f61b9ddbe5f@mail.gmail.com> I suspect that it just hasn't been downloaded, since you just updated it. See here: http://planet.plt-scheme.org/display.ss?package=vi.plt&owner=kazzmir there are still non zero downloads for versions (1 2), (1 1) and (1 0). Robby On Sun, Feb 8, 2009 at 7:49 PM, Jon Rafkind wrote: > A minor bug: I updated my planet package, vi.plt, and noticed that > "downloads this week" was reset to 0. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From grettke at acm.org Sun Feb 8 21:16:20 2009 From: grettke at acm.org (Grant Rettke) Date: Sun Feb 8 21:16:39 2009 Subject: [plt-dev] Re: [plt-scheme] Progress information from PLaneT In-Reply-To: <1c1a33bc0902081442k27f19fcbxc5e2b6a6a497c20a@mail.gmail.com> References: <49729D57.2000606@web.de> <932b2f1f0901171927j4aa7d81eh2b401e082036f9a8@mail.gmail.com> <932b2f1f0902081341i4bc4bae0n8f3b46331e8aed81@mail.gmail.com> <1c1a33bc0902081442k27f19fcbxc5e2b6a6a497c20a@mail.gmail.com> Message-ID: <756daca50902081816v1c2570e0ue1310743b256a1d5@mail.gmail.com> On Sun, Feb 8, 2009 at 4:42 PM, Thomas Chust wrote: > 2009-02-08 Robby Findler : >> [...] >> The latest piece that I've just checked in now, is that drscheme shows >> you a single line at the bottom of the screen with the planet status. >> >> (The other pieces, checked in earlier, were adding general information >> from planet to the log and adding support for viewing the logs to >> drscheme.) >> [...] > > This is great, thank you :-) That is a very nice feature thanks Robby. From dherman at ccs.neu.edu Sun Feb 8 22:56:21 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Sun Feb 8 22:56:47 2009 Subject: [plt-dev] parameterizations rationale Message-ID: <1AB376BB-823C-4C29-8384-D11630BE7585@ccs.neu.edu> I noticed this comment in the '99 Revenge of the Son of Lisp Machine paper: "An early version of MrEd supported bundles of parameter values as first-class objects, called parameterizations. ... This generalization turns out to be nearly useless in practice ... Worse, parameterizations defeat the essential purpose of parameters for separating global state from thread-specific state." Of course, parameterizations are back. What was the change in thinking that led to bringing them back? Thanks, Dave From grettke at acm.org Sun Feb 8 23:09:22 2009 From: grettke at acm.org (Grant Rettke) Date: Sun Feb 8 23:09:40 2009 Subject: [plt-dev] =?iso-8859-7?q?In_DrScheme=2C_How_to_display_lambda_in?= =?iso-8859-7?q?_source_code_as_=EB?= Message-ID: <756daca50902082009k35d3769eld935f764a1d5dedb@mail.gmail.com> Hi, In DrScheme I would like to be able to leave 'lambda' in the source code but render it is ? ala Quack. May you please give me some pointers on how one might achieve this? Best wishes, Grant From ryanc at ccs.neu.edu Mon Feb 9 00:24:52 2009 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Mon Feb 9 00:25:12 2009 Subject: [plt-dev] arrows crossing selection Message-ID: <498FBE24.9020206@ccs.neu.edu> I've just snuck a new feature into Check Syntax. You can now tack all binding arrows that cross the editor's selection boundary. That is, they have one end inside the selection and one end outside. One use is to find free variables in an expression you want to lift out as a separate procedure. To use it: Run Check Syntax, highlight a region of code, and right-click to get the Check Syntax context menu. It has an additional item labeled "Tack arrows crossing selection". If people like it, I can tidy it up and add variants (eg, untack, don't include arrows for module imports). If people don't like it, I can take it out again. Feedback welcome. Ryan From rafkind at cs.utah.edu Mon Feb 9 02:23:22 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Mon Feb 9 02:23:46 2009 Subject: [plt-dev] planet resets downloads this week In-Reply-To: <932b2f1f0902081754i549406fm945f3f61b9ddbe5f@mail.gmail.com> References: <498F8BA8.1050106@cs.utah.edu> <932b2f1f0902081754i549406fm945f3f61b9ddbe5f@mail.gmail.com> Message-ID: <498FD9EA.2050202@cs.utah.edu> Robby Findler wrote: > I suspect that it just hasn't been downloaded, since you just updated > it. See here: > > http://planet.plt-scheme.org/display.ss?package=vi.plt&owner=kazzmir > > there are still non zero downloads for versions (1 2), (1 1) and (1 0). > > Right, so the question is what does "downloads this week" mean? Downloads for the current version? It seems like its downloads for any version since this would be consistent with total downloads. "Downloads this week" was 1 when the version was (1 2), then I updated to (1 3) and "downloads this week" was reset to 0. > Robby > > On Sun, Feb 8, 2009 at 7:49 PM, Jon Rafkind wrote: > >> A minor bug: I updated my planet package, vi.plt, and noticed that >> "downloads this week" was reset to 0. >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> >> From mflatt at cs.utah.edu Mon Feb 9 10:45:23 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Mon Feb 9 10:45:45 2009 Subject: [plt-dev] #hash vs. #s In-Reply-To: <20090209005759.0C8836500A3@mail-svr1.cs.utah.edu> References: <498C6960.3090808@ccs.neu.edu> <20090206165356.682A865003B@mail-svr1.cs.utah.edu> <498C8B3E.8080100@ccs.neu.edu> <20090206223228.F337D6500A8@mail-svr1.cs.utah.edu> <20090206225859.90C28650085@mail-svr1.cs.utah.edu> <498F2DBC.7040001@ccs.neu.edu> <20090209005759.0C8836500A3@mail-svr1.cs.utah.edu> Message-ID: <20090209154523.EA3A6650057@mail-svr1.cs.utah.edu> Done in SVN (v4.1.4.3). Infix notation for prefabs is also now enabled. At Sun, 8 Feb 2009 17:57:56 -0700, Matthew Flatt wrote: > Thanks! > > Now that I try your patch, though, I see a problem that I overlooked > before. In the syntax system, a hash table is not treated like pairs, > vectors, boxes, or prefabs, in that lexical information is not > propagated from the hash table to its content. > > As a result, the example > > (let ([x 5]) `#hash(("coconut" . ,(+ 1 x)))) > > doesn't work. > > I'll look into changing the syntax system to propagate information into > the values (and not the keys) of hash tables, and I'll save your > patches until that change is ready. > > At Sun, 08 Feb 2009 14:08:44 -0500, Dave Herman wrote: > > Patch for collects/tests/mzscheme/syntax.ss attached. > > > > Dave > > > > Dave Herman wrote: > > > Attached is a patch for collects/scribblings/reference/syntax.scrbl that > > > documents the quasiquote behavior. I'll create some new quasiquote tests > > > and send a patch for that tomorrow. > > > > > > Dave > > > > > > > > > On Feb 6, 2009, at 11:52 PM, Dave Herman wrote: > > > > > >>> Oops --- I meant to vote for "1", not "2". > > >>> > > >>>> Doesn't that mean that some hash tables that should have literal > > >>>> representations won't? > > >>> > > >>> Yes, at least in terms of quasiquote. That's a good reason against 2. > > >> > > >> Okay, patch attached. Not sure if I did this right but hopefully it > > >> helps. > > >> > > >> Dave > > >> > > >> _________________________________________________ > > >> For list-related administrative tasks: > > >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > > > > > > > --- /home/dherman/Desktop/syntax.ss 2009-02-08 14:06:49.743750000 -0500 > > +++ syntax.ss 2009-02-08 14:05:32.353125000 -0500 > > @@ -651,6 +651,28 @@ > > (test '(quasiquote (quasiquote (quasiquote (unquote (unquote (unquote > x)))))) > > 'qq ````,,,x) > > (test '(quasiquote (quasiquote (quasiquote (unquote (unquote (unquote > 5)))))) > > 'qq ````,,,,x) > > > > +(test '#hash() 'qq `#hash()) > > +(test '#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3)) > > + 'qq > > + `#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3))) > > +(test '#hash(("apple" . 1) ("banana" . 2) ("coconut" . 3)) > > + 'qq > > + `#hash(("apple" . ,1) ("banana" . ,(add1 1)) ("coconut" . ,(+ 1 2)))) > > +(test '#hash(("foo" . (1 2 3 4 5))) > > + 'qq > > + `#hash(("foo" . (1 2 ,(+ 1 2) 4 5)))) > > +(test '#hash(("foo" . (1 2 3 4 5))) > > + 'qq > > + `#hash(("foo" . (1 2 ,@(list 3 4 5))))) > > +(test '#hash((,(read) . 1) (,(+ 1 2) . 3)) > > + 'qq > > + `#hash((,(read) . 1) (,(+ 1 2) . ,(+ 1 2)))) > > +(test '#hash((,(read) . 2)) > > + 'qq > > + `#hash((,(read) . 1) (,(read) . 2))) > > +(syntax-test #'`#hash(("foo" . ,@(list 1 2 3 4 5)))) > > +(error-test #'(read (open-input-string "`#hash((foo ,@(list 1 2 3 4 5)))")) > > exn:fail:read?) > > + > > (test '(quasiquote (unquote result)) 'qq `(quasiquote ,result)) > > (test (list 'quasiquote car) 'qq `(,'quasiquote ,car)) > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From mflatt at cs.utah.edu Mon Feb 9 10:48:57 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Mon Feb 9 10:49:16 2009 Subject: [plt-dev] parameterizations rationale In-Reply-To: <1AB376BB-823C-4C29-8384-D11630BE7585@ccs.neu.edu> References: <1AB376BB-823C-4C29-8384-D11630BE7585@ccs.neu.edu> Message-ID: <20090209154857.77D23650057@mail-svr1.cs.utah.edu> At Sun, 8 Feb 2009 22:56:21 -0500, Dave Herman wrote: > I noticed this comment in the '99 Revenge of the Son of Lisp Machine > paper: > > "An early version of MrEd supported bundles of parameter values as > first-class objects, called parameterizations. ... This generalization > turns out to be nearly useless in practice ... Worse, > parameterizations defeat the essential purpose of parameters for > separating global state from thread-specific state." > > Of course, parameterizations are back. What was the change in thinking > that led to bringing them back? The definition of "parameter" changed to build on thread cells. So, even if you grab a parameterization and use it in another thread, mutations in that other thread do not affect the original thread. Parameterizations turned out to be useful in DrScheme. A REPL interaction goes back into DrScheme for a while, and then continues into the user space. Parameterizations let us more easily swap in different "contexts" as control goes between those worlds. From mflatt at cs.utah.edu Mon Feb 9 10:56:24 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Mon Feb 9 10:56:44 2009 Subject: [plt-dev] In DrScheme, How to display lambda in source code as =?UTF-8?B?zrs=?= In-Reply-To: <756daca50902082009k35d3769eld935f764a1d5dedb@mail.gmail.com> References: <756daca50902082009k35d3769eld935f764a1d5dedb@mail.gmail.com> Message-ID: <20090209155624.F2DAE650057@mail-svr1.cs.utah.edu> At Sun, 8 Feb 2009 22:09:22 -0600, Grant Rettke wrote: > In DrScheme I would like to be able to leave 'lambda' in the source > code but render it is ? ala Quack. > > May you please give me some pointers on how one might achieve this? You could convert "lambda" to a snip that draws itself as "?" but reports its text form as "lambda". (That's how DrScheme used to work.) You'd need to tell DrScheme to save the file in text mode instead of graphical mode, though, and I don't know/remember how that works. Matthew From jos.koot at telefonica.net Mon Feb 9 11:05:49 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Mon Feb 9 11:07:36 2009 Subject: [plt-dev] arrows crossing selection References: <498FBE24.9020206@ccs.neu.edu> Message-ID: <6935AF42A22040BC84C353F446AAB72C@uw2b2dff239c4d> Very nice tool for checking that a form has no other external dependencies than intended. Two remarks though: 1: Because all references to imported bindings (both variables and syntactic forms) have arrows too, there is an abundance of non informative arrows (for example to the #lang scheme line) that obscure the arrows I am interested in, id est those that point between bindings and references within the current module only. Id est, the arrows to require forms can be omitted as far as I am concerend. 2: How do I untack? Thanks Jos. ----- Original Message ----- From: "Ryan Culpepper" To: Sent: Monday, February 09, 2009 6:24 AM Subject: [plt-dev] arrows crossing selection > I've just snuck a new feature into Check Syntax. You can now tack all > binding arrows that cross the editor's selection boundary. That is, they > have one end inside the selection and one end outside. One use is to find > free variables in an expression you want to lift out as a separate > procedure. > > To use it: Run Check Syntax, highlight a region of code, and right-click > to get the Check Syntax context menu. It has an additional item labeled > "Tack arrows crossing selection". > > If people like it, I can tidy it up and add variants (eg, untack, don't > include arrows for module imports). If people don't like it, I can take it > out again. Feedback welcome. > > Ryan > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From robby at eecs.northwestern.edu Mon Feb 9 13:24:27 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 13:24:47 2009 Subject: [plt-dev] printout Message-ID: <932b2f1f0902091024m26505f59keafbee2d8ee413a1@mail.gmail.com> Anyone recognize this printout (when starting up drscheme)? > (module page scheme) (module page scheme) Robby From ryanc at ccs.neu.edu Mon Feb 9 15:56:49 2009 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Mon Feb 9 15:57:06 2009 Subject: [plt-dev] arrows crossing selection In-Reply-To: <6935AF42A22040BC84C353F446AAB72C@uw2b2dff239c4d> References: <498FBE24.9020206@ccs.neu.edu> <6935AF42A22040BC84C353F446AAB72C@uw2b2dff239c4d> Message-ID: <49909891.4010900@ccs.neu.edu> I've just added two new items in the popup menu. The first one tacks only arrows that don't correspond to module imports. The other just untacks all arrows in the selected region. Ryan Jos Koot wrote: > Very nice tool for checking that a form has no other external > dependencies than intended. > Two remarks though: > > 1: Because all references to imported bindings (both variables and > syntactic forms) have arrows too, there is an abundance of non > informative arrows (for example to the #lang scheme line) that obscure > the arrows I am interested in, id est those that point between bindings > and references within the current module only. Id est, the arrows to > require forms can be omitted as far as I am concerend. > > 2: How do I untack? > > Thanks > Jos. > > ----- Original Message ----- From: "Ryan Culpepper" > To: > Sent: Monday, February 09, 2009 6:24 AM > Subject: [plt-dev] arrows crossing selection > > >> I've just snuck a new feature into Check Syntax. You can now tack all >> binding arrows that cross the editor's selection boundary. That is, >> they have one end inside the selection and one end outside. One use is >> to find free variables in an expression you want to lift out as a >> separate procedure. >> >> To use it: Run Check Syntax, highlight a region of code, and >> right-click to get the Check Syntax context menu. It has an additional >> item labeled "Tack arrows crossing selection". >> >> If people like it, I can tidy it up and add variants (eg, untack, >> don't include arrows for module imports). If people don't like it, I >> can take it out again. Feedback welcome. >> >> Ryan >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > From cce at ccs.neu.edu Mon Feb 9 18:27:29 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Mon Feb 9 18:27:47 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <932b2f1f0902070519g5b1c0cf7qd06f5062cdb0d7ac@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> <990e0c030902061122r4c8c60dfj1805cac27164daf7@mail.gmail.com> <932b2f1f0902061132r3dfb3f4cvdc8a531ae566e41a@mail.gmail.com> <990e0c030902061144s3a2da1d9y336668324ff259f5@mail.gmail.com> <932b2f1f0902070519g5b1c0cf7qd06f5062cdb0d7ac@mail.gmail.com> Message-ID: <990e0c030902091527p653b395cy63b5d39b1ef1d960@mail.gmail.com> On Sat, Feb 7, 2009 at 8:19 AM, Robby Findler wrote: > Sounds like the best thing would be for planet to detect that some > package depends on the to-be-removed package and then inform the user > that and do nothing, letting the user override that decision via some > flags that either give the upgrade behavior or removal of all > dependents. I would prefer to have a default behavior other than abort, but I could live with a set of flags. I definitely want the current behavior to be one of the options, though hopefully "smarter" so it doesn't spend time rebuilding the package to remove (as described in the rest of this thread). Removing a package, leaving its dependencies in place, then installing a replacement, is still the best way to replace a package. If we don't allow that, we have to either anticipate every kind of replacement (depending on whether the packages come from the server, a fileinject, or a development link, whether they're the same or different version numbers, etc.), or force the user to reinstall each dependent package one by one after the fact. --Carl From robby at eecs.northwestern.edu Mon Feb 9 18:45:47 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 18:46:09 2009 Subject: [plt-dev] svn annoyances Message-ID: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> I (foolishly) did an svn mv on one machine and now I've got the dreaded svn: OPTIONS of 'http://svn.plt-scheme.org/usr': authorization failed (http://svn.plt-scheme.org) I'm running the svn client version 1.5.5. Do I just have to delete the whole tree and re-check it out (again)? Robby From robby at eecs.northwestern.edu Mon Feb 9 18:47:00 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 18:47:19 2009 Subject: [plt-dev] planet remove and scribble In-Reply-To: <990e0c030902091527p653b395cy63b5d39b1ef1d960@mail.gmail.com> References: <990e0c030902061048x526c7579jbeaf6478fa79bf71@mail.gmail.com> <932b2f1f0902061051h22b51ecaw5079b4697b41082e@mail.gmail.com> <990e0c030902061122r4c8c60dfj1805cac27164daf7@mail.gmail.com> <932b2f1f0902061132r3dfb3f4cvdc8a531ae566e41a@mail.gmail.com> <990e0c030902061144s3a2da1d9y336668324ff259f5@mail.gmail.com> <932b2f1f0902070519g5b1c0cf7qd06f5062cdb0d7ac@mail.gmail.com> <990e0c030902091527p653b395cy63b5d39b1ef1d960@mail.gmail.com> Message-ID: <932b2f1f0902091547h371e1bd4jd7d5fc85637c02fc@mail.gmail.com> Oh, yes. Good point. Sounds like an extension to setup-plt is needed? Robby On Mon, Feb 9, 2009 at 5:27 PM, Carl Eastlund wrote: > On Sat, Feb 7, 2009 at 8:19 AM, Robby Findler > wrote: >> Sounds like the best thing would be for planet to detect that some >> package depends on the to-be-removed package and then inform the user >> that and do nothing, letting the user override that decision via some >> flags that either give the upgrade behavior or removal of all >> dependents. > > I would prefer to have a default behavior other than abort, but I > could live with a set of flags. I definitely want the current > behavior to be one of the options, though hopefully "smarter" so it > doesn't spend time rebuilding the package to remove (as described in > the rest of this thread). Removing a package, leaving its > dependencies in place, then installing a replacement, is still the > best way to replace a package. If we don't allow that, we have to > either anticipate every kind of replacement (depending on whether the > packages come from the server, a fileinject, or a development link, > whether they're the same or different version numbers, etc.), or force > the user to reinstall each dependent package one by one after the > fact. > > --Carl > From carl.eastlund at gmail.com Mon Feb 9 18:51:14 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Mon Feb 9 18:51:36 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> Message-ID: <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> I get this error sometimes on winooski: svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'http://svn.plt-scheme.org/usr' Looks very similar, if not the same. I have not found another way to fix it than what you describe. I haven't found a way to reliably reproduce it, either. --Carl On Mon, Feb 9, 2009 at 6:45 PM, Robby Findler wrote: > I (foolishly) did an svn mv on one machine and now I've got the dreaded > > svn: OPTIONS of 'http://svn.plt-scheme.org/usr': authorization > failed (http://svn.plt-scheme.org) > > I'm running the svn client version 1.5.5. > > Do I just have to delete the whole tree and re-check it out (again)? > > Robby From robby at eecs.northwestern.edu Mon Feb 9 18:56:10 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 18:56:31 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> Message-ID: <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> Whenver I do an svn mv (even from one directory to that same directory), I end up having to delete and re-download the entire tree. Robby On Mon, Feb 9, 2009 at 5:51 PM, Carl Eastlund wrote: > I get this error sometimes on winooski: > > svn: Server sent unexpected return value (403 Forbidden) in response > to OPTIONS request for 'http://svn.plt-scheme.org/usr' > > Looks very similar, if not the same. I have not found another way to > fix it than what you describe. I haven't found a way to reliably > reproduce it, either. > > --Carl > > On Mon, Feb 9, 2009 at 6:45 PM, Robby Findler > wrote: >> I (foolishly) did an svn mv on one machine and now I've got the dreaded >> >> svn: OPTIONS of 'http://svn.plt-scheme.org/usr': authorization >> failed (http://svn.plt-scheme.org) >> >> I'm running the svn client version 1.5.5. >> >> Do I just have to delete the whole tree and re-check it out (again)? >> >> Robby > From carl.eastlund at gmail.com Mon Feb 9 18:58:40 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Mon Feb 9 18:59:02 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> Message-ID: <990e0c030902091558l60be3349ne24dc7aa562c4e13@mail.gmail.com> Oh. Hmm. That's probably a different bug, then. Does this show up when you try to commit the move, or when you check it out somewhere else, or some other time? --Carl On Mon, Feb 9, 2009 at 6:56 PM, Robby Findler wrote: > Whenver I do an svn mv (even from one directory to that same > directory), I end up having to delete and re-download the entire tree. > > Robby > > On Mon, Feb 9, 2009 at 5:51 PM, Carl Eastlund wrote: >> I get this error sometimes on winooski: >> >> svn: Server sent unexpected return value (403 Forbidden) in response >> to OPTIONS request for 'http://svn.plt-scheme.org/usr' >> >> Looks very similar, if not the same. I have not found another way to >> fix it than what you describe. I haven't found a way to reliably >> reproduce it, either. >> >> --Carl >> >> On Mon, Feb 9, 2009 at 6:45 PM, Robby Findler >> wrote: >>> I (foolishly) did an svn mv on one machine and now I've got the dreaded >>> >>> svn: OPTIONS of 'http://svn.plt-scheme.org/usr': authorization >>> failed (http://svn.plt-scheme.org) >>> >>> I'm running the svn client version 1.5.5. >>> >>> Do I just have to delete the whole tree and re-check it out (again)? >>> >>> Robby From robby at eecs.northwestern.edu Mon Feb 9 19:01:26 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 19:01:48 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <990e0c030902091558l60be3349ne24dc7aa562c4e13@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <990e0c030902091558l60be3349ne24dc7aa562c4e13@mail.gmail.com> Message-ID: <932b2f1f0902091601u15621539o7336f4d110942a@mail.gmail.com> When I check it out elsewhere. It commits fine. The latest incidence was usr/robby/redex/book/3p/matthias-build/hallett.pdf (which used to be hallet.pdf). Robby On Mon, Feb 9, 2009 at 5:58 PM, Carl Eastlund wrote: > Oh. Hmm. That's probably a different bug, then. Does this show up > when you try to commit the move, or when you check it out somewhere > else, or some other time? > > --Carl > > On Mon, Feb 9, 2009 at 6:56 PM, Robby Findler > wrote: >> Whenver I do an svn mv (even from one directory to that same >> directory), I end up having to delete and re-download the entire tree. >> >> Robby >> >> On Mon, Feb 9, 2009 at 5:51 PM, Carl Eastlund wrote: >>> I get this error sometimes on winooski: >>> >>> svn: Server sent unexpected return value (403 Forbidden) in response >>> to OPTIONS request for 'http://svn.plt-scheme.org/usr' >>> >>> Looks very similar, if not the same. I have not found another way to >>> fix it than what you describe. I haven't found a way to reliably >>> reproduce it, either. >>> >>> --Carl >>> >>> On Mon, Feb 9, 2009 at 6:45 PM, Robby Findler >>> wrote: >>>> I (foolishly) did an svn mv on one machine and now I've got the dreaded >>>> >>>> svn: OPTIONS of 'http://svn.plt-scheme.org/usr': authorization >>>> failed (http://svn.plt-scheme.org) >>>> >>>> I'm running the svn client version 1.5.5. >>>> >>>> Do I just have to delete the whole tree and re-check it out (again)? >>>> >>>> Robby > From dherman at ccs.neu.edu Mon Feb 9 19:03:36 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Mon Feb 9 19:03:56 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> Message-ID: <4990C458.8090600@ccs.neu.edu> > Whenver I do an svn mv (even from one directory to that same > directory), I end up having to delete and re-download the entire tree. Yeah, I have the same problem on my laptop. Eli was never able to figure out what was going wrong. Dave From carl.eastlund at gmail.com Mon Feb 9 19:05:09 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Mon Feb 9 19:05:31 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <932b2f1f0902091601u15621539o7336f4d110942a@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <990e0c030902091558l60be3349ne24dc7aa562c4e13@mail.gmail.com> <932b2f1f0902091601u15621539o7336f4d110942a@mail.gmail.com> Message-ID: <990e0c030902091605x106e4d04h6177c6a14c9df7c6@mail.gmail.com> Okay, that does sound like what Sam and I have seen on winooski. We had not noticed any correlation with svn mv, but it could well be the cause. --Carl On Mon, Feb 9, 2009 at 7:01 PM, Robby Findler wrote: > When I check it out elsewhere. It commits fine. The latest incidence > was usr/robby/redex/book/3p/matthias-build/hallett.pdf (which used to > be hallet.pdf). > > Robby > > On Mon, Feb 9, 2009 at 5:58 PM, Carl Eastlund wrote: >> Oh. Hmm. That's probably a different bug, then. Does this show up >> when you try to commit the move, or when you check it out somewhere >> else, or some other time? >> >> --Carl >> >> On Mon, Feb 9, 2009 at 6:56 PM, Robby Findler >> wrote: >>> Whenver I do an svn mv (even from one directory to that same >>> directory), I end up having to delete and re-download the entire tree. >>> >>> Robby >>> >>> On Mon, Feb 9, 2009 at 5:51 PM, Carl Eastlund wrote: >>>> I get this error sometimes on winooski: >>>> >>>> svn: Server sent unexpected return value (403 Forbidden) in response >>>> to OPTIONS request for 'http://svn.plt-scheme.org/usr' >>>> >>>> Looks very similar, if not the same. I have not found another way to >>>> fix it than what you describe. I haven't found a way to reliably >>>> reproduce it, either. >>>> >>>> --Carl >>>> >>>> On Mon, Feb 9, 2009 at 6:45 PM, Robby Findler >>>> wrote: >>>>> I (foolishly) did an svn mv on one machine and now I've got the dreaded >>>>> >>>>> svn: OPTIONS of 'http://svn.plt-scheme.org/usr': authorization >>>>> failed (http://svn.plt-scheme.org) >>>>> >>>>> I'm running the svn client version 1.5.5. >>>>> >>>>> Do I just have to delete the whole tree and re-check it out (again)? >>>>> >>>>> Robby From robby at eecs.northwestern.edu Mon Feb 9 19:06:47 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 19:07:06 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <4990C458.8090600@ccs.neu.edu> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> Message-ID: <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> On Mon, Feb 9, 2009 at 6:03 PM, Dave Herman wrote: >> Whenver I do an svn mv (even from one directory to that same >> directory), I end up having to delete and re-download the entire tree. > > Yeah, I have the same problem on my laptop. Eli was never able to figure out > what was going wrong. Are you using svn under windows cygwin? Robby From robby at eecs.northwestern.edu Mon Feb 9 19:17:21 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 19:17:39 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> Message-ID: <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> Well, looks like that question is irrelevant. Eli had suggested earlier that it might be something relating to cygwin, but I did the mv on one mac and now another mac is complaining about it. Robby On Mon, Feb 9, 2009 at 6:06 PM, Robby Findler wrote: > On Mon, Feb 9, 2009 at 6:03 PM, Dave Herman wrote: >>> Whenver I do an svn mv (even from one directory to that same >>> directory), I end up having to delete and re-download the entire tree. >> >> Yeah, I have the same problem on my laptop. Eli was never able to figure out >> what was going wrong. > > Are you using svn under windows cygwin? > > Robby > From eli at barzilay.org Mon Feb 9 19:51:16 2009 From: eli at barzilay.org (Eli Barzilay) Date: Mon Feb 9 19:51:37 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> Message-ID: <18832.53124.222464.71231@arabic.ccs.neu.edu> The issue, as far as I can guess, is something that has to do with the /usr permissions: under "some circumstances", "the svn client" will try to query /usr for OPTIONS, and the HTTP server refuses. IIUC, the server should refuse these queries, so that part is not wrong. However, it is not clear to me what are the circumstances where this happens, and if it's specific to all svn clients, to some, or to all clients on some platform. FWIW, the problems have started happenning only since the upgrade of the (svn) server to 1.5. In addition, I remember some svn client fixes that were related to such issues -- and I think it was related to making the client less likely to perform that kind of query. There a little more information in an strace that Carl sent of a failed svn client invocation -- it showed exactly two OPTIONS queries: one in his directory (which is fine, and it passed), and one to /usr, but it is not clear from the trace why it decided to do that on /usr. So currently, the above is what I know. It might be because of a subversion server issue, a client issue, a server configuration issue, or an authz configuration of a specific directory. I can't tell any more than that. Also, these problems all "feel the same" (they usually manifest themselves by an in valid /usr query), but I don't know if they are the same. I also cannot offer any more help in trying to resolve it, without the minimum of a way to repeat the problem. (Debugging a piece of software that I didn't write (+ configuration) for a situation that I cannot repeat is pretty much as effective as me banging the keyboard and hope for the problem to go away.) What I can offer is to put the configurations out somewhere so anyone who wants can see if they can figure out what the problem is (some parts of the configurations are in iplt/svn), I can create an exact copy of the /usr repository and proxy changes to the web server configuration to try things out, and I can send the log files. Other than that, the best course of action seems to me like going to the subversion mailing list and seeing if there's anything useful there. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From samth at ccs.neu.edu Mon Feb 9 19:58:43 2009 From: samth at ccs.neu.edu (Sam TH) Date: Mon Feb 9 19:59:05 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <18832.53124.222464.71231@arabic.ccs.neu.edu> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> <18832.53124.222464.71231@arabic.ccs.neu.edu> Message-ID: <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> Here's a reproduction recipe: check out a copy of your usr dir into my-usr. /> cd my-usr/ my-usr> touch foo my-usr> svn add foo my-usr> svn ci foo -m "." my-usr> svn mv foo bar my-usr> svn ci foo bar -m "." then go to a different, pre-existing checkout of your usr dir, perhaps called orig-usr orig-usr> svn up get the error: svn: Server sent unexpected return value (403 Forbidden) in response to OPTIONS request for 'http://svn.plt-scheme.org/usr' sam th (who just hosed his usr checkout testing this). On Mon, Feb 9, 2009 at 7:51 PM, Eli Barzilay wrote: > The issue, as far as I can guess, is something that has to do with the > /usr permissions: under "some circumstances", "the svn client" will > try to query /usr for OPTIONS, and the HTTP server refuses. IIUC, the > server should refuse these queries, so that part is not wrong. > > However, it is not clear to me what are the circumstances where this > happens, and if it's specific to all svn clients, to some, or to all > clients on some platform. FWIW, the problems have started happenning > only since the upgrade of the (svn) server to 1.5. In addition, I > remember some svn client fixes that were related to such issues -- and > I think it was related to making the client less likely to perform > that kind of query. There a little more information in an strace that > Carl sent of a failed svn client invocation -- it showed exactly two > OPTIONS queries: one in his directory (which is fine, and it passed), > and one to /usr, but it is not clear from the trace why it decided to > do that on /usr. > > So currently, the above is what I know. It might be because of a > subversion server issue, a client issue, a server configuration issue, > or an authz configuration of a specific directory. I can't tell any > more than that. Also, these problems all "feel the same" (they > usually manifest themselves by an in valid /usr query), but I don't > know if they are the same. > > I also cannot offer any more help in trying to resolve it, without the > minimum of a way to repeat the problem. (Debugging a piece of > software that I didn't write (+ configuration) for a situation that I > cannot repeat is pretty much as effective as me banging the keyboard > and hope for the problem to go away.) What I can offer is to put the > configurations out somewhere so anyone who wants can see if they can > figure out what the problem is (some parts of the configurations are > in iplt/svn), I can create an exact copy of the /usr repository and > proxy changes to the web server configuration to try things out, and I > can send the log files. > > Other than that, the best course of action seems to me like going to > the subversion mailing list and seeing if there's anything useful > there. > > -- > ((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-dev > -- sam th samth@ccs.neu.edu From robby at eecs.northwestern.edu Mon Feb 9 20:10:45 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 20:11:07 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> <18832.53124.222464.71231@arabic.ccs.neu.edu> <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> Message-ID: <932b2f1f0902091710r69bf9040k65be375dd357b344@mail.gmail.com> FWIW, I agree with Eli that this deserves a post on the svn mailing list and if that doesn't help, nothing else. It is an annoyance, but not more. Robby On Mon, Feb 9, 2009 at 6:58 PM, Sam TH wrote: > Here's a reproduction recipe: > > check out a copy of your usr dir into my-usr. > /> cd my-usr/ > my-usr> touch foo > my-usr> svn add foo > my-usr> svn ci foo -m "." > my-usr> svn mv foo bar > my-usr> svn ci foo bar -m "." > > > then go to a different, pre-existing checkout of your usr dir, perhaps > called orig-usr > > orig-usr> svn up > > get the error: > > svn: Server sent unexpected return value (403 Forbidden) in response > to OPTIONS request for 'http://svn.plt-scheme.org/usr' > > sam th (who just hosed his usr checkout testing this). > > > On Mon, Feb 9, 2009 at 7:51 PM, Eli Barzilay wrote: >> The issue, as far as I can guess, is something that has to do with the >> /usr permissions: under "some circumstances", "the svn client" will >> try to query /usr for OPTIONS, and the HTTP server refuses. IIUC, the >> server should refuse these queries, so that part is not wrong. >> >> However, it is not clear to me what are the circumstances where this >> happens, and if it's specific to all svn clients, to some, or to all >> clients on some platform. FWIW, the problems have started happenning >> only since the upgrade of the (svn) server to 1.5. In addition, I >> remember some svn client fixes that were related to such issues -- and >> I think it was related to making the client less likely to perform >> that kind of query. There a little more information in an strace that >> Carl sent of a failed svn client invocation -- it showed exactly two >> OPTIONS queries: one in his directory (which is fine, and it passed), >> and one to /usr, but it is not clear from the trace why it decided to >> do that on /usr. >> >> So currently, the above is what I know. It might be because of a >> subversion server issue, a client issue, a server configuration issue, >> or an authz configuration of a specific directory. I can't tell any >> more than that. Also, these problems all "feel the same" (they >> usually manifest themselves by an in valid /usr query), but I don't >> know if they are the same. >> >> I also cannot offer any more help in trying to resolve it, without the >> minimum of a way to repeat the problem. (Debugging a piece of >> software that I didn't write (+ configuration) for a situation that I >> cannot repeat is pretty much as effective as me banging the keyboard >> and hope for the problem to go away.) What I can offer is to put the >> configurations out somewhere so anyone who wants can see if they can >> figure out what the problem is (some parts of the configurations are >> in iplt/svn), I can create an exact copy of the /usr repository and >> proxy changes to the web server configuration to try things out, and I >> can send the log files. >> >> Other than that, the best course of action seems to me like going to >> the subversion mailing list and seeing if there's anything useful >> there. >> >> -- >> ((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-dev >> > > > > -- > sam th > samth@ccs.neu.edu > From eli at barzilay.org Mon Feb 9 20:46:43 2009 From: eli at barzilay.org (Eli Barzilay) Date: Mon Feb 9 20:47:05 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> <18832.53124.222464.71231@arabic.ccs.neu.edu> <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> Message-ID: <18832.56451.130937.859403@arabic.ccs.neu.edu> On Feb 9, Sam TH wrote: > Here's a reproduction recipe: > > check out a copy of your usr dir into my-usr. > /> cd my-usr/ > my-usr> touch foo > my-usr> svn add foo > my-usr> svn ci foo -m "." > my-usr> svn mv foo bar > my-usr> svn ci foo bar -m "." > > then go to a different, pre-existing checkout of your usr dir, perhaps > called orig-usr > > orig-usr> svn up > > get the error: > > svn: Server sent unexpected return value (403 Forbidden) in response > to OPTIONS request for 'http://svn.plt-scheme.org/usr' I don't get this error (and I did try some games like this previously). Here is how it went for me: | winooski:~ eli> cd | winooski:~ eli> mkdir x | winooski:~ eli> cd x | winooski:~/x eli> svn co http://svn.plt-scheme.org/usr/eli | A eli/[...] | Checked out revision 20816. | winooski:~/x eli> svn co http://svn.plt-scheme.org/usr/eli orig-eli | A orig-eli/[...] | Checked out revision 20816. | winooski:~/x eli> cd eli | winooski:~/x/eli eli> touch foo | winooski:~/x/eli eli> svn add foo | A foo | winooski:~/x/eli eli> svn ci -m '' | Adding foo | Transmitting file data . | Committed revision 20817. | winooski:~/x/eli eli> svn mv foo bar | A bar | D foo | winooski:~/x/eli eli> svn ci -m '' | Adding bar | Deleting foo | Committed revision 20818. | winooski:~/x/eli eli> cd ../orig-eli | winooski:~/x/orig-eli eli> svn up | A bar | Updated to revision 20818. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Mon Feb 9 20:52:26 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 9 20:52:48 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <18832.56451.130937.859403@arabic.ccs.neu.edu> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> <18832.53124.222464.71231@arabic.ccs.neu.edu> <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> <18832.56451.130937.859403@arabic.ccs.neu.edu> Message-ID: <932b2f1f0902091752o4d1ff088if3dd73bb8583359@mail.gmail.com> And the 'eli' user does not have permissions to /usr, right? Robby On Mon, Feb 9, 2009 at 7:46 PM, Eli Barzilay wrote: > On Feb 9, Sam TH wrote: >> Here's a reproduction recipe: >> >> check out a copy of your usr dir into my-usr. >> /> cd my-usr/ >> my-usr> touch foo >> my-usr> svn add foo >> my-usr> svn ci foo -m "." >> my-usr> svn mv foo bar >> my-usr> svn ci foo bar -m "." >> >> then go to a different, pre-existing checkout of your usr dir, perhaps >> called orig-usr >> >> orig-usr> svn up >> >> get the error: >> >> svn: Server sent unexpected return value (403 Forbidden) in response >> to OPTIONS request for 'http://svn.plt-scheme.org/usr' > > I don't get this error (and I did try some games like this > previously). Here is how it went for me: > > | winooski:~ eli> cd > | winooski:~ eli> mkdir x > | winooski:~ eli> cd x > | winooski:~/x eli> svn co http://svn.plt-scheme.org/usr/eli > | A eli/[...] > | Checked out revision 20816. > | winooski:~/x eli> svn co http://svn.plt-scheme.org/usr/eli orig-eli > | A orig-eli/[...] > | Checked out revision 20816. > | winooski:~/x eli> cd eli > | winooski:~/x/eli eli> touch foo > | winooski:~/x/eli eli> svn add foo > | A foo > | winooski:~/x/eli eli> svn ci -m '' > | Adding foo > | Transmitting file data . > | Committed revision 20817. > | winooski:~/x/eli eli> svn mv foo bar > | A bar > | D foo > | winooski:~/x/eli eli> svn ci -m '' > | Adding bar > | Deleting foo > | Committed revision 20818. > | winooski:~/x/eli eli> cd ../orig-eli > | winooski:~/x/orig-eli eli> svn up > | A bar > | Updated to revision 20818. > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > From eli at barzilay.org Mon Feb 9 21:52:41 2009 From: eli at barzilay.org (Eli Barzilay) Date: Mon Feb 9 21:53:03 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <932b2f1f0902091752o4d1ff088if3dd73bb8583359@mail.gmail.com> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> <18832.53124.222464.71231@arabic.ccs.neu.edu> <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> <18832.56451.130937.859403@arabic.ccs.neu.edu> <932b2f1f0902091752o4d1ff088if3dd73bb8583359@mail.gmail.com> Message-ID: <18832.60409.629310.650957@arabic.ccs.neu.edu> On Feb 9, Robby Findler wrote: > And the 'eli' user does not have permissions to /usr, right? Ha! I forgot that... (Last time I did remember it though...) In any case, the problem, at least as far as Sam's scenario goes, pops up when a path is renamed. Looks like there is no "verbose" or "debug" output that svn can produce, but there is a way to make it show such output at the neon level. So, it looks to me like the svn up is going as it should, and then it reaches a point where it is notified about "bar" and that it's a copy of "foo" -- there's a bunch of properties that include: And the next thing that happens is the offending OPTIONS. So it looks to me even less likelly now that the problem is in our configuration: it definitely looks like some svn bug. I'll try to do some googles, but it would be good if someone else tries to look for an answer too... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jos.koot at telefonica.net Tue Feb 10 14:15:53 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Tue Feb 10 14:16:46 2009 Subject: [plt-dev] arrows crossing selection References: <498FBE24.9020206@ccs.neu.edu> <6935AF42A22040BC84C353F446AAB72C@uw2b2dff239c4d> <49909891.4010900@ccs.neu.edu> Message-ID: <4F0C40FB17D24850AF009FBE7BE495F3@uw2b2dff239c4d> Thanks, that's great. Jos ----- Original Message ----- From: "Ryan Culpepper" To: "Jos Koot" Cc: Sent: Monday, February 09, 2009 9:56 PM Subject: Re: [plt-dev] arrows crossing selection > I've just added two new items in the popup menu. The first one tacks > only arrows that don't correspond to module imports. The other just > untacks all arrows in the selected region. > > Ryan > > Jos Koot wrote: >> Very nice tool for checking that a form has no other external >> dependencies than intended. >> Two remarks though: >> >> 1: Because all references to imported bindings (both variables and >> syntactic forms) have arrows too, there is an abundance of non >> informative arrows (for example to the #lang scheme line) that obscure >> the arrows I am interested in, id est those that point between bindings >> and references within the current module only. Id est, the arrows to >> require forms can be omitted as far as I am concerend. >> >> 2: How do I untack? >> >> Thanks >> Jos. >> >> ----- Original Message ----- From: "Ryan Culpepper" >> To: >> Sent: Monday, February 09, 2009 6:24 AM >> Subject: [plt-dev] arrows crossing selection >> >> >>> I've just snuck a new feature into Check Syntax. You can now tack all >>> binding arrows that cross the editor's selection boundary. That is, >>> they have one end inside the selection and one end outside. One use is >>> to find free variables in an expression you want to lift out as a >>> separate procedure. >>> >>> To use it: Run Check Syntax, highlight a region of code, and >>> right-click to get the Check Syntax context menu. It has an additional >>> item labeled "Tack arrows crossing selection". >>> >>> If people like it, I can tidy it up and add variants (eg, untack, >>> don't include arrows for module imports). If people don't like it, I >>> can take it out again. Feedback welcome. >>> >>> Ryan >>> >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> > From robby at eecs.northwestern.edu Wed Feb 11 09:53:49 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 11 09:54:10 2009 Subject: [plt-dev] Re: [plt-internal] Upload of Planet package fails In-Reply-To: <49920E62.90608@soegaard.net> References: <49920E62.90608@soegaard.net> Message-ID: <932b2f1f0902110653y715e5fd8k6001d768f62faca5@mail.gmail.com> On Tue, Feb 10, 2009 at 5:31 PM, Jens Axel Soegaard wrote: > My attempts of uploading a new version of math.plt failed. > Is there a problem with PLaneT? I suspect that this error corresponds to the stacktrace I found in the log (below). I'm running a very old version of web server on planet, however. So likely this is already fixed? > In the log search for: > > http://planet.plt-scheme.org/servlets;256*4*21053244/add.ss I don't see urls like that in the log. Possibly also because I'm running an old version of the web server? Robby procedure application: expected procedure, given: #f; arguments were: # === context === /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b reaks /local/svn/plt/collects/web-server/dispatchers/dispatch-servlets.ss:100:2: invok e-servlet-continuation dispatcher? /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b reaks dispatcher? dispatcher? /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b reaks /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b reaks /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b reaks /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b reaks /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b reaks dispatcher? From jay.mccarthy at gmail.com Wed Feb 11 10:44:00 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Wed Feb 11 10:50:58 2009 Subject: [plt-dev] Re: [plt-internal] Upload of Planet package fails In-Reply-To: <932b2f1f0902110653y715e5fd8k6001d768f62faca5@mail.gmail.com> References: <49920E62.90608@soegaard.net> <932b2f1f0902110653y715e5fd8k6001d768f62faca5@mail.gmail.com> Message-ID: On Wed, Feb 11, 2009 at 7:53 AM, Robby Findler wrote: > On Tue, Feb 10, 2009 at 5:31 PM, Jens Axel Soegaard > wrote: >> My attempts of uploading a new version of math.plt failed. >> Is there a problem with PLaneT? > > I suspect that this error corresponds to the stacktrace I found in the > log (below). I'm running a very old version of web server on planet, > however. So likely this is already fixed? I don't recognize the error immediately, but I think it might be that the continuation wasn't found for some reason. Perhaps the file was so big the continuation was gone before the upload was complete. >> In the log search for: >> >> http://planet.plt-scheme.org/servlets;256*4*21053244/add.ss > > I don't see urls like that in the log. Possibly also because I'm > running an old version of the web server? URLs don't look like that anymore, but I presume Jens copied from his browser. Are you looking at the log in the web-root directory? Jay > > Robby > > procedure application: expected procedure, given: #f; arguments were: # > > === context === > /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b > reaks > /local/svn/plt/collects/web-server/dispatchers/dispatch-servlets.ss:100:2: invok > e-servlet-continuation > dispatcher? > /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b > reaks > dispatcher? > dispatcher? > /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b > reaks > /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b > reaks > /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b > reaks > /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b > reaks > /local/svn/plt/collects/scheme/private/more-scheme.ss:170:2: select-handler/no-b > reaks > dispatcher? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > -- Jay McCarthy Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93 From robby at eecs.northwestern.edu Wed Feb 11 12:01:34 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 11 12:01:57 2009 Subject: [plt-dev] Re: [plt-internal] Upload of Planet package fails In-Reply-To: References: <49920E62.90608@soegaard.net> <932b2f1f0902110653y715e5fd8k6001d768f62faca5@mail.gmail.com> Message-ID: <932b2f1f0902110901s3b130c79n2f160abebdae504b@mail.gmail.com> On Wed, Feb 11, 2009 at 9:44 AM, Jay McCarthy wrote: > On Wed, Feb 11, 2009 at 7:53 AM, Robby Findler > wrote: >> On Tue, Feb 10, 2009 at 5:31 PM, Jens Axel Soegaard >> wrote: >>> My attempts of uploading a new version of math.plt failed. >>> Is there a problem with PLaneT? >> >> I suspect that this error corresponds to the stacktrace I found in the >> log (below). I'm running a very old version of web server on planet, >> however. So likely this is already fixed? > > I don't recognize the error immediately, but I think it might be that > the continuation wasn't found for some reason. Perhaps the file was so > big the continuation was gone before the upload was complete. That doesn't seem good! If that were the case, it would mean that a gc that happens during an upload could potentially cause the upload to fail? >>> In the log search for: >>> >>> http://planet.plt-scheme.org/servlets;256*4*21053244/add.ss >> >> I don't see urls like that in the log. Possibly also because I'm >> running an old version of the web server? > > URLs don't look like that anymore, but I presume Jens copied from his > browser. Are you looking at the log in the web-root directory? I believe so. I looked at the file listed in the log-file-path in the paths section of the file /local/webroot/configuration-table/ which is fed into the web server via: (define configuration@ (configuration-table->web-config@ (string->path "/local/webroot/configuration-table"))) Robby From jay.mccarthy at gmail.com Wed Feb 11 12:13:04 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Wed Feb 11 12:13:28 2009 Subject: [plt-dev] Re: [plt-internal] Upload of Planet package fails In-Reply-To: <932b2f1f0902110901s3b130c79n2f160abebdae504b@mail.gmail.com> References: <49920E62.90608@soegaard.net> <932b2f1f0902110653y715e5fd8k6001d768f62faca5@mail.gmail.com> <932b2f1f0902110901s3b130c79n2f160abebdae504b@mail.gmail.com> Message-ID: On Wed, Feb 11, 2009 at 10:01 AM, Robby Findler wrote: >> I don't recognize the error immediately, but I think it might be that >> the continuation wasn't found for some reason. Perhaps the file was so >> big the continuation was gone before the upload was complete. > > That doesn't seem good! If that were the case, it would mean that a gc > that happens during an upload could potentially cause the upload to > fail? The continuations are reclaimed independently from the GC. They are always reachable, because I never know when a new request will come in for them. (For example, someone could go to a site, write down the URL, store it in a safety deposit box with instructions for their grand-child to go to the site on their 50th birthday, etc.) It would be cool to do something GC-like by inspecting all current requests during a reclamation phase, but it's not on my radar. (And actually wouldn't fix this problem, because until the upload is complete there is no request to observe.) Jay -- Jay McCarthy Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93 From robby at eecs.northwestern.edu Wed Feb 11 12:42:28 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 11 12:42:50 2009 Subject: [plt-dev] Re: [plt-internal] Upload of Planet package fails In-Reply-To: References: <49920E62.90608@soegaard.net> <932b2f1f0902110653y715e5fd8k6001d768f62faca5@mail.gmail.com> <932b2f1f0902110901s3b130c79n2f160abebdae504b@mail.gmail.com> Message-ID: <932b2f1f0902110942t4b6e085awf3fd815055e4ae69@mail.gmail.com> On Wed, Feb 11, 2009 at 11:13 AM, Jay McCarthy wrote: > On Wed, Feb 11, 2009 at 10:01 AM, Robby Findler > wrote: >>> I don't recognize the error immediately, but I think it might be that >>> the continuation wasn't found for some reason. Perhaps the file was so >>> big the continuation was gone before the upload was complete. >> >> That doesn't seem good! If that were the case, it would mean that a gc >> that happens during an upload could potentially cause the upload to >> fail? > > The continuations are reclaimed independently from the GC. They are > always reachable, because I never know when a new request will come in > for them. (For example, someone could go to a site, write down the > URL, store it in a safety deposit box with instructions for their > grand-child to go to the site on their 50th birthday, etc.) > > It would be cool to do something GC-like by inspecting all current > requests during a reclamation phase, but it's not on my radar. (And > actually wouldn't fix this problem, because until the upload is > complete there is no request to observe.) Oh -- so you were saying that the timeout of the continuation expired before the upload completed, then? That makes much more sense. Robby From jay.mccarthy at gmail.com Wed Feb 11 13:21:00 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Wed Feb 11 13:21:22 2009 Subject: [plt-dev] Re: [plt-internal] Upload of Planet package fails In-Reply-To: <932b2f1f0902110942t4b6e085awf3fd815055e4ae69@mail.gmail.com> References: <49920E62.90608@soegaard.net> <932b2f1f0902110653y715e5fd8k6001d768f62faca5@mail.gmail.com> <932b2f1f0902110901s3b130c79n2f160abebdae504b@mail.gmail.com> <932b2f1f0902110942t4b6e085awf3fd815055e4ae69@mail.gmail.com> Message-ID: On Wed, Feb 11, 2009 at 10:42 AM, Robby Findler wrote: > Oh -- so you were saying that the timeout of the continuation expired > before the upload completed, then? That makes much more sense. Exactly. -- Jay McCarthy Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93 From eli at barzilay.org Thu Feb 12 00:00:19 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 12 00:02:26 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <18832.60409.629310.650957@arabic.ccs.neu.edu> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> <18832.53124.222464.71231@arabic.ccs.neu.edu> <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> <18832.56451.130937.859403@arabic.ccs.neu.edu> <932b2f1f0902091752o4d1ff088if3dd73bb8583359@mail.gmail.com> <18832.60409.629310.650957@arabic.ccs.neu.edu> Message-ID: <18835.44259.641580.260079@arabic.ccs.neu.edu> So, the summary is that this is a subversion bug, and someone on the subversion side has just started looking into it. If you want to see the bug: http://subversion.tigris.org/issues/show_bug.cgi?id=3242 I've asked about an ETA, but that's not clear now. Hopefully they'll have it resolved for their next release. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Thu Feb 12 08:05:57 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 12 08:06:34 2009 Subject: [plt-dev] planet compilation not happening for recursive requires Message-ID: <932b2f1f0902120505y38e66f9fn69842abacc65ed51@mail.gmail.com> I noticed that when I require robby/redex:4, which triggers a download of schematics/schemeunit:2.11, that the schemeunit code is not compiled. I see messages like this one: PLaneT: skipping: C:\cygwin\home\robby\svn\plt\collects\teachpack\htdc\info.ss orig-registry # current-registry # and like this: PLaneT: skipping: C:\cygwin\home\robby\svn\plt\collects\dynext\private\info.ss compiled-paths's first element changed; current value (), first element was # I believe that the first problem is traceable to resolver.ss, where a new namespace is created before setup plt is called, with this funny comment: ;; oh man is this a bad hack! (parameterize ([current-namespace (make-namespace)]) (let ([ipp (dynamic-require 'setup/plt-single-installer 'install-planet-package)]) (ipp path the-dir (list owner (pkg-spec-name pkg) extra-path maj min)))))) So ... anyone know if that bad hack is still required, or why it was required in the first place? Thanks, Robby From dherman at ccs.neu.edu Thu Feb 12 11:41:47 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Feb 12 11:42:19 2009 Subject: [plt-dev] svn annoyances In-Reply-To: <18835.44259.641580.260079@arabic.ccs.neu.edu> References: <932b2f1f0902091545s2c3b24e3rb33389251ba9c578@mail.gmail.com> <990e0c030902091551q69890954v5de59ced044e33e3@mail.gmail.com> <932b2f1f0902091556y19dc2aedn620b454e48a5558a@mail.gmail.com> <4990C458.8090600@ccs.neu.edu> <932b2f1f0902091606i3bc0d71ci476be16e4649ff7@mail.gmail.com> <932b2f1f0902091617t4c0f901aqedf892dae50bb9da@mail.gmail.com> <18832.53124.222464.71231@arabic.ccs.neu.edu> <63bb19ae0902091658o6d8b92b4u783f2b40de7addbe@mail.gmail.com> <18832.56451.130937.859403@arabic.ccs.neu.edu> <932b2f1f0902091752o4d1ff088if3dd73bb8583359@mail.gmail.com> <18832.60409.629310.650957@arabic.ccs.neu.edu> <18835.44259.641580.260079@arabic.ccs.neu.edu> Message-ID: <4994514B.5050404@ccs.neu.edu> Great, thanks for the detective work! Dave Eli Barzilay wrote: > So, the summary is that this is a subversion bug, and someone on the > subversion side has just started looking into it. If you want to see > the bug: > > http://subversion.tigris.org/issues/show_bug.cgi?id=3242 > > I've asked about an ETA, but that's not clear now. Hopefully they'll > have it resolved for their next release. From jacobm at cs.uchicago.edu Thu Feb 12 12:07:24 2009 From: jacobm at cs.uchicago.edu (Jacob Matthews) Date: Thu Feb 12 12:07:44 2009 Subject: [plt-dev] Re: planet compilation not happening for recursive requires In-Reply-To: <932b2f1f0902120505y38e66f9fn69842abacc65ed51@mail.gmail.com> References: <932b2f1f0902120505y38e66f9fn69842abacc65ed51@mail.gmail.com> Message-ID: <46b603df0902120907l66eea99bi121b42cab91b31b2@mail.gmail.com> On Thu, Feb 12, 2009 at 5:05 AM, Robby Findler wrote: > I believe that the first problem is traceable to resolver.ss, where a > new namespace is created before setup plt is called, with this funny > comment: > > ;; oh man is this a bad hack! > (parameterize ([current-namespace (make-namespace)]) > (let ([ipp (dynamic-require 'setup/plt-single-installer > 'install-planet-package)]) > (ipp path the-dir (list owner (pkg-spec-name pkg) > extra-path maj min)))))) > Yeah, this has been in planet since the beginning, and it's always bothered me. Unfortunately I never figured out how to get rid of it. In fact, IIRC, you're actually the person who suggested I do this when I discovered the problem for which it's the solution :) Last time it cropped up was in a thread from October 2007 called "can't install typed-scheme 2.0 due to namespace-attach-module error". I wrote: ;; --- I vaguely remember writing the code in question, which is: ;; oh man is this a bad hack! (parameterize ((current-namespace (make-namespace))) (let ([ipp (dynamic-require '(lib "plt-single-installer.ss" "setup") 'install-planet-package)]) (ipp path the-dir (list owner (pkg-spec-name pkg) extra-path maj min)))) This is used to compile the package, and (IIRC) has existed like this since the first version of planet. I believe the point of doing this strange and terrible thing was to allow what would otherwise be a cyclic module loading dependency, and sure enough if I change this to a normal old require I get an error message when I attempt to run setup-plt: dhcp-164-32:~/tmp/web-root/servlets/speeddating jacobm$ setup-plt setup-plt: bootstrapping from source... standard-module-name-resolver: cycle in loading at #: (# # # # # References: <932b2f1f0902120505y38e66f9fn69842abacc65ed51@mail.gmail.com> <46b603df0902120907l66eea99bi121b42cab91b31b2@mail.gmail.com> Message-ID: <932b2f1f0902121755t13ac5de7i598f9bc7c04fa80f@mail.gmail.com> Thanks, Jacob. I can't see any flaw in the reasoning there and it does seem like the most sensible way to break the dependency is right where you've done it, namely that step 3. should not be in the cycle, but off in its own world. Assuming I've got that right, then the problem seems to be that there is some part of CM that is being shared in that new namespace from the old (which is what leads to the message "skipping: C:\...\info.ss orig-registry # current-registry #" -- that message, translated to English, says "the namespace that was active at the time CM was instantiated is not the same namespace as is currently active, there fore, I'm not going to compile this file". Robby On Thu, Feb 12, 2009 at 11:07 AM, Jacob Matthews wrote: > On Thu, Feb 12, 2009 at 5:05 AM, Robby Findler > wrote: > >> I believe that the first problem is traceable to resolver.ss, where a >> new namespace is created before setup plt is called, with this funny >> comment: >> >> ;; oh man is this a bad hack! >> (parameterize ([current-namespace (make-namespace)]) >> (let ([ipp (dynamic-require 'setup/plt-single-installer >> 'install-planet-package)]) >> (ipp path the-dir (list owner (pkg-spec-name pkg) >> extra-path maj min)))))) >> > > Yeah, this has been in planet since the beginning, and it's always > bothered me. Unfortunately I never figured out how to get rid of it. > In fact, IIRC, you're actually the person who suggested I do this when > I discovered the problem for which it's the solution :) Last time it > cropped up was in a thread from October 2007 called "can't install > typed-scheme 2.0 due to namespace-attach-module error". I wrote: > > ;; --- > > I vaguely remember writing the code in question, which is: > > ;; oh man is this a bad hack! > (parameterize ((current-namespace (make-namespace))) > (let ([ipp (dynamic-require '(lib "plt-single-installer.ss" > "setup") 'install-planet-package)]) > (ipp path the-dir (list owner (pkg-spec-name pkg) extra-path maj min)))) > > This is used to compile the package, and (IIRC) has existed like this > since the first version of planet. I believe the point of doing this > strange and terrible thing was to allow what would otherwise be a > cyclic module loading dependency, and sure enough if I change this to > a normal old require I get an error message when I attempt to run > setup-plt: > > dhcp-164-32:~/tmp/web-root/servlets/speeddating jacobm$ setup-plt > setup-plt: bootstrapping from source... > standard-module-name-resolver: cycle in loading at > #: > (# > # > # > # > # > === context === > /Users/jacobm/svn/plt/collects/setup/setup.ss:59:20: loop > > > Digging a bit, it appears that the cycle is real as opposed to one > caused by unnecessary grouping of procedures. It goes like this: > 1. The compilation manager needs to turn require-lines into paths. > 2. The function that turns require-lines into paths (that's the > modresolve thing) needs to resolve planet package require specs to > filenames. > 3. The planet resolver needs to be able to set up a package in the > course of its resolution process, because that's the entire point of > planet existing. > 4. The setup procedure needs to use the compilation manager to compile packages. > > I believe the above hack was intended to allow me to create this cycle. > > ;; --- > > -jacob > From cce at ccs.neu.edu Fri Feb 13 13:28:18 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Fri Feb 13 13:34:53 2009 Subject: [plt-dev] Scribble errors in Dracula distribution Message-ID: <990e0c030902131028l8026edep2be73b92c586fcb5@mail.gmail.com> The pre-built documentation I uploaded with Dracula 8.1 has some broken internal links. You can see an example in the first paragraph at: http://planet.plt-scheme.org/package-source/cce/dracula.plt/8/1/planet-docs/reference/index.html These links work fine in the Dracula package itself. Does anyone know why they wouldn't work in the version created for the .plt file? I didn't see any errors reported when I built the package, or I would have copied them and reported this problem then. Have any other planet package maintainers seen problems like this? -- Carl Eastlund From cce at ccs.neu.edu Fri Feb 13 14:07:01 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Fri Feb 13 14:07:19 2009 Subject: [plt-dev] Documenting planet packages Message-ID: <990e0c030902131107g1d46c764x30897cafc750c6b4@mail.gmail.com> Yesterday I released (planet cce/scheme:3:0), including three new macros for Scribble documentation: schememodname/this-package, defmodule/this-package, and declare-exporting/this-package. These are variants of schememodname, defmodule, and declare-exporting that add the owner, name, and major/minor version numbers of the current planet package to a path. For instance, within that package, they would expand as follows: (schememodname/this-package foo/bar) ==> (schememodname (planet cce/scheme:3:0/foo/bar)) (defmodule/this-package foo/bar #:use-sources [abc] [def]) ==> (defmodule (planet cce/scheme:3:0/foo/bar) #:use-sources [(planet cce/scheme:3:0/abc) def]) (declare-exporting/this-package [foo] [bar] #:use-sources [abc] [def]) ==> (declare-exporting (planet cce/scheme:3:0/foo) bar #:use-sources [(planet cce/scheme:3:0/abc) def]) These are really helpful for creating links and documentation that refer to the planet package including its version number, so you know precisely what it's talking about, without the potential for forgetting to update version numbers when you release. I propose we add something like these to the trunk, possibly in planet/util or perhaps in a new scribble/planet module. The current versions are a bit clunky -- notice that I had to split all sequences of module paths into two parts for defmodule and declare-exporting so I knew which parts to put (planet ...) around. There's probably a better way to specify that. Alternately, if we added unsyntax escapes to the schememodname, defmodule, and declare-exporting forms (or versions of them), a single tool for generating planet require specs would suffice. (I included that too; this-package-version-symbol for run-time symbols and syntax-source-planet-package-symbol for compile-time symbols.) Meanwhile, if you have a planet package and want to include its path (including version number) in your documentation, feel free to use these macros from my package. Get 'em like this: (require (planet cce/scheme:3:0/planet)) -- Carl Eastlund From robby at eecs.northwestern.edu Fri Feb 13 17:46:02 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Fri Feb 13 17:46:21 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? Message-ID: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> Is there a good way to typeset HtDP-style data definitions in Scribble? I've just been doing this: @verbatim[#<<--- ;; a state is either: ;; - 'playing ;; - 'cat-won ;; - 'cat-lost --- ] @verbatim[#<<--- ;; a board is ;; (listof cell) --- ] @verbatim[#<<--- ;; a cell is ;; (make-cell (make-posn int[0-board-size] ;; int[0-board-size]) ;; boolean) --- ] Robby From matthias at ccs.neu.edu Fri Feb 13 17:49:09 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Fri Feb 13 17:50:33 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> Message-ID: I am doing similar things, using schemeblock and a #reader. (I got the code from Eli or Matthew, and I copy and paste it where I go.) On Feb 13, 2009, at 5:46 PM, Robby Findler wrote: > Is there a good way to typeset HtDP-style data definitions in > Scribble? I've just been doing this: > > @verbatim[#<<--- > ;; a state is either: > ;; - 'playing > ;; - 'cat-won > ;; - 'cat-lost > --- > ] > > @verbatim[#<<--- > ;; a board is > ;; (listof cell) > --- > ] > > @verbatim[#<<--- > ;; a cell is > ;; (make-cell (make-posn int[0-board-size] > ;; int[0-board-size]) > ;; boolean) > --- > ] > > Robby > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From robby at eecs.northwestern.edu Fri Feb 13 17:54:23 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Fri Feb 13 17:54:45 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> Message-ID: <932b2f1f0902131454x89e0a2btb22d646808ae83ab@mail.gmail.com> How do you use a schemeblock? Do you add comment lines in or something? Robby On Fri, Feb 13, 2009 at 4:49 PM, Matthias Felleisen wrote: > > I am doing similar things, using schemeblock and a #reader. (I got the code > from Eli or Matthew, and I copy and paste it where I go.) > > > On Feb 13, 2009, at 5:46 PM, Robby Findler wrote: > >> Is there a good way to typeset HtDP-style data definitions in >> Scribble? I've just been doing this: >> >> @verbatim[#<<--- >> ;; a state is either: >> ;; - 'playing >> ;; - 'cat-won >> ;; - 'cat-lost >> --- >> ] >> >> @verbatim[#<<--- >> ;; a board is >> ;; (listof cell) >> --- >> ] >> >> @verbatim[#<<--- >> ;; a cell is >> ;; (make-cell (make-posn int[0-board-size] >> ;; int[0-board-size]) >> ;; boolean) >> --- >> ] >> >> Robby >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > > From matthias at ccs.neu.edu Fri Feb 13 18:06:24 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Fri Feb 13 18:07:47 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: <932b2f1f0902131454x89e0a2btb22d646808ae83ab@mail.gmail.com> References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> <932b2f1f0902131454x89e0a2btb22d646808ae83ab@mail.gmail.com> Message-ID: <8D12043E-C1D3-418D-8212-71B577EF4251@ccs.neu.edu> @(begin #reader scribble/comment-reader (schemeblock ;; teachpack: universe.ss ;; WorldState is one of: ;; -- Number %% representing the @emph{y} coordinate ;; -- @scheme['resting] (define WORLD0 'resting) ;; A WorldResult is one of: ;; -- WorldState ;; -- (make-package WorldState StopMessage) )) (Eli must have changed this one.) On Feb 13, 2009, at 5:54 PM, Robby Findler wrote: > How do you use a schemeblock? Do you add comment lines in or > something? > > Robby > > On Fri, Feb 13, 2009 at 4:49 PM, Matthias Felleisen > wrote: >> >> I am doing similar things, using schemeblock and a #reader. (I got >> the code >> from Eli or Matthew, and I copy and paste it where I go.) >> >> >> On Feb 13, 2009, at 5:46 PM, Robby Findler wrote: >> >>> Is there a good way to typeset HtDP-style data definitions in >>> Scribble? I've just been doing this: >>> >>> @verbatim[#<<--- >>> ;; a state is either: >>> ;; - 'playing >>> ;; - 'cat-won >>> ;; - 'cat-lost >>> --- >>> ] >>> >>> @verbatim[#<<--- >>> ;; a board is >>> ;; (listof cell) >>> --- >>> ] >>> >>> @verbatim[#<<--- >>> ;; a cell is >>> ;; (make-cell (make-posn int[0-board-size] >>> ;; int[0-board-size]) >>> ;; boolean) >>> --- >>> ] >>> >>> Robby >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> >> From m.douglas.williams at gmail.com Fri Feb 13 19:00:27 2009 From: m.douglas.williams at gmail.com (Doug Williams) Date: Fri Feb 13 19:00:52 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: <8D12043E-C1D3-418D-8212-71B577EF4251@ccs.neu.edu> References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> <932b2f1f0902131454x89e0a2btb22d646808ae83ab@mail.gmail.com> <8D12043E-C1D3-418D-8212-71B577EF4251@ccs.neu.edu> Message-ID: Is the scribble/comment-reader documented anywhere? I have been using code:comment to insert comments into schemeblock, but it doesn't allow me to use things like multiple comment characters (e.g., ;, ;;, or ;;;) depending on the level of comment, which I actually do in my code. This seems to solve that. On Fri, Feb 13, 2009 at 4:06 PM, Matthias Felleisen wrote: > > > @(begin #reader scribble/comment-reader > (schemeblock > ;; teachpack: universe.ss > > ;; WorldState is one of: > ;; -- Number %% representing the @emph{y} coordinate > ;; -- @scheme['resting] > > (define WORLD0 'resting) > > ;; A WorldResult is one of: > ;; -- WorldState > ;; -- (make-package WorldState StopMessage) > )) > > (Eli must have changed this one.) > > > > > On Feb 13, 2009, at 5:54 PM, Robby Findler wrote: > > How do you use a schemeblock? Do you add comment lines in or something? >> >> Robby >> >> On Fri, Feb 13, 2009 at 4:49 PM, Matthias Felleisen >> wrote: >> >>> >>> I am doing similar things, using schemeblock and a #reader. (I got the >>> code >>> from Eli or Matthew, and I copy and paste it where I go.) >>> >>> >>> On Feb 13, 2009, at 5:46 PM, Robby Findler wrote: >>> >>> Is there a good way to typeset HtDP-style data definitions in >>>> Scribble? I've just been doing this: >>>> >>>> @verbatim[#<<--- >>>> ;; a state is either: >>>> ;; - 'playing >>>> ;; - 'cat-won >>>> ;; - 'cat-lost >>>> --- >>>> ] >>>> >>>> @verbatim[#<<--- >>>> ;; a board is >>>> ;; (listof cell) >>>> --- >>>> ] >>>> >>>> @verbatim[#<<--- >>>> ;; a cell is >>>> ;; (make-cell (make-posn int[0-board-size] >>>> ;; int[0-board-size]) >>>> ;; boolean) >>>> --- >>>> ] >>>> >>>> Robby >>>> _________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>>> >>> >>> >>> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090213/bd5f98a5/attachment.html From matthias at ccs.neu.edu Fri Feb 13 19:31:27 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Fri Feb 13 19:32:10 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> <932b2f1f0902131454x89e0a2btb22d646808ae83ab@mail.gmail.com> <8D12043E-C1D3-418D-8212-71B577EF4251@ccs.neu.edu> Message-ID: <897D143B-DA4F-4A97-915A-F845D401EA1D@ccs.neu.edu> Nope. I asked Eli and/or Matthew and I received. I don't check out gift horses too closely :-) On Feb 13, 2009, at 7:00 PM, Doug Williams wrote: > Is the scribble/comment-reader documented anywhere? I have been > using code:comment to insert comments into schemeblock, but it > doesn't allow me to use things like multiple comment characters > (e.g., ;, ;;, or ;;;) depending on the level of comment, which I > actually do in my code. This seems to solve that. > > On Fri, Feb 13, 2009 at 4:06 PM, Matthias Felleisen > wrote: > > > @(begin #reader scribble/comment-reader > (schemeblock > ;; teachpack: universe.ss > > ;; WorldState is one of: > ;; -- Number %% representing the @emph{y} coordinate > ;; -- @scheme['resting] > > (define WORLD0 'resting) > > ;; A WorldResult is one of: > ;; -- WorldState > ;; -- (make-package WorldState StopMessage) > )) > > (Eli must have changed this one.) > > > > > On Feb 13, 2009, at 5:54 PM, Robby Findler wrote: > > How do you use a schemeblock? Do you add comment lines in or > something? > > Robby > > On Fri, Feb 13, 2009 at 4:49 PM, Matthias Felleisen > wrote: > > I am doing similar things, using schemeblock and a #reader. (I got > the code > from Eli or Matthew, and I copy and paste it where I go.) > > > On Feb 13, 2009, at 5:46 PM, Robby Findler wrote: > > Is there a good way to typeset HtDP-style data definitions in > Scribble? I've just been doing this: > > @verbatim[#<<--- > ;; a state is either: > ;; - 'playing > ;; - 'cat-won > ;; - 'cat-lost > --- > ] > > @verbatim[#<<--- > ;; a board is > ;; (listof cell) > --- > ] > > @verbatim[#<<--- > ;; a cell is > ;; (make-cell (make-posn int[0-board-size] > ;; int[0-board-size]) > ;; boolean) > --- > ] > > Robby > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > > > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090213/519515d7/attachment.htm From grettke at acm.org Fri Feb 13 23:07:00 2009 From: grettke at acm.org (Grant Rettke) Date: Fri Feb 13 23:07:21 2009 Subject: [plt-dev] Could not read response body error when checking out trunk Message-ID: <756daca50902132007n7ff9f8e0u724189e35475e136@mail.gmail.com> When I try to check out trunk I get experience the following: grettke@stargate:~/plt$ svn checkout http://svn.plt-scheme.org/plt/trunk/ trunk svn: REPORT of '/plt/!svn/vcc/default': Could not read response body: Connection reset by peer (http://svn.plt-scheme.org) grettke@stargate:~/plt$ svn --version svn, version 1.5.1 (r32289) compiled Jul 31 2008, 09:45:17 grettke@stargate:~/plt$ cat /etc/issue Ubuntu 8.10 Searching for the error message yields results ranging from secure connection issues to SVN server timeout issues. Any ideas on what is going on here? From eli at barzilay.org Fri Feb 13 23:17:41 2009 From: eli at barzilay.org (Eli Barzilay) Date: Fri Feb 13 23:18:02 2009 Subject: [plt-dev] Could not read response body error when checking out trunk In-Reply-To: <756daca50902132007n7ff9f8e0u724189e35475e136@mail.gmail.com> References: <756daca50902132007n7ff9f8e0u724189e35475e136@mail.gmail.com> Message-ID: <18838.17893.412940.332548@arabic.ccs.neu.edu> On Feb 13, Grant Rettke wrote: > When I try to check out trunk I get experience the following: > > grettke@stargate:~/plt$ svn checkout http://svn.plt-scheme.org/plt/trunk/ trunk > > > > svn: REPORT of '/plt/!svn/vcc/default': Could not read response body: > Connection reset by peer (http://svn.plt-scheme.org) Sounds like the connection timed out somehow. Try to do an `svn up' on the partial check-out. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From grettke at acm.org Fri Feb 13 23:27:30 2009 From: grettke at acm.org (Grant Rettke) Date: Fri Feb 13 23:27:52 2009 Subject: [plt-dev] Could not read response body error when checking out trunk In-Reply-To: <18838.17893.412940.332548@arabic.ccs.neu.edu> References: <756daca50902132007n7ff9f8e0u724189e35475e136@mail.gmail.com> <18838.17893.412940.332548@arabic.ccs.neu.edu> Message-ID: <756daca50902132027s2ccd6d1dg3a0742add0b9de7a@mail.gmail.com> On Fri, Feb 13, 2009 at 10:17 PM, Eli Barzilay wrote: > On Feb 13, Grant Rettke wrote: >> When I try to check out trunk I get experience the following: >> >> grettke@stargate:~/plt$ svn checkout http://svn.plt-scheme.org/plt/trunk/ trunk >> >> >> >> svn: REPORT of '/plt/!svn/vcc/default': Could not read response body: >> Connection reset by peer (http://svn.plt-scheme.org) > > Sounds like the connection timed out somehow. Try to do an `svn up' > on the partial check-out. I just rebooted into Windows and it works fine. I will try updating on the Linux side. From mflatt at cs.utah.edu Sat Feb 14 08:37:15 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sat Feb 14 08:37:38 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> <932b2f1f0902131454x89e0a2btb22d646808ae83ab@mail.gmail.com> <8D12043E-C1D3-418D-8212-71B577EF4251@ccs.neu.edu> Message-ID: <20090214133718.939836500B1@mail-svr1.cs.utah.edu> At Fri, 13 Feb 2009 17:00:27 -0700, Doug Williams wrote: > Is the scribble/comment-reader documented anywhere? No. I thought that it would be quickly replaced by something better, but that hasn't happened, yet. So I've added documentation. Since `scribble/comment-reader' generates `code:comment' forms, it still doesn't support multiple semi-colons for comments. Maybe I should work on that, but it seems more likely that effort should go into a different approach to typesetting code. It looks more promising to color the text as written (similar to the way Check Syntax works) instead of reading and then reconstructing the layout from syntax-object source locations. From eli at barzilay.org Sat Feb 14 18:26:44 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 14 18:27:06 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> Message-ID: <18839.21300.768886.426232@arabic.ccs.neu.edu> On Feb 13, Robby Findler wrote: > Is there a good way to typeset HtDP-style data definitions in > Scribble? I've just been doing this: > > @verbatim[#<<--- > ;; a state is either: > ;; - 'playing > ;; - 'cat-won > ;; - 'cat-lost > --- > ] One unrelated comment about the above (since I see that you committed something very similar) -- you can get exactly the same result with: @verbatim{ ;; a state is either: ;; - 'playing ;; - 'cat-won ;; - 'cat-lost } (It's just that the scribble reader is a better way of doing "here-strings"-like so it bugs me to see it used with the thing...) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Sat Feb 14 18:27:41 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 14 18:28:48 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: <8D12043E-C1D3-418D-8212-71B577EF4251@ccs.neu.edu> References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> <932b2f1f0902131454x89e0a2btb22d646808ae83ab@mail.gmail.com> <8D12043E-C1D3-418D-8212-71B577EF4251@ccs.neu.edu> Message-ID: <18839.21357.614915.63176@arabic.ccs.neu.edu> On Feb 13, Matthias Felleisen wrote: > > @(begin #reader scribble/comment-reader > (schemeblock > ;; teachpack: universe.ss > > ;; WorldState is one of: > ;; -- Number %% representing the @emph{y} coordinate > ;; -- @scheme['resting] > > (define WORLD0 'resting) > > ;; A WorldResult is one of: > ;; -- WorldState > ;; -- (make-package WorldState StopMessage) > )) > > (Eli must have changed this one.) (Not me...) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Sat Feb 14 18:28:20 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 14 18:28:52 2009 Subject: [plt-dev] scribble support for HtDP-style data definitions? In-Reply-To: <18839.21300.768886.426232@arabic.ccs.neu.edu> References: <932b2f1f0902131446m1b345171mda3acd7312eb5e7a@mail.gmail.com> <18839.21300.768886.426232@arabic.ccs.neu.edu> Message-ID: <932b2f1f0902141528x3f599d8er39c0359a362685a9@mail.gmail.com> Oh, right! Thanks. Robby On Sat, Feb 14, 2009 at 5:26 PM, Eli Barzilay wrote: > On Feb 13, Robby Findler wrote: >> Is there a good way to typeset HtDP-style data definitions in >> Scribble? I've just been doing this: >> >> @verbatim[#<<--- >> ;; a state is either: >> ;; - 'playing >> ;; - 'cat-won >> ;; - 'cat-lost >> --- >> ] > > One unrelated comment about the above (since I see that you committed > something very similar) -- you can get exactly the same result with: > > @verbatim{ > ;; a state is either: > ;; - 'playing > ;; - 'cat-won > ;; - 'cat-lost > } > > (It's just that the scribble reader is a better way of doing > "here-strings"-like so it bugs me to see it used with the thing...) > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > From rafkind at cs.utah.edu Sat Feb 14 20:54:47 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Sat Feb 14 20:55:06 2009 Subject: [plt-dev] strange srfi names Message-ID: <499775E7.1030204@cs.utah.edu> I just noticed this in setup-plt. setup-plt: making: srfi/%3a69 setup-plt: in srfi/%3a69 Indeed the collects names are like that $ ls %3a1/ %3a1.ss .. seems kind of weird.. is that on purpose? From samth at ccs.neu.edu Sat Feb 14 21:06:04 2009 From: samth at ccs.neu.edu (Sam TH) Date: Sat Feb 14 21:06:26 2009 Subject: [plt-dev] strange srfi names In-Reply-To: <499775E7.1030204@cs.utah.edu> References: <499775E7.1030204@cs.utah.edu> Message-ID: <63bb19ae0902141806u6768b260m8d5688fc3d10ef3a@mail.gmail.com> See SRFI-97 - http://srfi.schemers.org/srfi-97/srfi-97.html It's so that (import (srfi :1)) works. sam th On Sat, Feb 14, 2009 at 8:54 PM, Jon Rafkind wrote: > I just noticed this in setup-plt. > > setup-plt: making: srfi/%3a69 > setup-plt: in srfi/%3a69 > > Indeed the collects names are like that > $ ls > %3a1/ > %3a1.ss > .. > > seems kind of weird.. is that on purpose? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > -- sam th samth@ccs.neu.edu From mflatt at cs.utah.edu Sat Feb 14 21:10:51 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sat Feb 14 21:11:14 2009 Subject: [plt-dev] strange srfi names In-Reply-To: <499775E7.1030204@cs.utah.edu> References: <499775E7.1030204@cs.utah.edu> Message-ID: <20090215021055.40CF26500AD@mail-svr1.cs.utah.edu> At Sat, 14 Feb 2009 18:54:47 -0700, Jon Rafkind wrote: > I just noticed this in setup-plt. > > setup-plt: making: srfi/%3a69 > setup-plt: in srfi/%3a69 > > Indeed the collects names are like that > $ ls > %3a1/ > %3a1.ss > .. > > seems kind of weird.. is that on purpose? Yes, it's an encoding of names like ":1". From grettke at acm.org Sun Feb 15 08:33:28 2009 From: grettke at acm.org (Grant Rettke) Date: Sun Feb 15 08:33:50 2009 Subject: [plt-dev] Could not read response body error when checking out trunk In-Reply-To: <18838.17893.412940.332548@arabic.ccs.neu.edu> References: <756daca50902132007n7ff9f8e0u724189e35475e136@mail.gmail.com> <18838.17893.412940.332548@arabic.ccs.neu.edu> Message-ID: <756daca50902150533n169366cbs5977bea37f29ed95@mail.gmail.com> On Fri, Feb 13, 2009 at 10:17 PM, Eli Barzilay wrote: > On Feb 13, Grant Rettke wrote: >> When I try to check out trunk I get experience the following: >> >> grettke@stargate:~/plt$ svn checkout http://svn.plt-scheme.org/plt/trunk/ trunk >> >> >> >> svn: REPORT of '/plt/!svn/vcc/default': Could not read response body: >> Connection reset by peer (http://svn.plt-scheme.org) > > Sounds like the connection timed out somehow. Try to do an `svn up' > on the partial check-out. When I try this I get: svn: REPORT of '/plt/!svn/vcc/default': Could not read response body: Connection reset by peer (http://svn.plt-scheme.org) This works fine using the client on Windows. I wonder if this is an SVN client issue. From matthias at ccs.neu.edu Sun Feb 15 14:24:52 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Sun Feb 15 14:25:42 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> Message-ID: <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> Could we improve the error message for people who attempt to nest regions > #lang scheme > > (with-contract f1 > ((y number?)) > (with-contract f2 > ((x boolean?)) > (define x #t) > (define y 1))) > or > #lang scheme > > (define (f x) > (with-contract > f1 > ((y number?)) > (define y x))) > > (f 10) Thanks. -- Matthias On Feb 14, 2009, at 11:24 PM, Stevie Strickland wrote: > In SVN I've added three new major features that involve contracts. > One allows for more fine-grained control of contracts, and the other > two allow for the use of contracts with signatures and units. > > Contract Regions > ---------------- > > Contract regions allow the programmer to protect a region of code > with a contract boundary. In addition to the wrapped code, the > programmer also provides a name for the region which is used in > blame situations and a list of exported variables which can > either be protected with contracts or unprotected. The region > provides a true contract boundary, in that uses of contracted > exports within the region are unprotected. Contract regions are > specified with the with-contract form. The following contract > region defines two mutually recursive functions: > > (with-contract region1 > ([f (-> number? boolean?)] > [g (-> number? boolean?)]) > (define (f n) (if (zero? n) #f (g (sub1 n)))) > (define (g n) (if (zero? n) #t (f (sub1 n))))) > > The internal calls to f and g are uncontracted, but calls to f > and g outside this region would be appropriately contracted. > First-order checks are performed at the region, so the > following region: > > (with-contract region2 > ([n number?]) > (define n #t)) > > results in the following error: > > (region region2) broke the contract number? on n; > expected , given: #t > > Notice that the blame not only gives the name of the region, but > describes what type of contract boundary was involved. > > For contracting a single definition, there is the define/contract > form which has a similar syntax to define, except that it takes a > contract before the body of the definition. To compare the two > forms, the following two definitions are equivalent: > > (with-contract fact > ([fact (-> number? number?)]) > (define (fact n) > (if (zero? n) 1 (* n (fact (sub1 n)))))) > > (define/contract (fact n) > (-> number? number?) > (if (zero? n) 1 (* n (fact (sub1 n))))) > > First order checks are similarly performed at the definition for > define/contract, so > > (define/contract (fact n) > (-> number?) > (if (zero? n) 1 (* n (fact (sub1 n))))) > > results in > > (function fact) broke the contract (-> number?) on fact; > expected a procedure that accepts no arguments without > any keywords, given: # > > Signature Contracts > ------------------- > > In addition to contract regions, units are also now contract > boundaries. One way to use contracts with units is to add > contracts to unit signatures via the contracted signature form. > > (define-signature toy-factory^ > ((contracted > [build-toys (-> integer? (listof toy?))] > [repaint (-> toy? symbol? toy?)] > [toy? (-> any/c boolean?)] > [toy-color (-> toy? symbol?)]))) > > Notice that contracts in a signature can use variables listed > in the signature. > > Now if we take the following implementation of that signature: > > (define-unit simple-factory@ > (import) > (export toy-factory^) > > (define-struct toy (color) #:transparent) > > (define (build-toys n) > (for/list ([i (in-range n)]) > (make-toy 'blue))) > > (define (repaint t col) > (make-toy col))) > > We get the appropriate contract checks on those exports: > > > (define-values/invoke-unit/infer simple-factory@) > > (build-toys 3) > (#(struct:toy blue) #(struct:toy blue) #(struct:toy blue)) > > (build-toys #f) > top-level broke the contract (-> integer? (listof toy?)) > on build-toys; expected , given: #f > > As before, uses of contracted exports inside the unit are > not checked. > > Since units are contract boundaries, they can be blamed > appropriately. Take the following definitions: > > (define-unit factory-user@ > (import toy-factory^) > (export) > (let ([toys (build-toys 3)]) > (repaint 3 'blue))) > > (define-compound-unit/infer factory+user@ > (import) (export) > (link simple-factory@ factory-user@)) > > When we invoke the combined unit: > > > (define-values/invoke-unit/infer factory+user@) > (unit factory-user@) broke the contract > (-> toy? symbol? toy?) > on repaint; expected , given: 3 > > Unit Contracts > -------------- > > However, we may not always be able to add contracts to > signatures. For example, there are many already-existing > signatures in PLT Scheme that one may want to implement, or a > programmer may want to take a unit value and add contracts to it > after the fact. > > To do this, there is the unit/c contract combinator. It takes a list > of imports and exports, where each signature is paired with a list of > variables and their contracts for each signature. So if we had the > uncontracted version of the toy-factory^ signature: > > (define-signature toy-factory^ > (build-toys repaint toy? toy-color)) > > the following contracts would be appropriate for a unit that imports > nothing and exports that signature: > > (unit/c (import) (export)) > (unit/c (import) (export toy-factory^)) > (unit/c > (import) > (export (toy-factory^ > [toy-color (-> toy? symbol?)]))) > (unit/c > (import) > (export (toy-factory^ > [build-toys (-> integer? (listof toy?))] > [repaint (-> toy? symbol? toy?)] > [toy? (-> any/c boolean?)] > [toy-color (-> toy? symbol?)]))) > > Unit contracts can contain a superset of the import signatures and a > subset of the export signatures for a given unit value. Also, > variables that are not listed for a given signature are left alone > when the contracts are being added. > > Since the results of applying unit/c is a new unit, then adding > a contract can cause link inference to fail. For example, if we > change the definition of simple-factory@ above to > > (define/contract simple-factory@ > (unit/c > (import) > (export (toy-factory^ > [build-toys (-> integer? (listof toy?))] > [repaint (-> toy? symbol? toy?)] > [toy? (-> any/c boolean?)] > [toy-color (-> toy? symbol?)]))) > (unit > (import) > (export toy-factory^) > > (define-struct toy (color) #:transparent) > > (define (build-toys n) > (for/list ([i (in-range n)]) > (make-toy 'blue))) > > (define (repaint t col) > (make-toy col)))) > > Then when we try to combine it with the factory-user@ unit, we > get: > > define-compound-unit/infer: not a unit definition > in: simple-factory@ > > One way to solve this is to use define-unit-binding to set up the > static information for the new contracted value. Another possibility > for unit definitions is to use define-unit/contract: > > (define-unit/contract simple-factory@ > (import) > (export (toy-factory^ > [build-toys (-> integer? (listof toy?))] > [repaint (-> toy? symbol? toy?)] > [toy? (-> any/c boolean?)] > [toy-color (-> toy? symbol?)])) > > (define-struct toy (color) #:transparent) > > (define (build-toys n) > (for/list ([i (in-range n)]) > (make-toy 'blue))) > > (define (repaint t col) > (make-toy col))) > > More about these features can be found in the Reference, and a short > section about signature and unit contracts has been added to the > Guide. > > Stevie > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From samth at ccs.neu.edu Sun Feb 15 14:57:02 2009 From: samth at ccs.neu.edu (Sam TH) Date: Sun Feb 15 14:57:25 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> Message-ID: <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> Note that you get the same error message if you do this: > (define (f x) (define y x)) . begin (possibly implicit): no expression after a sequence of internal definitions in: ((define y x)) Do you think `with-contract' should give a special error message here, or that the error message in general should be improved? sam th On Sun, Feb 15, 2009 at 2:24 PM, Matthias Felleisen wrote: > > Could we improve the error message for people who attempt to nest regions > >> #lang scheme >> >> (with-contract f1 >> ((y number?)) >> (with-contract f2 >> ((x boolean?)) >> (define x #t) >> (define y 1))) >> > > or > >> #lang scheme >> >> (define (f x) >> (with-contract >> f1 >> ((y number?)) >> (define y x))) >> >> (f 10) > > Thanks. -- Matthias > > > > On Feb 14, 2009, at 11:24 PM, Stevie Strickland wrote: > >> In SVN I've added three new major features that involve contracts. >> One allows for more fine-grained control of contracts, and the other >> two allow for the use of contracts with signatures and units. >> >> Contract Regions >> ---------------- >> >> Contract regions allow the programmer to protect a region of code >> with a contract boundary. In addition to the wrapped code, the >> programmer also provides a name for the region which is used in >> blame situations and a list of exported variables which can >> either be protected with contracts or unprotected. The region >> provides a true contract boundary, in that uses of contracted >> exports within the region are unprotected. Contract regions are >> specified with the with-contract form. The following contract >> region defines two mutually recursive functions: >> >> (with-contract region1 >> ([f (-> number? boolean?)] >> [g (-> number? boolean?)]) >> (define (f n) (if (zero? n) #f (g (sub1 n)))) >> (define (g n) (if (zero? n) #t (f (sub1 n))))) >> >> The internal calls to f and g are uncontracted, but calls to f >> and g outside this region would be appropriately contracted. >> First-order checks are performed at the region, so the >> following region: >> >> (with-contract region2 >> ([n number?]) >> (define n #t)) >> >> results in the following error: >> >> (region region2) broke the contract number? on n; >> expected , given: #t >> >> Notice that the blame not only gives the name of the region, but >> describes what type of contract boundary was involved. >> >> For contracting a single definition, there is the define/contract >> form which has a similar syntax to define, except that it takes a >> contract before the body of the definition. To compare the two >> forms, the following two definitions are equivalent: >> >> (with-contract fact >> ([fact (-> number? number?)]) >> (define (fact n) >> (if (zero? n) 1 (* n (fact (sub1 n)))))) >> >> (define/contract (fact n) >> (-> number? number?) >> (if (zero? n) 1 (* n (fact (sub1 n))))) >> >> First order checks are similarly performed at the definition for >> define/contract, so >> >> (define/contract (fact n) >> (-> number?) >> (if (zero? n) 1 (* n (fact (sub1 n))))) >> >> results in >> >> (function fact) broke the contract (-> number?) on fact; >> expected a procedure that accepts no arguments without >> any keywords, given: # >> >> Signature Contracts >> ------------------- >> >> In addition to contract regions, units are also now contract >> boundaries. One way to use contracts with units is to add >> contracts to unit signatures via the contracted signature form. >> >> (define-signature toy-factory^ >> ((contracted >> [build-toys (-> integer? (listof toy?))] >> [repaint (-> toy? symbol? toy?)] >> [toy? (-> any/c boolean?)] >> [toy-color (-> toy? symbol?)]))) >> >> Notice that contracts in a signature can use variables listed >> in the signature. >> >> Now if we take the following implementation of that signature: >> >> (define-unit simple-factory@ >> (import) >> (export toy-factory^) >> >> (define-struct toy (color) #:transparent) >> >> (define (build-toys n) >> (for/list ([i (in-range n)]) >> (make-toy 'blue))) >> >> (define (repaint t col) >> (make-toy col))) >> >> We get the appropriate contract checks on those exports: >> >> > (define-values/invoke-unit/infer simple-factory@) >> > (build-toys 3) >> (#(struct:toy blue) #(struct:toy blue) #(struct:toy blue)) >> > (build-toys #f) >> top-level broke the contract (-> integer? (listof toy?)) >> on build-toys; expected , given: #f >> >> As before, uses of contracted exports inside the unit are >> not checked. >> >> Since units are contract boundaries, they can be blamed >> appropriately. Take the following definitions: >> >> (define-unit factory-user@ >> (import toy-factory^) >> (export) >> (let ([toys (build-toys 3)]) >> (repaint 3 'blue))) >> >> (define-compound-unit/infer factory+user@ >> (import) (export) >> (link simple-factory@ factory-user@)) >> >> When we invoke the combined unit: >> >> > (define-values/invoke-unit/infer factory+user@) >> (unit factory-user@) broke the contract >> (-> toy? symbol? toy?) >> on repaint; expected , given: 3 >> >> Unit Contracts >> -------------- >> >> However, we may not always be able to add contracts to >> signatures. For example, there are many already-existing >> signatures in PLT Scheme that one may want to implement, or a >> programmer may want to take a unit value and add contracts to it >> after the fact. >> >> To do this, there is the unit/c contract combinator. It takes a list >> of imports and exports, where each signature is paired with a list of >> variables and their contracts for each signature. So if we had the >> uncontracted version of the toy-factory^ signature: >> >> (define-signature toy-factory^ >> (build-toys repaint toy? toy-color)) >> >> the following contracts would be appropriate for a unit that imports >> nothing and exports that signature: >> >> (unit/c (import) (export)) >> (unit/c (import) (export toy-factory^)) >> (unit/c >> (import) >> (export (toy-factory^ >> [toy-color (-> toy? symbol?)]))) >> (unit/c >> (import) >> (export (toy-factory^ >> [build-toys (-> integer? (listof toy?))] >> [repaint (-> toy? symbol? toy?)] >> [toy? (-> any/c boolean?)] >> [toy-color (-> toy? symbol?)]))) >> >> Unit contracts can contain a superset of the import signatures and a >> subset of the export signatures for a given unit value. Also, >> variables that are not listed for a given signature are left alone >> when the contracts are being added. >> >> Since the results of applying unit/c is a new unit, then adding >> a contract can cause link inference to fail. For example, if we >> change the definition of simple-factory@ above to >> >> (define/contract simple-factory@ >> (unit/c >> (import) >> (export (toy-factory^ >> [build-toys (-> integer? (listof toy?))] >> [repaint (-> toy? symbol? toy?)] >> [toy? (-> any/c boolean?)] >> [toy-color (-> toy? symbol?)]))) >> (unit >> (import) >> (export toy-factory^) >> >> (define-struct toy (color) #:transparent) >> >> (define (build-toys n) >> (for/list ([i (in-range n)]) >> (make-toy 'blue))) >> >> (define (repaint t col) >> (make-toy col)))) >> >> Then when we try to combine it with the factory-user@ unit, we >> get: >> >> define-compound-unit/infer: not a unit definition >> in: simple-factory@ >> >> One way to solve this is to use define-unit-binding to set up the >> static information for the new contracted value. Another possibility >> for unit definitions is to use define-unit/contract: >> >> (define-unit/contract simple-factory@ >> (import) >> (export (toy-factory^ >> [build-toys (-> integer? (listof toy?))] >> [repaint (-> toy? symbol? toy?)] >> [toy? (-> any/c boolean?)] >> [toy-color (-> toy? symbol?)])) >> >> (define-struct toy (color) #:transparent) >> >> (define (build-toys n) >> (for/list ([i (in-range n)]) >> (make-toy 'blue))) >> >> (define (repaint t col) >> (make-toy col))) >> >> More about these features can be found in the Reference, and a short >> section about signature and unit contracts has been added to the Guide. >> >> Stevie >> _________________________________________________ >> 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-dev > -- sam th samth@ccs.neu.edu From sstrickl at ccs.neu.edu Sun Feb 15 15:02:09 2009 From: sstrickl at ccs.neu.edu (Stevie Strickland) Date: Sun Feb 15 15:03:04 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> Message-ID: On Feb 15, 2009, at 2:24 PM, Matthias Felleisen wrote: > Could we improve the error message for people who attempt to nest > regions > >> #lang scheme >> >> (with-contract f1 >> ((y number?)) >> (with-contract f2 >> ((x boolean?)) >> (define x #t) >> (define y 1))) I know about this error, and it's on my list to figure out what's causing it. I imagine it's something in the expansion. However, one issue here even if I do fix the problem is that you're defining y inside the scope of a with-contract but not exporting it, so your definition should be: (with-contract f1 ((y number?)) (with-contract f2 ((x boolean?)) (define x #t)) (define y 1)) Now, whether (with-contract f1 ((y number?)) (with-contract f2 ((x boolean?) y) (define x #t) (define y 1))) should work is a good question, and I'm not sure. The problem is that by the point of the outer with-contract, you've already converted the definition of y to an inner definition and a rename-transformer bound to the syntax y, and... yeah. It's nice to just require the definition being contracted to appear within the with-contract directly, but I'm not opposed to other ideas about how to handle it. Note that the following *will* work: (with-contract f1 ((y number?)) (define y (begin (with-contract f2 ((x boolean?)) (define x #t)) 1))) If you just want to contract x as you use it in y's definition. It's just the direct with-contract/with-contract nesting that fails, and I expect it's still some detail of the expansion process that I'm forgetting to take into account. It should work though, so I do plan on fixing this, as you might like to do something like the following: (with-contract f1 ((y number?) (z string?)) (begin (with-contract f2 ((x boolean?)) (define x #t)) (define y 1) (define z "world"))) Where the internal, protected version of x is available to multiple to- be-protected definitions. I imagine this is due to some lingering issues in expansion. Matthew helped me out with some before when I was trying to head-expand everything and helped me realize what I wanted to do, but I didn't get all of them before I switched over to getting unit contracts implemented. > or > >> #lang scheme >> >> (define (f x) >> (with-contract >> f1 >> ((y number?)) >> (define y x))) >> >> (f 10) The error you're getting here is coming from the implicit begin from the definition, because with-contract forms are not expressions (since they just define names) and thus the begin still needs one. Your definition of f doesn't have a body, just the (protected) internal definition of y. It's the same error you'd get from something like: (define (f x) (define-unit U@ (import) (export))) where the internal forms have been expanded completely, in case they do end up providing at least one body expression, but it turns out they didn't. So if you do provide a body expression for f's definition: (define (f x) (with-contract f1 ((y number?)) (define y x)) (+ x 3)) (f 10) it works fine. Stevie From sstrickl at ccs.neu.edu Sun Feb 15 17:03:12 2009 From: sstrickl at ccs.neu.edu (Stevie Strickland) Date: Sun Feb 15 17:04:06 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> Message-ID: On Feb 15, 2009, at 3:02 PM, Stevie Strickland wrote: > I know about this error, and it's on my list to figure out what's > causing it. I imagine it's something in the expansion. I've put in a fix that handles splicing-syntax-parameterize specially, and that seems to do the trick. Apparently marking the binding positions of the splicing-syntax-parameterize was causing an issue. If I can distill the problem down to a smaller example, I'll post about it so we can discuss if it's a problem in what I'm doing or a problem in splicing-syntax-parameterize. In any case, examples like (with-contract f1 ((y number?)) (with-contract f2 ((x boolean?)) (define x #t)) (define y 1)) now work as one would expect. Stevie From matthias at ccs.neu.edu Sun Feb 15 18:51:45 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Sun Feb 15 18:52:37 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> Message-ID: <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> I am sorry, but > Welcome to DrScheme, version 4.1.4.3-svn13feb2009 [3m]. > Language: Module; memory limit: 128 megabytes. > . begin (possibly implicit): no expression after a sequence of > internal definitions in: ((define-syntax current-contract-region11 > (convert-renamer (? (stx) (syntax (quote (region f1)))))) (expand- > ssp-body (current-contract-region1) (current-contract-region11) > (with-contract-helper # (quote (region > f1)) ((g number?)) () (define g 10)))) > > is indefensible. On Feb 15, 2009, at 2:57 PM, Sam TH wrote: > Note that you get the same error message if you do this: > >> (define (f x) > (define y x)) > . begin (possibly implicit): no expression after a sequence of > internal definitions in: ((define y x)) > > Do you think `with-contract' should give a special error message here, > or that the error message in general should be improved? > > sam th > > On Sun, Feb 15, 2009 at 2:24 PM, Matthias Felleisen > wrote: >> >> Could we improve the error message for people who attempt to nest >> regions >> >>> #lang scheme >>> >>> (with-contract f1 >>> ((y number?)) >>> (with-contract f2 >>> ((x boolean?)) >>> (define x #t) >>> (define y 1))) >>> >> >> or >> >>> #lang scheme >>> >>> (define (f x) >>> (with-contract >>> f1 >>> ((y number?)) >>> (define y x))) >>> >>> (f 10) >> >> Thanks. -- Matthias >> >> >> >> On Feb 14, 2009, at 11:24 PM, Stevie Strickland wrote: >> >>> In SVN I've added three new major features that involve contracts. >>> One allows for more fine-grained control of contracts, and the other >>> two allow for the use of contracts with signatures and units. >>> >>> Contract Regions >>> ---------------- >>> >>> Contract regions allow the programmer to protect a region of code >>> with a contract boundary. In addition to the wrapped code, the >>> programmer also provides a name for the region which is used in >>> blame situations and a list of exported variables which can >>> either be protected with contracts or unprotected. The region >>> provides a true contract boundary, in that uses of contracted >>> exports within the region are unprotected. Contract regions are >>> specified with the with-contract form. The following contract >>> region defines two mutually recursive functions: >>> >>> (with-contract region1 >>> ([f (-> number? boolean?)] >>> [g (-> number? boolean?)]) >>> (define (f n) (if (zero? n) #f (g (sub1 n)))) >>> (define (g n) (if (zero? n) #t (f (sub1 n))))) >>> >>> The internal calls to f and g are uncontracted, but calls to f >>> and g outside this region would be appropriately contracted. >>> First-order checks are performed at the region, so the >>> following region: >>> >>> (with-contract region2 >>> ([n number?]) >>> (define n #t)) >>> >>> results in the following error: >>> >>> (region region2) broke the contract number? on n; >>> expected , given: #t >>> >>> Notice that the blame not only gives the name of the region, but >>> describes what type of contract boundary was involved. >>> >>> For contracting a single definition, there is the define/contract >>> form which has a similar syntax to define, except that it takes a >>> contract before the body of the definition. To compare the two >>> forms, the following two definitions are equivalent: >>> >>> (with-contract fact >>> ([fact (-> number? number?)]) >>> (define (fact n) >>> (if (zero? n) 1 (* n (fact (sub1 n)))))) >>> >>> (define/contract (fact n) >>> (-> number? number?) >>> (if (zero? n) 1 (* n (fact (sub1 n))))) >>> >>> First order checks are similarly performed at the definition for >>> define/contract, so >>> >>> (define/contract (fact n) >>> (-> number?) >>> (if (zero? n) 1 (* n (fact (sub1 n))))) >>> >>> results in >>> >>> (function fact) broke the contract (-> number?) on fact; >>> expected a procedure that accepts no arguments without >>> any keywords, given: # >>> >>> Signature Contracts >>> ------------------- >>> >>> In addition to contract regions, units are also now contract >>> boundaries. One way to use contracts with units is to add >>> contracts to unit signatures via the contracted signature form. >>> >>> (define-signature toy-factory^ >>> ((contracted >>> [build-toys (-> integer? (listof toy?))] >>> [repaint (-> toy? symbol? toy?)] >>> [toy? (-> any/c boolean?)] >>> [toy-color (-> toy? symbol?)]))) >>> >>> Notice that contracts in a signature can use variables listed >>> in the signature. >>> >>> Now if we take the following implementation of that signature: >>> >>> (define-unit simple-factory@ >>> (import) >>> (export toy-factory^) >>> >>> (define-struct toy (color) #:transparent) >>> >>> (define (build-toys n) >>> (for/list ([i (in-range n)]) >>> (make-toy 'blue))) >>> >>> (define (repaint t col) >>> (make-toy col))) >>> >>> We get the appropriate contract checks on those exports: >>> >>>> (define-values/invoke-unit/infer simple-factory@) >>>> (build-toys 3) >>> (#(struct:toy blue) #(struct:toy blue) #(struct:toy blue)) >>>> (build-toys #f) >>> top-level broke the contract (-> integer? (listof toy?)) >>> on build-toys; expected , given: #f >>> >>> As before, uses of contracted exports inside the unit are >>> not checked. >>> >>> Since units are contract boundaries, they can be blamed >>> appropriately. Take the following definitions: >>> >>> (define-unit factory-user@ >>> (import toy-factory^) >>> (export) >>> (let ([toys (build-toys 3)]) >>> (repaint 3 'blue))) >>> >>> (define-compound-unit/infer factory+user@ >>> (import) (export) >>> (link simple-factory@ factory-user@)) >>> >>> When we invoke the combined unit: >>> >>>> (define-values/invoke-unit/infer factory+user@) >>> (unit factory-user@) broke the contract >>> (-> toy? symbol? toy?) >>> on repaint; expected , given: 3 >>> >>> Unit Contracts >>> -------------- >>> >>> However, we may not always be able to add contracts to >>> signatures. For example, there are many already-existing >>> signatures in PLT Scheme that one may want to implement, or a >>> programmer may want to take a unit value and add contracts to it >>> after the fact. >>> >>> To do this, there is the unit/c contract combinator. It takes a >>> list >>> of imports and exports, where each signature is paired with a >>> list of >>> variables and their contracts for each signature. So if we had the >>> uncontracted version of the toy-factory^ signature: >>> >>> (define-signature toy-factory^ >>> (build-toys repaint toy? toy-color)) >>> >>> the following contracts would be appropriate for a unit that imports >>> nothing and exports that signature: >>> >>> (unit/c (import) (export)) >>> (unit/c (import) (export toy-factory^)) >>> (unit/c >>> (import) >>> (export (toy-factory^ >>> [toy-color (-> toy? symbol?)]))) >>> (unit/c >>> (import) >>> (export (toy-factory^ >>> [build-toys (-> integer? (listof toy?))] >>> [repaint (-> toy? symbol? toy?)] >>> [toy? (-> any/c boolean?)] >>> [toy-color (-> toy? symbol?)]))) >>> >>> Unit contracts can contain a superset of the import signatures and a >>> subset of the export signatures for a given unit value. Also, >>> variables that are not listed for a given signature are left alone >>> when the contracts are being added. >>> >>> Since the results of applying unit/c is a new unit, then adding >>> a contract can cause link inference to fail. For example, if we >>> change the definition of simple-factory@ above to >>> >>> (define/contract simple-factory@ >>> (unit/c >>> (import) >>> (export (toy-factory^ >>> [build-toys (-> integer? (listof toy?))] >>> [repaint (-> toy? symbol? toy?)] >>> [toy? (-> any/c boolean?)] >>> [toy-color (-> toy? symbol?)]))) >>> (unit >>> (import) >>> (export toy-factory^) >>> >>> (define-struct toy (color) #:transparent) >>> >>> (define (build-toys n) >>> (for/list ([i (in-range n)]) >>> (make-toy 'blue))) >>> >>> (define (repaint t col) >>> (make-toy col)))) >>> >>> Then when we try to combine it with the factory-user@ unit, we >>> get: >>> >>> define-compound-unit/infer: not a unit definition >>> in: simple-factory@ >>> >>> One way to solve this is to use define-unit-binding to set up the >>> static information for the new contracted value. Another >>> possibility >>> for unit definitions is to use define-unit/contract: >>> >>> (define-unit/contract simple-factory@ >>> (import) >>> (export (toy-factory^ >>> [build-toys (-> integer? (listof toy?))] >>> [repaint (-> toy? symbol? toy?)] >>> [toy? (-> any/c boolean?)] >>> [toy-color (-> toy? symbol?)])) >>> >>> (define-struct toy (color) #:transparent) >>> >>> (define (build-toys n) >>> (for/list ([i (in-range n)]) >>> (make-toy 'blue))) >>> >>> (define (repaint t col) >>> (make-toy col))) >>> >>> More about these features can be found in the Reference, and a short >>> section about signature and unit contracts has been added to the >>> Guide. >>> >>> Stevie >>> _________________________________________________ >>> 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-dev >> > > > > -- > sam th > samth@ccs.neu.edu From samth at ccs.neu.edu Sun Feb 15 18:59:14 2009 From: samth at ccs.neu.edu (Sam TH) Date: Sun Feb 15 18:59:36 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> Message-ID: <63bb19ae0902151559m18563e4dge0bb29371def40e7@mail.gmail.com> I agree, but do you think that `lambda' should provide a better error message for all the cases here, or that `with-contract' should handle this case specially? Or are you just objecting to the semi-expanded code in the output there? sam th On Sun, Feb 15, 2009 at 6:51 PM, Matthias Felleisen wrote: > > I am sorry, but > >> Welcome to DrScheme, version 4.1.4.3-svn13feb2009 [3m]. >> Language: Module; memory limit: 128 megabytes. >> . begin (possibly implicit): no expression after a sequence of internal >> definitions in: ((define-syntax current-contract-region11 (convert-renamer >> (? (stx) (syntax (quote (region f1)))))) (expand-ssp-body >> (current-contract-region1) (current-contract-region11) (with-contract-helper >> # (quote (region f1)) ((g number?)) () (define >> g 10)))) >> > > > is indefensible. > > > On Feb 15, 2009, at 2:57 PM, Sam TH wrote: > >> Note that you get the same error message if you do this: >> >>> (define (f x) >> >> (define y x)) >> . begin (possibly implicit): no expression after a sequence of >> internal definitions in: ((define y x)) >> >> Do you think `with-contract' should give a special error message here, >> or that the error message in general should be improved? >> >> sam th >> >> On Sun, Feb 15, 2009 at 2:24 PM, Matthias Felleisen >> wrote: >>> >>> Could we improve the error message for people who attempt to nest regions >>> >>>> #lang scheme >>>> >>>> (with-contract f1 >>>> ((y number?)) >>>> (with-contract f2 >>>> ((x boolean?)) >>>> (define x #t) >>>> (define y 1))) >>>> >>> >>> or >>> >>>> #lang scheme >>>> >>>> (define (f x) >>>> (with-contract >>>> f1 >>>> ((y number?)) >>>> (define y x))) >>>> >>>> (f 10) >>> >>> Thanks. -- Matthias >>> >>> >>> >>> On Feb 14, 2009, at 11:24 PM, Stevie Strickland wrote: >>> >>>> In SVN I've added three new major features that involve contracts. >>>> One allows for more fine-grained control of contracts, and the other >>>> two allow for the use of contracts with signatures and units. >>>> >>>> Contract Regions >>>> ---------------- >>>> >>>> Contract regions allow the programmer to protect a region of code >>>> with a contract boundary. In addition to the wrapped code, the >>>> programmer also provides a name for the region which is used in >>>> blame situations and a list of exported variables which can >>>> either be protected with contracts or unprotected. The region >>>> provides a true contract boundary, in that uses of contracted >>>> exports within the region are unprotected. Contract regions are >>>> specified with the with-contract form. The following contract >>>> region defines two mutually recursive functions: >>>> >>>> (with-contract region1 >>>> ([f (-> number? boolean?)] >>>> [g (-> number? boolean?)]) >>>> (define (f n) (if (zero? n) #f (g (sub1 n)))) >>>> (define (g n) (if (zero? n) #t (f (sub1 n))))) >>>> >>>> The internal calls to f and g are uncontracted, but calls to f >>>> and g outside this region would be appropriately contracted. >>>> First-order checks are performed at the region, so the >>>> following region: >>>> >>>> (with-contract region2 >>>> ([n number?]) >>>> (define n #t)) >>>> >>>> results in the following error: >>>> >>>> (region region2) broke the contract number? on n; >>>> expected , given: #t >>>> >>>> Notice that the blame not only gives the name of the region, but >>>> describes what type of contract boundary was involved. >>>> >>>> For contracting a single definition, there is the define/contract >>>> form which has a similar syntax to define, except that it takes a >>>> contract before the body of the definition. To compare the two >>>> forms, the following two definitions are equivalent: >>>> >>>> (with-contract fact >>>> ([fact (-> number? number?)]) >>>> (define (fact n) >>>> (if (zero? n) 1 (* n (fact (sub1 n)))))) >>>> >>>> (define/contract (fact n) >>>> (-> number? number?) >>>> (if (zero? n) 1 (* n (fact (sub1 n))))) >>>> >>>> First order checks are similarly performed at the definition for >>>> define/contract, so >>>> >>>> (define/contract (fact n) >>>> (-> number?) >>>> (if (zero? n) 1 (* n (fact (sub1 n))))) >>>> >>>> results in >>>> >>>> (function fact) broke the contract (-> number?) on fact; >>>> expected a procedure that accepts no arguments without >>>> any keywords, given: # >>>> >>>> Signature Contracts >>>> ------------------- >>>> >>>> In addition to contract regions, units are also now contract >>>> boundaries. One way to use contracts with units is to add >>>> contracts to unit signatures via the contracted signature form. >>>> >>>> (define-signature toy-factory^ >>>> ((contracted >>>> [build-toys (-> integer? (listof toy?))] >>>> [repaint (-> toy? symbol? toy?)] >>>> [toy? (-> any/c boolean?)] >>>> [toy-color (-> toy? symbol?)]))) >>>> >>>> Notice that contracts in a signature can use variables listed >>>> in the signature. >>>> >>>> Now if we take the following implementation of that signature: >>>> >>>> (define-unit simple-factory@ >>>> (import) >>>> (export toy-factory^) >>>> >>>> (define-struct toy (color) #:transparent) >>>> >>>> (define (build-toys n) >>>> (for/list ([i (in-range n)]) >>>> (make-toy 'blue))) >>>> >>>> (define (repaint t col) >>>> (make-toy col))) >>>> >>>> We get the appropriate contract checks on those exports: >>>> >>>>> (define-values/invoke-unit/infer simple-factory@) >>>>> (build-toys 3) >>>> >>>> (#(struct:toy blue) #(struct:toy blue) #(struct:toy blue)) >>>>> >>>>> (build-toys #f) >>>> >>>> top-level broke the contract (-> integer? (listof toy?)) >>>> on build-toys; expected , given: #f >>>> >>>> As before, uses of contracted exports inside the unit are >>>> not checked. >>>> >>>> Since units are contract boundaries, they can be blamed >>>> appropriately. Take the following definitions: >>>> >>>> (define-unit factory-user@ >>>> (import toy-factory^) >>>> (export) >>>> (let ([toys (build-toys 3)]) >>>> (repaint 3 'blue))) >>>> >>>> (define-compound-unit/infer factory+user@ >>>> (import) (export) >>>> (link simple-factory@ factory-user@)) >>>> >>>> When we invoke the combined unit: >>>> >>>>> (define-values/invoke-unit/infer factory+user@) >>>> >>>> (unit factory-user@) broke the contract >>>> (-> toy? symbol? toy?) >>>> on repaint; expected , given: 3 >>>> >>>> Unit Contracts >>>> -------------- >>>> >>>> However, we may not always be able to add contracts to >>>> signatures. For example, there are many already-existing >>>> signatures in PLT Scheme that one may want to implement, or a >>>> programmer may want to take a unit value and add contracts to it >>>> after the fact. >>>> >>>> To do this, there is the unit/c contract combinator. It takes a list >>>> of imports and exports, where each signature is paired with a list of >>>> variables and their contracts for each signature. So if we had the >>>> uncontracted version of the toy-factory^ signature: >>>> >>>> (define-signature toy-factory^ >>>> (build-toys repaint toy? toy-color)) >>>> >>>> the following contracts would be appropriate for a unit that imports >>>> nothing and exports that signature: >>>> >>>> (unit/c (import) (export)) >>>> (unit/c (import) (export toy-factory^)) >>>> (unit/c >>>> (import) >>>> (export (toy-factory^ >>>> [toy-color (-> toy? symbol?)]))) >>>> (unit/c >>>> (import) >>>> (export (toy-factory^ >>>> [build-toys (-> integer? (listof toy?))] >>>> [repaint (-> toy? symbol? toy?)] >>>> [toy? (-> any/c boolean?)] >>>> [toy-color (-> toy? symbol?)]))) >>>> >>>> Unit contracts can contain a superset of the import signatures and a >>>> subset of the export signatures for a given unit value. Also, >>>> variables that are not listed for a given signature are left alone >>>> when the contracts are being added. >>>> >>>> Since the results of applying unit/c is a new unit, then adding >>>> a contract can cause link inference to fail. For example, if we >>>> change the definition of simple-factory@ above to >>>> >>>> (define/contract simple-factory@ >>>> (unit/c >>>> (import) >>>> (export (toy-factory^ >>>> [build-toys (-> integer? (listof toy?))] >>>> [repaint (-> toy? symbol? toy?)] >>>> [toy? (-> any/c boolean?)] >>>> [toy-color (-> toy? symbol?)]))) >>>> (unit >>>> (import) >>>> (export toy-factory^) >>>> >>>> (define-struct toy (color) #:transparent) >>>> >>>> (define (build-toys n) >>>> (for/list ([i (in-range n)]) >>>> (make-toy 'blue))) >>>> >>>> (define (repaint t col) >>>> (make-toy col)))) >>>> >>>> Then when we try to combine it with the factory-user@ unit, we >>>> get: >>>> >>>> define-compound-unit/infer: not a unit definition >>>> in: simple-factory@ >>>> >>>> One way to solve this is to use define-unit-binding to set up the >>>> static information for the new contracted value. Another possibility >>>> for unit definitions is to use define-unit/contract: >>>> >>>> (define-unit/contract simple-factory@ >>>> (import) >>>> (export (toy-factory^ >>>> [build-toys (-> integer? (listof toy?))] >>>> [repaint (-> toy? symbol? toy?)] >>>> [toy? (-> any/c boolean?)] >>>> [toy-color (-> toy? symbol?)])) >>>> >>>> (define-struct toy (color) #:transparent) >>>> >>>> (define (build-toys n) >>>> (for/list ([i (in-range n)]) >>>> (make-toy 'blue))) >>>> >>>> (define (repaint t col) >>>> (make-toy col))) >>>> >>>> More about these features can be found in the Reference, and a short >>>> section about signature and unit contracts has been added to the Guide. >>>> >>>> Stevie >>>> _________________________________________________ >>>> 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-dev >>> >> >> >> >> -- >> sam th >> samth@ccs.neu.edu > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > -- sam th samth@ccs.neu.edu From sstrickl at ccs.neu.edu Sun Feb 15 19:04:02 2009 From: sstrickl at ccs.neu.edu (Stevie Strickland) Date: Sun Feb 15 19:04:56 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> Message-ID: <3E3DA036-0704-4C53-BE33-634C070E9968@ccs.neu.edu> On Feb 15, 2009, at 6:51 PM, Matthias Felleisen wrote: > I am sorry, but > >> Welcome to DrScheme, version 4.1.4.3-svn13feb2009 [3m]. >> Language: Module; memory limit: 128 megabytes. >> . begin (possibly implicit): no expression after a sequence of >> internal definitions in: ((define-syntax current-contract-region11 >> (convert-renamer (? (stx) (syntax (quote (region f1)))))) (expand- >> ssp-body (current-contract-region1) (current-contract-region11) >> (with-contract-helper # (quote (region >> f1)) ((g number?)) () (define g 10)))) >> > > > is indefensible. What special error message *could* with-contract give? You used it in an internal definition context -- it doesn't know what follows it in that context to determine whether you eventually gave an expression to the outer (implicit) begin. As I said earlier with a different example, this is the same as (define (f x) (define-struct foo (x y))) which gives begin (possibly implicit): no expression after a sequence of internal definitions in: ((define-values (struct:foo make-foo foo? foo- x foo-y) (let-values (((struct: make- ? -ref -set!) (syntax- parameterize ((struct-field-index (lambda (stx) (syntax-case stx (x y) ((_ x) (syntax 0)) ((_ y) (syntax 1)) ((_ name) (raise-syntax-error #f "no such field" stx (syntax name))))))) (make-struct-type (quote foo) #f 2 0 #f null (current-inspector) #f (quote (0 1)) #f)))) (values struct: make- ? (make-struct-field-accessor -ref 0 (quote x)) (make- struct-field-accessor -ref 1 (quote y))))) (define-syntaxes (foo) (make-checked-struct-info (lambda () (list (quote-syntax struct:foo) (quote-syntax make-foo) (quote-syntax foo?) (list (quote-syntax foo-y) (quote-syntax foo-x)) (list #f #f) #t))))) So is the main point that the begin should keep around the original unexpanded code just for the case of reporting a "no expression after..." error? If so, then _begin_ needs to be changed. Stevie From matthias at ccs.neu.edu Sun Feb 15 19:21:32 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Sun Feb 15 19:22:23 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <63bb19ae0902151559m18563e4dge0bb29371def40e7@mail.gmail.com> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> <63bb19ae0902151559m18563e4dge0bb29371def40e7@mail.gmail.com> Message-ID: <3C7B4F81-2A8B-4C70-9CE0-21C72BBE2A5B@ccs.neu.edu> The semi-expanded code should probably be replaced with the real thing (if possible) It might help -- Matthias On Feb 15, 2009, at 6:59 PM, Sam TH wrote: > I agree, but do you think that `lambda' should provide a better error > message for all the cases here, or that `with-contract' should handle > this case specially? Or are you just objecting to the semi-expanded > code in the output there? > > sam th > > On Sun, Feb 15, 2009 at 6:51 PM, Matthias Felleisen > wrote: >> >> I am sorry, but >> >>> Welcome to DrScheme, version 4.1.4.3-svn13feb2009 [3m]. >>> Language: Module; memory limit: 128 megabytes. >>> . begin (possibly implicit): no expression after a sequence of >>> internal >>> definitions in: ((define-syntax current-contract-region11 >>> (convert-renamer >>> (? (stx) (syntax (quote (region f1)))))) (expand-ssp-body >>> (current-contract-region1) (current-contract-region11) (with- >>> contract-helper >>> # (quote (region f1)) ((g number?)) >>> () (define >>> g 10)))) >>>> >> >> is indefensible. >> >> >> On Feb 15, 2009, at 2:57 PM, Sam TH wrote: >> >>> Note that you get the same error message if you do this: >>> >>>> (define (f x) >>> >>> (define y x)) >>> . begin (possibly implicit): no expression after a sequence of >>> internal definitions in: ((define y x)) >>> >>> Do you think `with-contract' should give a special error message >>> here, >>> or that the error message in general should be improved? >>> >>> sam th >>> >>> On Sun, Feb 15, 2009 at 2:24 PM, Matthias Felleisen >>> wrote: >>>> >>>> Could we improve the error message for people who attempt to >>>> nest regions >>>> >>>>> #lang scheme >>>>> >>>>> (with-contract f1 >>>>> ((y number?)) >>>>> (with-contract f2 >>>>> ((x boolean?)) >>>>> (define x #t) >>>>> (define y 1))) >>>>> >>>> >>>> or >>>> >>>>> #lang scheme >>>>> >>>>> (define (f x) >>>>> (with-contract >>>>> f1 >>>>> ((y number?)) >>>>> (define y x))) >>>>> >>>>> (f 10) >>>> >>>> Thanks. -- Matthias >>>> >>>> >>>> >>>> On Feb 14, 2009, at 11:24 PM, Stevie Strickland wrote: >>>> >>>>> In SVN I've added three new major features that involve contracts. >>>>> One allows for more fine-grained control of contracts, and the >>>>> other >>>>> two allow for the use of contracts with signatures and units. >>>>> >>>>> Contract Regions >>>>> ---------------- >>>>> >>>>> Contract regions allow the programmer to protect a region of code >>>>> with a contract boundary. In addition to the wrapped code, the >>>>> programmer also provides a name for the region which is used in >>>>> blame situations and a list of exported variables which can >>>>> either be protected with contracts or unprotected. The region >>>>> provides a true contract boundary, in that uses of contracted >>>>> exports within the region are unprotected. Contract regions are >>>>> specified with the with-contract form. The following contract >>>>> region defines two mutually recursive functions: >>>>> >>>>> (with-contract region1 >>>>> ([f (-> number? boolean?)] >>>>> [g (-> number? boolean?)]) >>>>> (define (f n) (if (zero? n) #f (g (sub1 n)))) >>>>> (define (g n) (if (zero? n) #t (f (sub1 n))))) >>>>> >>>>> The internal calls to f and g are uncontracted, but calls to f >>>>> and g outside this region would be appropriately contracted. >>>>> First-order checks are performed at the region, so the >>>>> following region: >>>>> >>>>> (with-contract region2 >>>>> ([n number?]) >>>>> (define n #t)) >>>>> >>>>> results in the following error: >>>>> >>>>> (region region2) broke the contract number? on n; >>>>> expected , given: #t >>>>> >>>>> Notice that the blame not only gives the name of the region, but >>>>> describes what type of contract boundary was involved. >>>>> >>>>> For contracting a single definition, there is the define/contract >>>>> form which has a similar syntax to define, except that it takes a >>>>> contract before the body of the definition. To compare the two >>>>> forms, the following two definitions are equivalent: >>>>> >>>>> (with-contract fact >>>>> ([fact (-> number? number?)]) >>>>> (define (fact n) >>>>> (if (zero? n) 1 (* n (fact (sub1 n)))))) >>>>> >>>>> (define/contract (fact n) >>>>> (-> number? number?) >>>>> (if (zero? n) 1 (* n (fact (sub1 n))))) >>>>> >>>>> First order checks are similarly performed at the definition for >>>>> define/contract, so >>>>> >>>>> (define/contract (fact n) >>>>> (-> number?) >>>>> (if (zero? n) 1 (* n (fact (sub1 n))))) >>>>> >>>>> results in >>>>> >>>>> (function fact) broke the contract (-> number?) on fact; >>>>> expected a procedure that accepts no arguments without >>>>> any keywords, given: # >>>>> >>>>> Signature Contracts >>>>> ------------------- >>>>> >>>>> In addition to contract regions, units are also now contract >>>>> boundaries. One way to use contracts with units is to add >>>>> contracts to unit signatures via the contracted signature form. >>>>> >>>>> (define-signature toy-factory^ >>>>> ((contracted >>>>> [build-toys (-> integer? (listof toy?))] >>>>> [repaint (-> toy? symbol? toy?)] >>>>> [toy? (-> any/c boolean?)] >>>>> [toy-color (-> toy? symbol?)]))) >>>>> >>>>> Notice that contracts in a signature can use variables listed >>>>> in the signature. >>>>> >>>>> Now if we take the following implementation of that signature: >>>>> >>>>> (define-unit simple-factory@ >>>>> (import) >>>>> (export toy-factory^) >>>>> >>>>> (define-struct toy (color) #:transparent) >>>>> >>>>> (define (build-toys n) >>>>> (for/list ([i (in-range n)]) >>>>> (make-toy 'blue))) >>>>> >>>>> (define (repaint t col) >>>>> (make-toy col))) >>>>> >>>>> We get the appropriate contract checks on those exports: >>>>> >>>>>> (define-values/invoke-unit/infer simple-factory@) >>>>>> (build-toys 3) >>>>> >>>>> (#(struct:toy blue) #(struct:toy blue) #(struct:toy blue)) >>>>>> >>>>>> (build-toys #f) >>>>> >>>>> top-level broke the contract (-> integer? (listof toy?)) >>>>> on build-toys; expected , given: #f >>>>> >>>>> As before, uses of contracted exports inside the unit are >>>>> not checked. >>>>> >>>>> Since units are contract boundaries, they can be blamed >>>>> appropriately. Take the following definitions: >>>>> >>>>> (define-unit factory-user@ >>>>> (import toy-factory^) >>>>> (export) >>>>> (let ([toys (build-toys 3)]) >>>>> (repaint 3 'blue))) >>>>> >>>>> (define-compound-unit/infer factory+user@ >>>>> (import) (export) >>>>> (link simple-factory@ factory-user@)) >>>>> >>>>> When we invoke the combined unit: >>>>> >>>>>> (define-values/invoke-unit/infer factory+user@) >>>>> >>>>> (unit factory-user@) broke the contract >>>>> (-> toy? symbol? toy?) >>>>> on repaint; expected , given: 3 >>>>> >>>>> Unit Contracts >>>>> -------------- >>>>> >>>>> However, we may not always be able to add contracts to >>>>> signatures. For example, there are many already-existing >>>>> signatures in PLT Scheme that one may want to implement, or a >>>>> programmer may want to take a unit value and add contracts to it >>>>> after the fact. >>>>> >>>>> To do this, there is the unit/c contract combinator. It takes >>>>> a list >>>>> of imports and exports, where each signature is paired with a >>>>> list of >>>>> variables and their contracts for each signature. So if we had >>>>> the >>>>> uncontracted version of the toy-factory^ signature: >>>>> >>>>> (define-signature toy-factory^ >>>>> (build-toys repaint toy? toy-color)) >>>>> >>>>> the following contracts would be appropriate for a unit that >>>>> imports >>>>> nothing and exports that signature: >>>>> >>>>> (unit/c (import) (export)) >>>>> (unit/c (import) (export toy-factory^)) >>>>> (unit/c >>>>> (import) >>>>> (export (toy-factory^ >>>>> [toy-color (-> toy? symbol?)]))) >>>>> (unit/c >>>>> (import) >>>>> (export (toy-factory^ >>>>> [build-toys (-> integer? (listof toy?))] >>>>> [repaint (-> toy? symbol? toy?)] >>>>> [toy? (-> any/c boolean?)] >>>>> [toy-color (-> toy? symbol?)]))) >>>>> >>>>> Unit contracts can contain a superset of the import signatures >>>>> and a >>>>> subset of the export signatures for a given unit value. Also, >>>>> variables that are not listed for a given signature are left alone >>>>> when the contracts are being added. >>>>> >>>>> Since the results of applying unit/c is a new unit, then adding >>>>> a contract can cause link inference to fail. For example, if we >>>>> change the definition of simple-factory@ above to >>>>> >>>>> (define/contract simple-factory@ >>>>> (unit/c >>>>> (import) >>>>> (export (toy-factory^ >>>>> [build-toys (-> integer? (listof toy?))] >>>>> [repaint (-> toy? symbol? toy?)] >>>>> [toy? (-> any/c boolean?)] >>>>> [toy-color (-> toy? symbol?)]))) >>>>> (unit >>>>> (import) >>>>> (export toy-factory^) >>>>> >>>>> (define-struct toy (color) #:transparent) >>>>> >>>>> (define (build-toys n) >>>>> (for/list ([i (in-range n)]) >>>>> (make-toy 'blue))) >>>>> >>>>> (define (repaint t col) >>>>> (make-toy col)))) >>>>> >>>>> Then when we try to combine it with the factory-user@ unit, we >>>>> get: >>>>> >>>>> define-compound-unit/infer: not a unit definition >>>>> in: simple-factory@ >>>>> >>>>> One way to solve this is to use define-unit-binding to set up the >>>>> static information for the new contracted value. Another >>>>> possibility >>>>> for unit definitions is to use define-unit/contract: >>>>> >>>>> (define-unit/contract simple-factory@ >>>>> (import) >>>>> (export (toy-factory^ >>>>> [build-toys (-> integer? (listof toy?))] >>>>> [repaint (-> toy? symbol? toy?)] >>>>> [toy? (-> any/c boolean?)] >>>>> [toy-color (-> toy? symbol?)])) >>>>> >>>>> (define-struct toy (color) #:transparent) >>>>> >>>>> (define (build-toys n) >>>>> (for/list ([i (in-range n)]) >>>>> (make-toy 'blue))) >>>>> >>>>> (define (repaint t col) >>>>> (make-toy col))) >>>>> >>>>> More about these features can be found in the Reference, and a >>>>> short >>>>> section about signature and unit contracts has been added to >>>>> the Guide. >>>>> >>>>> Stevie >>>>> _________________________________________________ >>>>> 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-dev >>>> >>> >>> >>> >>> -- >>> sam th >>> samth@ccs.neu.edu >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> > > > > -- > sam th > samth@ccs.neu.edu From sstrickl at ccs.neu.edu Sun Feb 15 22:51:33 2009 From: sstrickl at ccs.neu.edu (Stevie Strickland) Date: Sun Feb 15 22:52:26 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> Message-ID: <0DDF5A47-6385-4175-BEFA-79C95B4DFF35@ccs.neu.edu> On Feb 15, 2009, at 6:51 PM, Matthias Felleisen wrote: > I am sorry, but > >> Welcome to DrScheme, version 4.1.4.3-svn13feb2009 [3m]. >> Language: Module; memory limit: 128 megabytes. >> . begin (possibly implicit): no expression after a sequence of >> internal definitions in: ((define-syntax current-contract-region11 >> (convert-renamer (? (stx) (syntax (quote (region f1)))))) (expand- >> ssp-body (current-contract-region1) (current-contract-region11) >> (with-contract-helper # (quote (region >> f1)) ((g number?)) () (define g 10)))) >> > > > is indefensible. Well, with the following patch, for: (define (f x) (with-contract f1 ((y number?)) (define y x))) I get: begin (possibly implicit): no expression after a sequence of internal definitions in: ((with-contract f1 ((y number?)) (define y x))) However, I don't know the C internals well enough to know whether this patch is good as-is or if there'd be any strange effects in having just a straight alias like this and there's some bookkeeping that'd need to be managed. It's just something I tried to see if this is where such a change would need to be made. Stevie Index: src/mzscheme/src/eval.c =================================================================== --- src/mzscheme/src/eval.c (revision 13652) +++ src/mzscheme/src/eval.c (working copy) @@ -6313,7 +6313,7 @@ It is espcailly ugly because we have to expand macros before deciding what we have. */ { - Scheme_Object *first, *rib, *ctx, *ectx; + Scheme_Object *first, *rib, *ctx, *ectx, *orig = forms; Scheme_Comp_Env *xenv = NULL; Scheme_Compile_Info recs[2]; DupCheckRecord r; @@ -6595,7 +6595,7 @@ more = 0; } else { /* Empty body: illegal. */ - scheme_wrong_syntax(scheme_begin_stx_string, NULL, forms, + scheme_wrong_syntax(scheme_begin_stx_string, NULL, orig, "no expression after a sequence of internal definitions"); } } From matthias at ccs.neu.edu Sun Feb 15 23:03:47 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Sun Feb 15 23:04:33 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <0DDF5A47-6385-4175-BEFA-79C95B4DFF35@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> <0DDF5A47-6385-4175-BEFA-79C95B4DFF35@ccs.neu.edu> Message-ID: <1FD3B261-D04D-4076-9E99-4A78F950425F@ccs.neu.edu> Thanks. That's progress! -- Matthias On Feb 15, 2009, at 10:51 PM, Stevie Strickland wrote: > On Feb 15, 2009, at 6:51 PM, Matthias Felleisen wrote: >> I am sorry, but >> >>> Welcome to DrScheme, version 4.1.4.3-svn13feb2009 [3m]. >>> Language: Module; memory limit: 128 megabytes. >>> . begin (possibly implicit): no expression after a sequence of >>> internal definitions in: ((define-syntax current-contract- >>> region11 (convert-renamer (? (stx) (syntax (quote (region >>> f1)))))) (expand-ssp-body (current-contract-region1) (current- >>> contract-region11) (with-contract-helper #>> introducer> (quote (region f1)) ((g number?)) () (define g 10)))) >>> > >> >> is indefensible. > > Well, with the following patch, for: > > (define (f x) > (with-contract f1 > ((y number?)) > (define y x))) > > I get: > > begin (possibly implicit): no expression after a sequence of > internal definitions in: ((with-contract f1 ((y number?)) (define y > x))) > > However, I don't know the C internals well enough to know whether > this patch is good as-is or if there'd be any strange effects in > having just a straight alias like this and there's some bookkeeping > that'd need to be managed. It's just something I tried to see if > this is where such a change would need to be made. > > Stevie > > Index: src/mzscheme/src/eval.c > =================================================================== > --- src/mzscheme/src/eval.c (revision 13652) > +++ src/mzscheme/src/eval.c (working copy) > @@ -6313,7 +6313,7 @@ > It is espcailly ugly because we have to expand macros > before deciding what we have. */ > { > - Scheme_Object *first, *rib, *ctx, *ectx; > + Scheme_Object *first, *rib, *ctx, *ectx, *orig = forms; > Scheme_Comp_Env *xenv = NULL; > Scheme_Compile_Info recs[2]; > DupCheckRecord r; > @@ -6595,7 +6595,7 @@ > more = 0; > } else { > /* Empty body: illegal. */ > - scheme_wrong_syntax(scheme_begin_stx_string, NULL, forms, > + scheme_wrong_syntax(scheme_begin_stx_string, NULL, orig, > "no expression after a sequence of internal definitions"); > } > } From mflatt at cs.utah.edu Mon Feb 16 11:45:34 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Mon Feb 16 11:45:54 2009 Subject: [plt-dev] Re: [plt-scheme] New contract-related features In-Reply-To: <0DDF5A47-6385-4175-BEFA-79C95B4DFF35@ccs.neu.edu> References: <06EEF9E3-FE3D-4CBE-93F4-5A4FDCC33F20@ccs.neu.edu> <56CA7C26-AC40-4B77-97F0-B5BE3A38E9EE@ccs.neu.edu> <63bb19ae0902151157i2fc156edlde775a8c022205dd@mail.gmail.com> <59100FDE-BC13-4E23-94E0-C050E5C0F9AF@ccs.neu.edu> <0DDF5A47-6385-4175-BEFA-79C95B4DFF35@ccs.neu.edu> Message-ID: <20090216164535.C6B836500B2@mail-svr1.cs.utah.edu> At Sun, 15 Feb 2009 22:51:33 -0500, Stevie Strickland wrote: > On Feb 15, 2009, at 6:51 PM, Matthias Felleisen wrote: > > I am sorry, but > > > >> Welcome to DrScheme, version 4.1.4.3-svn13feb2009 [3m]. > >> Language: Module; memory limit: 128 megabytes. > >> . begin (possibly implicit): no expression after a sequence of > >> internal definitions in: ((define-syntax current-contract-region11 > >> (convert-renamer (? (stx) (syntax (quote (region f1)))))) (expand- > >> ssp-body (current-contract-region1) (current-contract-region11) > >> (with-contract-helper # (quote (region > >> f1)) ((g number?)) () (define g 10)))) > >> > > > > > is indefensible. > > Well, with the following patch, for: > > (define (f x) > (with-contract f1 > ((y number?)) > (define y x))) > > I get: > > begin (possibly implicit): no expression after a sequence of > internal definitions in: ((with-contract f1 ((y number?)) (define y x))) Patch committed. From samth at ccs.neu.edu Wed Feb 18 09:09:44 2009 From: samth at ccs.neu.edu (Sam TH) Date: Wed Feb 18 09:10:04 2009 Subject: [plt-dev] Re: [plt-scheme] Searching on docs.plt-scheme disabled? In-Reply-To: References: Message-ID: <63bb19ae0902180609w7668a991ofe032d4a41994036@mail.gmail.com> [changed to plt-dev] It's currently working fine for me. On Wed, Feb 18, 2009 at 9:00 AM, Danny Yoo wrote: > I've tried to search on docs.plt-scheme.org, but the javascript > doesn't seem to be doing anything. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > -- sam th samth@ccs.neu.edu From dyoo at cs.wpi.edu Wed Feb 18 09:10:59 2009 From: dyoo at cs.wpi.edu (Danny Yoo) Date: Wed Feb 18 09:11:16 2009 Subject: [plt-dev] Re: [plt-scheme] Searching on docs.plt-scheme disabled? In-Reply-To: <20090218140645.7FC816500B7@mail-svr1.cs.utah.edu> References: <20090218140645.7FC816500B7@mail-svr1.cs.utah.edu> Message-ID: On Wed, Feb 18, 2009 at 9:06 AM, Matthew Flatt wrote: > FWIW, it's working for me at the moment. Strange. I took a closer look: the underlying cause is that I sometimes get connection errors from the web server. That would explain why search doesn't work all the time for me, but I don't know what the deeper cause for the network disconnects are. From eli at barzilay.org Wed Feb 18 09:19:15 2009 From: eli at barzilay.org (Eli Barzilay) Date: Wed Feb 18 09:19:45 2009 Subject: [plt-dev] Re: [plt-scheme] Searching on docs.plt-scheme disabled? In-Reply-To: References: <20090218140645.7FC816500B7@mail-svr1.cs.utah.edu> Message-ID: <18844.6371.401548.432554@winooski.ccs.neu.edu> On Feb 18, Danny Yoo wrote: > On Wed, Feb 18, 2009 at 9:06 AM, Matthew Flatt wrote: > > FWIW, it's working for me at the moment. > > Strange. I took a closer look: the underlying cause is that I > sometimes get connection errors from the web server. That would > explain why search doesn't work all the time for me, but I don't > know what the deeper cause for the network disconnects are. This might explain it -- the index file is quite big, and perhaps your browser gives up on loading it. Did you try to use the local html and see if that works? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From matthias at ccs.neu.edu Wed Feb 18 09:34:28 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Wed Feb 18 09:35:15 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> Message-ID: Sounds like something we need a chapter on this stuff. Carl? Ryan? -- Matthias Begin forwarded message: > From: Robby Findler > Date: February 18, 2009 8:15:10 AM EST > To: Filipe Cabecinhas > Cc: plt-scheme@list.cs.brown.edu > Subject: Re: [plt-scheme] How to add a new language to DrScheme? > > On Wed, Feb 18, 2009 at 6:57 AM, Filipe Cabecinhas > wrote: >> Hi >> >> I'm trying to add a new language to DrScheme. I've already >> implemented >> main.ss, lang/reader.ss and info.ss. (so require, #lang and >> DrScheme all >> work). But I don't have my module directory inside collects, so >> DrScheme >> won't see it (module... see it because I added it to that language's >> collects). How can I add this directory to DrScheme? Must I change an >> environment variable or can I do it by changing one or two files or >> configuring DrScheme for that? > > The way we used to do that was to distribute a .plt file. Nowadays, we > recommend using planet for that, but you'd have to issue a command to > download it after drscheme is installed. > >> Also, I want to distribute DrScheme with this language to some >> students >> for testing. Is there a way to create a minimized installer with only >> scheme, DrScheme, debug tools and my language? Mind that my language >> needs to use MysterX, so I need to run the scripts to register the >> dlls. >> And they're architecture students, so I can't just tell them to run >> regsrv32 mysterx.dll :-) > > If you go the planet route, then telling them to (require (planet > ...)) would also trigger running whatever code you'd want, and I > expect that code can go register the dlls? Unless DrScheme can't be > running at the time you do that, in which case you'd have to tell them > to run the command 'planet install ...', but is that beyond them? > > If you go the .plt route, the same thing applies; you can create a > .plt that runs some code when it is installed to set up the > environment. > > Robby > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From robby at eecs.northwestern.edu Wed Feb 18 09:42:29 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 18 09:42:52 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> Message-ID: <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> We need the "I teach a course. How do I specialize drts to my course?" chapter in the guide, IMO. Robby On Wed, Feb 18, 2009 at 8:34 AM, Matthias Felleisen wrote: > > Sounds like something we need a chapter on this stuff. Carl? Ryan? -- > Matthias > > > > Begin forwarded message: > >> From: Robby Findler >> Date: February 18, 2009 8:15:10 AM EST >> To: Filipe Cabecinhas >> Cc: plt-scheme@list.cs.brown.edu >> Subject: Re: [plt-scheme] How to add a new language to DrScheme? >> >> On Wed, Feb 18, 2009 at 6:57 AM, Filipe Cabecinhas >> wrote: >>> >>> Hi >>> >>> I'm trying to add a new language to DrScheme. I've already implemented >>> main.ss, lang/reader.ss and info.ss. (so require, #lang and DrScheme all >>> work). But I don't have my module directory inside collects, so DrScheme >>> won't see it (module... see it because I added it to that language's >>> collects). How can I add this directory to DrScheme? Must I change an >>> environment variable or can I do it by changing one or two files or >>> configuring DrScheme for that? >> >> The way we used to do that was to distribute a .plt file. Nowadays, we >> recommend using planet for that, but you'd have to issue a command to >> download it after drscheme is installed. >> >>> Also, I want to distribute DrScheme with this language to some students >>> for testing. Is there a way to create a minimized installer with only >>> scheme, DrScheme, debug tools and my language? Mind that my language >>> needs to use MysterX, so I need to run the scripts to register the dlls. >>> And they're architecture students, so I can't just tell them to run >>> regsrv32 mysterx.dll :-) >> >> If you go the planet route, then telling them to (require (planet >> ...)) would also trigger running whatever code you'd want, and I >> expect that code can go register the dlls? Unless DrScheme can't be >> running at the time you do that, in which case you'd have to tell them >> to run the command 'planet install ...', but is that beyond them? >> >> If you go the .plt route, the same thing applies; you can create a >> .plt that runs some code when it is installed to set up the >> environment. >> >> 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-dev > From eli at barzilay.org Wed Feb 18 09:46:59 2009 From: eli at barzilay.org (Eli Barzilay) Date: Wed Feb 18 09:47:21 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> Message-ID: <18844.8035.479117.685673@winooski.ccs.neu.edu> Actually, there's plenty of stuff like that in the handin client, and together with the sudden popularity (very relatively speaking) of the handin server maybe it makes sense to add the whole thing to the standard distribution? As a side benefit, the problems that are related to packaging the documentation without the handin server (the ones that David kept running into, and hacked around it) will trivially go away. On Feb 18, Robby Findler wrote: > We need the "I teach a course. How do I specialize drts to my > course?" chapter in the guide, IMO. > > Robby > > On Wed, Feb 18, 2009 at 8:34 AM, Matthias Felleisen > wrote: > > > > Sounds like something we need a chapter on this stuff. Carl? Ryan? -- > > Matthias -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From carl.eastlund at gmail.com Wed Feb 18 09:57:36 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Wed Feb 18 09:57:54 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <18844.8035.479117.685673@winooski.ccs.neu.edu> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> <18844.8035.479117.685673@winooski.ccs.neu.edu> Message-ID: <990e0c030902180657x73ea5ea1o42508e4be44eda58@mail.gmail.com> On Feb 18, Robby Findler wrote: > We need the "I teach a course. How do I specialize drts to my > course?" chapter in the guide, IMO. > > Robby On Wed, Feb 18, 2009 at 8:34 AM, Matthias Felleisen wrote: > > Sounds like something we need a chapter on this stuff. Carl? Ryan? -- > Matthias After the ICFP deadline (March 2) I could work on an introduction to adding language levels to DrScheme -- presumably we want this to be the Guide for which "Plugins: Extending DrScheme" is the Reference. On Wed, Feb 18, 2009 at 9:46 AM, Eli Barzilay wrote: > Actually, there's plenty of stuff like that in the handin client, and > together with the sudden popularity (very relatively speaking) of the > handin server maybe it makes sense to add the whole thing to the > standard distribution? What "stuff like that" are you referring to? The description of how to customize and install the server/client packages? And, given that they're of the "customize and install" persuasion, how do you plan to add it to the standard distribution? Would you have people go in and hack the sources we give them to get the server up and running? I don't think that really illustrates how to make a new language for DrScheme, nor a great way to distribute libraries. When can we get an implementation of the handin stuff as units or something else parameterized so people can instantiate it without hacking the provided sources? -- Carl Eastlund From eli at barzilay.org Wed Feb 18 10:08:31 2009 From: eli at barzilay.org (Eli Barzilay) Date: Wed Feb 18 10:08:54 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <990e0c030902180657x73ea5ea1o42508e4be44eda58@mail.gmail.com> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> <18844.8035.479117.685673@winooski.ccs.neu.edu> <990e0c030902180657x73ea5ea1o42508e4be44eda58@mail.gmail.com> Message-ID: <18844.9327.478911.666313@winooski.ccs.neu.edu> On Feb 18, Carl Eastlund wrote: > On Feb 18, Robby Findler wrote: > > We need the "I teach a course. How do I specialize drts to my > > course?" chapter in the guide, IMO. > > > > Robby > > On Wed, Feb 18, 2009 at 8:34 AM, Matthias Felleisen > wrote: > > > > Sounds like something we need a chapter on this stuff. Carl? Ryan? > > -- Matthias > > After the ICFP deadline (March 2) I could work on an introduction to > adding language levels to DrScheme -- presumably we want this to be > the Guide for which "Plugins: Extending DrScheme" is the Reference. (I have, BTW, some piece of text I wrote about a year ago on how to write a language.) > On Wed, Feb 18, 2009 at 9:46 AM, Eli Barzilay wrote: > > Actually, there's plenty of stuff like that in the handin client, > > and together with the sudden popularity (very relatively speaking) > > of the handin server maybe it makes sense to add the whole thing > > to the standard distribution? > > What "stuff like that" are you referring to? An easy way to make a collection with hooks like running some code when it installs, an easy way to make a distributable .plt file (which in many situations is much more convenient than a planet package), and even an easy way to make your package check for updates and tell the student if there is one. > The description of how to customize and install the server/client > packages? And, given that they're of the "customize and install" > persuasion, how do you plan to add it to the standard distribution? > Would you have people go in and hack the sources we give them to get > the server up and running? Yes, of course -- you need to write some library that is to be distributed no matter what. It's easier to provide a template collection that people customize than providing an explanation of how to write a collection from scratch; and it's also easier on the customizer's side. > I don't think that really illustrates how to make a new language for > DrScheme, nor a great way to distribute libraries. Why not? > When can we get an implementation of the handin stuff as units or > something else parameterized so people can instantiate it without > hacking the provided sources? You can't -- even if it's put into units, you still need to distribute *something* that will instantiate it. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From grettke at acm.org Wed Feb 18 11:51:12 2009 From: grettke at acm.org (Grant Rettke) Date: Wed Feb 18 11:51:30 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <18844.8035.479117.685673@winooski.ccs.neu.edu> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> <18844.8035.479117.685673@winooski.ccs.neu.edu> Message-ID: <756daca50902180851v49424f7dnd42e45fdf68e5c39@mail.gmail.com> On Wed, Feb 18, 2009 at 8:46 AM, Eli Barzilay wrote: > Actually, there's plenty of stuff like that in the handin client, and > together with the sudden popularity (very relatively speaking) of the > handin server The last time anyone mentioned handin on the main list it wasn't working right or something. What changed? It is more popular now? From carl.eastlund at gmail.com Wed Feb 18 13:31:01 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Wed Feb 18 13:31:30 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <18844.9327.478911.666313@winooski.ccs.neu.edu> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> <18844.8035.479117.685673@winooski.ccs.neu.edu> <990e0c030902180657x73ea5ea1o42508e4be44eda58@mail.gmail.com> <18844.9327.478911.666313@winooski.ccs.neu.edu> Message-ID: <990e0c030902181031p36b9570et2ad7fb29dc065d28@mail.gmail.com> On Wed, Feb 18, 2009 at 10:08 AM, Eli Barzilay wrote: > >> The description of how to customize and install the server/client >> packages? And, given that they're of the "customize and install" >> persuasion, how do you plan to add it to the standard distribution? >> Would you have people go in and hack the sources we give them to get >> the server up and running? > > Yes, of course -- you need to write some library that is to be > distributed no matter what. It's easier to provide a template > collection that people customize than providing an explanation of how > to write a collection from scratch; and it's also easier on the > customizer's side. > > >> I don't think that really illustrates how to make a new language for >> DrScheme, nor a great way to distribute libraries. > > Why not? > >> When can we get an implementation of the handin stuff as units or >> something else parameterized so people can instantiate it without >> hacking the provided sources? > > You can't -- even if it's put into units, you still need to distribute > *something* that will instantiate it. Consider the web server as an example. We do not provide code for the web server that defines its configuration values and tell the user to "edit collects/web-server/config.ss". Instead, we provide a framework for the web server that is parameterized over its configuration. The user can then write a program or run a command line utility that fills in those parameters and runs the web server. We provide the entire framework; the user writes one or a few lines to kick it off, rather than editing files in our provided collection tree. -- Carl Eastlund From eli at barzilay.org Wed Feb 18 14:10:49 2009 From: eli at barzilay.org (Eli Barzilay) Date: Wed Feb 18 14:11:11 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <990e0c030902181031p36b9570et2ad7fb29dc065d28@mail.gmail.com> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> <18844.8035.479117.685673@winooski.ccs.neu.edu> <990e0c030902180657x73ea5ea1o42508e4be44eda58@mail.gmail.com> <18844.9327.478911.666313@winooski.ccs.neu.edu> <990e0c030902181031p36b9570et2ad7fb29dc065d28@mail.gmail.com> Message-ID: <18844.23865.141400.344049@winooski.ccs.neu.edu> On Feb 18, Carl Eastlund wrote: > > Consider the web server as an example. We do not provide code for > the web server that defines its configuration values and tell the > user to "edit collects/web-server/config.ss". Instead, we provide a > framework for the web server that is parameterized over its > configuration. The user can then write a program or run a command > line utility that fills in those parameters and runs the web server. > We provide the entire framework; the user writes one or a few lines > to kick it off, rather than editing files in our provided collection > tree. To create simple a web-server application you write some code in a file and package it up in some form that your clients can install. To create a basic customized handin client you write some code in a file (and it's very simple: just an info.ss file) and you need to package it in a way your clients can install. IOW, I don't see any point here. It just happens that the *actual* client code (the one in the handin-client collection) needs to be packaged with it right now -- but that won't be necessary if that code is included with the student's drscheme installation. To take this analogy back to the web server -- if it was not included with plt, then to write a web server application you'd need to package your code and the web-server code and ship all of that to your clients -- same deal. Some more details: I think that it's safe to assume that I'm using the handin server/client pretty heavily -- so this is a version that is supposedly going to be an extreme case of "customization". * What I do to setup the server is run it from a directory with a configuration file and some additional things (like the ssl certificate files, the hw directories etc). The server code itself is _unmodified_ (it's actually running from the plt svn tree). * What I do to setup the client is: 1. copy the whole thing over to my own directory 2. overwrite server-cert.pem with my own certificate 3. overwrite icon.png with my own icon 4. edit info.ss 5. add a whole bunch of stuff that is specific to my course Now, if the handin client was included with the student distributions, - I'd begin with an empty directory - I wouldn't need to do #1 - In #2 and #3 I'd "put my files" in instead of "overwriting" them. - For #4 I'd "write my own" info file, where this is most conveniently done by starting from a documented example that lists what I can have there -- a template file happens to be a very convenient format for such work (the template could move from a file to the manual, but it's the same idea) - #5 would be the same - Additional point: with the way things are, I'd probably need to write stub files like a "client-gui.ss" file that has: #lang scheme/base (require handin-client/client-gui) (provide (all-from-out handin-client/client-gui)) But if the collection is included with plt, then it should be easy to arrange it so the stub files are not needed. That is, the info file will use the tool directly from the plt tree, and things will work fine. (The main change here would be in the "this-collection.ss" hack, which will find the collection holding the info file instead of itself.) If my guess is correct, then you're assuming that I won't do that last paragraph and that's what you're trying to complain about. This assumption is false. [Finally -- all of this is independent from a "quick guide to writing your own language", but in the post that started this thread Filipe said he managed that part.] -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Wed Feb 18 14:12:47 2009 From: eli at barzilay.org (Eli Barzilay) Date: Wed Feb 18 14:13:11 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <756daca50902180851v49424f7dnd42e45fdf68e5c39@mail.gmail.com> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> <18844.8035.479117.685673@winooski.ccs.neu.edu> <756daca50902180851v49424f7dnd42e45fdf68e5c39@mail.gmail.com> Message-ID: <18844.23983.401734.621681@winooski.ccs.neu.edu> On Feb 18, Grant Rettke wrote: > On Wed, Feb 18, 2009 at 8:46 AM, Eli Barzilay wrote: > > Actually, there's plenty of stuff like that in the handin client, > > and together with the sudden popularity (very relatively speaking) > > of the handin server > > The last time anyone mentioned handin on the main list it wasn't > working right or something. What changed? It is more popular now? There was a technical problem with the beginner language check-expect, and it looks like there's a solution to that now. (But this is unrelated.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From carl.eastlund at gmail.com Wed Feb 18 14:20:34 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Wed Feb 18 14:20:52 2009 Subject: [plt-dev] Fwd: [plt-scheme] How to add a new language to DrScheme? In-Reply-To: <18844.23865.141400.344049@winooski.ccs.neu.edu> References: <932b2f1f0902180515w7a502ac6h34c18bcd1c92b90a@mail.gmail.com> <932b2f1f0902180642m403246c5w628f7acecaa9cff5@mail.gmail.com> <18844.8035.479117.685673@winooski.ccs.neu.edu> <990e0c030902180657x73ea5ea1o42508e4be44eda58@mail.gmail.com> <18844.9327.478911.666313@winooski.ccs.neu.edu> <990e0c030902181031p36b9570et2ad7fb29dc065d28@mail.gmail.com> <18844.23865.141400.344049@winooski.ccs.neu.edu> Message-ID: <990e0c030902181120l50b3e5e4h7a7b699fae175fd@mail.gmail.com> On Wed, Feb 18, 2009 at 2:10 PM, Eli Barzilay wrote: > On Feb 18, Carl Eastlund wrote: >> >> Consider the web server as an example. We do not provide code for >> the web server that defines its configuration values and tell the >> user to "edit collects/web-server/config.ss". Instead, we provide a >> framework for the web server that is parameterized over its >> configuration. The user can then write a program or run a command >> line utility that fills in those parameters and runs the web server. >> We provide the entire framework; the user writes one or a few lines >> to kick it off, rather than editing files in our provided collection >> tree. > > To create simple a web-server application you write some code in a > file and package it up in some form that your clients can install. To > create a basic customized handin client you write some code in a file > (and it's very simple: just an info.ss file) and you need to package > it in a way your clients can install. IOW, I don't see any point > here. > > It just happens that the *actual* client code (the one in the > handin-client collection) needs to be packaged with it right now -- > but that won't be necessary if that code is included with the > student's drscheme installation. To take this analogy back to the > web server -- if it was not included with plt, then to write a web > server application you'd need to package your code and the web-server > code and ship all of that to your clients -- same deal. > > Some more details: I think that it's safe to assume that I'm using the > handin server/client pretty heavily -- so this is a version that is > supposedly going to be an extreme case of "customization". > > * What I do to setup the server is run it from a directory with a > configuration file and some additional things (like the ssl > certificate files, the hw directories etc). The server code itself > is _unmodified_ (it's actually running from the plt svn tree). > > * What I do to setup the client is: > > 1. copy the whole thing over to my own directory > > 2. overwrite server-cert.pem with my own certificate > > 3. overwrite icon.png with my own icon > > 4. edit info.ss > > 5. add a whole bunch of stuff that is specific to my course > > Now, if the handin client was included with the student > distributions, > > - I'd begin with an empty directory > > - I wouldn't need to do #1 > > - In #2 and #3 I'd "put my files" in instead of "overwriting" them. > > - For #4 I'd "write my own" info file, where this is most > conveniently done by starting from a documented example that lists > what I can have there -- a template file happens to be a very > convenient format for such work (the template could move from a > file to the manual, but it's the same idea) > > - #5 would be the same > > - Additional point: with the way things are, I'd probably need to > write stub files like a "client-gui.ss" file that has: > > #lang scheme/base > (require handin-client/client-gui) > (provide (all-from-out handin-client/client-gui)) > > But if the collection is included with plt, then it should be easy > to arrange it so the stub files are not needed. That is, the info > file will use the tool directly from the plt tree, and things will > work fine. (The main change here would be in the > "this-collection.ss" hack, which will find the collection holding > the info file instead of itself.) > > If my guess is correct, then you're assuming that I won't do that last > paragraph and that's what you're trying to complain about. This > assumption is false. It sounds like we agree about the kind of changes to make to the handin server/client distribution process. -- Carl Eastlund From dherman at ccs.neu.edu Wed Feb 18 17:06:41 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Wed Feb 18 17:07:18 2009 Subject: [plt-dev] crash and burn Message-ID: <499C8671.1060408@ccs.neu.edu> ;; Definitions window: (module foo scheme/base (define (even? n) (or (zero? n) (odd? (sub1 n)))) (define (odd? n) (and (not (zero? n)) (even? (sub1 n))))) ;; Interactions window: > (namespace-undefine-variable! 'even?) > (namespace-variable-value 'even?) namespace-variable-value: even? is not defined > (odd? 42) **SEGFAULT** From mflatt at cs.utah.edu Wed Feb 18 17:18:29 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Wed Feb 18 17:18:58 2009 Subject: [plt-dev] crash and burn In-Reply-To: <499C8671.1060408@ccs.neu.edu> References: <499C8671.1060408@ccs.neu.edu> Message-ID: <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> Fixed in SVN. Thanks, Matthew At Wed, 18 Feb 2009 17:06:41 -0500, Dave Herman wrote: > ;; Definitions window: > > (module foo scheme/base > (define (even? n) > (or (zero? n) (odd? (sub1 n)))) > (define (odd? n) > (and (not (zero? n)) (even? (sub1 n))))) > > ;; Interactions window: > > > (namespace-undefine-variable! 'even?) > > (namespace-variable-value 'even?) > namespace-variable-value: even? is not defined > > (odd? 42) > > **SEGFAULT** > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From matthias at ccs.neu.edu Wed Feb 18 17:21:40 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Wed Feb 18 17:22:28 2009 Subject: [plt-dev] crash and burn In-Reply-To: <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> Message-ID: Is 12 mins your record for fixing a bug and committing it? :-) On Feb 18, 2009, at 5:18 PM, Matthew Flatt wrote: > Fixed in SVN. > > Thanks, > Matthew > > At Wed, 18 Feb 2009 17:06:41 -0500, Dave Herman wrote: >> ;; Definitions window: >> >> (module foo scheme/base >> (define (even? n) >> (or (zero? n) (odd? (sub1 n)))) >> (define (odd? n) >> (and (not (zero? n)) (even? (sub1 n))))) >> >> ;; Interactions window: >> >>> (namespace-undefine-variable! 'even?) >>> (namespace-variable-value 'even?) >> namespace-variable-value: even? is not defined >>> (odd? 42) >> >> **SEGFAULT** >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From robby at eecs.northwestern.edu Wed Feb 18 17:22:55 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 18 17:23:17 2009 Subject: [plt-dev] crash and burn In-Reply-To: References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0902181422p7e18e0d0ic0b30763569618bd@mail.gmail.com> He was faster than that back @ Rice numerous times. :) Robby On Wed, Feb 18, 2009 at 4:21 PM, Matthias Felleisen wrote: > > Is 12 mins your record for fixing a bug and committing it? :-) > > > On Feb 18, 2009, at 5:18 PM, Matthew Flatt wrote: > >> Fixed in SVN. >> >> Thanks, >> Matthew >> >> At Wed, 18 Feb 2009 17:06:41 -0500, Dave Herman wrote: >>> >>> ;; Definitions window: >>> >>> (module foo scheme/base >>> (define (even? n) >>> (or (zero? n) (odd? (sub1 n)))) >>> (define (odd? n) >>> (and (not (zero? n)) (even? (sub1 n))))) >>> >>> ;; Interactions window: >>> >>>> (namespace-undefine-variable! 'even?) >>>> (namespace-variable-value 'even?) >>> >>> namespace-variable-value: even? is not defined >>>> >>>> (odd? 42) >>> >>> **SEGFAULT** >>> >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From matthias at ccs.neu.edu Wed Feb 18 17:30:25 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Wed Feb 18 17:31:12 2009 Subject: [plt-dev] crash and burn In-Reply-To: <932b2f1f0902181422p7e18e0d0ic0b30763569618bd@mail.gmail.com> References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> <932b2f1f0902181422p7e18e0d0ic0b30763569618bd@mail.gmail.com> Message-ID: That doesn't count! We had no need for email communication! On Feb 18, 2009, at 5:22 PM, Robby Findler wrote: > He was faster than that back @ Rice numerous times. :) > > Robby > > On Wed, Feb 18, 2009 at 4:21 PM, Matthias Felleisen > wrote: >> >> Is 12 mins your record for fixing a bug and committing it? :-) >> >> >> On Feb 18, 2009, at 5:18 PM, Matthew Flatt wrote: >> >>> Fixed in SVN. >>> >>> Thanks, >>> Matthew >>> >>> At Wed, 18 Feb 2009 17:06:41 -0500, Dave Herman wrote: >>>> >>>> ;; Definitions window: >>>> >>>> (module foo scheme/base >>>> (define (even? n) >>>> (or (zero? n) (odd? (sub1 n)))) >>>> (define (odd? n) >>>> (and (not (zero? n)) (even? (sub1 n))))) >>>> >>>> ;; Interactions window: >>>> >>>>> (namespace-undefine-variable! 'even?) >>>>> (namespace-variable-value 'even?) >>>> >>>> namespace-variable-value: even? is not defined >>>>> >>>>> (odd? 42) >>>> >>>> **SEGFAULT** >>>> >>>> _________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>> >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> From dherman at ccs.neu.edu Wed Feb 18 17:32:04 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Wed Feb 18 17:32:42 2009 Subject: [plt-dev] crash and burn In-Reply-To: <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> Message-ID: <499C8C64.7040102@ccs.neu.edu> Matthew Flatt wrote: > Fixed in SVN. 12 minutes -- I'm impressed. :) What is the intended behavior? (Tomorrow I can download the nightly binary and try this out myself, but it might help to clarify this in the docs.) I ran into this because I couldn't figure it out from the docs. Some possible semantics I could imagine: 1. The module is compiled with internal links; the removal is only observable to newly compiled/eval'ed variable references. So `odd?' continues to work even after removing `even?'. 2. All variable references, even ones compiled in the module, go through the namespace table, so after the removal, even module code contains free variable references which become dynamic errors. So `odd?' fails dynamically after removing `even?'. 3. The removal is illegal and raises an error; you can't remove variables from module namespace. 4. The module namespace actually contains some sort of internal parent pointer to another top level namespace, and the removal is performed on the top level namespace, not the module namespace. Is any of these close? Thanks, Dave From robby at eecs.northwestern.edu Wed Feb 18 17:34:23 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 18 17:34:44 2009 Subject: [plt-dev] crash and burn In-Reply-To: References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> <932b2f1f0902181422p7e18e0d0ic0b30763569618bd@mail.gmail.com> Message-ID: <932b2f1f0902181434x1836e61ek5c59339a9f45b050@mail.gmail.com> And yet, somehow, we still used it. :) He was like ... what ... 4 doors away from me or something?! Who walks that far when they can email? Robby On Wed, Feb 18, 2009 at 4:30 PM, Matthias Felleisen wrote: > > That doesn't count! We had no need for email communication! > > > On Feb 18, 2009, at 5:22 PM, Robby Findler wrote: > >> He was faster than that back @ Rice numerous times. :) >> >> Robby >> >> On Wed, Feb 18, 2009 at 4:21 PM, Matthias Felleisen >> wrote: >>> >>> Is 12 mins your record for fixing a bug and committing it? :-) >>> >>> >>> On Feb 18, 2009, at 5:18 PM, Matthew Flatt wrote: >>> >>>> Fixed in SVN. >>>> >>>> Thanks, >>>> Matthew >>>> >>>> At Wed, 18 Feb 2009 17:06:41 -0500, Dave Herman wrote: >>>>> >>>>> ;; Definitions window: >>>>> >>>>> (module foo scheme/base >>>>> (define (even? n) >>>>> (or (zero? n) (odd? (sub1 n)))) >>>>> (define (odd? n) >>>>> (and (not (zero? n)) (even? (sub1 n))))) >>>>> >>>>> ;; Interactions window: >>>>> >>>>>> (namespace-undefine-variable! 'even?) >>>>>> (namespace-variable-value 'even?) >>>>> >>>>> namespace-variable-value: even? is not defined >>>>>> >>>>>> (odd? 42) >>>>> >>>>> **SEGFAULT** >>>>> >>>>> _________________________________________________ >>>>> For list-related administrative tasks: >>>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>>> >>>> _________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>> >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>> > > From mflatt at cs.utah.edu Wed Feb 18 17:40:37 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Wed Feb 18 17:40:59 2009 Subject: [plt-dev] crash and burn In-Reply-To: <499C8C64.7040102@ccs.neu.edu> References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> <499C8C64.7040102@ccs.neu.edu> Message-ID: <20090218224039.B2D6B6500AD@mail-svr1.cs.utah.edu> At Wed, 18 Feb 2009 17:32:04 -0500, Dave Herman wrote: > What is the intended behavior? > > [...] > > 3. The removal is illegal and raises an error; you can't remove > variables from module namespace. That's it. Specifically, the definition is constant, so changing or removing the definition is illegal. The JIT takes advantage of constantness, so that's why removing the definition triggered a crash. From jos.koot at telefonica.net Wed Feb 18 17:46:04 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Wed Feb 18 17:53:32 2009 Subject: [plt-dev] crash and burn References: <499C8671.1060408@ccs.neu.edu><20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu><932b2f1f0902181422p7e18e0d0ic0b30763569618bd@mail.gmail.com> <932b2f1f0902181434x1836e61ek5c59339a9f45b050@mail.gmail.com> Message-ID: <935F349C217542E8BFF5D902AFEEC753@uw2b2dff239c4d> May be because eye to eye contact gives more pleasure? And on the way to Matthew's room you could habe poored a cup of coffee for him (if he likes that) (yes I am of the old alledgedly inefficient school) Jos ----- Original Message ----- From: "Robby Findler" To: "Matthias Felleisen" Cc: "PLT Developers" Sent: Wednesday, February 18, 2009 11:34 PM Subject: Re: [plt-dev] crash and burn > And yet, somehow, we still used it. :) > > He was like ... what ... 4 doors away from me or something?! Who walks > that far when they can email? > > Robby > > On Wed, Feb 18, 2009 at 4:30 PM, Matthias Felleisen > wrote: >> >> That doesn't count! We had no need for email communication! >> >> >> On Feb 18, 2009, at 5:22 PM, Robby Findler wrote: >> >>> He was faster than that back @ Rice numerous times. :) >>> >>> Robby >>> >>> On Wed, Feb 18, 2009 at 4:21 PM, Matthias Felleisen >>> wrote: >>>> >>>> Is 12 mins your record for fixing a bug and committing it? :-) >>>> >>>> >>>> On Feb 18, 2009, at 5:18 PM, Matthew Flatt wrote: >>>> >>>>> Fixed in SVN. >>>>> >>>>> Thanks, >>>>> Matthew >>>>> >>>>> At Wed, 18 Feb 2009 17:06:41 -0500, Dave Herman wrote: >>>>>> >>>>>> ;; Definitions window: >>>>>> >>>>>> (module foo scheme/base >>>>>> (define (even? n) >>>>>> (or (zero? n) (odd? (sub1 n)))) >>>>>> (define (odd? n) >>>>>> (and (not (zero? n)) (even? (sub1 n))))) >>>>>> >>>>>> ;; Interactions window: >>>>>> >>>>>>> (namespace-undefine-variable! 'even?) >>>>>>> (namespace-variable-value 'even?) >>>>>> >>>>>> namespace-variable-value: even? is not defined >>>>>>> >>>>>>> (odd? 42) >>>>>> >>>>>> **SEGFAULT** >>>>>> >>>>>> _________________________________________________ >>>>>> For list-related administrative tasks: >>>>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>>>> >>>>> _________________________________________________ >>>>> For list-related administrative tasks: >>>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>>> >>>> _________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>>> >> >> > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From grettke at acm.org Wed Feb 18 18:00:15 2009 From: grettke at acm.org (Grant Rettke) Date: Wed Feb 18 18:00:33 2009 Subject: [plt-dev] crash and burn In-Reply-To: <935F349C217542E8BFF5D902AFEEC753@uw2b2dff239c4d> References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> <932b2f1f0902181422p7e18e0d0ic0b30763569618bd@mail.gmail.com> <932b2f1f0902181434x1836e61ek5c59339a9f45b050@mail.gmail.com> <935F349C217542E8BFF5D902AFEEC753@uw2b2dff239c4d> Message-ID: <756daca50902181500j15aa0941h140a15695066a6b1@mail.gmail.com> On Wed, Feb 18, 2009 at 4:46 PM, Jos Koot wrote: > May be because eye to eye contact gives more pleasure? > And on the way to Matthew's room you could habe poored a cup of coffee for > him (if he likes that) > (yes I am of the old alledgedly inefficient school) There is nothing like the sight of everyone madly typing away in their instant message clients in our "open office format"; which is meant to facilitate interpersonal interaction ;). From robby at eecs.northwestern.edu Wed Feb 18 18:01:25 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 18 18:01:46 2009 Subject: [plt-dev] crash and burn In-Reply-To: <756daca50902181500j15aa0941h140a15695066a6b1@mail.gmail.com> References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> <932b2f1f0902181422p7e18e0d0ic0b30763569618bd@mail.gmail.com> <932b2f1f0902181434x1836e61ek5c59339a9f45b050@mail.gmail.com> <935F349C217542E8BFF5D902AFEEC753@uw2b2dff239c4d> <756daca50902181500j15aa0941h140a15695066a6b1@mail.gmail.com> Message-ID: <932b2f1f0902181501m6ade0f4w130d89fad48172ae@mail.gmail.com> On Wed, Feb 18, 2009 at 5:00 PM, Grant Rettke wrote: > On Wed, Feb 18, 2009 at 4:46 PM, Jos Koot wrote: >> May be because eye to eye contact gives more pleasure? >> And on the way to Matthew's room you could habe poored a cup of coffee for >> him (if he likes that) >> (yes I am of the old alledgedly inefficient school) > > There is nothing like the sight of everyone madly typing away in their > instant message clients in our "open office format"; which is meant to > facilitate interpersonal interaction ;). One of the earliest programs we built in mred/mzscheme was a chat program. We never really used it much, tho. So at least we got it right eventually. Robby From mflatt at cs.utah.edu Wed Feb 18 18:26:59 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Wed Feb 18 18:27:22 2009 Subject: [plt-dev] #lang at-exp Message-ID: <20090218232702.47C056500BE@mail-svr1.cs.utah.edu> If you want to enable @-expressions in a module that is written in, say, `scheme/base', the old way was to start the file like this: #reader scribble/reader #lang scheme/base The new way is like this: #lang at-exp scheme/base In general, `at-exp' is a kind of language constructor that installs "@" support (through the readtable) before chaining to a base language. Eventually, DrScheme and other tools will work better on files that start "#lang". The old "#reader" way works only because an S-expression reader happens to be active before "#lang". From geoff at knauth.org Thu Feb 19 06:22:15 2009 From: geoff at knauth.org (Geoffrey S.Knauth) Date: Thu Feb 19 06:31:52 2009 Subject: [plt-dev] crash and burn In-Reply-To: References: <499C8671.1060408@ccs.neu.edu> <20090218221831.1ADD76500AC@mail-svr1.cs.utah.edu> Message-ID: On Feb 18, 2009, at 17:21, Matthias Felleisen wrote: > Is 12 mins [Matthew's] record for fixing a bug and committing it? :-) I calculate a speed of 2.9 bug-miles per second or 10492 bug-miles per hour: nearly orbital. There could be adjustments for bug severity, time zone difference, location of servers... P.S.: The first time I composed this message, my Mac had a kernel panic. No, it wasn't PLT. According to the crash report, that blame belongs to com.symantec.kext.internetSecurity. Every time my Mac has crashed--several times per year--it's been traced to Symantec. (define bos-slc-nm 1823.5) (define bos-slc-sm (* bos-slc-nm (/ 6076 5280))) (define (bug-miles-per-t bugs miles t) (/ (* bugs miles) t)) (bug-miles-per-t 1 bos-slc-sm (* 12 60)) ;=> 2.9144533880471384 (bug-miles-per-t 1 bos-slc-sm 12/60) ;=> 10492.032196969698 -------------- next part -------------- Skipped content of type multipart/related From dherman at ccs.neu.edu Thu Feb 19 11:23:43 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Feb 19 11:24:21 2009 Subject: [plt-dev] logging getting disabled in DrScheme Message-ID: <499D878F.1060003@ccs.neu.edu> I've tried to narrow this down as much as possible. I first witnessed it last night on my Mac and I'm able to reproduce it on my WinXP machine too. Here's how to reproduce: 1. Create a module: #lang scheme/base (log-debug "hello, world") 2. Save it in some file. 3. Open the file in DrScheme. 4. View | Show Log 5. Run 6. Close the file in DrScheme. 7. Open the file again in DrScheme. 8. View | Show Log 9. Run Now all logging appears to have been inadvertently disabled. For example, try doing (log-debug "hello?") at the REPL and nothing happens. Thanks, Dave From dherman at ccs.neu.edu Thu Feb 19 11:27:42 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Feb 19 11:28:29 2009 Subject: [plt-dev] logging getting disabled in DrScheme In-Reply-To: <499D878F.1060003@ccs.neu.edu> References: <499D878F.1060003@ccs.neu.edu> Message-ID: <499D887E.70808@ccs.neu.edu> Oh! Even simpler: 1. Create the file. 2. View | Show Log 3. Run 4. View | Hide Log 5. View | Show Log 6. Run Dave From dherman at ccs.neu.edu Thu Feb 19 11:46:14 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Feb 19 11:46:54 2009 Subject: [plt-dev] logging: strings vs. sexps Message-ID: <499D8CD6.5080301@ccs.neu.edu> The new logging facility is very cool, but I think it's missing a great opportunity: if ever there was a perfect use case for S-expressions, it's logs. They're extremely human readable (esp. to Schemers), and extremely manipulable programmatically. In my experience, when you add logging to an app you discover two needs, in this order: 1. the need to generate logging info conveniently 2. the need to manipulate existing logs and mine them for data Strings are pretty good for #1, but they're pretty bad for #2. S-expressions are great at both. The `log-message' procedure (etc.) would need to be generalized from taking a string to taking an S-expression, but this would require one backwards-incompatible change: the system would have to `write' the data, not `display' it. Otherwise you'd get entries like (foo #t 42 don't tell anyone. hello, world) Logging is still a pretty new feature, so I bet it's not too late to make this change. Opinions? Dave From noelwelsh at gmail.com Thu Feb 19 12:36:20 2009 From: noelwelsh at gmail.com (Noel Welsh) Date: Thu Feb 19 12:36:38 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <499D8CD6.5080301@ccs.neu.edu> References: <499D8CD6.5080301@ccs.neu.edu> Message-ID: On Thu, Feb 19, 2009 at 4:46 PM, Dave Herman wrote: > The new logging facility is very cool, but I think it's missing a great > opportunity: if ever there was a perfect use case for S-expressions, it's > logs. They're extremely human readable (esp. to Schemers), and extremely > manipulable programmatically. I think this would be quite useful. N. From jay.mccarthy at gmail.com Thu Feb 19 12:43:13 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Thu Feb 19 12:43:36 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: References: <499D8CD6.5080301@ccs.neu.edu> Message-ID: +1 On Thu, Feb 19, 2009 at 12:36 PM, Noel Welsh wrote: > On Thu, Feb 19, 2009 at 4:46 PM, Dave Herman wrote: >> The new logging facility is very cool, but I think it's missing a great >> opportunity: if ever there was a perfect use case for S-expressions, it's >> logs. They're extremely human readable (esp. to Schemers), and extremely >> manipulable programmatically. > > I think this would be quite useful. > > N. > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > -- Jay McCarthy Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93 From eli at barzilay.org Thu Feb 19 13:07:54 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 13:08:16 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <499D8CD6.5080301@ccs.neu.edu> References: <499D8CD6.5080301@ccs.neu.edu> Message-ID: <18845.40954.250868.533068@winooski.ccs.neu.edu> On Feb 19, Dave Herman wrote: > The `log-message' procedure (etc.) would need to be generalized from > taking a string to taking an S-expression, but this would require > one backwards-incompatible change: the system would have to `write' > the data, not `display' it. Otherwise you'd get entries like > > (foo #t 42 don't tell anyone. hello, world) > > Logging is still a pretty new feature, so I bet it's not too late to > make this change. Opinions? But the thing that actually goes out to the log *is* just a string, so the above suggestion makes it impossible to use it. IOW, writing strings allow writing sexprs but not the other way. IYOW, you can write sexprs now, but given that change you won't be able to write strings. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Thu Feb 19 13:11:42 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 13:12:04 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <18845.40954.250868.533068@winooski.ccs.neu.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> I think Eli's asking 'why not do (log-info (format "~s" my-sexp))?'. Right? Robby On Thu, Feb 19, 2009 at 12:07 PM, Eli Barzilay wrote: > On Feb 19, Dave Herman wrote: >> The `log-message' procedure (etc.) would need to be generalized from >> taking a string to taking an S-expression, but this would require >> one backwards-incompatible change: the system would have to `write' >> the data, not `display' it. Otherwise you'd get entries like >> >> (foo #t 42 don't tell anyone. hello, world) >> >> Logging is still a pretty new feature, so I bet it's not too late to >> make this change. Opinions? > > But the thing that actually goes out to the log *is* just a string, so > the above suggestion makes it impossible to use it. IOW, writing > strings allow writing sexprs but not the other way. IYOW, you can > write sexprs now, but given that change you won't be able to write > strings. > > -- > ((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-dev > From eli at barzilay.org Thu Feb 19 13:12:30 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 13:12:51 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> Message-ID: <18845.41230.836267.436575@winooski.ccs.neu.edu> On Feb 19, Robby Findler wrote: > I think Eli's asking 'why not do (log-info (format "~s" > my-sexp))?'. Right? [Uh, yeah, but that looks so much boring...] -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Thu Feb 19 13:17:13 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 13:17:35 2009 Subject: [plt-dev] logging getting disabled in DrScheme In-Reply-To: <499D887E.70808@ccs.neu.edu> References: <499D878F.1060003@ccs.neu.edu> <499D887E.70808@ccs.neu.edu> Message-ID: <932b2f1f0902191017l66b1d4aarb0c1a52d05661feb@mail.gmail.com> Thanks. That's fixed now. (There were also some problems with multiple tabs interfering with each other's logs, but I think that's fixed now too.) Robby On Thu, Feb 19, 2009 at 10:27 AM, Dave Herman wrote: > Oh! Even simpler: > > 1. Create the file. > 2. View | Show Log > 3. Run > 4. View | Hide Log > 5. View | Show Log > 6. Run > > Dave > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From robby at eecs.northwestern.edu Thu Feb 19 14:57:00 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 14:57:22 2009 Subject: [plt-dev] moving the Chicago mirror Message-ID: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> I'm sucking down the various downloads to start a new mirror at Northwestern. Can someone update the web page to point to it? (It should be done in about 20 minutes, I'm guessing.) This is the url: http://www.eecs.northwestern.edu/plt-scheme/ Thanks, Robby From eli at barzilay.org Thu Feb 19 14:59:18 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 14:59:41 2009 Subject: [plt-dev] moving the Chicago mirror In-Reply-To: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> References: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> Message-ID: <18845.47638.564166.187134@winooski.ccs.neu.edu> On Feb 19, Robby Findler wrote: > I'm sucking down the various downloads to start a new mirror at > Northwestern. Can someone update the web page to point to it? (It > should be done in about 20 minutes, I'm guessing.) > > This is the url: > > http://www.eecs.northwestern.edu/plt-scheme/ Are you sure that this is the correct url -- I get nothing there now. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Thu Feb 19 15:05:06 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 15:05:37 2009 Subject: [plt-dev] moving the Chicago mirror In-Reply-To: <18845.47638.564166.187134@winooski.ccs.neu.edu> References: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> <18845.47638.564166.187134@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902191205p6725d87ds3e4faaf01fc9900@mail.gmail.com> It looks like 200/plt/ is all there, eg: http://www.eecs.northwestern.edu/plt-scheme/200/plt/plt-200-src-win.zip Robby On Thu, Feb 19, 2009 at 1:59 PM, Eli Barzilay wrote: > On Feb 19, Robby Findler wrote: >> I'm sucking down the various downloads to start a new mirror at >> Northwestern. Can someone update the web page to point to it? (It >> should be done in about 20 minutes, I'm guessing.) >> >> This is the url: >> >> http://www.eecs.northwestern.edu/plt-scheme/ > > Are you sure that this is the correct url -- I get nothing there now. > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > From matthias at ccs.neu.edu Thu Feb 19 15:25:28 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Thu Feb 19 15:26:18 2009 Subject: [plt-dev] Re: [plt-scheme] define-for-meta In-Reply-To: <499DBD24.6010401@cs.utah.edu> References: <499DBD24.6010401@cs.utah.edu> Message-ID: <7E2026B2-F288-4C0C-876E-87B177E5572D@ccs.neu.edu> Hey I asked for this a few months back and Matthew didn't grant it to me. On Feb 19, 2009, at 3:12 PM, Jon Rafkind wrote: > I would like to write a macro that can be used inside begin-for- > syntax, but so far the only way I can do it is by putting the macro > in a different file and (require (for-syntax "x.ss")) on that file. > Is there something akin to (define-for-meta ...) so that I can > define my syntax at meta phase 2 and hopefully achieve the same thing? > > The following won't work unless `bar' is moved to 'y.ss' (and > uncomment y.ss). There is no real need to do this other than > keeping definitions all in the same file. > > #lang scheme/base > > (require (for-syntax > scheme/base > ;; "y.ss" > )) > > (define-syntax bar > (syntax-rules () > ((_ x) > (+ 1 x)))) > (begin-for-syntax > (define (foo) > (let ([x 1]) > (printf "foo ~a\n" (bar x)))) > > (foo)) > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme From cce at ccs.neu.edu Thu Feb 19 15:28:14 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Feb 19 15:28:31 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." Message-ID: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> DrScheme gave me the error message in the subject -- I wish I had copied or screenshotted it, but I was so surprised to see it I just clicked "OK" to see what it would do, so I may have the wording slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave me to "quit unexpectedly dialog") when I hit "OK". I don't recall doing anything intensive when that happened, I was just running a program I had run before (in Dracula). Anyone know what might have happened, or what further information I should look for to help diagnose this? -- Carl Eastlund From grettke at acm.org Thu Feb 19 15:30:33 2009 From: grettke at acm.org (Grant Rettke) Date: Thu Feb 19 15:30:51 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <499D8CD6.5080301@ccs.neu.edu> References: <499D8CD6.5080301@ccs.neu.edu> Message-ID: <756daca50902191230y6430ba6el9e80e5491afa0418@mail.gmail.com> On Thu, Feb 19, 2009 at 10:46 AM, Dave Herman wrote: > Logging is still a pretty new feature, so I bet it's not too late to make > this change. Opinions? Great point. From robby at eecs.northwestern.edu Thu Feb 19 15:32:25 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 15:32:46 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> Message-ID: <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> Were you running check syntax? Robby On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund wrote: > DrScheme gave me the error message in the subject -- I wish I had > copied or screenshotted it, but I was so surprised to see it I just > clicked "OK" to see what it would do, so I may have the wording > slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave me > to "quit unexpectedly dialog") when I hit "OK". > > I don't recall doing anything intensive when that happened, I was just > running a program I had run before (in Dracula). Anyone know what > might have happened, or what further information I should look for to > help diagnose this? > > -- > Carl Eastlund > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From robby at eecs.northwestern.edu Thu Feb 19 15:33:34 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 15:33:55 2009 Subject: [plt-dev] moving the Chicago mirror In-Reply-To: <932b2f1f0902191205p6725d87ds3e4faaf01fc9900@mail.gmail.com> References: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> <18845.47638.564166.187134@winooski.ccs.neu.edu> <932b2f1f0902191205p6725d87ds3e4faaf01fc9900@mail.gmail.com> Message-ID: <932b2f1f0902191233w5e285b3ayf1e301c70b669393@mail.gmail.com> Okay, it appears to all be there now. Robby On Thu, Feb 19, 2009 at 2:05 PM, Robby Findler wrote: > It looks like 200/plt/ is all there, eg: > > http://www.eecs.northwestern.edu/plt-scheme/200/plt/plt-200-src-win.zip > > Robby > > On Thu, Feb 19, 2009 at 1:59 PM, Eli Barzilay wrote: >> On Feb 19, Robby Findler wrote: >>> I'm sucking down the various downloads to start a new mirror at >>> Northwestern. Can someone update the web page to point to it? (It >>> should be done in about 20 minutes, I'm guessing.) >>> >>> This is the url: >>> >>> http://www.eecs.northwestern.edu/plt-scheme/ >> >> Are you sure that this is the correct url -- I get nothing there now. >> >> -- >> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: >> http://www.barzilay.org/ Maze is Life! >> > From eli at barzilay.org Thu Feb 19 15:44:16 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 15:44:36 2009 Subject: [plt-dev] moving the Chicago mirror In-Reply-To: <932b2f1f0902191233w5e285b3ayf1e301c70b669393@mail.gmail.com> References: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> <18845.47638.564166.187134@winooski.ccs.neu.edu> <932b2f1f0902191205p6725d87ds3e4faaf01fc9900@mail.gmail.com> <932b2f1f0902191233w5e285b3ayf1e301c70b669393@mail.gmail.com> Message-ID: <18845.50336.542393.445437@winooski.ccs.neu.edu> Everything should be updated now, and I did some more changes to the iplt tree with your email too. You may want to have a quick grep to see the leftover uchicago places. (BTW, I thought that it wasn't there because I'm so used to using the Indexes option...) On Feb 19, Robby Findler wrote: > Okay, it appears to all be there now. > > Robby > > On Thu, Feb 19, 2009 at 2:05 PM, Robby Findler > wrote: > > It looks like 200/plt/ is all there, eg: > > > > http://www.eecs.northwestern.edu/plt-scheme/200/plt/plt-200-src-win.zip > > > > Robby > > > > On Thu, Feb 19, 2009 at 1:59 PM, Eli Barzilay wrote: > >> On Feb 19, Robby Findler wrote: > >>> I'm sucking down the various downloads to start a new mirror at > >>> Northwestern. Can someone update the web page to point to it? (It > >>> should be done in about 20 minutes, I'm guessing.) > >>> > >>> This is the url: > >>> > >>> http://www.eecs.northwestern.edu/plt-scheme/ > >> > >> Are you sure that this is the correct url -- I get nothing there now. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From grettke at acm.org Thu Feb 19 15:50:44 2009 From: grettke at acm.org (Grant Rettke) Date: Thu Feb 19 15:51:02 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <18845.41230.836267.436575@winooski.ccs.neu.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> Message-ID: <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> On Thu, Feb 19, 2009 at 12:12 PM, Eli Barzilay wrote: > On Feb 19, Robby Findler wrote: >> I think Eli's asking 'why not do (log-info (format "~s" >> my-sexp))?'. Right? > > [Uh, yeah, but that looks so much boring...] Is (log-info-sexpr ...) less boring? From robby at eecs.northwestern.edu Thu Feb 19 15:51:03 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 15:51:26 2009 Subject: [plt-dev] moving the Chicago mirror In-Reply-To: <18845.50336.542393.445437@winooski.ccs.neu.edu> References: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> <18845.47638.564166.187134@winooski.ccs.neu.edu> <932b2f1f0902191205p6725d87ds3e4faaf01fc9900@mail.gmail.com> <932b2f1f0902191233w5e285b3ayf1e301c70b669393@mail.gmail.com> <18845.50336.542393.445437@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902191251v67ac12bbm62e729748f5dd529@mail.gmail.com> On Thu, Feb 19, 2009 at 2:44 PM, Eli Barzilay wrote: > Everything should be updated now, and I did some more changes to the > iplt tree with your email too. You may want to have a quick grep to > see the leftover uchicago places. I found two occurrences in web/old/search/labels.ss, but I don't know how those are used. > (BTW, I thought that it wasn't there because I'm so used to using the > Indexes option...) Yeah, they don't seem to like that here. It can be annoying. Robby > > > On Feb 19, Robby Findler wrote: >> Okay, it appears to all be there now. >> >> Robby >> >> On Thu, Feb 19, 2009 at 2:05 PM, Robby Findler >> wrote: >> > It looks like 200/plt/ is all there, eg: >> > >> > http://www.eecs.northwestern.edu/plt-scheme/200/plt/plt-200-src-win.zip >> > >> > Robby >> > >> > On Thu, Feb 19, 2009 at 1:59 PM, Eli Barzilay wrote: >> >> On Feb 19, Robby Findler wrote: >> >>> I'm sucking down the various downloads to start a new mirror at >> >>> Northwestern. Can someone update the web page to point to it? (It >> >>> should be done in about 20 minutes, I'm guessing.) >> >>> >> >>> This is the url: >> >>> >> >>> http://www.eecs.northwestern.edu/plt-scheme/ >> >> >> >> Are you sure that this is the correct url -- I get nothing there now. > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > From robby at eecs.northwestern.edu Thu Feb 19 15:51:47 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 15:52:07 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> Message-ID: <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> On Thu, Feb 19, 2009 at 2:50 PM, Grant Rettke wrote: > On Thu, Feb 19, 2009 at 12:12 PM, Eli Barzilay wrote: >> On Feb 19, Robby Findler wrote: >>> I think Eli's asking 'why not do (log-info (format "~s" >>> my-sexp))?'. Right? >> >> [Uh, yeah, but that looks so much boring...] > > Is (log-info-sexpr ...) less boring? > It is such a short macro; do we really need to add 3 more exports to scheme/base for that? Robby From eli at barzilay.org Thu Feb 19 15:53:48 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 15:54:18 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> Message-ID: <18845.50908.852381.615985@winooski.ccs.neu.edu> On Feb 19, Robby Findler wrote: > On Thu, Feb 19, 2009 at 2:50 PM, Grant Rettke wrote: > > On Thu, Feb 19, 2009 at 12:12 PM, Eli Barzilay wrote: > >> On Feb 19, Robby Findler wrote: > >>> I think Eli's asking 'why not do (log-info (format "~s" > >>> my-sexp))?'. Right? > >> > >> [Uh, yeah, but that looks so much boring...] > > > > Is (log-info-sexpr ...) less boring? > > It is such a short macro; do we really need to add 3 more exports to > scheme/base for that? +1 for not adding it, for exactly that reason. (It probbaly doesn't even have to always be a macro, since the sexpr will usually not be expensive to construct.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From eli at barzilay.org Thu Feb 19 15:57:22 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 15:57:43 2009 Subject: [plt-dev] moving the Chicago mirror In-Reply-To: <932b2f1f0902191251v67ac12bbm62e729748f5dd529@mail.gmail.com> References: <932b2f1f0902191157mc4f634aj9e04d80ce5f523c8@mail.gmail.com> <18845.47638.564166.187134@winooski.ccs.neu.edu> <932b2f1f0902191205p6725d87ds3e4faaf01fc9900@mail.gmail.com> <932b2f1f0902191233w5e285b3ayf1e301c70b669393@mail.gmail.com> <18845.50336.542393.445437@winooski.ccs.neu.edu> <932b2f1f0902191251v67ac12bbm62e729748f5dd529@mail.gmail.com> Message-ID: <18845.51122.668483.341702@winooski.ccs.neu.edu> On Feb 19, Robby Findler wrote: > On Thu, Feb 19, 2009 at 2:44 PM, Eli Barzilay wrote: > > Everything should be updated now, and I did some more changes to > > the iplt tree with your email too. You may want to have a quick > > grep to see the leftover uchicago places. > > I found two occurrences in web/old/search/labels.ss, but I don't > know how those are used. They're used to generate the search labels things -- for example, the search boxes at http://plt-scheme.org/map.html . But I'm not sure that there's need for them anymore. (It's on the list of things to do when converting the old style pages to the new one.) > > (BTW, I thought that it wasn't there because I'm so used to using > > the Indexes option...) > > Yeah, they don't seem to like that here. It can be annoying. Perhaps they allow users' .htaccess files to have Options Indexes (I usually just put Options Indexes FollowSymLinks ExecCGI in these files, with the philosophy of "I know what I'm doing".) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From cce at ccs.neu.edu Thu Feb 19 15:58:40 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Feb 19 15:58:58 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> Message-ID: <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> No, though I might have just triggered the theorem prover, which uses the same hook to compile the program as check syntax (drscheme:eval:expand-program), if that's relevant. --Carl On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler wrote: > Were you running check syntax? > > Robby > > On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund wrote: >> DrScheme gave me the error message in the subject -- I wish I had >> copied or screenshotted it, but I was so surprised to see it I just >> clicked "OK" to see what it would do, so I may have the wording >> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave me >> to "quit unexpectedly dialog") when I hit "OK". >> >> I don't recall doing anything intensive when that happened, I was just >> running a program I had run before (in Dracula). Anyone know what >> might have happened, or what further information I should look for to >> help diagnose this? >> >> -- >> Carl Eastlund From yinso.chen at gmail.com Thu Feb 19 16:00:41 2009 From: yinso.chen at gmail.com (YC) Date: Thu Feb 19 16:01:17 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <18845.50908.852381.615985@winooski.ccs.neu.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <18845.50908.852381.615985@winooski.ccs.neu.edu> Message-ID: <779bf2730902191300m2ae3c32fsd516fbb414c973b5@mail.gmail.com> On Thu, Feb 19, 2009 at 12:53 PM, Eli Barzilay wrote: > > It is such a short macro; do we really need to add 3 more exports to > > scheme/base for that? > > +1 for not adding it, for exactly that reason. (It probbaly doesn't > even have to always be a macro, since the sexpr will usually not be > expensive to construct.) > what if you want to do intermediate processing on the log before flushing it out to the stream? I think that's where logging sexp (or other objects) would be useful. For example, have the log receiver receiving a sexp and immediately handle the information contained in sexp without having to incur the cost of parsing. yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090219/b48433d3/attachment.html From grettke at acm.org Thu Feb 19 16:13:55 2009 From: grettke at acm.org (Grant Rettke) Date: Thu Feb 19 16:14:13 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> Message-ID: <756daca50902191313w3c3c11c1s2ad269ab916d3dc9@mail.gmail.com> On Thu, Feb 19, 2009 at 2:51 PM, Robby Findler wrote: > On Thu, Feb 19, 2009 at 2:50 PM, Grant Rettke wrote: >> Is (log-info-sexpr ...) less boring? >> > > It is such a short macro; do we really need to add 3 more exports to > scheme/base for that? Look at it this way: you guys, the experts on knowing how to do this "the right way", write it once and add three exports vs. everyone and their brother writing their own variation of it From neil at neilvandyke.org Thu Feb 19 16:09:03 2009 From: neil at neilvandyke.org (Neil Van Dyke) Date: Thu Feb 19 16:16:25 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <779bf2730902191300m2ae3c32fsd516fbb414c973b5@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <18845.50908.852381.615985@winooski.ccs.neu.edu> <779bf2730902191300m2ae3c32fsd516fbb414c973b5@mail.gmail.com> Message-ID: <499DCA6F.3010402@neilvandyke.org> I've found logging as sexps to be somewhat more convenient than strings, at least for debugging info. However, I'd want the formatting of sexps to strings to be done immediately, not asynchronously, lest values change in the meantime and compromise my debug info. From carl.eastlund at gmail.com Thu Feb 19 16:15:55 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Thu Feb 19 16:16:30 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <756daca50902191313w3c3c11c1s2ad269ab916d3dc9@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <756daca50902191313w3c3c11c1s2ad269ab916d3dc9@mail.gmail.com> Message-ID: <990e0c030902191315t329c89d6i3cce23d3a7102780@mail.gmail.com> On Thu, Feb 19, 2009 at 4:13 PM, Grant Rettke wrote: > On Thu, Feb 19, 2009 at 2:51 PM, Robby Findler > wrote: >> On Thu, Feb 19, 2009 at 2:50 PM, Grant Rettke wrote: >>> Is (log-info-sexpr ...) less boring? >>> >> >> It is such a short macro; do we really need to add 3 more exports to >> scheme/base for that? > > Look at it this way: > > you guys, the experts on knowing how to do this "the right way", write > it once and add three exports > > vs. > > everyone and their brother writing their own variation of it vs. Someone writes it in a planet package; everyone and their brother imports it. -- Carl Eastlund From eli at barzilay.org Thu Feb 19 16:17:19 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 16:17:56 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <779bf2730902191300m2ae3c32fsd516fbb414c973b5@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <18845.50908.852381.615985@winooski.ccs.neu.edu> <779bf2730902191300m2ae3c32fsd516fbb414c973b5@mail.gmail.com> Message-ID: <18845.52319.674523.154311@winooski.ccs.neu.edu> On Feb 19, YC wrote: > On Thu, Feb 19, 2009 at 12:53 PM, Eli Barzilay wrote: > > > > It is such a short macro; do we really need to add 3 more > > > exports to scheme/base for that? > > > > +1 for not adding it, for exactly that reason. (It probbaly > > doesn't even have to always be a macro, since the sexpr will > > usually not be expensive to construct.) > > what if you want to do intermediate processing on the log before > flushing it out to the stream? > > I think that's where logging sexp (or other objects) would be > useful. For example, have the log receiver receiving a sexp and > immediately handle the information contained in sexp without having > to incur the cost of parsing. There are at least two features of the current system that provide answers for this: the `log-info' and its friends are macros -- they don't do anything if there is no receiver, which makes it convenient to give them an argument that will do whatever processing you want to do. So you can pass around sexprs, and do whatever you want to do with them before you turn them into strings for the output. Also, `log-message' receives an argument that contains arbitrary information, which you can use to hook additional bits. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From yinso.chen at gmail.com Thu Feb 19 16:17:24 2009 From: yinso.chen at gmail.com (YC) Date: Thu Feb 19 16:18:01 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <499DCA6F.3010402@neilvandyke.org> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <18845.50908.852381.615985@winooski.ccs.neu.edu> <779bf2730902191300m2ae3c32fsd516fbb414c973b5@mail.gmail.com> <499DCA6F.3010402@neilvandyke.org> Message-ID: <779bf2730902191317w2cf65a2csd8a9a880e51c1d36@mail.gmail.com> On Thu, Feb 19, 2009 at 1:09 PM, Neil Van Dyke wrote: > I've found logging as sexps to be somewhat more convenient than strings, at > least for debugging info. > > However, I'd want the formatting of sexps to strings to be done > immediately, not asynchronously, lest values change in the meantime and > compromise my debug info. > > Hi Neil, can you elaborate a bit more on how would sexp and string differ in this case? Assuming your sexp contains only immutable objects, I am sure how the value (and assuming you are refering to the sexp itself) would change. Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090219/a3604aac/attachment.htm From yinso.chen at gmail.com Thu Feb 19 16:22:25 2009 From: yinso.chen at gmail.com (YC) Date: Thu Feb 19 16:23:01 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <18845.52319.674523.154311@winooski.ccs.neu.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <18845.50908.852381.615985@winooski.ccs.neu.edu> <779bf2730902191300m2ae3c32fsd516fbb414c973b5@mail.gmail.com> <18845.52319.674523.154311@winooski.ccs.neu.edu> Message-ID: <779bf2730902191322v3e83da84ga7c60860bb20e89b@mail.gmail.com> On Thu, Feb 19, 2009 at 1:17 PM, Eli Barzilay wrote: > > I think that's where logging sexp (or other objects) would be > > useful. For example, have the log receiver receiving a sexp and > > immediately handle the information contained in sexp without having > > to incur the cost of parsing. > > There are at least two features of the current system that provide > answers for this: the `log-info' and its friends are macros -- they > don't do anything if there is no receiver, which makes it convenient > to give them an argument that will do whatever processing you want to > do. So you can pass around sexprs, and do whatever you want to do > with them before you turn them into strings for the output. Also, > `log-message' receives an argument that contains arbitrary > information, which you can use to hook additional bits. > Okay - I'll look into how that works. Thanks, yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090219/a845c12a/attachment.html From grettke at acm.org Thu Feb 19 16:22:26 2009 From: grettke at acm.org (Grant Rettke) Date: Thu Feb 19 16:23:06 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <990e0c030902191315t329c89d6i3cce23d3a7102780@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <756daca50902191313w3c3c11c1s2ad269ab916d3dc9@mail.gmail.com> <990e0c030902191315t329c89d6i3cce23d3a7102780@mail.gmail.com> Message-ID: <756daca50902191322r8c335f1wc4f8fe2bd937e0e0@mail.gmail.com> On Thu, Feb 19, 2009 at 3:15 PM, Carl Eastlund wrote: > Someone writes it in a planet package; everyone and their brother imports it. Put it in the language itself and everyone doesn't have to go through the hassle. PLaneT is great; but PLT is all about "batteries included" isn't it? From robby at eecs.northwestern.edu Thu Feb 19 16:34:47 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 16:35:22 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> Message-ID: <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> I asked because check syntax doesn't install memory limits when it runs, only run does. Perhaps your tool is doing the same thing? Robby On Thu, Feb 19, 2009 at 2:58 PM, Carl Eastlund wrote: > No, though I might have just triggered the theorem prover, which uses > the same hook to compile the program as check syntax > (drscheme:eval:expand-program), if that's relevant. > > --Carl > > On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler > wrote: >> Were you running check syntax? >> >> Robby >> >> On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund wrote: >>> DrScheme gave me the error message in the subject -- I wish I had >>> copied or screenshotted it, but I was so surprised to see it I just >>> clicked "OK" to see what it would do, so I may have the wording >>> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave me >>> to "quit unexpectedly dialog") when I hit "OK". >>> >>> I don't recall doing anything intensive when that happened, I was just >>> running a program I had run before (in Dracula). Anyone know what >>> might have happened, or what further information I should look for to >>> help diagnose this? >>> >>> -- >>> Carl Eastlund > From dherman at ccs.neu.edu Thu Feb 19 16:34:31 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Feb 19 16:35:26 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <990e0c030902191315t329c89d6i3cce23d3a7102780@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <756daca50902191313w3c3c11c1s2ad269ab916d3dc9@mail.gmail.com> <990e0c030902191315t329c89d6i3cce23d3a7102780@mail.gmail.com> Message-ID: <499DD067.20707@ccs.neu.edu> > vs. > > Someone writes it in a planet package; everyone and their brother imports it. (define-syntax-rule (log-info-sexp sexp) (log-info (format "~v" sexp))) is actually easier to write and remember than (require (planet cce/logging-utils:4/sexp)) and they're both just annoying enough to noticeably degrade the convenience of logging. I would put down my preference at something like having a `current-log-formatter' parameter of type (any -> string) whose default value is (lambda (x) (format "~v" x)) but that could be replaced by the identity function if you want to choose your own format. But this isn't up to me; I'll bow out now. Dave From mflatt at cs.utah.edu Thu Feb 19 16:36:33 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Feb 19 16:36:52 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> Message-ID: <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> At Thu, 19 Feb 2009 14:51:47 -0600, Robby Findler wrote: > On Thu, Feb 19, 2009 at 2:50 PM, Grant Rettke wrote: > > On Thu, Feb 19, 2009 at 12:12 PM, Eli Barzilay wrote: > >> On Feb 19, Robby Findler wrote: > >>> I think Eli's asking 'why not do (log-info (format "~s" > >>> my-sexp))?'. Right? > >> > >> [Uh, yeah, but that looks so much boring...] > > > > Is (log-info-sexpr ...) less boring? > > > > It is such a short macro; do we really need to add 3 more exports to > scheme/base for that? Maybe it's not that `log-message' needs to change, but that the `log-error', etc. forms make the wrong thing easy. Currently, (log-error expr) expands to (let ([l (current-logger)]) (when (log-level? l 'error) (log-message l 'error expr (current-continuation-marks)))) What if we change it to (let ([l (current-logger)]) (when (log-level? l 'error) (let ([v expr]) (log-message l 'error (format "~s" v) v)))) ? This changes both the formatting and the value supplied to log receivers by `log-error'. Programmers who want more control over the message and data can still use `log-message'. From robby at eecs.northwestern.edu Thu Feb 19 16:39:04 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 16:39:37 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0902191339j4a13dd43o9c0b0b256b9e5ec4@mail.gmail.com> What was the intention of putting the current-continuation-marks into the log? Robby On Thu, Feb 19, 2009 at 3:36 PM, Matthew Flatt wrote: > At Thu, 19 Feb 2009 14:51:47 -0600, Robby Findler wrote: >> On Thu, Feb 19, 2009 at 2:50 PM, Grant Rettke wrote: >> > On Thu, Feb 19, 2009 at 12:12 PM, Eli Barzilay wrote: >> >> On Feb 19, Robby Findler wrote: >> >>> I think Eli's asking 'why not do (log-info (format "~s" >> >>> my-sexp))?'. Right? >> >> >> >> [Uh, yeah, but that looks so much boring...] >> > >> > Is (log-info-sexpr ...) less boring? >> > >> >> It is such a short macro; do we really need to add 3 more exports to >> scheme/base for that? > > Maybe it's not that `log-message' needs to change, but that the > `log-error', etc. forms make the wrong thing easy. > > Currently, > > (log-error expr) > > expands to > > (let ([l (current-logger)]) > (when (log-level? l 'error) > (log-message l 'error expr (current-continuation-marks)))) > > > What if we change it to > > (let ([l (current-logger)]) > (when (log-level? l 'error) > (let ([v expr]) > (log-message l 'error (format "~s" v) v)))) > > ? > > This changes both the formatting and the value supplied to log > receivers by `log-error'. Programmers who want more control over the > message and data can still use `log-message'. > > From cce at ccs.neu.edu Thu Feb 19 16:41:36 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Feb 19 16:41:54 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> Message-ID: <990e0c030902191341w2a7d145bra8df5c351b636c5e@mail.gmail.com> I have memory limits turned off anyway, because it used to be that if I ran something that triggered a planet package install the memory limit would crash the install and leave my planet cache in a bad state. It may be that's no longer the case, and I should put the memory limit back on. Nevertheless, since I run with unlimited memory, the fact that I ran out before I hit an artificial limit doesn't indicate where the bug happened. --Carl On Thu, Feb 19, 2009 at 4:34 PM, Robby Findler wrote: > I asked because check syntax doesn't install memory limits when it > runs, only run does. Perhaps your tool is doing the same thing? > > Robby > > On Thu, Feb 19, 2009 at 2:58 PM, Carl Eastlund wrote: >> No, though I might have just triggered the theorem prover, which uses >> the same hook to compile the program as check syntax >> (drscheme:eval:expand-program), if that's relevant. >> >> --Carl >> >> On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler >> wrote: >>> Were you running check syntax? >>> >>> Robby >>> >>> On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund wrote: >>>> DrScheme gave me the error message in the subject -- I wish I had >>>> copied or screenshotted it, but I was so surprised to see it I just >>>> clicked "OK" to see what it would do, so I may have the wording >>>> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave me >>>> to "quit unexpectedly dialog") when I hit "OK". >>>> >>>> I don't recall doing anything intensive when that happened, I was just >>>> running a program I had run before (in Dracula). Anyone know what >>>> might have happened, or what further information I should look for to >>>> help diagnose this? >>>> >>>> -- >>>> Carl Eastlund From dherman at ccs.neu.edu Thu Feb 19 16:41:38 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Thu Feb 19 16:42:25 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> Message-ID: <499DD212.6080706@ccs.neu.edu> +1 Matthew Flatt wrote: > At Thu, 19 Feb 2009 14:51:47 -0600, Robby Findler wrote: >> On Thu, Feb 19, 2009 at 2:50 PM, Grant Rettke wrote: >>> On Thu, Feb 19, 2009 at 12:12 PM, Eli Barzilay wrote: >>>> On Feb 19, Robby Findler wrote: >>>>> I think Eli's asking 'why not do (log-info (format "~s" >>>>> my-sexp))?'. Right? >>>> [Uh, yeah, but that looks so much boring...] >>> Is (log-info-sexpr ...) less boring? >>> >> It is such a short macro; do we really need to add 3 more exports to >> scheme/base for that? > > Maybe it's not that `log-message' needs to change, but that the > `log-error', etc. forms make the wrong thing easy. > > Currently, > > (log-error expr) > > expands to > > (let ([l (current-logger)]) > (when (log-level? l 'error) > (log-message l 'error expr (current-continuation-marks)))) > > > What if we change it to > > (let ([l (current-logger)]) > (when (log-level? l 'error) > (let ([v expr]) > (log-message l 'error (format "~s" v) v)))) > > ? > > This changes both the formatting and the value supplied to log > receivers by `log-error'. Programmers who want more control over the > message and data can still use `log-message'. > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From eli at barzilay.org Thu Feb 19 16:42:25 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 16:42:49 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> Message-ID: <18845.53825.587953.486244@winooski.ccs.neu.edu> On Feb 19, Matthew Flatt wrote: > > What if we change it to > > (let ([l (current-logger)]) > (when (log-level? l 'error) > (let ([v expr]) > (log-message l 'error (format "~s" v) v)))) > > ? > > This changes both the formatting and the value supplied to log > receivers by `log-error'. Programmers who want more control over the > message and data can still use `log-message'. This looks to me like it will make (log-error "something bad happened") a very common mistake. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From carl.eastlund at gmail.com Thu Feb 19 16:45:09 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Thu Feb 19 16:45:28 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> Message-ID: <990e0c030902191345y47098a61xd108bcf421a156f3@mail.gmail.com> On Thu, Feb 19, 2009 at 4:36 PM, Matthew Flatt wrote: > > Maybe it's not that `log-message' needs to change, but that the > `log-error', etc. forms make the wrong thing easy. > > Currently, > > (log-error expr) > > expands to > > (let ([l (current-logger)]) > (when (log-level? l 'error) > (log-message l 'error expr (current-continuation-marks)))) > > > What if we change it to > > (let ([l (current-logger)]) > (when (log-level? l 'error) > (let ([v expr]) > (log-message l 'error (format "~s" v) v)))) > > ? > > This changes both the formatting and the value supplied to log > receivers by `log-error'. Programmers who want more control over the > message and data can still use `log-message'. Why not make log-error more like error and printf, such that you can write: (log-error "I got a bad value: ~s" v) If we're going to use format under the hood anyway, let's give the user the benefit. -- Carl Eastlund From rafkind at cs.utah.edu Thu Feb 19 16:46:03 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Thu Feb 19 16:46:21 2009 Subject: [plt-dev] documentation enhancements Message-ID: <499DD31B.5020508@cs.utah.edu> Two things would make the documentation much better 1. Always give the collection/library that a definition is part of. Some parts of the documentation say (require ...) at the top but not all do. In the end I resort to grep -r to figure out which collection to include. Adding the collection name seems like it could be done automatically. 2. More examples would help (and yes I said I would write them before but now I'm really going to do it) but I can see how some people would find them annoying. Hiding them at first behind a div tag and a link that unhides them might be a good option. I think this is reasonable since the documentation already heavily uses javascript. From mflatt at cs.utah.edu Thu Feb 19 16:49:00 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Feb 19 16:49:20 2009 Subject: [plt-dev] documentation enhancements In-Reply-To: <499DD31B.5020508@cs.utah.edu> References: <499DD31B.5020508@cs.utah.edu> Message-ID: <20090219214901.437486500C8@mail-svr1.cs.utah.edu> At Thu, 19 Feb 2009 14:46:03 -0700, Jon Rafkind wrote: > Two things would make the documentation much better > 1. Always give the collection/library that a definition is part of. Some > parts of the documentation say (require ...) at the top but not all do. > In the end I resort to grep -r to figure out which collection to > include. Adding the collection name seems like it could be done > automatically. Let the mouse hover over a defined name, and a pop up tell you where it comes from. I tried a couple of times to squeeze the name of the exporting library into the definition box, but it looked too noisy to me. Specific suggestions are welcome. > 2. More examples would help (and yes I said I would write them before > but now I'm really going to do it) but I can see how some people would > find them annoying. Hiding them at first behind a div tag and a link > that unhides them might be a good option. I think this is reasonable > since the documentation already heavily uses javascript. I think there's little danger of examples being annoying. From rafkind at cs.utah.edu Thu Feb 19 16:51:54 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Thu Feb 19 16:52:15 2009 Subject: [plt-dev] documentation enhancements In-Reply-To: <20090219214901.437486500C8@mail-svr1.cs.utah.edu> References: <499DD31B.5020508@cs.utah.edu> <20090219214901.437486500C8@mail-svr1.cs.utah.edu> Message-ID: <499DD47A.7060607@cs.utah.edu> Matthew Flatt wrote: > At Thu, 19 Feb 2009 14:46:03 -0700, Jon Rafkind wrote: > >> Two things would make the documentation much better >> 1. Always give the collection/library that a definition is part of. Some >> parts of the documentation say (require ...) at the top but not all do. >> In the end I resort to grep -r to figure out which collection to >> include. Adding the collection name seems like it could be done >> automatically. >> > > Let the mouse hover over a defined name, and a pop up tell you where it > comes from. > > Ah, awesome. Advertising this somewhere on each page would be good. (All magic should be advertised..) From eli at barzilay.org Thu Feb 19 16:52:29 2009 From: eli at barzilay.org (Eli Barzilay) Date: Thu Feb 19 16:53:07 2009 Subject: [plt-dev] documentation enhancements In-Reply-To: <20090219214901.437486500C8@mail-svr1.cs.utah.edu> References: <499DD31B.5020508@cs.utah.edu> <20090219214901.437486500C8@mail-svr1.cs.utah.edu> Message-ID: <18845.54429.306976.503261@winooski.ccs.neu.edu> On Feb 19, Matthew Flatt wrote: > At Thu, 19 Feb 2009 14:46:03 -0700, Jon Rafkind wrote: > > > 2. More examples would help (and yes I said I would write them > > before but now I'm really going to do it) but I can see how some > > people would find them annoying. Hiding them at first behind a div > > tag and a link that unhides them might be a good option. I think > > this is reasonable since the documentation already heavily uses > > javascript. > > I think there's little danger of examples being annoying. I'd second that -- *if* we get to a state where there are too many examples, then it will be easy to add an html hack that hides them. (Similar JS code is already there in the top-left TOC box.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mflatt at cs.utah.edu Thu Feb 19 16:52:32 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Thu Feb 19 16:53:10 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <990e0c030902191345y47098a61xd108bcf421a156f3@mail.gmail.com> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> <990e0c030902191345y47098a61xd108bcf421a156f3@mail.gmail.com> Message-ID: <20090219215232.DFBC56500CB@mail-svr1.cs.utah.edu> At Thu, 19 Feb 2009 16:45:09 -0500, Carl Eastlund wrote: > On Thu, Feb 19, 2009 at 4:36 PM, Matthew Flatt wrote: > > > > Maybe it's not that `log-message' needs to change, but that the > > `log-error', etc. forms make the wrong thing easy. > > > > Currently, > > > > (log-error expr) > > > > expands to > > > > (let ([l (current-logger)]) > > (when (log-level? l 'error) > > (log-message l 'error expr (current-continuation-marks)))) > > > > > > What if we change it to > > > > (let ([l (current-logger)]) > > (when (log-level? l 'error) > > (let ([v expr]) > > (log-message l 'error (format "~s" v) v)))) > > > > ? > > > > This changes both the formatting and the value supplied to log > > receivers by `log-error'. Programmers who want more control over the > > message and data can still use `log-message'. > > Why not make log-error more like error and printf, such that you can write: > > (log-error "I got a bad value: ~s" v) > > If we're going to use format under the hood anyway, let's give the > user the benefit. Technically, that adds an error-checking burden to `log-error', in case the format string and arguments don't match. One day, I hope, we'll figure out a consistent way to tell functions like `printf' that it should complain about mismatches on behalf of someone else, like `log-error'. From robby at eecs.northwestern.edu Thu Feb 19 16:55:13 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 16:55:31 2009 Subject: [plt-dev] logging: strings vs. sexps In-Reply-To: <20090219215232.DFBC56500CB@mail-svr1.cs.utah.edu> References: <499D8CD6.5080301@ccs.neu.edu> <18845.40954.250868.533068@winooski.ccs.neu.edu> <932b2f1f0902191011g6b6d6bffv632e21331304f1ea@mail.gmail.com> <18845.41230.836267.436575@winooski.ccs.neu.edu> <756daca50902191250j29ceb243hfc605f1ebe2ebd3f@mail.gmail.com> <932b2f1f0902191251y1ef3b331u6c9c60e8f084874@mail.gmail.com> <20090219213633.8B2B66500AC@mail-svr1.cs.utah.edu> <990e0c030902191345y47098a61xd108bcf421a156f3@mail.gmail.com> <20090219215232.DFBC56500CB@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0902191355h29c8b8eehf27c0cf2a5718059@mail.gmail.com> Blame for the mzscheme primitives! Yeah! Robby On Thu, Feb 19, 2009 at 3:52 PM, Matthew Flatt wrote: > At Thu, 19 Feb 2009 16:45:09 -0500, Carl Eastlund wrote: >> On Thu, Feb 19, 2009 at 4:36 PM, Matthew Flatt wrote: >> > >> > Maybe it's not that `log-message' needs to change, but that the >> > `log-error', etc. forms make the wrong thing easy. >> > >> > Currently, >> > >> > (log-error expr) >> > >> > expands to >> > >> > (let ([l (current-logger)]) >> > (when (log-level? l 'error) >> > (log-message l 'error expr (current-continuation-marks)))) >> > >> > >> > What if we change it to >> > >> > (let ([l (current-logger)]) >> > (when (log-level? l 'error) >> > (let ([v expr]) >> > (log-message l 'error (format "~s" v) v)))) >> > >> > ? >> > >> > This changes both the formatting and the value supplied to log >> > receivers by `log-error'. Programmers who want more control over the >> > message and data can still use `log-message'. >> >> Why not make log-error more like error and printf, such that you can write: >> >> (log-error "I got a bad value: ~s" v) >> >> If we're going to use format under the hood anyway, let's give the >> user the benefit. > > Technically, that adds an error-checking burden to `log-error', in case > the format string and arguments don't match. > One day, I hope, we'll > figure out a consistent way to tell functions like `printf' that it > should complain about mismatches on behalf of someone else, like > `log-error'. > > From robby at eecs.northwestern.edu Thu Feb 19 18:11:31 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 18:11:50 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <990e0c030902191341w2a7d145bra8df5c351b636c5e@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> <990e0c030902191341w2a7d145bra8df5c351b636c5e@mail.gmail.com> Message-ID: <932b2f1f0902191511p5179f41fn918e45c0b6f655c@mail.gmail.com> That is the out of memory message no ...? I'm confused. On 2/19/09, Carl Eastlund wrote: > I have memory limits turned off anyway, because it used to be that if > I ran something that triggered a planet package install the memory > limit would crash the install and leave my planet cache in a bad > state. It may be that's no longer the case, and I should put the > memory limit back on. Nevertheless, since I run with unlimited > memory, the fact that I ran out before I hit an artificial limit > doesn't indicate where the bug happened. > > --Carl > > On Thu, Feb 19, 2009 at 4:34 PM, Robby Findler > wrote: >> I asked because check syntax doesn't install memory limits when it >> runs, only run does. Perhaps your tool is doing the same thing? >> >> Robby >> >> On Thu, Feb 19, 2009 at 2:58 PM, Carl Eastlund wrote: >>> No, though I might have just triggered the theorem prover, which uses >>> the same hook to compile the program as check syntax >>> (drscheme:eval:expand-program), if that's relevant. >>> >>> --Carl >>> >>> On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler >>> wrote: >>>> Were you running check syntax? >>>> >>>> Robby >>>> >>>> On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund wrote: >>>>> DrScheme gave me the error message in the subject -- I wish I had >>>>> copied or screenshotted it, but I was so surprised to see it I just >>>>> clicked "OK" to see what it would do, so I may have the wording >>>>> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave me >>>>> to "quit unexpectedly dialog") when I hit "OK". >>>>> >>>>> I don't recall doing anything intensive when that happened, I was just >>>>> running a program I had run before (in Dracula). Anyone know what >>>>> might have happened, or what further information I should look for to >>>>> help diagnose this? >>>>> >>>>> -- >>>>> Carl Eastlund > From cce at ccs.neu.edu Thu Feb 19 18:19:25 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Feb 19 18:19:42 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <932b2f1f0902191511p5179f41fn918e45c0b6f655c@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> <990e0c030902191341w2a7d145bra8df5c351b636c5e@mail.gmail.com> <932b2f1f0902191511p5179f41fn918e45c0b6f655c@mail.gmail.com> Message-ID: <990e0c030902191519p3f407be9ic21e01922d32611d@mail.gmail.com> There are two notions of out of memory... there's the case where the computer is literally out of memory, and there is the case where DrScheme has hit the artificial limit imposed by the "Scheme > Limit Memory ..." menu option. When DrScheme hits the artificial limit, it offers the user the chance to raise the memory limit. I have no such artificial limit set, and DrScheme offered no such option. I thought you were saying that my error likely came from check syntax because otherwise I would have hit an artificial limit earlier and been offered the chance to raise the limit. I was saying that I don't have that limit set, so I can run out of memory completely even from the regular "run" button. If that's not what you were getting at, now I'm confused about what you were saying. --Carl On Thu, Feb 19, 2009 at 6:11 PM, Robby Findler wrote: > That is the out of memory message no ...? I'm confused. > > On 2/19/09, Carl Eastlund wrote: >> I have memory limits turned off anyway, because it used to be that if >> I ran something that triggered a planet package install the memory >> limit would crash the install and leave my planet cache in a bad >> state. It may be that's no longer the case, and I should put the >> memory limit back on. Nevertheless, since I run with unlimited >> memory, the fact that I ran out before I hit an artificial limit >> doesn't indicate where the bug happened. >> >> --Carl >> >> On Thu, Feb 19, 2009 at 4:34 PM, Robby Findler >> wrote: >>> I asked because check syntax doesn't install memory limits when it >>> runs, only run does. Perhaps your tool is doing the same thing? >>> >>> Robby >>> >>> On Thu, Feb 19, 2009 at 2:58 PM, Carl Eastlund wrote: >>>> No, though I might have just triggered the theorem prover, which uses >>>> the same hook to compile the program as check syntax >>>> (drscheme:eval:expand-program), if that's relevant. >>>> >>>> --Carl >>>> >>>> On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler >>>> wrote: >>>>> Were you running check syntax? >>>>> >>>>> Robby >>>>> >>>>> On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund wrote: >>>>>> DrScheme gave me the error message in the subject -- I wish I had >>>>>> copied or screenshotted it, but I was so surprised to see it I just >>>>>> clicked "OK" to see what it would do, so I may have the wording >>>>>> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave me >>>>>> to "quit unexpectedly dialog") when I hit "OK". >>>>>> >>>>>> I don't recall doing anything intensive when that happened, I was just >>>>>> running a program I had run before (in Dracula). Anyone know what >>>>>> might have happened, or what further information I should look for to >>>>>> help diagnose this? >>>>>> >>>>>> -- >>>>>> Carl Eastlund From robby at eecs.northwestern.edu Thu Feb 19 18:22:10 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 18:22:29 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <990e0c030902191519p3f407be9ic21e01922d32611d@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> <990e0c030902191341w2a7d145bra8df5c351b636c5e@mail.gmail.com> <932b2f1f0902191511p5179f41fn918e45c0b6f655c@mail.gmail.com> <990e0c030902191519p3f407be9ic21e01922d32611d@mail.gmail.com> Message-ID: <932b2f1f0902191522k692b160egdaac6c2be506b396@mail.gmail.com> I'm saying you got that message because your program allocated too much. Robby On 2/19/09, Carl Eastlund wrote: > There are two notions of out of memory... there's the case where the > computer is literally out of memory, and there is the case where > DrScheme has hit the artificial limit imposed by the "Scheme > Limit > Memory ..." menu option. When DrScheme hits the artificial limit, it > offers the user the chance to raise the memory limit. I have no such > artificial limit set, and DrScheme offered no such option. > > I thought you were saying that my error likely came from check syntax > because otherwise I would have hit an artificial limit earlier and > been offered the chance to raise the limit. I was saying that I don't > have that limit set, so I can run out of memory completely even from > the regular "run" button. > > If that's not what you were getting at, now I'm confused about what > you were saying. > > --Carl > > On Thu, Feb 19, 2009 at 6:11 PM, Robby Findler > wrote: >> That is the out of memory message no ...? I'm confused. >> >> On 2/19/09, Carl Eastlund wrote: >>> I have memory limits turned off anyway, because it used to be that if >>> I ran something that triggered a planet package install the memory >>> limit would crash the install and leave my planet cache in a bad >>> state. It may be that's no longer the case, and I should put the >>> memory limit back on. Nevertheless, since I run with unlimited >>> memory, the fact that I ran out before I hit an artificial limit >>> doesn't indicate where the bug happened. >>> >>> --Carl >>> >>> On Thu, Feb 19, 2009 at 4:34 PM, Robby Findler >>> wrote: >>>> I asked because check syntax doesn't install memory limits when it >>>> runs, only run does. Perhaps your tool is doing the same thing? >>>> >>>> Robby >>>> >>>> On Thu, Feb 19, 2009 at 2:58 PM, Carl Eastlund wrote: >>>>> No, though I might have just triggered the theorem prover, which uses >>>>> the same hook to compile the program as check syntax >>>>> (drscheme:eval:expand-program), if that's relevant. >>>>> >>>>> --Carl >>>>> >>>>> On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler >>>>> wrote: >>>>>> Were you running check syntax? >>>>>> >>>>>> Robby >>>>>> >>>>>> On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund >>>>>> wrote: >>>>>>> DrScheme gave me the error message in the subject -- I wish I had >>>>>>> copied or screenshotted it, but I was so surprised to see it I just >>>>>>> clicked "OK" to see what it would do, so I may have the wording >>>>>>> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave >>>>>>> me >>>>>>> to "quit unexpectedly dialog") when I hit "OK". >>>>>>> >>>>>>> I don't recall doing anything intensive when that happened, I was >>>>>>> just >>>>>>> running a program I had run before (in Dracula). Anyone know what >>>>>>> might have happened, or what further information I should look for to >>>>>>> help diagnose this? >>>>>>> >>>>>>> -- >>>>>>> Carl Eastlund > From cce at ccs.neu.edu Thu Feb 19 18:28:34 2009 From: cce at ccs.neu.edu (Carl Eastlund) Date: Thu Feb 19 18:28:52 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <932b2f1f0902191522k692b160egdaac6c2be506b396@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> <990e0c030902191341w2a7d145bra8df5c351b636c5e@mail.gmail.com> <932b2f1f0902191511p5179f41fn918e45c0b6f655c@mail.gmail.com> <990e0c030902191519p3f407be9ic21e01922d32611d@mail.gmail.com> <932b2f1f0902191522k692b160egdaac6c2be506b396@mail.gmail.com> Message-ID: <990e0c030902191528w4827dc17x9e4755c3e8a740d0@mail.gmail.com> I see. And yes, thinking about it now, I have a suspicion where the Dracula/ACL2 communication may be running up large amounts of memory. I'll keep it in mind if this happens again. Thanks for the suggestion. --Carl On Thu, Feb 19, 2009 at 6:22 PM, Robby Findler wrote: > I'm saying you got that message because your program allocated too much. > > Robby > > On 2/19/09, Carl Eastlund wrote: >> There are two notions of out of memory... there's the case where the >> computer is literally out of memory, and there is the case where >> DrScheme has hit the artificial limit imposed by the "Scheme > Limit >> Memory ..." menu option. When DrScheme hits the artificial limit, it >> offers the user the chance to raise the memory limit. I have no such >> artificial limit set, and DrScheme offered no such option. >> >> I thought you were saying that my error likely came from check syntax >> because otherwise I would have hit an artificial limit earlier and >> been offered the chance to raise the limit. I was saying that I don't >> have that limit set, so I can run out of memory completely even from >> the regular "run" button. >> >> If that's not what you were getting at, now I'm confused about what >> you were saying. >> >> --Carl >> >> On Thu, Feb 19, 2009 at 6:11 PM, Robby Findler >> wrote: >>> That is the out of memory message no ...? I'm confused. >>> >>> On 2/19/09, Carl Eastlund wrote: >>>> I have memory limits turned off anyway, because it used to be that if >>>> I ran something that triggered a planet package install the memory >>>> limit would crash the install and leave my planet cache in a bad >>>> state. It may be that's no longer the case, and I should put the >>>> memory limit back on. Nevertheless, since I run with unlimited >>>> memory, the fact that I ran out before I hit an artificial limit >>>> doesn't indicate where the bug happened. >>>> >>>> --Carl >>>> >>>> On Thu, Feb 19, 2009 at 4:34 PM, Robby Findler >>>> wrote: >>>>> I asked because check syntax doesn't install memory limits when it >>>>> runs, only run does. Perhaps your tool is doing the same thing? >>>>> >>>>> Robby >>>>> >>>>> On Thu, Feb 19, 2009 at 2:58 PM, Carl Eastlund wrote: >>>>>> No, though I might have just triggered the theorem prover, which uses >>>>>> the same hook to compile the program as check syntax >>>>>> (drscheme:eval:expand-program), if that's relevant. >>>>>> >>>>>> --Carl >>>>>> >>>>>> On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler >>>>>> wrote: >>>>>>> Were you running check syntax? >>>>>>> >>>>>>> Robby >>>>>>> >>>>>>> On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund >>>>>>> wrote: >>>>>>>> DrScheme gave me the error message in the subject -- I wish I had >>>>>>>> copied or screenshotted it, but I was so surprised to see it I just >>>>>>>> clicked "OK" to see what it would do, so I may have the wording >>>>>>>> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave >>>>>>>> me >>>>>>>> to "quit unexpectedly dialog") when I hit "OK". >>>>>>>> >>>>>>>> I don't recall doing anything intensive when that happened, I was >>>>>>>> just >>>>>>>> running a program I had run before (in Dracula). Anyone know what >>>>>>>> might have happened, or what further information I should look for to >>>>>>>> help diagnose this? >>>>>>>> >>>>>>>> -- >>>>>>>> Carl Eastlund From robby at eecs.northwestern.edu Thu Feb 19 18:37:49 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Thu Feb 19 18:38:08 2009 Subject: [plt-dev] "The PLT Virtual Machine is out of memory. Aborting." In-Reply-To: <990e0c030902191528w4827dc17x9e4755c3e8a740d0@mail.gmail.com> References: <990e0c030902191228k23de83dckaeb8b9ef3eeb3176@mail.gmail.com> <932b2f1f0902191232s1ee2fc2bga253eefc1013b799@mail.gmail.com> <990e0c030902191258n70956034k3dc7a7c867a52b52@mail.gmail.com> <932b2f1f0902191334q12b73d7cje5e12aa2ad056c65@mail.gmail.com> <990e0c030902191341w2a7d145bra8df5c351b636c5e@mail.gmail.com> <932b2f1f0902191511p5179f41fn918e45c0b6f655c@mail.gmail.com> <990e0c030902191519p3f407be9ic21e01922d32611d@mail.gmail.com> <932b2f1f0902191522k692b160egdaac6c2be506b396@mail.gmail.com> <990e0c030902191528w4827dc17x9e4755c3e8a740d0@mail.gmail.com> Message-ID: <932b2f1f0902191537s24263831m2f19de0a79b52aaa@mail.gmail.com> Matthew's usual trick for tracking down memory leaks is to put a will-executor into your data structure (the one you think is leaking) and then use one of the alternative collectors that lets you track down all of the paths from a root to the will-executors in the system. Identify yours and why there is a connection. (You can do this with any primitive type, but will-executors are relatively unused so that's why they tend to work well.) This isn't the easiest job, tho ... Robby On Thu, Feb 19, 2009 at 5:28 PM, Carl Eastlund wrote: > I see. And yes, thinking about it now, I have a suspicion where the > Dracula/ACL2 communication may be running up large amounts of memory. > I'll keep it in mind if this happens again. Thanks for the > suggestion. > > --Carl > > On Thu, Feb 19, 2009 at 6:22 PM, Robby Findler > wrote: >> I'm saying you got that message because your program allocated too much. >> >> Robby >> >> On 2/19/09, Carl Eastlund wrote: >>> There are two notions of out of memory... there's the case where the >>> computer is literally out of memory, and there is the case where >>> DrScheme has hit the artificial limit imposed by the "Scheme > Limit >>> Memory ..." menu option. When DrScheme hits the artificial limit, it >>> offers the user the chance to raise the memory limit. I have no such >>> artificial limit set, and DrScheme offered no such option. >>> >>> I thought you were saying that my error likely came from check syntax >>> because otherwise I would have hit an artificial limit earlier and >>> been offered the chance to raise the limit. I was saying that I don't >>> have that limit set, so I can run out of memory completely even from >>> the regular "run" button. >>> >>> If that's not what you were getting at, now I'm confused about what >>> you were saying. >>> >>> --Carl >>> >>> On Thu, Feb 19, 2009 at 6:11 PM, Robby Findler >>> wrote: >>>> That is the out of memory message no ...? I'm confused. >>>> >>>> On 2/19/09, Carl Eastlund wrote: >>>>> I have memory limits turned off anyway, because it used to be that if >>>>> I ran something that triggered a planet package install the memory >>>>> limit would crash the install and leave my planet cache in a bad >>>>> state. It may be that's no longer the case, and I should put the >>>>> memory limit back on. Nevertheless, since I run with unlimited >>>>> memory, the fact that I ran out before I hit an artificial limit >>>>> doesn't indicate where the bug happened. >>>>> >>>>> --Carl >>>>> >>>>> On Thu, Feb 19, 2009 at 4:34 PM, Robby Findler >>>>> wrote: >>>>>> I asked because check syntax doesn't install memory limits when it >>>>>> runs, only run does. Perhaps your tool is doing the same thing? >>>>>> >>>>>> Robby >>>>>> >>>>>> On Thu, Feb 19, 2009 at 2:58 PM, Carl Eastlund wrote: >>>>>>> No, though I might have just triggered the theorem prover, which uses >>>>>>> the same hook to compile the program as check syntax >>>>>>> (drscheme:eval:expand-program), if that's relevant. >>>>>>> >>>>>>> --Carl >>>>>>> >>>>>>> On Thu, Feb 19, 2009 at 3:32 PM, Robby Findler >>>>>>> wrote: >>>>>>>> Were you running check syntax? >>>>>>>> >>>>>>>> Robby >>>>>>>> >>>>>>>> On Thu, Feb 19, 2009 at 2:28 PM, Carl Eastlund >>>>>>>> wrote: >>>>>>>>> DrScheme gave me the error message in the subject -- I wish I had >>>>>>>>> copied or screenshotted it, but I was so surprised to see it I just >>>>>>>>> clicked "OK" to see what it would do, so I may have the wording >>>>>>>>> slightly wrong. Anyway, DrScheme promptly crashed (and Mac OS gave >>>>>>>>> me >>>>>>>>> to "quit unexpectedly dialog") when I hit "OK". >>>>>>>>> >>>>>>>>> I don't recall doing anything intensive when that happened, I was >>>>>>>>> just >>>>>>>>> running a program I had run before (in Dracula). Anyone know what >>>>>>>>> might have happened, or what further information I should look for to >>>>>>>>> help diagnose this? >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Carl Eastlund > From samth at ccs.neu.edu Sat Feb 21 14:34:24 2009 From: samth at ccs.neu.edu (Sam TH) Date: Sat Feb 21 14:34:42 2009 Subject: [plt-dev] dependent case-lambda contracts Message-ID: <63bb19ae0902211134s3e9c8021qa90486c57177370c@mail.gmail.com> I'd like to write a contract like this: (case-> (-> number? number?) (->d ([n number?] [s1 symbol?] [s2 (lambda (e) (eq? s1 e))]) () [_ number?])) What's the best way to do this, since `case->' doesn't support `->d'? Thanks, -- sam th samth@ccs.neu.edu From grettke at acm.org Sat Feb 21 15:51:58 2009 From: grettke at acm.org (Grant Rettke) Date: Sat Feb 21 15:52:16 2009 Subject: [plt-dev] Documenting planet packages In-Reply-To: <990e0c030902131107g1d46c764x30897cafc750c6b4@mail.gmail.com> References: <990e0c030902131107g1d46c764x30897cafc750c6b4@mail.gmail.com> Message-ID: <756daca50902211251s7c8d39den2c8e2fc7e5af081c@mail.gmail.com> On Fri, Feb 13, 2009 at 1:07 PM, Carl Eastlund wrote: > Yesterday I released (planet cce/scheme:3:0), including three new > macros for Scribble documentation: schememodname/this-package, > defmodule/this-package, and declare-exporting/this-package. [snip] > These are really helpful for creating links and documentation [snip] > I propose we add something like these to the trunk Definitely. What came of this? From samth at ccs.neu.edu Sun Feb 22 17:44:42 2009 From: samth at ccs.neu.edu (Sam TH) Date: Sun Feb 22 17:45:01 2009 Subject: [plt-dev] problems with extending `for' syntax Message-ID: <63bb19ae0902221444j6c0618e9md765f2f131832df3@mail.gmail.com> I'd like to write a sequence syntax that uses `match'-style pattern matching. Unfortunately, this doesn't seem to be currently possible, but it's close. First, something like this is ruled straight out: (for/list ([(? (lambda (x) #t) x) (:match (list 1 2 3))]) x) since (lambda (x) #t) is not an identifier. This is ruled out *before* the `:match' expander is given control. Second, it's not possible to distinguish between the client writing this: (for/list ([x (:match e)]) ...) and this: (for/list ([(x) (:match e)]) ...) which, while they have the same semantics for `in-list', would have very different semantics for `:match'. I think the easiest solution would be to (1) accept any pattern in the binding position, and have individual sequence-syntax forms rule them out (perhaps `define-sequence-syntax' could make this easy), and (2) provide a lower-level form which is given the raw pattern, without any transformation. I'll write up a patch, provided anyone is interested. -- sam th samth@ccs.neu.edu From mflatt at cs.utah.edu Sun Feb 22 18:01:13 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sun Feb 22 18:01:34 2009 Subject: [plt-dev] problems with extending `for' syntax In-Reply-To: <63bb19ae0902221444j6c0618e9md765f2f131832df3@mail.gmail.com> References: <63bb19ae0902221444j6c0618e9md765f2f131832df3@mail.gmail.com> Message-ID: <20090222230115.42E9E6500BF@mail-svr1.cs.utah.edu> At Sun, 22 Feb 2009 17:44:42 -0500, Sam TH wrote: > I'd like to write a sequence syntax that uses `match'-style pattern > matching. Unfortunately, this doesn't seem to be currently possible, > but it's close. > > First, something like this is ruled straight out: > > (for/list ([(? (lambda (x) #t) x) (:match (list 1 2 3))]) x) > > since (lambda (x) #t) is not an identifier. This is ruled out > *before* the `:match' expander is given control. > > Second, it's not possible to distinguish between the client writing this: > > (for/list ([x (:match e)]) ...) > > and this: > > (for/list ([(x) (:match e)]) ...) > > which, while they have the same semantics for `in-list', would have > very different semantics for `:match'. > > I think the easiest solution would be to (1) accept any pattern in the > binding position, and have individual sequence-syntax forms rule them > out (perhaps `define-sequence-syntax' could make this easy), and (2) > provide a lower-level form which is given the raw pattern, without any > transformation. > > I'll write up a patch, provided anyone is interested. It sounds worth trying, but I'm not sure it will work easily. The existing `for' forms were designed with the idea that the right-hand side of a binding is always an expression. If the expression has a certain shape, then you might get better performance, but the shape of the expression doesn't affect the binding. A benefit of that design is that you can derive new `for'-like forms that wrap some right-hand sides with sequence converters. For example, a derived form might wrap a right-hand side with `stop-before'. If I remember correctly, then some of the `for' forms (perhaps `for/or' or `for/and') are implemented that way. In other words, the constraint that the right-hand side is always an expression might be built deep enough into the design that it's difficult to change. But I'm not sure. From samth at ccs.neu.edu Sun Feb 22 19:18:14 2009 From: samth at ccs.neu.edu (Sam TH) Date: Sun Feb 22 19:18:39 2009 Subject: [plt-dev] problems with extending `for' syntax In-Reply-To: <20090222230115.42E9E6500BF@mail-svr1.cs.utah.edu> References: <63bb19ae0902221444j6c0618e9md765f2f131832df3@mail.gmail.com> <20090222230115.42E9E6500BF@mail-svr1.cs.utah.edu> Message-ID: <63bb19ae0902221618t3a8ee328hd7c121f9387578e2@mail.gmail.com> On Sun, Feb 22, 2009 at 6:01 PM, Matthew Flatt wrote: > At Sun, 22 Feb 2009 17:44:42 -0500, Sam TH wrote: >> I'd like to write a sequence syntax that uses `match'-style pattern >> matching. Unfortunately, this doesn't seem to be currently possible, >> but it's close. >> >> First, something like this is ruled straight out: >> >> (for/list ([(? (lambda (x) #t) x) (:match (list 1 2 3))]) x) >> >> since (lambda (x) #t) is not an identifier. This is ruled out >> *before* the `:match' expander is given control. >> >> Second, it's not possible to distinguish between the client writing this: >> >> (for/list ([x (:match e)]) ...) >> >> and this: >> >> (for/list ([(x) (:match e)]) ...) >> >> which, while they have the same semantics for `in-list', would have >> very different semantics for `:match'. >> >> I think the easiest solution would be to (1) accept any pattern in the >> binding position, and have individual sequence-syntax forms rule them >> out (perhaps `define-sequence-syntax' could make this easy), and (2) >> provide a lower-level form which is given the raw pattern, without any >> transformation. >> >> I'll write up a patch, provided anyone is interested. > > It sounds worth trying, but I'm not sure it will work easily. > > The existing `for' forms were designed with the idea that the > right-hand side of a binding is always an expression. If the expression > has a certain shape, then you might get better performance, but the > shape of the expression doesn't affect the binding. > > A benefit of that design is that you can derive new `for'-like forms > that wrap some right-hand sides with sequence converters. For example, > a derived form might wrap a right-hand side with `stop-before'. If I > remember correctly, then some of the `for' forms (perhaps `for/or' or > `for/and') are implemented that way. > > In other words, the constraint that the right-hand side is always an > expression might be built deep enough into the design that it's > difficult to change. But I'm not sure. Attached is my initial effort. 'for.diff' is a diff for 'scheme/private/for.ss', implementing `define-raw-sequence-syntax'. Then 'test.ss' uses that to implement `:match' and `:match*', which match single- and multiple-value generators, respectively. I've tried out a bunch of examples (included in the file), and they all seem to work as intended, including the ones using `for/and' and `for/or'. Do you think this is a reasonable strategy? Is there something I've overlooked? Thanks, -- sam th samth@ccs.neu.edu -------------- next part -------------- A non-text attachment was scrubbed... Name: test.ss Type: application/octet-stream Size: 2148 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090222/e620f91d/test.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: for.diff Type: text/x-diff Size: 4528 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090222/e620f91d/for.bin From neil at neilvandyke.org Mon Feb 23 00:17:04 2009 From: neil at neilvandyke.org (Neil Van Dyke) Date: Mon Feb 23 00:17:28 2009 Subject: [plt-dev] Scribble-generate HTML documentation is too wide Message-ID: <49A23150.8050804@neilvandyke.org> The new HTML-based documentation wants to take up most of my screen width. This makes it hard to look back and forth between code and documentation. There are two main layout changes that I'd like to suggest: 1. Get rid of the left and right margins. The "margin notes" in the right margin can be moved inline in the main column. The TOC in the left margin can be moved to an "autohiding" box that floats in the upper-right of the window. The autohiding TOC box could be anchored with a click. 2. Don't enforce a fixed width for the text. Let user narrow window to fit on screen without having to do horizontal scrolling. (Enforcing a *maximum* text width might be good, however, so long as it is done relative to font size/metrics.) Incidentally, I am invested: I finally kludged up a convertor from my embedded documentation format to Scribble (example: "http://www.neilvandyke.org/csv-scheme/"), and will be using the Scribble-generated HTML for the official home pages of all my portable Scheme libraries. Thanks. Scribble is pretty impressive. Neil -- http://www.neilvandyke.org/ From noelwelsh at gmail.com Mon Feb 23 03:56:21 2009 From: noelwelsh at gmail.com (Noel Welsh) Date: Mon Feb 23 03:56:43 2009 Subject: [plt-dev] Scribble-generate HTML documentation is too wide In-Reply-To: <49A23150.8050804@neilvandyke.org> References: <49A23150.8050804@neilvandyke.org> Message-ID: On Mon, Feb 23, 2009 at 5:17 AM, Neil Van Dyke wrote: > The new HTML-based documentation wants to take up most of my screen width. > > This makes it hard to look back and forth between code and documentation. Other than getting a new monitor (or a second monitor) a cheap hack, if you use Firefox, is to setup a per-domain CSS rule. See here, for example: http://www.wizcrafts.net/blogs/2007/01/how_to_create_a_custom_personal_styleshe.html IIRC one of the criteria for Scribble was to make the rendering consistent across browsers and platforms, and this motivated the fixed-width text. N. From michael at schuerig.de Mon Feb 23 04:11:32 2009 From: michael at schuerig.de (Michael Schuerig) Date: Mon Feb 23 04:11:58 2009 Subject: [plt-dev] Re: Scribble-generate HTML documentation is too wide In-Reply-To: References: <49A23150.8050804@neilvandyke.org> Message-ID: <200902231011.32293.michael@schuerig.de> On Monday 23 February 2009, Noel Welsh wrote: > On Mon, Feb 23, 2009 at 5:17 AM, Neil Van Dyke wrote: > > The new HTML-based documentation wants to take up most of my screen > > width. > > > > This makes it hard to look back and forth between code and > > documentation. > > Other than getting a new monitor (or a second monitor) a cheap hack, > if you use Firefox, is to setup a per-domain CSS rule. See here, for > example: > > > http://www.wizcrafts.net/blogs/2007/01/how_to_create_a_custom_persona >l_styleshe.html As you say that approach requires Firefox-specific CSS selectors. A cross-browser way to have this are CSS signatures http://archivist.incutio.com/viewlist/css-discuss/13291 Maybe someone could change the scribble templates accordingly. Michael -- Michael Schuerig mailto:michael@schuerig.de http://www.schuerig.de/michael/ From mflatt at cs.utah.edu Mon Feb 23 07:51:37 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Mon Feb 23 07:52:06 2009 Subject: [plt-dev] Re: Scribble-generate HTML documentation is too wide In-Reply-To: <200902231011.32293.michael@schuerig.de> References: <49A23150.8050804@neilvandyke.org> <200902231011.32293.michael@schuerig.de> Message-ID: <20090223125138.ED0016500AE@mail-svr1.cs.utah.edu> At Mon, 23 Feb 2009 10:11:32 +0100, Michael Schuerig wrote: > On Monday 23 February 2009, Noel Welsh wrote: > > Other than getting a new monitor (or a second monitor) a cheap hack, > > if you use Firefox, is to setup a per-domain CSS rule. See here, for > > example: > > > > > > http://www.wizcrafts.net/blogs/2007/01/how_to_create_a_custom_persona > >l_styleshe.html > > As you say that approach requires Firefox-specific CSS selectors. A > cross-browser way to have this are CSS signatures > > http://archivist.incutio.com/viewlist/css-discuss/13291 > > Maybe someone could change the scribble templates accordingly. Done: * Scribble now installs the ID "scribble-plt-scheme-org" by default when rendering to HTML. * Setup PLT adjusts the ID to "doc-plt-scheme-org" for any document that it builds. * A document author can override both layers of defaults with a `body-id' style on the `part' that represents the document. Matthew From mflatt at cs.utah.edu Mon Feb 23 08:51:50 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Mon Feb 23 08:52:11 2009 Subject: [plt-dev] Scribble-generate HTML documentation is too wide In-Reply-To: <49A23150.8050804@neilvandyke.org> References: <49A23150.8050804@neilvandyke.org> Message-ID: <20090223135152.015AA6500AE@mail-svr1.cs.utah.edu> The documentation is too wide for my taste with some browsers on some platforms --- mostly Windows with IE, where the monospace font is too large or too wide relative to the serif font. I tried and failed to come up with a better font configuration in the Scribble CSS file, but I wonder whether a font change that would make the docs more readable for you. But to answer your suggestions.... At Mon, 23 Feb 2009 00:17:04 -0500, Neil Van Dyke wrote: > There are two main layout changes that I'd like to suggest: > > 1. Get rid of the left and right margins. The "margin notes" in the > right margin can be moved inline in the main column. The TOC in the > left margin can be moved to an "autohiding" box that floats in the > upper-right of the window. The autohiding TOC box could be anchored > with a click. These changes could make sense for some users, but I think they'd be the wrong defaults. Many pages are designed around the TOC being readily apparent. The main documentation page is an extreme example, but in general, I find myself leaning on the existence of a TOC when I design a document. I worry that if the TOC is autohiding, some readers won't know that it's there. Margin notes are similar. They exist to encourage cross-referencing without interrupting the flow of a document, especially in a tutorial or overview. If I knew that they would be inlined, then I would use them much less frequently. But is there a good way to allow readers to customize the view? Or is configuration via CSS about the best we can do? > 2. Don't enforce a fixed width for the text. Let user narrow window to > fit on screen without having to do horizontal scrolling. A Noel says, a fixed width relative to the monospace font is important for rendering examples, function contracts, and grammars. Those element become difficult to read if line breaks occur in places that the author didn't expect. It seems impossible abstract a readable layout of code over the width of the document. (A "pretty print PLT Scheme code" functionality built into browsers would help a lot, but even that probably would not solve everything). Instead of making the whole page body a fixed width, we could apply a fixed width to just the elements that need it. But those are exactly the elements that you're likely to be reading in the docs, so I don't think it would change the effective width of the document. Overall, then, I see little hope for this one, even for readers who are willing to configure via CSS. From eli at barzilay.org Mon Feb 23 09:15:35 2009 From: eli at barzilay.org (Eli Barzilay) Date: Mon Feb 23 09:15:57 2009 Subject: [plt-dev] Scribble-generate HTML documentation is too wide In-Reply-To: <20090223135152.015AA6500AE@mail-svr1.cs.utah.edu> References: <49A23150.8050804@neilvandyke.org> <20090223135152.015AA6500AE@mail-svr1.cs.utah.edu> Message-ID: <18850.44935.879363.802046@winooski.ccs.neu.edu> On Feb 23, Matthew Flatt wrote: > At Mon, 23 Feb 2009 00:17:04 -0500, Neil Van Dyke wrote: > > There are two main layout changes that I'd like to suggest: > > > > 1. Get rid of the left and right margins. The "margin notes" in > > the right margin can be moved inline in the main column. The TOC > > in the left margin can be moved to an "autohiding" box that floats > > in the upper-right of the window. The autohiding TOC box could be > > anchored with a click. > > These changes could make sense for some users, but I think they'd be > the wrong defaults. > > Many pages are designed around the TOC being readily apparent. The > main documentation page is an extreme example, but in general, I > find myself leaning on the existence of a TOC when I design a > document. I worry that if the TOC is autohiding, some readers won't > know that it's there. > > Margin notes are similar. They exist to encourage cross-referencing > without interrupting the flow of a document, especially in a > tutorial or overview. If I knew that they would be inlined, then I > would use them much less frequently. I strongly agree with the TOC comment -- but perhaps it will work to put the margins in divs that float to the right? > But is there a good way to allow readers to customize the view? Or > is configuration via CSS about the best we can do? It might be possible to have a setting that a JS script will read (from a cookie), and change the CSS accordingly. But I don't think that these things are too effective (last time I tried, it would render the page as usual, then run the script and move things around.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From yinso.chen at gmail.com Mon Feb 23 14:52:41 2009 From: yinso.chen at gmail.com (YC) Date: Mon Feb 23 14:52:59 2009 Subject: [plt-dev] Scribble-generate HTML documentation is too wide In-Reply-To: <20090223135152.015AA6500AE@mail-svr1.cs.utah.edu> References: <49A23150.8050804@neilvandyke.org> <20090223135152.015AA6500AE@mail-svr1.cs.utah.edu> Message-ID: <779bf2730902231152g1a8d7a7co244591eca27b1ae5@mail.gmail.com> On Mon, Feb 23, 2009 at 5:51 AM, Matthew Flatt wrote: > > > 2. Don't enforce a fixed width for the text. Let user narrow window to > > fit on screen without having to do horizontal scrolling. > > Instead of making the whole page body a fixed width, we could apply a > fixed width to just the elements that need it. But those are exactly > the elements that you're likely to be reading in the docs, so I don't > think it would change the effective width of the document. > my approach in case like this is to use horizontal overflow auto scrolling for the monospace font block, so they do not stretch the parent container if they exceed parent container's width. In the case the browser doesn't recognize the attributes it would behave the way you currently have it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090223/56ab056d/attachment.html From neil at neilvandyke.org Mon Feb 23 15:33:11 2009 From: neil at neilvandyke.org (Neil Van Dyke) Date: Mon Feb 23 15:33:33 2009 Subject: [plt-dev] Scribble-generate HTML documentation is too wide In-Reply-To: <20090223135152.015AA6500AE@mail-svr1.cs.utah.edu> References: <49A23150.8050804@neilvandyke.org> <20090223135152.015AA6500AE@mail-svr1.cs.utah.edu> Message-ID: <49A30807.5010607@neilvandyke.org> Matthew Flatt wrote at 02/23/2009 08:51 AM: [...] > But is there a good way to allow readers to customize the view? Or is > configuration via CSS about the best we can do? > Using JavaScript, we could have a little button in the page that the user clicks to toggle between "normal" and "space-saving" layout dynamically. It could store a cookie to remember the user's preference. I suspect that a lot of users would prefer an autohide TOC (with a protruding tab that can't be missed in a clean layout) and inline "margin notes". Being able to glance back and forth between doc and code is a big win. > Instead of making the whole page body a fixed width, we could apply a > fixed width to just the elements that need it. But those are exactly > the elements that you're likely to be reading in the docs, so I don't > think it would change the effective width of the document. > As YC said, the code examples can be put in "div" that introduces its own scrollbar when the container is not wide enough. I have been using this myself for a few years. (Sorry so terse and no examples, but I have to run out the door.) -- http://www.neilvandyke.org/ From rafkind at cs.utah.edu Mon Feb 23 16:01:10 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Mon Feb 23 16:01:37 2009 Subject: [plt-dev] define +1 Message-ID: <49A30E96.7000402@cs.utah.edu> > (define (+1 x) x) readline::57: define: bad syntax (not an identifier for procedure name, and not a nested procedure form) at: 1 in: (define (1 x) x) > (define (-1 x) x) readline::75: define: bad syntax (not an identifier for procedure name, and not a nested procedure form) at: -1 in: (define (-1 x) x) I guess +1 and -1 are parsed as numbers, which aren't included as identifiers. Is this fixable? From matthias at ccs.neu.edu Mon Feb 23 16:24:19 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Mon Feb 23 16:26:38 2009 Subject: [plt-dev] define +1 In-Reply-To: <49A30E96.7000402@cs.utah.edu> References: <49A30E96.7000402@cs.utah.edu> Message-ID: <4771D9D8-50DA-4A73-8544-F1A37AEC4267@ccs.neu.edu> That's how Scheme lexen used to be defined. If it isn't parsable as a number, you may use it as an identifier "-) On Feb 23, 2009, at 4:01 PM, Jon Rafkind wrote: > > (define (+1 x) x) > readline::57: define: bad syntax (not an identifier for procedure > name, and not a nested procedure form) at: 1 in: (define (1 x) x) > > > (define (-1 x) x) > readline::75: define: bad syntax (not an identifier for procedure > name, and not a nested procedure form) at: -1 in: (define (-1 x) x) > > I guess +1 and -1 are parsed as numbers, which aren't included as > identifiers. Is this fixable? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From jensaxel at soegaard.net Mon Feb 23 16:03:57 2009 From: jensaxel at soegaard.net (Jens Axel Soegaard) Date: Mon Feb 23 16:29:52 2009 Subject: [plt-dev] define +1 In-Reply-To: <49A30E96.7000402@cs.utah.edu> References: <49A30E96.7000402@cs.utah.edu> Message-ID: <49A30F3D.602@soegaard.net> Jon Rafkind skrev: > > (define (+1 x) x) > readline::57: define: bad syntax (not an identifier for procedure name, > and not a nested procedure form) at: 1 in: (define (1 x) x) > > > (define (-1 x) x) > readline::75: define: bad syntax (not an identifier for procedure name, > and not a nested procedure form) at: -1 in: (define (-1 x) x) > > I guess +1 and -1 are parsed as numbers, which aren't included as > identifiers. Is this fixable? You could use |+1| but pretty it isn't. -- Jens Axel S?gaard From robby at eecs.northwestern.edu Mon Feb 23 16:29:15 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Mon Feb 23 16:29:56 2009 Subject: [plt-dev] define +1 In-Reply-To: <49A30E96.7000402@cs.utah.edu> References: <49A30E96.7000402@cs.utah.edu> Message-ID: <932b2f1f0902231329u236920d9q45794390b765c7ce@mail.gmail.com> Just between us, I like using -1 as a number. ;) But you can put bars around it: > (define (|-1| x) (- x 1)) > (|-1| 2) 1 Not sure how helpful that was ..., Robby On Mon, Feb 23, 2009 at 3:01 PM, Jon Rafkind wrote: >> (define (+1 x) x) > readline::57: define: bad syntax (not an identifier for procedure name, and > not a nested procedure form) at: 1 in: (define (1 x) x) > >> (define (-1 x) x) > readline::75: define: bad syntax (not an identifier for procedure name, and > not a nested procedure form) at: -1 in: (define (-1 x) x) > > I guess +1 and -1 are parsed as numbers, which aren't included as > identifiers. Is this fixable? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From rafkind at cs.utah.edu Mon Feb 23 16:34:10 2009 From: rafkind at cs.utah.edu (Jon Rafkind) Date: Mon Feb 23 16:34:29 2009 Subject: [plt-dev] define +1 In-Reply-To: <932b2f1f0902231329u236920d9q45794390b765c7ce@mail.gmail.com> References: <49A30E96.7000402@cs.utah.edu> <932b2f1f0902231329u236920d9q45794390b765c7ce@mail.gmail.com> Message-ID: <49A31652.7010603@cs.utah.edu> Robby Findler wrote: > Just between us, I like using -1 as a number. ;) > > Yea, but now I can't write functions using l33t speak. > (define (4e7 x) x) stdin::63: define: bad syntax (not an identifier for procedure name, and not a nested procedure form) at: 40000000.0 in: (define (40000000.0 x) x) Maybe that sort of looks like "hey" :p From ryanc at ccs.neu.edu Mon Feb 23 16:54:43 2009 From: ryanc at ccs.neu.edu (Ryan Culpepper) Date: Mon Feb 23 16:55:05 2009 Subject: [plt-dev] define +1 In-Reply-To: <49A30E96.7000402@cs.utah.edu> References: <49A30E96.7000402@cs.utah.edu> Message-ID: On Feb 23, 2009, at 4:01 PM, Jon Rafkind wrote: > > (define (+1 x) x) > readline::57: define: bad syntax (not an identifier for procedure > name, and not a nested procedure form) at: 1 in: (define (1 x) x) > > > (define (-1 x) x) > readline::75: define: bad syntax (not an identifier for procedure > name, and not a nested procedure form) at: -1 in: (define (-1 x) x) > > I guess +1 and -1 are parsed as numbers, which aren't included as > identifiers. Is this fixable? How about '1+' and '1-' instead? Ryan From carl.eastlund at gmail.com Mon Feb 23 16:58:34 2009 From: carl.eastlund at gmail.com (Carl Eastlund) Date: Mon Feb 23 16:58:54 2009 Subject: [plt-dev] define +1 In-Reply-To: References: <49A30E96.7000402@cs.utah.edu> Message-ID: <990e0c030902231358pca14400x74c1f4352bb275a6@mail.gmail.com> On Mon, Feb 23, 2009 at 4:54 PM, Ryan Culpepper wrote: > On Feb 23, 2009, at 4:01 PM, Jon Rafkind wrote: > >> > (define (+1 x) x) >> readline::57: define: bad syntax (not an identifier for procedure name, >> and not a nested procedure form) at: 1 in: (define (1 x) x) >> >> > (define (-1 x) x) >> readline::75: define: bad syntax (not an identifier for procedure name, >> and not a nested procedure form) at: -1 in: (define (-1 x) x) >> >> I guess +1 and -1 are parsed as numbers, which aren't included as >> identifiers. Is this fixable? > > How about '1+' and '1-' instead? Or |add1| and |sub1|. The names (without bars) are a little bit longer, but the definition is shorter in that you don't have to write it. :) -- Carl Eastlund From eli at barzilay.org Mon Feb 23 17:39:37 2009 From: eli at barzilay.org (Eli Barzilay) Date: Mon Feb 23 17:39:58 2009 Subject: [plt-dev] define +1 In-Reply-To: <49A30E96.7000402@cs.utah.edu> References: <49A30E96.7000402@cs.utah.edu> Message-ID: <18851.9641.433174.949767@winooski.ccs.neu.edu> On Feb 23, Jon Rafkind wrote: > > I guess +1 and -1 are parsed as numbers, which aren't included as > identifiers. Is this fixable? In certain circles this makes `1+' and `1-' (or `+1-') popular identifiers... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From dvanhorn at ccs.neu.edu Tue Feb 24 16:34:12 2009 From: dvanhorn at ccs.neu.edu (David Van Horn) Date: Tue Feb 24 16:34:37 2009 Subject: [plt-dev] Typed SRFIs Message-ID: <49A467D4.4050103@ccs.neu.edu> I'm happy to take the SRFIs listed {6, 13, 14, 19} to be ported to Typed Scheme. David From yinso.chen at gmail.com Tue Feb 24 16:57:49 2009 From: yinso.chen at gmail.com (YC) Date: Tue Feb 24 16:58:10 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> Message-ID: <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> what's the submission process? do we just send the code to you? thanks, yc On Tue, Feb 24, 2009 at 1:05 PM, Sam TH wrote: > Typed Scheme is a language for writing PLT Scheme programs that are > statically checked for type errors. Right now, Typed Scheme handles a > large portion of the PLT Scheme language. However, to use Typed > Scheme effectively, we need libraries that work with it. For this > task, we're looking for help. > > We'd like volunteers for writing wrapper modules that adapt untyped > libraries to Typed Scheme. This task is very easy for the smallest > libraries, but can be much more complicated for larger, complex > libraries. > > There's a preliminary guide for conversion at: > > http://www.ccs.neu.edu/home/samth/adapt/ > > which also has a list of modules to adapt, and their current status: > > http://www.ccs.neu.edu/home/samth/adapt/Current_Status.html > > Further discussion should be on plt-dev@list.cs.brown.edu , and > questions or comments can be sent directly to me. > > We hope to continue making Typed Scheme into a useful tool for PLT > Scheme programmers. > > Thanks, > Sam, Stevie, and Matthias > samth@ccs.neu.edu > _________________________________________________ > 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-dev/attachments/20090224/85590fe2/attachment.htm From samth at ccs.neu.edu Tue Feb 24 17:04:08 2009 From: samth at ccs.neu.edu (Sam TH) Date: Tue Feb 24 17:04:26 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> Message-ID: <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> On Tue, Feb 24, 2009 at 4:57 PM, YC wrote: > what's the submission process?? do we just send the code to you? Sending code to me is probably the best strategy. You can also post it to this list, where perhaps other people might have feedback. Thanks for your interest, -- sam th samth@ccs.neu.edu From yinso.chen at gmail.com Tue Feb 24 17:27:36 2009 From: yinso.chen at gmail.com (YC) Date: Tue Feb 24 17:27:55 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> Message-ID: <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> On Tue, Feb 24, 2009 at 2:04 PM, Sam TH wrote: > On Tue, Feb 24, 2009 at 4:57 PM, YC wrote: > > what's the submission process? do we just send the code to you? > > Sending code to me is probably the best strategy. You can also post > it to this list, where perhaps other people might have feedback. > > Thanks for your interest, > I am happy to participate as I have availability. do you have a hard and fast deadline? I want to make sure I don't over promise and under deliver :) also - any license requirements? in the mean time, here's a low hanging fruit for file/md5. please let me know if this does what you want, as this would be my first typed-scheme code. ;; md5.ss ;; wrapper on file/md5 #lang typed-scheme (require/typed file/md5 (md5 (Input-Port -> Bytes)) ) (provide md5) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090224/461df351/attachment.html From samth at ccs.neu.edu Tue Feb 24 17:30:05 2009 From: samth at ccs.neu.edu (Sam TH) Date: Tue Feb 24 17:30:28 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> Message-ID: <63bb19ae0902241430l2880d2d7n32e9ab5af9339ea@mail.gmail.com> On Tue, Feb 24, 2009 at 5:27 PM, YC wrote: > > On Tue, Feb 24, 2009 at 2:04 PM, Sam TH wrote: >> >> On Tue, Feb 24, 2009 at 4:57 PM, YC wrote: >> > what's the submission process?? do we just send the code to you? >> >> Sending code to me is probably the best strategy. ?You can also post >> it to this list, where perhaps other people might have feedback. >> >> Thanks for your interest, > > I am happy to participate as I have availability. > > do you have a hard and fast deadline?? I want to make sure I don't over > promise and under deliver :) No, there's no deadline. > also - any license requirements? Code needs to be licensed under the LGPL, so that in can be incorporated into the rest of PLT Scheme. > in the mean time, here's a low hanging fruit for file/md5.? please let me > know if this does what you want, as this would be my first typed-scheme > code. > > ;; > md5.ss > ;; wrapper on > file/md5 > #lang typed-scheme > (require/typed file/md5 > ?????????????? (md5 (Input-Port -> Bytes)) > ?????????????? ) > (provide md5) Thanks, that's great! -- sam th samth@ccs.neu.edu From matthias at ccs.neu.edu Tue Feb 24 17:34:26 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Tue Feb 24 17:35:25 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <63bb19ae0902241430l2880d2d7n32e9ab5af9339ea@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> <63bb19ae0902241430l2880d2d7n32e9ab5af9339ea@mail.gmail.com> Message-ID: <490A7953-2920-45A9-9424-28B1E1C474DA@ccs.neu.edu> On Feb 24, 2009, at 5:30 PM, Sam TH wrote: >> do you have a hard and fast deadline? I want to make sure I don't >> over >> promise and under deliver :) > > No, there's no deadline. We would like to wrap this up around the end of the semester, say, April 15, the Tax day ;-) -- Matthias From yinso.chen at gmail.com Tue Feb 24 17:43:50 2009 From: yinso.chen at gmail.com (YC) Date: Tue Feb 24 17:44:12 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <63bb19ae0902241430l2880d2d7n32e9ab5af9339ea@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> <63bb19ae0902241430l2880d2d7n32e9ab5af9339ea@mail.gmail.com> Message-ID: <779bf2730902241443g5c1742e0uf1e0dc554ee65a03@mail.gmail.com> On Tue, Feb 24, 2009 at 2:30 PM, Sam TH wrote: > On Tue, Feb 24, 2009 at 5:27 PM, YC wrote: > > > > On Tue, Feb 24, 2009 at 2:04 PM, Sam TH wrote: > >> > >> On Tue, Feb 24, 2009 at 4:57 PM, YC wrote: > >> > what's the submission process? do we just send the code to you? > >> > >> Sending code to me is probably the best strategy. You can also post > >> it to this list, where perhaps other people might have feedback. > >> > >> Thanks for your interest, > > > > I am happy to participate as I have availability. > > > > do you have a hard and fast deadline? I want to make sure I don't over > > promise and under deliver :) > > No, there's no deadline. > go ahead and put me down for the rest of the file/* modules for now, thanks. yc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090224/33e38f4e/attachment-0001.htm From yinso.chen at gmail.com Tue Feb 24 17:47:49 2009 From: yinso.chen at gmail.com (YC) Date: Tue Feb 24 17:48:07 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <490A7953-2920-45A9-9424-28B1E1C474DA@ccs.neu.edu> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> <63bb19ae0902241430l2880d2d7n32e9ab5af9339ea@mail.gmail.com> <490A7953-2920-45A9-9424-28B1E1C474DA@ccs.neu.edu> Message-ID: <779bf2730902241447m15718253g354c6e194d411bde@mail.gmail.com> On Tue, Feb 24, 2009 at 2:34 PM, Matthias Felleisen wrote: > > On Feb 24, 2009, at 5:30 PM, Sam TH wrote: > > No, there's no deadline. >> > > We would like to wrap this up around the end of the semester, say, April > 15, the Tax day ;-) -- Matthias > Have your students ever ended up being audited because they have to prepare for your finals and cannot file taxes on time? :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090224/7a218efe/attachment.html From samth at ccs.neu.edu Tue Feb 24 18:20:14 2009 From: samth at ccs.neu.edu (Sam TH) Date: Tue Feb 24 18:20:32 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> Message-ID: <63bb19ae0902241520w4b259851v584489f8cfb4d50b@mail.gmail.com> On Tue, Feb 24, 2009 at 5:27 PM, YC wrote: > > ;; > md5.ss > ;; wrapper on > file/md5 > #lang typed-scheme > (require/typed file/md5 > ?????????????? (md5 (Input-Port -> Bytes)) > ?????????????? ) > (provide md5) You should probably handle the case where the input is a Bytes as well. Thanks, -- sam th samth@ccs.neu.edu From yinso.chen at gmail.com Tue Feb 24 18:32:43 2009 From: yinso.chen at gmail.com (YC) Date: Tue Feb 24 18:33:01 2009 Subject: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <63bb19ae0902241520w4b259851v584489f8cfb4d50b@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> <63bb19ae0902241520w4b259851v584489f8cfb4d50b@mail.gmail.com> Message-ID: <779bf2730902241532g5891dd90pf3f0d4f9295070ef@mail.gmail.com> On Tue, Feb 24, 2009 at 3:20 PM, Sam TH wrote: > > > You should probably handle the case where the input is a Bytes as well. > > Thanks for pointing it out - I misread the input definition. The following is the updated wrapper. ;; md5.ss ;; wrapper on file/md5 #lang typed-scheme (require/typed file/md5 (md5 ((U Bytes Input-Port) -> Bytes)) ) (provide md5) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090224/cab3d5d6/attachment.html From pocmatos at gmail.com Wed Feb 25 08:57:10 2009 From: pocmatos at gmail.com (Paulo J. Matos) Date: Wed Feb 25 08:57:31 2009 Subject: [plt-dev] Typed Library Message-ID: <11b141710902250557u2ec7a852s7938a5c8a3f7bf1f@mail.gmail.com> I would be happy to port the plot library! :) -- Paulo Jorge Matos - pocmatos at gmail.com Webpage: http://www.personal.soton.ac.uk/pocm From jos.koot at telefonica.net Wed Feb 25 10:11:51 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Wed Feb 25 10:19:37 2009 Subject: [plt-dev] Call for Participation: Writing Typed Scheme wrapper modules References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> <63bb19ae0902241520w4b259851v584489f8cfb4d50b@mail.gmail.com> <779bf2730902241532g5891dd90pf3f0d4f9295070ef@mail.gmail.com> <7AEA20C361E44F1B8F4BD079E235B22E@uw2b2dff239c4d> <63bb19ae0902250523m2fb8e65doa0e5714644dd1c90@mail.gmail.com> Message-ID: <9A19D3AB8C4F4A658F96CF5611358602@uw2b2dff239c4d> Sorry, on plt-dev now. Below is my first trial of math-wrapper with some tests. Would this come close to what you expect? Comments are appreciated. In the source text of scheme/math sinh and cosh are commented as real sinh and real cosh, but as far as I can judge they work for complex numbers too. The documentation of sinh and cosh does not delimit the argument to be real. The wrapper allows complex arguments. If you are satisfied, I am in for another simple assignment. Jos PS Matthias, thanks for your answer to my question. ; Typed Scheme wrapper for scheme/math #lang typed-scheme (define-type-alias N->N (Number -> Number)) (require/typed scheme/math (pi Number) (sqr N->N) (sgn N->N) (conjugate N->N) (sinh N->N) (cosh N->N)) (define: (rsgn (r : Number)) : Number (unless (real? r) (raise-type-error 'sgn "real" r)) (sgn r)) (provide pi sqr (rename-out (rsgn sgn)) conjugate sinh cosh) #| Should math not provide tanh? (define: (tanh (z : Number)) : Number (* -i (tan (* +i z)))) (provide tanh) |# ; Some simple tests on math-wrapper #lang typed-scheme (require "math-wrapper.ss") (unless (and (= (sqr +i) -1) (= (sqr -1) 1) (= (sgn 0) 0) (= (sgn -0.1) -1) (< (magnitude (- (sinh -i) (* -i (sin 1)))) 1.e-10) (< (magnitude (- (cosh -i) (cos 1))) 1.e-10) (= (conjugate -i) +i) (= pi 3.141592653589793) (eq? (call/cc (lambda: ((cc : (Any -> Any))) (define: (exit (x : Any)) : Any (cc 'ok)) (with-handlers ((void exit)) (sgn +i)))) 'ok)) (error 'math-wrapper-test "check fails")) ----- Original Message ----- From: "Sam TH" To: "Jos Koot" Sent: Wednesday, February 25, 2009 2:23 PM Subject: Re: [plt-dev] Re: [plt-scheme] Call for Participation: Writing Typed Scheme wrapper modules Jos - Are you on the plt-dev list? If so, I'd prefer to do discussion there. Thanks, sam th On Wed, Feb 25, 2009 at 8:06 AM, Jos Koot wrote: > In the typed-scheme reference I see base types Number and Integer. I want a > type for reals, because many numerical functions accept/return reals but not > complex numbers. Is this possible? How? > Jos > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > -- sam th samth@ccs.neu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090225/a684286a/attachment.htm From matthias at ccs.neu.edu Wed Feb 25 10:22:41 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Wed Feb 25 10:24:10 2009 Subject: [plt-dev] Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <9A19D3AB8C4F4A658F96CF5611358602@uw2b2dff239c4d> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> <779bf2730902241357h3c8760c9wd8b3148f17c6c367@mail.gmail.com> <63bb19ae0902241404p3a4f9afk822e1fc5bf67192d@mail.gmail.com> <779bf2730902241427x525391fasa9de111eaf0e079b@mail.gmail.com> <63bb19ae0902241520w4b259851v584489f8cfb4d50b@mail.gmail.com> <779bf2730902241532g5891dd90pf3f0d4f9295070ef@mail.gmail.com> <7AEA20C361E44F1B8F4BD079E235B22E@uw2b2dff239c4d> <63bb19ae0902250523m2fb8e65doa0e5714644dd1c90@mail.gmail.com> <9A19D3AB8C4F4A658F96CF5611358602@uw2b2dff239c4d> Message-ID: <13DD6D84-BDCC-4E4F-A6B6-44A1E505344D@ccs.neu.edu> Sam, it sounds like we should port test suites, too. -- Matthias On Feb 25, 2009, at 10:11 AM, Jos Koot wrote: > Sorry, on plt-dev now. Below is my first trial of math-wrapper with > some tests. Would this come close to what you expect? Comments are > appreciated. > > In the source text of scheme/math sinh and cosh are commented as > real sinh and real cosh, but as far as I can judge they work for > complex numbers too. The documentation of sinh and cosh does not > delimit the argument to be real. The wrapper allows complex arguments. > > If you are satisfied, I am in for another simple assignment. > > Jos > > PS Matthias, thanks for your answer to my question. > > ; Typed Scheme wrapper for scheme/math > > #lang typed-scheme > > (define-type-alias N->N (Number -> Number)) > > (require/typed scheme/math > (pi Number) > (sqr N->N) > (sgn N->N) > (conjugate N->N) > (sinh N->N) > (cosh N->N)) > > (define: (rsgn (r : Number)) : Number > (unless (real? r) (raise-type-error 'sgn "real" r)) > (sgn r)) > > (provide > pi > sqr > (rename-out (rsgn sgn)) > conjugate > sinh > cosh) > > #| > Should math not provide tanh? > (define: (tanh (z : Number)) : Number (* -i (tan (* +i z)))) > (provide tanh) > |# > > ; Some simple tests on math-wrapper > #lang typed-scheme > (require "math-wrapper.ss") > (unless > (and > (= (sqr +i) -1) > (= (sqr -1) 1) > (= (sgn 0) 0) > (= (sgn -0.1) -1) > (< (magnitude (- (sinh -i) (* -i (sin 1)))) 1.e-10) > (< (magnitude (- (cosh -i) (cos 1))) 1.e-10) > (= (conjugate -i) +i) > (= pi 3.141592653589793) > (eq? > (call/cc > (lambda: ((cc : (Any -> Any))) > (define: (exit (x : Any)) : Any (cc 'ok)) > (with-handlers ((void exit)) (sgn +i)))) > 'ok)) > (error 'math-wrapper-test "check fails")) > > > > ----- Original Message ----- > From: "Sam TH" > To: "Jos Koot" > Sent: Wednesday, February 25, 2009 2:23 PM > Subject: Re: [plt-dev] Re: [plt-scheme] Call for Participation: > Writing Typed Scheme wrapper modules > > Jos - > > Are you on the plt-dev list? If so, I'd prefer to do discussion > there. > > Thanks, > sam th > > On Wed, Feb 25, 2009 at 8:06 AM, Jos Koot > wrote: > > In the typed-scheme reference I see base types Number and > Integer. I want a > > type for reals, because many numerical functions accept/return > reals but not > > complex numbers. Is this possible? How? > > Jos > > _________________________________________________ > > For list-related administrative tasks: > > http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > > > > > > > -- > sam th > samth@ccs.neu.edu From yinso.chen at gmail.com Wed Feb 25 15:23:15 2009 From: yinso.chen at gmail.com (YC) Date: Wed Feb 25 15:23:38 2009 Subject: [plt-dev] type-scheme wrapper for file/tar Message-ID: <779bf2730902251223u551dadc5t93e043d0639f1106@mail.gmail.com> Hi Sam, Below is the wrapper for file/tar. I found a few discrepancies from the doc : 1. both tar and tar->output returns a exact-nonenegative-integer? instead of void? (due to the last call being (write-bytes ...)), so I had them return Integer 2. tar->output takes (listof path?) instead of (listof path-string?) 3. tar-gzip is missing from the doc but is available in mzlib/tar (from which file/tar imports), so I export it as well, and it actually returns void? this time Also I didn't find a way to write optional parameters so I used case-lambda. Let me know if there is another way to write it. (What would be the way to write keyword parameter then?) Thoughts? #lang typed-scheme ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tar.ss ;; typed-scheme wrapper on file/tar ;; yc 2009/2/25 ;; licensed in LGPL, the same license as PLT Scheme itself. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; basic type aliases. (define-type-alias Path-String (U Path String)) (require/typed file/tar ;; tar appears to return exact-nonenegative-integer? instead of void? (tar (Path-String Path-String * -> Integer)) ;; tar->output appears to take (listof path) instead of (listof path-string?) ;; it also appears to return exact-nonenegative-integer? (tar->output (case-lambda ((Listof Path) -> Integer) ((Listof Path) Output-Port -> Integer))) ;; tar->gzip ;; missing from file/tar but available in mzlib/tar ;; actually returns void? (tar-gzip (Path-String Path-String * -> Void)) ) (provide tar tar->output tar-gzip) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090225/7f5f647b/attachment.htm From jay.mccarthy at gmail.com Wed Feb 25 17:12:13 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Wed Feb 25 17:12:58 2009 Subject: [plt-dev] XML units Message-ID: Is anyone attached to the units in the XML collection? I am planning on adding some new features and contracts and they are tedious to deal with. Jay Sent from my iAwesome. From matthias at ccs.neu.edu Wed Feb 25 18:03:35 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Wed Feb 25 18:04:44 2009 Subject: [plt-dev] XML units In-Reply-To: References: Message-ID: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> As of last month, units have contracts. I'd like to encourage you to use them and indeed, we need such case studies -- Matthias On Feb 25, 2009, at 5:12 PM, Jay McCarthy wrote: > Is anyone attached to the units in the XML collection? I am > planning on adding some new features and contracts and they are > tedious to deal with. > > Jay > > Sent from my > iAwesome._________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From robby at eecs.northwestern.edu Wed Feb 25 19:05:57 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Wed Feb 25 19:06:18 2009 Subject: [plt-dev] XML units In-Reply-To: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> References: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> Message-ID: <932b2f1f0902251605y6a24e3b8q452113e6736a2e4f@mail.gmail.com> Are the units ever instantiated with more than one input? Robby On 2/25/09, Matthias Felleisen wrote: > > As of last month, units have contracts. I'd like to encourage you to > use them and indeed, we need such case studies -- Matthias > > > > On Feb 25, 2009, at 5:12 PM, Jay McCarthy wrote: > >> Is anyone attached to the units in the XML collection? I am >> planning on adding some new features and contracts and they are >> tedious to deal with. >> >> Jay >> >> Sent from my >> iAwesome._________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From jay.mccarthy at gmail.com Wed Feb 25 19:14:03 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Wed Feb 25 19:14:52 2009 Subject: [plt-dev] XML units In-Reply-To: <932b2f1f0902251605y6a24e3b8q452113e6736a2e4f@mail.gmail.com> References: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> <932b2f1f0902251605y6a24e3b8q452113e6736a2e4f@mail.gmail.com> Message-ID: Not in a way that isn't buggy, to my knowledge. I just wrote about 150 test cases and found ugly in the syntax parser unit. Sent from my iPhone On Feb 25, 2009, at 6:05 PM, Robby Findler wrote: > Are the units ever instantiated with more than one input? > > Robby > > On 2/25/09, Matthias Felleisen wrote: >> >> As of last month, units have contracts. I'd like to encourage you to >> use them and indeed, we need such case studies -- Matthias >> >> >> >> On Feb 25, 2009, at 5:12 PM, Jay McCarthy wrote: >> >>> Is anyone attached to the units in the XML collection? I am >>> planning on adding some new features and contracts and they are >>> tedious to deal with. >>> >>> Jay >>> >>> Sent from my >>> iAwesome._________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> >> _________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev >> From jay.mccarthy at gmail.com Wed Feb 25 19:15:04 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Wed Feb 25 19:15:49 2009 Subject: [plt-dev] XML units In-Reply-To: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> References: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> Message-ID: <67BA21D4-C168-4024-8AE8-0BA216ACDB65@gmail.com> I'll do it. I think I may have already found a bug. But I can't email it just yet because I am traveling but I will get to it. Sent from my iPhone On Feb 25, 2009, at 5:03 PM, Matthias Felleisen wrote: > > As of last month, units have contracts. I'd like to encourage you to > use them and indeed, we need such case studies -- Matthias > > > > On Feb 25, 2009, at 5:12 PM, Jay McCarthy wrote: > >> Is anyone attached to the units in the XML collection? I am >> planning on adding some new features and contracts and they are >> tedious to deal with. >> >> Jay >> >> Sent from my >> iAwesome._________________________________________________ >> For list-related administrative tasks: >> http://list.cs.brown.edu/mailman/listinfo/plt-dev > From matthias at ccs.neu.edu Wed Feb 25 19:54:42 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Wed Feb 25 19:55:29 2009 Subject: [plt-dev] XML units In-Reply-To: References: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> <932b2f1f0902251605y6a24e3b8q452113e6736a2e4f@mail.gmail.com> Message-ID: <8FEA31F3-119D-423C-9B0E-71B6824A9DB5@ccs.neu.edu> Ah correct. Units w/o imports can go. Units with _real_ imports should stay unit. Someone decided we could have more than one way of running them. On Feb 25, 2009, at 7:14 PM, Jay McCarthy wrote: > Not in a way that isn't buggy, to my knowledge. I just wrote about > 150 test cases and found ugly in the syntax parser unit. > > Sent from my iPhone > > On Feb 25, 2009, at 6:05 PM, Robby Findler > wrote: > >> Are the units ever instantiated with more than one input? >> >> Robby >> >> On 2/25/09, Matthias Felleisen wrote: >>> >>> As of last month, units have contracts. I'd like to encourage you to >>> use them and indeed, we need such case studies -- Matthias >>> >>> >>> >>> On Feb 25, 2009, at 5:12 PM, Jay McCarthy wrote: >>> >>>> Is anyone attached to the units in the XML collection? I am >>>> planning on adding some new features and contracts and they are >>>> tedious to deal with. >>>> >>>> Jay >>>> >>>> Sent from my >>>> iAwesome._________________________________________________ >>>> For list-related administrative tasks: >>>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>> >>> _________________________________________________ >>> For list-related administrative tasks: >>> http://list.cs.brown.edu/mailman/listinfo/plt-dev >>> From dvanhorn at ccs.neu.edu Wed Feb 25 20:11:40 2009 From: dvanhorn at ccs.neu.edu (David Van Horn) Date: Wed Feb 25 20:12:04 2009 Subject: [plt-dev] Typed SRFI 6 and 19 Message-ID: <49A5EC4C.3040604@ccs.neu.edu> Comments welcome, of course. David -------------- next part -------------- #lang typed-scheme (require/typed srfi/6 [open-output-string (-> Output-Port)] [open-input-string (String -> Input-Port)] [get-output-string (Output-Port -> String)]) (provide open-output-string open-input-string get-output-string) -------------- next part -------------- #lang typed-scheme (define-type-alias Time-Type (U 'time-duration 'time-monotonic 'time-process 'time-tai 'time-thread 'time-utc)) (require/opaque-type Time time? srfi/19) (require/opaque-type Date date? srfi/19) (define-type-alias Time-Monotonic Time) (define-type-alias Time-TAI Time) (define-type-alias Time-UTC Time) (define-type-alias Time-Duration Time) (define-type-alias JD Number) (define-type-alias MJD Number) (require/typed srfi/19 ;; Constants [time-duration Time-Type] [time-monotonic Time-Type] [time-process Time-Type] [time-tai Time-Type] [time-thread Time-Type] [time-utc Time-Type] ;; Current time and clock resolution [current-date (case-lambda (-> Date) (Integer -> Date))] [current-julian-day (-> JD)] [current-modified-julian-day (-> MJD)] [current-time (case-lambda (-> Time) (Time-Type -> Time))] [time-resolution (case-lambda (-> Integer) (Time-Type -> Integer))] ;; Time object and accessors [make-time (Time-Type Integer Integer -> Time)] [time-type (Time -> Time-Type)] [time-nanosecond (Time -> Integer)] [time-second (Time -> Integer)] [set-time-type! (Time Time-Type -> Void)] [set-time-nanosecond! (Time Integer -> Void)] [set-time-second! (Time Integer -> Void)] [copy-time (Time -> Time)] ;; Time comparison procedures [time<=? (Time Time -> Boolean)] [time Boolean)] [time=? (Time Time -> Boolean)] [time>=? (Time Time -> Boolean)] [time>? (Time Time -> Boolean)] ;; Time arithmetic procedures [time-difference (Time Time -> Time-Duration)] [time-difference! (Time Time -> Time-Duration)] [add-duration (Time Time-Duration -> Time)] [add-duration! (Time Time-Duration -> Time)] [subtract-duration (Time Time-Duration -> Time)] [subtract-duration! (Time Time-Duration -> Time)] ;; Date object and accessors [make-date (Integer Integer Integer Integer Integer Integer Integer Integer -> Date)] [date-nanosecond (Date -> Integer)] [date-second (Date -> Integer)] [date-minute (Date -> Integer)] [date-hour (Date -> Integer)] [date-day (Date -> Integer)] [date-month (Date -> Integer)] [date-year (Date -> Integer)] [date-zone-offset (Date -> Integer)] [date-year-day (Date -> Integer)] [date-week-day (Date -> Integer)] [date-week-number (Date Integer -> Integer)] ;; Time/Date/Julian Day/Modified Julian Day Converters [date->julian-day (Date -> JD)] [date->modified-julian-day (Date -> MJD)] [date->time-monotonic (Date -> Time-Monotonic)] [date->time-tai (Date -> Time-TAI)] [date->time-utc (Date -> Time-UTC)] [julian-day->date (case-lambda (JD -> Date) (JD Integer -> Date))] [julian-day->time-monotonic (JD -> Time-Monotonic)] [julian-day->time-tai (JD -> Time-TAI)] [julian-day->time-utc (JD -> Time-UTC)] [modified-julian-day->date (case-lambda (MJD -> Date) (MJD Integer -> Date))] [modified-julian-day->time-monotonic (MJD -> Time-Monotonic)] [modified-julian-day->time-tai (MJD -> Time-TAI)] [modified-julian-day->time-utc (MJD -> Time-UTC)] [time-monotonic->date (Time-Monotonic Integer -> Date)] [time-monotonic->julian-day (Time-Monotonic -> JD)] [time-monotonic->modified-julian-day (Time-Monotonic -> MJD)] [time-monotonic->time-tai (Time-Monotonic -> Time-TAI)] [time-monotonic->time-tai! (Time-Monotonic -> Time-TAI)] [time-monotonic->time-utc (Time-Monotonic -> Time-UTC)] [time-monotonic->time-utc! (Time-Monotonic -> Time-UTC)] [time-tai->date (case-lambda (Time-TAI -> Date) (Time-TAI Integer -> Date))] [time-tai->julian-day (Time-TAI -> JD)] [time-tai->modified-julian-day (Time-TAI -> MJD)] [time-tai->time-monotonic (Time-TAI -> Time-Monotonic)] [time-tai->time-monotonic! (Time-TAI -> Time-Monotonic)] [time-tai->time-utc (Time-TAI -> Time-UTC)] [time-tai->time-utc! (Time-TAI -> Time-UTC)] [time-utc->date (Time-UTC -> Date)] [time-utc->julian-day (Time-UTC -> JD)] [time-utc->modified-julian-day (Time-UTC -> MJD)] [time-utc->time-monotonic (Time-UTC -> Time-Monotonic)] [time-utc->time-monotonic! (Time-UTC -> Time-Monotonic)] [time-utc->time-tai (Time-UTC -> Time-TAI)] [time-utc->time-tai! (Time-UTC -> Time-TAI)] ;; Date to String/String to Date Converters [date->string (case-lambda (Date -> String) (Date String -> String))] [string->date (String String -> Date)] ) ; end of require/typed (provide ;; Constants time-duration time-monotonic time-process time-tai time-thread time-utc ;; Current time and clock resolution current-date current-julian-day current-modified-julian-day current-time time-resolution ;; Time object and accessors make-time time? time-type time-nanosecond time-second set-time-type! set-time-nanosecond! set-time-second! copy-time ;; Time comparison procedures time<=? time=? time>? ;; Time arithmetic procedures time-difference time-difference! add-duration add-duration! subtract-duration subtract-duration! ;; Date object and accessors make-date date? date-nanosecond date-second date-minute date-hour date-day date-month date-year date-zone-offset date-year-day date-week-day date-week-number ;; Time/Date/Julian Day/Modified Julian Day Converters date->julian-day date->modified-julian-day date->time-monotonic date->time-tai date->time-utc julian-day->date julian-day->time-monotonic julian-day->time-tai julian-day->time-utc modified-julian-day->date modified-julian-day->time-monotonic modified-julian-day->time-tai modified-julian-day->time-utc time-monotonic->date time-monotonic->julian-day time-monotonic->modified-julian-day time-monotonic->time-tai time-monotonic->time-tai! time-monotonic->time-utc time-monotonic->time-utc! time-tai->date time-tai->julian-day time-tai->modified-julian-day time-tai->time-monotonic time-tai->time-monotonic! time-tai->time-utc time-tai->time-utc! time-utc->date time-utc->julian-day time-utc->modified-julian-day time-utc->time-monotonic time-utc->time-monotonic! time-utc->time-tai time-utc->time-tai! ;; Date to String/String to Date Converters date->string string->date ) ; end of provide From sstrickl at ccs.neu.edu Wed Feb 25 21:03:33 2009 From: sstrickl at ccs.neu.edu (Stevie Strickland) Date: Wed Feb 25 21:04:28 2009 Subject: [plt-dev] XML units In-Reply-To: <67BA21D4-C168-4024-8AE8-0BA216ACDB65@gmail.com> References: <34DCE7F7-CBDE-4641-B03A-57C1205E80A5@ccs.neu.edu> <67BA21D4-C168-4024-8AE8-0BA216ACDB65@gmail.com> Message-ID: On Feb 25, 2009, at 7:15 PM, Jay McCarthy wrote: > I'll do it. I think I may have already found a bug. But I can't > email it just yet because I am traveling but I will get to it. When you get a chance, definitely let me know what you've found. I know that of a set of bugs that currently exist that involve contracts on imports now that I've refined my model for these contracts, and I plan to set those straight after Thursday. Stevie From dvanhorn at ccs.neu.edu Thu Feb 26 12:07:07 2009 From: dvanhorn at ccs.neu.edu (David Van Horn) Date: Thu Feb 26 12:07:33 2009 Subject: [plt-dev] Typed SRFI 14 Message-ID: <49A6CC3B.1090408@ccs.neu.edu> Attached. Notice the two types marked BOGUS. This is to work around bugs 10100 and 10101. Once those are fixed, the type which is commented out should be used. David -------------- next part -------------- #lang typed-scheme (require/opaque-type Char-Set char-set? srfi/14) (define-type-alias Cursor (Pair 0 (Listof (Pair Integer Integer)))) (require/typed srfi/14 ;; Predicates & comparison [char-set= (Char-Set * -> Boolean)] [char-set<= (Char-Set * -> Boolean)] [char-set-hash (case-lambda (Char-Set -> Integer) (Char-Set Integer -> Integer))] ;; Iterating over character sets [char-set-cursor (Char-Set -> Cursor)] [char-set-ref (Char-Set Cursor -> Char)] [char-set-cursor-next (Char-Set Cursor -> Cursor)] [end-of-char-set? (Cursor -> Boolean)] [char-set-map ((Char -> Char) Char-Set -> Char-Set)] ;; Creating character sets [char-set-copy (Char-Set -> Char-Set)] [char-set (Char * -> Char-Set)] [list->char-set (case-lambda ((Listof Char) -> Char-Set) ((Listof Char) Char-Set -> Char-Set))] [list->char-set! ((Listof Char) Char-Set -> Char-Set)] [string->char-set (case-lambda (String -> Char-Set) (String Char-Set -> Char-Set))] [string->char-set! (String Char-Set -> Char-Set)] [char-set-filter (case-lambda ((Char -> Any) Char-Set -> Char-Set) ((Char -> Any) Char-Set Char-Set -> Char-Set))] [char-set-filter! ((Char -> Any) Char-Set Char-Set -> Char-Set)] [ucs-range->char-set (case-lambda (Integer Integer -> Char-Set) (Integer Integer Any -> Char-Set) (Integer Integer Any Char-Set -> Char-Set))] [ucs-range->char-set! (Integer Integer Any Char-Set -> Char-Set)] [->char-set ((U String Char Char-Set) -> Char-Set)] ;; Querying character sets [char-set-size (Char-Set -> Integer)] [char-set-count ((Char -> Any) Char-Set -> Integer)] [char-set->list (Char-Set -> (Listof Char))] [char-set->string (Char-Set -> String)] [char-set-contains? (Char-Set Char -> Boolean)] ;; Character-set algebra [char-set-adjoin (Char-Set Char * -> Char-Set)] [char-set-delete (Char-Set Char * -> Char-Set)] [char-set-adjoin! (Char-Set Char * -> Char-Set)] [char-set-delete! (Char-Set Char * -> Char-Set)] [char-set-complement (Char-Set -> Char-Set)] [char-set-union (Char-Set * -> Char-Set)] [char-set-intersection (Char-Set * -> Char-Set)] [char-set-difference (Char-Set Char-Set * -> Char-Set)] [char-set-xor (Char-Set * -> Char-Set)] [char-set-diff+intersection ;; BOGUS: should be (Char-Set Char-Set * -> (values Char-Set Char-Set)) (Char-Set Char-Set Char-Set * -> (values Char-Set Char-Set))] [char-set-complement! (Char-Set -> Char-Set)] [char-set-union! (Char-Set Char-Set * -> Char-Set)] [char-set-intersection! (Char-Set Char-Set * -> Char-Set)] ;; BOGUS, should be (Char-Set Char-Set * -> Char-Set) [char-set-difference! (Char-Set Char-Set Char-Set * -> Char-Set)] [char-set-xor! (Char-Set Char-Set * -> Char-Set)] [char-set-diff+intersection! (Char-Set Char-Set Char-Set * -> (values Char-Set Char-Set))] ;; Standard character sets [char-set:lower-case Char-Set] [char-set:upper-case Char-Set] [char-set:title-case Char-Set] [char-set:letter Char-Set] [char-set:digit Char-Set] [char-set:letter+digit Char-Set] [char-set:graphic Char-Set] [char-set:printing Char-Set] [char-set:whitespace Char-Set] [char-set:iso-control Char-Set] [char-set:punctuation Char-Set] [char-set:symbol Char-Set] [char-set:hex-digit Char-Set] [char-set:blank Char-Set] [char-set:ascii Char-Set] [char-set:empty Char-Set] [char-set:full Char-Set] ) ; end of require/typed ;; Definitions provided here for polymorphism (: char-set-fold (All (A) ((Char A -> A) A Char-Set -> A))) (define (char-set-fold comb base cs) (let loop ((c (char-set-cursor cs)) (b base)) (cond [(end-of-char-set? c) b] [else (loop (char-set-cursor-next cs c) (comb (char-set-ref cs c) b))]))) (: char-set-unfold (All (A) (case-lambda ((A -> Any) (A -> Char) (A -> A) A -> Char-Set) ((A -> Any) (A -> Char) (A -> A) A Char-Set -> Char-Set)))) (define char-set-unfold (pcase-lambda: (A) [([p : (A -> Any)] [f : (A -> Char)] [g : (A -> A)] [seed : A]) (char-set-unfold p f g seed char-set:empty)] [([p : (A -> Any)] [f : (A -> Char)] [g : (A -> A)] [seed : A] [base-cs : Char-Set]) (char-set-unfold! p f g seed (char-set-copy base-cs))])) (: char-set-unfold! (All (A) ((A -> Any) (A -> Char) (A -> A) A Char-Set -> Char-Set))) (define (char-set-unfold! p f g seed base-cs) (let lp ((seed seed) (cs base-cs)) (if (p seed) cs ; P says we are done. (lp (g seed) ; Loop on (G SEED). (char-set-adjoin! cs (f seed)))))) (: char-set-for-each (All (A) ((Char -> A) Char-Set -> (U A Void)))) (define (char-set-for-each f cs) (char-set-fold (lambda: ([c : Char] [b : (U A Void)]) (f c)) (void) cs)) (: char-set-any (All (A) ((Char -> A) Char-Set -> (U A #f)))) (define (char-set-any pred cs) (let loop ((c (char-set-cursor cs))) (and (not (end-of-char-set? c)) (or (pred (char-set-ref cs c)) (loop (char-set-cursor-next cs c)))))) (: char-set-every (All (A) ((Char -> A) Char-Set -> (U A Boolean)))) (define (char-set-every pred cs) (let loop ((c (char-set-cursor cs)) (b (ann #t (U #t A)))) (cond [(end-of-char-set? c) b] [else (and b (loop (char-set-cursor-next cs c) (pred (char-set-ref cs c))))]))) (provide ;; Predicates & comparison char-set= char-set<= char-set-hash ;; Iterating over character sets char-set-cursor char-set-ref char-set-cursor-next end-of-char-set? char-set-fold char-set-unfold char-set-unfold! char-set-for-each char-set-map ;; Creating character sets char-set-copy char-set list->char-set list->char-set! string->char-set string->char-set! char-set-filter char-set-filter! ucs-range->char-set ucs-range->char-set! ->char-set ;; Querying character sets char-set-size char-set-count char-set->list char-set->string char-set-contains? char-set-every char-set-any ;; Character-set algebra char-set-adjoin char-set-delete char-set-adjoin! char-set-delete! char-set-complement char-set-union char-set-intersection char-set-difference char-set-xor char-set-diff+intersection char-set-complement! char-set-union! char-set-intersection! char-set-difference! char-set-xor! char-set-diff+intersection! ;; Standard character sets char-set:lower-case char-set:upper-case char-set:title-case char-set:letter char-set:digit char-set:letter+digit char-set:graphic char-set:printing char-set:whitespace char-set:iso-control char-set:punctuation char-set:symbol char-set:hex-digit char-set:blank char-set:ascii char-set:empty char-set:full ) ; end of provide From dherman at ccs.neu.edu Fri Feb 27 08:50:46 2009 From: dherman at ccs.neu.edu (Dave Herman) Date: Fri Feb 27 08:51:09 2009 Subject: [plt-dev] at-exp and whitespace Message-ID: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> I have a C parser that I would like to integrate with the at-exp reader so you can write things like #lang at-exp scheme/base ... (define decls @declaration-list{ typedef int foo; typedef char bar; }) There's a subtle pitfall: if you insert whitespace between @declaration-list and the first curly brace (which is very tempting, given traditional C style), it reads as (define decls declaration-list {typedef int foo typedef char bar}) which is then a syntax error with `define'. There doesn't seem to be any way that the `declaration-list' macro can defend against this with a clearer error message. As a compromise, would it make sense for the at-exp reader to turn off `read-curly-brace-as-paren' so that wherever an accidentally orphaned curly-brace argument appears, it can produce a more localized error? It's not a perfect solution, but curly braces are pretty rarely used as an S-expression delimiter so it might not be too bad of a compromise. Dave From mflatt at cs.utah.edu Fri Feb 27 08:58:23 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Fri Feb 27 08:58:45 2009 Subject: [plt-dev] at-exp and whitespace In-Reply-To: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> References: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> Message-ID: <20090227135825.566276500B2@mail-svr1.cs.utah.edu> At Fri, 27 Feb 2009 08:50:46 -0500, Dave Herman wrote: > As a compromise, would it make sense for the at-exp reader to turn off > `read-curly-brace-as-paren' so that wherever an accidentally orphaned > curly-brace argument appears, it can produce a more localized error? > It's not a perfect solution, but curly braces are pretty rarely used > as an S-expression delimiter so it might not be too bad of a compromise. I think this is a good idea. Just yesterday, some of us were noting that curly braces never found a use in S-expressions (unlike square brackets), and the role of curly braces in Scribble makes them less likely to gain a different role. From robby at eecs.northwestern.edu Fri Feb 27 09:13:53 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Fri Feb 27 09:14:15 2009 Subject: [plt-dev] at-exp and whitespace In-Reply-To: <20090227135825.566276500B2@mail-svr1.cs.utah.edu> References: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> <20090227135825.566276500B2@mail-svr1.cs.utah.edu> Message-ID: <932b2f1f0902270613j624eaeebu8841d38ffb887e26@mail.gmail.com> I agree. But the same problem can happen with [. What to do there? Robby On 2/27/09, Matthew Flatt wrote: > At Fri, 27 Feb 2009 08:50:46 -0500, Dave Herman wrote: >> As a compromise, would it make sense for the at-exp reader to turn off >> `read-curly-brace-as-paren' so that wherever an accidentally orphaned >> curly-brace argument appears, it can produce a more localized error? >> It's not a perfect solution, but curly braces are pretty rarely used >> as an S-expression delimiter so it might not be too bad of a compromise. > > I think this is a good idea. > > Just yesterday, some of us were noting that curly braces never found a > use in S-expressions (unlike square brackets), and the role of curly > braces in Scribble makes them less likely to gain a different role. > > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From eli at barzilay.org Fri Feb 27 09:20:10 2009 From: eli at barzilay.org (Eli Barzilay) Date: Fri Feb 27 09:20:31 2009 Subject: [plt-dev] at-exp and whitespace In-Reply-To: <932b2f1f0902270613j624eaeebu8841d38ffb887e26@mail.gmail.com> References: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> <20090227135825.566276500B2@mail-svr1.cs.utah.edu> <932b2f1f0902270613j624eaeebu8841d38ffb887e26@mail.gmail.com> Message-ID: <18855.63130.456458.808099@winooski.ccs.neu.edu> JFYI, the reason I implemented it this way is that I was worried about what would happen if any whitespace is allows. I was worried that something like this can be a common mistake: (define foo "blah") @text{ @foo @foo @foo [but not another @foo] } The error will be reading this as: (define foo "blah") (text " " foo " " foo " " (foo but not another foo) " ") For a while, I considered allowing only spaces (not newlines), but the result is an awkward set of rules to parse @-forms, so I chose to go with the simple and uniform option. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Fri Feb 27 09:29:22 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Fri Feb 27 09:29:45 2009 Subject: [plt-dev] at-exp and whitespace In-Reply-To: <18855.63130.456458.808099@winooski.ccs.neu.edu> References: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> <20090227135825.566276500B2@mail-svr1.cs.utah.edu> <932b2f1f0902270613j624eaeebu8841d38ffb887e26@mail.gmail.com> <18855.63130.456458.808099@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902270629r2e359a82qde7581fcbad91ba@mail.gmail.com> FWIW I like the "simple uniform" aspect of the current setup. I was just wondering if there would be a way to signal an error for [ case. Robby On 2/27/09, Eli Barzilay wrote: > JFYI, the reason I implemented it this way is that I was worried about > what would happen if any whitespace is allows. I was worried that > something like this can be a common mistake: > > (define foo "blah") > @text{ @foo @foo @foo > [but not another @foo] } > > The error will be reading this as: > > (define foo "blah") > (text " " foo " " foo " " (foo but not another foo) " ") > > For a while, I considered allowing only spaces (not newlines), but the > result is an awkward set of rules to parse @-forms, so I chose to go > with the simple and uniform option. > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > http://www.barzilay.org/ Maze is Life! > From eli at barzilay.org Fri Feb 27 09:32:34 2009 From: eli at barzilay.org (Eli Barzilay) Date: Fri Feb 27 09:32:55 2009 Subject: [plt-dev] at-exp and whitespace In-Reply-To: <932b2f1f0902270629r2e359a82qde7581fcbad91ba@mail.gmail.com> References: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> <20090227135825.566276500B2@mail-svr1.cs.utah.edu> <932b2f1f0902270613j624eaeebu8841d38ffb887e26@mail.gmail.com> <18855.63130.456458.808099@winooski.ccs.neu.edu> <932b2f1f0902270629r2e359a82qde7581fcbad91ba@mail.gmail.com> Message-ID: <18855.63874.239520.619027@winooski.ccs.neu.edu> On Feb 27, Robby Findler wrote: > FWIW I like the "simple uniform" aspect of the current setup. I was > just wondering if there would be a way to signal an error for [ > case. I'm not sure either... I should have added "suggestions welcome". (And a quick reminder: my personal experience with the @-forms is that designing a *good* concrete-level syntax extension is two orders of magnitude more difficult than writing a macro. (Which, or an even more unrelated not, is exactly why macros are so great...)) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From matthias at ccs.neu.edu Fri Feb 27 09:32:57 2009 From: matthias at ccs.neu.edu (Matthias Felleisen) Date: Fri Feb 27 09:33:39 2009 Subject: [plt-dev] at-exp and whitespace In-Reply-To: <18855.63130.456458.808099@winooski.ccs.neu.edu> References: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> <20090227135825.566276500B2@mail-svr1.cs.utah.edu> <932b2f1f0902270613j624eaeebu8841d38ffb887e26@mail.gmail.com> <18855.63130.456458.808099@winooski.ccs.neu.edu> Message-ID: Doesn't Shriram use { } in S-expressions for PLAI? On Feb 27, 2009, at 9:20 AM, Eli Barzilay wrote: > JFYI, the reason I implemented it this way is that I was worried about > what would happen if any whitespace is allows. I was worried that > something like this can be a common mistake: > > (define foo "blah") > @text{ @foo @foo @foo > [but not another @foo] } > > The error will be reading this as: > > (define foo "blah") > (text " " foo " " foo " " (foo but not another foo) " ") > > For a while, I considered allowing only spaces (not newlines), but the > result is an awkward set of rules to parse @-forms, so I chose to go > with the simple and uniform option. > > -- > ((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-dev From eli at barzilay.org Fri Feb 27 09:37:46 2009 From: eli at barzilay.org (Eli Barzilay) Date: Fri Feb 27 09:38:07 2009 Subject: [plt-dev] at-exp and whitespace In-Reply-To: References: <6E434341-81F9-4248-B9C5-ADEEFB68DBD3@ccs.neu.edu> <20090227135825.566276500B2@mail-svr1.cs.utah.edu> <932b2f1f0902270613j624eaeebu8841d38ffb887e26@mail.gmail.com> <18855.63130.456458.808099@winooski.ccs.neu.edu> Message-ID: <18855.64186.704969.524507@winooski.ccs.neu.edu> On Feb 27, Matthias Felleisen wrote: > > Doesn't Shriram use { } in S-expressions for PLAI? Yes. That's a good point against forbidding {}s in at-exp, I think. BTW, perhaps another point is that even if they're forbidden, they would still be allowed in text-bodies, and that's where most errors are likely to occur? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jos.koot at telefonica.net Fri Feb 27 10:05:08 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Fri Feb 27 10:11:26 2009 Subject: [plt-dev] Call for Participation: Writing Typed Scheme wrappermodules References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> Message-ID: <202BB73E2D6C4A60BE68C6EF1FE307D0@uw2b2dff239c4d> I'll take scheme/pretty if not already taken by someone else. Jos From dvanhorn at ccs.neu.edu Fri Feb 27 13:10:04 2009 From: dvanhorn at ccs.neu.edu (David Van Horn) Date: Fri Feb 27 13:10:30 2009 Subject: [plt-dev] patch for SRFI 14 contracts Message-ID: <49A82C7C.3040308@ccs.neu.edu> This fixes bugs 10100 & 10101. David -------------- next part -------------- Index: collects/srfi/14/char-set.ss =================================================================== --- collects/srfi/14/char-set.ss (revision 13869) +++ collects/srfi/14/char-set.ss (working copy) @@ -434,10 +434,10 @@ [char-set-intersection char-sets0/c] [char-set-intersection! char-sets/c] [char-set-difference char-sets/c] - [char-set-difference! char-sets+/c] + [char-set-difference! char-sets/c] [char-set-xor char-sets0/c] [char-set-xor! char-sets/c] - [char-set-diff+intersection char-sets+/c] + [char-set-diff+intersection char-sets/c] [char-set-diff+intersection! char-sets+/c]) (provide char-set:lower-case From jay.mccarthy at gmail.com Fri Feb 27 13:39:22 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Fri Feb 27 13:39:56 2009 Subject: [plt-dev] Re: XML units In-Reply-To: References: Message-ID: The html collection now have complete contracts. Jay On Thu, Feb 26, 2009 at 10:09 AM, Jay McCarthy wrote: > I've just updated SVN with new html and xml collects. xml use the new > unit system and uses mild contracts (some of the stuff can't be > contracted yet; stevie knows.) html doesn't have units anymore, > because there's some bug (that stevie now knows about.) > > Some of the contracts might not be quite right, so let me know if you > notice problems. > > Jay > > On Wed, Feb 25, 2009 at 3:12 PM, Jay McCarthy wrote: >> Is anyone attached to the units in the XML collection? I am planning on >> adding some new features and contracts and they are tedious to deal with. >> >> Jay >> >> Sent from my iAwesome. >> > > > > -- > Jay McCarthy > Assistant Professor / Brigham Young University > http://teammccarthy.org/jay > > "The glory of God is Intelligence" - D&C 93 > -- Jay McCarthy Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93 From harsha.v.r at gmail.com Fri Feb 27 15:24:43 2009 From: harsha.v.r at gmail.com (harsha) Date: Fri Feb 27 15:25:02 2009 Subject: [plt-dev] typed scheme/path Message-ID: <6b322b300902271224p6dd59930l84d1f701c62a61d2@mail.gmail.com> Below is typed scheme/path, The typed version of normalize-path doesn't allow an optional argument. ; path.ss ; LGPL licensed #lang typed-scheme (define-type-alias Path/str (U Path String)) (define-type-alias Path-string String) (require/typed scheme/path [explode-path (Path/str -> (Listof (U Path 'up 'same)))] [find-relative-path (Path/str Path/str -> Path)] [simple-form-path (Path-string -> Path)] [normalize-path (Path-string -> Path)] ; doesn't allow an optional argument [filename-extension (Path/str -> (Option Bytes))] [file-name-from-path (Path/str -> (Option Path))] [path-only (Path/str -> Path)] [some-system-path->string (Path -> String)] [string->some-system-path (String (U 'unix 'windows) -> Path)]) (provide find-relative-path explode-path simple-form-path normalize-path filename-extension file-name-from-path path-only some-system-path->string string->some-system-path) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090227/6246d163/attachment.html From jay.mccarthy at gmail.com Fri Feb 27 15:30:06 2009 From: jay.mccarthy at gmail.com (Jay McCarthy) Date: Fri Feb 27 15:30:34 2009 Subject: [plt-dev] Re: XML units In-Reply-To: References: Message-ID: The xml collection now also has complete contracts and does not use units any longer. Jay -- Jay McCarthy Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93 From dvanhorn at ccs.neu.edu Fri Feb 27 15:36:44 2009 From: dvanhorn at ccs.neu.edu (David Van Horn) Date: Fri Feb 27 15:37:07 2009 Subject: [plt-dev] typed scheme/path In-Reply-To: <6b322b300902271224p6dd59930l84d1f701c62a61d2@mail.gmail.com> References: <6b322b300902271224p6dd59930l84d1f701c62a61d2@mail.gmail.com> Message-ID: <49A84EDC.7070908@ccs.neu.edu> harsha wrote: > Below is typed scheme/path, > The typed version of normalize-path doesn't allow an optional argument. Note that you can do this using the case-lambda type constructor: [normalize-path (case-lambda (Path-string -> Path) (Path-string Path-string -> Path))] By the way, shouldn't these instances of Path-string really be Path/str? This program works fine: #lang scheme (require scheme/path) (path? "foo") (string? "foo") (normalize-path "foo") (path? (current-directory)) (string? (current-directory)) (normalize-path (current-directory)) David > ; path.ss > ; LGPL licensed > > #lang typed-scheme > > (define-type-alias Path/str (U Path String)) > (define-type-alias Path-string String) From harsha.v.r at gmail.com Fri Feb 27 16:07:37 2009 From: harsha.v.r at gmail.com (harsha) Date: Fri Feb 27 16:07:55 2009 Subject: [plt-dev] typed scheme/path In-Reply-To: <49A84EDC.7070908@ccs.neu.edu> References: <6b322b300902271224p6dd59930l84d1f701c62a61d2@mail.gmail.com> <49A84EDC.7070908@ccs.neu.edu> Message-ID: <6b322b300902271307j30050bcaj632c188a929ca67@mail.gmail.com> > Note that you can do this using the case-lambda type constructor thanks, i'll fix this > shouldn't these instances of Path-string really be Path/str? you are right, Path-string should also allow Path, this was a mistake. I kept Path-string & Path/str separate as they use Path-for-current-system vs Path-for-some-system and wasn't sure if this could be distinguished by the type system. There is just a single Path type so i think they cant be distinguished, and so are both the same type (U Path String) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090227/bd4693a3/attachment.htm From harsha.v.r at gmail.com Fri Feb 27 16:21:18 2009 From: harsha.v.r at gmail.com (harsha) Date: Fri Feb 27 16:21:38 2009 Subject: [plt-dev] typed scheme/path In-Reply-To: <49A84EDC.7070908@ccs.neu.edu> References: <6b322b300902271224p6dd59930l84d1f701c62a61d2@mail.gmail.com> <49A84EDC.7070908@ccs.neu.edu> Message-ID: <6b322b300902271321p54519a5k28fbbd9f33f098ea@mail.gmail.com> i just went back and checked and Path type doesn't include Path-for-some-system (string->some-system-path "file" 'windows) fails to type check as its output is supposed to be Path, but it returns a windows-path (i am on unix). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090227/059cc83e/attachment.htm From yinso.chen at gmail.com Fri Feb 27 16:38:42 2009 From: yinso.chen at gmail.com (YC) Date: Fri Feb 27 16:39:05 2009 Subject: [plt-dev] typed scheme wrapper for file/gif Message-ID: <779bf2730902271338h49826b71n7197175e3ff62f85@mail.gmail.com> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: gif.ss Type: application/octet-stream Size: 2598 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090227/cb9d6ecd/gif-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: gif.ss.patch Type: text/x-patch Size: 478 bytes Desc: not available Url : http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090227/cb9d6ecd/gif.ss-0001.bin From samth at ccs.neu.edu Fri Feb 27 17:20:29 2009 From: samth at ccs.neu.edu (Sam TH) Date: Fri Feb 27 17:20:47 2009 Subject: [plt-dev] Re: Call for Participation: Writing Typed Scheme wrapper modules In-Reply-To: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> References: <63bb19ae0902241305n1b79caa9tc87dea8c989ca950@mail.gmail.com> Message-ID: <63bb19ae0902271420h895eed1t5eb1edc4b0cc4639@mail.gmail.com> On Tue, Feb 24, 2009 at 4:05 PM, Sam TH wrote: > > We'd like volunteers for writing wrapper modules that adapt untyped > libraries to Typed Scheme. I'd like to say thanks so much for everyone's enthusiasm and contributions. I now have a bunch of code which I will look over, and put into the SVN repository very soon. Thanks again, -- sam th samth@ccs.neu.edu From dvanhorn at ccs.neu.edu Fri Feb 27 19:31:03 2009 From: dvanhorn at ccs.neu.edu (David Van Horn) Date: Fri Feb 27 19:31:26 2009 Subject: [plt-dev] typed scheme/path In-Reply-To: <6b322b300902271321p54519a5k28fbbd9f33f098ea@mail.gmail.com> References: <6b322b300902271224p6dd59930l84d1f701c62a61d2@mail.gmail.com> <49A84EDC.7070908@ccs.neu.edu> <6b322b300902271321p54519a5k28fbbd9f33f098ea@mail.gmail.com> Message-ID: <49A885C7.8080100@ccs.neu.edu> harsha wrote: > i just went back and checked and Path type doesn't include > Path-for-some-system > (string->some-system-path "file" 'windows) fails to type check as its > output is supposed to be Path, but it returns a windows-path (i am on unix). You can do the following: #lang typed-scheme (require/opaque-type Some-System-Path path-for-some-system? scheme) (require/typed scheme/path [string->some-system-path (String (U 'windows 'unix) -> Some-System-Path)]) (string->some-system-path "file" 'windows) David From robby at eecs.northwestern.edu Sat Feb 28 06:52:18 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 28 06:52:40 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x Message-ID: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> When I searched for bitmap% by putting my mouse on the word and hitting f1 in drscheme, I got this: browser-run: process execute failed: (# "-e" "open location \"file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25\"") My shell reports Unmatched ". when I just try those arguments. When I try this commandline it works great: osascript -e 'open location "file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25"' Robby From eli at barzilay.org Sat Feb 28 07:28:06 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 28 07:28:28 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> Message-ID: <18857.11734.949563.183611@winooski.ccs.neu.edu> On Feb 28, Robby Findler wrote: > When I searched for bitmap% by putting my mouse on the word and > hitting f1 in drscheme, I got this: > > browser-run: process execute failed: (# "-e" > "open location \"file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25\"") > > My shell reports > > Unmatched ". > > when I just try those arguments. When I try this commandline it > works great: > > osascript -e 'open location > "file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25"' Weird. After trying some things, I think that: * The `unmatched' error that you get when you run it in your shell is probably because you're using tcsh (which is, IIRC, the default on OSX). You probably get the same result for echo "foo \"bar\" foo" [And BTW, tcsh is a terrible choice for a shell, as I was reminded by googling for "tcsh quotes" which got me quickly to http://www.grymoire.com/Unix/CshTop10.txt -- with enough hair that should make you scream in horror.] [I usually recommend zsh these days, but even bash is better if you want to use your shell in any way that is an epsilon above complete naive things.] * The second one worked fine, because happens to mean what you think it does in tcsh. (As well as in other shells.) * If the above is correct, then the "process execute failed" is due to some other problem (it doesn't use a shell on OSX). (And I don't have a clue what it might be.) Probably similar to the problem that Matthias had a while ago. * And BTW, if you grep that thread, you'll see that we went through the same story... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From chust at web.de Sat Feb 28 07:36:14 2009 From: chust at web.de (Thomas Chust) Date: Sat Feb 28 07:36:31 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> Message-ID: <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> 2009-02.28 Robby Findler : > [...] > browser-run: process execute failed: (# "-e" > "open location \"file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25\"") > [...] Hello, out of curiosity: Is there any particular reason why PLT Scheme doesn't use the LaunchServices API to open the URL instead of executing an external command? And if it is necessary to use an external command, why does it have to be that complicated instead of just running /usr/bin/open ? cu, Thomas -- When C++ is your hammer, every problem looks like your thumb. From eli at barzilay.org Sat Feb 28 07:42:21 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 28 07:42:47 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> Message-ID: <18857.12589.944299.659004@winooski.ccs.neu.edu> On Feb 28, Thomas Chust wrote: > 2009-02.28 Robby Findler : > > [...] > > browser-run: process execute failed: (# "-e" > > "open location \"file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25\"") > > [...] > > Hello, > > out of curiosity: Is there any particular reason why PLT Scheme > doesn't use the LaunchServices API to open the URL instead of > executing an external command? Much easier to implement, and extremely negligible cost (compared to starting your browser and making it render a documentation page). > And if it is necessary to use an external command, why does it have > to be that complicated instead of just running /usr/bin/open ? That, I don't know. Robby -- while you're having this problem (it looks like it's not consistent), maybe you can try to change to the above and see if it works better? (The change in net/sendurl.ss should be very easy.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Sat Feb 28 07:41:17 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 28 08:00:05 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <18857.11734.949563.183611@winooski.ccs.neu.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <18857.11734.949563.183611@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902280441t7a06c42ara3f81ed507b3278e@mail.gmail.com> Yes, I have tcsh. Probably a red herring, then. Robby On Sat, Feb 28, 2009 at 6:28 AM, Eli Barzilay wrote: > On Feb 28, Robby Findler wrote: >> When I searched for bitmap% by putting my mouse on the word and >> hitting f1 in drscheme, I got this: >> >> browser-run: process execute failed: (# "-e" >> "open location \"file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25\"") >> >> My shell reports >> >> ? Unmatched ". >> >> when I just try those arguments. ?When I try this commandline it >> works great: >> >> osascript -e 'open location >> "file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25"' > > Weird. ?After trying some things, I think that: > > * The `unmatched' error that you get when you run it in your shell is > ?probably because you're using tcsh (which is, IIRC, the default on > ?OSX). ?You probably get the same result for > > ? ?echo "foo \"bar\" foo" > > ?[And BTW, tcsh is a terrible choice for a shell, as I was reminded > ?by googling for "tcsh quotes" which got me quickly to > ?http://www.grymoire.com/Unix/CshTop10.txt -- with enough hair that > ?should make you scream in horror.] > > ?[I usually recommend zsh these days, but even bash is better if you > ?want to use your shell in any way that is an epsilon above complete > ?naive things.] > > * The second one worked fine, because happens to mean what you think > ?it does in tcsh. ?(As well as in other shells.) > > * If the above is correct, then the "process execute failed" is due to > ?some other problem (it doesn't use a shell on OSX). ?(And I don't > ?have a clue what it might be.) ?Probably similar to the problem that > ?Matthias had a while ago. > > * And BTW, if you grep that thread, you'll see that we went through > ?the same story... > > -- > ? ? ? ? ?((lambda (x) (x x)) (lambda (x) (x x))) ? ? ? ? ?Eli Barzilay: > ? ? ? ? ? ? ? ? ?http://www.barzilay.org/ ? ? ? ? ? ? ? ? Maze is Life! > From robby at eecs.northwestern.edu Sat Feb 28 08:01:23 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 28 08:01:59 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <18857.12589.944299.659004@winooski.ccs.neu.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> On Sat, Feb 28, 2009 at 6:42 AM, Eli Barzilay wrote: > On Feb 28, Thomas Chust wrote: >> 2009-02.28 Robby Findler : >> > [...] >> > browser-run: process execute failed: (# "-e" >> > "open location \"file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25\"") >> > [...] >> >> Hello, >> >> out of curiosity: Is there any particular reason why PLT Scheme >> doesn't use the LaunchServices API to open the URL instead of >> executing an external command? > > Much easier to implement, and extremely negligible cost (compared to > starting your browser and making it render a documentation page). Maybe it is time to use launchservices, since we're having problems passing arguments, apparently. >> And if it is necessary to use an external command, why does it have >> to be that complicated instead of just running /usr/bin/open ? > > That, I don't know. ?Robby -- while you're having this problem (it > looks like it's not consistent), maybe you can try to change to the > above and see if it works better? ?(The change in net/sendurl.ss > should be very easy.) I hit f1 in exactly the same place and now I get no error (with osascript). Boy, that's annoying. When I use 'open' I get this: The file /Users/robby/svn/plt/collects/net/'file:/Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=help' does not exist. browser-run: process execute failed: (# "'file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=help'") Robby From robby at eecs.northwestern.edu Sat Feb 28 08:01:38 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 28 08:02:33 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> Message-ID: <932b2f1f0902280501tc95fa6cxd60afb8baca87a95@mail.gmail.com> (Oh -- and I tried with "" as well as with ''). Robby On Sat, Feb 28, 2009 at 7:01 AM, Robby Findler wrote: > On Sat, Feb 28, 2009 at 6:42 AM, Eli Barzilay wrote: >> On Feb 28, Thomas Chust wrote: >>> 2009-02.28 Robby Findler : >>> > [...] >>> > browser-run: process execute failed: (# "-e" >>> > "open location \"file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=bitmap%25\"") >>> > [...] >>> >>> Hello, >>> >>> out of curiosity: Is there any particular reason why PLT Scheme >>> doesn't use the LaunchServices API to open the URL instead of >>> executing an external command? >> >> Much easier to implement, and extremely negligible cost (compared to >> starting your browser and making it render a documentation page). > > Maybe it is time to use launchservices, since we're having problems > passing arguments, apparently. > >>> And if it is necessary to use an external command, why does it have >>> to be that complicated instead of just running /usr/bin/open ? >> >> That, I don't know. ?Robby -- while you're having this problem (it >> looks like it's not consistent), maybe you can try to change to the >> above and see if it works better? ?(The change in net/sendurl.ss >> should be very easy.) > I hit f1 in exactly the same place and now I get no error (with > osascript). Boy, that's annoying. > > When I use 'open' I get this: > > The file /Users/robby/svn/plt/collects/net/'file:/Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=help' > does not exist. > browser-run: process execute failed: (# > "'file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=help'") > > Robby > From mflatt at cs.utah.edu Sat Feb 28 08:04:32 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sat Feb 28 08:04:56 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> Message-ID: <20090228130433.B68E56500B2@mail-svr1.cs.utah.edu> At Sat, 28 Feb 2009 07:01:23 -0600, Robby Findler wrote: > When I use 'open' I get this: > > The file > /Users/robby/svn/plt/collects/net/'file:/Users/robby/Library/PLT%20Scheme/4.1.4 > .3/doc/search/index.html?q=help' > does not exist. > browser-run: process execute failed: (# > "'file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=help > '") I think you'd want just the file path for `open', without the "file://" prefix. But, if I remember correctly, the reason we don't use `open' is that it does not accommodate an HTML anchor within the page (i.e., a "#..." suffix after the file path). From eli at barzilay.org Sat Feb 28 08:06:05 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 28 08:06:26 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> Message-ID: <18857.14013.774207.783375@winooski.ccs.neu.edu> On Feb 28, Robby Findler wrote: > On Sat, Feb 28, 2009 at 6:42 AM, Eli Barzilay wrote: > > > > Much easier to implement, and extremely negligible cost (compared > > to starting your browser and making it render a documentation > > page). > > Maybe it is time to use launchservices, since we're having problems > passing arguments, apparently. In case it wasn't clear -- I'm almost a 100% sure that the problem is not in passing arguments but somewhere in osascript. (That's exactly the confusion that happened with the previous thread too.) If there is a problem with passing arguments to a process then a lot more is likely to break. > > That, I don't know. ?Robby -- while you're having this problem (it > > looks like it's not consistent), maybe you can try to change to the > > above and see if it works better? ?(The change in net/sendurl.ss > > should be very easy.) > I hit f1 in exactly the same place and now I get no error (with > osascript). Boy, that's annoying. > > When I use 'open' I get this: > > The file /Users/robby/svn/plt/collects/net/'file:/Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=help' > does not exist. > browser-run: process execute failed: (# > "'file:///Users/robby/Library/PLT%20Scheme/4.1.4.3/doc/search/index.html?q=help'") That should not have the single quotes -- it's a scheme string that is passed directly to the subprocess. (Did I already mention how bad tcsh is?) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Sat Feb 28 08:13:01 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 28 08:13:19 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <18857.14013.774207.783375@winooski.ccs.neu.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> <18857.14013.774207.783375@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902280513n148ec73eo770e0485e11e9560@mail.gmail.com> On Sat, Feb 28, 2009 at 7:06 AM, Eli Barzilay wrote: > On Feb 28, Robby Findler wrote: >> On Sat, Feb 28, 2009 at 6:42 AM, Eli Barzilay wrote: >> > >> > Much easier to implement, and extremely negligible cost (compared >> > to starting your browser and making it render a documentation >> > page). >> >> Maybe it is time to use launchservices, since we're having problems >> passing arguments, apparently. > > In case it wasn't clear -- I'm almost a 100% sure that the problem is > not in passing arguments but somewhere in osascript. ?(That's exactly > the confusion that happened with the previous thread too.) ?If there > is a problem with passing arguments to a process then a lot more is > likely to break. "passing arguments to osascript", then. Either way, osascript won't be involved if we use the C api. Robby From grettke at acm.org Sat Feb 28 08:13:19 2009 From: grettke at acm.org (Grant Rettke) Date: Sat Feb 28 08:13:40 2009 Subject: [plt-dev] Should Check Syntax work on R6RS library files? Message-ID: <756daca50902280513h26efc24cjd12b69b79b950f52@mail.gmail.com> Should Check Syntax work on R6RS library files? From eli at barzilay.org Sat Feb 28 08:37:50 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 28 08:38:10 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <932b2f1f0902280513n148ec73eo770e0485e11e9560@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <932b2f1f0902280501p11fdec9cpadff489653e69421@mail.gmail.com> <18857.14013.774207.783375@winooski.ccs.neu.edu> <932b2f1f0902280513n148ec73eo770e0485e11e9560@mail.gmail.com> Message-ID: <18857.15918.307165.962042@winooski.ccs.neu.edu> On Feb 28, Robby Findler wrote: > On Sat, Feb 28, 2009 at 7:06 AM, Eli Barzilay wrote: > > > > In case it wasn't clear -- I'm almost a 100% sure that the problem > > is not in passing arguments but somewhere in osascript. (That's > > exactly the confusion that happened with the previous thread too.) > > If there is a problem with passing arguments to a process then a > > lot more is likely to break. > > "passing arguments to osascript", then. Either way, osascript won't > be involved if we use the C api. No, I don't think that the problem is in passing the arguments at all. I think that it is a problem *in* osascript itself. (Which can just as well be coming from the C api.) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From jos.koot at telefonica.net Sat Feb 28 09:18:07 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Sat Feb 28 09:18:31 2009 Subject: [plt-dev] Should Check Syntax work on R6RS library files? References: <756daca50902280513h26efc24cjd12b69b79b950f52@mail.gmail.com> Message-ID: <0075BBC8D2D943A9B15FA3907F134C6A@uw2b2dff239c4d> It works for me. Jos ----- Original Message ----- From: "Grant Rettke" To: "PLT Developers" Sent: Saturday, February 28, 2009 2:13 PM Subject: [plt-dev] Should Check Syntax work on R6RS library files? > Should Check Syntax work on R6RS library files? > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev From chust at web.de Sat Feb 28 09:24:25 2009 From: chust at web.de (Thomas Chust) Date: Sat Feb 28 09:30:08 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <18857.12589.944299.659004@winooski.ccs.neu.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> Message-ID: <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> 2009-02-28 Eli Barzilay : > On Feb 28, Thomas Chust wrote: >> [...] >> out of curiosity: Is there any particular reason why PLT Scheme >> doesn't use the LaunchServices API to open the URL instead of >> executing an external command? > > Much easier to implement, and extremely negligible cost (compared to > starting your browser and making it render a documentation page). > [...] Hello, using LaunchServices, you would need exactly two C API calls: One to create the URL object (http://developer.apple.com/documentation/CoreFoundation/Reference/CFURLRef/Reference/reference.html#//apple_ref/c/func/CFURLCreateWithBytes) and one to open the URL (http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/LSOpenCFURLRef) -- this is hardly more complicated to implement than creating a command line with proper escaping and launching an external program. You are right, though, that the cost is negligible and as long as it works correctly nobody cares about the implementation. I was just curious why the special OS API is used to open URLs on Windows but not on MacOS X. Using a C API directly often saves you from nasty shell quoting issues and the problem described by the OP looked to me like it could have been such an issue. However, since the further discussion in this thread showed that the problem is probably not PLT Scheme's fault, it is questionable whether using the C API would make the problem go away. Unfortunately I can't boot my installation of MacOS X at the moment to give it a try :-( cu, Thomas -- When C++ is your hammer, every problem looks like your thumb. From eli at barzilay.org Sat Feb 28 09:42:28 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 28 09:42:49 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> Message-ID: <18857.19796.732998.450210@winooski.ccs.neu.edu> On Feb 28, Thomas Chust wrote: > 2009-02-28 Eli Barzilay : > > On Feb 28, Thomas Chust wrote: > >> [...] > >> out of curiosity: Is there any particular reason why PLT Scheme > >> doesn't use the LaunchServices API to open the URL instead of > >> executing an external command? > > > > Much easier to implement, and extremely negligible cost (compared to > > starting your browser and making it render a documentation page). > > [...] > > Hello, > > using LaunchServices, you would need exactly two C API calls: One to > create the URL object > (http://developer.apple.com/documentation/CoreFoundation/Reference/CFURLRef/Reference/reference.html#//apple_ref/c/func/CFURLCreateWithBytes) > and one to open the URL > (http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/LSOpenCFURLRef) ??? On a very brief look, I need to read about and represent `CFURLRef', `CFAllocatorRef', `CFIndex', and `CFStringEncoding'. IMO this is significantly more complex than "run an osascript command and plug the url here". > -- this is hardly more complicated to implement than creating a > command line with proper escaping and launching an external program. These needs to be done in any case. > You are right, though, that the cost is negligible and as long as it > works correctly nobody cares about the implementation. I was just > curious why the special OS API is used to open URLs on Windows but > not on MacOS X. That's easy: `shell-execute' on Windows is not one random function, it is a generic way to "start stuff", so it's part of mred. But you really don't want to know about Windows problems (see the comments if you're tempted). > Using a C API directly often saves you from nasty shell quoting > issues and the problem described by the OP looked to me like it > could have been such an issue. Since this is about the 4th time I'm saying this, I'll try to be very clear: * osascript is invoked directly -- there are no nasty shell quoting issues. (The only issue about that is tcsh being the default shell, which leads to such discussions in irrelevant directions.) * Assuming that osascript is doing a simple call for the same functions, I wouldn't be surprised if the exact same problem is still there. (Possibly less obscure, but possibly manifested as a segfault.) > However, since the further discussion in this thread showed that the > problem is probably not PLT Scheme's fault, it is questionable > whether using the C API would make the problem go away. > Unfortunately I can't boot my installation of MacOS X at the moment > to give it a try :-( BTW, I'm not using OSX, so I personally can't do anything about this. I think that there will not be much objection to writing this code to use the osx api -- but this kind of a change will need to be tested very thoroughly, since it is doing a rather important job. Actually, the last part is another argument for osascript -- using the "invoke it this way" interface is (IMO) much less likely to change than the C api. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From mflatt at cs.utah.edu Sat Feb 28 09:57:01 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sat Feb 28 09:57:21 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <18857.19796.732998.450210@winooski.ccs.neu.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> <18857.19796.732998.450210@winooski.ccs.neu.edu> Message-ID: <20090228145702.CC6796500B2@mail-svr1.cs.utah.edu> At Sat, 28 Feb 2009 09:42:28 -0500, Eli Barzilay wrote: > > You are right, though, that the cost is negligible and as long as it > > works correctly nobody cares about the implementation. I was just > > curious why the special OS API is used to open URLs on Windows but > > not on MacOS X. > > That's easy: `shell-execute' on Windows is not one random function, it > is a generic way to "start stuff", so it's part of mred. I think the same is true of Launch Services, actually, and probably MzScheme should support it like ShellExecute. I'll look into that sometime soon. (The last time I considered the OS support for opening items, the answer on Mac OS was AppleEvents. So, obviously, it has been a while since I looked at this.) From eli at barzilay.org Sat Feb 28 09:58:49 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 28 09:59:10 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <20090228145702.CC6796500B2@mail-svr1.cs.utah.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> <18857.19796.732998.450210@winooski.ccs.neu.edu> <20090228145702.CC6796500B2@mail-svr1.cs.utah.edu> Message-ID: <18857.20777.382941.47361@winooski.ccs.neu.edu> On Feb 28, Matthew Flatt wrote: > At Sat, 28 Feb 2009 09:42:28 -0500, Eli Barzilay wrote: > > > You are right, though, that the cost is negligible and as long > > > as it works correctly nobody cares about the implementation. I > > > was just curious why the special OS API is used to open URLs on > > > Windows but not on MacOS X. > > > > That's easy: `shell-execute' on Windows is not one random > > function, it is a generic way to "start stuff", so it's part of > > mred. > > I think the same is true of Launch Services, actually, and probably > MzScheme should support it like ShellExecute. I'll look into that > sometime soon. So that's a different API? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From grettke at acm.org Sat Feb 28 10:07:07 2009 From: grettke at acm.org (Grant Rettke) Date: Sat Feb 28 10:07:25 2009 Subject: [plt-dev] Should Check Syntax work on R6RS library files? In-Reply-To: <0075BBC8D2D943A9B15FA3907F134C6A@uw2b2dff239c4d> References: <756daca50902280513h26efc24cjd12b69b79b950f52@mail.gmail.com> <0075BBC8D2D943A9B15FA3907F134C6A@uw2b2dff239c4d> Message-ID: <756daca50902280707h1a3a6f30r4e30f8c371d88095@mail.gmail.com> > It works for me. If you define a record, and export its constructor and all of its accessors; then if you run check-syntax: 1. Can you rename the record 2. Do the exports get renamed? From jos.koot at telefonica.net Sat Feb 28 10:18:27 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Sat Feb 28 10:18:47 2009 Subject: [plt-dev] Should Check Syntax work on R6RS library files? References: <756daca50902280513h26efc24cjd12b69b79b950f52@mail.gmail.com> <0075BBC8D2D943A9B15FA3907F134C6A@uw2b2dff239c4d> <756daca50902280707h1a3a6f30r4e30f8c371d88095@mail.gmail.com> Message-ID: <3D9872BF2E574C1A9F9DF8CAB778215B@uw2b2dff239c4d> That does not work in #lang scheme either. Jos ----- Original Message ----- From: "Grant Rettke" To: "Jos Koot" Cc: "PLT Developers" Sent: Saturday, February 28, 2009 4:07 PM Subject: Re: [plt-dev] Should Check Syntax work on R6RS library files? >> It works for me. > > If you define a record, and export its constructor and all of its > accessors; then if you run check-syntax: > > 1. Can you rename the record > 2. Do the exports get renamed? From harsha.v.r at gmail.com Sat Feb 28 10:31:33 2009 From: harsha.v.r at gmail.com (harsha) Date: Sat Feb 28 10:31:52 2009 Subject: [plt-dev] Re: typed scheme/path - new adapter for scheme/path Message-ID: <6b322b300902280731u1cd8830by877172faa6e10a4c@mail.gmail.com> ;path.ss ;LGPL licensed #lang typed-scheme (require/opaque-type Path-for-some-system path-for-some-system? scheme) (define-type-alias String/Path-for-some-system (U String Path-for-some-system)) (define-type-alias String/Path (U String Path)) (require/typed scheme/path [find-relative-path (String/Path-for-some-system String/Path-for-some-system -> Path-for-some-system)] [explode-path (String/Path-for-some-system -> (Listof (U Path-for-some-system 'up 'same)))] [simple-form-path (String/Path -> Path)] [normalize-path (case-lambda (String/Path -> Path) (String/Path String/Path -> Path))] ;second argument can be made more expressive by using a complete-path opaque type [filename-extension (String/Path-for-some-system -> (Option Bytes))] [file-name-from-path (String/Path-for-some-system -> (Option Path-for-some-system))] [path-only (String/Path-for-some-system -> Path-for-some-system)] [some-system-path->string (Path-for-some-system -> String)] [string->some-system-path (String (U 'unix 'windows) -> Path-for-some-system)]) (provide find-relative-path explode-path simple-form-path normalize-path filename-extension file-name-from-path path-only some-system-path->string string->some-system-path) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://list.cs.brown.edu/pipermail/plt-dev/attachments/20090228/9f07f8e0/attachment.html From chust at web.de Sat Feb 28 11:36:24 2009 From: chust at web.de (Thomas Chust) Date: Sat Feb 28 11:36:42 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <18857.19796.732998.450210@winooski.ccs.neu.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> <18857.19796.732998.450210@winooski.ccs.neu.edu> Message-ID: <1c1a33bc0902280836i583e8e72l6dc4b5393b6726ac@mail.gmail.com> 2009-02-28 Eli Barzilay : > On Feb 28, Thomas Chust wrote: >> [...] >> using LaunchServices, you would need exactly two C API calls: One to >> create the URL object >> [...] > > ??? On a very brief look, I need to read about and represent > `CFURLRef', `CFAllocatorRef', `CFIndex', and `CFStringEncoding'. IMO > this is significantly more complex than "run an osascript command and > plug the url here". > [...] Hello, all arguments to CFURLCreateWithBytes can be trivially filled in, except for the character data of the URL and its integer length, predefined constants can be used for all arguments. That some integer and enumeration types have speaking names for clarity of the API can hardly be held against it... > [...] >> [...] I was just >> curious why the special OS API is used to open URLs on Windows but >> not on MacOS X. > > That's easy: `shell-execute' on Windows is not one random function, it > is a generic way to "start stuff", so it's part of mred. > [...] The same is true for the LaunchServices API. Anyway, judging by the offended tone of the replies I got, I must have inadvertently trodden on someone's foot with my question. This was certainly not my intention. I didn't even want to start a big discussion on that technical detail :-/ cu, Thomas -- When C++ is your hammer, every problem looks like your thumb. From robby at eecs.northwestern.edu Sat Feb 28 11:38:51 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 28 11:39:10 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <1c1a33bc0902280836i583e8e72l6dc4b5393b6726ac@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> <18857.19796.732998.450210@winooski.ccs.neu.edu> <1c1a33bc0902280836i583e8e72l6dc4b5393b6726ac@mail.gmail.com> Message-ID: <932b2f1f0902280838pd5c1a42odff3e649eec08543@mail.gmail.com> No no -- your comments are quite welcome! We just have lots of energy in our emails sometimes and the emotionless nature of email communications can sometimes send that funny ways ... Robby On Sat, Feb 28, 2009 at 10:36 AM, Thomas Chust wrote: > 2009-02-28 Eli Barzilay : >> On Feb 28, Thomas Chust wrote: >>> [...] >>> using LaunchServices, you would need exactly two C API calls: One to >>> create the URL object >>> [...] >> >> ??? ?On a very brief look, I need to read about and represent >> `CFURLRef', `CFAllocatorRef', `CFIndex', and `CFStringEncoding'. ?IMO >> this is significantly more complex than "run an osascript command and >> plug the url here". >> [...] > > Hello, > > all arguments to CFURLCreateWithBytes can be trivially filled in, > except for the character data of the URL and its integer length, > predefined constants can be used for all arguments. That some integer > and enumeration types have speaking names for clarity of the API can > hardly be held against it... > >> [...] >>> [...] I was just >>> curious why the special OS API is used to open URLs on Windows but >>> not on MacOS X. >> >> That's easy: `shell-execute' on Windows is not one random function, it >> is a generic way to "start stuff", so it's part of mred. >> [...] > > The same is true for the LaunchServices API. > > Anyway, judging by the offended tone of the replies I got, I must have > inadvertently trodden on someone's foot with my question. This was > certainly not my intention. I didn't even want to start a big > discussion on that technical detail :-/ > > cu, > Thomas > > > -- > When C++ is your hammer, every problem looks like your thumb. > From eli at barzilay.org Sat Feb 28 11:44:49 2009 From: eli at barzilay.org (Eli Barzilay) Date: Sat Feb 28 11:45:11 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <932b2f1f0902280838pd5c1a42odff3e649eec08543@mail.gmail.com> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> <18857.19796.732998.450210@winooski.ccs.neu.edu> <1c1a33bc0902280836i583e8e72l6dc4b5393b6726ac@mail.gmail.com> <932b2f1f0902280838pd5c1a42odff3e649eec08543@mail.gmail.com> Message-ID: <18857.27137.537670.254030@winooski.ccs.neu.edu> On Feb 28, Robby Findler wrote: > No no -- your comments are quite welcome! We just have lots of > energy in our emails sometimes and the emotionless nature of email > communications can sometimes send that funny ways ... +1, > On Sat, Feb 28, 2009 at 10:36 AM, Thomas Chust wrote: > > > > all arguments to CFURLCreateWithBytes can be trivially filled in, > > except for the character data of the URL and its integer length, > > predefined constants can be used for all arguments. That some > > integer and enumeration types have speaking names for clarity of > > the API can hardly be held against it... Yes, my guess would be that trivial values are needed, but you need to read some API to know those values, but with osascript -e 'open location ""' > >>> [...] I was just curious why the special OS API is used to open > >>> URLs on Windows but not on MacOS X. > >> > >> That's easy: `shell-execute' on Windows is not one random > >> function, it is a generic way to "start stuff", so it's part of > >> mred. [...] > > > > The same is true for the LaunchServices API. (It wasn't (and still isn't) clear to me that this is the OSX equivalent of `shell-execute'. If it is, then obviously there is a place for it -- but that would be at the mred layer, not neturl.) > > Anyway, judging by the offended tone of the replies I got, I must > > have inadvertently trodden on someone's foot with my question. > > This was certainly not my intention. I didn't even want to start a > > big discussion on that technical detail :-/ No, not at all. I barely know anything about OSX and I barely use it to be offended... -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://www.barzilay.org/ Maze is Life! From robby at eecs.northwestern.edu Sat Feb 28 12:05:57 2009 From: robby at eecs.northwestern.edu (Robby Findler) Date: Sat Feb 28 12:06:20 2009 Subject: [plt-dev] searching for bitmap% via f1 on mac os x In-Reply-To: <18857.27137.537670.254030@winooski.ccs.neu.edu> References: <932b2f1f0902280352i671ff917o4a61b3fcc6a2da4c@mail.gmail.com> <1c1a33bc0902280436v69024389n4484b081428b2620@mail.gmail.com> <18857.12589.944299.659004@winooski.ccs.neu.edu> <1c1a33bc0902280624n5ff50792v76acaecad30f6070@mail.gmail.com> <18857.19796.732998.450210@winooski.ccs.neu.edu> <1c1a33bc0902280836i583e8e72l6dc4b5393b6726ac@mail.gmail.com> <932b2f1f0902280838pd5c1a42odff3e649eec08543@mail.gmail.com> <18857.27137.537670.254030@winooski.ccs.neu.edu> Message-ID: <932b2f1f0902280905m136398aex6a2f538dacd85c20@mail.gmail.com> IMO, it is worth a look at the C-level api just to see if the problem is possibly in the way osascritp is reading its arguments. Robby On Sat, Feb 28, 2009 at 10:44 AM, Eli Barzilay wrote: > On Feb 28, Robby Findler wrote: >> No no -- your comments are quite welcome! We just have lots of >> energy in our emails sometimes and the emotionless nature of email >> communications can sometimes send that funny ways ... > > +1, > > >> On Sat, Feb 28, 2009 at 10:36 AM, Thomas Chust wrote: >> > >> > all arguments to CFURLCreateWithBytes can be trivially filled in, >> > except for the character data of the URL and its integer length, >> > predefined constants can be used for all arguments. That some >> > integer and enumeration types have speaking names for clarity of >> > the API can hardly be held against it... > > Yes, my guess would be that trivial values are needed, but you need to > read some API to know those values, but with > > ?osascript -e 'open location ""' > >> >>> [...] I was just curious why the special OS API is used to open >> >>> URLs on Windows but not on MacOS X. >> >> >> >> That's easy: `shell-execute' on Windows is not one random >> >> function, it is a generic way to "start stuff", so it's part of >> >> mred. ?[...] >> > >> > The same is true for the LaunchServices API. > > (It wasn't (and still isn't) clear to me that this is the OSX > equivalent of `shell-execute'. ?If it is, then obviously there is a > place for it -- but that would be at the mred layer, not neturl.) > > >> > Anyway, judging by the offended tone of the replies I got, I must >> > have inadvertently trodden on someone's foot with my question. >> > This was certainly not my intention. I didn't even want to start a >> > big discussion on that technical detail :-/ > > No, not at all. ?I barely know anything about OSX and I barely use it > to be offended... > > -- > ? ? ? ? ?((lambda (x) (x x)) (lambda (x) (x x))) ? ? ? ? ?Eli Barzilay: > ? ? ? ? ? ? ? ? ?http://www.barzilay.org/ ? ? ? ? ? ? ? ? Maze is Life! > From vyzo at media.mit.edu Sat Feb 28 15:15:51 2009 From: vyzo at media.mit.edu (Dimitris Vyzovitis) Date: Sat Feb 28 15:25:23 2009 Subject: [plt-dev] Hunting down an elusive certification bug Message-ID: I have been bothered by a weird certification bug, triggered by a complex sequence of expansions. The error message is baffling: compile: reference is more certified than binding in: cid Here is a high-level description of the expansion: There is a metadata descriptor identifier, that points to to certified identifiers (timeout? and timeout.v in the trace below). This identifier is used inside a macro, that eventually expands to a rename-transformer. This macro is used to splice-expand inside a match. The effective expansion is: (match ... ((? timeout? (app timeout.v cid)) ... cid ...)) where cid was original syntax. Any ideas? -- vyzo From mflatt at cs.utah.edu Sat Feb 28 15:40:34 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sat Feb 28 15:41:05 2009 Subject: [plt-dev] Hunting down an elusive certification bug In-Reply-To: References: Message-ID: <887D54C9-70A3-45C7-B120-A33842BD0EE2@cs.utah.edu> Are you using 'local-expand' and pulling apart the result somewhere? Or is that what splice-expand means? On Feb 28, 2009, at 1:15 PM, Dimitris Vyzovitis wrote: > I have been bothered by a weird certification bug, triggered by a > complex > sequence of expansions. > > The error message is baffling: > compile: reference is more certified than binding in: cid > > Here is a high-level description of the expansion: > > There is a metadata descriptor identifier, that points to to certified > identifiers (timeout? and timeout.v in the trace below). > This identifier is used inside a macro, that eventually expands to a > rename-transformer. > This macro is used to splice-expand inside a match. > > The effective expansion is: > (match ... > ((? timeout? (app timeout.v cid)) > ... cid ...)) > > where cid was original syntax. > > Any ideas? > > -- vyzo > _________________________________________________ > For list-related administrative tasks: > http://list.cs.brown.edu/mailman/listinfo/plt-dev > From vyzo at media.mit.edu Sat Feb 28 15:45:11 2009 From: vyzo at media.mit.edu (Dimitris Vyzovitis) Date: Sat Feb 28 15:45:30 2009 Subject: [plt-dev] Hunting down an elusive certification bug In-Reply-To: <887D54C9-70A3-45C7-B120-A33842BD0EE2@cs.utah.edu> References: <887D54C9-70A3-45C7-B120-A33842BD0EE2@cs.utah.edu> Message-ID: On Sat, 28 Feb 2009, Matthew Flatt wrote: > Are you using 'local-expand' and pulling apart the result somewhere? Or is > that what splice-expand means? By splice expand I mean that there is a match front end that can handle patterns of this form: (match ... ,@(foo)) Where foo is syntax-local-value looked up as a macro, and then called on the syntax (directly, as a function without local expand). The result is deconstructed as #'(pat ...) and spliced into the expansion for the normal (scheme/match) match. So there is no local expand, but the type like expansions are contained in such a foo, which came from a macro which itself introduced a rename. [yikes, I know] -- vyzo From grettke at acm.org Sat Feb 28 15:46:25 2009 From: grettke at acm.org (Grant Rettke) Date: Sat Feb 28 15:46:43 2009 Subject: [plt-dev] Should Check Syntax work on R6RS library files? In-Reply-To: <3D9872BF2E574C1A9F9DF8CAB778215B@uw2b2dff239c4d> References: <756daca50902280513h26efc24cjd12b69b79b950f52@mail.gmail.com> <0075BBC8D2D943A9B15FA3907F134C6A@uw2b2dff239c4d> <756daca50902280707h1a3a6f30r4e30f8c371d88095@mail.gmail.com> <3D9872BF2E574C1A9F9DF8CAB778215B@uw2b2dff239c4d> Message-ID: <756daca50902281246t6bebf6a1l5b1d9724de054190@mail.gmail.com> > That does not work in #lang scheme either. The lucky thing is that in #lang scheme we have (all-defined-out) :). From mflatt at cs.utah.edu Sat Feb 28 17:39:44 2009 From: mflatt at cs.utah.edu (Matthew Flatt) Date: Sat Feb 28 17:40:05 2009 Subject: [plt-dev] Hunting down an elusive certification bug In-Reply-To: References: <887D54C9-70A3-45C7-B120-A33842BD0EE2@cs.utah.edu> Message-ID: <20090228223945.C698E6500A8@mail-svr1.cs.utah.edu> At Sat, 28 Feb 2009 15:45:11 -0500 (EST), Dimitris Vyzovitis wrote: > Where foo is syntax-local-value looked up as a macro, and then called > on the syntax (directly, as a function without local expand). > The result is deconstructed as #'(pat ...) That sounds like the problem. When you call a transformer directly, then you're taking on the role of the macro expander, and you're obligated to do all the same sort of things that the expander does. If `local-expand' applies, but if you need to pull a syntax-object vector apart, then my guess is that the deconstruction is still going to cause certificate problems. You might be able to avoid the certificate problem by expecting a `begin' form back instead of a vector --- just because `local-expand' by default pushes certificates down one level when it see a `begin' form. The more general solution is to do what the macro expander does, which is to record a certifier along with the transformer and use it on the result, possibly use `syntax-recertify' on pieces that you pull apart, and so on. You can see examples of this in `match' (look for `match-expander-transform' in the implementation) and `for'. Unfortunately, this is all a bit complex, but that's the trade-off in implementing your own sub-expander. From jos.koot at telefonica.net Sat Feb 28 18:49:51 2009 From: jos.koot at telefonica.net (Jos Koot) Date: Sat Feb 28 18:50:12 2009 Subject: [plt-dev] Should Check Syntax work on R6RS library files? References: <756daca50902280513h26efc24cjd12b69b79b950f52@mail.gmail.com> <0075BBC8D2D943A9B15FA3907F134C6A@uw2b2dff239c4d> <756daca50902280707h1a3a6f30r4e30f8c371d88095@mail.gmail.com> <3D9872BF2E574C1A9F9DF8CAB778215B@uw2b2dff239c4d> <756daca50902281246t6bebf6a1l5b1d9724de054190@mail.gmail.com> Message-ID: How does that help you with the renaming with a syntax? You confuse me. Jos ----- Original Message ----- From: "Grant Rettke" To: "Jos Koot" Cc: "PLT Developers" Sent: Saturday, February 28, 2009 9:46 PM Subject: Re: [plt-dev] Should Check Syntax work on R6RS library files? >> That does not work in #lang scheme either. > > The lucky thing is that in #lang scheme we have (all-defined-out) :). From grettke at acm.org Sat Feb 28 18:55:46 2009 From: grettke at acm.org (Grant Rettke) Date: Sat Feb 28 18:56:04 2009 Subject: [plt-dev] Should Check Syntax work on R6RS library files? In-Reply-To: References: <756daca50902280513h26efc24cjd12b69b79b950f52@mail.gmail.com> <0075BBC8D2D943A9B15FA3907F134C6A@uw2b2dff239c4d> <756daca50902280707h1a3a6f30r4e30f8c371d88095@mail.gmail.com> <3D9872BF2E574C1A9F9DF8CAB778215B@uw2b2dff239c4d> <756daca50902281246t6bebf6a1l5b1d9724de054190@mail.gmail.com> Message-ID: <756daca50902281555y1d307380k89edd9d6bcfc9c91@mail.gmail.com> > How does that help you with the renaming with a syntax? > You confuse me. In R6RS constructor and getter/setter methods are generated for you by define-record-type; but you have to manually enter all of them for exports. When you rename the records, then, you have to search-replace to correct all of your exports. In #lang scheme you can use the export spec (all-defined-out) so you don't have to worry about manually entering all of those exports.