Re: [racket] debugging core dump - comments appreciated

2011-05-24 Thread Neil Van Dyke
Matthew Flatt wrote at 05/23/2011 10:47 PM: Neither the C stack or Scheme stack (yes, they are separate) seems particularly large. There's one overflow of the Scheme stack, but that's not surprising since it starts small and grows on demand. I guess we're back to checking on the stack size. Mayb

Re: [racket] Typed Racket - Successful Conversion

2011-05-24 Thread Robby Findler
Ah! Right. That makes sense. FWIW, raco make will rebuild core libs, too (usually; raco setup definitely does in the cases when raco make can't deal with changes to, say, itself). Robby On Tue, May 24, 2011 at 9:00 PM, Ray Racine wrote: > Unfortunately I'm an emacs acolyte + Geiser and as a res

Re: [racket] Typed Racket - Successful Conversion

2011-05-24 Thread Ray Racine
Unfortunately I'm an emacs acolyte + Geiser and as a result was not getting the zos built that DrRacket would have given me for free. So the slow down I experienced were more than what they would be for most people. Self induced issue. Ultimately I pushed down a lot of the "standard" code into s

Re: [racket] Typed Racket - Successful Conversion

2011-05-24 Thread Robby Findler
DrRacket does this automatically. But the default settings will make .zo files with debugging on -- maybe there is some bad Typed Racket / errortrace interaction that slows down compilation significantly? Robby On Tue, May 24, 2011 at 6:23 PM, Sam Tobin-Hochstadt wrote: > Ray - > > Thanks for t

Re: [racket] Temporary Definitions with ellipses

2011-05-24 Thread Rodolfo Carvalho
Oh yes, it was "obviously there"! Thanks, Rodolfo Carvalho On Tue, May 24, 2011 at 20:13, Robby Findler wrote: > It is in the View menu, the Toolbar menu item. (DrRacket is fairly > platform-independent; anything at that level that works on one > platform works on them all.) > > Robby > > On T

Re: [racket] Temporary Definitions with Ellipses

2011-05-24 Thread Matthias Felleisen
If you wish to work with The Schemer's Guide, use Intermediate Plus Lambda and remember to say (define (afunction x) (local ((define y (* x x)) (define z (+ y 10))) (expt y z))) instead of (define (afunction x) (define y (* x x)) (define z (+ y 10)) (expt y z)))

Re: [racket] Typed Racket - Successful Conversion

2011-05-24 Thread Sam Tobin-Hochstadt
Ray - Thanks for the happy story! As for compile times, what I typically do is use `raco make' on the command line to compile things, which means that typechecking doesn't have to happen repeatedly. For a 10k line project, I would expect this to make a substantial difference when changing files

Re: [racket] Temporary Definitions with ellipses

2011-05-24 Thread Robby Findler
It is in the View menu, the Toolbar menu item. (DrRacket is fairly platform-independent; anything at that level that works on one platform works on them all.) Robby On Tue, May 24, 2011 at 5:49 PM, Rodolfo Carvalho wrote: > A bit unrelated, but is there a setting for DrRacket on Ubuntu to put th

[racket] Typed Racket - Successful Conversion

2011-05-24 Thread Ray Racine
This weekend I completed a 3 weekend exercise converting just short of 10K wc -l lines of racket code. All told it took 3 weekends to get there. I did it because it appears 10K lines is about my conceptual limit given my slovenly documentation habits. The old code worked just fine, however it wa

Re: [racket] lexer-src-pos reports position as #f #f

2011-05-24 Thread Johnny Morrice
Oh dear, I rather fail. Thought that Jays message was to me personally, the message I got did not cc the group. Basically sorry. Time to stop posting. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] lexer-src-pos reports position as #f #f

2011-05-24 Thread Johnny Morrice
Before any one else replies, Jay set me straight! I was a matter of me failing to absorb information from the docs. It's midnight here, and it makes me fail. port-count-lines! was what I needed. Apologies for wasting your time. Johnny. _ For lis

Re: [racket] lexer-src-pos reports position as #f #f

2011-05-24 Thread Jay McCarthy
Did you not enable line counting with port-count-lines! as instructed by the documentation: "Since the lexer gets its source information from the port, use port-count-lines! to enable the tracking of line and column information. Otherwise, the line and column information will return #f." ? Jay

[racket] lexer-src-pos reports position as #f #f

2011-05-24 Thread Johnny Morrice
Hi list, I'm trying to build a lexer with lexer-src-pos from parser-tools/lex. I've written some unit tests which use pipes to provide an input port to the lexer. My problem is that the lexer does not seem to report the correct line numbers. Apparently, the line number is #f. I don't understan

Re: [racket] Temporary Definitions with ellipses

2011-05-24 Thread Rodolfo Carvalho
A bit unrelated, but is there a setting for DrRacket on Ubuntu to put the "toolbar" on the vertical like you had on your Mac? []'s Rodolfo Carvalho On Tue, May 24, 2011 at 17:54, Matthias Felleisen wrote: > > On May 24, 2011, at 2:25 PM, SCIAMACHIST wrote: > > > Lewis Watmore > > > > Hello, >

[racket] Temporary Definitions with Ellipses

2011-05-24 Thread Lewis
Lewis Watmore Thanks to St-Amour, Felleisen, Cleis, and Schatz for your quick response. You are all correct in that I was not using the "Beginning Student" language. I was using #lang racket but also "The Schemer's Guide" in which I had gotten to the part about top-down design and I rem

Re: [racket] Temporary Definitions with ellipses

2011-05-24 Thread Richard Cleis
You need to write a little more content. For example (define (feet->yards f) (define ... "this will be yards") ...) RAC On May 24, 2011, at 8:25 AM, SCIAMACHIST wrote: > Lewis Watmore > > Hello, >I am a "noob" so if this is the wrong place for my question, please direct > me to somew

Re: [racket] `assert' in Typed Racket

2011-05-24 Thread Sam Tobin-Hochstadt
On Tue, May 24, 2011 at 1:41 PM, Richard Lawrence wrote: > Sam Tobin-Hochstadt > writes: > >> (assert x p?) is equivalent to (if (p? x) x (error ...)) except that >> the result is known to have the appropriate type (here `String'). > > Ah, OK, I think I see my mistake; is this the right way to pu

Re: [racket] `assert' in Typed Racket

2011-05-24 Thread Richard Lawrence
Sam Tobin-Hochstadt writes: > (assert x p?) is equivalent to (if (p? x) x (error ...)) except that > the result is known to have the appropriate type (here `String'). Ah, OK, I think I see my mistake; is this the right way to put it? Although the expression (assert x string?) has type String,

[racket] Temporary Definitions with ellipses

2011-05-24 Thread SCIAMACHIST
Lewis Watmore Hello, I am a "noob" so if this is the wrong place for my question, please direct me to somewhere more appropriate. In the DrScheme Companion at "3.3 Finger Exercises on Composing Functions" it is stated that you can create temporary definitions using an ellipsis in thi

Re: [racket] toy graphical list editor

2011-05-24 Thread Matthew Flatt
At Tue, 24 May 2011 15:54:55 +0200, Marijn wrote: > After changing all the values to "1", when pressing an insert-button > *sometimes* the window is resized horizontally (slightly larger width) > and *sometimes* the window flickers to slightly larger horizontally, but > remains the same width. Acco

Re: [racket] getting some weird toplevel values from zo-parse

2011-05-24 Thread Danny Yoo
On Tue, May 24, 2011 at 2:37 PM, Matthew Flatt wrote: > I don't remember whether it was me or someone else, but it's fixed in > the latest docs: > >  Represents a “prefix” that is pushed onto the stack to initiate >  evaluation. The prefix is an array, where buckets holding the values >  for tople

Re: [racket] getting some weird toplevel values from zo-parse

2011-05-24 Thread Matthew Flatt
I don't remember whether it was me or someone else, but it's fixed in the latest docs: Represents a “prefix” that is pushed onto the stack to initiate evaluation. The prefix is an array, where buckets holding the values for toplevels are first, then the buckets for the stxs, then a bucket for

Re: [racket] getting some weird toplevel values from zo-parse

2011-05-24 Thread Danny Yoo
>> which appear to index into offset 83 and 82 of the prefix.  However, >> the prefix is only supposed to have space for 7 num-lifts, plus 68 >> toplevels, plus 1 more bucket to hold syntax. > > No, there's a bucket for each syntax object (plus the one bucket for > having any syntax objects at all)

Re: [racket] getting some weird toplevel values from zo-parse

2011-05-24 Thread Matthew Flatt
At Tue, 24 May 2011 14:08:53 -0400, Danny Yoo wrote: > which appear to index into offset 83 and 82 of the prefix. However, > the prefix is only supposed to have space for 7 num-lifts, plus 68 > toplevels, plus 1 more bucket to hold syntax. No, there's a bucket for each syntax object (plus the one

Re: [racket] `assert', `and' and `or' in Typed Racket

2011-05-24 Thread Sam Tobin-Hochstadt
On Tue, May 24, 2011 at 11:16 AM, Richard Lawrence wrote: > > Curiously, if I change `(assert s string?)' to `(string? s)', the > example passes the type check.  So I guess maybe the short-circuiting > nature of `and' and `or' is a red herring here, and what I don't > understand is something about

[racket] `assert', `and' and `or' in Typed Racket

2011-05-24 Thread Richard Lawrence
Hi everyone, I've been starting out learning Typed Racket, which I've enjoyed quite a lot -- thanks! I've run into a snag several times now that I wanted to ask the experts about: does TR know about short-circuiting `and' and `or'? (If not, why not?) If so, how do they interact with `assert'?

[racket] getting some weird toplevel values from zo-parse

2011-05-24 Thread Danny Yoo
When I use zo-parse on some Typed Racket code, I'm seeing toplevel references that try to index out-of-bounds of the enclosing prefix, which doesn't seem right. The AST I've been inspecting is a little gnarly, so I'll upload it here: http://hashcollision.org/tmp/investigating.txt I'm zo-pars

Re: [racket] line-spacing in scribble?

2011-05-24 Thread Matthew Flatt
At Tue, 24 May 2011 16:47:55 +0200, Marijn wrote: > is it possible to set the line-spacing in scribble documents? I searched > for `line-spac' in the manual but that only seems to find racket/gui > methods... That's normally left to format-specific configuration, such as CSS for HTML output or mac

[racket] line-spacing in scribble?

2011-05-24 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, is it possible to set the line-spacing in scribble documents? I searched for `line-spac' in the manual but that only seems to find racket/gui methods... Thanks, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Usi

Re: [racket] toy graphical list editor

2011-05-24 Thread Marijn
Hi Matthew, On 05/24/11 05:02, Matthew Flatt wrote: > At Mon, 23 May 2011 16:04:24 +0200, Marijn wrote: >> I'm trying to implement a toy graphical list editor program to get a >> feel for GUI programming in racket. Basic idea is a graphical >> representation of a list with text-field%s alternated

Re: [racket] using syntax/modcode and make-base-namespace

2011-05-24 Thread Matthew Flatt
At Tue, 24 May 2011 08:39:39 -0400, Matthias Felleisen wrote: > > To fix this pronlem, the Matrix snip class should be changed to set a > > different snip-class name to support non-GUI mode. > > So how do I do that? Instead of #"(lib \"matrix.ss\" \"htdp\")", the snipclass name should be #"((lib

Re: [racket] using syntax/modcode and make-base-namespace

2011-05-24 Thread Matthias Felleisen
On May 23, 2011, at 11:08 PM, Matthew Flatt wrote: > I think the problem is with the Matrix snip class, which has only a > GUI-compatible implementation and not a non-GUI implementation. There actually is a non-gui matrix implementation, which is why the whole thing is organized with units. B

Re: [racket] flock() stops racket-5.1.1 build on Solaris x86

2011-05-24 Thread Matthew Flatt
At Tue, 24 May 2011 12:33:47 +0100, Tim Brown wrote: > > From a Racket implementor's perspective, the BSD side has it right. > > It's not just subroutines within Racket, but different threads within a > > single Racket process that might compete for a file lock; when a thread > > fails to obtain a

Re: [racket] flock() stops racket-5.1.1 build on Solaris x86

2011-05-24 Thread Tim Brown
On 24/05/11 03:28, Matthew Flatt wrote: At Mon, 23 May 2011 12:52:12 +0100, Tim Brown wrote: Solaris seems to take quite a dim view of flock(); from man flock(): That's nothing compared to the dim view of F_SETLK in the BSD world. Ooh... this sounds like it could get religious! From a Rac

Re: [racket] USE_SINGLE_FLOATS_AS_DEFAULT stops racket-5.1.1 build on Solaris x86

2011-05-24 Thread Tim Brown
Matt, In racket/src/number.c and racket/src/numstr.c, replacing "single" with "sngl" when it is used as a variable name works. Well spotted with the keyword clash! Thanks, Tim On 24/05/11 03:41, Matthew Flatt wrote: Does renaming the variable to `sgl' fix the problem? My guess is that `sing