[racket-users] Redex pattern for "sequence whose elements match this depth 0 pattern"?

2016-03-24 Thread 'William J. Bowman' via Racket Users
#lang scribble/doc Ha, you can run this email! In Redex, I have on several occasions found myself trying to use a pattern to constrain a sequence's member to match that pattern. i.e., I want to use a pattern bound at depth 0 to constrain a pattern at depth 1. Unfortunately, I can't do this, so it

[racket-users] Calling a procedure from mysql

2016-03-24 Thread Ty Coghlan
I have the following simple code: (require db) (define mdb (mysql-connect #:user user #:password password)) (query-exec mdb "use starwarsfinal") (query mdb "CALL track_character(?)" "Chewbacca") (disconnect mdb). Where track_character is a procedure that simply returns a simple select

RE: [racket-users] Re: IO in racket is painful

2016-03-24 Thread Jos Koot
Hi In all computer languages it is more difficult to read data than to write them, I think. Racket (like more lisp-like languages) is rather easy on this: give it sexprs to read and you have no problems. If you want to accept other types of input, you need a parser. In the past I have made

Re: [racket-users] Re: IO in racket is painful

2016-03-24 Thread Sam Tobin-Hochstadt
Right, that's the library that I borrowed for the code I posted. Fortunately the code didn't need to mutate pairs so it seems to work. Sam On Thu, Mar 24, 2016, 8:38 AM rom cgb wrote: > A possible case study: there a scanf procedure in slib, a pseudo standard > library

[racket-users] Re: IO in racket is painful

2016-03-24 Thread rom cgb
A possible case study: there a scanf procedure in slib, a pseudo standard library for Scheme[1][2]. It does mutate the passed arguments like with C's scanf which i think is not the idiomatic way to do things in Racket[3] doc:

[racket-users] Slow expansion. (Likely of match)

2016-03-24 Thread Eric Dobson
I'm seeing slow expansion (on the order of hundreds of milliseconds) for the following program: https://gist.github.com/endobson/e165edf224b4028db48d It is a single function of generated code. Similar functions that don't use match as extensively are much faster < 10 milliseconds. I'm trying to