Re: [racket] Help generating PDF documents with Scribble

2013-03-18 Thread Marijn
but which I haven't had a chance to use are: Skribilo and Texinfo (perhaps via STexi (Texinfo as S-expressions)?). Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFG0u8ACgkQ

Re: [racket] Racket v5.3.2

2013-02-27 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05-02-13 09:58, Marijn wrote: > On 01-02-13 19:34, Matthew Flatt wrote: >> At Fri, 01 Feb 2013 15:09:31 +0100, Marijn wrote: >>> On 01-02-13 05:20, Eli Barzilay wrote: >>>> Racket version 5.3.2 is now available

Re: [racket] Racket v5.3.2

2013-02-05 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01-02-13 19:34, Matthew Flatt wrote: > At Fri, 01 Feb 2013 15:09:31 +0100, Marijn wrote: >> On 01-02-13 05:20, Eli Barzilay wrote: >>> Racket version 5.3.2 is now available from >>> >>> http://racket-lang

Re: [racket] Racket v5.3.2

2013-02-01 Thread Marijn
. Apparently they didn't really get installed. Or SQLite is actually only needed for using the docs and not for building them. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlELzJsACgkQp

Re: [racket] Beginners request for code review.

2013-02-01 Thread Marijn
them (and throw them away again after, instead of putting them into a list). You probably don't want to do this by using real promises (streams, lazy lists). I hope that helps and good luck, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunde

Re: [racket] Thread creation slow?

2012-08-13 Thread Marijn
mprove it by a factor of 5 or even slightly over 6 when tuning, so it seems to me Racket would still be slower by 10x. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAozM0

Re: [racket] We need volunteers to test WeScheme!

2012-08-09 Thread Marijn
volunteers to hit our test site and let us know if they see > strange output from the colored error highlighting. > > Please visit: > > http://dyoo-test.appspot.com > > and try snippets of code that should produce errors. Middle-click paste doesn't work. Marijn -

Re: [racket] Racket on Ubuntu 12.04

2012-07-20 Thread Marijn
till appears though, but this one is probably no big > deal and is probably not related to the behavior Neil sees. Unfortunately I (like Robby) cannot reproduce that one. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

Re: [racket] Racket on Ubuntu 12.04

2012-07-20 Thread Marijn
d that bug under older versions of Ubuntu. Hi Laurent, this bug was fixed January 2012 AFAIK (look for ".1 evaluates to 0.0"). Are you still using an older version? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla -

Re: [racket] Some struct questions

