[racket-dev] location of foldts?
Currently, 'foldts' is provided by rackunit. Not surprisingly, the sxml stuff also provides foldts. I'd rather just have one copy--especially because 'except-in' requires seem to sometimes incur large performance penalties--but I'm not really sure where that right place is. Honestly, I don't really think it belongs in rackunit, but I'm willing to be overruled. Can we do one of these? 1) not provide it from rackunit, 2) not provide it from rackunit and put it somewhere else, or 3) tell me that I'm wrong, and I'll just add a dependency from my sxml package to rackunit? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] location of foldts?
On Mar 7, 2011, at 12:24 PM, Noel Welsh wrote: Yes, something like that seems the right solution. N. Mind if I go ahead and do that? John On Mon, Mar 7, 2011 at 1:22 PM, Robby Findler ro...@eecs.northwestern.edu wrote: The rackunit foldts seems test-suite specific so perhaps it should be called foldts-test-suite (similar to fold-test-results). Robby smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Wikipedia on macros... sigh
On Mar 11, 2011, at 3:14 AM, Jos Koot wrote: Brown University Paper on Automata Macros (http://www.cs.brown.edu/~sk/Publications/Papers/Published/sk-automata-macro s/) of Shriram Krishnamurthi is an excellent addition. Jos Well, I won't take credit for adding this one. If I had a bit more energy, though, I'd clean up the citation. John -Original Message- From: dev-boun...@racket-lang.org [mailto:dev-boun...@racket-lang.org] On Behalf Of John Clements Sent: 11 March 2011 08:24 To: Eli Barzilay Cc: PLT Developers Subject: [racket-dev] Wikipedia on macros... sigh Wikipedia's page on macros had really no history on it at all. I added some, including references to Kohlbecker and Clinger. If anyone wants to make it better (or correct the terrible guesses I made about FEXPRs), take a look at it: http://en.wikipedia.org/wiki/Macro_%28computer_science%29#Lisp _.2F_S-expression_macros John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] randomly needing to re-run raco setup lazy?
I find that frequently installing a planet package or recompiling some collection that contains a tool causes this startup message[*]: pcp070579pcs:/tmp clements$ link: reference (phase 0) to a variable in module /Users/clements/plt/collects/string-constants/string-constant.rkt that is uninitialized (phase level 0); reference appears in module: /Users/clements/plt/collects/lazy/info.rkt in: language === context === /Users/clements/plt/collects/lazy/info.rkt: [running body] /Users/clements/plt/collects/setup/getinfo.rkt:28:0: get-info/full /Users/clements/plt/collects/drracket/private/language-configuration.rkt:1214:4: add-info-specified-language /Users/clements/plt/collects/racket/private/map.rkt:45:11: for-each /Users/clements/plt/collects/drracket/private/tools.rkt:453:0: run-phases /Users/clements/plt/collects/drracket/tool-lib.rkt: [running body] /Users/clements/plt/collects/drracket/private/drracket-normal.rkt: [running body] /Users/clements/plt/collects/drracket/drracket.rkt: [running body] I then run raco setup lazy, and everything works fine. My question: is this happening to our users, as well? That would be bad. John [*] exactly this one? I'm not sure. I know that re-running setup on lazy solves the problem. smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] nice way to show a bitmap in a frame?
On Mar 19, 2011, at 8:05 AM, Matthew Flatt wrote: You could use `message%' with the bitmap as its label: #lang racket/gui (define bitmap (read-bitmap /tmp/red-arrow.bmp)) (define f (new frame% [label Bitmap])) (new message% [parent f] [label bitmap]) (send f show #t) That's a lot shorter. Thanks! John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] change default binding of c:x; c:w to save definitions as... ?
On Mar 21, 2011, at 12:38 PM, Gregory Woodhouse wrote: On a Mac, save as should be shift-command-S. I'd vote for using this keybinding for Save Definitions As I'm okay with that, and I could train my fingers, but how does that play on other platforms? IIUC, DrRacket doesn't currently parameterize the keybindings by platform in a way that would make a platform-specific mapping straightforward. John Clements On Mar 21, 2011, at 12:10 PM, Robby Findler wrote: It looks like c:x;c:s is also doing the wrong thing by that measure. It feels a little bit strange to change it, since Emacs users are used to saving the current buffer, but your rationale is definitely compelling. Robby On Mon, Mar 21, 2011 at 2:02 PM, John Clements cleme...@brinckerhoff.org wrote: I've been bitten several times now by the mapping of c:x;c:w to save file as...; it looks to me like this isn't even available via menus any more[*], having been replaced by the (much more sensible) save definitions as... and save interactions as Moreover, AFAICT there's no default keybinding for Save Definitions As Would anyone object to the remapping of c:x;c:w to Save Definitions As... by default? Horror stories of data loss available on request, though you can probably guess how they arise. John [*] if in fact it ever was, _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] change default binding of c:x; c:w to save definitions as... ?
On Mar 21, 2011, at 1:29 PM, Robby Findler wrote: We can do whatever is standard on whatever platform nowadays thanks to gr2. Well, that simplifies things; any objection to just adding shift-command-S for Save Definitions As... to the Mac platform? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] change default binding of c:x; c:w to save definitions as... ?
On Mar 22, 2011, at 2:56 AM, Pierpaolo Bernardi wrote: On Mon, Mar 21, 2011 at 21:29, Robby Findler ro...@eecs.northwestern.edu wrote: We can do whatever is standard on whatever platform nowadays thanks to gr2. I woud like a standard way to tell DrRacket that my platform is emacs, whatever OS may happen to be under emacs at the moment... On the platforms I use (OS X Linux), I find that I can have my cake and eat it too; on the Mac, the control key (used by emacs bindings) is distinct from the command key (used by menu bindings). On Linux, I have the menu-key set to something other than the control key, so again, both sets of bindings work. John Clements smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] change default binding of c:x; c:w to save definitions as... ?
On Mar 21, 2011, at 2:33 PM, Robby Findler wrote: Not from me. I just spent a few minutes fussing with my own private keymap, and I've hit a (minor?) roadblock. This code: (when (eq? (system-type) 'macosx) ;; first, let's try the one we think is there... (kb d:s:s Save Definitions)) ...doesn't have the desired effect, presumably because Save Definitions ( Save Definitions As...) aren't found in the keymap's list of function names. I just checked out the docs for keymap%, and it doesn't look like I can extract that list of names programmatically. Also, five minutes of grepping located the save-definitions string constant, but not the place in the code where it's added to a keymap (if it is). The show current keymap includes the binding for Save Definitions, which suggests that it's in there. So, it looks like either 1) The binding is there, I just haven't guessed the right name for it, 2) the binding is not there, and I would have to roll it myself by adding gui code, or 3) I'm barking up the wrong tree entirely :). Any suggestions appreciated. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] handin-server web interface... non-functional? and docs don't appear?
It looks to me like the handin server's web interface isn't currently working. I enabled the handin server with the https-server-port set to 7980, and got no response on that port. Perhaps the larger mystery here is why it is that I just can't find the documentation for the handin server... searching for 'handin' and 'handin-server' produces no results, either locally or on the racket-lang.org. And... now I'm even more confused. collects/handin-server/info.rkt doesn't have a scribblings entry. OTOH, Git suggests that it hasn't been changed in almost a year, and running 'raco setup handin-server' *does* emit this line: raco setup: rendering: handin-server/scribblings/handin-server.scrbl The larger question here, that I was trying to answer for myself, is whether the handin server's web interface will allow students to hand in via the web, for a class that I'm using that doesn't use DrRacket. I suspect the answer is no, but I thought I'd check it out first. Any help appreciated. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Totally loving new warnings, how to make them more obvious in DrRacket?
I've recently been running programs from the command-line with -W info, and I *totally love* the warnings I'm getting from the optimizer about arity errors etc. I know, I know, this is the same reason that you crank the optimization level up in gcc: to get errors about uninitialized variables. Anyhow, my question is this: I suspect that this information would be helpful to many DrRacket users, and I'm wondering if there's a better way to make it part of the regular click-to-run workflow than manually opening the log window and setting the level to info? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Top ICFP authors
I recently saw microsoft's academic brag site, and I was pleased to see that Matthew is near the top of the list of most frequent ICFP publications. Look, it even has a picture of him... oh... uh... oops. http://academic.research.microsoft.com/Detail?entitytype=3searchtype=1id=28 ... wait... Dear God! Look at Robby's picture. :) John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Places -- on by default in v5.1.1.2. (git master)
On Apr 19, 2011, at 8:27 AM, Kevin Tew wrote: The configure script has been changed to enable places by default. Note: places are NOT enabled by default for the upcoming V5.1.1 release. This means that parallel zo and doc builds will use places instead of processes. Should I expect to see speed or space differences as a result of this change? Will the one process be about the same size as the sum of the old two (or three or ...) ? Hoping for magical things, John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Pre-Release Checklist for v5.1.1
On Apr 20, 2011, at 8:41 PM, Ryan Culpepper wrote: * John Clements cleme...@brinckerhoff.org - Stepper Tests Done. Updates: - Stepper Updates: update HISTORY (updates should show v5.1.1 as the most current version; email me to pick the changes when they're done, or tell me if there are no such changes.) Done, tagged in commit message. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] release blurb for 5.1.1
On Apr 26, 2011, at 2:33 PM, Eli Barzilay wrote: More things: Casey: - Redex version of Jay's continuation mark transformation (3250ff84) - Other redex news? Vincent: - TR's numeric tower is now built from unions of non-overlapping base types. (d4c93cc1) Vincent/Sam: other TR news? Vincent/Matthew: single precision flonums? Matthew: - `file/resource'? - Recent speed thing. Robby: - make hard links be version specific (4f165d3b)? - 2htdp/image news? - builds on osx 64 bits James/Matthew: futures news? (future semaphores, `future' in future, more ...) Generators have formals (generator formals body ...+) Ryan: `racket/syntax' etc I know that Stephen wanted something on the lazy stepper John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] An occasional newline in the PLaneT install Log?
I'm paging through the PLaneT install log on my machine, and this would be simpler and easier to read and more friendly to various logging tools if different installs were on different lines. Would it be all right to add a newline before each new package entry? So, for instance, = Installing uuid-v4.plt on Wed, 27 Apr 2011 9:30:8 =raco setup: Unpacking archive from /Users/clements/Library/Racket/planet/300/packages/zitterbewegung/uuid-v4.plt/1/0/uuid-v4.pltraco setup: unpacking .DS_Store in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/zitterbewegung/uuid-v4.plt/1/0/./raco setup: unpacking LICENSE.txt in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/zitterbewegung/uuid-v4.plt/1/0/./raco setup: unpacking info.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/zitterbewegung/uuid-v4.plt/1/0/./raco setup: unpacking uuid-v4.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/zitterbewegung/uuid-v4.plt/1/0/./raco setup: version: 5.1.1.3 [3m]raco setup: variants: 3mraco setup: main collects: /Users/clements/plt/collectsraco setup: collects paths: raco setup: /Users/clements/git-clements/clements/collectsraco setup: /Users/clements/clements/matthias/collectsraco setup: /Users/clements/Library/Racket/5.1.1.3/collectsraco setup: /Users/clements/plt/collectsraco setup: --- pre-installing collections ---raco setup: --- compiling collections ---raco setup: making: planet/zitterbewegung/uuid-v4.plt/1/0 (uuid-v4)raco setup: in planet/zitterbewegung/uuid-v4.plt/1/0raco setup: --- updating info-domain tables ---raco setup: updating: /Users/clements/Library/Racket/planet/300/5.1.1.3/cache.rktdraco setup: --- creating launchers ---raco setup: --- building documentation ---raco setup: --- installing collections ---raco setup: --- post-installing collections ---raco setup: done= Installing base.plt on Wed, 27 Apr 2011 9:30:4 =raco setup: Unpacking archive from /Users/clements/Library/Racket/planet/300/packages/bzlib/base.plt/1/6/base.pltraco setup: unpacking args.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking assert.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking base.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking bytes.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking info.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking list.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking main.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking registry.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking require.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking syntax.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking text.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking uuid.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking version-case.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: unpacking version.ss in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/bzlib/base.plt/1/6/./raco setup: version: 5.1.1.3 [3m]raco setup: variants: 3mraco setup: main collects: /Users/clements/plt/collectsraco setup: collects paths: raco setup: /Users/clements/git-clements/clements/collectsraco setup: /Users/clements/clements/matthias/collectsraco setup: /Users/clements/Library/Racket/5.1.1.3/collectsraco setup: /Users/clements/plt/collectsraco setup: --- pre-installing collections ---raco setup: --- compiling collections ---raco setup: making: planet/bzlib/base.plt/1/6 (bzlib/base: common utilities for bzlib)raco setup: in planet/bzlib/base.plt/1/6raco setup: --- updating info-domain tables ---raco setup: updating: /Users/clements/Library/Racket/planet/300/5.1.1.3/cache.rktdraco setup: --- creating launchers ---raco setup: --- building documentation ---raco setup: --- installing collections ---raco setup: --- post-installing collections ---raco setup: done ... would become = Installing uuid-v4.plt on Wed, 27 Apr 2011 9:30:8 =raco setup: Unpacking archive from /Users/clements/Library/Racket/planet/300/packages/zitterbewegung/uuid-v4.plt/1/0/uuid-v4.pltraco setup: unpacking .DS_Store in /Users/clements/Library/Racket/planet/300/5.1.1.3/cache/zitterbewegung/uuid-v4.plt/1/0/./raco setup: unpacking
[racket-dev] thanks, drdr!
DrDr is awesome. Many thanks. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] racket vs. scheme vs. clojure (as it appears to others)
This is just one random guy, but it's interesting to see how Racket is perceived. Excerpts from a conversation on stackoverflow about Racket: Thanks. And that's why I'm starting to learn to dislike Scheme, despite everything else. – MCXXIII yesterday In that case, it's a good thing that Racket isn't Scheme. – John Clements 20 hours ago I don't know if I'd like to turn to some fringe language. Also seems odd to me to call it a Scheme implementation if it's not meant to be Scheme at all. I really like standards and Scheme seems to suffer greatly in that area. I think I may have to switch to some other form of Lisp. Clojure seems potentially nice at a glance. – MCXXIII 20 hours ago Ah! You said the magic word! Clojure is a LISP implementation in a very similar way that Racket is a Scheme implementation. Put differently: if you don't object to Clojure, there's no good reason to object to Racket. – John Clements 13 hours ago Racket comes off as Scheme, but not really while Clojure comes off as Clojure (inspired by Lisp). At least that's the impression. It's kinda like how Java was inspired by C/C++ yet Java is Java. Also, I could go learn INTERCAL too. It wouldn't be very useful aside from the pure experience, and maybe with INTERCAL that experience would be worth it, but in the case of Racket I might as well get that exact same experience from something more mainstream. So, if my objective is to learn some form of Lisp, I'd go with one of the three major dialects, not Racket. – MCXXIII 5 hours ago Thanks for your thoughtful reply. Obviously, Racket is still working to define itself as a separate entity. – John Clements 0 secs ago You can see the original thread here: http://stackoverflow.com/questions/5806222/opening-urls-with-scheme/5811345#5811345 John Clements smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] added function to srfi-19....
On May 3, 2011, at 2:55 PM, Matthew Flatt wrote: I think it's a bad idea to extend the SRFI modules with new functions. Would it make sense to move functionality from SRFI-19 into `racket/date' and then add the new functions there (and maybe change the SRFI-19 implementation to re-export part of `racket/date')? Yes, that makes sense. In my experience, the only compelling reasons to use SRFI-19 are - date-string functions - string-date functions. - conversions to from julian dates. Any others come to mind? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] planet-version follies with old planet packages
I've been having trouble with an older PLaneT package, and I've finally narrowed it down to a problem with the change in version-numberings. Specifically, I install Jens Soegaard's gzip.plt package (which installs all right), and then I can't use it. The problem turns out to be that planet won't let me run it, because it thinks that the required provided versions of racket are #(struct:mz-version 4 0) #(struct:mz-version 501 1005) ... so I just need to wait for version 400.00 to come out! I see how I can hack around this problem by editing the required-version in the info.ss file, but if I'm correct, this means that no planet packages that precede the version-numbering change can be used. It seems hard to believe that this wouldn't have been noticed, though, so perhaps I'm wrong... John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] planet-version follies with old planet packages
On May 15, 2011, at 6:24 AM, Robby Findler wrote: On Sun, May 15, 2011 at 7:50 AM, Matthew Flatt mfl...@cs.utah.edu wrote: At Sat, 14 May 2011 20:58:53 -0700, John Clements wrote: I've been having trouble with an older PLaneT package, and I've finally narrowed it down to a problem with the change in version-numberings. Specifically, I install Jens Soegaard's gzip.plt package (which installs all right), and then I can't use it. The problem turns out to be that planet won't let me run it, because it thinks that the required provided versions of racket are #(struct:mz-version 4 0) #(struct:mz-version 501 1005) ... so I just need to wait for version 400.00 to come out! I see how I can hack around this problem by editing the required-version in the info.ss file, but if I'm correct, this means that no planet packages that precede the version-numbering change can be used. It seems hard to believe that this wouldn't have been noticed, though, so perhaps I'm wrong... The version number change happened on February 4, but we decided that it was a bad idea, and it was reverted on March 28. So, the version was 400 for all releases, and it's still 400. It's possible that some planet packages were created with a pre-release version in between 2/4 and 3/28, in which case those need to be fixed. I don't think that's the case for gzip.plt, though. It sounds instead like you're using a pre-release version of Racket from between 2/4 and 3/28. Is that right? If so, the solution would be to upgrade. One other possible wrinkle here is that planet may be doing its own computation instead of using the version libraries (as the planet version checking mechanism pre-dates the version library, I believe), so there could also be a bug there. Yes, I still observe this problem on version 5.1.1.5. Should PLaneT be using the version collection? Let me know if you want me to do more detective work on this. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] planet-version follies with old planet packages
On May 16, 2011, at 4:21 PM, Robby Findler wrote: It would be helpful if you supplied a little more information on how you're seeing the problem, at least. I guess there is a second package involved? No, it's entirely self-contained. One library, no references to other PLaneT packages. Installing works, but then requiring it tries to re-install it. From the command-line, here's me installing it and then trying to require it. pcp070679pcs:~/Library/Application Support/minecraft/saves/z2 clements$ raco planet install soegaard gzip.plt 2 0 downloading soegaard/gzip:2 from planet.racket-lang.org via HTTP = Installing gzip.plt on Mon, 16 May 2011 15:48:30 = raco setup: Unpacking archive from /Users/clements/Library/Racket/planet/300/packages/soegaard/gzip.plt/2/0/gzip.plt raco setup: unpacking doc.txt in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/0/./ raco setup: unpacking gzip.ss in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/0/./ raco setup: unpacking info.ss in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/0/./ raco setup: unpacking zlib1.dll in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/0/./ raco setup: version: 5.1.1.5 [3m] raco setup: variants: 3m raco setup: main collects: /Users/clements/plt/collects raco setup: collects paths: raco setup: /Users/clements/git-clements/clements/collects raco setup: /Users/clements/clements/matthias/collects raco setup: /Users/clements/Library/Racket/5.1.1.5/collects raco setup: /Users/clements/plt/collects raco setup: --- pre-installing collections --- raco setup: --- compiling collections --- raco setup: making: planet/soegaard/gzip.plt/2/0 (gzip) raco setup: in planet/soegaard/gzip.plt/2/0 raco setup: --- updating info-domain tables --- raco setup: updating: /Users/clements/Library/Racket/planet/300/5.1.1.5/cache.rktd raco setup: --- creating launchers --- raco setup: --- building documentation --- raco setup: --- installing collections --- raco setup: --- post-installing collections --- - Rebuilding documentation index - raco setup: version: 5.1.1.5 [3m] raco setup: variants: 3m raco setup: main collects: /Users/clements/plt/collects raco setup: collects paths: raco setup: /Users/clements/git-clements/clements/collects raco setup: /Users/clements/clements/matthias/collects raco setup: /Users/clements/Library/Racket/5.1.1.5/collects raco setup: /Users/clements/plt/collects raco setup: --- pre-installing collections --- raco setup: --- compiling collections --- raco setup: making: scribblings/main/user raco setup: --- updating info-domain tables --- raco setup: --- creating launchers --- raco setup: --- building documentation --- raco setup: skipping: planet/clements/sxml2.plt/1/1/scribblings/sxml.scrbl raco setup: skipping: planet/cce/scheme.plt/4/1/scribblings/main.scrbl raco setup: skipping: planet/williams/science.plt/3/10/scribblings/science.scrbl raco setup: rendering: scribblings/main/user/start.scrbl raco setup: --- installing collections --- raco setup: --- post-installing collections --- .. and then: pcp070679pcs:/tmp clements$ racket -W info Welcome to Racket v5.1.1.5. (require (planet soegaard/gzip:2:0)) PLaneT: downloading soegaard/gzip:2 from planet.racket-lang.org via HTTP PLaneT error: trying to install already-installed package === context === /Users/clements/plt/collects/planet/resolver.rkt:541:0: pkg-promise-pkg /Users/clements/plt/collects/planet/resolver.rkt:407:7 /Users/clements/plt/collects/planet/resolver.rkt:337:0: planet-resolve /Users/clements/plt/collects/racket/private/misc.rkt:85:7 (exit) smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Fancy application/automatic anonymous functions
On May 17, 2011, at 12:14 PM, Sam Tobin-Hochstadt wrote: Scala has the nice feature that if you write something like this: lst.map(_ - 1) It automatically rewrites to a function like this: lst.map(x = x - 1) This makes writing some higher-order functions much easier. Of course, it's easy to make this using a macro and `#%app'. You can see the result here: github.com/samth/fancy-app I'm planning to put this in `unstable/app', and if there's interest I'll think about incorporating it into the default `#%app', after some experience with it. Lots of people have written similar things (`cut' in SRFI 26, Jay's `super-cut', etc), but I'd like to move towards using it implicitly. Just to clarify (your README is a bit terse ...): this rewrites all applications where one of the terms is the free identifier '_' . Correct me if I'm wrong. I think it's vaguely amusing that the wisdom that we've gained in developing sophisticated syntactic tools convinces us 90% of the time not to use them. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Fancy application/automatic anonymous functions
On May 17, 2011, at 12:21 PM, Robby Findler wrote: What is the rule for where the lambda goes? Looks to me like it goes at the outside. So the macro plows through the terms and when it gets to the bottom, it decides either to wrap the whole thing in a lambda or not. John Robby On Tue, May 17, 2011 at 2:14 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote: Scala has the nice feature that if you write something like this: lst.map(_ - 1) It automatically rewrites to a function like this: lst.map(x = x - 1) This makes writing some higher-order functions much easier. Of course, it's easy to make this using a macro and `#%app'. You can see the result here: github.com/samth/fancy-app I'm planning to put this in `unstable/app', and if there's interest I'll think about incorporating it into the default `#%app', after some experience with it. Lots of people have written similar things (`cut' in SRFI 26, Jay's `super-cut', etc), but I'd like to move towards using it implicitly. -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] docs not showing up on PLaneT for gzip.plt
I just persuaded Jens Axel Soegaard to submit a new gzip library on my behalf; unfortunately, it shows up in PLaneT as having Docs: [none]: http://planet.racket-lang.org/display.ss?package=gzip.pltowner=soegaard ...despite this info.rkt file: #lang setup/infotab (define name gzip) (define blurb (list Provides gzip compression and decompression via zlib.)) (define primary-file main.rkt) (define scribblings '((doc.scrbl))) (define categories '(datastructures)) (define version 2.0) (define required-core-version 4.0) (define release-notes '(updated required-version-number, scribble-ized and racket-ized)) My current guess is that it could have something to do with the missing 'repositories field or the existence of an old doc.txt file or perhaps to the (spurious?) planet-docs directory that exists in the source, but I can't really test this hypothesis without bugging Jens to submit package after package. Is there some way to test locally whether a PlaneT .plt file will show up as having documentation on the planet web page? I suppose I could create my own planet package and then ask you to delete it for me FWIW, injecting the file locally does successfully build documentation: pcp070679pcs:/tmp clements$ raco planet fileinject soegaard gzip.plt 2 5 = Installing gzip.plt on Thu, 19 May 2011 12:47:43 = raco setup: Unpacking archive from /private/tmp/gzip.plt raco setup: unpacking doc.scrbl in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/5/./ raco setup: unpacking doc.txt in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/5/./ raco setup: unpacking info.rkt in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/5/./ raco setup: unpacking main.rkt in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/5/./ raco setup: making directory planet-docs in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/5/./ raco setup: unpacking scribble-common.js in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/5/./ raco setup: unpacking zlib1.dll in /Users/clements/Library/Racket/planet/300/5.1.1.5/cache/soegaard/gzip.plt/2/5/./ raco setup: version: 5.1.1.5 [3m] raco setup: variants: 3m raco setup: main collects: /Users/clements/plt/collects raco setup: collects paths: raco setup: /Users/clements/git-clements/clements/collects raco setup: /Users/clements/clements/matthias/collects raco setup: /Users/clements/Library/Racket/5.1.1.5/collects raco setup: /Users/clements/plt/collects raco setup: --- pre-installing collections --- raco setup: --- compiling collections --- raco setup: making: planet/soegaard/gzip.plt/2/5 (gzip) raco setup: in planet/soegaard/gzip.plt/2/5 raco setup: making: planet/soegaard/gzip.plt/2/5/planet-docs raco setup: --- updating info-domain tables --- raco setup: updating: /Users/clements/Library/Racket/planet/300/5.1.1.5/cache.rktd raco setup: --- creating launchers --- raco setup: --- building documentation --- raco setup: skipping: planet/clements/sxml2.plt/1/1/scribblings/sxml.scrbl raco setup: skipping: planet/cce/scheme.plt/4/1/scribblings/main.scrbl raco setup: skipping: planet/williams/science.plt/3/10/scribblings/science.scrbl raco setup: running: planet/soegaard/gzip.plt/2/5/doc.scrbl raco setup: rendering: planet/soegaard/gzip.plt/2/5/doc.scrbl raco setup: --- installing collections --- raco setup: --- post-installing collections --- - Rebuilding documentation index - raco setup: version: 5.1.1.5 [3m] raco setup: variants: 3m raco setup: main collects: /Users/clements/plt/collects raco setup: collects paths: raco setup: /Users/clements/git-clements/clements/collects raco setup: /Users/clements/clements/matthias/collects raco setup: /Users/clements/Library/Racket/5.1.1.5/collects raco setup: /Users/clements/plt/collects raco setup: --- pre-installing collections --- raco setup: --- compiling collections --- raco setup: making: scribblings/main/user raco setup: --- updating info-domain tables --- raco setup: --- creating launchers --- raco setup: --- building documentation --- raco setup: skipping: planet/clements/sxml2.plt/1/1/scribblings/sxml.scrbl raco setup: skipping: planet/cce/scheme.plt/4/1/scribblings/main.scrbl raco setup: skipping: planet/williams/science.plt/3/10/scribblings/science.scrbl raco setup: rendering: scribblings/main/user/start.scrbl raco setup: rendering: scribblings/main/user/search.scrbl raco setup: re-rendering: scribblings/main/user/start.scrbl raco setup: --- installing collections --- raco setup: --- post-installing collections --- #pkg pcp070679pcs:/tmp clements$ raco doc gzip ... succeeds, though I can't paste that part... Thanks for any help, John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks:
[racket-dev] breaking news nearly invisible
I saw a commit go by that seemed to suggest that the racket-lang web page now included some kind of breaking news item regarding RacketCon. So I went to the web site but... nothing. ... Five minutes later I was looking at the browser window again, and... hey! There it is! My point? It's basically invisible. A colored background (orange might go nicely with the blue of the download link) would make a big difference. Apologies if this is a feature that's still under construction. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] type-case + typed racket yet?
Is there a best-practice model for type-case-like things in typed racket yet? Obvious choices: - tagged-list style, it's all a big cond but I have to use first, second, etc to refer to fields - struct-union style, feels better but I don't get to use match (IIUC). Other obvious things I've missed? Apologies for a hastily written e-mail. John Clements smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] goofy type hack (was: Re: type-case + typed racket yet?)
On May 25, 2011, at 12:53 PM, Sam Tobin-Hochstadt wrote: On Wed, May 25, 2011 at 12:27 PM, John Clements cleme...@brinckerhoff.org wrote: Is there a best-practice model for type-case-like things in typed racket yet? Obvious choices: - tagged-list style, it's all a big cond but I have to use first, second, etc to refer to fields - struct-union style, feels better but I don't get to use match (IIUC). `match' and unions of structs should work fine together in Typed Racket. Forgive me; I checked the docs didn't see anything for 'match', but I see now that it works as I'd expect. Thanks! Hang on, here's another question. I see that typed racket doesn't signal an error on a match that doesn't have clauses for all possible inputs, which is entirely reasonable; since that will signal an error, that code should typecheck fine. However, I might *want* typed racket to check that for me. I managed to come up with this grozzz hack: (: g ((U Number False) - Number)) (define (g x) (cond [(number? x) (+ x 4)] [(false? x) 13] ;; type of x is now uninhabitable, so no typechecking error [else (begin (string-append x abc) (error 'foo))])) In this case, when I comment out the 'false?' clause, the bogus clause suddenly is type-checked (because x's type is no longer the empty union), and I get an error. So... I can get what I want, but in a very icky way. Is there a different and more elegant way to force typed racket to check that I'm not failing to match? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Racket breaking and exiting
On Jun 1, 2011, at 4:04 PM, Eduardo Bellani wrote: My racket breaks if the following code is executed: (current-input-port (open-input-string a)) with the following message: reference to undefined identifier: a ? That sounds like the right behavior to me, in an environment with a REPL. That is, you set current-input-port to pull from the string a, then you drop into the REPL, which reads from stdin, producing the string a, which reads as a reference to the variable a. No? John Clements smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] OSX problems
On Jun 2, 2011, at 8:29 PM, Eli Barzilay wrote: Is there anyone awake now, with a current (git head) OSX build, and that sees the problem of not being able to choose *.rkt files in the open file dialog? More details, please. I'm on Welcome to DrRacket, version 5.1.1.5--2011-05-14(a82ae17/g) [3m]. ... which probably isn't head enough for you. I can re-build, though; it's probably time for an update. To be sure, you're just asking for me to open the Open File dialog and double-click a file whose name ends in .rkt ? FWIW, it works fine in my current build. I'll start rebuilding, though, and check again. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] more general typed/scheme bafflement...
On Jun 7, 2011, at 4:26 PM, Carl Eastlund wrote: John, You had an easy time with + because it is monomorphic. You are having trouble applying one polymorphic function (map) to another (list or list2). Instantiate one or both functions explicitly, and Typed Racket won't get confused by the guesswork. Also, T ... i in a type does not mean T ... followed by i. It means T ... *indexed* by i. It's clarifying what the ... ranges over. Awesome! Many thanks. Next question. I'm reading sexps from a file, so typed/racket insists that I check their shape before using them. That's fine, but I find myself unable to define the (Pairof Any (Pairof Any Null)) predicate the way I'd expect it to be defined: (: listoflength2? (Any - Boolean : (Pairof Any (Pairof Any Null (define (listoflength2? a) (and (pair? a) (pair? (cdr a)) (null? (cddr a = Type Checker: Expected result with filter (((List Any Any) @ a) | (! (List Any Any) @ a)), got filter ((AndFilter (Null @ (cdr cdr) a) ((Pairof Any Any) @ (cdr) a) ((Pairof Any Any) @ a)) | (OrFilter (! Null @ (cdr cdr) a) (! (Pairof Any Any) @ (cdr) a) (! (Pairof Any Any) @ a))) in: (and (pair? a) (pair? (cdr a)) (null? (cddr a))) This is curious, because the text '(AndFilter (Null @ (cdr cdr) a) ((Pairof Any Any) @ (cdr) a) ((Pairof Any Any) @ a)) ' looks like it's saying exactly what '(Pairof Any (Pairof Any Null))' does. Again, any help appreciated. This typed racket stuff is *way* more fun than the actual grading that the script is supposed to be helping me with... :). John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] RacketCon lodging
Are there any group-ish plans for RacketCon lodging? A campsite, say... :) John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Should BSL signal an error on (require ...) in an unsaved buffer?
I'm fixing require in the stepper, and I want to make sure that the existing behavior is desirable before I try to simulate it. In particular, my experiments suggest that require in an unsaved buffer implicitly requires things from (current-directory). Is this the right behavior? It would seem to me that we'd be better off signaling an error in this case. No? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Should BSL signal an error on (require ...) in an unsaved buffer?
On Jun 27, 2011, at 4:45 PM, Robby Findler wrote: We're talking about relative requires only, right? How are you proposing to signal the error? My guess about how this works--correct me if I'm wrong--is that for unsaved buffers, DrR sets a parameter such that the expanded code has the current directory as (uh, part of?) the syntax-source of the expanded source. I'm guessing that I'm not right, or it would be as simple as disabling this for programs written in BSL et al. John Robby On Tue, Jun 28, 2011 at 7:39 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Jun 27, 2011, at 7:37 PM, John Clements wrote: I'm fixing require in the stepper, and I want to make sure that the existing behavior is desirable before I try to simulate it. In particular, my experiments suggest that require in an unsaved buffer implicitly requires things from (current-directory). Is this the right behavior? It would seem to me that we'd be better off signaling an error in this case. No? Yes, please signal an error. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Should BSL signal an error on (require ...) in an unsaved buffer?
On Jun 27, 2011, at 5:47 PM, Robby Findler wrote: On Tue, Jun 28, 2011 at 8:41 AM, John Clements cleme...@brinckerhoff.org wrote: On Jun 27, 2011, at 5:28 PM, Robby Findler wrote: On Tue, Jun 28, 2011 at 8:19 AM, John Clements cleme...@brinckerhoff.org wrote: On Jun 27, 2011, at 5:10 PM, Robby Findler wrote: On Tue, Jun 28, 2011 at 7:52 AM, John Clements cleme...@brinckerhoff.org wrote: On Jun 27, 2011, at 4:45 PM, Robby Findler wrote: We're talking about relative requires only, right? How are you proposing to signal the error? My guess about how this works--correct me if I'm wrong--is that for unsaved buffers, DrR sets a parameter such that the expanded code has the current directory as (uh, part of?) the syntax-source of the expanded source. I'm guessing that I'm not right, or it would be as simple as disabling this for programs written in BSL et al. DrRacket does indeed set current-directory and could instead signal an error instead of setting it. That would mean no unsaved file would run, however. Is that really desired? Would it not be possible to set the syntax-source in such a way that relative requires would fail? We may be out of DrR and into just plain R here. Yes, we have to be, I'm pretty sure. Indeed, I would be happy if buffers without a recorded save location couldn't make relative requires in *any* language level, though I realize that such a change would be more likely to have repercussions elsewhere. I think that would probably require a new parameter that controls where relative requires are relative to being exported and allowing it to have a value that says no relative requires allowed. (current-load-relative-directory is maybe already this, without the extra functionality, maybe?) I suppose there could be situations where users dynamically create syntax objects and set the current directory rather than setting the syntax-source of the objects, though that doesn't sound like the most robust way to write the code. I don't understand this comment. (I believe that the source field of a syntax objects is not involved in resolving relative requires.) Ah! I understand better now. Okay, out of the realm of how-things-should-be and into the realm of how-things-are; you write that DrR sets 'current-directory'. Is there some reason to set 'current-directory' rather than 'current-load-relative-directory'? It looks to me like setting 'current-load-relative-directory' fixes the bug I'm tackling, but I want the stepper to accurately simulate DrR's behavior here. Oh, I see that current-load-relative-directory can already be #f. I think that situation corresponds to I'm not requiring anything, tho and, according to the docs, that parameter is set by the require machinery (not by drracket altho I didn't grep the sources to be sure). So again, I think we're stuck if all we change is drracket. (I'm not sure, but I think that this is probably going to be more trouble than it is worth.) Okey dokey. I've verified that setting current-directory has the desired effect, so I'm just going to set it to the result of the tab's get-directory before calling the expander to pull the exprs out of the defns window. Let me know if this is obviously wrong. Thanks! John (lost dev on intermediate response, sorry) smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] okay to require rackunit in modules required at startup?
In certain places, I know that we're trying to be careful to minimize 'require's that occur as part of DrRacket startup. Is 'rackunit' something we're trying to avoid? Specifically, I have old unit tests in collects/stepper/private/shared.rkt that I'd like to revive as rackunit tests. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] okay to require rackunit in modules required at startup?
On Jun 28, 2011, at 11:19 PM, Robby Findler wrote: Yes, please do separate the stepper tests out into another file. Got it, done. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] varrefs in teaching languages are actually top-level?
On Jun 29, 2011, at 11:53 AM, Stephen Chang wrote: I just observed something that gave me a bit of a start; it appears to me that bindings in the teaching languages are still parsed as top-level bindings, and not as module bindings. This is weird, because I'm pretty confident that the definitions get wrapped in a module before expansion. However, I'm seeing #f as the value for the 'identifier-binding' on variables in my beginner-language stepper test cases, and in fact in the real stepper as well. Nix nix... I believe I was confusing the identifier-binding with the module-path. Mea culpa, ignore my question. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] typo in message for 'begin0'? Or not?
While patching up the stepper tests results for the Advanced language level, I noticed this strange error message: (begin0) = begin: expected at least one expression after begin0, but nothing's there Shouldn't that error message have begun with begin0, rather than begin? Or was that deliberate? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] the stepper and changes to the expansion of letrec
The expansion of letrec has changed substantially; for instance, a letrec such as (letrec ([a 3] [b (lambda () (b))] [c 4]) (+ a (b) c)) ... now expands into three nested forms. This is going to require some fairly interesting changes to the stepper. First, though, some questions: 1) are the definitions ever re-ordered in the process of splitting? It looks like the answer is 'no', but it's hard to guess. 2) are unused definitions ever removed? Again, it looks like the answer is 'no', but I can't be sure. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] foldl does a right fold?
On Jul 9, 2011, at 5:38 PM, Clark Grubb wrote: This seems to be a bug. Here is the Racket behavior and Haskell behavior for comparison. I believe what you're actually observing here is a difference in the order in which arguments are presented to the given function. E.G., try cons. John == $ racket Welcome to Racket v5.1.1. (foldl - 0 '(1 2 3)) 2 (foldr - 0 '(1 2 3)) 2 == $ ghci GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help Prelude foldl (-) 0 [1,2,3] -6 Prelude foldr (-) 0 [1,2,3] 2 _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] slash-form + bug in PLaneT keybindings require?
I tried to make some keybindings available using PLaneT today, and ran into two problems--I suspect that this mechanism is not frequently used. 1) I can't use the slash-form in this require. That is, I have to type (planet magic-paren.rkt (clements magic-paren.plt 1 0)) instead of (planet clements/magic-paren/magic-paren) . In fact, I'd be even happier just typing clements/magic-paren/magic-paren 2) After typing the above, DrRacket installed the one-file planet package (and GOLLY, it took a while, but that's a different issue), and finally got this error: Error when installing the keybindings (planet magic-paren.rkt (clements magic-paren.plt 1 0)): symbol-string: expects argument of type symbol; given #resolved-module-path:/Users/clements/Library/Racket/planet/300/5.1.2.2/cache/clements/magic-paren.plt/1/0/magic-paren.rkt 3) I suppose I'd be happiest of all if I could simply have an electric-parenthesis option built in to DrRacket. Does this seem like an appropriate preference entry for the factory DrRacket? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] slash-form + bug in PLaneT keybindings require?
On Jul 11, 2011, at 11:32 AM, Robby Findler wrote: As to 3), yes. Where would I put it? It looks like this could be done as a tool, but it seems silly to have a new collection just for this. John Robby On Monday, July 11, 2011, John Clements cleme...@brinckerhoff.org wrote: I tried to make some keybindings available using PLaneT today, and ran into two problems--I suspect that this mechanism is not frequently used. 1) I can't use the slash-form in this require. That is, I have to type (planet magic-paren.rkt (clements magic-paren.plt 1 0)) instead of (planet clements/magic-paren/magic-paren) . In fact, I'd be even happier just typing clements/magic-paren/magic-paren 2) After typing the above, DrRacket installed the one-file planet package (and GOLLY, it took a while, but that's a different issue), and finally got this error: Error when installing the keybindings (planet magic-paren.rkt (clements magic-paren.plt 1 0)): symbol-string: expects argument of type symbol; given #resolved-module-path:/Users/clements/Library/Racket/planet/300/5.1.2.2/cache/clements/magic-paren.plt/1/0/magic-paren.rkt 3) I suppose I'd be happiest of all if I could simply have an electric-parenthesis option built in to DrRacket. Does this seem like an appropriate preference entry for the factory DrRacket? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] intro videos
Frustrated by what I'm seeing on khanacademy.org, I've now recorded 8 *short* videos on getting started programming in DrRacket. http://www.youtube.com/playlist?list=PLD0EB7BC8D7CF739A It gets through about half of the first page of HtDP 2e. I'm trying to stress those things--interface details, understanding error messages--that are a better fit for video. Comments welcome. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] intro videos
On Jul 13, 2011, at 5:22 PM, Ramakrishnan Muthukrishnan wrote: On Wed, Jul 13, 2011 at 9:46 PM, John Clements cleme...@brinckerhoff.org wrote: http://www.youtube.com/playlist?list=PLD0EB7BC8D7CF739A I just saw one video and liked it. Can you tell us how you are getting the emacs paredit like automatic matched parantheses with the automatic placement of cursor inside the parantheses? I could not find such an option in my DrRacket preferences. I am running 5.1.1.8. (Didn't post to the list as it is a -dev list and didn't want to ask this silly question to the crowd which is otherwise involved in high quality discussions) No, that's an entirely reasonable question, with an answer that's in the process of changing. First thing: you can use ESC-(. That is: press and release ESC, type (. That works, but it's a big pain. Second thing: Until two days ago, I'd been using the keybindings file that I attach below, so that this keystroke becomes simply (. While making these videos, though, I found that I *really* wanted to be able to give people a simple way to do this. As a result, I've now added a preference to DrRacket called enable automatic parentheses. It's available as part of the development build now, but it probably won't be a part of the 5.1.2 release. It should definitely be a part of the 5.1.3 release. In the meantime, you can enable these bindings by choosing the Add User-defined Keybindings... option, and referring to the file that I attach here. Thanks for your question! I'm actually forwarding this response to dev anyway---hope you don't mind. John Clements jbc-keybindings.ss Description: Binary data smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] intro videos
On Jul 13, 2011, at 11:04 PM, Guillaume Marceau wrote: On Thu, Jul 14, 2011 at 1:29 AM, John Clements cleme...@brinckerhoff.org wrote: As a result, I've now added a preference to DrRacket called enable automatic parentheses. On my machine, I get a pair when I press ( or {, but not with [. I am seeing the intended behavior? Desired, no. Expected, yes. Overriding [ is harder because of smart parentheses. Yes, combining the paren-matching code with the smart-paren code is probably the right solution, and Robby suggested it to me. I just took a quick look at that code and it still looks pretty hairy. Do you intend to make closing ) ] and } skip over a closing parenthesis? What the right behavior should be in this case is a bit subtle, but it's worth getting it just right. You might what to inspect how Eclipse does it. Is it worth getting it right? It would be nice, I agree. Eclipse's behavior seems downright inconsistent, to me; its behavior appears to depend on how quickly you type. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] intro videos
On Jul 14, 2011, at 10:38 AM, Eli Barzilay wrote: 9 hours ago, John Clements wrote: No, that's an entirely reasonable question, with an answer that's in the process of changing. First thing: you can use ESC-(. That is: press and release ESC, type (. That works, but it's a big pain. Use Alt-( -- much less pain. (And that works in Emacs regardless of paredit, BTW.) Sigh... I believe that requires an ESC on the mac. But you're right, I should have specified that. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Pre-Release Checklist for v5.1.2
On Jul 19, 2011, at 5:16 PM, Ryan Culpepper wrote: Checklist items for the v5.1.2 release (using the v5.1.1.900 release candidate build) * John Clements cleme...@brinckerhoff.org - Stepper Tests I've just discovered a bug in the stepper (that was there in 5.1.1 as well). Let me see how simple it is to fix. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] can we write these four lines of C in performant racket?
This C code adds the content of one buffer to another one, with no checking. The corresponding racket code runs about 10x slower. Do you folks think that it should be possible to do better? (One salient fact: these are shorts--16-bit-ints--not 32-bit ints.) John void addOn(short *dst, int dstOffset, short *src, int srcOffset, int len) { int i; for (i = 0; ilen; i++) { dst[i+dstOffset] += src[i+srcOffset]; }} smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] can we write these four lines of C in performant racket?
On Jul 23, 2011, at 2:46 PM, Robby Findler wrote: What is the data you're using to represent the shorts in Racket? #s16vectors. John Robby On Sat, Jul 23, 2011 at 1:42 PM, John Clements cleme...@brinckerhoff.org wrote: This C code adds the content of one buffer to another one, with no checking. The corresponding racket code runs about 10x slower. Do you folks think that it should be possible to do better? (One salient fact: these are shorts--16-bit-ints--not 32-bit ints.) John void addOn(short *dst, int dstOffset, short *src, int srcOffset, int len) { int i; for (i = 0; ilen; i++) { dst[i+dstOffset] += src[i+srcOffset]; }} _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] mouse cursor changes cause frequent collections?
I have the log showing right now, and I see that moving the mouse in a way that causes mouse cursor changes (for instance, back and forth between the definitions interactions windows) causes collections of about 32K on the order of every eight to ten mouse cursor changes, something like 2K of garbage per cursor change. There's no observed slowdown or penalty for this, so please ignore this message unless you're right now thinking hey! I bet I can reuse those cursors! John p.s.: Concord trailways is awesome: nice wireless, comfy ride. p.p.s.: many thanks as always for RacketCon. One of the highlights of my year. smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Pre-Release Checklist for v5.1.2, Second Call
On Jul 27, 2011, at 1:29 AM, Ryan Culpepper wrote: Checklist items for the v5.1.2 release (using the v5.1.1.900 release candidate build) Search for your name to find relevant items, reply when you finish an item (please indicate which item/s is/are done). Also, if you have any commits that should have been picked, make sure that the changes are in. Important: new builds are created without announcement, usually whenever I pick a few commits. If you need to commit changes, please make sure you tell me to pick it into the release branch. -- Release candidates are at -- http://pre.racket-lang.org/release/installers This installer page still shows Saturday 23rd as the most recent build. I believe I'm blocked on this. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Better than roogle? (was: Re: Roogle?)
... related idea I had about two years ago: don't search on types, search on inputs desired outputs. So: (? (list 3 4 5)) = (list 5 4 3) ... produces reverse. How does it get there? By simply trying them all. You could narrow the search by checking first for arity, and then perhaps by doing clever things with contracts. In my mind, this has the same just close your eyes and search attitude that has made google so useful. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] OS X 10.7 review/summary
I don't know if you folks have already seen this, but for any of you considering or using OS X 10.7, the Ars Technica review appears to contain some fairly detailed developer information. I'm only on the second page, but table of contents entries such as Automatic Reference Counting vs. Garbage Collection look ... interesting. http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars • Installation • Reconsidering fundamentals • Lion's new look • Scroll bars • Window resizing • Animation • Here's to the crazy ones • Window management • Application management • Document model • Process model • The pitch • The reality • Internals • Security • Sandboxing • Privilege separation • Automatic Reference Counting • Enter (and exit) garbage collection • Cocoa memory management • Enter ARC • ARC versus garbage collection • ARC versus the world • The state of the file system • What's wrong with HFS+ • File system changes in Lion • File system future • Document revisions • Resolution independence • Applications • The Finder • Mail • Safari • Grab bag • System Preferences • Auto-correction • Mobile Time Machine • Lock screen • Emoji • Terminal • About This Mac • Recommendations • Conclusion smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] OS X 10.7 review/summary
On Aug 6, 2011, at 11:14 AM, Matthias Felleisen wrote: In a fairly user-focused review I saw, the 'automatic snapshots' sounded great. Apparently an app that subscribes to some Lion protocol gets automatic snapshots so that you can say 'I don't like what I did in the last 10 mins, let's go back' It also saves automatically when you forget. Good for kids, students, and old professors. Agreed; it'll probably take some work on our part, though (a.k.a.: work on Robby Matthew's part). John On Aug 6, 2011, at 6:29 AM, John Clements wrote: I don't know if you folks have already seen this, but for any of you considering or using OS X 10.7, the Ars Technica review appears to contain some fairly detailed developer information. I'm only on the second page, but table of contents entries such as Automatic Reference Counting vs. Garbage Collection look ... interesting. http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars • Installation • Reconsidering fundamentals • Lion's new look • Scroll bars • Window resizing • Animation • Here's to the crazy ones • Window management • Application management • Document model • Process model • The pitch • The reality • Internals • Security • Sandboxing • Privilege separation • Automatic Reference Counting • Enter (and exit) garbage collection • Cocoa memory management • Enter ARC • ARC versus garbage collection • ARC versus the world • The state of the file system • What's wrong with HFS+ • File system changes in Lion • File system future • Document revisions • Resolution independence • Applications • The Finder • Mail • Safari • Grab bag • System Preferences • Auto-correction • Mobile Time Machine • Lock screen • Emoji • Terminal • About This Mac • Recommendations • Conclusion_ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)
Adding dev to followups, hope that's okay with all three of you. On Aug 12, 2011, at 7:15 PM, Eli Barzilay wrote: A few seconds ago, Matthias Felleisen wrote: This sounds wrong. The only way there can be a dependency is via require. So how can it not be checkable, never mind copy or hand-coding. The stepper has some function that annotates syntaxes with a stepper specific value. Stephen wanted to use this function but couldn't because there was a dependency cycle. So to resolve it, he copied the function into `racket/private/promise' -- so now there's a bit of stepper code that is duplicated in the core. The duplication is obvious problem #1. The more subtle problem is the existence of code in the core that has no meaning without the stepper. I'm coming a bit late to this party, but I disagree with at least some of this. Actually, I want to disagree mostly with the more subtle problem. To start with, here's the basic motivating change to the code (lots like this): - (defsubst (~and x ...) (~ (and (! x) ...)) ~and *and) + (defsubst (~and x ...) (hidden-~ (and (hidden-! x) ...)) ~and *and) That is, the code for lazy racket contains the knowledge about which things should be hidden by the stepper. I would argue, in fact, that this is the *right* place for such knowledge. In particular, suppose you're developing the lazy stepper, and you want to say, this thing here is hidden. How do you point to a particular expansion? You want to make an annotation in the code for the expansion itself. The alternatives I can think of are all hideously fragile, unless you go to some AOSD approach, but I think that this would wind up being even more verbose, and not substantially less fragile. That is, I think that the subtle problem above is not actually a problem at all. Thing two: I agree that the duplication of code is a terrible idea. However, I don't think that using syntax-track-origin is going to help at all. The code that was duplicated here was basically a simple syntax-track-property, along with a dynamic check that ensures that the specified value is a legal one. It's this dynamic check that's the added value, and I think that the choice between syntax-track-origin and syntax-property is orthogonal. Basically, what we really want is a way to register a guard for particular syntax-property keys, and thinking about this, I can imagine this being pretty widely useful. I suppose the hard part is deciding who's allowed to attach a guard to a particular value's use as a syntax-property key, without compromising security. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)
On Aug 13, 2011, at 10:44 AM, John Clements wrote: Adding dev to followups, hope that's okay with all three of you. On Aug 12, 2011, at 7:15 PM, Eli Barzilay wrote: A few seconds ago, Matthias Felleisen wrote: This sounds wrong. The only way there can be a dependency is via require. So how can it not be checkable, never mind copy or hand-coding. The stepper has some function that annotates syntaxes with a stepper specific value. Stephen wanted to use this function but couldn't because there was a dependency cycle. So to resolve it, he copied the function into `racket/private/promise' -- so now there's a bit of stepper code that is duplicated in the core. The duplication is obvious problem #1. The more subtle problem is the existence of code in the core that has no meaning without the stepper. I'm coming a bit late to this party, but I disagree with at least some of this. Actually, I want to disagree mostly with the more subtle problem. To start with, here's the basic motivating change to the code (lots like this): - (defsubst (~and x ...) (~ (and (! x) ...)) ~and *and) + (defsubst (~and x ...) (hidden-~ (and (hidden-! x) ...)) ~and *and) One more minor aside I should have mentioned: Stephen's use of a macro here reads *much more nicely* than the way the rest of the stepper annotations explicitly inject the annotations using with-syntax; when I get time, I want to adopt this approach elsewhere. Nice! John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)
On Aug 13, 2011, at 11:33 AM, Robby Findler wrote: FWIW, there is precedent for this kind of thing, namely the properties that get added to syntax objects to tell check syntax about bindings that aren't in the fully expanded program (and yeah, I know there is a pending question about this; sorry I haven't had time to look into it and straighten things out). Syntax properties generally seem like a good vehicle for languages/macros to communicate information to tools. Totally, agree, natch. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)
On Aug 13, 2011, at 1:34 PM, Carl Eastlund wrote: On Sat, Aug 13, 2011 at 1:26 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: On Aug 13, 2011, at 12:58 PM, Sam Tobin-Hochstadt wrote: On Sat, Aug 13, 2011 at 12:51 PM, Eli Barzilay e...@barzilay.org wrote: 10 minutes ago, Sam Tobin-Hochstadt wrote: `match' also currently adds a syntax property to help the Typed Racket type checker understand the expansion. Like 'disappeared-use for Check Syntax, this property is in theory semantically independent of Typed Racket, but only used there. No, when your property is called `typechecker:called-in-tail-position' it is not independent of a typecheker. It will be, if it gets a generic name, and gets documented which turns it from a backdoor for a backward dependency to a known API. The *semantic* independence of the property and the typechecker implementation is not determined either by the name of the property or the documentation. There are two levels of semantics here: -- operational semantics of your module, which makes you correct -- 'in spirit' semantics, which makes Eli correct. I will say that even though I cannot define 'in spirit' formally, I am with Eli here. How about instead of in spirit, we focus on program logic. There is no semantic dependence on the typechecker -- Racket can tell what the program does without it. However, programmers cannot read that code and know what it is for and whether it is correct without reference to the typechecker. That's a meaningful dependency. It makes maintaining that line of code 100% dependent on the typechecker. I feel we're getting perilously close to writing a paper about the essence of AOSD Regard a piece of code as a machine. Not a specification of a machine, but the actual machine. Now, tools like the stepper and typechecker need to be able to refer to that part of the machine, right there. There are various ways of doing it, but what we've chosen to do (add a piece to the machine that's superfluous except when the machine is run using a particular mode or tool) has the advantage that it's robust. It doesn't necessarily break when other parts of the code around it change, and it's obvious to anyone modifying the code that you need to think about that annotation when you change the code. I could imagine a tool that allowed such annotations to be automatically hidden, so that the underlying code is clearer, but I can't see a better way of separating these concerns. Am I missing something? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)
On Aug 16, 2011, at 5:10 PM, Eli Barzilay wrote: Three minutes ago, John Clements wrote: On Aug 16, 2011, at 4:41 PM, Eli Barzilay wrote: Earlier today, Stephen Chang wrote: It seems like most people agree that it's ok to add stepper syntax properties to lazy racket. I agree with that in general while development is ongoing, but eventually it should be disconnected too. I don't see how to do this. To make sure we're on the same page, I'm suggesting that it's very difficult to make statements about places in the expanded code without adding annotations to the text of the expansions themselves. A possible conclusion would be that it's useful to know these kind of things about an expanded piece of syntax, and therefore more macros should do that -- but that's unrelated from the stepper, which is merely the motivation for requiring such functionality. Just like continuation marks being useful for the stepper, becoming part of the core language, and then getting used for much more. I believe I disagree, but we're still being way too vague. For instance, consider the stepper-skipto annotations, that specify where in an expanded expression the user's original code wound up. On the one hand, you could argue that finding the original expression is a general concept, and could be useful independent of the stepper, but in the absence of other tools that need to know this, the extra work of developing and documenting this general mechanism would seem to constitute a dramatic example of premature abstraction. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] using 'sort' in typed/racket?
I can't seem to make typed racket happy about using 'sort': #lang typed/racket ((ann sort ((Listof Integer) (Integer Integer - Boolean) - (Listof Integer))) '(3 5 4) (ann (Integer Integer - Boolean))) = Type Checker: Expected ((Listof Integer) (Integer Integer - Boolean) - (Listof Integer)), but got (All (a b) (case-lambda ((Listof a) (a a - Boolean) [#:cache-keys? Boolean] - (Listof a))((Listof a) (b b - Boolean) [#:cache-keys? Boolean] #:key (a - b) - (Listof a in: sort As far as I can tell, the type I specify is an instantiation of the given type for sort; my best guess is that the problem is that the type 'b' doesn't appear unless I use the #:key argument. My attempts to specify a #:key explicitly went even more horribly wrong. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] using 'sort' in typed/racket?
On Aug 20, 2011, at 12:06 PM, Carl Eastlund wrote: Have you tried using inst instead of ann? Telling TR what to fill in for a and b will probably be more helpful to it. Yay! Many thanks. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] JFYI: oops, seg fault
On Aug 20, 2011, at 1:55 PM, John Clements wrote: I was editing a file, and this occurred. My reading of this suggests that this involves garbage collection inside of an FFI call, but perhaps *all* GC is inside an FFI call? Anyhow, there's no evidence to suggest that I can reproduce this, so I suppose this is just JFYI. Oops, omitted version information. This is a few weeks old, I should probably re-build anyhow. Welcome to DrRacket, version 5.1.2.3--2011-08-09(afc01ca/g) [3m]. Language: typed/racket; memory limit: 256 MB. John Clements smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax-property guards? (was: Re: The Stepper strikes again)
On Aug 16, 2011, at 7:39 PM, Matthias Felleisen wrote: On Aug 16, 2011, at 5:42 PM, Sam Tobin-Hochstadt wrote: On Tue, Aug 16, 2011 at 5:31 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: Eli is right in principle. I sense that we are facing the same kind of problems we faced when we created mixins and then again when we created continuation marks. We need annotations time and again and they couple parts of our system more closely than necessary. Problem is, we don't seem to see or have an abstraction that eliminates this coupling. Aren't syntax properties precisely this abstraction? It is a mechanism and as such it is an abstraction. But is it the best possible abstraction? The use of symbols means the use of a protocol: when I see 'x, I will perform action A. So the identity of the symbol is critical. And that means we're tying together the two (+) components that are subject to the protocol. If the symbol changes in one of them, the other one breaks (the type checker, the stepper). That's Dan's rule: don't use symbols to impose protocols. (Today's add1 day for Dan.) What you really want is a name (variable). So at a minimum, two components should rely on a shared module that exports a variable to be used instead of a symbol. Then you could use (gensym) and nobody could mess with the symbol. Identity would be enforced afresh every time you start the system. But once you introduce a random name, you see that you want some other mechanism that 'mixes' into the compilation process as needed. I don't see this. In fact, I believe that the existing syntax system probably already supports this, in allowing the use of non-symbols as syntax-property keys. I just use symbols to increase transparency. What Eli is proposing, AFAICT, is not in fact a new abstraction, but a more disciplined--I might say, way *too* disciplined--use of the ones we have. In particular, the code for the teaching languages currently has many points where a syntax-property is added saying, in effect, the stepper needs to treat this piece specially. There are many instances of this that could probably be cleaned up and eliminated. For instance, the stepper has a 'stepper-binding-type' property, used thusly (from internal-docs.txt): stepper-binding-type : this is actually unrelated to macro expansion. It differentiates between the various kinds of lexical bindings. [ 'macro-bound ] : this variable's binding was inserted by a macro [ 'let-bound ] : this variable's binding was in a let/*/rec [ 'lambda-bound ] : this variable's binding was in a lambda [ 'non-lexical ] : this variable's identifier-binding is not 'lexical (i.e., unbound, top-level, or a module binding My guess is that in 2011, this information can probably be recovered from the syntax tree somehow. On the other hand, there are properties like this one: stepper-replace : This is like stepper-skipto/discard, except that it makes the stepper replace the expression the property is attached to by the value of the property. ... which is a straight-up cheat: it's saying, hey stepper, use this expression instead of the one that you think should go here. I would have to see exactly where this one is used, to see whether there's a more general way to tackle this. In general, then, I think that Eli's suggestions are sensible; I'm just not sure whether the payoff is worth the cost. John p.s.: I *still* think that the ability to place guards on syntax properties could be a big win. In fact, one advantage of not using symbols here is that you could perhaps check this statically. smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Accidentally discovered small undocumented function in FFI lib?
I wanted to convert a cstruct to a list today, and couldn't find a way to do it, so defined my own my-cstruct-name-list function... only to discover that it was already defined for me! It seems to work as expected--should I add it to the documentation, in the list headed The resulting bindings are as follows: ? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] OT: ld static linking + linux version numbers - ??
On Aug 31, 2011, at 5:06 PM, Jon Rafkind wrote: On 08/31/2011 05:53 PM, John Clements wrote: TOTALLY OFF-TOPIC, sorry: I have an autoconf script that's failing to detect a certain library, and I've tracked it down to a failure of ld -lasound foo.c ..which tells me that it can't find -lasound. Digging around in /usr/lib, I see that there's a libasound.so.2, but not a libasound.so. I just created a symbolic link from libasound.so to libasound.so.2, and that seems to work, but that *can't* be the general solution. Can it? Put differently: is there a way to specify a library version using an ld -l flag? AFAIK to get the .so file you are supposed to install the development versions of the library. Ah! Okay, this makes sense. Uh, sort of. Thanks! John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] OT: ld static linking + linux version numbers - ??
On Aug 31, 2011, at 8:24 PM, Eli Barzilay wrote: Three hours ago, John Clements wrote: On Aug 31, 2011, at 5:06 PM, Jon Rafkind wrote: AFAIK to get the .so file you are supposed to install the development versions of the library. Ah! Okay, this makes sense. Uh, sort of. The rationale is that applications need to specify a version number, so the version-less file is only for developers. But it's surprising that you didn't have that file -- not having the dev package means that you also wouldn't have the header file. Yep, right you are. Thanks again, all. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] online check syntax deadlock: can you help?
On Aug 31, 2011, at 5:08 PM, Robby Findler wrote: I've been seeing for some time now a deadlock in online check syntax. That is, after a while it just gets stuck and fails to complete the online check syntax. Typically what you see is the little blue dot come on but the cpu load drop to zero without any check syntax arrows ever showing up. Matthew and I have fixed a few things that could lead to these symptoms and I've just now pushed a change to compiler/cm to add some more informative logging. So: if you have the energy, can you please run DrRacket like this: racket -W info -l- drracket This doesn't work at all for me on the Mac, and highlights a problem that I've had at other times with racket GUI frames: none of the keyboard input goes to the window. Specifically, here's the sequence of events: 1) run racket -W info -l- drracket 2) See splash window come up, *underneath* terminal window and not given focus. 3) See DrRacket frame come up, again without focus. 4) Click on DrRacket frame, it gets focus and I see the cursor blinking. 5) Type a few characters -- they don't show up in DrRacket. Instead, they go to the terminal window. Furthermore, there's no DrRacket menu bar, and no DrRacket icon in the cmd-tab list. 6) Go back to terminal window, use ctrl-\ to blow it away. Is that expected? It looks like the OS is preventing not-full-fledged-app-things from opening windows and handling input. This is OS 10.6,8. John Clements smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] online check syntax deadlock: can you help?
On Sep 1, 2011, at 5:34 AM, Matthew Flatt wrote: At Wed, 31 Aug 2011 23:00:25 -0700, John Clements wrote: This doesn't work at all for me on the Mac, and highlights a problem that I've had at other times with racket GUI frames: none of the keyboard input goes to the window. Specifically, here's the sequence of events: 1) run racket -W info -l- drracket 2) See splash window come up, *underneath* terminal window and not given focus. 3) See DrRacket frame come up, again without focus. 4) Click on DrRacket frame, it gets focus and I see the cursor blinking. 5) Type a few characters -- they don't show up in DrRacket. Instead, they go to the terminal window. Furthermore, there's no DrRacket menu bar, and no DrRacket icon in the cmd-tab list. 6) Go back to terminal window, use ctrl-\ to blow it away. Is that expected? It looks like the OS is preventing not-full-fledged-app-things from opening windows and handling input. This is OS 10.6,8. The code that is supposed to make the process a full-fledged app is line at line 81 of collects/mred/private/cocoa/queue.rkt: ;; In case we were started in an executable without a bundle, ;; explicitly register with the dock so the application can receive ;; keyboard events. (define-cstruct _ProcessSerialNumber ([highLongOfPSN _ulong] [lowLongOfPSN _ulong])) (define kCurrentProcess 2) (define kProcessTransformToForegroundApplication 1) (define-appserv TransformProcessType (_fun _ProcessSerialNumber-pointer _uint32 - _OSStatus)) (void (TransformProcessType (make-ProcessSerialNumber 0 kCurrentProcess) kProcessTransformToForegroundApplication)) Note that the code ignores the result of `TransformProcessType', which is a bad idea. If you remove the `void' wrapper, what number result gets printed on your machine? Looks like it's -50. Here's the transcript: pcp070159pcs:~/plt clements$ racket -W info -l- drracket -50 Pango: couldn't load font Apple Chancery Medium Not-Rotated 13, falling back to Sans Medium Not-Rotated 13, expect ugly output. expanding-place.rkt: 01 starting thread expanding-place.rkt: 02 setting basic parameters expanding-place.rkt: 03 setting module language parameters expanding-place.rkt: 04 setting directories expanding-place.rkt: 05 installing security guard expanding-place.rkt: 06 setting uncaught-exception-handler expanding-place.rkt: 07 starting read-syntax expanding-place.rkt: 08 read expanding-place.rkt: 09 starting expansion expanding-place.rkt: 10 expanded expanding-place.rkt: 11 handlers finished expanding-place.rkt: 12 finished John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax property duplication
On Aug 18, 2011, at 5:32 AM, Sam Tobin-Hochstadt wrote: Yes, I understand why this happens. As I see it, there are a few possibilities: 1. The expander should check for duplicates, in some fashion. 2. This idiom is problematic, in the case where `stx' is both the input and used for the syntax properties of the output. 3. Macros may freely duplicate syntax properties. All of these have drawbacks, but (3), which you are suggesting, means either that syntax properties can only be used to specify idempotent information or that the non-idempotent ones need to have some *explicit* means by which equal elements can be distinguished, which must be part of the API of that syntax property. If we think this is how syntax properties ought to work, then we should add something to the documentation making this clear, and we should recognize that it's a limitation. Would syntax-property guards solve this problem? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax property duplication
On Sep 6, 2011, at 8:12 PM, Sam Tobin-Hochstadt wrote: On Tue, Sep 6, 2011 at 8:05 PM, John Clements cleme...@brinckerhoff.org wrote: On Aug 18, 2011, at 5:32 AM, Sam Tobin-Hochstadt wrote: Yes, I understand why this happens. As I see it, there are a few possibilities: 1. The expander should check for duplicates, in some fashion. 2. This idiom is problematic, in the case where `stx' is both the input and used for the syntax properties of the output. 3. Macros may freely duplicate syntax properties. All of these have drawbacks, but (3), which you are suggesting, means either that syntax properties can only be used to specify idempotent information or that the non-idempotent ones need to have some *explicit* means by which equal elements can be distinguished, which must be part of the API of that syntax property. If we think this is how syntax properties ought to work, then we should add something to the documentation making this clear, and we should recognize that it's a limitation. Would syntax-property guards solve this problem? I don't really see how. What are you thinking of? A guard could keep track of duplicates. Keep in mind that syntax-property guards are purely a figment of my imagination. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] syntax property duplication
On Sep 7, 2011, at 10:40 AM, Carl Eastlund wrote: On Wed, Sep 7, 2011 at 1:37 PM, John Clements cleme...@brinckerhoff.org wrote: On Sep 6, 2011, at 8:12 PM, Sam Tobin-Hochstadt wrote: On Tue, Sep 6, 2011 at 8:05 PM, John Clements cleme...@brinckerhoff.org wrote: On Aug 18, 2011, at 5:32 AM, Sam Tobin-Hochstadt wrote: Yes, I understand why this happens. As I see it, there are a few possibilities: 1. The expander should check for duplicates, in some fashion. 2. This idiom is problematic, in the case where `stx' is both the input and used for the syntax properties of the output. 3. Macros may freely duplicate syntax properties. All of these have drawbacks, but (3), which you are suggesting, means either that syntax properties can only be used to specify idempotent information or that the non-idempotent ones need to have some *explicit* means by which equal elements can be distinguished, which must be part of the API of that syntax property. If we think this is how syntax properties ought to work, then we should add something to the documentation making this clear, and we should recognize that it's a limitation. Would syntax-property guards solve this problem? I don't really see how. What are you thinking of? A guard could keep track of duplicates. Keep in mind that syntax-property guards are purely a figment of my imagination. What, in your imagination, is a syntax-property guard? I imagine that when the key involved in the property is a special guarded-syntax-property value, then an associated procedure gets to decide (approve/reject, substitute an alternate value?) whether a value should be used. If I understand the problem, the obvious danger in an idea such as this is opening a back door into expansion time. Apologies if I've misunderstood the issue. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] promising cal poly student seduced by math in Chicago
Posting this on dev so he doesn't see it, though I suppose he might anyhow... Jeremy Kun is one of only two really really good students I've known at Cal Poly. He's now a math grad student at UIC (which he chose rather than go to work for Google), but apparently he's decided to use Racket as the base for a series of explore-developing-a-language blog posts. I believe this is targeted at the students in his undergraduate class, but it might be something to have on the radar. Here's the first blog post: http://jeremykun.wordpress.com/2011/09/07/chai-designing-a-programming-language/ John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] distributing native code
As part of the PortAudio library, I want to be able to call this code: void bufferAdd(short *dst, short *src, int len) { int i; for (i = 0; ilen; i++) { dst[i] += src[i]; } } ... and I'm trying to figure out the most hassle-free way to distribute it, given that it may be installed on machines without compilers[*]. It looks to me like the best way is probably to explicitly add shared-object files to paths given by (build-path native (system-library-subpath) (path-add-suffix buffer-add (system-type 'so-suffix))), to distribute them as part of the package, and then to load these explicitly, signaling an error if one is not found. Note that I'm omitting the compiled part, because that would be deleted by a call to raco setup --clean. I looked through my existing plt tree, and was a bit startled to see that not a single collection includes any shared library that I could copy from. Does this approach make sense? Many thanks, John [*] See earlier thread where the general consensus was that it was not possible to make a Racket version of this run less than (IIRC) 5x slower than C. smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Fwd: [clipperz] Re: Marketing Ideas
Yes, we hate facebook. But our facebook page has a GENUINELY EMBARRASSING number of likes (uh... 57?). Forwarded from an entirely unrelated list, could we consider putting those facebook/twitter/linkedin like buttons on the racket-lang.org page? Is this something we've already considered and decided against? John Begin forwarded message: From: Robin ro...@ourstillwaters.org Date: September 7, 2011 10:10:41 PM PDT To: Clipperz clipp...@googlegroups.com Subject: [clipperz] Re: Marketing Ideas Reply-To: ro...@ourstillwaters.org Why not get a Facebook account and a Like button? Same for Twitter, Linked In, and the newest social/business networking sites. Also, have you advertised in any techy mags? Wired would be the obvious choice and probably well worth the cost, whatever it is. But secondary mags directed at IT types, Web developers, and programmers would at least get you some major exposure to the right group for subsequent word of mouth. Good luck guys! Robin On Sep 7, 12:54 am, Nate nate...@gmail.com wrote: Do you have any ideas on ways that the community can help market Clipperz? -- You received this message because you are subscribed to the Google Groups Clipperz group. To post to this group, send email to clipp...@googlegroups.com. To unsubscribe from this group, send email to clipperz+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/clipperz?hl=en. smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Fwd: [clipperz] Re: Marketing Ideas
On Sep 9, 2011, at 12:00 PM, Jon Rafkind wrote: Is there any correlation between number of likes and well.. anything? Everyone else is doing it. I know Matthias will go for that one. In the I read it on the internet category, this page http://www.social-networking-success.com/facebook-likes.html suggests that facebook fans are worth $137.84 apiece. More seriously, this page argues that people who click on links like that will feel some kind of brand loyalty to Racket for years to come. Given what I know about human psychology, I would tend to agree. Making choices like this is a self-reinforcing process. Having chosen something (a political party, a brand of toilet paper, a text editor), people will seek to validate their earlier judgment by sticking to that thing and defending it. So yes, I see value in it. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] CPANTS
On Sep 9, 2011, at 12:39 PM, Neil Van Dyke wrote: I'm not familiar with CPANTS, but automating real-world feedback something like that sounds useful. I think you should be conscientious about the tiny phoning back to the mothership with more info privacy problem, and how best to manage that, even if it's just real disclosure (not privacy policy smallprint). I can't think of anyone else in the US who is right now, but I think that information privacy should always be a consideration in automated community-sourcing problems. Sigh... I respectfully disagree. I feel that in some ways, this argument eight years ago prevented us from gathering a whole bunch of information that could have been quite useful to us. It depends on whether you see Racket as a bulwark against a rising tide of invasive internet presence, or as the potential beneficiary of social media tools. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] See, that's what I'm talking about
Thanks, Jay! Uh... whoever you are? John Begin forwarded message: From: Facebook notification+mmgyw...@facebookmail.com Date: September 9, 2011 1:33:15 PM PDT To: John Clements aoeufaceb...@brinckerhoff.org Subject: Jay Kominek likes PLT Racket. Reply-To: Facebook notification+mmgyw...@facebookmail.com facebook Jay Kominek likes PLT Racket. Update PLT Racket See All Notifications The message was sent to aoeufaceb...@brinckerhoff.org. If you don't want to receive these emails from Facebook in the future or have your email address used for friend suggestions, you can unsubscribe. Facebook, Inc. P.O. Box 10005, Palo Alto, CA 94303 smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] See, that's what I'm talking about
On Sep 9, 2011, at 2:54 PM, Jay Kominek wrote: You're welcome? Well, I'm just glad to see that you were prompted by my message; given the timing, my other hypothesis was that Facebook was reading all of my e-mail. Not impossible, I suppose... John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] posting to semaphore from C causes seg fault
I'm unable to pass a semaphore to C and post to it from there. In particular, it causes a seg fault. I'm testing the Scheme_Object * with SCHEME_SEMAP, so I'm pretty sure it's a semaphore. Also, I can see this happen in gdb, but the code is optimized, so it's hard to see exactly where it's failing. The semaphore object looks like this in gdb: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0008 [Switching to process 1825] scheme_post_sema (o=0x104a14668) at sema.c:284 284 (gdb) l 279 280 void scheme_post_sema(Scheme_Object *o) 281 { 282 Scheme_Sema *t = (Scheme_Sema *)o; 283 int v, consumed; 284 285 if (t-value 0) return; 286 287 v = t-value + 1; 288 if (v t-value) { (gdb) p t $1 = (Scheme_Sema *) 0x104a14668 (gdb) p t-value $2 = 0 (gdb) p v Unable to access variable v $5 = variable optimized away by compiler (gdb) p *t $6 = { so = { type = 78, keyex = 0 }, first = 0x0, last = 0x0, value = 0 } The strange thing here is that the C code for scheme_sema_post suggests that when t-first is 0x0, it should just silently return. Okay, so I dug into the assembly a bit more, and it turns out that the compiled version of this code looks like this: Dump of assembler code for function scheme_post_sema: 0x00010020e0d0 scheme_post_sema+0:push %rbp 0x00010020e0d1 scheme_post_sema+1:mov%rsp,%rbp 0x00010020e0d4 scheme_post_sema+4:push %r14 0x00010020e0d6 scheme_post_sema+6:push %r13 0x00010020e0d8 scheme_post_sema+8:push %r12 0x00010020e0da scheme_post_sema+10: push %rbx 0x00010020e0db scheme_post_sema+11: sub$0x30,%rsp 0x00010020e0df scheme_post_sema+15: mov%rdi,-0x28(%rbp) 0x00010020e0e3 scheme_get_thread_local_variables+0: lea 0x104cce(%rip),%r13# 0x100312db8 scheme_thread_local_offset 0x00010020e0ea scheme_get_thread_local_variables+7: mov 0x0(%r13),%edx 0x00010020e0ee scheme_get_thread_local_variables+11: lea 0x12434b(%rip),%r14# 0x100332440 scheme_thread_local_key 0x00010020e0f5 scheme_get_thread_local_variables+18: mov (%r14),%eax 0x00010020e0f8 scheme_get_thread_local_variables+21: addr32 mov %gs:(%edx,%eax,8),%rdx -- IT CRASHES ON THIS NEXT INSTRUCTION: -- 0x00010020e0fe scheme_post_sema+46: mov0x8(%rdx),%rax 0x00010020e102 scheme_post_sema+50: mov%rax,-0x50(%rbp) 0x00010020e106 scheme_post_sema+54: lea-0x50(%rbp),%rax 0x00010020e10a scheme_post_sema+58: mov%rax,0x8(%rdx) 0x00010020e10e scheme_post_sema+62: lea-0x28(%rbp),%rax 0x00010020e112 scheme_post_sema+66: mov%rax,-0x40(%rbp) 0x00010020e116 scheme_post_sema+70: mov0x18(%rdi),%rdx 0x00010020e11a scheme_post_sema+74: test %rdx,%rdx The problem on the given instruction is that %rdx is 0, and thus that loading from an offset of 8 from 0x0 seg faults. The gdb info makes it look as though this is an inlining of a function called scheme_get_thread_local_variables, though I can't see why it would be called here; the C code looks like it should just increment the counter and return. As I said, this is completely and totally reproducible, so I'm happy to carry out any experiments; at this point, I'm at the throwing up my hands and saying compiler bug? stage. Many thanks for any suggestions, John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] unexpected SIGBUS!
Well, I was just typing along, and got a bus error. Ignore this trace unless it looks interesting. Also, this is september 3rd, push e4da28e1c00027338eda58cc78885255b9285598, so it may be a fixed issue John Process: racket [2519] Path:/Users/clements/plt/bin/racket Identifier: racket Version: ??? (???) Code Type: X86-64 (Native) Parent Process: bash [537] Date/Time: 2011-09-15 21:12:57.701 -0700 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Interval Since Last Report: 107933 sec Crashes Since Last Report: 15 Per-App Crashes Since Last Report: 15 Anonymous UUID: 2B5B5A13-9161-4495-BE51-9AEEEA441DE8 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x000102b94028 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 Racket 0x000100059ca9 scheme_set_cont_mark + 377 1 Racket 0x000100264eaa scheme_push_break_enable + 186 2 Racket 0x0001002655d7 do_sync + 1655 3 ??? 0x0001004d2215 0 + 4300022293 4 Racket 0x00010005ce59 scheme_do_eval + 9801 5 Racket 0x000100070d94 force_values + 292 6 Racket 0x00010007ae72 scheme_force_value_same_mark + 114 7 ??? 0x0001004dc719 0 + 4300064537 8 Racket 0x00010005ce59 scheme_do_eval + 9801 9 Racket 0x00010005fb2f _scheme_apply_multi_from_native + 95 10 ??? 0x0001004d2142 0 + 4300022082 11 Racket 0x00010005ce59 scheme_do_eval + 9801 12 Racket 0x00010007acf3 apply_k + 179 13 Racket 0x00010007b986 scheme_top_level_do_worker + 1222 14 racket 0x000133fe finish_cmd_line_run + 3598 15 racket 0x00014051 main_after_stack + 2753 16 Racket 0x0001d399 scheme_main_stack_setup + 153 17 racket 0x00011da4 main + 36 18 racket 0x00011d54 start + 52 Thread 1: 0 libSystem.B.dylib 0x7fff87b78d7a mach_msg_trap + 10 1 libSystem.B.dylib 0x7fff87b793ed mach_msg + 59 2 Racket 0x000100292826 exception_thread + 134 3 libSystem.B.dylib 0x7fff87bb1fd6 _pthread_start + 331 4 libSystem.B.dylib 0x7fff87bb1e89 thread_start + 13 Thread 2: 0 libSystem.B.dylib 0x7fff87bda99e __sigwait + 10 1 libSystem.B.dylib 0x7fff87bda977 sigwait + 73 2 Racket 0x0001001a4511 mz_proc_thread_signal_worker + 161 3 Racket 0x0001001613b0 mzrt_thread_stub + 96 4 libSystem.B.dylib 0x7fff87bb1fd6 _pthread_start + 331 5 libSystem.B.dylib 0x7fff87bb1e89 thread_start + 13 Thread 3: 0 libSystem.B.dylib 0x7fff87bb3a6a __semwait_signal + 10 1 libSystem.B.dylib 0x7fff87bb38f9 nanosleep + 148 2 libSystem.B.dylib 0x7fff87bb3863 usleep + 57 3 Racket 0x0001001aa251 green_thread_timer + 81 4 Racket 0x0001001613b0 mzrt_thread_stub + 96 5 libSystem.B.dylib 0x7fff87bb1fd6 _pthread_start + 331 6 libSystem.B.dylib 0x7fff87bb1e89 thread_start + 13 Thread 4: Dispatch queue: com.apple.libdispatch-manager 0 libSystem.B.dylib 0x7fff87b91c0a kevent + 10 1 libSystem.B.dylib 0x7fff87b93add _dispatch_mgr_invoke + 154 2 libSystem.B.dylib 0x7fff87b937b4 _dispatch_queue_invoke + 185 3 libSystem.B.dylib 0x7fff87b932de _dispatch_worker_thread2 + 252 4 libSystem.B.dylib 0x7fff87b92c08 _pthread_wqthread + 353 5 libSystem.B.dylib 0x7fff87b92aa5 start_wqthread + 13 Thread 5: com.apple.CFSocket.private 0 libSystem.B.dylib 0x7fff87bbc932 select$DARWIN_EXTSN + 10 1 com.apple.CoreFoundation0x7fff86d2f498 __CFSocketManager + 824 2 libSystem.B.dylib 0x7fff87bb1fd6 _pthread_start + 331 3 libSystem.B.dylib 0x7fff87bb1e89 thread_start + 13 Thread 6: 0 libSystem.B.dylib 0x7fff87bb3a6a __semwait_signal + 10 1 libSystem.B.dylib
[racket-dev] foreign struct access different in 5.1.3?
I'm trying to backport working FFI code to 5.1.3, and I'm having trouble referring to elements of a C struct. Specifically, in the presence of this definition (define-cstruct _rack-audio-closure ([sound _pointer] [cur-sample_ulong] [num-samples _ulong] [stop-now _bool] [stop-sema-ptr _pointer])) using the function (rack-audio-closure-cur-sample) on the result of an FFI call with signature (_fun _pointer _ulong _pointer - _rack-audio-closure-pointer) produces this error: rack-audio-closure-cur-sample: expected argument of type struct:rack-audio-closure; given #cpointer:rack-audio-closure in 5.1.3, but it works just fine in the git head. Git log suggests to me that you (Kevin) might have changed/fixed this in a810b30b872787a1365c, so here's the question: is there some workaround to access the elements of a C struct in 5.1.3? Many thanks, John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] foreign struct access different in 5.1.3?
On Sep 16, 2011, at 3:06 PM, John Clements wrote: I'm trying to backport working FFI code to 5.1.3, and I'm having trouble referring to elements of a C struct. Specifically, in the presence of this definition (define-cstruct _rack-audio-closure ([sound _pointer] [cur-sample_ulong] [num-samples _ulong] [stop-now _bool] [stop-sema-ptr _pointer])) using the function (rack-audio-closure-cur-sample) on the result of an FFI call with signature (_fun _pointer _ulong _pointer - _rack-audio-closure-pointer) produces this error: rack-audio-closure-cur-sample: expected argument of type struct:rack-audio-closure; given #cpointer:rack-audio-closure in 5.1.3, but it works just fine in the git head. More research suggests that the problem is more limited; it looks like a problem of generativity. That is, if I have two modules that declare the same cstruct (same name, same fields, same types) then cpointers to these structures returned by functions from the first module cannot be accessed in the other module. AFAICT, This is not the case in more recent versions; that is, these cstructs are not generative. Assuming this is deliberate, I could document it. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] posting to semaphore from C causes seg fault
On Sep 17, 2011, at 7:32 AM, Matthew Flatt wrote: It looks like the call in C might have been in a thread other than the thread where Racket was started. In that case, when scheme_post_sema() tries to cooperate with the GC, then it would end up with a NULL pointer for the Racket GC information of the current thread. In particular, since you're asking about semaphores, I wonder whether you were trying to use Racket semaphores to synchronize OS-level threads? If so, it won't work; Racket semaphores only work among Racket threads, and you'd have to use OS-level semaphores to synchronize OS-level threads. If you were calling scheme_post_sema() from an OS thread where Racket was started, though, then we need to investigate further. Nope, that's it; I was trying to use scheme_post_sema to synchronize threads. I spent another few minutes in the docs, and *finally* found the relevant paragraph: In an embedding application, Racket can co-exist with additional OS-implemented threads, but the additional OS threads must not call any scheme_ function. Only the OS thread representing a particular place can call scheme_ functions. (This restriction is stronger than saying all calls for a given place must be serialized across threads. Racket relies on properties of specific threads to avoid stack overflow and garbage collection.) For the original place, only the OS thread used to call scheme_basic_env can call scheme_ functions. For any other place, only the OS thread that is created by Racket for the place can be used to call scheme_ functions. So: yes, it was in there. Would it make sense to add a sentence to the beginning of Section 8, Threads, that reads (This section describes Racket threads. For information on OS threads, see Racket and OS Threads) ... and rename Inside/1.6, Racket and Threads, to Racket and OS Threads ? I suppose this means there's no platform-independent synchronization mechanism? Anyhow, this is clearly not your problem. Thanks! John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] FYI crash in os X cairo
Disregard unless interested: crash while running program, drracket #8e5bb730b369b169821695e1b3216d68a8d71d64 from Friday 16th. Process: racket [11531] Path:/Users/clements/plt/bin/racket Identifier: racket Version: ??? (???) Code Type: X86-64 (Native) Parent Process: bash [537] Date/Time: 2011-09-17 10:09:10.294 -0700 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Interval Since Last Report: 138200 sec Crashes Since Last Report: 17 Per-App Crashes Since Last Report: 17 Anonymous UUID: 2B5B5A13-9161-4495-BE51-9AEEEA441DE8 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x00010001 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 com.apple.CoreGraphics 0x7fff82f030aa CGGStateTextCopy + 47 1 com.apple.CoreGraphics 0x7fff82f02f53 CGGStateCreateCopy + 101 2 com.apple.CoreGraphics 0x7fff82f02ecb CGGStackSave + 65 3 com.apple.CoreGraphics 0x7fff82f02e7f CGContextSaveGState + 65 4 libcairo.2.dylib0x00010500787a _cairo_quartz_surface_fill + 202 5 libcairo.2.dylib0x000104feb494 _cairo_surface_fill + 180 6 libcairo.2.dylib0x000104fc4a1f _cairo_gstate_fill + 479 7 libcairo.2.dylib0x000104fbb1f3 cairo_fill_preserve + 35 8 Racket 0x000100293a6c ffi_call_unix64 + 76 9 Racket 0x000100294684 ffi_call + 644 10 Racket 0x000100286a6b ffi_do_call + 1371 11 Racket 0x00010005d33d scheme_do_eval + 10557 12 Racket 0x00010005fc3f _scheme_apply_multi_from_native + 95 13 ??? 0x0001004e3f40 0 + 4300095296 14 ??? 0x00011ba9d67e 0 + 4759082622 15 ??? 0x0001004fa930 0 + 4300187952 16 ??? 0x0001004fa930 0 + 4300187952 17 Racket 0x00010005d0d5 scheme_do_eval + 9941 18 Racket 0x000100077305 scheme_dynamic_wind + 1029 19 Racket 0x000100077a71 dynamic_wind + 321 20 ??? 0x0001013d759d 0 + 4315772317 21 ??? 0x0001013d55d0 0 + 4315764176 22 ??? 0x0001004e3b10 0 + 4300094224 23 ??? 0x0001004e3b10 0 + 4300094224 24 Racket 0x00010005d0d5 scheme_do_eval + 9941 25 Racket 0x00010005fc3f _scheme_apply_multi_from_native + 95 26 ??? 0x0001004e3f40 0 + 4300095296 27 ??? 0x0001004e3b10 0 + 4300094224 28 Racket 0x00010005d0d5 scheme_do_eval + 9941 29 Racket 0x000100078c49 scheme_finish_apply_for_prompt + 873 30 Racket 0x000100078e1c scheme_apply_for_prompt + 92 31 Racket 0x000100085612 call_with_prompt + 1282 32 ??? 0x0001004d9215 0 + 4300050965 33 Racket 0x00010005d0d5 scheme_do_eval + 9941 34 Racket 0x000100078c49 scheme_finish_apply_for_prompt + 873 35 Racket 0x000100078e1c scheme_apply_for_prompt + 92 36 Racket 0x000100085612 call_with_prompt + 1282 37 ??? 0x0001004e3cc5 0 + 4300094661 38 Racket 0x00010005d0d5 scheme_do_eval + 9941 39 Racket 0x000100070e94 force_values + 292 40 Racket 0x00010007afb2 scheme_force_value_same_mark + 114 41 ??? 0x0001004e3719 0 + 4300093209 42 Racket 0x00010005d0d5 scheme_do_eval + 9941 43 Racket 0x00010005fc3f _scheme_apply_multi_from_native + 95 44 ??? 0x0001004d9142 0 + 4300050754 45 Racket 0x00010005d0d5 scheme_do_eval + 9941 46 Racket 0x00010007ae33 apply_k + 179 47 Racket 0x00010007bac6 scheme_top_level_do_worker + 1222 48 racket 0x000133fe finish_cmd_line_run + 3598 49 racket 0x00014051 main_after_stack + 2753 50 Racket
[racket-dev] heads-up on gcc-clang switch
FYI: Extracted from an audio mailing list, of possible interest re: Mac compilation; it looks like Apple's switching to clang. In fact, gcc may (already? soon?) be a front end for clang. John Begin forwarded message: From: Kyle Sluder kyle.slu...@gmail.com Date: September 17, 2011 8:58:27 PM PDT To: Paul Davis p...@linuxaudiosystems.com Cc: coreaudio-...@lists.apple.com API coreaudio-...@lists.apple.com Subject: Re: Commandline Tool Chain? ... So while you can invoke clang directly (don't use GCC anymore; it's unsupported) to produce fully functional Mac OS X binaries ... ... smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] heads-up on gcc-clang switch
On Sep 18, 2011, at 3:33 PM, Sam Tobin-Hochstadt wrote: Apple has already switched to clang, that happened with XCode 4. Previously, they shipped both and old version of GCC (4.2), and a compiler which used the GCC frontend and an LLVM backend. They made this switch because they didn't like the GPL version 3, which recent versions of GCC (and other GNU software) use. There are two different projects for using GCC as a frontend for LLVM, called llvm-gcc and DragonEgg, with the latter being more up-to-date, I believe. There wouldn't be any point in using GCC as a front-end for clang, since clang is just a front-end for LLVM. Everything you say makes sense: one other note--AFAICT, XCode 4 is not (yet?) free for platforms other than Lion. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] Using places to synchronize with C threads?
It looks like you've done the heavy lifting of creating primitives that can be used to synchronize between OS threads. Is there any way to use place channels to interact between the main Racket thread and an OS thread spawned by an audio library? I don't see any documentation that provides a C interface to the place primitives, and I've learned the hard way that I can't assume that calling racket functions in a C thread is safe. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] system-library-subpath etc. on windows 32-bit and 64-bit platforms?
In distributing compiled binaries for Windows, I'm trying to cover all of the bases for the required DLLs. As far as I can tell from Visual Studio 2010, there are only two flavors, 32-bit and 64-bit. However, I see that on at least one of my students' machines, the system-library-subpath comes up as win32\\x86_84\\3m This alarms me somewhat, since Visual Studio calls the two flavors win32 and x64, so the win32 seems somehow incompatible with the x86_64 in the system-library-subpath. My earnest hope is that there's only one kind of 64-bit dll for windows, and that the win32 part is consistent across all windows platforms. Can anyone confirm that this is the case? Many thanks, John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] system-library-subpath etc. on windows 32-bit and 64-bit platforms?
On Sep 22, 2011, at 10:22 PM, Neil Van Dyke wrote: Matthew or someone can give an authoritative answer, but if this lets you sleep tonight... I suspect the win32 in Racket is fine, and that Visual Studio just has a backward-compatibility awkwardness in naming. Win32 was the name of one of the generations of Windows API, and I believe that umbrella now also includes the API when it is used for 64-bit targets. Many thanks: I suspect that it will in fact help me sleep tonight. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] missing negation in guide for places?
It sure looks to me like this sentence from the docs is missing a really important not: The consequence of this second feature is that place should appear immediately in a module or in a function that is called in a module’s top level; otherwise, invoking the module will invoke the same module in a new place, and so on, triggering a cascade of place creations that will soon exhaust memory. I'm guessing this should read: The consequence of this second feature is that place should *NOT* appear immediately in a module or in a function that is called in a module’s top level; otherwise, invoking the module will invoke the same module in a new place, and so on, triggering a cascade of place creations that will soon exhaust memory. Is this correct? I'll change it if so, and apologies if this has already been fixed. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] another small doc typo
Again, ignore this if it's already been fixed. The docs contain this example: #lang racket (provide main) (define (any-double? l) (for/or ([i (in-list l)]) (for/or ([i2 (in-list l)]) (= i2 (* 2 i) (define (main) (define p (place ch (define l (place-channel-get ch)) (define l-double? (any-double? l)) (place-channel-put ch l-double?))) (place-channel-put p (list 1 2 4 8)) (begin0 (place-channel-get p)) (place-wait p)) My strong guess is that the begin0 was supposed to enclose both the place-channel-get and the place-wait. Actually, I'm not really sure why the place-wait is there at all. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] More places questions
The example in the guide works fine: #lang racket (provide main) (define (any-double? l) (for/or ([i (in-list l)]) (for/or ([i2 (in-list l)]) (= i2 (* 2 i) (define (main) (define p (place ch (define l (place-channel-get ch)) (define l-double? (any-double? l)) (place-channel-put ch l-double?))) (place-channel-put p (list 1 2 4 8)) (begin0 (place-channel-get p)) (place-wait p)) ... which is strange, because 'p' is not a place-channel, and yet the call to (place-channel-put p (list 1 2 4 8)) succeeds. I'm guessing that calling place-channel-put with a descriptor pulls out the associated channel... should the docs indicate this? Also, my tiny experiments suggest that place-channel-put is blocking, is that right? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] ACM publishing and ArXiv
On Sep 30, 2011, at 10:07 AM, John Clements wrote: In case you didn't catch Stephanie Weirich's post of this on plus.google.com, here's some very interesting information about ArXiv and ACM and where copyrights intersect. It may be that you can avoid much of this by only publishing draft versions of your paper on ArXiv; I Am Not A Lawyer. Oh for heaven's sake. Neglected to post the link. http://r6.ca/blog/20110930T012533Z.html John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] More places questions
On Sep 30, 2011, at 6:31 AM, Matthew Flatt wrote: At Fri, 30 Sep 2011 09:21:42 -0400, Eli Barzilay wrote: A few minutes ago, Kevin Tew wrote: place-channel-put is not blocking. So channel in the name is not a good choice... We use channel for asynchronous channels, too, such as `racket/asynch-channel'. Since all place channels are asynchronous, I think it would be redundant to include `async' in the name. I see that it's not blocking... there's something else fishy going on, though. This program: #lang racket (define (main) (define p (place ch (thread (lambda () (place-channel-put ch 'letter-to-myself))) (define result (place-channel-get ch)) (printf got a result: ~s\n result))) 3) ...doesn't print anything out. This suggests that place-channels are unlike regular ones, in that they refer to a different channel when used with channel-put than they do when used with channel-get. I'm not sure how I would clarify the docs here. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] More places questions
On Sep 30, 2011, at 5:28 AM, Sam Tobin-Hochstadt wrote: On Fri, Sep 30, 2011 at 12:26 AM, John Clements cleme...@brinckerhoff.org wrote: I'm guessing that calling place-channel-put with a descriptor pulls out the associated channel... should the docs indicate this? The docs here: http://pre.racket-lang.org/docs/html/reference/places.html?q=place#%28tech._place._descriptor%29 say that. They do indeed; specifically, they say Every place descriptor is also a place channel. But in that case, I think that this program: #lang racket (define (main) (define p (place ch 3)) (place-channel? p)) ... should produce #t, but it produces #f. No? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Release for v5.2 is about to begin
On Oct 2, 2011, at 1:30 PM, Ryan Culpepper wrote: The release process for v5.2 will begin in about a week. If you have any new features that you want in and are relatively close to being done, now is a good time to do that. Cool... 5.2! What's the occasion? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Transparent Structures in XML Library
On Oct 3, 2011, at 2:13 PM, Doug Williams wrote: There are ways around it like that. For example, I'm trying to get in the habit of using ~.s in printf's where it might occur. But, I think it would be easy in this case to just fix the real problem. I don't think I would agree that #:transparent is the problem here; #:transparent means yes, anyone can use the reflective properties to discover how many fields this structure has, what the mutators are, etc. It's not fundamentally about printing. So I think that a separate control on printing is definitely the right way to go, and in particular, the ~.s choice seems like it might just solve the problem completely. No? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
Re: [racket-dev] Transparent Structures in XML Library
On Oct 3, 2011, at 3:01 PM, Doug Williams wrote: The fact that transparent structures also print all of their element - in this case recursively, ad nauseam - is more of a side effect. In that case, I think prop:custom-write properties should be added. I assume any of the print limiting options in my case still walk the entire structure and create a several tens of megabytes long string just to truncate it. I see. I misread your first mail as suggesting that the XML structures should not be #:transparent. John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev
[racket-dev] blocked on a mzrt-sema that gets collected: okay?
I conjecture that if a place is blocked on a mzrt_sema semaphore and if that semaphore is then collected using a call to mzrt_sema_destroy(), then the waiting thread will simply wait forever. Is that correct? John smime.p7s Description: S/MIME cryptographic signature _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev