[racket-dev] Wikipedia page

2010-06-08 Thread John Clements
I've taken a first crack at creating a 

Racket (programming language)

page in wikipedia, simply by copying the first few chunks of the PLT Scheme 
page.

This is a bit experimental, because it may be that Wikipedia has an existing 
mechanism for renaming, so I figured I'd just spend five minutes on it and wait 
for Wikipedia admins to tell me if I'm doing something redundant.

FWIW, there's also a DrScheme page to update and presumably a whole pile of 
references to PLT scheme, membership in various categories, etc.

John
 

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [racket] [scribble] rendering syntax

2010-06-09 Thread John Clements

On Jun 9, 2010, at 5:05 AM, Sam Tobin-Hochstadt wrote:

 On Tue, Jun 8, 2010 at 11:27 PM, Eric Tanter etan...@dcc.uchile.cl wrote:
 Yes, Carl got my point right. And yes, that's like showing square brackets 
 in the stepper ;)
 
 Right now, the two cases are slightly asymmetric, since there's a
 syntax property indicating the use of [] or {}, but none indicating
 the use of ', #', #`, etc.  Similarly there's no syntax property
 indicating the difference between (a b) and (a . (b)) (something I
 once tried to fix, but gave up on).

Wait... what!?

I had no idea. Well, that's *great* news!

Next question: is there a way to push this through pretty-print?  I looked for 
a mechanism in the docs, but didn't find one.

Perhaps the stepper should just forget about using pretty-print. Is the 
editor's indentation machinery exposed in a way that could be used by the 
stepper?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] make xml structs transparent?

2010-06-18 Thread John Clements
Is there some good reason why the 'document' and 'prolog' structures in the xml 
library are not transparent? In the just trying to see what's there stage of 
programming, it would be a lot simpler not to have to dig through them with 
explicit accessors.

John 



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Windows test bundle 29M vs. 47M for other platforms?

2010-07-19 Thread John Clements
On this page

http://pre.racket-lang.org/release/installers/

the reported size of the Windows installer is 29M, vs. about 47 or 48 M for 
other platforms.  I see that this was true of the 5.0 release as well, so this 
is probably expected, but I'm curious: why is this? Is it just that the other 
platforms are distributed uncompressed and rely upon dynamic compression?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] P4P: A Syntax Proposal

2010-07-30 Thread John Clements

On Jul 30, 2010, at 6:47 AM, Robby Findler wrote:

 On Fri, Jul 30, 2010 at 4:05 AM, Eli Barzilay e...@barzilay.org wrote:
 IMO, this thing is missing the point (the usual parens, ewww! one),
 as long as it ignores infix.
 
 Seems to me that this point directly contradicts one of Shriram's
 design goals, namely showing that + is no more special than append or
 one of your own functions.

That may be true, but it doesn't counter Eli's point, which I think is entirely 
valid.  I had precisely the same reaction when I saw that code.

John 



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] x86_64 libs not available to 32-bit ffi, right?

2010-08-03 Thread John Clements
Reality check: I can't use the Racket ffi libraries to load 64-bit x86_64 
shared libs, can I?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Added Sierpinski example to wikipedia page

2010-08-16 Thread John Clements
I happened upon the Racket wikipedia page again, and yet again the Hello 
World section made me want to cry.  So I deleted it, and replaced it with the 
straightforward version of racket's Hello, World! program, viz.:

#lang racket
Hello, World!

...then I added the sierpinski example from the racket-lang front page.  I'm 
hoping that whoever wrote this code will either not object, or change it.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] RFC: Coding Guidelines

2010-08-17 Thread John Clements

On Aug 17, 2010, at 3:57 PM, Jay McCarthy wrote:

 We're attempting to write down coding guidelines for the project.
 
 Here is a first attempt:
 
 http://faculty.cs.byu.edu/~jay/tmp/201008161509-guidelines.html

 and that you and your readers will so in the future

Will so? Should that have been will also? Or do so?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] RFC: Coding Guidelines

2010-08-17 Thread John Clements

On Aug 17, 2010, at 3:57 PM, Jay McCarthy wrote:

 We're attempting to write down coding guidelines for the project.
 
 Here is a first attempt:
 
 http://faculty.cs.byu.edu/~jay/tmp/201008161509-guidelines.html
 
 Please comment.

You write 

As long as your code fulfills its promises and meets each of these criteria, 
you can push incrementally.

For example, I may be working on adding an exhaustive queue library to Racket. 
I imagine supporting 30 different functions across 5 different queue 
implementations. I don't have to wait to push until all 150 function 
implementations are documented, tested, and stressed. I can push whenever I 
make progress on each of the required points.

Either this is contradictory, or I'm misunderstanding it.  The first paragraph 
suggests that the code must meet each of the criteria; the second suggests that 
as long as it's *closer* to meeting the required criteria, it's fine.



John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] RFC: Coding Guidelines

2010-08-19 Thread John Clements

On Aug 17, 2010, at 4:27 PM, Jay McCarthy wrote:

 On Tue, Aug 17, 2010 at 2:24 PM, John Clements
 cleme...@brinckerhoff.org wrote:
 
 On Aug 17, 2010, at 3:57 PM, Jay McCarthy wrote:
 
 We're attempting to write down coding guidelines for the project.
 
 Here is a first attempt:
 
 http://faculty.cs.byu.edu/~jay/tmp/201008161509-guidelines.html
 
 Please comment.
 
 You write
 
 As long as your code fulfills its promises and meets each of these 
 criteria, you can push incrementally.
 
 For example, I may be working on adding an exhaustive queue library to 
 Racket. I imagine supporting 30 different functions across 5 different queue 
 implementations. I don't have to wait to push until all 150 function 
 implementations are documented, tested, and stressed. I can push whenever I 
 make progress on each of the required points.
 
 Either this is contradictory, or I'm misunderstanding it.  The first 
 paragraph suggests that the code must meet each of the criteria; the second 
 suggests that as long as it's *closer* to meeting the required criteria, 
 it's fine.
 
 Maybe you can help me say it better. What I'm trying to get at is that
 150 functions is perfect to me, but if I only promise 30 functions and
 meet the criteria for each of them, then I can commit even though it
 is not perfect. Progress here is meeting the 4 points for each new
 function I push.

Okay, so every individual piece that's committed should meet the criteria.  I 
think that's the most sensible reading of what you wrote, but it also frightens 
me. I don't think that very much of our current code meets these criteria, and 
I'm worried that trying to enforce them is going to pull us into a sinkhole of 
no-new-functionality. I suppose that we should write down what we want before 
we figure out how to get there, though. 

As far as this piece text is concerned, I think I would replace that last 
sentence with essentially what you wrote in response:

 For example, I may be working on adding an exhaustive queue library to 
 Racket. I imagine supporting 30 different functions across 5 different queue 
 implementations, for a total of 150 functions.  If I have just 30 of these 
 documented, tested, and stressed, then it's fine for me to push.

 
John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Racket stuffs

2010-08-26 Thread John Clements

On Aug 26, 2010, at 2:51 PM, Eli Barzilay wrote:

 On Aug 17, Eli Barzilay wrote:
 So now I have these counts:
 
  http://tmp.barzilay.org/r1.png   4
  http://tmp.barzilay.org/r3.png   1
  http://tmp.barzilay.org/r4.png   2
 
 Update on this: the first version (r1 above) was by far the most
 popular one, and it's the one on the zazzle store now.  I just got a
 batch of round stickers (with and without urls) and bumper stickers,
 and they look very nice (and they're from before the minor adjustment
 to the url line).
 
 This is all at:
 
  http://www.zazzle.com/elibarzilay

Wait... seven dollars to ship a single bumper sticker!?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] stepper UI question

2010-08-26 Thread John Clements

On Aug 26, 2010, at 10:59 AM, Shriram Krishnamurthi wrote:

 Got it.  Thanks for all the inputs and for the great suggestion!


A couple of comments:

1) I could very well be mis-stating his position, but I think that Guillaume 
felt quite strongly that the reductions should occur in the definitions window. 
 Guillaume?

2) you describe showing steps only for non-definitions; that seems like a 
needless restriction.  Most definitions won't have steps, but those that do 
should probably be step-able. This will require at least some change to Robby's 
click on a result suggestion, since definitions don't currently produce 
output text. Perhaps this is why you (Robby?) suggested excluding these.

3) It's not clear how you want to handle test cases; they don't currently 
generate anything in the interactions window, and yet this sounds like the 
thing that you're *most* likely to want to be able to step.  For the sake of 
argument, let me propose something:

the result of generate-report (the hidden summary-generation call that 
check-expect inserts) should be a snip that shows up in the interactions 
window, called (e.g.) Test Report.  Clicking on this (right-clicking on 
this?) should open a window showing the test cases in some tabular format, 
indicating which ones succeeded and which ones failed.  Selecting one of these, 
the user could choose to see its steps. 

Additional hidden benefit of this structure: because of the syntactic 
fol-de-rol that surrounds test cases, it should be fairly easy in such a 
tabular window to also show those test cases that didn't get run at all, 
because an earlier one caused a runtime error.

Finally, we probably want to think a bit about what happens on a runaway 
computation.  The current stepper handles this reasonably; it would be nice if 
the user could step through these computations to see what went wrong.  Most of 
my initial thoughts on how to handle this require unpleasantly significant 
changes to the way that the interactions window works.


John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] stepper UI question

2010-08-26 Thread John Clements

On Aug 26, 2010, at 5:23 PM, Shriram Krishnamurthi wrote:

 I know Guillaume proposed to do it in the context of the editor.  I'm
 unconvinced that that's the right way to go.  At any rate, integrating
 into an existing bit of infrastructure (def'ns or inter's) is going to
 be much more complex than an off-line prototype that people can
 critique.  So we should do that regardless.
 
 You and Kathy raise good and interesting points.  This tells me that
 there is not yet a good answer to *where* the stepper should run.  I
 believe this is quite separable from *how* the stepper runs, ie, how
 it displays the sequence of expressions.  Since I feel that is
 currently the biggest problem with it, it seems wise that we focus on
 the latter for now.  Once we make some real progress on that
 high-order bit, we can see what percolates up.
 
 Do others agree that this is the high-order bit?  If not (and perhaps
 even if so), can you articulate why?

I do agree.  Your original message seemed to be entirely focused on the *where* 
question, which I think is why it's what we've all been discussing.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] drdrdown?

2010-08-28 Thread John Clements
Is DrDr down?  The latest build I see on drdr.racket-lang.org is from 
2010-08-25.

Apologies if I missed an announcement.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] parallel raco setup failing on Linux machine?

2010-09-01 Thread John Clements

On Sep 1, 2010, at 1:55 PM, John Clements wrote:

 I'm trying to run 'make install' on a Linux VPS, and it's halting -- at 
 different points -- with errors that look like this:
 
 ...
 raco setup: made: framework
 raco setup: made: browser/private
 raco setup: made: framework/private
 raco setup: made: games
 raco setup: made: graphics
 raco setup: made: graphics/scribblings
 raco setup: made: frtime (FrTime)
 raco setup: made: gui-debugger
 match: no matching clause for (list (list (cc '(#path:frtime) 
 #path:/home/clements/plt/collects/frtime frtime (FrTime) 
 #procedure:info? #path:/home/clements/plt/collects 
 #path:/home/clements/plt/collects/info-domain/compiled/cache.rktd '((lib 
 frtime) 1 0)) scribblings...
 
 === context ===
 /home/clements/plt/collects/racket/match/runtime.rkt:19:0: match:error
 /home/clements/plt/collects/setup/parallel-do.rkt:102:69
 /home/clements/plt/collects/setup/setup-unit.rkt:601:17: thunk
 
 make[1]: *** [install-3m] Error 1
 make[1]: Leaving directory `/home/clements/plt/src/build'
 make: *** [install] Error 2
 ESC]0;cleme...@li21-127: ~/plt/src/build^gcleme...@li21-127:~/plt/src/build$ 
 
 FWIW, this is today's commit 
 
 4c35af2eef7fe95efe89a465e221443b1b653702
 
 .

More info: the system log suggests that this is what happens when a process is 
killed for running out of memory (thanks, logcheck!). I'm guessing that the 
parallel build could observe and report this more transparently.

John

Here's the log, FWIW:

This email is sent by logcheck. If you no longer wish to receive
such mails, you can either deinstall the logcheck package or modify
its configuration file (/etc/logcheck/logcheck.conf).

System Events
=-=-=-=-=-=-=
Sep  1 16:41:58 li21-127 kernel: oom-killer: gfp_mask=0x201d2, order=0
Sep  1 16:41:58 li21-127 kernel:  [c014f979] out_of_memory+0x1c9/0x200
Sep  1 16:41:58 li21-127 kernel:  [c015172f] __alloc_pages+0x28f/0x310
Sep  1 16:41:58 li21-127 kernel:  [c0152af9] 
__do_page_cache_readahead+0x139/0x2f0
Sep  1 16:41:58 li21-127 kernel:  [c014a30d] __delayacct_blkio_end+0x2d/0x60
Sep  1 16:41:58 li21-127 kernel:  [c04e294b] __wait_on_bit_lock+0x5b/0x70
Sep  1 16:41:58 li21-127 kernel:  [c014bbc0] sync_page+0x0/0x60
Sep  1 16:41:58 li21-127 kernel:  [c014bbae] __lock_page+0x7e/0x90
Sep  1 16:41:58 li21-127 kernel:  [c014c812] filemap_nopage+0x2f2/0x3f0
Sep  1 16:41:58 li21-127 kernel:  [c015b504] __handle_mm_fault+0x1d4/0x18a0
Sep  1 16:41:58 li21-127 kernel:  [c014f217] mempool_free+0x77/0x90
Sep  1 16:41:58 li21-127 kernel:  [c033704a] elv_next_request+0x12a/0x210
Sep  1 16:41:58 li21-127 kernel:  [c01782f0] bio_endio+0x40/0x80
Sep  1 16:41:58 li21-127 kernel:  [c038e629] do_blkif_request+0x29/0x3c0
Sep  1 16:41:58 li21-127 kernel:  [c014f217] mempool_free+0x77/0x90
Sep  1 16:41:58 li21-127 kernel:  [c033c23d] blk_start_queue+0x6d/0xb0
Sep  1 16:41:58 li21-127 kernel:  [c038eb88] blkif_int+0x198/0x230
Sep  1 16:41:58 li21-127 kernel:  [c0112127] do_page_fault+0x797/0xbb8
Sep  1 16:41:58 li21-127 kernel:  [c0111990] do_page_fault+0x0/0xbb8
Sep  1 16:41:58 li21-127 kernel:  [c01055df] error_code+0x2b/0x30
Sep  1 16:41:58 li21-127 kernel: Mem-info:
Sep  1 16:41:58 li21-127 kernel: DMA per-cpu:
Sep  1 16:41:58 li21-127 kernel: cpu 0 hot: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: cpu 0 cold: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: cpu 1 hot: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: cpu 1 cold: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: cpu 2 hot: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: cpu 2 cold: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: cpu 3 hot: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: cpu 3 cold: high 0, batch 1 used:0
Sep  1 16:41:58 li21-127 kernel: DMA32 per-cpu: empty
Sep  1 16:41:58 li21-127 kernel: Normal per-cpu:
Sep  1 16:41:58 li21-127 kernel: cpu 0 hot: high 186, batch 31 used:28
Sep  1 16:41:58 li21-127 kernel: cpu 0 cold: high 62, batch 15 used:51
Sep  1 16:41:58 li21-127 kernel: cpu 1 hot: high 186, batch 31 used:109
Sep  1 16:41:58 li21-127 kernel: cpu 1 cold: high 62, batch 15 used:60
Sep  1 16:41:58 li21-127 kernel: cpu 2 hot: high 186, batch 31 used:16
Sep  1 16:41:58 li21-127 kernel: cpu 2 cold: high 62, batch 15 used:45
Sep  1 16:41:58 li21-127 kernel: cpu 3 hot: high 186, batch 31 used:178
Sep  1 16:41:58 li21-127 kernel: cpu 3 cold: high 62, batch 15 used:34
Sep  1 16:41:58 li21-127 kernel: HighMem per-cpu: empty
Sep  1 16:41:58 li21-127 kernel: Free pages:4908kB (0kB HighMem)
Sep  1 16:41:58 li21-127 kernel: Active:60124 inactive:60041 dirty:0 
writeback:0 unstable:0 free:1227 slab:3459 mapped:17 pagetables:902
Sep  1 16:41:58 li21-127 kernel: DMA free:2104kB min:88kB low:108kB high:132kB 
active:3612kB inactive:3500kB present:16384kB pages_scanned:11649 
all_unreclaimable? yes
Sep  1 16:41:58 li21-127 kernel: lowmem_reserve[]: 0 0 504 504
Sep  1 16:41:58 li21-127 kernel: DMA32 free:0kB min:0kB low:0kB high:0kB 
active

[racket-dev] match/fail*: re-inventing the wheel for better error messages with match?

2010-09-02 Thread John Clements
Match is fantastic, and sometimes you want finer control over the error 
messages. This morning I whipped up a match/fail* macro, which successively 
matches against a sequence of patterns, and allows you to specify a separate 
fail message for each layer.

It's a simple macro, and I give a use of it  (my use of it) below, followed by 
its simple definition.

FWIW, I *love* how check syntax shows the binding arrows from the pattern 
variables to the uses, outside of the defining clause.  

Is there something like this already in an existing library? If not, would this 
be useful to anyone?

John

p.s.: the use of syntax-parse in the definition of the macro was awesome, and 
produced at least one really nice error message for me.


;; first-line-checker : string - (or/c string symbol)
;; returns a string, indicating an error message, or 'success,
;; indicating success.
(provide first-line-checker)
(define (first-line-checker first-line)
  (match/fail* 'success
[(tokenize-string first-line) `(public ,rest ...) This function 
signature must begin with the word \public\.]
[rest `(,(? type-name? ty) ,rest ...) (format After the word public, you 
need a type name.)]
[ty int This function's return type must be \int\.]
[rest `(,pre ... ( ,args ... ) ,leftover ...) A function header must 
contain a pair of parentheses around the argument list.]
[leftover `() There shouldn't be anything after the right-paren (\)\).]
[pre `(,name) (if (empty? pre)
  There must be a function name between the type of the 
function and the argument list.
  The function name (a single word) is the only thing that 
comes between the type of the function and the argument list.)]
[name getApproxAge The name of the function should be \getApproxAge\.]
[args `(,arg1 ... , ,arg2 ...) You need a comma in the argument list to 
separate the two arguments.]
[arg1 `(,arg1ty ,arg1name) The first argument should consist of a type and 
a name (exactly two words).]
[arg1ty (? type-name? _) The first part of the first argument must be a 
type.]
[arg1ty int The first argument should be of type \int\.]
[arg1name birthYear The name of the first argument should be 
\birthYear\.]
[arg2 `(,arg2ty ,arg2name) The second argument should consist of a type 
and a name.]
[arg2ty (? type-name? _) The first part of the second argument must be a 
type.]
[arg2ty int The second argument should be of type \int\.]
[arg2name birthYear The name of the second argument should be 
\birthYear\.]))

;; the match/fail macro.  
;; A use of match/fail contains a single 'success' value
;; followed by a bunch of fail clauses.  Each fail clause
;; matches a value against a pattern and signals the given
;; error if it fails.  If it succeeds, it goes on to the 
;; next clause.  Note that pattern variables bound in each
;; pattern may be used in the remaining clauses.
(define-syntax (match/fail* stx)
  (define-syntax-class match/fail-clause
#:description match/fail clause
;; pat:expr *can't* be right here...
(pattern (val:expr pat:expr fail:expr)))
  
  (syntax-parse stx
[(_ retval) #'retval]
[(_ retval:expr clause:match/fail-clause more-clauses ...)
 #`(match clause.val 
 [clause.pat (match/fail* retval more-clauses ...)]
 [fail clause.fail])]))

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [racket-bug] all/11166: stepper index off by one

2010-09-07 Thread John Clements

On Sep 7, 2010, at 6:56 AM, mlsm...@cs.vassar.edu wrote:

 A new problem report is waiting at
  http://bugs.racket-lang.org/query/?cmd=viewpr=11166
 
 Reported by Marc Smith for release: 5.0.1
 
 *** Description:
 When stepping through a program in BSL, the stepper shows current progress, 
 e.g., 
 0/3, 1/3, 2/3
 But since the step numbers start at 0, the progress only goes to (n-1)/n, and 
 not n/n when the user has stepped through the entire program.
 I didn't notice this situation, but my students did during class, which 
 became their first lesson in 0-based indexing (for better or worse).
 Thanks! Marc

That was a deliberate choice, though I could be convinced that it was the wrong 
one; I think I was trying to mirror the behavior of the current search 
command.

Any other opinions?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Q. about live snips

2010-09-07 Thread John Clements
I'm writing code for beginners that produces sound values.  I'd like to 
render these values as snips that have a start and a stop button.  

My first experiment looked like this:

#lang racket

(require racket/gui)

(define f (make-object image-snip% 
/Users/clements/plt/collects/icons/mini-plt.xpm))

(define (g)
  (send f load-file /Users/clements/plt/collects/icons/j.gif))


This worked in the sense that the value was rendered graphically, but didn't 
work in the sense that calling (g) didn't change an already-displayed image. 
Viz:

inline: Screen shot 2010-09-07 at 3.37.28 PM.png 

This suggests to me that it would be hard to implement a sound-player-snip 
that updated itself to display its status.

My hope is that I'm wrong, and there's some easy way to make snips live in 
this sense.

Any help greatly appreciated.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Shared-instantiation modules

2010-09-10 Thread John Clements
Seems like a FAQ, but:

I want to associate a single sound player with a drscheme process.  When 
student code runs, it needs to send messages to that sound player.  I want to 
make sure there's only one running at a time.

The first thing that pops into my head is some kind of shared-require form, 
but I don't see such a thing.

The second thing that pops into my head is a tool; I understand how I can set 
up a tool so that it gets run only once at startup, and creates a value that 
gets associated with every DrRacket frame.  Unfortunately, I can't figure out 
the second part of the equation: how does a user program then connect to the 
DrRacket frame to get the value? I don't want to make the user click some extra 
button every time they run their program, and I *really* don't want to mess 
around with language levels and manipulating the user's source code.

Basically, I just want a process-level global value.  I must be missing 
something really obvious, here.

Thanks,

John





smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Shared-instantiation modules

2010-09-10 Thread John Clements

On Sep 10, 2010, at 8:17 PM, Eli Barzilay wrote:

 On Sep 10, Robby Findler wrote:
 FWIW, this is one path that tools can use to circumvent DrRacket's
 property (well, the property we work towards anyways) that no program
 can cause DrRacket itself to crash or freeze. So if you do provide
 things to the user's program in this manner, please try to keep that
 invariant in mind.
 
 Actually, for John's case I think that what he really needs is to be
 able to break more than just drracket...  There was a plan at some
 point to have a single process-global hash table which he'd be able to
 use for cases where some external resource is concerned -- and this
 sounds like what is really needed here.  For example, he'll need it if
 he wants to make sounds at syntax time.  [This is also related to some
 huge and bloody flamewar on c.l.s a few years ago, re the ability to
 implement IO buffering in racket.]

Sounds at syntax time

:)

I certainly hadn't thought about that, and it seems unlikely that my 
first-quarter students will be clamoring for it, either.

Nevertheless, it's true that a process-global hash table for external resources 
is more or less what I was thinking about.

The question is (for the moment) moot, though, because it looks like the tool 
interface does everything I need.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] rename + changes = bad? (was: Fwd: [plt] Push #21110: master branch updated)

2010-09-17 Thread John Clements
Oof... it looks like doing a rename plus a few changes pretty effectively hides 
those changes, though I can dig them out with 'git annotate'.  Do we have a 
policy (or should we have) a policy stating that you shouldn't put a rename and 
modifications to that file in the same commit?

John

Begin forwarded message:

 From: cleme...@racket-lang.org
 Date: September 17, 2010 10:19:37 AM PDT
 To: dev@racket-lang.org
 Subject: [plt] Push #21110: master branch updated
 
 clements has updated `master' from 04defa4937 to a095ebc326.
  http://git.racket-lang.org/plt/04defa4937..a095ebc326
 
 =[ 1 Commits ]==
 
 Directory summary:
 100.0% collects/test-engine/
 
 ~~
 
 a095ebc John Clements cleme...@racket-lang.org 2010-09-17 10:18
 :
 | added format arg to printf to avoid corner-case printf bugs, rackety changes
 :
  M collects/test-engine/racket-tests.rkt |2 +-
  M collects/test-engine/test-display.scm |2 +-
  R collects/test-engine/{test-engine.scm = test-engine.rkt} (99%)
 
 =[ Overall Diff ]===
 
 collects/test-engine/racket-tests.rkt
 ~
 --- OLD/collects/test-engine/racket-tests.rkt
 +++ NEW/collects/test-engine/racket-tests.rkt
 @@ -5,7 +5,7 @@
  scheme/match
lang/private/continuation-mark-key
  (only scheme/base for memf findf)
 - test-engine.scm
 + test-engine.rkt
test-info.scm
  )
 
 
 collects/test-engine/test-display.scm
 ~
 --- OLD/collects/test-engine/test-display.scm
 +++ NEW/collects/test-engine/test-display.scm
 @@ -6,7 +6,7 @@
  framework
  string-constants
  test-info.scm
 - test-engine.scm
 + test-engine.rkt
print.ss
(except-in deinprogramm/signature/signature signature-violation) ; 
 clashes with test-engine
deinprogramm/quickcheck/quickcheck)
 
 *** See above for renames and copies ***



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] rename + changes = bad? (was: Fwd: [plt] Push #21110: master branch updated)

2010-09-17 Thread John Clements

On Sep 17, 2010, at 11:03 AM, Sam Tobin-Hochstadt wrote:

 On Fri, Sep 17, 2010 at 1:36 PM, John Clements
 cleme...@brinckerhoff.org wrote:
 Oof... it looks like doing a rename plus a few changes pretty effectively 
 hides those changes, though I can dig them out with 'git annotate'.  Do we 
 have a policy (or should we have) a policy stating that you shouldn't put a 
 rename and modifications to that file in the same commit?
 
 I believe that this is an issue with Eli's email formatting script,
 and not with git itself (the github diff is fine:
 http://github.com/plt/racket/commit/a095ebc326aa35b5b19f314080855db5d55ed49b

Github seems to do a better job than 'git diff' or 'git show' with these; both 
of these simply showed me an entire file of lines added and an entire file of 
lines deleted.

John




smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] speeding up 16-bit integer adds

2010-09-23 Thread John Clements
I'm trying to add together big buffers. The following code creates two big fat 
buffers of 16-bit integers, and adds them together destructively. It looks to 
me like this code *could* run really fast, but it doesn't; this takes about 8.5 
seconds. Changing + to unsafe-fx+ has no detectable effect.  Is there 
allocation going on in the inner loop? I'd hoped that since an _sint16 fits 
safely in 31 bits, that no memory would be allocated in the inner loop. Grr! 
Any suggestions? (I ran a similar test on floats, and C ran about 64x faster, 
about a tenth of a second).

Doc pointers appreciated as always,

John

#lang racket 

(require ffi/unsafe)

(define (make-buffer-of-small-random-ints len)
  (let ([buf (malloc _sint16 len)])
(for ([i (in-range len)])
  (ptr-set! buf _sint16 i 73))
buf))

(define buf-len (* 44100 2 200))

(define b1 (make-buffer-of-small-random-ints buf-len))
(define b2 (make-buffer-of-small-random-ints buf-len))

(time
 (for ([i (in-range buf-len)])
   (ptr-set! b1 _sint16 i 
 (+ (ptr-ref b1 _sint16 i)
(ptr-ref b2 _sint16 i)

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] speeding up 16-bit integer adds

2010-09-23 Thread John Clements

On Sep 23, 2010, at 7:55 PM, Matthew Flatt wrote:

 I think the problem is that the `ptr-ref' and `ptr-set!' operations are
 slow. They are slow because they not yet inlined by the JIT, and
 they're not yet inlined because they have complicated APIs (including a
 pointer datatype with many variants).
 
 I haven't worked out a way to make them faster or a way to provide
 faster variants, but it's on my list.

