[racket-users] Re: prepared queries

2017-03-14 Thread George Neuner
Hi Ryan, Hope you enjoyed the snow day. Lost power here for a while, but fortunately no damage. On 3/13/2017 11:09 PM, Ryan Culpepper wrote: On 03/13/2017 06:30 PM, George Neuner wrote: Then there is the issue that deliberately prepared queries are not optimized as heavily as normal

Re: [racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-03-14 Thread Marc Kaufmann
Thanks for the detailed answer Philip! Some of it is definitely over my head. The reason I don't pass around the id is that I use the html field exactly to track the id and wanted to avoid having to pass around the argument left and right - and the only ways to pass it on are via forms or by

Re: [racket-users] help with splicing syntax class error report

2017-03-14 Thread Stephen Chang
You get the dreaded "bad syntax" because syntax-parse doesnt know which pattern failed. There a couple of things you can do: 1) Use a commit pattern, which tells syntax-parse not to backtrack past the commit point. You have to change the order of patterns for this to work.

Re: [racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-03-14 Thread Philip McGrath
In this case it will work despite being a hack, because you know that your id argument affects only the display stage, not the processing stage: however, you can't know in general that this will work for dynamically generated formlets, and personally I would therefore be reluctant to rely on this,

[racket-users] help with splicing syntax class error report

2017-03-14 Thread Dan Liebgold
Hi - I have some legacy code syntax I'm retrofitting with syntax-parse. Is there a simple way to have this type of syntax error report a better error message: http://pasterack.org/pastes/59739 I'd like it to point directly to ":thung" and say it expected ":thing" or nothing there if possible.

Re: [racket-users] Why does 1 count as numeric in xexpr, but 0 does not?

2017-03-14 Thread Marc Kaufmann
Fair enough if that's the specification, even if it is unexpected (to me at least). Thanks, Marc On Tuesday, March 14, 2017 at 10:41:02 AM UTC-4, Jay McCarthy wrote: > Hi Marc, > > libxml2 only allows numeric entity references in this range: > > * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF]

[racket-users] How to build new formlets that allow passing default values (such as hidden)?

2017-03-14 Thread Marc Kaufmann
Hi, I have created a formlet like so: (define (matrix-formlet id) (formlet (#%# ,{input-string . => . ones} ,{(to-string (required (hidden id))) . => . user-id} ) (values ones user-id))) I display this as follows: `(form ((action

[racket-users] Re: linking with raco ctool : unable to find libracket3mxxxxxxx.lib

2017-03-14 Thread Alexander McLin
You need to compile Racket from source to generate the .lib file, it is not distributed with the installation. You need to make sure the source is the same version as your installed Racket and it is compiled targeting the same bit architecture as the installed Racket version. Then copy the

Re: [racket-users] Why does 1 count as numeric in xexpr, but 0 does not?

2017-03-14 Thread Jay McCarthy
Hi Marc, libxml2 only allows numeric entity references in this range: * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] * | [#x1-#x10] Racket doesn't fully respect that, but both disallow 0. I think we should match libxml2 and tighten the contract. Jay -- -=[ Jay

Re: [racket-users] Why does 1 count as numeric in xexpr, but 0 does not?

2017-03-14 Thread Marc Kaufmann
I understand that the number 1 is different from the string (although I would probably have expected it to be turned into a string before being passed to the browser or something, but it doesn't matter for my purposes). What does surprise me is that (xexpr->string 1) gives , yet (xexpr->string

Re: [racket-users] macro definitions with #lang racket/base vs #lang racket

2017-03-14 Thread NeverTooOldToCode
Thank you! I see now that the very same question was already asked on this list in 2015, by a compatriot of mine no less. It didn't show up in my online searches beforehand, the keyword missing was "transformer environment". On Tuesday, March 14, 2017 at 1:05:31 PM UTC+1, Philip McGrath wrote:

Re: [racket-users] macro definitions with #lang racket/base vs #lang racket

2017-03-14 Thread Philip McGrath
#lang racket also provides racket/base in the transformer environment. -Philip On Tue, Mar 14, 2017 at 5:45 AM, NeverTooOldToCode wrote: > From Fear of Macros again, all input in the DrRacket definition window. > > This works: > > #lang racket/base > > (require

[racket-users] PLDI ACM Student Research Competition (SRC)

2017-03-14 Thread Tobias Grosser
The ACM Student Research Competition (SRC), sponsored by Microsoft Research, offers a unique forum for undergraduate and graduate students to present their original research on programming language design, implementation, theory, applications, and performance at PLDI 2017. The goal is to give

[racket-users] macro definitions with #lang racket/base vs #lang racket

2017-03-14 Thread NeverTooOldToCode
>From Fear of Macros again, all input in the DrRacket definition window. This works: #lang racket/base (require (for-syntax racket/base)) (define-syntax (show-me stx) (display stx) #'(void)) If you mouse-hover over the keywords, define-syntax is imported from #lang racket/base, and