Re: [racket-users] DrRacket docs broken for Safari when opened once from dmg

2020-09-06 Thread gfb
Solved: in Safari Preferences check the "Show Develop menu in menu bar" 
option, then select "Empty Caches" in the new "Develop" menu that appears.

On Sunday, September 6, 2020 at 6:32:55 PM UTC-4 gfb wrote:

> I can live with this. It happened because I wanted to see what happens 
> with current macOS and DrRacket version, and what it takes to fix it, when 
> launching from dmg. Some non-cs 1st year students launch from dmg each term 
> despite screenshots, warnings, and demonstrating the correct process in 
> lecture. But this term my course is for 3rd year cs students, so (if this 
> isn't idiosyncratic) they're less likely to get into the situation or can 
> install firefox if they haven't already and switch default browser while 
> using drracket.
>
> On Sunday, September 6, 2020 at 6:20:23 PM UTC-4 gfb wrote:
>
>> I tried raco setup first, clearing Safari history and data, toggling 
>> javascript, restarting the computer, switching default browser, fresh 
>> installs including downloading from a different site to trigger the os 
>> asking for permission again. Those all result in the following (which is 
>> why I tried some of those things).
>>
>> The doc search within DrRacket goes to 
>> "file://private/var/folders/.../plt-sendurl-contents-file-.html",
>>  
>> and that page simply says "Please go here" where "here" is a link to 
>> "file:///Users/gfb/Library/Racket/7.8/doc/search/index.html" which doesn't 
>> work from that link. But copy-pasting the link goes to the search page but 
>> without the style sheet applied. The general "Help Desk" documentation is 
>> fine, but then clicking on "Search Manuals" goes to a non-functional 
>> version of the search page.
>>
>> Everything works in Firefox though, which is why I was thinking some 
>> Safari caching or being picky about running some of the javascript for 
>> security reasons.
>>
>> On Sunday, September 6, 2020 at 6:02:19 PM UTC-4 Robby Findler wrote:
>>
>>> I recall this as a bug that we fixed. Are you seeing this problem with 
>>> the latest version?
>>>
>>> I cannot recall the details anymore, but it might work to run "raco 
>>> setup" from the command line (with the raco that's not on the dmg).
>>>
>>> Robby
>>>
>>>
>>> On Sun, Sep 6, 2020 at 3:56 PM gfb  wrote:
>>>
>>>>
>>>> Is there way to reset the documentation state after DrRacket was opened 
>>>> from dmg once. The f1 search with Safari as default browser on macOS 
>>>> Catalina doesn't work, even after removing ~/Libary/Racket and 
>>>> ~/Library/org.racket-lang.prefs.rktd and ~/Libary/PLT-*, ejecting the 
>>>> dmg, and re-launching from /Applications/Racket 7.8.
>>>>
>>>> -- 
>>>> 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...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/racket-users/35986d31-1838-4adb-a70c-7740cf6fc52fn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/racket-users/35986d31-1838-4adb-a70c-7740cf6fc52fn%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/3936904e-ecfb-4b2f-bde6-3c0fae8ba291n%40googlegroups.com.


Re: [racket-users] DrRacket docs broken for Safari when opened once from dmg

2020-09-06 Thread gfb
I can live with this. It happened because I wanted to see what happens with 
current macOS and DrRacket version, and what it takes to fix it, when 
launching from dmg. Some non-cs 1st year students launch from dmg each term 
despite screenshots, warnings, and demonstrating the correct process in 
lecture. But this term my course is for 3rd year cs students, so (if this 
isn't idiosyncratic) they're less likely to get into the situation or can 
install firefox if they haven't already and switch default browser while 
using drracket.

On Sunday, September 6, 2020 at 6:20:23 PM UTC-4 gfb wrote:

> I tried raco setup first, clearing Safari history and data, toggling 
> javascript, restarting the computer, switching default browser, fresh 
> installs including downloading from a different site to trigger the os 
> asking for permission again. Those all result in the following (which is 
> why I tried some of those things).
>
> The doc search within DrRacket goes to 
> "file://private/var/folders/.../plt-sendurl-contents-file-.html",
>  
> and that page simply says "Please go here" where "here" is a link to 
> "file:///Users/gfb/Library/Racket/7.8/doc/search/index.html" which doesn't 
> work from that link. But copy-pasting the link goes to the search page but 
> without the style sheet applied. The general "Help Desk" documentation is 
> fine, but then clicking on "Search Manuals" goes to a non-functional 
> version of the search page.
>
> Everything works in Firefox though, which is why I was thinking some 
> Safari caching or being picky about running some of the javascript for 
> security reasons.
>
> On Sunday, September 6, 2020 at 6:02:19 PM UTC-4 Robby Findler wrote:
>
>> I recall this as a bug that we fixed. Are you seeing this problem with 
>> the latest version?
>>
>> I cannot recall the details anymore, but it might work to run "raco 
>> setup" from the command line (with the raco that's not on the dmg).
>>
>> Robby
>>
>>
>> On Sun, Sep 6, 2020 at 3:56 PM gfb  wrote:
>>
>>>
>>> Is there way to reset the documentation state after DrRacket was opened 
>>> from dmg once. The f1 search with Safari as default browser on macOS 
>>> Catalina doesn't work, even after removing ~/Libary/Racket and 
>>> ~/Library/org.racket-lang.prefs.rktd and ~/Libary/PLT-*, ejecting the 
>>> dmg, and re-launching from /Applications/Racket 7.8.
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/racket-users/35986d31-1838-4adb-a70c-7740cf6fc52fn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/racket-users/35986d31-1838-4adb-a70c-7740cf6fc52fn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/09f5b0af-64a8-422b-8051-74d6b1418409n%40googlegroups.com.


Re: [racket-users] DrRacket docs broken for Safari when opened once from dmg

2020-09-06 Thread gfb
I tried raco setup first, clearing Safari history and data, toggling 
javascript, restarting the computer, switching default browser, fresh 
installs including downloading from a different site to trigger the os 
asking for permission again. Those all result in the following (which is 
why I tried some of those things).

The doc search within DrRacket goes to 
"file://private/var/folders/.../plt-sendurl-contents-file-.html",
 
and that page simply says "Please go here" where "here" is a link to 
"file:///Users/gfb/Library/Racket/7.8/doc/search/index.html" which doesn't 
work from that link. But copy-pasting the link goes to the search page but 
without the style sheet applied. The general "Help Desk" documentation is 
fine, but then clicking on "Search Manuals" goes to a non-functional 
version of the search page.

Everything works in Firefox though, which is why I was thinking some Safari 
caching or being picky about running some of the javascript for security 
reasons.

On Sunday, September 6, 2020 at 6:02:19 PM UTC-4 Robby Findler wrote:

> I recall this as a bug that we fixed. Are you seeing this problem with the 
> latest version?
>
> I cannot recall the details anymore, but it might work to run "raco setup" 
> from the command line (with the raco that's not on the dmg).
>
> Robby
>
>
> On Sun, Sep 6, 2020 at 3:56 PM gfb  wrote:
>
>>
>> Is there way to reset the documentation state after DrRacket was opened 
>> from dmg once. The f1 search with Safari as default browser on macOS 
>> Catalina doesn't work, even after removing ~/Libary/Racket and 
>> ~/Library/org.racket-lang.prefs.rktd and ~/Libary/PLT-*, ejecting the 
>> dmg, and re-launching from /Applications/Racket 7.8.
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/35986d31-1838-4adb-a70c-7740cf6fc52fn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/racket-users/35986d31-1838-4adb-a70c-7740cf6fc52fn%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/3491d359-17be-4aa9-9828-cd2d75e83d8dn%40googlegroups.com.


[racket-users] Re: DrRacket docs broken for Safari when opened once from dmg

2020-09-06 Thread gfb
More specifically, the search is broken. I can navigate to 

On Sunday, September 6, 2020 at 4:56:00 PM UTC-4 gfb wrote:

>
> Is there way to reset the documentation state after DrRacket was opened 
> from dmg once. The f1 search with Safari as default browser on macOS 
> Catalina doesn't work, even after removing ~/Libary/Racket and 
> ~/Library/org.racket-lang.prefs.rktd and ~/Libary/PLT-*, ejecting the 
> dmg, and re-launching from /Applications/Racket 7.8.
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/86c4c5a6-ad52-4cdc-a5cb-7a8bcdd0752cn%40googlegroups.com.


[racket-users] DrRacket docs broken for Safari when opened once from dmg

2020-09-06 Thread gfb

Is there way to reset the documentation state after DrRacket was opened 
from dmg once. The f1 search with Safari as default browser on macOS 
Catalina doesn't work, even after removing ~/Libary/Racket and 
~/Library/org.racket-lang.prefs.rktd and ~/Libary/PLT-*, ejecting the dmg, 
and re-launching from /Applications/Racket 7.8.

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/35986d31-1838-4adb-a70c-7740cf6fc52fn%40googlegroups.com.


[racket-users] Re: [racket users] %app question

2020-08-13 Thread gfb
I'm not completely sure what you want, so the following handles both 
unbound identifiers in function position, as well as expressions in 
function position that have a value but the value is not a procedure. It 
delegates to a macro and a function respectively, that you can play with 
separately without fully understanding the main handler. 

#lang racket

; We'll override ...
#;(f a ...) ; ... when f is not a macro, i.e. when this is by default a 
function call.

(module app-hook racket
  
  (provide (rename-out [our-app #%app]))
  
  (require syntax/parse/define)

  ; Will delegate to here at expansion time when f is an unbound 
identifier, for maximum control.
  (define-simple-macro (call-with-unbound f a ...)
; For example, you could ...
(list 'f a ...))

  ; Will delegate to here at run time if f evaluates to a non-procedure.
  (define (call-with-non-procedure f . as)
; For example, you could ...
(list* f as))

  (define-syntax-parser our-app
[(_ f:id a ...)
 #:when (not (identifier-binding #'f))
 (syntax/loc this-syntax
   (call-with-unbound f a ...))]
[(_ f a ...)
 (syntax/loc this-syntax
   (let ([f-value f]) ; standard macro side-effect safety : evaluate f 
expression only once
 (if (procedure? f-value)
 (f-value a ...)
 (call-with-non-procedure f-value a ...]))

(require 'app-hook)

(g (length '(a b c))) #;'(g 3)

(length (g '(a b c))) #;2

((+ 1 2) (+ 30 40 50)) #;'(3 120)

((println "once"))

; To Do (for an “industrial strength” version) : are we okay with the error 
messages from ...
#;()
#;(a . b)
#;(#:k)
#;((values 1 2))

On Thursday, August 13, 2020 at 3:55:42 PM UTC-4 lysseus wrote:

> Hi guys,
>
> Pollen makes use of something like this:
>
> (require syntax/parse/define)
>
> (define-simple-macro (#%top . x) 'x)
>
>
> and it comes in handy in some of my projects. But I’m wondering if there’s 
> an equivalent for redirecting an application that hasn’t been defined? 
>
> In other words, if foo is not a procedure then (foo 1 2 3) would redirect 
> to (do-this foo 1 2 3) where do-this is defined?
>
> Any help is appreciated. 
>
> Thanks!
>
> Kevin

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/025156f8-ec1c-46cd-a924-7a8f731fc6e0n%40googlegroups.com.


Re: [racket-users] reading s-expressions from a file

2020-07-17 Thread gfb
Shouldn't the for be (for ([expr (in-producer read eof)] ⋯). One could also 
specify the input port there, as shown in reference for in-producer 

 
, possibly inside call-with-input-file (although that vs 
with-input-from-file is probably a matter of taste).

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/d1583583-f98b-47fe-a6b8-5dd295bceef8n%40googlegroups.com.


[racket-users] Re: Button click callback syntax

2020-05-12 Thread gfb
The difference is whether you are evaluating an expression, versus
putting it inside a function to be evaluated when the function is called.

(require racket/gui)

; Call message-box, get an immediate effect ...
(message-box "What do you think?" "hi, would you like a tomato" #f 
'(yes-no))
; The result ('yes or 'no) is printed in the repl/Interactions.

; Create a function/procedure, that takes no arguments, and its body calls 
message-box ...
(lambda () (message-box "Greeting" "hi, would you like a tomatillo" #f 
'(yes-no)))
; That which prints as # since it's a function, and we didn't 
call it.

; To call a function we put parentheses around it ...
((lambda () (message-box "Greeting" "hi, would you like a pomodoro" #f 
'(yes-no)))
 )
; That evaluated the body.

; Name a function ...
(define greeter (lambda () (message-box "Greeting" "hi, would you like a 
green tomato" #f '(yes-no
; That didn't call it, and neither do ...
greeter
greeter
; Those just mention the function, which prints as #.
; Call it to evaluate the body ..
(greeter)

By the way, your examples that don't wait 30 minutes actually do,
and if you wait 30 minutes they will try to call the callback, which
is not a function but the 'ok result from the message-box.

Try setting the timer to something shorter, and then wait after
you click the immediate message box, then when the timer
goes off there will be an error something like ...
application: not a procedure;
 expected a procedure that can be applied to arguments
  given: 'ok
  arguments...: [none]

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/884d5359-b94f-49ec-b9d5-699dfd844c6c%40googlegroups.com.


[racket-users] Re: My macro works in the global namespace, but fails inside of a let

2019-10-06 Thread gfb
Hmm, maybe you'd find “parameters” (not to be confused with function 
parameters) useful for your goals.

#lang racket

(define current_meaning (make-parameter "some string"))

(define (display_current_meaning)
  (display (current_meaning)))

(display_current_meaning)

(let ()
  (parameterize ([current_meaning "a different string"])
(display_current_meaning)))

(display_current_meaning)

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/47a28e82-eb5f-418d-8f45-71876c561719%40googlegroups.com.


[racket-users] Re: My macro works in the global namespace, but fails inside of a let

2019-10-06 Thread gfb
No doubt you will soon get more precise answers, and help for your goal, 
from others, but the first step is that macros in scheme and racket are not 
straight textual substitutions.

The a_definition in the template of my_macro has much the same scope as it 
would if my_macro were just a function (defined with define, and then I'd 
refer to (display a_definition) as “the body” rather than “the template”).

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/f88821df-5cac-40fb-a097-ee94ca25c066%40googlegroups.com.


[racket-users] Re: Package server broken, at least five hundred intro cs students affected!

2019-10-06 Thread gfb
Thank you so much, including for the quick turnaround, on a Sunday no less, 
once you found out!

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/4f4c-a95b-4dca-80a0-3efa30e6f851%40googlegroups.com.


[racket-users] Package server broken, at least five hundred intro cs students affected!

2019-10-05 Thread gfb
Could we figure out:

1. What's wrong with the package server's indexing of updated packages, so 
my students can proceed.
2. An official channel to report problems with the package server.
3. If funding specifically earmarked to support monitoring of and feedback 
from that channel, fixing of issues, and general reliability work, would 
help, because I would be happy to contribute some of my professional 
development funds to that.

Thanks,
 Gary Baumgartner

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/fa5fc7b1-db94-4de9-af43-85908424%40googlegroups.com.


[racket-users] Could someone check on the package server

2019-10-04 Thread gfb
Indexing of updated packages is broken.

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/70ee1f17-8f80-47cc-b779-a9b8f4d42b66%40googlegroups.com.


[racket-users] Re: drracket: disabling tools in edit -> preferences -> tools

2019-09-20 Thread gfb
Yes, the  How To Design Programs  (and possibly  DeinProgramm ) tool relies 
on the  Test Engine  tool.

If you have a moment to do so, I'd encourage filing this consequence as an 
issue on GitHub.

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/02e1397f-7e64-41a2-97a5-81ef7779a207%40googlegroups.com.


[racket-users] Re: REPL printing importance?

2019-09-11 Thread gfb
Having the distinction between displayed and printed representation is very 
important.

Responsiveness is very important, so I'd like to see large values handled 
better.

Simply guarding against the accidental printing of a looong list would be 
nice. Printing truncated, with a clickable "...", as is used in number snip 
decimal expansions, and I only recently learned is a thing for error 
messages, would be very nice.

Allowing image snips to have a visual size different from their actual size 
would be nice (iirc bootstrap's and/or pyret's web editors do this).

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/db2653a8-b9ae-4a57-a077-187b5fbf0e99%40googlegroups.com.


Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2

2019-07-24 Thread gfb
On Wednesday, July 24, 2019 at 1:40:25 PM UTC-4, sk wrote:
>
> To riff on Will's message:
>
> In the Bootstrap:Algebra 
>  materials, we use 
> Racket syntax because it's a powerful pedagogic device. Recently, for 
> various reasons, we've ported this over to another language called Pyret 
> (while also maintaining the Racket version; it hasn't been deprecated). 
>
> Pyret has an almost-traditional infix syntax. It turns out infix is 
> actually much worse for the concepts we try to teach in that curriculum. Of 
> course it can be done, but the irregularity of infix — which is barely 
> noticed or even appreciated in some contexts — is a real headache there. We 
> have to work against it, rather than it working for us.
>
> So, especially in education:
>
> (a) the subtleties of syntax are manifold and sometimes unexpected
>
> (b) there's an enduring value to our (beloved) syntax, so it'll never go 
> away (-:
>
> Shriram
>

In our CS1 for humanities and social science the parenthetical syntax has 
not only not been a problem, it really appears far easier/better. As sk and 
other bootstrappers and htdpers have known for a long time, unless one 
focuses on already familiar numerical algebraic expressions, irregularity 
is a hindrance.

I've taught the exact same material at the start of a 3rd year CS PL 
course, and the students there didn't find the syntax as easy as one would 
hope for students with that much CS “experience”. In fact, unsurprisingly, 
many find the syntax as hard as expected for having trained on very 
different syntaxes (especially when they are unclear about the semantics 
that were attached to those syntaxes). Although the switch to teaching the 
start of the course with literally the same materials, with the students 
knowing that, seems to have reduced resistance substantially (presumably 
they don't want to be seen as complaining about something 1st year 
humantities students are fine with).

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/e615518f-4f81-4fae-bed1-2a221ebddc66%40googlegroups.com.


[racket-users] Re: Reflecting on the lexical environment at macro expansion time

2019-07-17 Thread gfb
On Wednesday, July 17, 2019 at 4:35:21 PM UTC-4, William J. Bowman wrote:
>
> I'm trying to write a macro that reflects on which identifiers are in 
> scope in 
> the environment when it runs, and on the identifiers in scope for its 
> generated 
> code. 
> It should act something like this: 
>
>   (define-syntax (display-env stx) 
> (syntax-case stx () 
>   [(_) 
>(printf "Env: ~a" (local-environment))])) 
>
>   > (lambda (x) (display-env) x) 
>   Env: '(x) 
>   # 
>   > (lambda (x) (let-syntax ([y (make-rename-transformer #'x)]) 
> (display-env) y)) 
>   Env: '(y x) 
>   # 
>
> Presumably, the expander knows which identifiers are in scope, so I 
> *ought* to 
> be able to get my hands on that set. 
>
> namespaces aren't the thing; they only give me access to the top-level 
> definitions, as far as I can tell. 
> I also want access to any lexical identifiers introduced by `λ` or `let` 
> or 
> `let-syntaxes` or `let-values` etc. 
> But I want to be able to use them pretty much like namespaces: get the 
> list of 
> symbols in scope, and get their values and identifiers. 
>
> Any one know how to do this? 
>
> -- 
> William J. Bowman 
>

Take a look at  syntax-debug-info 

 
, which you can see used in  
https://github.com/AlexKnauth/debug/blob/master/debug/repl.rkt 
.


-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/7b0eb8f1-b9cb-4065-9a90-1708237d5040%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Racket2 and syntax

2019-07-15 Thread gfb


On Monday, July 15, 2019 at 9:52:43 AM UTC-4, cwebber wrote:
>
> Maciek Godek writes: 
>
> > Maybe the direction similar to where "I think we should be heading" is 
> > somewhere between Mathematica notebooks and Smalltalk's object 
> environments. 
>
> I had similar-ish thoughts while watching the excellent Fructure talk at 
> this year's RacketCon: maybe intro courses would be more willing to pick 
> up Racket and not be scared of its syntax if the default educational 
> language was more like Scratch.  One nice thing about Fructure is that 
> it didn't present any parentheses, but I suspect that the way that it 
> presented grouping meant that if you eventually switched from that mode 
> of writing code over to textual parenthetical notification, it would 
> feel like a fairly natural shift. 
>

I've put a package tightlight on the server that “tightens” the 
highlighting in DrRacket:

Pointing out that it's essentially Scratch's syntax has been helpful in 
many discussions,
 as has using it with faint blue parentheses reminiscent of the subtle 
lined paper lines
 that many are used to not noticing consciously.

There's a View menu item to turn off the outlines, change whether the 
outline boxes
 are horizontally and/or vertically inset, or revert to standard DrRacket.

The package was a hack for a colleague who was teaching our course for 
non-majors
 in 2012, and we still use it. The implementation is a hack because some 
method needing
 to be overriden was private or final, so every method that used it was 
copied to intercept 
 that use. Also, I can't resist exploring coding approaches so all the 
copied code was
 rewritten in various ways.

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/e8624fd3-fc40-4437-8948-cddd65e6c7c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Confused by match

2018-08-16 Thread gfb
This is an undocumented limitation of match:

   - issue on github 
   - issue on github 
   

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: How to resolve phase errors on require/provide for macros

2018-08-14 Thread gfb
You're losing the binding information by doing syntax->datum. Here's a 
quick change to get you unstuck:

...
   (only-in racket/list partition flatten append-map))) 
; Include append-map
...
   (partition (syntax-parser [(flag _) (syntax-e #'flag)])
  (syntax->list #'(item ...)))])
   (define flat-mand (append-map (syntax-parser [(_ (kw contr)) 
(list #'kw #'contr)])
 mandatory))
   (define flat-opt (append-map (syntax-parser [(_ (kw contr)) 
(list #'kw #'contr)])
optional))
...

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Scribble Top-level Evaluation Order of Define

2017-12-07 Thread gfb
>From the docs for scribble/base:
 

> The scribble/base 
>  language 
> provides functions and forms that can be used from code written either in 
> Racket or with @ expressions. It essentially extends racket/base 
> , except that 
> top-level forms within a module using the scribble/base 
>  language 
> are treated as document content (like scribble/doclang 
> 
> ).


It sounds like it might be doing something special with top-level forms. 
The docs for scribble/doclang say this:

The first three elements in the #%module-begin 
> ’s
>  
> body must be the id, post-process, and exprs arguments.


Expanding your example with the macro stepper, witht "Macro hiding:" 
Disable, ends up with:

(module anonymous-module scribble/base/lang
>   (#%module-begin
>(⋯)
>(define-values (foo) (begin (#%app printf (quote "two")) (quote 
> "three")))
>(⋯)
>(define-values (doc)
>  (#%app values (#%app idY184 lifted.0 (#%app list
>  (quote "\n")
>  (#%app:18 
> check-pre-part:19
>(#%app:20 
> printf (quote "one"))
>   
>  (quote-syntax:19 loc:19))
>  (quote "\n")
>  (#%app:21 
> check-pre-part:22
>(#%app:23 
> printf foo)
>   
>  (quote-syntax:22 loc:22))
>  (quote "\n")
>(#%provide:24 doc)))


So what it's doing is gathering all top-level definitions and moving them 
before the top-level expressions, to then define the document as a 
combination of the expressions. 

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Readers and Namespaces

2017-08-18 Thread gfb
Assuming the setup where you make a module syntax object and call strip-context 
on it, you can add a scope to all the user's identifiers after that so they're 
not considered “above” any of the language's identifiers. Make a function to do 
the marking:

(define marker (make-syntax-introducer #true))

Then walk the syntax object tree and replace each user identifier ‘id’ with 
(marker id 'add). Depending on your parsing setup, you could have a specific 
non-terminal for places a user identifier occurs and have a very generic syntax 
tree walker that looks for the non-terminal and adds the mark to the identifier.

If you make a second marker for all other identifiers you encounter, then none 
of the user's identifiers will be “under” the language's bindings, and error 
messages will be better if the user accidentally uses (without binding) one of 
the language's names.

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Printing tokenizer-colored output to the DrRacket Interactions

2017-07-25 Thread gfb
I've made a language that exposes drracket:rep:current-rep. Code written in the 
language can use it to display text and images, and add regions to be colored. 
But there are occasional errors. Instead of posting the errors, which vary, and 
are difficult to reliably reproduce, I'm wondering what is the safest way to 
attempt this, before testing and debugging it.

Currently, when there will be “code” to print, the sequence I use is: begin an 
edit sequence, print the code by printing formatted strings and images using 
`display`, flush the output before getting any position information, end the 
edit sequence, then add the printed region to the end of the colorer's regions.

The reason for printing strings and images is to print some parentheses as 
brackets, do custom line-breaking and indentation, and include image literals. 
What can be done to make that safe(r)? Presumably it's possible, since the 
user's REPL input is colored and remains colored, and navigable as an 
s-expression.

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Readers' understanding of the intent of “Quick: An Introduction [...]” and the HtDP2e “Prologue: [...]”.

2017-04-10 Thread gfb
You are of course right that the term “exercise” doesn't appear where I thought 
it did, and I should have double-checked. The person reading the Prologue 
referred to these as exercises:

“Before you read on, ponder the following changes to your program: [...]
 Better than pondering is doing. It’s the only way to learn. So don’t let us 
stop you. Just do it.”

Earlier in the Prologue it says: “And now you’re ready to write programs that 
make rockets fly.”

As for the links to BSL documentation: if a reader clicks on one of the links 
then I'd like to consider why they clicked. If it's because they're unsure 
about something and see, e.g., ‘(+ x y z ...) → number’, they're unlikely to 
feel more  informed or be reassured.

I'll follow up with proposals, all of which will likely be small 
notes/reminders about the spirit of the Prologue, in certain key places. In 
other words, yes, weaving in the explanations you provided for me in your 
response.

On Monday, 10 April 2017 12:27:33 UTC-4, Matthias Felleisen  wrote:
> To start with, thank you for pointing out hurdles for “beginners” or “people 
> new to Racket.” We listen and we want to improve this material so that 
> everyone can design programs (either Racket or BSL). 
> 
> Let me speak to HtDP/2e because I am responsible for it. I will let Matthew 
> speak to Quick. 
> 
> — I do not know how to address your comment about exercises because the 
> Prologue does not contain any. There is a link to an exercise way into the 
> weeds for exactly the one link that is complicated. 
> 
> — I followed many links from the Prologue to the Docs. There is one 
> overwhelming link: the one to animate. But given the context, I don’t 
> understand why anyone would even want more documentation. The book itself 
> spells out what the function does. Yes, in some sense this is complicated 
> because functions on functions are nothing that people encounter. My hope is 
> that students copy and paste this expression into DrRacket and see a rocket 
> fly. Hello world. 
> 
> — I really do not expect more than ‘read and copy and play and feel somewhat 
> confused.’ That’s why I announce it in the Preface. 
> 
> — I also wrap up the Prologue with “You are not a programmer. Let’s get 
> started.” 
> 
> POSSIBLE ACTIONS: 
> 
> — I could try to turn the links off in the Prologue. But I want to get 
> students in the mind set — look at the docs — because programmers must learn 
> to look at docs. Unless they want to stay Stackoverflow coders. 
> 
> — I could try to weave in another warning into the Prologue that this is 
> meant to be read quickly in the above spirit. 
> 
> — Do you have any other proposals? 
> 
> 
> 
> 
> 
> 
> 
> 
> > On Apr 9, 2017, at 2:45 PM, gfb <g...@cs.toronto.edu> wrote:
> > 
> > The short summary of this post is: should/could something be added to 
> > clarify the purpose of those materials and reassure newcomers who read them.
> > 
> > “Quick: An Introduction to Racket with Pictures”, and HtDP2e “Prologue: How 
> > to Program”, are both very nice introductions in the sense of “making the 
> > reader aware of”. They cover a lot of material, and the careful selection 
> > of examples, and the narrative, are informative without being misleading.
> > 
> > Quick says: “This tutorial provides a brief introduction [...]”. Two 
> > newcomers [one a programmer, one not] took that to mean it's an 
> > “introductory tutorial” in the sense of not just “assuming no familiarity”, 
> > but also “some basics to get started”. The two readers misunderstood some 
> > of the material, and how much they should understand the material. Without 
> > talking to me they might have been put off continuing with racket. They 
> > provided feedback about what they had trouble with, but it was based on 
> > them having the impression that Quick was something designed more like the 
> > HtDP2e Prologue.
> > 
> > For the HtDP2e Prologue, the Preface does mention: “Once finished, any 
> > beginner is bound to feel simultaneously empowered and overwhelmed.”. But a 
> > newcomer with a degree in Philosophy missed or didn't retain that, and read 
> > the Prologue even more strongly as “the basics to get started” since it was 
> > in a textbook for beginning programmers. She got very far, but was indeed 
> > overwhelmed. In particular, she read the Exercises as things she should be 
> > able to do as warmups before starting what she assumed was more difficult 
> > “serious” material following the Prologue. When she contacted me, I had to 
> > assure her that the rest of the book covers the material, more slowly, more 
> > completely, in more detail.
> > 
> > Includ

Re: [racket-users] What is meant to be the public API of ‘drracket:rep:text<%>’ ?

2017-04-09 Thread gfb
Ok, for reference, in ‘share/pkgs/drracket/drracket/private/rep.rkt’ it extends:

  (class->interface text%)
  text:ports<%>
  editor:file<%>
  racket:text<%>
  color:text<%>

Of the methods it adds to that, the ones not documented under 
‘drracket:rep:text%’ are:

  copy-next-previous-expr
  copy-prev-previous-expr
  copy-previous-expr
  get-context
  get-definitions-text
  get-error-ranges
  get-prompt
  reset-error-ranges


On Sunday, 9 April 2017 16:00:41 UTC-4, Daniel Feltey  wrote:
> I think the intention of the docs is that `drracket:rep:text<%>` is the 
> interface for all of the methods listed under the `drracket:rep:text%` class. 
> It looks like at the very least it extends the `racket:text<%>` interface, 
> this is likely just an oversight in the documentation.
> 
> Dan
> 
> 
> 
> On Sun, Apr 9, 2017 at 2:50 PM, gfb <g...@cs.toronto.edu> wrote:
> The docs for ‘drracket:rep:text<%>’ just say it's an interface, without 
> listing any interfaces it extends, nor methods it contains. Is there a public 
> API it's meant to have and have documented?
> 
> 
> 
> --
> 
> 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...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.



On Sunday, 9 April 2017 16:00:41 UTC-4, Daniel Feltey  wrote:
> I think the intention of the docs is that `drracket:rep:text<%>` is the 
> interface for all of the methods listed under the `drracket:rep:text%` class. 
> It looks like at the very least it extends the `racket:text<%>` interface, 
> this is likely just an oversight in the documentation.
> 
> Dan
> 
> 
> 
> On Sun, Apr 9, 2017 at 2:50 PM, gfb <g...@cs.toronto.edu> wrote:
> The docs for ‘drracket:rep:text<%>’ just say it's an interface, without 
> listing any interfaces it extends, nor methods it contains. Is there a public 
> API it's meant to have and have documented?
> 
> 
> 
> --
> 
> 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...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] What is meant to be the public API of ‘drracket:rep:text<%>’ ?

2017-04-09 Thread gfb
The docs for ‘drracket:rep:text<%>’ just say it's an interface, without listing 
any interfaces it extends, nor methods it contains. Is there a public API it's 
meant to have and have documented?

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] What precisely is the type/contract ‘TST’ ?

2017-04-09 Thread gfb
Is it legacy, or is there a current reason/heuristic to choose it over ‘any/c’ ?

On Sunday, 9 April 2017 14:14:29 UTC-4, Jay McCarthy  wrote:
> TST means The Scheme Type, i.e. everything is permitted. 
> 
> 
> Jay
> 
> 
> 
> On Sun, Apr 9, 2017 at 1:02 PM gfb <g...@cs.toronto.edu> wrote:
> It appears, e.g., in:
> 
> 
> 
>   (send a-drracket:rep:text display-results results) → void?
> 
>   results : (list-of TST)
> 
> 
> 
> A search of all racket files shows it used at times for values to be 
> displayed, but I can't find a definition of the term, nor just what it's 
> [presumably] an acronym or abbreviation for.
> 
> 
> 
> --
> 
> 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...@googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 
> 
> 
> 
> -=[     Jay McCarthy               http://jeapostrophe.github.io    ]=-
> -=[ Associate Professor        PLT @ CS @ UMass Lowell     ]=-
> -=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Readers' understanding of the intent of “Quick: An Introduction [...]” and the HtDP2e “Prologue: [...]”.

2017-04-09 Thread gfb
The short summary of this post is: should/could something be added to clarify 
the purpose of those materials and reassure newcomers who read them.

“Quick: An Introduction to Racket with Pictures”, and HtDP2e “Prologue: How to 
Program”, are both very nice introductions in the sense of “making the reader 
aware of”. They cover a lot of material, and the careful selection of examples, 
and the narrative, are informative without being misleading.

Quick says: “This tutorial provides a brief introduction [...]”. Two newcomers 
[one a programmer, one not] took that to mean it's an “introductory tutorial” 
in the sense of not just “assuming no familiarity”, but also “some basics to 
get started”. The two readers misunderstood some of the material, and how much 
they should understand the material. Without talking to me they might have been 
put off continuing with racket. They provided feedback about what they had 
trouble with, but it was based on them having the impression that Quick was 
something designed more like the HtDP2e Prologue.

For the HtDP2e Prologue, the Preface does mention: “Once finished, any beginner 
is bound to feel simultaneously empowered and overwhelmed.”. But a newcomer 
with a degree in Philosophy missed or didn't retain that, and read the Prologue 
even more strongly as “the basics to get started” since it was in a textbook 
for beginning programmers. She got very far, but was indeed overwhelmed. In 
particular, she read the Exercises as things she should be able to do as 
warmups before starting what she assumed was more difficult “serious” material 
following the Prologue. When she contacted me, I had to assure her that the 
rest of the book covers the material, more slowly, more completely, in more 
detail.

Including something about why the links to the documentation are there, and 
what to expect when following them, could also help. Following one of those 
links at this stage can be even more overwhelming. E.g., Quick's first link to 
the documentation is “naturally” [to us] for ‘#lang’ . For the Prologue, 
following a link usually provides more explanation than in the Prologue only in 
the sense of being complete and precise. To the intended audience of the 
Prologue, that further explanation is written in unexplained technical notation.

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] What precisely is the type/contract ‘TST’ ?

2017-04-09 Thread gfb
It appears, e.g., in:

  (send a-drracket:rep:text display-results results) → void?
  results : (list-of TST)

A search of all racket files shows it used at times for values to be displayed, 
but I can't find a definition of the term, nor just what it's [presumably] an 
acronym or abbreviation for.

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] DrRacket indentation for 'send*' and other "Lambda-like Keywords"

2016-02-07 Thread gfb
The documentation for 'send*' shows an indentation style that is not available, 
but that I've often wanted for some "Lambda-like Keywords", e.g. 'lambda' and 
'match':

(send* edit (begin-edit-sequence)
(insert "Hello")
(insert #\newline)
(end-edit-sequence))

https://docs.racket-lang.org/reference/ivaraccess.html#%28form._%28%28lib._racket%2Fprivate%2Fclass-internal..rkt%29._send*%29%29

"Reindent All" produces:

(send* edit (begin-edit-sequence)
  (insert "Hello")
  (insert #\newline)
  (end-edit-sequence))

I know there is some push against rightward drift, so perhaps the preferred 
style is:

(send* edit
  (begin-edit-sequence)
  (insert "Hello")
  (insert #\newline)
  (end-edit-sequence))

But I often find downward drift more of an impediment to understanding code. Is 
there a particular rationale for not having a style supporting the one shown 
first above? Also, are there other users who would like such a style as well?

Gary

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Racket documentation - emphasis in margin notes

2015-12-25 Thread gfb
On Friday, 25 December 2015 15:49:21 UTC-5, Daniel Prager  wrote:
> I've noticed a usability issue with margin notes in the docs: the bolding is 
> misleading.
> 
> 
> Example:
> 
> 
> Regular Expressions in The Racket Guide introduces regular expressions.
> 
> 
> Problem: The eye is more strongly drawn to The Racket Guide than the relevant 
> cross-reference. The subliminal message is "if you need assistance click 
> here".
> 
> 
> Effect: I (and presumably others) occasionally click on The Racket Guide when 
> I typically want the more specific reference. This leads to discombobulation.

I've done (seen) this too.

Furthermore, it would be nice to find a way to subtly indicate whether one is
in the Guide vs Reference: newcomers can take a while to realize/remember that
the two exist and which they are in.

> 
> 
> 
> 
> 
> Suggestion 1: Flip the bolding.
> 
> 
> Regular Expressions in The Racket Guide introduces regular expressions.
> 
> 
> 
> 
> Suggestion 2: Drop the citation hyperlink altogether.
> 
> 
> Regular Expressions in The Racket Guide introduces regular expressions.
> 
> 
> 
> 
> 
> While I think either option would be an improvement, on reflection I'd prefer 
> #2 because it makes for a simpler and less ambiguous experience.
[...]

Both look good to me. Perhaps even drop the word "Racket" to make the word
"Guide" or "Reference" stand out more.

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] check-expect : effect of error in the "expected" expression and/or "value" expression

2015-12-19 Thread gfb
When there is an error in a check-expect expression there are a few behaviours
that were initially confusing me and moreso my students.


Consider the following ISL program:

(define (f x) x)
(check-expect (/ 0) 0)
(check-expect 1 2)

The error from (/ 0) stops subsequent checks.

The error also leaks into the Interactions, which may or may not be considered
a good thing. Unlike when there are errors not from check-expect tests the
function 'f' is undefined in the Interactions and students can't try the
function immediately.

The test failure message is:


Check failures:
check-expect encountered the following error instead of the 
expected value, 0. 
   :: /: division by zero
at line 2, column 0 


The mixture of indentations seems arbitrary, and thus a distraction.
It actually seems backwards: subsequent parts of a compound message would
usually be indented under what they are components of.

Regardless of the relative indentation: the large amount of whitespace
requires a lot of scrolling for students with small cheap laptops to see the
the specifics of the failure, especially when the test window is undocked.
Because the "at" line is not indented, it draws the students' attention away
even more.

The "::" is noise.

A space between the function name and ":" could help when the function name
ends with a non-letter.


Consider now the following ISL program:

(define (f x) x)
(check-expect 0 (/ 0))
(check-expect 1 2)

It behaves similarly, except it doesn't report the error as a failed test.

We use check-expect to design functions, so the "value" expression is often more
than a simple value, e.g.
(check-expect (average (list 1 2 3)) (/ (+ 1 2 3) 2)))
(check-expect (average (list 1 2 3)) (/ (apply + (list 1 2 3)) 2)))


I would like to change some of the above behaviours, so this is a post asking:

1. Are they intentional and if so then what rationale am I missing.
2. Would others like these behaviours changed.
3. Are there changes that would receive general agreement.
4. If yes to #3, would requesting those changes likely result in having them in
a snapshot build by January 10th for my students to install then.
5. If yes to #3 but no to #4, is this something that me (or my student) working
on in the next few weeks could result in a snapshot build accepting our pull
requests before January 10th?

Thanks,
 Gary

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] check-expect : effect of error in the "expected" expression and/or "value" expression

2015-12-19 Thread gfb
On Saturday, 19 December 2015 17:24:01 UTC-5, Matthias Felleisen  wrote:
[...]
Hi Matthias,

Thanks for that quick and informative reply.

We've been teaching a breadth course (at University of Toronto) that has always
had a taste of programming, but in recent years with the help of DrRacket and
the *SL languages, and the strong interest of the non-technical audience, has
steadily evolved from containing a "taste" of programming to being at the edge
of program design. This term the increment put it over an edge where not doing
a full design process, and not covering how to fully notice and interpret the
results of errors, was a major source of difficulty.

It was exacerbated by some creative approaches students had to tackling
implementation of a program with many given check-expects to fulfill: they
sometimes copied and pasted, or typed in incrementally, parts of the starter
file from the view of it in their browser. They also commented out or
re-arranged parts of the file, or deleted parts (sometimes accidentally,
sometimes because they got confused about which parts they had added).

We'll accept your experience and hopefully now that we understand the behaviour
of check-expect, and of the students, we can address that in the course.

I'll probably have more comments about other things that we find tripping us up,
and say in advance that we are very grateful for everyone's work on racket, and
it's so good in so many ways that it makes us want more.

As a quick question on the current topic: except for a note in htdp2e about
check-expects being gathered and evaluated at the end of the program, is
the information about its behaviour on errors mentioned somewhere?

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: performance with freeze from 2htdp/image on very complex images

2015-05-03 Thread gfb
Those are beautiful.

First, make sure in Choose Language / Show Details that it's set to No 
debugging or profiling, and that Preserve stacktrace not set.

The 2htdp/image library has immutable images, so the image you're creating 
contains all the line drawing unexecuted until you display or freeze it.

There's a lot of symmetry, so rather than passing an image as a parameter can 
you express the algorithm as returning one of the component images at each 
level, then rotating and combining it with itself? As long as the result is 
symmetric that will create a rather narrow Direct Acyclic Graph of images.

You can then also experiment with freezing some of those intermediate images, 
especially at the top levels where rotating a bitmap might be faster than 
executing the drawing actions in a rotated co-ordinate system. But that's 
speculation, not experience.

Other than that, consider drawing directly into a mutable bitmap% from 
racket/draw, or explore images/flomap.

Then there are the possibilities of Typed Racket optimizations, and profiling 
and the Optimization Coach in general.

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.