Okay, thanks.  FWIW, my attempt to use the s16vector variants performs 
similarly; perhaps these primitives call the same code.

John Clements
 

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] speeding up 16-bit integer adds

2010-09-23 Thread John Clements

On Sep 23, 2010, at 8:16 PM, Matthew Flatt wrote:

 One more thought: Do you get to pick whether you use 16-bit integers or
 64-bit floating-point numbers? The `flvector-' and `f64vector-'
 operations are inlined by the JIT and recognized for unboxing, so using
 flonum vectors and operations could be much faster than using raw
 pointers and 16-bit integers.

Well, that's an option, albeit a somewhat unappetizing one; as the 44100 in my 
code no doubt signaled, I'm reading and writing sound data here, and both 
16-bit ints and 32-bit floats are fairly common. 64-bit floats will be another 
factor of 2 in memory, for a total of 42 megabytes per minute.

I ran some tests, using flvectors and unsafe operations everywhere. (Code 
below.)

My tests called for 400 seconds of audio, or 282 Megabytes, and this made 
DrRacket flustered.  Restarting and running with half that size yielded (quite 
variable) times between 1 and 3 seconds, so that appears about twice as fast as 
the fixed-point one.

I'm tempted to write a little C code, but then of course I have to compile it 
separately for every darn platform.

Thanks again for your help,

John


#lang racket

(require ffi/unsafe
 racket/flonum
 racket/unsafe/ops)

(define (make-buffer-of-small-randoms len)
  (let ([buf (make-flvector len)])
(for ([i (in-range len)])
  (unsafe-flvector-set! buf i 0.73))
buf))

(define buf-len (* 44100 2 100))

(define b1 (make-buffer-of-small-randoms buf-len))
(define b2 (make-buffer-of-small-randoms buf-len))

(time
 (for ([i (in-range buf-len)])
   (unsafe-flvector-set! b1 i
 (unsafe-fl+ (unsafe-flvector-ref b1 i)
 (unsafe-flvector-ref b2 i)

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] speeding up 16-bit integer adds

2010-09-23 Thread John Clements

On Sep 23, 2010, at 9:46 PM, John Clements wrote:

 
 On Sep 23, 2010, at 8:16 PM, Matthew Flatt wrote:
 
 One more thought: Do you get to pick whether you use 16-bit integers or
 64-bit floating-point numbers? The `flvector-' and `f64vector-'
 operations are inlined by the JIT and recognized for unboxing, so using
 flonum vectors and operations could be much faster than using raw
 pointers and 16-bit integers.
 
 Well, that's an option, albeit a somewhat unappetizing one; as the 44100 in 
 my code no doubt signaled, I'm reading and writing sound data here, and both 
 16-bit ints and 32-bit floats are fairly common. 64-bit floats will be 
 another factor of 2 in memory, for a total of 42 megabytes per minute.
 
 I ran some tests, using flvectors and unsafe operations everywhere. (Code 
 below.)

Update before going to bed; re-running the C tests with doubles everywhere and 
the same setup (simply adding together two big buffers) took about half a 
second, so in fact in this instance Racket is less that 10x slower, which is as 
fast as I would expect it to be.  So basically, it sounds like the flvectors 
are the way to go, if I can stomach the memory usage.

Thanks again,

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] File is really large ( 5 MB), really open?

2010-09-26 Thread John Clements
I accidentally opened a sound file in DrRacket today; cue six minutes of 
thrashing and computer unhappiness.  Would it be okay if I added a second-check 
dialog to DrRacket that checked the size of a file before opening it, and asked 
for confirmation before opening files larger than, say, 5MB? 

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] u8vector-cpointer documented but unimplemented

2010-09-26 Thread John Clements
The function u8vector-cpointer is documented, but doesn't exist; this is 
presumably because the u8vector functions are actually byte-string functions, 
but it's not clear to me whether the absence of u8vector-cpointer is an 
oversight or whether it would violate abstractions in bad ways and hence simply 
shouldn't exist.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] File is really large ( 5 MB), really open?

2010-09-26 Thread John Clements

On Sep 26, 2010, at 9:58 PM, Jake Eakle wrote:

 I would humbly suggest that this dialog should, in order of ease-to-implement
 
 a) display the size of the file,
 b) let the user know why they might not wish to proceed, and
 c) give some indication of how much memory they should probably have in order 
 to expect reasonable performance.

Sounds good to me: go for it!

John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] safe version of racket/unsafe/ops?

2010-09-27 Thread John Clements
I'm sure I'm just missing something obvious here, but is there a library that 
provides things like unsafe-vector-length that are actually references to the 
safe versions? I have a core dump occurring in (someone else's) unsafe code, 
and I'd much rather just import a different library than go through and take 
out the unsafe everywhere.  I know that TR has such a library (mutatis 
mutandis).  If it doesn't already exist, could I create 

racket/unsafe/safe-ops

?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] safe version of racket/unsafe/ops?

2010-09-27 Thread John Clements

On Sep 27, 2010, at 3:45 PM, Robby Findler wrote:

 How about prefix-in with unsafe- as the prefix?

You still have to specify the right set of functions, right? But yes, that's 
all I'm thinking of.

John

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [plt] Push #21156: master branch updated

2010-09-28 Thread John Clements

On Sep 28, 2010, at 8:23 AM, Eli Barzilay wrote:

 Can we please not have this??  The whole point of having uniform names
 is that you can use require/provide things easily so there's no need
 for a library.

Sure, I don't feel strongly about it.  Done.

To be clear, my use case is this: I'm trying to debug a seg fault in a large 
library, with 500 uses of 'unsafe-' operators.  I want to see whether using 
the corresponding safe variants eliminates the crash.  The global search and 
replace is a bit of a pain; replacing racket/unsafe/ops with 
racket/unsafe/safe-ops is much easier.

Naturally, though, you can always roll your own as needed.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [plt] Push #21156: master branch updated

2010-09-28 Thread John Clements

On Sep 28, 2010, at 10:09 AM, Eli Barzilay wrote:

 An hour ago, John Clements wrote:
 
 On Sep 28, 2010, at 8:23 AM, Eli Barzilay wrote:
 
 Can we please not have this??  The whole point of having uniform names
 is that you can use require/provide things easily so there's no need
 for a library.
 
 Sure, I don't feel strongly about it.  Done.
 
 Thanks(!)
 
 I should have clarified further -- what we have at the momemt is a
 consisten use of an unsafe part in the path for potentially
 segfaulting functionality.  So having some unsafe/safe thing doesn't
 make much sense (and begs the question about undebugging some things
 with unsafe/safe/unsafe).
 
 In any case, I think that something that would have made you happier
 is for the `unsafe/foo' libraries to provide the same name as the safe
 ones.  This way you'd only need to toggle the `unsafe/' prefix on or
 off.  (I'd like that change too, but we're probably deep enough in the
 current setup to change that...)

I thought about this, but I really like the current setup, where the 
unsafe-ness must be indicated at the use of the function.  I think this is 
especially true of common primitives like vector-length.  If I were debugging 
a piece of code, it would never occur to me that an ordinary-looking call to 
'vector-length' might actually be unsafe.

 
 
 To be clear, my use case is this: I'm trying to debug a seg fault in
 a large library, with 500 uses of 'unsafe-' operators.  I want to
 see whether using the corresponding safe variants eliminates the
 crash.  The global search and replace is a bit of a pain; replacing
 racket/unsafe/ops with racket/unsafe/safe-ops is much easier.
 
 Naturally, though, you can always roll your own as needed.
 
 First, I think that what was suggested earlier should work -- changing
 this:
 
  (require unsafe/foo)
  -
  (require (prefix-in unsafe- foo))

