Re: [racket-users] How to draw relative to screen size using worlds?

2017-11-07 Thread Milton Silva
get-display-size does what I want but trying to draw a rectangle with ( rectangle w h "solid" "black") renders a black screen with the top and left borders white. I

Re: [racket-users] How to draw relative to screen size using worlds?

2017-11-07 Thread Luis Sanjuán
Conflicts may arise between 2htdp packages and racket/gui. If you still want to stick to 2htdp awesome libraries you may try to require only what you need. But this would force you to use racket/base instead of *SL, if only because you also need to use `require` options not available in *SL as w

[racket-users] Editor-canvas% and transparent style = black?

2017-11-07 Thread Erich Rast
Hi! This is something I've been wondering for a while already but never had time to ask. When an editor-canvas% is set to transparent in its style list, and I type in it, then the whole editor gets black and nothing can be seen. Shouldn't it be gray, as the window background so it looks as if yo

[racket-users] Re: let-immutable

2017-11-07 Thread Milo Turner
It is fairly easy to create a let-immutable form yourself (define-for-syntax (immutable-variable-transformer new-id) (make-set!-transformer (λ (stx) (syntax-case stx (set!) [(set! x rhs) (raise-syntax-error #f "cannot mutate immutable variable" stx)] [(e ...)

Re: [racket-users] How to draw relative to screen size using worlds?

2017-11-07 Thread Matthias Felleisen
> On Nov 6, 2017, at 7:23 PM, Luis Sanjuán wrote: > > Hi, Matthias. I'm not sure about it either, but one situation where learners > or users might miss it is when they want to share their work. If their code > follows the design principles HtDP teaches, the world rendering will rely on > a s

Re: [racket-users] Editor-canvas% and transparent style = black?

2017-11-07 Thread Erich Rast
I thought this was a known bug that just never gets fixed. This has given a black canvas when you click into the editor on my machine for ages: #lang racket/gui (define testframe% (class frame% (define (init-layout) (letrec ((t (new text%))) (void (new editor-canvas%

Re: [racket-users] Editor-canvas% and transparent style = black?

2017-11-07 Thread Erich Rast
Here is how it looks on my machine: https://vimeo.com/241738557 On Tue, 7 Nov 2017 17:57:27 + Erich Rast wrote: > I thought this was a known bug that just never gets fixed. This has > given a black canvas when you click into the editor on my machine for > ages: > > #lang racket/gui > (defi

Re: [racket-users] let-immutable

2017-11-07 Thread Alex Knauth
> On Nov 7, 2017, at 11:10 AM, Milo Turner wrote: > > It is fairly easy to create a let-immutable form yourself One thing to add to this. If you care about absolute safety, this isn't good enough because you can break it with a three-line my-set! macro: (define-simple-macro (my-set! x e) #:

[racket-users] Finding non-text elements

2017-11-07 Thread David Van Horn
I have some ISL+ programs that are being saved in the WXME format, but I can't seem to find any element in the file that would trigger this format (no images, comment boxes, etc.). Is there some way to figure out why the files are being saved this way in DrRacket? Thanks, David -- You received

Re: [racket-users] Finding non-text elements

2017-11-07 Thread Robby Findler
I believe this is the place that does the check: https://github.com/racket/gui/blob/master/gui-lib/framework/private/text.rkt#L2300 Possibly some printfs in and around there would help? Robby On Tue, Nov 7, 2017 at 1:03 PM, David Van Horn wrote: > I have some ISL+ programs that are being sa

Re: [racket-users] Finding non-text elements

2017-11-07 Thread David Van Horn
Thanks, I found the elements by using wxme-port->port and read-char-or-special until I found something special and it turns out it was caused by fractions. There are a couple weird things: (1) wxme-read reads them as numbers, not specials, and (2) the "fractions" are actually rendered in decimal f

Re: [racket-users] Finding non-text elements

2017-11-07 Thread Robby Findler
On Tue, Nov 7, 2017 at 1:42 PM, David Van Horn wrote: > Thanks, I found the elements by using wxme-port->port and > read-char-or-special until I found something special and it turns out > it was caused by fractions. > > There are a couple weird things: (1) wxme-read reads them as numbers, > not sp

Re: [racket-users] Finding non-text elements

2017-11-07 Thread David Van Horn
On Tue, Nov 7, 2017 at 2:45 PM, Robby Findler wrote: > On Tue, Nov 7, 2017 at 1:42 PM, David Van Horn wrote: >> Other than copy/pasting, I can seem to recreate a decimal-looking >> number that is actually a special fraction, so I'm not sure how the >> author of the file accomplished this. > > The

Re: [racket-users] Finding non-text elements

2017-11-07 Thread Robby Findler
On Tue, Nov 7, 2017 at 1:52 PM, David Van Horn wrote: > On Tue, Nov 7, 2017 at 2:45 PM, Robby Findler > wrote: >> On Tue, Nov 7, 2017 at 1:42 PM, David Van Horn wrote: >>> Other than copy/pasting, I can seem to recreate a decimal-looking >>> number that is actually a special fraction, so I'm not

Re: [racket-users] How to draw relative to screen size using worlds?

2017-11-07 Thread Luis Sanjuán
Nice! Thanks for taking the argument seriously and implementing this so quickly. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googleg