2012-07-16 Thread Marijn
ixed constructor and the new way is `struct' which creates constructors with the name of the struct. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAEBSEACgkQp/VmCx0OL2wfqQCfUaFVP

Re: [racket] Cross-Platform Secure RNG?

2012-07-12 Thread Marijn
h would be fine > if I wasn't using Windows. I looked in the openssl bindings and > the racket documentation but didn't find anything. > > If it doesn't exist, which of a pull request or a planet package > is more appropriate? I think srfi 27[1] provides what you

Re: [racket] why is the comparimng always false

2012-06-29 Thread Marijn
e-Vanimal(make-Vcat 0 100))) true) >> (check-expect (check (make-Vanimal(make-Vcham 0 100))) false) >> (define (check s) ( equal? s Vchat) >> >> (check(make-Vanimal (make-Vcat 0 100))) >> >> >> But the answer is false not mather if the struct is a Vchat or

Re: [racket] Finite State Machines of Arbitrary Size using Racket's composable control

2012-05-21 Thread Marijn
Unfortunately my grasp on composable control is tenuous at best, so this 10 second answer goes over my head :(. In what way is this solution impossible without it? I mean FSMs can be implemented without it (and not just in the theoretical Turing-complete tarpit way). Marijn > #lang racket

Re: [racket] looking for a twitter library (or, failing that, OAuth 1.0)

2012-05-20 Thread Marijn
ms that you need MzScheme 372, so no Racket there. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+54o4ACgkQp/VmCx0OL2wmuQCfWyrfKBydrmtL7ntKxiivWyIf D4cAoJIj4pNTy4mqa31q80hFqSBhxH/s =TDvO -E

Re: [racket] performance tuning summing a hash of vectors

2012-03-14 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-03-12 17:34, Matthias Felleisen wrote: > > On Mar 13, 2012, at 12:05 PM, Marijn wrote: > >> (define (sum-hash-of-vectors3 table keys size) (apply vector-map >> + (for/list ((k keys)) (hash-ref table k > > Are

[racket] performance tuning summing a hash of vectors

2012-03-13 Thread Marijn
r-set! v i (+ (vector-ref v i) (vector-ref v_k i)) v) This was quite a surprise and is due to (my guess) the quality of the compiler? Marijn (*) I believe this is also the reason I chose to lay the data out this way and not as a vector of hashes, s

Re: [racket] strange loops

2012-03-06 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06-03-12 14:23, Marijn wrote: >> (define (fa) (let ((squares (for/vector ((i (in-range 1 1))) >> (* i i (let/ec return (let next-sum ((sum 3)) (let ((limit-z >> (quotient sum 3))) (let next-z ((z 1)) (if (= z limit-z)

Re: [racket] strange loops

2012-03-06 Thread Marijn
) (next-sum (add1 sum)) (let > ((x (- sum z y))) (if (and (perfect-square? (+ x y)) > (perfect-square? (- x y)) (perfect-square? (+ x z)) > (perfect-square? (- x z))) (return (list x y z sum)) (next-z (add1 > z)) Marijn -BEGIN PGP SIGNATURE- Version: GnuPG

Re: [racket] phases

2012-03-02 Thread Marijn
ng that could use some explanation is why racket uses phases in the first place, given that other systems (I believe Larceny is the prime example) have implemented a phase-less or phase-inferring macro system. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using G

Re: [racket] exercise problem

2012-02-22 Thread Marijn
anches are summing tarief1 through tarief4?! By bringing the summation to the fore you push some logic down into your new unified tarief function which might have to become a little smarter, but there will be less code overall and the code that is there will be easier to understand. Met vriendel

Re: [racket] Scala macros

2012-02-20 Thread Marijn
tml They seem to be proposing something close to implicit renaming macros IIUC and name Nemerle as their chief inspiration (which proudly claims on its homepage that it supports macros, but, unlike Lisps, without throwing away all that wonderful syntax). Marijn -BEGIN PGP SIGNATURE- Version

Re: [racket] Compound mutable list manipulation - 2 qs

2012-02-13 Thread Marijn
es would be syntactic > abstractions (which wouldn't prevent improper usage of functions > defined on the data, but I think I could live with that) or > structures. What is the most rackety way to go about that kind of > thing? You can hide the internals of your data strucutre in

Re: [racket] Program runs fine in console , but not in drracket.

2012-02-08 Thread Marijn
environment (and no > #%app syntax transformer is bound) in: #%require > > But when same program is run in console , it works just fine . > > Other programs that does not require this program , works just fine > in drracket. > > Any idea how to resolve this. Witho

[racket] Fwd: Re: DrRacket problems, please help (I need it for homework)!

2012-02-08 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Copying the list. - Original Message Subject: Re: [racket] DrRacket problems, please help (I need it for homework)! Date: Tue, 7 Feb 2012 19:07:42 + (UTC) From: enzimmer...@frontier.com To: Marijn Racket version: 5.2 Computer

Re: [racket] DrRacket problems, please help (I need it for homework)!

2012-02-07 Thread Marijn
ng? When did DrRacket start acting out? Do you remember upgrading anything before this happened? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8w5GcACgkQp/VmCx0OL2xzqwCfY7RK06SHYXQcpJTyhHKRy3LF Y5EAoI

Re: [racket] How to automatically update the value of output widgets?

2012-02-02 Thread Marijn
message to each child of a tab. This seems to works well so far in practice. I make input widgets call it automatically when they change value and just discovered that I should also call it on-super-window-show when I change tab, unless I change my input widgets from calling this on their own tab

Re: [racket] text-field% isn't just for string input, but for output and numbers too!

2012-02-01 Thread Marijn
well enough; at least when some more bugs are squished. It seems that alignment goes back to left-aligned under certain edits. For example if I have a text-field with an initial value of 0 and replace that 0 by anything else it gets left-aligned. Marijn -BEGIN PGP SIGNATURE--

Re: [racket] I think I found a bug in the JITC

2012-01-31 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 31-01-12 05:57, Erik Dominikus wrote: > Only 3 hours from report to fix. That's quite impressive. :-D > > @Marijn: I forgot... my platform is Ubuntu 10.04 Linux 2.6.32-38 > x86_64. Still learning to write bug reports I guess.

Re: [racket] strange behavior

2012-01-31 Thread Marijn
you want may be to use `set!' instead of `define' whenever you're REdefining something. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8n6QoACgkQp/VmCx0OL2yhuACeJh/0ccLpgYbe