This doesn't work for (require racket/unsafe/ops); that's why I wanted to add 
it.

 
 But the more common use case (which I've done in a number of places)
 is to use `foo' first, make sure the code runs and write a ton of
 tests, then turn the require into one that *drops* the `unsafe-'
 prefix.

This frightens me, for the reasons I describe above.

 
 A slightly different approach is in `racket/private/sort' -- define
 names that are used throughout, and switch the definition from a safe
 one to an unsafe one.

That sounds like what you described before, though perhaps I'm not 
understanding you.


John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] random-access file reading

2010-09-28 Thread John Clements
I want to read a chunk from the middle of a 50-megabyte file.  As far as I can 
see, there are no random-access file primitives currently in DrRacket.  Also, I 
don't see a skip-bytes, so it looks like I should be allocating a junk buffer 
and then repeatedly calling read-bytes to read the skipped portion into the 
junk buffer.  

Tell me if there's a simpler way to do this; doc pointers always appreciated.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Racket runs on 64-bit ubuntu, right?

2010-10-05 Thread John Clements
I have a student who hasn't succeeded in running compiled-from-source DrRacket 
on 64-bit ubuntu.  Specifically, he claims it dumps core with


SIGSEGV MAPERR si_code 1 fault on addr 0x4
Aborted


on startup.  I have *not* tried to verify this myself, so he's almost certainly 
made a minor mistake.  I'm writing this just in case one of you has a knee-jerk 
oh yeah, that doesn't work  to give me.  Otherwise, please ignore this e-mail.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] single-instantiation trick: kludgy workaround for planet packages?

2010-10-05 Thread John Clements
A couple of weeks ago, you showed me the trick that rackunit uses to allow 
single-instantiation of a modules.  I'm now trying to do this
for a planet package, and it looks like I have to change the required module 
from being a relative to being an absolute path.  That is:

(require (prefix-in drlink: private/drracket-link))

must become

(require (prefix-in drlink: (planet drracket-link.rkt (clements 
rsound.plt) private)))

This works, but seems extremely fragile.  Does it make sense to you that this 
would be required?  Without it, I get the error below:


namespace-attach-module: unknown module (in the source namespace): 
#resolved-module-path:/Users/clements/clements/planet-collects/rsound/private/drracket-link.rkt

 === context ===
/Users/clements/plt/collects/drracket/private/rep.rkt:1660:6: 
initialize-console method in ...cket/private/rep.rkt:508:4
/Users/clements/plt/collects/drracket/private/unit.rkt:4755:4: 
create-new-drscheme-frame
/Users/clements/plt/collects/drracket/private/main.rkt:663:0: make-basic
/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]


semi-happy,

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] single-instantiation trick: kludgy workaround for planet packages?

2010-10-05 Thread John Clements

On Oct 5, 2010, at 3:25 PM, Ryan Culpepper wrote:

 I seem to have mangled my response right before sending it. Here it is again, 
 hopefully straightened out.
 
 On 10/05/2010 03:59 PM, John Clements wrote:
 A couple of weeks ago, you showed me the trick that rackunit uses to allow 
 single-instantiation of a modules.  I'm now trying to do this
 for a planet package, and it looks like I have to change the required module 
 from being a relative to being an absolute path.  That is:
 
 (require (prefix-in drlink: private/drracket-link))
 
 I assume (hope) you meant
  (require (prefix-in drlink: private/drracket-link.rkt))
 
 for the relative require.

yes, of course. My mistake.

 must become
 
 (require (prefix-in drlink: (planet drracket-link.rkt (clements 
 rsound.plt) private)))
 
 This works, but seems extremely fragile.  Does it make sense to you that 
 this would be required?  Without it, I get the error below:
 
 From what I recall, the call to namespace-module-attach must use the correct 
 absolute module path, but the require can be relative. I confirmed that 
 that's how the last PLaneT version of schemeunit that included the tool 
 (version (2 12)) did it.
 
 It looks like you're using a PLaneT development link. Perhaps that's the 
 source of the problem?
 
 How about dropping the following code into drracket-link.rkt so it prints out 
 its (absolute) resolved module path when it gets required from the tool.
 
  (eprintf drracket-link.rkt = ~s\n
   (resolved-module-path-name
(variable-reference-resolved-module-path
 (#%variable-reference

wait... isn't that part of the error message I attached earlier?  Viz:


namespace-attach-module: unknown module (in the source namespace): 
#resolved-module-path:/Users/clements/clements/planet-collects/rsound/private/drracket-link.rkt

=== context ===
/Users/clements/plt/collects/drracket/private/rep.rkt:1660:6: 
initialize-console method in ...cket/private/rep.rkt:508:4
/Users/clements/plt/collects/drracket/private/unit.rkt:4755:4: 
create-new-drscheme-frame
/Users/clements/plt/collects/drracket/private/main.rkt:663:0: make-basic
/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]



John 
 ;; --
 
 Another thing to consider, if you're going to be distributing this code via 
 PLaneT, is that users will have to restart DrRacket after installing the 
 package so the tool can take effect.
 
 Ryan



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] no symlinks in planet links (was: Re: single-instantiation trick: kludgy workaround for planet packages?)

2010-10-06 Thread John Clements

On Oct 5, 2010, at 7:37 PM, Ryan Culpepper wrote:

 John Clements wrote:
 On Oct 5, 2010, at 3:25 PM, Ryan Culpepper wrote:
 
 It looks like you're using a PLaneT development link. Perhaps that's the 
 source of the problem?
 
 How about dropping the following code into drracket-link.rkt so it prints 
 out its (absolute) resolved module path when it gets required from the tool.
 
 (eprintf drracket-link.rkt = ~s\n
  (resolved-module-path-name
   (variable-reference-resolved-module-path
(#%variable-reference
 wait... isn't that part of the error message I attached earlier?  Viz:
 namespace-attach-module: unknown module (in the source namespace): 
 #resolved-module-path:/Users/clements/clements/planet-collects/rsound/private/drracket-link.rkt
 
 No, that's based on the absolute module path you passed to namespace-attach 
 module.
 
 What I'm wondering about is, when you use the relative require, what does the 
 module think its resolved module path is. That's what the expression above is 
 designed to show.

Fooey.  Okay, here's what I get:

pcp062719pcs:~/git-clements clements$ drracket-link.rkt = 
#path:/Users/clements/git-clements/clements/planet-collects/rsound/private/drracket-link.rkt
namespace-attach-module: unknown module (in the source namespace): 
#resolved-module-path:/Users/clements/clements/planet-collects/rsound/private/drracket-link.rkt

...

The difference between these is a symbolic link from ~/clements/planet-collects 
to ~/git-clements/clements/planet-collects.

 aaand, sure enough, re-creating the link using a fully-expanded path 
solves this problem.

So, it looks like planet is broken wrt planet-links containing symbolic links.  
Maybe you could solve this by just putting a fully-expand-path-mumble somewhere 
very early in the signal chain? ... Hmm, actually that might not be such a 
great idea; you break the abstraction of the symbolic link from the standpoint 
of the user.

Thanks!

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Racket runs on 64-bit ubuntu, right?

2010-10-07 Thread John Clements

On Oct 5, 2010, at 10:37 AM, Kevin Tew wrote:

 I build on 64bit ubuntu every day.
 a gdb backtrace would be helpful.
 
 gdb handle SIGSEGV nostop noprint
 gdb run
 
 Kevin

I finally got a reply from the student. Here's what he said:

 Ok, sorry this took so long, but I had to do the ritual restoring of grub 
 after installing windoze.
 
 The contents of the terminal: I highlighted my input, and also the error I 
 get when I try just running drracket.
 
 
 Note; I did not run a backtrace on drracket, but gracket, which drracket 
 links to. When I tried to run a backtrace on drracket it said it was not an 
 executable, so I read the contents of drracket and it just links to gracket. 
 
 tm...@brutus:~$ gdb /home/tmill/racket/plt-5.0.1.7/bin/gracket
 GNU gdb (GDB) 7.2-ubuntu
 Copyright (C) 2010 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show copying
 and show warranty for details.
 This GDB was configured as x86_64-linux-gnu.
 For bug reporting instructions, please see:
 http://www.gnu.org/software/gdb/bugs/...
 Reading symbols from /home/tmill/racket/plt-5.0.1.7/bin/gracket...done.
 (gdb) handle SIGSEGV nostop noprint
 SignalStopPrintPass to programDescription
 SIGSEGV   NoNoYesSegmentation fault
 (gdb) run
 Starting program: /home/tmill/racket/plt-5.0.1.7/bin/gracket 
 [Thread debugging using libthread_db enabled]
 [New Thread 0x746d7710 (LWP 8906)]
 SIGSEGV MAPERR si_code 1 fault on addr 0x4
 
 Program received signal SIGABRT, Aborted.
 0x75e72ba5 in raise (sig=value optimized out)
 at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 64../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
 in ../nptl/sysdeps/unix/sysv/linux/raise.c
 
 From Tony

This sure doesn't *look* like the font issue that Matthew mentioned

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Racket runs on 64-bit ubuntu, right?

2010-10-07 Thread John Clements

On Oct 7, 2010, at 3:25 PM, Kevin Tew wrote:

 I should have added that the student also needs to type
 gdb backtrace
 to get a full backtrace.
 
 a full backtrace will be more informative.

Duh, yes.  

Here's the student's backtrace.  And yes, I now see that it *does* look like 
the font issue that Matthew mentioned.  Are there any known workarounds? Add 
fonts? Remove fonts? Move to a different font manager?

John

cc: Tony Miller

(gdb) bt
#0  0x75e72ba5 in raise (sig=value optimized out)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x75e766b0 in abort () at abort.c:92
#2  0x0074b84b in fault_handler (sn=2201, si=0xaf26f0, ctx=0x6)
at ../../../racket/gc2/sighand.c:93
#3  signal handler called
#4  0x77e5838e in XF86DRIQueryVersion () from /usr/lib/fglrx/libGL.so.1
#5  0x77e58529 in XF86DRIQueryExtension ()
   from /usr/lib/fglrx/libGL.so.1
#6  0x77e57e3c in ?? () from /usr/lib/fglrx/libGL.so.1
#7  0x77e3751f in ?? () from /usr/lib/fglrx/libGL.so.1
#8  0x77e338d1 in ?? () from /usr/lib/fglrx/libGL.so.1
#9  0x77e33aae in glXChooseVisual () from /usr/lib/fglrx/libGL.so.1
#10 0x004adbce in GetWindowVisual (cfg=0x72dfb850,
offscreen=0 '\000')
at ../../../gracket/gc2/../../wxxt/src/DeviceContexts/WindowDC.cc:3459
#11 0x004ae725 in wxGetGLCanvasVisual (cfg=0x0)
at ../../../gracket/gc2/../../wxxt/src/DeviceContexts/WindowDC.cc:3576
#12 0x004a3963 in wxCanvas::Create (this=value optimized out, panel=
0x731ea9c0, x=value optimized out, y=value optimized out,
width=30, height=30, style=67240064, name=0x72dfb178 , gl_cfg=0x0)
at ../../../gracket/gc2/../../wxxt/src/Windows/Canvas.cc:146
#13 0x004a3e75 in wxCanvas::gcInit_wxCanvas (
---Type return to continue, or q return to quit---
this=value optimized out, parent=0x731ea9c0, x=-1, y=-1,
width=value optimized out, height=value optimized out, style=67240064,
name=0x72dfb178 , gl_cfg=0x0)
at ../../../gracket/gc2/../../wxxt/src/Windows/Canvas.cc:61
#14 0x004cd2dc in os_wxCanvas_ConstructScheme (n=9, p=0x73b94d18)
at ../../../gracket/gc2/../wxs/wxs_cnvs.cxx:1396
#15 0x005675db in scheme_do_eval (obj=0x73b26d68, num_rands=9,
rands=0x73b94d18, get_value=1)
at ../../../racket/gc2/../src/eval.c:9225
#16 0x77ff5c19 in ?? ()
#17 0x7fffbd60 in ?? ()
#18 0x752f4778 in ?? ()
#19 0x7fffb338 in ?? ()
#20 0x0009 in ?? ()
#21 0x0007 in ?? ()
#22 0x73b94de8 in ?? ()
#23 0x71bb2bb0 in ?? ()
#24 0x73b94d30 in ?? ()
#25 0x7fffb3b0 in ?? ()
#26 0x731335fa in ?? ()
#27 0x00620370 in ?? () at ../../../racket/gc2/../src/list.c:1219
#28 0x73ea5b2d in ?? ()
#29 0x7fffbd60 in ?? ()
---Type return to continue, or q return to quit---
#30 0x752f4778 in ?? ()
#31 0x7fffb398 in ?? ()
#32 0x7fffb368 in ?? ()
#33 0x0007 in ?? ()
#34 0x73b95018 in ?? ()
#35 0x72abf488 in ?? ()
#36 0x73b94db8 in ?? ()
#37 0x7fffb410 in ?? ()
#38 0x731335fa in ?? ()
#39 0x7fffb410 in ?? ()
#40 0x70ae05b0 in ?? ()
#41 0x7fffbd60 in ?? ()
#42 0x752f4778 in ?? ()
#43 0x in ?? ()




smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Racket runs on 64-bit ubuntu, right?

2010-10-13 Thread John Clements

On Oct 7, 2010, at 4:45 PM, Matthew Flatt wrote:

 At Thu, 7 Oct 2010 16:23:33 -0700, John Clements wrote:
 Here's the student's backtrace.  And yes, I now see that it *does* look like 
 the font issue that Matthew mentioned.
 
 Actually, this looks more like an OpenGL issue. I don't have any
 immediate ideas, but that's a new lead.
 
 
 #4  0x77e5838e in XF86DRIQueryVersion () from 
 /usr/lib/fglrx/libGL.so.1
 #5  0x77e58529 in XF86DRIQueryExtension ()
   from /usr/lib/fglrx/libGL.so.1
 #6  0x77e57e3c in ?? () from /usr/lib/fglrx/libGL.so.1
 #7  0x77e3751f in ?? () from /usr/lib/fglrx/libGL.so.1
 #8  0x77e338d1 in ?? () from /usr/lib/fglrx/libGL.so.1
 #9  0x77e33aae in glXChooseVisual () from /usr/lib/fglrx/libGL.so.1
 #10 0x004adbce in GetWindowVisual (cfg=0x72dfb850,
offscreen=0 '\000')
at ../../../gracket/gc2/../../wxxt/src/DeviceContexts/WindowDC.cc:3459

Thanks for your help. Tony now reports:

On Oct 13, 2010, at 10:00 PM, amille49 wrote:

 DrRacket runs fine now for me on 64 Bit Ubuntu. I just did a clean
 install. I had been getting seg faults and the culprit seems to be my
 graphics driver which was all messed up.


John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] question about your change to run-teaching-languages.rkt

2010-10-14 Thread John Clements
Back on October 11, you made a change to run-teaching-languages.rkt that works 
absolutely fine with the stepper.

...but it breaks the stepper's testing harness. Ugh.  The problem, IIUC, is 
that the expansion of the teaching-language programs refer to a module, 
test-engine/racket-tests, that doesn't actually exist at 
plt/collects/test-engine, and is instead dynamically associated with the 
namespace by DrRacket before running the student program.  That is, IIUC. So, 
in order for the command-line racket tests to run correctly, they must also 
attach that module to the evaluation namespace.  Unfortunately, my ham-fisted 
attempt to add this to the test harness:

(namespace-attach-module outer-namespace 'test-engine/racket-tests 
(current-namespace))

... didn't work.  Actually, I was intrigued by the change.  It changed failures 
like this:

test-sequence: steps do not match
   given: #(struct:error-result require: namespace mismatch; reference (phase 
0) to a module \/Users/clements/plt/collects/test-engine/racket-tests.rkt\ 
that is not available (phase level 0))
expected: (before-after ((hilite (cond (true 3) (else (and true true) 
((hilite 3)))

... into errors like this:

test-sequence: steps do not match
   given: #(struct:error-result link: module mismatch, probably from old 
bytecode whose dependencies have changed: variable not provided (directly or 
indirectly) from module: 
\/Users/clements/plt/collects/test-engine/racket-tests.rkt\ accessed from 
module: 'stepper-module-name-18307 at source phase level: 0)
expected: (before-after ((if (hilite (if true false true)) false true)) ((if 
(hilite false) false true)))

I tried some light deleting of .zo files, but I strongly suspect that the real 
problem here is that somehow the version of test-engine/racket-tests attached 
to racket's default namespace--apparently it exists? or namespace-attach-module 
would give an error, right?--is different from the one attached to the teaching 
languages evaluation namespace.

I think the next step for me(after maybe a clean setup) is to start grepping 
through the drracket code for instances of test-engine/racket-tests, but if you 
can shed any light on the situation, I'm all ears.

Thanks!

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] expected timing difference between fft-complex-forward and fft-complex-radix2-forward?

2010-10-14 Thread John Clements
On a vector of length 8192 (a power of 2, natch), fft-complex-radix2-forward 
takes about 1/8 of a second (lost in the noise, essentially), but 
fft-complex-forward takes more than 24 seconds, a difference of about 200x.  
They do produce the same answers, up to differences of 1e-4 in the magnitude 
(didn't check the phase).

1) Is this expected? I thought the non-radix2 one was still fairly clever about 
subdividing when the number of points is divisible by 2.
2) If so, would it make sense to test for powers of 2?

John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] expected timing difference between fft-complex-forward and fft-complex-radix2-forward?

2010-10-18 Thread John Clements

On Oct 18, 2010, at 9:25 AM, Doug Williams wrote:

 When I first ran with vectors of 8192, I got exactly the opposite - the 
 radix-2 version was much slower (although still  500ms). But, when I looked, 
 the longer time was almost exclusively GC - it just happen to hit that 
 particular call. When I put a (collect-garbage) before each call, they were 
 all  50ms on my machine. So, the GC penalty is likely what you're seeing.
 
 The other thing is to make sure you aren't calling one of the dft routines 
 instead of the fft routines. Those are the only ones that get anywhere near 
 24s on my machine - they are about 20s on my machine. The dft routines are 
 the 'straight' mathematical discrete Fourier transform and do not use the FFT 
 algorithms at all. [They're really only useful for a sanity check on results.]

Right, got it. No, the times I'm seeing are not GC.  I bumped it up to an 
8192-point fft, and now the radix-2 version is about 400x faster.

Here's my code:

#lang racket

(require (planet clements/rsound/fft))

(define v (build-vector 16384 (lambda (i) (random

(define v1 (vector-copy v))

(collect-garbage)
(collect-garbage)
(collect-garbage)
(time (fft-complex-radix2-forward v1))
  
(define v2 (vector-copy v))

(collect-garbage)
(collect-garbage)
(collect-garbage)
(time (fft-complex-forward v2))

(for/and ([i (in-range (vector-length v))])
  ( (magnitude (- (vector-ref v1 i) (vector-ref v2 i))) 1e-4))

=

cpu time: 208 real time: 211 gc time: 0
cpu time: 81357 real time: 82502 gc time: 8337
#t

John Clements

 On Thu, Oct 14, 2010 at 4:34 PM, John Clements cleme...@brinckerhoff.org 
 wrote:
 On a vector of length 8192 (a power of 2, natch), fft-complex-radix2-forward 
 takes about 1/8 of a second (lost in the noise, essentially), but 
 fft-complex-forward takes more than 24 seconds, a difference of about 200x.  
 They do produce the same answers, up to differences of 1e-4 in the magnitude 
 (didn't check the phase).
 
 1) Is this expected? I thought the non-radix2 one was still fairly clever 
 about subdividing when the number of points is divisible by 2.
 2) If so, would it make sense to test for powers of 2?
 
 John Clements
 
 



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] expected timing difference between fft-complex-forward and fft-complex-radix2-forward?

2010-10-19 Thread John Clements

On Oct 19, 2010, at 5:17 AM, Doug Williams wrote:

 On my laptop:
 
 #lang racket
 
 (require fft.rkt)
 
 (define v (build-vector 16384 (lambda (i) (random
 
 (define v1 (vector-copy v))
 
 (collect-garbage)
 (collect-garbage)
 (collect-garbage)
 (time (fft-complex-radix2-forward v1))
 
 (define v2 (vector-copy v))
 
 (collect-garbage)
 (collect-garbage)
 (collect-garbage)
 (time (fft-complex-forward v2))
 
 (for/and ([i (in-range (vector-length v))])
  ( (magnitude (- (vector-ref v1 i) (vector-ref v2 i))) 1e-4))
 
 ==
 
 cpu time: 94 real time: 94 gc time: 0
 cpu time: 79 real time: 78 gc time: 0
 #t
 
 I'll look at the rsound/fft implementation and see if I see the problem.

It certainly sounds as though I broke it, or it changed after I got it.  Has 
the source changed since you sent it to me last year?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] internal definitions stepper

2010-10-19 Thread John Clements

On Oct 19, 2010, at 5:33 AM, Michael Sperber wrote:

 
 Robby Findler ro...@eecs.northwestern.edu writes:
 
 How recently did the change come in that allows internal definitions
 all over the place? And how broken did this make the stepper?
 
 Pretty broken: There are now (let () ...)s all over the place.
 
 (I've sent separate e-mail to John and Matthew.)

? I don't see that e-mail.  That may not be important.

Re: fixing stepper failures: I'm guessing that these failures have been hidden 
by the test-only bug that's prevented the drdr tests from running on the 
stepper for the last week.  I'm hoping that the build that's currently 
preventing me from typing rapidly will also allow me to run the main test suite 
manually and see what's broken.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] internal definitions stepper

2010-10-19 Thread John Clements

On Oct 19, 2010, at 8:56 AM, John Clements wrote:

 
 On Oct 19, 2010, at 5:33 AM, Michael Sperber wrote:
 
 
 Robby Findler ro...@eecs.northwestern.edu writes:
 
 How recently did the change come in that allows internal definitions
 all over the place? And how broken did this make the stepper?
 
 Pretty broken: There are now (let () ...)s all over the place.
 
 (I've sent separate e-mail to John and Matthew.)
 
 ? I don't see that e-mail.  That may not be important.
 
 Re: fixing stepper failures: I'm guessing that these failures have been 
 hidden by the test-only bug that's prevented the drdr tests from running on 
 the stepper for the last week.  I'm hoping that the build that's currently 
 preventing me from typing rapidly will also allow me to run the main test 
 suite manually and see what's broken.

Pflug. The two flavors of test suite (command-line and interactive) are broken 
in *different* ways as a result of recent changes to the testing engine.  

In the interest of getting this fixed quickly, I'm going to describe these, 
just in case anyone has suggestions.

1) The command-line tests fail like this:

   given: #(struct:error-result require: namespace mismatch; reference (phase 
0) to a module \/Users/clements/plt/collects/test-engine/racket-tests.rkt\ 
that is not available (phase level 0) in: test)

When I attach the test-engine/racket-tests module to the user's namespace, 
these failures turn into:

   given: #(struct:error-result link: module mismatch, probably from old 
bytecode whose dependencies have changed: variable not provided (directly or 
indirectly) from module: 
\/Users/clements/plt/collects/test-engine/racket-tests.rkt\ accessed from 
module: 'stepper-module-name-762 at source phase level: 0 in: test)

This module does appear to provide a macro called 'test', so ... I'm not sure 
how to interpret this message. It doesn't look like something I can solve by 
re-running raco setup.

(FWIW, for those of you with deja vu, yes: this is the same question I cc:'ed 
to plt-dev before.)

2) The interactive tests fail like this:

   given: #(struct:error-result namespace-variable-value: test~object is not 
defined)

I haven't worked on this one yet... but it looks like this is also something 
that was added this month.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] internal definitions stepper

2010-10-19 Thread John Clements

On Oct 19, 2010, at 10:02 AM, John Clements wrote:

 
 2) The interactive tests fail like this:
 
   given: #(struct:error-result namespace-variable-value: test~object is not 
 defined)
 
 I haven't worked on this one yet... but it looks like this is also something 
 that was added this month.

Per a discussion with Robby, it turns out to be *apparently* sufficient to 
define a binding in the 
testing namespace that associates test~object with #f. 

Kathy, can you confirm that the test-engine code is always happy with a value 
of #f for test~object?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Grr... why can't I pull?

2010-10-19 Thread John Clements
Okay, this just sounds stupid: my 'git fetch' is failing on the PLT tree.  I 
can ssh to the pltgit machine just fine:

john-clementss-macbook-pro:~/git-clements clements$ ssh git
PTY allocation request failed on channel 0
hello clements, the gitolite version here is v1.4-14-g36317c4
the gitolite config gives you the following access:
 C  CREATER/.*
   R W  iplt
   R W  play
   R W  plt
   @ @  testing
Connection to git.racket-lang.org closed.

... but git pull just hangs. I get no useful info, even with a git fetch -v.

Actually, I just tried it from a remote linode (li21-127.members.linode.com), 
and it seems to be hanging there, as well.

Am I doing something stupid, here?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] internal definitions stepper

2010-10-19 Thread John Clements
Okay, here's what seems to be broken:

1) cond, as Mike observed. This is related to the different expansion of cond.
2) make-foo, where foo is a user-defined structure.  There's a mysterious extra 
false that's showing up.
3) reduction of (cons 1 (cons 2 empty)) in beginner only.
4) local structures.

Apparently, all of this (except for #4) changed in the last week :).

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.0.2 has begun

2010-10-20 Thread John Clements

On Oct 20, 2010, at 7:39 AM, Doug Williams wrote:

 I downloaded the pre-release version this morning - 10/20 (I believe it was a 
 build from 10/16). The plot package and plot extensions in the science 
 collection all work as expected. But, I am getting different numeric answers 
 for some of my science collection routines (for example, the gamma function) 
 and some of my newer code (for example, FFT) either fails with an error 
 message or DrRacket just dies. All of this code uses unsafe operations and 
 the problem may lie there somewhere. I'll try digging more deeply this 
 evening.

Focus first on uses of unsafe-vector-ref and unsafe-vector-set!. (Not the fx 
and fl variants, just the plain ones).  I wound up removing these from the FFT 
code in order to get it to work.  

Check out bug PR 11264. 

Also, very late flash of insight: my response (getting rid of unsafe-vector-ref 
and unsafe-vector-set!) might explain my performance issues with the FFT 
library.

John



 Doug
 
 On Sat, Oct 16, 2010 at 6:53 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:
 The release process for v5.0.2 has begun: the `release' branch was
 created for any work that is left and is now bumped to v5.0.1.900.  You
 can go on using the `master' branch as usual, it is now bumped to
 v5.0.2.1 (to avoid having two different trees with the same version).
 
 If you have any bug-fixes and changes that need to go in the release
 then make sure to specify that in the commit message or mail me the
 commit SHA1s.  You can `git checkout release' to try it out directly if
 needed -- but do not try to push commits on it (the server will forbid
 it).
 
 Note that nightly builds will go on as usual (as v5.0.2.1), and
 pre-release builds will be available shortly at
 
  http://pre.racket-lang.org/release/
 
 Please tell me if you think that this should be announced on the
 users list for wider testing.
 --
 Ryan Culpepper
 _
  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] Pre-Release Checklist for v5.0.2

