Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-06 Thread Josh Grams
On 2015-08-04 05:54AM, Neil Van Dyke wrote: > Personally, I don't have the time to develop all that sufficiently > well, and I'm not sure the effect would be all upside, anyway. > Until such a volunteer emerges, I think the first step is to have the > Racket documentation strongly discourage pe

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-05 Thread Joel McCracken
My impression is that stored procedures are much less commonly used than sending plain strings across the wire to the DB. I don't have any data for this though, just my impression. The common way to avoid SQL injections is to use some symbol to represent a variable to be replaced on the server wit

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-05 Thread Michael Titke
On 04/08/2015 11:54, Neil Van Dyke wrote: .., If someone has the time and inclination to develop that, more power to them. Until such a volunteer emerges, I think the first step is to have the Racket documentation strongly discourage people from using eval. (Second step: go through all the

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-05 Thread Greg Hendershott
I agree SQL is an interesting analogy but I draw the opposite conclusion, if I correctly remember what I did ~5 years ago. There is an eval-ish way of using SQL, such as forming SQL code out of strings. This tends to perform slower and is extremely vulnerable to injection and other unexpected beha

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-05 Thread Joel McCracken
One example of eval being used for extremely practical purposes is with SQL. Many practical programmers regularly generate SQL strings which are then passed to a remote server, which are then evaluated. Indeed, all the same sorts of arguments against eval may be made against SQL: 1. SQL is co

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-05 Thread Michael Titke
On 04/08/2015 16:34, Alexis King wrote: And that, I think, is the problem: eval seems a lot like a “one size fits all” approach to problem solving. ... We write in high-level languages for a reason. There’s no reason to stunt their ability to abstract by directly calling eval. I do unders

RE: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Jos Koot
ey; Alexis King Cc: Michael Titke; racket users Subject: Re: [racket-users] eval PSA (was Sending Closures to Places) Sean Kanaley wrote on 08/04/2015 12:04 PM: > " I cannot think of any good uses for eval in Racket." > > Any time the mental time spent using eval (or defmacro) is les

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Neil Van Dyke
Sean Kanaley wrote on 08/04/2015 12:04 PM: " I cannot think of any good uses for eval in Racket." Any time the mental time spent using eval (or defmacro) is less than that of figuring out how to not use eval or defmacro by using let-parameterize-syntax-splicing-local-transformer-binding-apply-

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Matthias Felleisen
I didn't really want to get involved in this kind of discussion but I need to take exception to this kind of statement. Code is not just written. Code is read. Code is read far more often than written. Code that uses a specific construct conveys a specific idea, and it thus helps the reader f

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Sean Kanaley
" I cannot think of any good uses for eval in Racket." Any time the mental time spent using eval (or defmacro) is less than that of figuring out how to not use eval or defmacro by using let-parameterize-syntax-splicing-local-transformer-binding-apply-values instead, which for the average programme

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Alexis King
> I don't know why but at some point in the 20th century people really became > afraid of viewing programs as pure data (which they are) and started to call > it metacircular (which of course also refers to other properties of a list > processor treating each and every start of list, i.e. openin

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Neil Van Dyke
Josh, right you are, that a bare statement of "don't use eval" can come off as unhelpful or patronizing. I'll go meta... My day job is practitioner, not professor. Among many-many nits, I'm tired of seeing bad uses of eval in real-world code. Even more than that, I'm frustrated that eval is

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Michael Titke
I don't know why but at some point in the 20th century people really became afraid of viewing programs as pure data (which they are) and started to call it metacircular (which of course also refers to other properties of a list processor treating each and every start of list, i.e. opening paren

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-03 Thread Jens Axel Søgaard
On eval in dynamic languages generally and in Racket specifically Posted by Matthew Flatt http://blog.racket-lang.org/2011/10/on-eval-in-dynamic-languages-generally.html 2015-08-03 13:32 GMT+02:00 Josh Grams : > O

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-03 Thread Josh Grams
On 2015-08-03 01:22AM, Neil Van Dyke wrote: > Eval might indeed be the perfect solution this time, iff every other > conceivable alternative has been rejected. :) > > Shameless link to PSA on the topic of eval: > http://lists.racket-lang.org/users/archive/2014-July/063597.html > > Suggestions f