Re: [racket] table layout for panel%

2012-01-31 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 31-01-12 01:19, Doug Williams wrote: > I have a table-panel% class on PLaneT - table-panel.plt. Thanks Doug, that works wonderfully well for me, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG w

[racket] table layout for panel%

2012-01-30 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I was wondering if anyone had already written code for a panel% that lays out its elements in a grid similar to how a html table's elements are laid out. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment:

Re: [racket] I think I found a bug in the JITC

2012-01-30 Thread Marijn
mean that there is a bug in the jit compiler only on the specific platform you are on (or that it was already fixed), so you should prolly specify which platform you are using, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.

[racket] text-field% isn't just for string input, but for output and numbers too!

2012-01-30 Thread Marijn
d such a (style?) option? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8mqJcACgkQp/VmCx0OL2zA2gCgjMdZfKE79E2sLEy+Q+16Rbj/ 61AAoJDWu/xP7JLuIzCP2dhvs8NFp8l0 =7nSQ -EN

[racket] How to automatically update the value of output widgets?

2012-01-24 Thread Marijn
ds and we only need to hook up the signals to the store. Which way would you go if you were creating this user interface? Thanks for your thoughts, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEA

Re: [racket] filtering syntax

2012-01-18 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18-01-12 13:30, Marijn wrote: > On 18-01-12 13:05, Veer Singh wrote: >> Add > >> (require (for-syntax syntax/parse)) > > Right, so after adding (require (for-syntax syntax/parse > syntax/free-vars)) it works, > &g

Re: [racket] filtering syntax

2012-01-18 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18-01-12 13:05, Veer Singh wrote: > Add > > (require (for-syntax syntax/parse)) Right, so after adding (require (for-syntax syntax/parse syntax/free-vars)) it works, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux

Re: [racket] filtering syntax

2012-01-18 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18-01-12 11:36, Veer Singh wrote: > This seems to work (blind hack), Unfortunately it doesn't work: _: wildcard not allowed as an expression in: (_ ((id:id expr:expr ...) ...)) in line 3 of the following: > (define-syntax (depgraph stx) (syntax-p

Re: [racket] filtering syntax

2012-01-18 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17-01-12 16:14, Sam Tobin-Hochstadt wrote: > On Tue, Jan 17, 2012 at 4:06 AM, Marijn wrote: >> On 16-01-12 15:28, Sam Tobin-Hochstadt wrote: >>> On Mon, Jan 16, 2012 at 7:57 AM, Marijn >>> wrote: >>>>

Re: [racket] filtering syntax

