Re: [racket] Gambit Scheme for the iPhone and iPad

2011-06-04 Thread Noel Welsh
On Sun, Jun 5, 2011 at 6:21 AM, Richard Cleis wrote: > ... I don't know how extensively; I just now downloaded it at this party. This is nerdcore. I stand in awe. N. _ For list-related administrative tasks: http://lists.racket-lang.org/listinf

[racket] FFI: problems using (_list i _string)

2011-06-04 Thread keyd...@gmx.de
Hi all, I have a problem with FFI which is certainly due to my lack of experience with c, and would very much appreciate any help. I am using (_list i _string) to pass an array of strings to a c function, but all that ends up on the other side seems to be "nonsense" / random characters. The c f

Re: [racket] Gambit Scheme for the iPhone and iPad

2011-06-04 Thread Richard Cleis
On Jun 4, 2011, at 7:55 PM, Nevo wrote: > Hi Prabhakar! > This is a nice sharing. Have you by chance bought that app and actually run > on your iPhone/iPad? I just wonder whether this is console based REPL only, It has an editor that allows for multiple 'scripts'. When one is run, the envi

Re: [racket] Gambit Scheme for the iPhone and iPad

2011-06-04 Thread Nevo
Hi Prabhakar! This is a nice sharing. Have you by chance bought that app and actually run on your iPhone/iPad? I just wonder whether this is console based REPL only, or having graphics support as DrRacket does, how is the performance (pure interpreter mode or JIT enabled?). I'm not clear if Apple

Re: [racket] Reacquainting myself

2011-06-04 Thread Hendrik Boom
On Sat, Jun 04, 2011 at 05:12:10PM -0400, Eli Barzilay wrote: > 50 minutes ago, Hendrik Boom wrote: > > > > So I ask. What tools and libraries are already there to make this > > kind of task easier? Or more elaborate tasks of this kind -- > > because I will run into them later. I look on the we

Re: [racket] Programatically loading bitmaps with 2htdp/image

2011-06-04 Thread Rodolfo Carvalho
Thanks! #lang racket (require 2htdp/image 2htdp/universe racket/draw) (define (make-frame t) (crop 300 102 980 422 (read-bitmap (format "~a.png" (add1 (modulo t 13)) (animate make-frame) Works like a charm! []'s Rodolfo Carvalho On Sat, Jun 4, 2011 at 19:23, Robby Findler wrote: >

Re: [racket] Use regexps or something else?