2010-10-23 Thread John Clements

On Oct 21, 2010, at 4:07 PM, Ryan Culpepper wrote:

 Checklist items for the v5.0.2 release
  (using the v5.0.1.900 release candidate build)
 
 * John Clements cleme...@brinckerhoff.org
  - Stepper Tests
  Updates:
  - Stepper Updates: update HISTORY
  (updates should show v5.0.2 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.



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] highlighting function position with an underline.

2010-10-26 Thread John Clements

On Oct 26, 2010, at 5:07 AM, Shriram Krishnamurthi wrote:

 I'm in the pit of despair... er, grading first-year exams, and I'm
 looking at code that has terrible paren-placement issues.   I don't
 take points off for this on exams, but I can only imagine how long
 it takes these poor kids to get their code to run.
 
 Don't imagine.  Record transcripts of them editing.  Make popcorn,
 invite the neighbors over for the horror flick.

I'll do it.  Where's the download? I don't see it on PLaneT.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] planet remove triggers re-installation?

2010-10-26 Thread John Clements
Let me preface this by saying that I'm sure this is somehow my fault.  
Nevertheless, it seems broken.  Trying to *remove* a planet package triggers 
its re-download and installation. See the transcript below.

I'm guessing this has something to do with my use of development links, though 
I don't currently have any development links for this package.  I'm going to 
take a big hammer and start deleting stuff, and I'm guessing this will fix the 
problem, but it's certainly confusing.

John 


pcp062721pcs:~/plt/src/build clements$ raco planet remove clements rsound.plt 1 
7

= Removing (clements rsound.plt 1 7) =
setup-plt: version: 5.0.2.1 [3m]
setup-plt: variants: 3m
setup-plt: main collects: /Users/clements/plt/collects
setup-plt: collects paths: 
setup-plt:   /Users/clements/git-clements/clements/collects
setup-plt:   /Users/clements/clements/matthias/collects
setup-plt:   /Users/clements/Library/Racket/5.0.2.1/collects
setup-plt:   /Users/clements/plt/collects
setup-plt: --- cleaning collections ---
setup-plt: deleting: in planet/clements/rsound.plt/1/7
setup-plt: deleting: in planet/clements/rsound.plt/1/7/private
setup-plt: deleting: in planet/clements/rsound.plt/1/7/test
setup-plt: --- updating info-domain tables ---
setup-plt: updating: 
/Users/clements/Library/Racket/planet/300/5.0.2.1/cache.rktd
setup-plt: --- post-installing collections ---
setup-plt: done
Erasing metadata
Deleting files in 
/Users/clements/Library/Racket/planet/300/5.0.2.1/cache/clements/rsound.plt/1/7
Trimming empty directories
Rebuilding documentation index
setup-plt: version: 5.0.2.1 [3m]
setup-plt: variants: 3m
setup-plt: main collects: /Users/clements/plt/collects
setup-plt: collects paths: 
setup-plt:   /Users/clements/git-clements/clements/collects
setup-plt:   /Users/clements/clements/matthias/collects
setup-plt:   /Users/clements/Library/Racket/5.0.2.1/collects
setup-plt:   /Users/clements/plt/collects
setup-plt: --- pre-installing collections ---
setup-plt: --- compiling collections ---
setup-plt: making: scribblings/main/user
setup-plt: --- updating info-domain tables ---
setup-plt: --- creating launchers ---
setup-plt: --- building documentation ---
setup-plt: skipping: planet/cce/scheme.plt/4/1/scribblings/main.scrbl
setup-plt: skipping: planet/untyped/unlib.plt/3/23/scribblings/unlib.scrbl
setup-plt: skipping: planet/cce/scheme.plt/6/3/reference/manual.scrbl
setup-plt: rendering: scribblings/main/user/start.scrbl
downloading clements/rsound:1 from planet.racket-lang.org via HTTP

= Installing rsound.plt on Tue, 26 Oct 2010 11:51:31 =
setup-plt: Unpacking archive from 
/Users/clements/Library/Racket/planet/300/packages/clements/rsound.plt/1/7/rsound.plt
setup-plt:   unpacking README in 
/Users/clements/Library/Racket/planet/300/5.0.2.1/cache/clements/rsound.plt/1/7/./
setup-plt:   unpacking draw.rkt in 
/Users/clements/Library/Racket/planet/300/5.0.2.1/cache/clements/rsound.plt/1/7/./
...



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] corrected sxml.plt 2 1

2010-10-26 Thread John Clements
The existing version of sxml.plt has a compile-omit-paths that refers to 
test.ss.  Unfortunately, the actual filename is tests.ss.  This turns a 
one-minute installation into a terrifying fifteen-minute install-fest, covering 
a total of 21 additional planet packages.