2012-01-17 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16-01-12 15:28, Sam Tobin-Hochstadt wrote: > On Mon, Jan 16, 2012 at 7:57 AM, Marijn wrote: >> >> ((_ ((id rule) ...)) (with-syntax (((dep ...) (free-vars (expand >> #'(rule ...) > > You need to use `l

Re: [racket] filtering syntax

2012-01-16 Thread Marijn
..)) (with-syntax (((dep ...) (free-vars (expand #'(rule ...) #`((id . dep) ...)) ))) (define simple-arith (depgraph ((a #f) (b (* 3 a)) (c (+ 5 a b)) (d (let ((a 9)) (- c a))) ))) simple-arith to work, but expand complains about the unbound a in the rule for b.

Re: [racket] question about macro failing due to hygiene(?)

2012-01-16 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-01-12 21:24, Eli Barzilay wrote: > Three hours ago, Marijn wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> Why doesn't this work (expand: unbound identifier in module in: >> a): [...] >

Re: [racket] filtering syntax

2012-01-16 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-01-12 16:32, Matthias Felleisen wrote: > > On Jan 13, 2012, at 10:20 AM, Marijn wrote: > >> >> Right, b would be a constant, namely the function that returns >> the value of a. > > > a is assignabl

[racket] question about macro failing due to hygiene(?)

2012-01-13 Thread Marijn
... store)) )) (define simple-arith (make-store ((a #f) (b (* 3 a)) (c (+ 5 a b)) (d (let ((a 9)) (- c a))) ))) (variable-rule (hash-ref simple-arith 'a)) ; I want this to be #f Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment:

Re: [racket] filtering syntax

2012-01-13 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-01-12 15:23, Matthias Felleisen wrote: > > On Jan 13, 2012, at 8:40 AM, Marijn wrote: > >> My question is how one determines the dependencies from the above >> code. The result for the above would be something like: >

[racket] filtering syntax

2012-01-13 Thread Marijn
(a) (b a) (c a b) (d c)) - From there it can be converted from syntax to a plain value for further processing which I know how to do. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYE

Re: [racket] Help With a Macro (tricky?)

2012-01-13 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13-01-12 11:37, Marijn wrote: > (define-syntax fast-class (lambda (stx) (syntax-case stx () ((_ > _field_ ...) (with-syntax (((_getter_ ...) (datum->syntax #f (map > (lambda (f) (string->symbol (string-append "get-&

Re: [racket] Help With a Macro (tricky?)

2012-01-13 Thread Marijn
;datum #'(_field_ ...)) )) )) #'(class object% (super-new) (init-field _field_ ...) (define/public (_getter_) _field_) ...) ) (define fast-class1% (fast-class size weight)) (define fast1 (new fast-class1% (size 2) (weight 2

[racket] weird names in FrTime code [was: Re: for/hash: bad syntax in: for/hash]

2012-01-11 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05-01-12 12:03, Marijn wrote: > On 04-01-12 16:55, Matthias Felleisen wrote: > >> On Jan 4, 2012, at 10:40 AM, Marijn wrote: > >>> Basically, my idea was to transform: >>> >>> (dependent-boxes ((a)

Re: [racket] string-strip

2012-01-11 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 29-12-11 10:02, Marijn wrote: >>> What I found was that it is much slower to treat a string as a >>> port and then read-char from that then it is to directly index >>> the string. > >> That string input po

Re: [racket] Help With a Macro (tricky?)

2012-01-11 Thread Marijn
(init-field _field_) (define/public (getter) _field_)) ) Possibly there is some better way to construct the getter identifier. If you want to stay within syntax-rules, then you have to make the getter an argument of your macro like so: (define-syntax fast-class

Re: [racket] for/hash: bad syntax in: for/hash

2012-01-05 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04-01-12 16:55, Matthias Felleisen wrote: > > On Jan 4, 2012, at 10:40 AM, Marijn wrote: > >> Basically, my idea was to transform: >> >> (dependent-boxes ((a) (b (* 2 a)) (c (+ 2 a b >> >> into someth

Re: [racket] for/hash: bad syntax in: for/hash [and 1 more messages]

2012-01-05 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04-01-12 22:50, Eli Barzilay wrote: > 11 hours ago, Marijn wrote: >> It took me a while to understand what you're saying here, but if >> I am not mistaken you're saying that the result of the >> macro-expansion is a

Re: [racket] for/hash: bad syntax in: for/hash

2012-01-04 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04-01-12 10:57, Marijn wrote: > On 03-01-12 20:15, Eli Barzilay wrote: >> Two hours ago, Marijn wrote: >>> Hi, >>> >>> for/hash is giving me a syntax-error, but the error is in >>> macro-expanded co

Re: [racket] for/hash: bad syntax in: for/hash

2012-01-04 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03-01-12 20:15, Eli Barzilay wrote: > Two hours ago, Marijn wrote: >> Hi, >> >> for/hash is giving me a syntax-error, but the error is in >> macro-expanded code which is not shown by default and which is >> al

[racket] for/hash: bad syntax in: for/hash

2012-01-03 Thread Marijn
(hash-ref expenses y 0) ))) The error: $ racket test-for.rkt test-for.rkt:12:6: for/hash: bad syntax in: for/hash === context === standard-module-name-resolver Some help would be appreciated. Marijn #lang racket (provide dependent-boxes agraph-topological-sort agraph-outnode

Re: [racket] string-strip

2011-12-29 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28-12-11 19:27, Neil Van Dyke wrote: > Marijn wrote at 12/28/2011 12:00 PM: >> I don't think my use of this code is very performance, but I >> couldn't help myself, so I looked into making it faster > > This is t

Re: [racket] string-strip

2011-12-28 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27-12-11 18:59, Sam Phillips wrote: > On Tue, Dec 27, 2011 at 09:55, Marijn wrote: >> Sometimes I wish for python-like string-strip to be a standard >> function. For example when I want to parse a list of numbers from >> a te

[racket] string-strip

2011-12-27 Thread Marijn
whitespace, map string->number over it and check the result with `every'. Is there a better way? If not then perhaps some form of string-strip could be added (perhaps under regexp-strip name?) since it isn't exactly extremely simple unless you're a regexp wizard. Marijn Some code

Re: [racket] W: A Game Written in Racket

2011-12-21 Thread Marijn
ubmitted version is available as the > ldjam branch). > > Anyway, I just thought some of you might think this was cool, so I > hope you take a look! I did, nice work! I'll have to study the source later to see how you did it. Marijn -BEGIN PGP SIGNATURE

[racket] guide to using the framework

2011-12-19 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, are there any docs that describe how to use the framework to build a simple application or some example source that defines such an application? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with

Re: [racket] Call by reference macro example in Racket Guide

2011-12-15 Thread Marijn
ine (f x y) (swap x y)) with (define-cbr (f x y) (swap x y)). That first f is a function that swaps its local arguments with no change to the outside world, while the second f is a macro (IIUC) that mutates its real (for lack of a better term (on my part)) arguments, through the macro mag

Re: [racket] exercise 6.6.3 htdp

2011-12-01 Thread Marijn
) (/ L 2)) (/ L 4) 'red)) (in-circle? cirkel1 (make-posn 150 224)) (in-circle? cirkel1 (make-posn 150 225)) then you see that you basically have very few function definitions that support your in-circle?. Hope that helps, Marijn -BEGIN PGP SIGNATURE- V

Re: [racket] parser-tools help

2011-11-30 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Timothy, On 30-11-11 15:14, Timothy Nelson wrote: > Hi Marijn, > > Two quick points: > > (1) The parser works with token structs, not symbols. Whenever you > declare a token, a cooresponding "token-" form is made &

Re: [racket] parser-tools help

2011-11-30 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30-11-11 14:33, Marijn wrote: > Hi, > > I'm trying to use the parser-tools to parse the startup info for > the Google AI Challenge, but I am not sure what I'm doing wrong. I managed to get my code working, see below. (BTW

[racket] parser-tools help

2011-11-30 Thread Marijn
h a change I just get the parser to complain. Marijn #lang racket (require parser-tools/lex (prefix-in re: parser-tools/lex-sre) parser-tools/yacc) (define-tokens number-group (number)) (define-tokens turn0-data-group (turn loadtime turntime rows cols turns vie

Re: [racket] Google Challenge

2011-11-25 Thread Marijn
hills I don't know the answer. I would philosophise that it is certainly possible to include this in the game, but that the game would arguably be better if this couldn't happen because otherwise hills would get blocked from spawning periodically and an ant would have to come and eat the

Re: [racket] Google Challenge

2011-11-22 Thread Marijn
n starter-kit to racket just a few days ago. I wonder if its googlerank increased a lot during the last 12 hours, because I'd swear I didn't find it yesterday... It looks like a much more complete starting point. Marijn [1]:https://github.com/wfi/RacketStarter -BEGIN PGP SIGNATURE--

Re: [racket] Google Challenge

2011-11-22 Thread Marijn
re is at the top... Attached some racket code that implements a do-nothing-bot that passes the minimal test from the tools. Should be simple to convert to a starter-kit. Marijn #lang racket ;;; multi-dimensional arrays (require srfi/25) (define-syntax-rule (call-with-hash function hash keys ..

Re: [racket] plot: HOLY MOLEY!

2011-11-22 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21-11-11 18:52, Neil Toronto wrote: > On 11/21/2011 04:36 AM, Marijn wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> On 02-11-11 14:55, Laurent wrote: >>>> >>>> >>>> Wh

Re: [racket] plot: HOLY MOLEY!

2011-11-21 Thread Marijn
(sqr y -1 1 -1 1 #:color 4 #:line-color 4 > #:label "z = -x^2 - y^2"))) > > > (actually that's a seven-liner ;) ) > > Laurent I just tried this fragment on my current git checkout and got: inexact->exact: no exact representation for +nan.0 this is on a x86-64 GNU

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-18 Thread Marijn
`editor<%>'/`snip%' layer. Thanks for the clarification. I have been able to make it work. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6dgQ8ACgkQp/VmCx0OL2w6LgCgjZo6Zecg

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-18 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/18/11 01:39, Matthew Flatt wrote: > At Mon, 17 Oct 2011 16:33:26 +0200, Marijn wrote: >> Is it correct, that when you click the title bar of a window >> frame to select it, this causes the on-focus method of that frame

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-17 Thread Marijn
. The same recursive process as above is used to remove focus from any subwindows. Is that correct? Thanks, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-07 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/07/11 14:17, Matthew Flatt wrote: > At Fri, 07 Oct 2011 13:06:23 +0200, Marijn wrote: >> I've prepared a chopped-down attempt which defines an editor, an >> administrator and a display class and instantiates them. >

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-07 Thread Marijn
On 10/05/11 15:02, Matthew Flatt wrote: > At Wed, 05 Oct 2011 15:00:06 +0200, Marijn wrote: >> Suppose one has a spreadsheet-like grid drawn on a canvas%. How does >> one add text-field%-style behavior to the rectangles drawn? > > You could implement an `editor-admin%'

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-06 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/06/11 16:17, Matthew Flatt wrote: > At Thu, 06 Oct 2011 16:07:01 +0200, Marijn wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> On 10/06/11 13:31, Matthew Flatt wrote: >>> At Thu, 06 Oct 201

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-06 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/06/11 13:31, Matthew Flatt wrote: > At Thu, 06 Oct 2011 12:40:18 +0200, Marijn wrote: >> - - The display (a grid in my case) should create an >> editor-admin% which in turn should have a field to refer back to >> its di

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-06 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/06/11 13:31, Matthew Flatt wrote: > At Thu, 06 Oct 2011 12:40:18 +0200, Marijn wrote: >> - - The get-max-view method is not used to determine a bounding >> box of all displays of this editor in display coordinates (which >&

Re: [racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-06 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/05/11 15:02, Matthew Flatt wrote: > At Wed, 05 Oct 2011 15:00:06 +0200, Marijn wrote: >> Suppose one has a spreadsheet-like grid drawn on a canvas%. How >> does one add text-field%-style behavior to the rectangles drawn? > >

[racket] how to add text-field-style behavior to rectangles drawn on a canvas

2011-10-05 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear list, Suppose one has a spreadsheet-like grid drawn on a canvas%. How does one add text-field%-style behavior to the rectangles drawn? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla

Re: [racket] splicing internal define?

2011-09-29 Thread Marijn
s by the definitions That's certainly what I like it for. > Incidentally, Marijn, given that that's a module right there, I > suspect that the main reason you want to hide "value-store" like > this is if this code was actually the result of a macro expansion. This code is the

Re: [racket] splicing internal define?

2011-09-29 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey Sam, On 09/28/11 16:42, Sam Tobin-Hochstadt wrote: > On Wed, Sep 28, 2011 at 10:36 AM, Marijn wrote: >> >> recent talk about internal define being considered the preferred >> style made me focus on trying to use it mo

[racket] splicing internal define?

2011-09-28 Thread Marijn
(values (lambda (variable) (massoc variable value-store)) (lambda (variable value) (set-mcdr! (variable-ref variable) value) (variable-ref 'variable) Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with M

[racket] what does warp-pointer do?

2011-09-05 Thread Marijn
e the keyboard- or mouse-focus? Or something else entirely? Marijn [1]:http://docs.racket-lang.org/gui/canvas___.html#%28meth._%28%28%28lib._mred/main..rkt%29._canvas~3c~25~3e%29._warp-pointer%29%29 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla -

[racket] drag events on a canvas

2011-09-05 Thread Marijn
(currently turned off). Is this a bug or am I doing something wrong here? Marijn #lang racket/gui (define (handle-drag event) (print event)) (define (handle-motion event) #f) (define (handle-left-down event) #f #;(print event)) (define drawtest% (class canvas% (init parent) (super

Re: [racket] doubly linked list lib

2011-09-02 Thread Marijn
maybe racket also needs a Dumping Grounds... Marijn [1]:http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Dumping_Grounds > At Wed, 31 Aug 2011 11:46:34 +0200, Marijn wrote: >> >> [1 ] [1.1 ] >> [1.1.1 ] Hi Laurent, >> >> On 08/30/11 09:18, Laurent wrote:

Re: [racket] doubly linked list lib

2011-08-31 Thread Marijn
just the nodes, and there are some rudiments of that left in the code, but in the end the user code uses a special 'top element to indicate where the cyclical list is supposed to start. Good luck, Marijn (module dlist racket (provide dlist dl-insert dl-insert-right dl-remove for/dlist)

[racket] open-output-file #:exist

2011-08-24 Thread Marijn
: why is it only equivalent to update on Windows? Marijn [1]:http://docs.racket-lang.org/reference/file-ports.html?#%28def._%28%28lib._racket/private/base..rkt%29._open-output-file%29%29 [2]:http://docs.racket-lang.org/reference/file-ports.html?#%28def._%28%28lib._racket/private/base..rkt%29._with

Re: [racket] string->number failure value

2011-08-16 Thread Marijn
hat's why it needs an > explicit default argument. That is a good point, thanks. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5KiE8ACgkQp/VmCx0OL2x2KQCgpVP7bzUJIb8yMn81sudPr8MO c

[racket] string->number failure value

2011-08-16 Thread Marijn
>number string #:radix [radix 10] #:default [default #f]) What do you think? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5KcwQACgkQp/VmCx0OL2x1kQCfWDXSVBwHnBncWna/F4W2SXWG 9QkAn1iVa9PNe2J/jXUoB

Re: [racket] Help understanding error: compile: access from an uncertified context to unexported variable from module

2011-08-11 Thread Marijn
e racket (require 'macro) (dlist 3)) > > It seems to work. > > On Jun 17, 2011, at 8:19 AM, Sam Tobin-Hochstadt wrote: > >> On Fri, Jun 17, 2011 at 7:36 AM, Marijn wrote: >>> >>> My understanding so far is that `macro' expands to a use of the &g

Re: [racket] another mini-tutorial: a racket slice: munging IRC logs

2011-08-11 Thread Marijn
ices/irc-parsing/index.html > > > How does it look? I like how you show one way of converting a match to an object, and then show a better way. What I did not like very much is how the first way is really verbose and made me question whether to read on, and in retrospect the way using matc

Re: [racket] A question about code-style (and memory usage)

2011-08-03 Thread Marijn
es should be >> "capitalized" versions of those (ie, bigger ones somehow), if they >> exist. > > I don't think that there are such characters. What's wrong with ⋁ (U+22C1) and ⋀ (U+22C0)? (Also known as bigwedge and bigvee in LaTeX.) Marijn

[racket] Changing the background color dynamically in FrTime

2011-06-22 Thread Marijn
))) (define field2 (new ft-text-field% (parent root))) (define number2 (field->number field2)) (define field-sum (new ft-message% (parent root) (stretchable-width #t) (label (string-append "Sum: " (number-&

Re: [racket] status of FrTime

2011-06-22 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/22/11 14:42, Marijn wrote: > Hi list, > > I'm quite interested in the FrTime language, and decided to use my new > knowledge of implementing graphical programs in Racket to try and bluff > my way into a bit of FrTime hacki

[racket] status of FrTime

2011-06-22 Thread Marijn
ory indicated in the bottom right. Upon a fresh start it is at ~150MB, but after running aforementioned demos it had crept up to >400MB resulting in a noticeable slowdown of the demos. I'd really like to know what the status of FrTime is (if only to not spam the list with premature bug reports).

Re: [racket] Help understanding error: compile: access from an uncertified context to unexported variable from module

2011-06-20 Thread Marijn
ct link (l))) > > (module use racket > (require 'macro) > (dlist 3)) > > It seems to work. Thanks, I'll use `define-struct' and `make-' for now until this is fixed. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Usi

Re: [racket] sexp highlighting

2011-06-20 Thread Marijn
there's an option (the first one) that controls the paren > highlighting. I can confirm Nikita's problem of no highlighting for s-expressions and I just checked the option is turned on in my prefs. I don't see the problem with Ctrl-f and no purple ellipse. I'm using a few days

[racket] Help understanding error: compile: access from an uncertified context to unexported variable from module

2011-06-17 Thread Marijn
macro.rkt:17:34: compile: access from an uncertified context to unexported variable from module: "/home/marijn/racketzooi/macro.rkt" To get any indication as to the location of the error I had to do Language -> Choose Language and deselect Populate "compiled" directories. If y

Re: [racket] Reading Graph Structure: read: #..= expressions not allowed in read-syntax mode (??)

2011-06-09 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Matthias, On 06/09/11 16:34, Matthias Felleisen wrote: > > (1) To create cyclic structs you need mutability in our world. [gensym is 0 > assignments, cyclic structs is 1 assignment, and state is N assignments.] > > (2) I think the failure sh

  1   2   >