2011-06-04 Thread Rodolfo Carvalho
On Sat, Jun 4, 2011 at 12:50, Eli Barzilay wrote: > 11 hours ago, Rodolfo Carvalho wrote: > > > > Imagine an scenario that instead of 2 (as above) we had 20 columns > > of a table, and we wanted to return a table of the squares of the > > values for all columns, except for columns 12 and 15 (of c

Re: [racket] Programatically loading bitmaps with 2htdp/image

2011-06-04 Thread Robby Findler
No, not with the 'bitmap' primitive. But if you create a bitmap% object, I believe you can pass it to any of the 2htdp/image primitives. Robby On Saturday, June 4, 2011, Rodolfo Carvalho wrote: > Is there a way to do something like this: > (define (make-frame t)  (bitmap (format "~a.png" (add1 (

[racket] Gambit Scheme for the iPhone and iPad

2011-06-04 Thread Prabhakar Ragde
I stopped reading comp.lang.scheme some time ago, so I wasn't aware until just now that in early May, Marc Feeley succeeded in placing a Gambit Scheme universal app (iPhone/iPad) in the App Store. http://itunes.apple.com/us/app/gambit-repl/id434534076?mt=8 This is the first indication I had th

Re: [racket] Reacquainting myself

2011-06-04 Thread Noel Welsh
In addition to Eli's suggestions... Parsing: http://planet.racket-lang.org/display.ss?package=htmlprag.plt&owner=neil Pattern matching (don't know if this still works): http://planet.racket-lang.org/display.ss?package=sxml-match.plt&owner=jim N. On Sat, Jun 4, 2011 at 9:18 PM, Hendrik Boom

[racket] Programatically loading bitmaps with 2htdp/image

2011-06-04 Thread Rodolfo Carvalho
Is there a way to do something like this: (define (make-frame t) (bitmap (format "~a.png" (add1 (modulo t 13) (animate make-frame) This code gives me: bitmap: expected the argument to specify a local path (via a string) or a module path (e.g. `icons/b-run.png') []'s Rodolfo Carvalho

Re: [racket] Reacquainting myself

2011-06-04 Thread Eli Barzilay
50 minutes ago, Hendrik Boom wrote: > > So I ask. What tools and libraries are already there to make this > kind of task easier? Or more elaborate tasks of this kind -- > because I will run into them later. I look on the web and find > myself lost in beginner documentation. I'm looking for lin

Re: [racket] Some design "whys" of regexps in Racket

2011-06-04 Thread Eli Barzilay
5 hours ago, Rodolfo Carvalho wrote: > Good to learn about here strings. I've seen them somewhere but never > paid much attention. > > For short strings I'd rather type things like "" than > #< \\ > END > > Because the latter is more verbose and breaks the visual flow. > > Both `#< breaks ar

[racket] Reacquainting myself

2011-06-04 Thread Hendrik Boom
New to Racket, old to Scheme and Lisp (bit I've been away from actively using them for decades, and much has changed). I'm refamiliarising myself, taking a small project that I could write in several other languages in an hour, but doing it as learning project instead of a quickie implementatio

Re: [racket] Syntax certificate question

2011-06-04 Thread Carl Eastlund
Okay, I don't understand what's going on, but I've fixed the program. First I had to apply the result of (syntax-local-certifier #t) directly to the reference to identity. I don't know why this is. I also had to expand the body of with-macro in the internal definition context I created, so that r

Re: [racket] Syntax certificate question

2011-06-04 Thread Carl Eastlund
On Sat, Jun 4, 2011 at 3:17 PM, Jay McCarthy wrote: > 2011/6/4 Carl Eastlund : >> A question for the syntax certificate connoisseurs out there.  The >> program below produces the following error message: >> >>  compile: access from an uncertified context to unexported variable >> from module: "A"

Re: [racket] Syntax certificate question

2011-06-04 Thread Jay McCarthy
2011/6/4 Carl Eastlund : > A question for the syntax certificate connoisseurs out there.  The > program below produces the following error message: > >  compile: access from an uncertified context to unexported variable > from module: "A" in: identity > > Why is the reference to identity from withi

[racket] Syntax certificate question

2011-06-04 Thread Carl Eastlund
A question for the syntax certificate connoisseurs out there. The program below produces the following error message: compile: access from an uncertified context to unexported variable from module: "A" in: identity Why is the reference to identity from within the module that binds it illegal?

Re: [racket] Some design "whys" of regexps in Racket

2011-06-04 Thread Rodolfo Carvalho
# 2011/6/4 Rodolfo Carvalho : > > Hello, > > I'm curious about 2 design decisions made: > > 1) Why do I have to escape things like "\d{2}" -> "\\d{2}"? > > You can actually avoid escaping if you use here strings. > See the example below. > [...] Good to learn about here strings. I've s

Re: [racket] Use regexps or something else?

2011-06-04 Thread Eli Barzilay
11 hours ago, Rodolfo Carvalho wrote: > > Imagine an scenario that instead of 2 (as above) we had 20 columns > of a table, and we wanted to return a table of the squares of the > values for all columns, except for columns 12 and 15 (of course we > could parse them out and ignore then when processi

Re: [racket] Use regexps or something else?

2011-06-04 Thread Eli Barzilay
11 hours ago, Rodolfo Carvalho wrote: > (sort > (map parse-line (regexp-match* > #px"\\d+\\s+\\d+\\s+\\d\\s+\\d+\\s+\\d+(\\.\\d+)?\\s+[\\d.e+]+" t)) > > > #:key last > #:cache-keys? #t) > > I tried to improve the regexp but it breaks my notion of "line". > > Any suggestions? Use `in-lines' t

Re: [racket] Some design "whys" of regexps in Racket

2011-06-04 Thread Eli Barzilay
An hour ago, Jens Axel Søgaard wrote: > 2011/6/4 Rodolfo Carvalho : > > Hello, > > I'm curious about 2 design decisions made: > > 1) Why do I have to escape things like "\d{2}" -> "\\d{2}"? > > You can actually avoid escaping if you use here strings. > See the example below. The main problem with

Re: [racket] Some design "whys" of regexps in Racket

2011-06-04 Thread Eli Barzilay
An hour and a half ago, Rodolfo Carvalho wrote: > On Sat, Jun 4, 2011 at 10:30, Hendrik Boom wrote: > > > On Fri, Jun 03, 2011 at 11:40:37PM -0400, Eli Barzilay wrote: > > > > > > >>> print "\" > > > [SyntaxError: ...] <-- surprise > > > > Just curious: what happens with > > > > >>> print "

Re: [racket] Some design "whys" of regexps in Racket

2011-06-04 Thread Jens Axel Søgaard
2011/6/4 Rodolfo Carvalho : > Hello, > I'm curious about 2 design decisions made: > 1) Why do I have to escape things like "\d{2}" -> "\\d{2}"? You can actually avoid escaping if you use here strings. See the example below. Source begins here: #lang racket (define the-text-to-be-searched #

Re: [racket] Some design "whys" of regexps in Racket

2011-06-04 Thread Rodolfo Carvalho
On Sat, Jun 4, 2011 at 10:30, Hendrik Boom wrote: > On Fri, Jun 03, 2011 at 11:40:37PM -0400, Eli Barzilay wrote: > > > > >>> print "\" > > [SyntaxError: ...] <-- surprise > > Just curious: what happens with > > >>> print "\"" > > >>> "\"" '"' The internal double quote is escaped by the b

Re: [racket] Some design "whys" of regexps in Racket

2011-06-04 Thread Hendrik Boom
On Fri, Jun 03, 2011 at 11:40:37PM -0400, Eli Barzilay wrote: > > >>> print "\" > [SyntaxError: ...] <-- surprise Just curious: what happens with >>> print "\"" ? -- hendrik _ For list-related administrative tasks: http://lists.racket-la