Is there any chance I can upload a new version of this package?

On a separate note, to dev: is there any way that schemeunit could be made 
slightly less of a very large install? Especially since rackunit is now part of 
the collects tree. ... If this opens a terrible can of worms, just forget about 
it.

John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] 5.0.2 changelog

2010-10-26 Thread John Clements

On Oct 26, 2010, at 12:28 PM, Matthias Felleisen wrote:

 
 1. BSL, BSL+, ISL, and ISL+ (HtDP teaching languages) no longer support 
 checked signatures. 
 
 2. The stepper should kind of mostly work for universe programs. John? 

Precisely.

That is: there's more junk that could be hidden, but the universe program that 
I tested did in fact work[*] just fine. Has this been broken long enough that 
fixing it deserves a bullet? I'm inclined to say no.

John

[*] please insert usual caveats re: use of the word work.



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] FFI problem, possibly related to chaperones

2010-10-27 Thread John Clements

On Oct 27, 2010, at 9:54 AM, Matthew Flatt wrote:

 I think Robby recently changed DrRacket so that user programs don't
 share `ffi/unsafe' with DrRacket. That would lead to multiple
 `s16vector' structure types (which didn't occur to me when Robby asked
 if it would be ok to not share), and that might be what you're seeing.

Okay, that makes sense.  

I talked to Robby a bit, and it sounds like the issue here is that unsafe pulls 
in all kinds of other stuff that makes DrRacket big. 

If I read the source correctly, then it would be possible to pull out the 
one-liner 

(define-struct cvector (ptr type length))

... from unsafe/cvector.rkt and put it somewhere where it can be shared between 
DrRacket and user programs. It would appear to me that this would produce a 
single representation for cvectors, and perhaps by extension for the derived 
s16vector, etc. 

Am I understanding this correctly?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Text spacing different in gr2

2010-10-28 Thread John Clements
I don't know whether this is better or worse, but it's different; in gracket2, 
the intro lines of text in the interactions pane are closer together. I 
measured the distance between the first and second line baselines to be two 
pixels larger (18 vs. 16) in the old version, gracket. This is probably 
accentuated by the thicker underline in gracket2.

John


inline: gracket1.pnginline: gracket2.png

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] relative lines of C in gracket vs. gracket2

2010-10-28 Thread John Clements
I took a look at the size of our C code base (all files ending in .c, .h, .cpp, 
and .cxx, not including those with 'xsrc' in the path) to see how much smaller 
gracket2 is, and (assuming I didn't miss something major) the difference is 
truly impressive.  The below is ... | wc | sort -n | tail, so it's just the 9 
biggest and the total from each.

So, if I'm reading this correctly, we've gone from ~590K lines of C to about 
~340K lines of C. That's amazing.

John



From the new sources:

7116   20871  225191 ./racket/src/syntax.c
7446   14377  191528 ./srpersist/srpersist.cxx
8404   22017  233781 ./racket/src/thread.c
9132   24942  230277 ./racket/src/port.c
9521   28117  292983 ./racket/src/stxobj.c
9833   28680  299212 ./racket/src/fun.c
   10537   29862  338042 ./racket/src/module.c
   13084   38652  399523 ./racket/src/eval.c
   14760   44802  472205 ./racket/src/jit.c
  339186 1075545 10140107 total


From the the old sources:

7116   20871  225191 ./racket/src/syntax.c
7446   14377  191528 ./srpersist/srpersist.cxx
8380   21961  233205 ./racket/src/thread.c
9123   24924  230059 ./racket/src/port.c
9521   28117  292983 ./racket/src/stxobj.c
9833   28680  299212 ./racket/src/fun.c
   10537   29862  338042 ./racket/src/module.c
   13084   38652  399523 ./racket/src/eval.c
   14760   44802  472205 ./racket/src/jit.c
  590018 1939014 17723116 total



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] sharing cpointers between namespaces

2010-10-28 Thread John Clements
I've put together a fix for the inability to share FFI objects between user 
namespaces... but it has a catch.

Specifically, I moved the define-struct of cpointer into a module by itself, 
called ffi/unsafe/cvector-def; that way, my tool.rkt file can require this 
one-line module and attach it to the user's namespace using 'reset-console'.

BUT: the cvector.rkt file wants to use protect-out to prevent others from 
using make-cvector explicitly, and I'm not sure how to do this after moving the 
structure definition into another file.  Compilation complains:

module: cannot protect imported identifier with re-provide in: make-cvector

... which seems pretty reasonable; there's no way to guarantee that protection 
when the imported binding could be floating around freely.

I started trying to track down the various instances of make-cvector inside the 
cvector.rkt module, but then decided it would be easier for a proof-of-concept 
simply to remove the protection.  

Happily, this solves my problem, but leaves another. Is there some obvious way 
to recover the protection--after all, I certainly have no need for the user 
namespaces to call make-cvector--without bloating the startup again?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] gr2 language menu appears to be drunk

2010-10-28 Thread John Clements
This reminds me of those medication ads that have wavy text to prevent 
detection. Look at the text line at the start of a program to see what I mean.

Eli, sorry for the 50K attachment.

John

inline: wavy-letters.png




smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] non-reproducible gr2 bug heads-up

2010-10-29 Thread John Clements
I had a not-easily-reproducible problem today where the tab-change keybinding 
(shift-cmd-right) was not working as expected.  In particular, hitting with two 
tabs open and the first one shown would switch briefly to the second, then pop 
back to the first.

As I've said, I don't know how to reproduce this, so this isn't a bug report, 
just a heads-up.

BTW, I like the new tabbing look in Mac Gr2; it looks more compact.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Yikes! Images in science collection could be much smaller

2010-10-29 Thread John Clements
Your science collection stores images as bitmaps.  Storing them as png's 
instead reduces their size by about 99%. This is lossless, so there's no 
reduction in quality.

If I'm doing the math correctly, this could reduce the size of the installed 
science collection from about 78 megabytes to about 7 megabytes (it looks like 
there are three copies of everything).

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Yikes! Images in science collection could be much smaller

2010-10-30 Thread John Clements

On Oct 29, 2010, at 6:34 PM, Doug Williams wrote:

 I'm in the process of updating all of my collections to Racket. I have most 
 of the smaller ones done - animated-canvas, describe (with documentation this 
 time), packed-binary, and uuid - with only table-panel left to go. Right now 
 I'm finishing up the documentation for my new sesame library - an interface 
 to the Sesame RDF triples store - that I'll release this weekend. [I need it 
 for my 'real' job.] Then I'll move on to the 'big three' - science, 
 simulation, and inference. They'll take me a while because of their size and 
 complexity.But, I'll redo the graphics to PNG format at that time.

Sounds good; let me know if I can help; I'd be glad to crunch those files and 
spend five minutes changing bmp to png everywhere.

John

 On Fri, Oct 29, 2010 at 6:45 PM, John Clements cleme...@brinckerhoff.org 
 wrote:
 Your science collection stores images as bitmaps.  Storing them as png's 
 instead reduces their size by about 99%. This is lossless, so there's no 
 reduction in quality.
 
 If I'm doing the math correctly, this could reduce the size of the installed 
 science collection from about 78 megabytes to about 7 megabytes (it looks 
 like there are three copies of everything).
 
 John
 
 



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] saving .scrbl file OS X message box

2010-11-03 Thread John Clements
Dear Heavens, this is the most unpleasant message box I've seen in a while, 
when trying to save a file with the extension scrbl in OS X 10.6.4:

boldYou cannot save this document with extension .scrbl at the end of the 
name. The required extension is ../bold

You can choose to use both, so that your file name ends in .scrbl.



... uh?

I'm guessing that we deduced that by requiring the extension . only, OS X 
would allow us  to save with any extension we liked, but the resulting message 
box is appalling; I vote for going back to what we had before

Apologies if I'm misunderstanding something, here.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] OS X: new GC icon... gets left behind?

2010-11-03 Thread John Clements
I like the new gc cursor.  I see something interesting though, when DrRacket 
starts spinning hard, which is that the recycle cursor gets left wherever it 
was, and the traditional pizza returns.  This is more in the realm of curiosity 
than bug, though.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] plot's fit functionality

2010-11-05 Thread John Clements
I've just been cleaning up plot's fit functionality, and I'm starting to 
wonder... did it *ever* work?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] FFI question; using _or-null around output ptr gives binding error.

2010-11-05 Thread John Clements
Here's an ffi object I'd like to construct:

