[racket] About closing ports

2014-08-09 Thread Jack Firth
Is there any particular reason there's no general close-port function that works on both input ports and output ports? Would an implementation along the lines of ((if (input-port? p) close-input-port close-output-port) p) have problems that make this unreasonable? The only reason I ask is because I

Re: [racket] DrRacket eats 100% cpu

2014-08-09 Thread Robby Findler
Ah, thanks. I've fixed the performance bug. FWIW, I think it would have terminated eventually. It takes about 3 seconds to appear on my machine the first time the dialog is opened (before the push I just did). Robby On Sat, Aug 9, 2014 at 1:00 PM, Manfred Lotz wrote: > Hi all, > I'm not a DrRa

Re: [racket] Performance. Higher-order function

2014-08-09 Thread Vincent St-Amour
It used to be. When we introduced the package system, it sounded like we were going to split the distribution into multiple repositories (and have the main distribution pulled from those multiple repositories). Optimization Coach is one of the few packages that did the switch. The rest never follo

Re: [racket] Use of map and eval to evaluate symbol in namespace

2014-08-09 Thread Alexander D. Knauth
Just for fun, I made a function to do this the “non-eval” way, and it was more complicated than I would have thought, although maybe I was overcomplicating it a bit? https://github.com/AlexKnauth/hash-lambda/blob/master/keyword-lambda/kw-apply.rkt On Aug 9, 2014, at 10:10 AM, Sean Kanaley wro

[racket] DrRacket eats 100% cpu

2014-08-09 Thread Manfred Lotz
Hi all, I'm not a DrRacket user so I have no idea what I did wrong. Out of curiosity I started DrRacket and looking around at the menu entries I chose: Insert/Insert Large Letters... just to see what happens. Nothing happened except that DrRacket took 100% cpu. When trying to stop DrRacket I

Re: [racket] Performance. Higher-order function

2014-08-09 Thread Greg Hendershott
Why isn't Optimization Coach one of the automatically-installed packages? Racket Users list: http://lists.racket-lang.org/users

[racket] is there a check-match/values -like thing anywhere?

2014-08-09 Thread Alexander D. Knauth
Is there a check-match/values -like thing anywhere? Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Use of map and eval to evaluate symbol in namespace

2014-08-09 Thread Sean Kanaley
Sorry, couple typos: mapply = map and l = lst. On Sat, Aug 9, 2014 at 10:10 AM, Sean Kanaley wrote: > There's a simple enough example I think: apply with keyword parameters. > Apply has that built-in..sort of...but the list is supposed to be provided > inline to APPLY, seemingly requiring apply

Re: [racket] Use of map and eval to evaluate symbol in namespace

2014-08-09 Thread Sean Kanaley
There's a simple enough example I think: apply with keyword parameters. Apply has that built-in..sort of...but the list is supposed to be provided inline to APPLY, seemingly requiring apply to be applied (e.g. (apply apply (cons *thefunctiontoapply* params))), except keywords can't be expressions a

Re: [racket] Use of map and eval to evaluate symbol in namespace

2014-08-09 Thread Neil Van Dyke
Sounds like a good rule of thumb. Two suggestions to add: * Maybe there could also be a second rule of thumb, like, "If you need arbitrary Racket expressions, then consider whether you can do it with one of the following patterns: [list some patterns involving combinations of syntax extension

Re: [racket] Use of map and eval to evaluate symbol in namespace

2014-08-09 Thread Eli Barzilay
I think that I ran into a nice way to discourage eval except when needed: the rule of thumb is to only use eval when you need to evaluate any arbitrary (Racket) expression. It sounds simplistic but it covers lots of cases that make newbies run to eval: * I just want to get the value of a variable