Re: [racket-users] Testing & global variables

2018-08-07 Thread Kevin Forchione
I’ve got a library that takes maintains global variables. I’d like to be able to test different test files that require this library, but of course if I require those files into a single test file for testing various combinations of data it corrupts the global variables, which are only valid

Re: [racket-users] Testing & global variables

2018-08-07 Thread Alex Harsanyi
If this is a problem only in your test code, you could write a function to reset/re-initialize the global state, and call that function at the beginning of each test. If you want to have a "global state" for each of the file that requires your module, global variables might not be the right

[racket-users] Re: gui change-children portability and nuances

2018-08-07 Thread Alex Harsanyi
Hi Neil, I have used `change-children` on a Win32 GUI and the widgets that are switched in and out keep all their state, including the scroll position, unless, of course, if you change this state from the program.This means, for example, that if you have a list-box% and you remove it from

Re: [racket-users] Testing & global variables

2018-08-07 Thread Alexis King
I guess I’ll take the bait and give the obvious-but-unhelpful answer, “Don’t use global variables.” :) I’m joking, but only just barely. It seems difficult to give concrete advice without knowing more details about your program and why you felt it was necessary to use global mutable state in the

[racket-users] Call for Participation: ICFP 2018

2018-08-07 Thread 'Lindsey Kuper' via users-redirect
*** Early registration ends 27 August. *** = Call for Participation ICFP 2018 23rd ACM SIGPLAN International Conference on Functional Programming and affiliated events September 23 - September 29, 2018 St. Louis, Missouri, USA

[racket-users] gui change-children portability and nuances

2018-08-07 Thread Neil Van Dyke
Two questions, as I'm trying to extend the Racket `gui` widgets just a little, for small touchscreens, while remaining cross-platform and desktop friendly: 1. For all the platforms supported by Racket `gui` widgets, is `change-children` a good way to frequently switch among subtrees of

Re: [racket-users] Re: Recommendation for learning syntax?

2018-08-07 Thread Ben Greenman
Hope this helps with syntax-parse: http://docs.racket-lang.org/syntax-parse-example/index.html If not, please submit an issue! -- 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,

Re: [racket-users] Testing & global variables

2018-08-07 Thread Kevin Forchione
> On Aug 7, 2018, at 10:56 AM, Alexis King wrote: > > I guess I’ll take the bait and give the obvious-but-unhelpful answer, > “Don’t use global variables.” :) > > I’m joking, but only just barely. It seems difficult to give concrete > advice without knowing more details about your program

[racket-users] Re: Trying to understand the module system.

2018-08-07 Thread Alex Gian
After some deliberation, and consultation with heads wiser than my own, I have decided to abandon the idea of porting the "rule-system" directly. There was no point, really. It relies on too many techniques that were hacks, albeit very clever ones, in their time, to make up for tools that

Re: [racket-users] parameterized logging

2018-08-07 Thread Sean Kanaley
Thanks, Neil. Unfortunately #2 didn't work. The historically written define-logger calls like log-something-debug overwrites the "foo" topic with "something". If only they were appended together. #3 can't intercept logs of define-logger loggers (if a woodchuck could...) even with topic/level

Re: [racket-users] Trying to understand the module system.

2018-08-07 Thread Alex Gian
(new links, old ones not working after refactoring) > The offending code is here - 'rules.rkt' ca. line 173 > Once it tries to execute the 'rule-system' macro, in order to load up the rules, it crashes with the following

[racket-users] Recommendation for learning syntax?

2018-08-07 Thread Alex Gian
Simply put, I find syntax to be a brain I can do simple stuff, often by extensive study of example code, and I even have the odd moment of illumination, which shows me that there is more to it than just masochism! What I do not have is the flow, the mojo, to be able to write syntax like

[racket-users] Re: Recommendation for learning syntax?

2018-08-07 Thread Alexander McLin
I was an attendee of Racket Summer School 2018 where we covered syntax-parse extensively. The lecture plans and problem assignments are still available online and they together comprise a good tutorial for syntax-parse and language design principles. I encourage you to give it a try!

Re: [racket-users] parameterized logging

2018-08-07 Thread David Storrs
I realize it's not ideal Racket, but I've gotten a lot of mileage out of the following: ;;-- (define prefix-for-say (make-parameter "")) (define-syntax (say stx) (syntax-case stx () [(say a ...) #'(displayln (~a

[racket-users] Find out whether the debugger is running

2018-08-07 Thread Erich Rast
Hi! Is there a reliable way to find out whether a racket program is currently running in the debugger? I've got a deployment function that fails with a cryptic error message when the language is set to debugging in DrRacket and would like to print a warning in that case. Deployment ought be with