(define do-fit-int
(get-ffi-obj do_fit libfit
  (_fun (func  : (_fun _int _pointer - _double))
(val-num   : _int = (length x-values))
(x-values  : (_list i _double*))
(y-values  : (_list i _double*))
(z-values  : (_list i _double*))
(errors: (_list i _double*))
(param-num : _int = (length params))
(params: (_list i _double*))
- (_or-null (_list o _double* param-num)

My addition is the (_or-null ...) that's wrapped around the output list, and 
this signals the error:

expand: unbound identifier in module in: param-num

It looks like I can work around this error by doing the work explicitly:

(define do-fit-int
(get-ffi-obj do_fit libfit
  (_fun (func  : (_fun _int _pointer - _double))
(val-num   : _int = (length x-values))
(x-values  : (_list i _double*))
(y-values  : (_list i _double*))
(z-values  : (_list i _double*))
(errors: (_list i _double*))
(param-num : _int = (length params))
(params: (_list i _double*))
- (result : _pointer)
- (and result
(cblock-list result _double* param-num)

...which compiles, though I can't say anything yet about whether it runs 
correctly (principally because I haven't yet found a set of inputs on which the 
fit library doesn't choke).

My question: should or-null handle this?


John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Simple loop checking in beginner?

2010-11-09 Thread John Clements
Here's a simple macro that prevents same-argument recursive calls (including 
non-tail ones).  It's illustrated by a student function that made a teeny 
mistake which would result in looping forever, but (using this macro) instead 
signals an error.  To the best of my limited knowledge, beginner is purely 
functional aside from the use of the test functions, right? So any recursive 
call with eq? args is guaranteed to loop forever, right?

Hmm... well, I suppose there's (random)... 

It seems to me that a macro like this one (or even complete memoization) could 
potentially reduce student frustration, and would not prevent students from 
writing the programs that they wanted to.

No?

John Clements



#lang racket

(require rackunit)

(define-syntax (define/noloop stx)
  (syntax-case stx ()
[(_ (funname arg ...) body ...)
 #`(define funname
 (let ()
   (define fresh-key (gensym 'funname))
   (define (funname arg ...)
 (let* ([most-recent-args (continuation-mark-set-first #f 
fresh-key)]
[these-args (list arg ...)])
   (when (and most-recent-args
  (= (length these-args)
 (length most-recent-args))
  (andmap eq? these-args most-recent-args))
 (error 'funname recursive call with identical arguments ~s is 
guaranteed to run forever. these-args))
   (with-continuation-mark fresh-key these-args
 body
 ...)))
   funname))]))

;; NOW I'M A STUDENT:

;; only-long-strings : (listof string) - (listof string)
;; return a list containing the strings longer than 2 chars
(define/noloop (only-long-strings l)
  (cond [(empty? l) empty]
[else (cond [( 2 (string-length (first l))) 
 (cons (first l) 
   (only-long-strings (rest l)))]
[else (only-long-strings l)])]))


(check-equal? (only-long-strings (cons abc (cons de (cons fgh empty
  (cons abc (cons fgh empty)))

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] enum returns #f on c-racket no match?

2010-11-15 Thread John Clements
The documentation for '_enum says this:

3.8 Enumerations and Masks

Although the constructors below are describes as procedures, they are 
implemented as syntax, so that error messages can report a type name where the 
syntactic context implies one.

(_enum symbols [basetype]) → ctype?
  symbols : list?
  basetype : ctype? = _ufixint
Takes a list of symbols and generates an enumeration type. The enumeration maps 
between a symbol in the given symbols list and corresponding integers, counting 
from0.
The list symbols can also set the values of symbols by putting '= and an exact 
integer after the symbol. For example, the list '(x y = 10 z) maps 'x to 0, 'y 
to 10, and 'z to11.

The basetype argument specifies the base type to use.


This says nothing about what happens when using racket-C on a symbol that's 
not mentioned by the enumeration, or what happens when using C-racket on a 
number that's not mentioned in the enumeration. 

Based on my tests, it appears that the conversion signals an error in the 
racket-C direction, but simply returns #f in the C-racket direction.  

Should I document the current behavior, or would it make more sense to change 
it to signal an error rather than returning #f?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] enum returns #f on c-racket no match?

2010-11-16 Thread John Clements

On Nov 15, 2010, at 3:02 PM, John Clements wrote:

 The documentation for '_enum says this:
 
 3.8 Enumerations and Masks
 
 Although the constructors below are describes as procedures, they are 
 implemented as syntax, so that error messages can report a type name where 
 the syntactic context implies one.
 
 (_enum symbols [basetype]) → ctype?
  symbols : list?
  basetype : ctype? = _ufixint
 Takes a list of symbols and generates an enumeration type. The enumeration 
 maps between a symbol in the given symbols list and corresponding integers, 
 counting from0.
 The list symbols can also set the values of symbols by putting '= and an 
 exact integer after the symbol. For example, the list '(x y = 10 z) maps 'x 
 to 0, 'y to 10, and 'z to11.
 
 The basetype argument specifies the base type to use.
 
 
 This says nothing about what happens when using racket-C on a symbol that's 
 not mentioned by the enumeration, or what happens when using C-racket on a 
 number that's not mentioned in the enumeration. 
 
 Based on my tests, it appears that the conversion signals an error in the 
 racket-C direction, but simply returns #f in the C-racket direction.  
 
 Should I document the current behavior, or would it make more sense to change 
 it to signal an error rather than returning #f?

Okay the existing behavior was bothering me because (post-conversion to #f) 
there's no way to recover the problematic integer.  I therefore changed it so 
it signals an error instead, like this:

. . . plt/collects/racket/private/more-scheme.rkt:265:2: enum:int-_my-enum: 
expected a known integer from C, got: 6

That error comes from linking to a file with this C function:

int tester(int x){
  return x+2;
}

... using this racket program:

#lang racket

(require ffi/unsafe)

(define lib (ffi-lib /tmp/tester.dylib))

(define _my-enum
  (_enum 
   '(chicken = 3
 monkey = 4
 duck = 5)))

(define tester
  (get-ffi-obj tester lib (_fun _my-enum - _my-enum)))


(tester 'monkey)


... and finally, here's the diff:

pcp062767pcs:~/plt/collects/ffi clements$ git diff unsafe.rkt
diff --git a/collects/ffi/unsafe.rkt b/collects/ffi/unsafe.rkt
index 66fd34a..99e0d7f 100644
--- a/collects/ffi/unsafe.rkt
+++ b/collects/ffi/unsafe.rkt
@@ -765,6 +765,8 @@
   (define int-sym '())
   (define s-c
 (if name (string-symbol (format enum:~a-int name)) 'enum-int))
+  (define c-s
+(if name (string-symbol (format enum:int-~a name)) 'int-enum))
   (let loop ([i 0] [symbols symbols])
 (unless (null? symbols)
   (let-values ([(i rest)
@@ -784,7 +786,11 @@
 (if a
   (cdr a)
   (raise-type-error s-c (format ~a (or name enum)) x
-(lambda (x) (cond [(assq x int-sym) = cdr] [else #f]
+(lambda (x) (cond [(assq x int-sym) = cdr] 
+  [else
+   (error c-s 
+  expected a known integer from C, got: ~s
+  x)]
 
 ;; Macro wrapper -- no need for a name
 (provide _enum)


Let me know if it's okay to commit this.  If I don't hear back in a couple of 
days, I'll just go ahead :).

John 



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] OT: stump misunderstands Scheme?

2010-11-16 Thread John Clements

On Nov 16, 2010, at 2:13 PM, Robby Findler wrote:

 That expression at the end is somehow turning a procedure back into
 its quoted form. I have no idea if a Scheme that did that would be R5
 or not, but Racket definitely does not allow that (and neither did any
 other programming language that I've ever worked on).
 
 Overall, I'd say, you should contact Aaron directly, instead of asking here.

OKTHX



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Fwd: Q. about Directly Reflective paper

2010-11-16 Thread John Clements
Well, he's generous about it; here's what he had to say.

John


Begin forwarded message:

 From: Aaron Stump aaron-st...@uiowa.edu
 Date: November 16, 2010 5:58:42 PM PST
 To: John Clements cleme...@brinckerhoff.org
 Subject: Re: Q. about Directly Reflective paper
 Reply-To: ast...@cs.uiowa.edu
 
 Hi, John.
 
 I think you are right about this.  Lambda abstractions evaluate to 
 #procedures in Scheme R5RS, and so it is not possible to take a cdr or car of 
 one of these.  I have no idea why I wrote this (four years ago -- there was a 
 major lag between acceptance and publication at HOSC).  I will add a note to 
 my web page about this, and possibly upload a revised version of the paper 
 without this incorrect statement.
 
 Aaron
 
 On Tue, Nov 16, 2010 at 4:18 PM, John Clements cleme...@brinckerhoff.org 
 wrote:
 I'm reading your paper, Directly Reflective Meta-Programming, and I got 
 stuck early on a remark of yours about Scheme:
 
  A meta-programming language is scope safe (or hygienic) iff variables may 
  not be captured or escape their scopes during computation. Dynamic 
  variables in Emacs LISP and Common LISP are a good example of a violation 
  of scope safety [30, 24]. Scheme R5RS’s macro language is designed to be 
  scope safe [21]. Other constructs in Scheme R5RS, however, enable violation 
  of scope safety, even though the language does not have dynamic variables. 
  For a violation of scope safety in spirit, though not technically, we have 
  that (caddr ’(lambda (x) x)) evaluates to x. According to the R5RS language 
  definition, ’(lambda (x) x) is a literal expression, and hence the 
  occurrences of x in it are not variables at all, but just (unscoped) 
  literal data. So in this example, a variable has been created (namely, the 
  resulting unquoted x), but not by means of removing it from its scope. 
  Using quasiquotation, however, the example may be modified to give a true 
  violation of scope safety. The following expression extracts the variable x 
  from its scope, by transforming the binding lambda expression into a piece 
  of literal data, and then extracting and evaluating the quoted variable.
 
  ((lambda (y) (eval ‘(car (cdr (cdr ’,y) (lambda (x) x))
 
 
 This looks pretty goofy to me.  Do you know of R5RS implementations that 
 actually allow you to peel apart a 3d value like this?  Racket (nee MzScheme) 
 certainly doesn't.
 
 Thanks!
 
 
 John Clements
 
 



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Tab switching keyboard shortcuts on Mac

2010-11-17 Thread John Clements

On Nov 14, 2010, at 1:35 PM, Dmitry Chestnykh wrote:

 On Sun, 14 Nov 2010, Robby Findler wrote:
 
 Currently, DrRacket uses cmd-[ and cmd-] and it seems unfortunate to
 have to change that by adding another modifier. I see that terminal
 uses that for cycling windows, and safari and firefox use it for the
 browsing history. Preview uses it for changing pages. So cmd-[ and
 cmd-] don't seem all that standard.
 
 Well, it seems like Cmd+SHIFT+[ and ] also work for me in 5.0.2 (can't get 
 any keyboard shortcuts to work in the nightly build :).
 
 Anyway, the most important thing for me was a conflict with the standard text 
 editing shortcuts, and you fixed it, so I'm okay with any shortcuts for tab 
 switching (I also use Cmd+1..9, and they work well).
 
 There's another unrelated thing with shortcuts that bothers me -- any 
 shortcuts with letters don't work with non-English (Russian in my case) 
 layouts -- they put a letter instead of doing action (for example, if I press 
 Cmd+] with Russian layout, it outputs ъ, because that's what ] is mapped 
 to in this layout). As I understand, normally, when modifier keys are pressed 
 (for example, Cmd) the app should receive English letters, but it seems like 
 it's not the case for DrRacket. I'll look into it more, and let you know if I 
 come out with the fix (or maybe the Cocoa version won't even have this bug).

FWIW, Chrome seems to use Cmd+Option+Left and Cmd+Option+Right.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] TR - no source locations?

2010-11-20 Thread John Clements
It appears to me that TR does not preserve source locations, which makes 
testing extremely painful (which test failed? Who knows.) I'm hoping that I'm 
just missing something obvious, here. I'm also in the market for obvious 
workarounds. Apologies if this is a FAQ; I did actually google for the answer.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Racking your brain

2010-11-23 Thread John Clements
... p.s.: anyone who uses the terrible pun Racking Your Brain in a paper 
title must now treat me to a rack of lamb. 

Unless that paper's already written.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [racket] Plea for neologism (was: Re: letoverlambda)

2010-11-24 Thread John Clements
(followups trimmed to dev; is that an acceptable strategy?)

On Nov 24, 2010, at 12:44 PM, Robby Findler wrote:

 On Wed, Nov 24, 2010 at 1:49 PM, John Clements
 cleme...@brinckerhoff.org wrote:
 On Wed, Nov 24, 2010 at 11:05 AM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 On Wed, Nov 24, 2010 at 12:55 PM, Joe Marshall jmarsh...@alum.mit.edu 
 wrote:
 On Nov 20, 2010, at 6:58 PM, Matthias Felleisen wrote:
 
 Hygiene is a technical term.  The idea is roughly that
 the __macro system__ (as a whole) should respect the
 lexical structure of your program.
 
 It is somewhat unfortunate that the name `hygiene' has caught
 on here.  It really ought to be called `lexical scoping' (with the
 understanding that macros have no special permission to violate
 lexical scope any more than lambda bindings do).
 
 You know about Oleg's macro called, bind-x-to-5 that has one
 subexpression does exactly its name claims, but in a hygenic macro
 system?
 
 Hang on... you're still using the term hygienic in the non-Felleisen way.
 
 No I'm not.
 
  That is, if we accept that a hygienic system is one that has well-defined 
 behavior but where you can bind new names when you explicitly ask to, then
 
 #lang racket
 
 (define-syntax (bind-x-to-5 stx)
  (syntax-case stx ()
[(_ exp)
 #`(let ([#,(datum-syntax stx 'x) 5])
 exp)]))
 
 (bind-x-to-5 x)
 
 ...is a legal macro in a hygienic macro system.
 
 Sure.
 
 But Oleg's macro doesn't do that.

Right, I understand.  Oleg shows that you can bind x even in a macro system 
that doesn't allow variable capture in the way that I used here; in other 
words, variable capture is possible even in a system-without-XXX, where XXX 
refers to the property of being able to do what I did here (straightforward 
variable capture).  IIUC, you use the word hygienic in the paragraph above 
(when you say but in a hygienic macro system) to mean system-without-XXX, 
but Matthias' point is that hygienic *doesn't* mean system-without-XXX, it 
just means system-where-XXX-can-only-occur-deliberately.


Naturally, this conversation would be simpler if we had a word for XXX... :)

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] planet package dependencies (was: Re: code base metrics)

2010-11-30 Thread John Clements
While you're in meta-programmer mode, any interest in automatically computing 
planet dependencies? I'd *love* to know what packages a planet package depends 
on. I understand that in the presence of dynamic-require, you can only do so 
well, but even a first approximation could be incredibly useful.  

No?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [racket] Exploratory programming?

2010-12-01 Thread John Clements

On Dec 1, 2010, at 2:51 PM, engin...@alum.mit.edu wrote:

 1.  I've been meaning for a long time to mention some things like this.
 Another example is modulus (modulo and remainder work).  It'd be nice to
 have a list of suggestions returned whenever certain words were typed or
 whenever no results are returned.
 
 2.  Search Manuals breaks the browser's Back button.  Here's a simple
 example.
 a. Open http://docs.racket-lang.org/
 b. Type modulus in the search manuals box and hit Enter
 c. No matches found, so change the highlighted text to modulo
 d. Click on one of the results
 e. Click the browser's back button
 f. I'm not back at the list of results
 
 I have been very impressed with the level of documentation, but I (and my
 students) have often found frustration in searching.

This might be another good chance to mention work that a student of mine has 
done on a tool, ErrRecorder, that collects error messages automatically and 
allows users to suggest solutions for particular error messages.

http://li21-127.members.linode.com:8021/errrecorder

The new piece here is that it now does some clustering of error messages based 
on levenshtein distances, so that errors can be grouped by frequency in some 
sensible way.  For the problem you mention, I see that you really want to split 
up that big first category that holds all of the undefined identifier 
messages generated in teaching languages.

This tool has been installed on local machines for about eight weeks, now, and 
has collected about 3900 errors.  It's not yet ready for download, but I'd be 
interested in hearing whether something like this could be useful for you.

John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Fwd: [plt-edu] Internal defines in learning languages?

2010-12-02 Thread John Clements
Begin forwarded message:

Shriram wrote:
 
 And the syntax of local IS a problem.
 

(dev-only)

+1

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] OpenMath / SCSCP?

2010-12-02 Thread John Clements
I just heard about OpenMath  SCSCP, open standards (XML-based) for 
representing algebraic entities and allowing remote procedure calls to a 
variety of existing commercial and free algebraic solvers, and my first thought 
was: yikes! Do we have bindings for this? It looks like we don't. Given the 
apparently XML-based and TCP-based nature of these protocols, it looks like 
this could be incredibly low-hanging fruit, for us. Is this something that 
everyone's already heard of?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] tags on github

2010-12-07 Thread John Clements

On Dec 7, 2010, at 5:52 PM, Eli Barzilay wrote:

 6 minutes ago, Robby Findler wrote:
 It is a kind out of the way place but it would be a shame if someone
 went there, esp. since the latest stuff is in the middle of the
 list.
 
 OK, so I'll take it as a yes vote.  Any suggestion for new names?
 One option is to go with the common misconception of v372 -
 v3.72, another is a silly v372 - z372.

Wait... isn't it *reverse* order? In this case, you could name them 
old-scheme-v372 (a double entendre). Or antique-v372, or whatever you like. 
Right?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] DrDr 'shmget' errors

2010-12-08 Thread John Clements
I'm seeing this result from DrDr on one of my files:

(gracket:19767): Gdk-WARNING **: shmget failed: error 28 (No space left on 
device)

... and I'm assuming that it's a drdr issue related to running files that 
involve graphical display, and that I don't need to worry about it. Is this 
correct?

Apologies if I missed discussion of this.

John

smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] getting a language level without starting drracket

2010-12-08 Thread John Clements
Several aspects of the stepper's behavior depend on the language level that the 
user is in.  Historically, the division between graphical and non-graphical 
apps has meant that it's simpler for the stepper to make up a fake language 
level, rather than get a real one for testing.  However, the world looks 
different now.  How difficult would it be for a racket app to get a 
language-level% corresponding to a given module path, for use in testing?  This 
would also bring the testing substantially closer to the implementation.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] TR for PL class

2010-12-26 Thread John Clements
Eli: You use a variant of TR for your PL class, right? Is your stuff fairly 
straightforward, or would it be a mistake for me to try to adopt it?  I just 
tried installing your .plt package, and got a few install errors (below, if you 
care), so it's hard for me to evaluate this myself. I took a quick look at your 
lecture notes, and it looks like you're using a cases form that (I'm 
guessing) adds static types to the PLAI setup. Yes?

John





setup-plt: 
setup-plt: error: during making for user/pl (PL)
setup-plt:   lang/types/types.rkt:38:21: module: identifier already imported 
from: typed-scheme/private/base-env at: init in: 
typed-scheme/private/base-env-numeric
setup-plt: error: during making for user/pl/lang
setup-plt:   types/types.rkt:38:21: module: identifier already imported from: 
typed-scheme/private/base-env at: init in: typed-scheme/private/base-env-numeric
setup-plt: error: during making for user/pl/lang/types
setup-plt:   make-env: not a bound identifier at: (box? (make-pred-ty (-box 
Univ))) in: (make-env (box? (make-pred-ty (-box Univ))) (cons (-poly (a) (- a 
(-lst a) (-lst a (cdr (-poly (a b) (cl-* (-acc (list (-pair a (-lst b))) 
(-lst b) (list -cdr)) (-* (list (-lst a)) (-lst a) (cddr (-poly (a b c) 
(cl- (((-pair a (-pair b (-ls...



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] up-to-date libgtk for drracket on debian stable?

2010-12-31 Thread John Clements
Debian is a slow-moving distribution, and it looks to me like the version of 
libgtk in the stable version of Debian Lenny isn't new enough for DrRacket. 
Here's what I get on startup:

ffi-obj: couldn't get gtk_combo_box_set_button_sensitivity from 
libgtk-x11-2.0.so.0 (/usr/lib/libgtk-x11-2.0.so.0: undefined symbol: 
gtk_combo_box_set_button_sensitivity)

=== context ===
/home/clements/plt/collects/ffi/unsafe.rkt:176:2: get-ffi-obj*
/home/clements/plt/collects/mred/private/wx/gtk/platform.rkt: [traversing 
imports]
/home/clements/plt/collects/mred/private/kernel.rkt: [traversing imports]
/home/clements/plt/collects/mred/private/const.rkt: [traversing imports]
/home/clements/plt/collects/mred/private/check.rkt: [traversing imports]
/home/clements/plt/collects/mred/mred.rkt: [traversing imports]
/home/clements/plt/collects/mred/main.rkt: [traversing imports]
/home/clements/plt/collects/racket/gui/base.rkt: [traversing imports]
/home/clements/plt/collects/drracket/drracket.rkt: [traversing imports]

I know I've seen the racket build download its own libraries during compilation 
on my mac, but I didn't find a 'configure' option that allowed me to specify 
this manually.

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] replacement for #:namespace arg in dispatch/servlet

2011-01-02 Thread John Clements
I'm trying to use the 'handin-server' code, which depends on a now-defunct 
#:namespace argument to dispatch/servlet. Your change eliminating this argument 
 (commit c7995e247e8300) was in response to Shriram's PR about port number 
assignments, but that doesn't help me to figure out why that argument would 
have disappeared.  I'm guessing that it's going to be something simple like 
using parameterize on current-namespace instead of specifying it as an optional 
argument, but since the handin server code isn't mine, I wouldn't be confident 
that my change was a sane one. 

So: is there a simple mechanism that replaces this optional argument?

John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] [plt] Push #21875: master branch updated

2011-01-02 Thread John Clements

On Jan 2, 2011, at 2:45 PM, cleme...@racket-lang.org wrote:

 clements has updated `master' from dbd8faee1b to 47e3db06ff.
  http://git.racket-lang.org/plt/dbd8faee1b..47e3db06ff
 
 =[ 1 Commits ]==
 
 Directory summary:
 100.0% collects/mred/private/
 
 ~~
 
 47e3db0 John Clements cleme...@racket-lang.org 2011-01-02 14:45
 :
 | change pref name to match docs

Hope this isn't too forward of me; I figured that since the docs had already 
changed, it wouldn't be too presumptuous to change the implementation. 
Apologies for breaking anyone's prefs.

John

 :
  M collects/mred/private/const.rkt |2 +-
 
 =[ Overall Diff ]===
 
 collects/mred/private/const.rkt
 ~~~
 --- OLD/collects/mred/private/const.rkt
 +++ NEW/collects/mred/private/const.rkt
 @@ -38,7 +38,7 @@
   (define arrow-cursor (make-object wx:cursor% 'arrow))
 
   (define default-x-prefix (if (eq? 'unix (system-type))
 -(let ([v (get-preference 
 '|MrEd:defaultMenuPrefix| (lambda () 'ctl))])
 +(let ([v (get-preference 
 '|GRacket:defaultMenuPrefix| (lambda () 'ctl))])
(if (memq v '(meta ctl alt ctl-m))
v
'ctl))



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] JFYI: stderr noise while running drracket on Fedora Core 9

2011-01-02 Thread John Clements
While running drracket on Fedora Core 9, I got a bunch of stderr messages from 
Gdk:


cleme...@vogon:~/.racket/5.0.99.6 $ Gdk: gdk_window_thaw_updates: assertion 
`private-update_freeze_count  0' faile
Gdk: gdk_window_thaw_updates: assertion `private-update_freeze_count  0' faile
Gdk: gdk_window_thaw_updates: assertion `private-update_freeze_count  0' faile
Gdk: gdk_window_thaw_updates: assertion `private-update_freeze_count  0' faile
Gdk: gdk_window_thaw_updates: assertion `private-update_freeze_count  0' faile
Gdk: ?gdk_window_thaw_updates: assertion `private-update_freeze_count  0' 
faile
Gdk: @gdk_window_thaw_updates: assertion `private-update_freeze_count  0' 
faile
Gdk: ?gdk_window_thaw_updates: assertion `window != NULL' faile
Gdk: ?gdk_window_thaw_updates: assertion `window != NULL' faile
Gdk: gdk_window_thaw_updates: assertion `window != NULL' faile
Gdk: ggdk_window_thaw_updates: assertion `window != NULL' faile
Gdk: @gdk_window_thaw_updates: assertion `window != NULL' faile
Gdk: ?gdk_window_thaw_updates: assertion `window != NULL' faile

[2]+  Done~/drracket
cleme...@vogon:~/.racket/5.0.99.6 $ uname -a
Linux vogon.csc.calpoly.edu 2.6.25.3-18.fc9.i686 #1 SMP Tue May 13 05:38:53 EDT 
2008 i686 athlon i386 GNU/Linux

This was while testing the handin client.  I'm assuming these are unimportant, 
and in all likelihood related to the old libgdk that's a part of fedora core 9; 
if they're not, let me know and I'll try to reproduce them. Since the machines 
that my students will be using are all Fedora Core 11, I'm betting that I won't 
see this error again.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Git

2011-01-07 Thread John Clements

On Jan 7, 2011, at 7:42 AM, Robby Findler wrote:

 Another question: what if I commit something just for the purpose of
 moving to another machine and I don't want that commit to show up in
 the main repository? Is that possible? (My tree is currently in that
 state; it is one commit ahead of plt/master but that commit message is
 a lie-- I've just started to do that job; ordinarily I'd do git commit
 --amend to add more stuff to it, but now I'm worried about that.)

Taking a step back:  is there really anything wrong with such commits?  Given 
that drdr and e-mail alerts are based on pushes rather than commits, it seems 
not unreasonable to just let those be intermediate commits.  I can see that 
it's a bit easier to give a nice name to a single big commit, but if the 
alternative is the fancy dance that this thread is suggesting, it seems like it 
might be simpler just to go with the simple solution (tautology alert).

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Can't use (current-output-port) with subprocess in DrRacket: does it matter?

2011-01-07 Thread John Clements
Currently, you can't run the mongodb tests in DrRacket, because they use 
subprocess with (current-output-port), which (in DrRacket) is not a 
file-stream port.

In DrRacket's interactions window:

 (file-stream-port? (current-output-port))
#f

Is this expected, or should DrRacket's current-output-port be a file-stream?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Fwd: Re: [racket] Couldn't find a step matching that criterion

2011-01-10 Thread John Clements

On Jan 9, 2011, at 5:57 PM, David Van Horn wrote:

 Why are the  Step and Step  buttons enabled when there are no steps to 
 take in a given direction?  The Couldn't find a step matching that 
 criterion message seems awfully confusing for a beginner.  If the buttons 
 are going to be enabled, something along the lines of There are no further 
 steps to take and There are no previous steps to take would be better, IMO.

Okay, I've made these messages more specific, by parameterizing over the 
fail-message associated with each operation.  Let me know if you have other 
suggestions.

John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] JFYI: Apple's Mac App store now online

2011-01-11 Thread John Clements
This article from TidBITS 

http://db.tidbits.com/article/11864

describes the launch of the new Mac App Store.  It's clearly Apple's intention 
to make this the primary way of distributing software on the Mac, and it 
wouldn't surprise me to see not-so-subtle barriers to non-app-store app 
installation going up soon.

And, while I'm sure Apple would cheerfully grind us all into a paste if it 
would produce a significant one-time bump to the cash flow sheet, I don't think 
this is necessarily a terrible thing for DrRacket. Um, although I'm not coming 
up with any good side to this right now.

Anyhow, I wouldn't be surprised if in the next few years users start asking why 
DrRacket isn't available through the App store.

I would search to see whether other IDE's are part of the App Store, but... I 
don't think you can browse it until you install the App Store. And I think 
there's something about getting a required tattoo, also.


John (sorry, that was in poor taste)
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


[racket-dev] Gr2 on debian system: vastly better than 5.0.2!

2011-01-14 Thread John Clements
It probably won't come as a surprise to hear that the newer gr2 flavor of 
DrRacket resolves all of the bizarre (and unfixed) font problems I had with 
older versions of DrRacket on bare-bones debian systems.

Thanks!

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] cgywin build working? Which line endings?

2011-01-18 Thread John Clements
I have a student who's trying to compile DrRacket for Windows using cygwin, and 
I have two questions:

1) Is using cygwin to build from source expected to work?
2) It looks like the cygwin build expects UNIX-style line endings, is that 
correct?

Many thanks,

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] changing #lang plai to depend on racket rather than scheme?

2011-01-19 Thread John Clements
I went looking for the immutable hash table functions in plai today, and I 
discovered that since plai is based on #lang scheme rather than #lang racket, 
you need to use old names in a bunch of places.

Just for the heck of it, I went ahead and changed scheme - racket in two 
places in plai/main.rkt, and... things seem to work fine.  However, I don't see 
a test suite that I could run to check this.

1) Is there a test suite somewhere? The obvious one would be running all of the 
code in the PLAI textbook.  
2) Is there some reason why this change would be a bad idea or cause problems?

John




smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] changing #lang plai to depend on racket rather than scheme?

2011-01-20 Thread John Clements

On Jan 19, 2011, at 1:13 PM, Jay McCarthy wrote:

 2011/1/19 John Clements cleme...@brinckerhoff.org:
 I went looking for the immutable hash table functions in plai today, and I 
 discovered that since plai is based on #lang scheme rather than #lang 
 racket, you need to use old names in a bunch of places.
 
 Just for the heck of it, I went ahead and changed scheme - racket in two 
 places in plai/main.rkt, and... things seem to work fine.  However, I don't 
 see a test suite that I could run to check this.
 
 1) Is there a test suite somewhere? The obvious one would be running all of 
 the code in the PLAI textbook.
 
 There are very small test suites for the core library (datatype and
 test) in tests/plai

Ran 'em all. They all produce what appears to be successful output.  I had to 
change the web example to wrap Hello in (response/xexpr ...); I don't know 
whether that change would have been required anyhow.

I committed and pushed the changes.

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Building without docs

2011-01-21 Thread John Clements

On Jan 18, 2011, at 8:07 AM, Eli Barzilay wrote:

 Two minutes ago, Noel Welsh wrote:
 For posterity, this works:
 
 On Mon, Jan 17, 2011 at 3:12 PM, Robby Findler
 ro...@eecs.northwestern.edu wrote:
 You can also set PLT_SETUP_OPTIONS to -D and then make install will
 avoid building the docs.
 
 This does not:
 
 On Mon, Jan 17, 2011 at 9:02 AM, Sam Tobin-Hochstadt sa...@ccs.neu.edu 
 wrote:
 % make
 % make plain-install
 % raco setup -D
 
 as make plain-install only creates racket.
 
 You should use something like
 
  racket -N raco -l- raco setup -D

There are a bunch of comments in raco's main.rkt about absolutely never ever 
creating a .zo for this file.  Does this call to racket create such a file?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] DrRacket's indentation of curly braces

2011-01-27 Thread John Clements

On Jan 27, 2011, at 8:49 AM, Casey Klein wrote:

 DrRacket indents this program
 
 (a
 )
 
 differently than this program
 
 {a
 }
 
 Is this intentional? I can imagine the behavior being useful for
 Scribble, but it's annoying in a PLAI context where you're using curly
 braces for object language programs.

+1; I'm teaching a PLAI course right now.

John




smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Please fix typo in sxml.plt package on PLaneT?

2011-01-27 Thread John Clements
In the current version of sxml.plt, the info.ss file has a typo. Rather than 
omitting tests.ss from compilation, it omits test.ss, which isn't a file in 
the package.  This means that compiling it pulls in all of schemeunit 3, which 
takes *forever* to compile.  This is a one-character fix, and I'll supply the 
.plt file, if you like.  Would you consider making this change?

Many thanks,

John Clements



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

  1   2   3   4   >