Re: [racket] Help generating PDF documents with Scribble

2013-03-18 Thread Marijn
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/ iEYEARECAAYFAlFG0u8ACgkQp/VmCx0OL2ydIQCdH1OoaqjgI/R6ST+G5XNDD9HM qXsAnRvU/63eMkKOCTvFjyLwoOVMEyJ5

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 from http://racket-lang.org

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.org/ * Documentation cross-reference information

Re: [racket] Beginners request for code review.

2013-02-01 Thread Marijn
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 Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlELlMYACgkQp/VmCx0OL2xmPACeIG8N3N3KoK10+Y4r2cpJ+7nk 3

Re: [racket] Racket v5.3.2

2013-02-01 Thread Marijn
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/VmCx0OL2xcWQCgpVFjtK7QBmATZt+OG8mTq9Jt

Re: [racket] Thread creation slow?

2012-08-13 Thread Marijn
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/ iEYEARECAAYFAlAozM0ACgkQp

Re: [racket] Racket on Ubuntu 12.04

2012-07-20 Thread Marijn
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 - http://enigmail.mozdev.org

Re: [racket] Racket on Ubuntu 12.04

2012-07-20 Thread Marijn
, 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://enigmail.mozdev.org

Re: [racket] Some struct questions

2012-07-16 Thread Marijn
of the struct. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAEBSEACgkQp/VmCx0OL2wfqQCfUaFVPm0Ci3wtmIX4MUY+fb60 7x0AnRPQNz3Yz6r1RPL3w8FqQg3QC/k8 =fEMY -END PGP SIGNATURE

Re: [racket] Cross-Platform Secure RNG?

2012-07-12 Thread Marijn
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 looking for. Marijn [1]:http://srfi.schemers.org/srfi-27

Re: [racket] why is the comparimng always false

2012-06-29 Thread Marijn
the Vanimal animal member might be. Further, (no article here!) `Vc(h)at' is not a(!) Vc(h)at (whichever way you typo-correct). Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/tU90ACgkQp

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

2012-05-21 Thread Marijn
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 -END PGP SIGNATURE

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

2012-05-21 Thread Marijn
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 ;Finite State Machine of arbitrary size using composable control (require racket/control rackunit

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 Aren't the last two lines just (hash

[racket] performance tuning summing a hash of vectors

2012-03-13 Thread Marijn
! 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, so

Re: [racket] strange loops

2012-03-06 Thread Marijn
)) (perfect-square? (- x z))) (return (list x y z sum)) (next-z (add1 z)) Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9WD9UACgkQp/VmCx0OL2y8+gCgiXhLP4pkO5/Iv6d0JKNdpv

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) (next-sum (add1 sum

Re: [racket] phases

2012-03-02 Thread Marijn
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 GnuPG with Mozilla - http

Re: [racket] exercise problem

2012-02-22 Thread Marijn
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 vriendelijke groeten, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

Re: [racket] Scala macros

2012-02-20 Thread Marijn
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: GnuPG v2.0.18 (GNU/Linux

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

2012-02-13 Thread Marijn
rackety way to go about that kind of thing? You can hide the internals of your data strucutre in a module and only expose (provide) those functions/things that are part of the public interface. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG

[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 hk...@gentoo.org Racket

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

2012-02-08 Thread Marijn
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. Without a test case it might be hard to help you, Marijn -BEGIN PGP

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

2012-02-07 Thread Marijn
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 Y5EAoIyCFpdM/DEXq/prI+JAQgiqbTd3 =z/G3 -END PGP SIGNATURE

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

2012-02-02 Thread Marijn
. 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 to the root frame. Marijn

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

2012-02-01 Thread Marijn
-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- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

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

Re: [racket] strange behavior

2012-01-31 Thread Marijn
' 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/0ccLpgYbeegZS6kZS/fpu t6QAn1KgKQtTs3lE/O4XqNp896KAiSqm =MJUL -END 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. :-| You're doing fine

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

2012-01-30 Thread Marijn
?) 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 -END PGP SIGNATURE

[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: Using

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

2012-01-24 Thread Marijn
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/ iEYEARECAAYFAk8epF4ACgkQp/VmCx0OL2w

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 hk...@gentoo.org wrote: On 16-01-12 15:28, Sam Tobin-Hochstadt wrote: On Mon, Jan 16, 2012 at 7:57 AM, Marijn hk...@gentoo.org wrote: ((_ ((id rule

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)

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) Comment

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, Marijn So after rewriting for syntax-case

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 hk...@gentoo.org wrote: ((_ ((id rule) ...)) (with-syntax (((dep ...) (free-vars (expand #'(rule ...) You need to use `local-expand', not `expand', here

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 assignable so b is constant only between 'set! messages Having

Re: [racket] filtering syntax

2012-01-16 Thread Marijn
...) (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. Marijn -BEGIN PGP SIGNATURE

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

2012-01-13 Thread Marijn
-class1% (size 2) (weight 200))) (send fast1 get-size) (send fast1 get-weight) Thanks again, You're welcome, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAk8QCYAACgkQp

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- (symbol-string f (syntax-datum

[racket] filtering syntax

2012-01-13 Thread Marijn
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/ iEYEARECAAYFAk8QNEkACgkQp/VmCx0OL2xFVgCfQCNE76n1RlxCIPlTr8QAUfVx

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: ((a) (b a) (c a b) (d c

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

2012-01-11 Thread Marijn
_field_) (define/public (_getter_) _field_) (define fast-class2% (fast-class2 size get-size)) (define fast2 (new fast-class2% (size 3))) (send fast2 get-size) Hope that helps, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla

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 ports are often noticeably slower than string

[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) (b (* 2 a)) (c (+ 2 a b into something which would

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 function-application with `let

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 something which would automatically propagate changes

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 also seemingly inaccessible via the macro-stepper

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

2012-01-03 Thread Marijn
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-outnodes) ;for splicing-let (require

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 the best spirit. :) What I found

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 hk...@gentoo.org 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 text-field, I

[racket] string-strip

2011-12-27 Thread Marijn
on 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 (ter leering ende

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

2011-12-21 Thread Marijn
did, nice work! I'll have to study the source later to see how you did it. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7xpuAACgkQp/VmCx0OL2wiegCeNO7ZOgoOsLUu7TcgwHmy63c1

[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

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

2011-12-15 Thread Marijn
) (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 magic of define-cbr. Marijn -BEGIN PGP SIGNATURE

Re: [racket] exercise 6.6.3 htdp

2011-12-01 Thread Marijn
very few function definitions that support your in-circle?. Hope that helps, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7XNT8ACgkQp/VmCx0OL2yGcwCgykWUnLNoiMDO9tpcGduHMbNL heMAn2MF15VhF

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 parser gives a really silly

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-name form is made available to you when using lexer

Re: [racket] Google Challenge

2011-11-25 Thread Marijn
happen because otherwise hills would get blocked from spawning periodically and an ant would have to come and eat the food to clear the hill. But you can ask in the forum. My searches so far have not turned up anything. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment

Re: [racket] Google Challenge

2011-11-22 Thread Marijn
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- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG

Re: [racket] plot: HOLY MOLEY!

2011-11-21 Thread Marijn
-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/Linux box Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

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 to be called. That's

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

2011-10-18 Thread Marijn
. 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/VmCx0OL2w6LgCgjZo6ZecgEXRRqs95GXqJ8+AR 6YkAniGjuGy/g/AX+f6wJHsW5ZtZzZOI

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

2011-10-17 Thread Marijn
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/ iEYEARECAAYFAk6cPLYACgkQp

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%' subclass to manage a `text

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. Unfortunately the editor doesn't

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 display. When an editor becomes

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 2011 12:40:18 +0200, Marijn wrote: - - The display

[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] doubly linked list lib

2011-09-02 Thread Marijn
... 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 multipart/signed (7bit)] [1.1 multipart/mixed (7bit)] [1.1.1 text/plain; ISO-8859-1 (quoted-printable)] Hi Laurent, On 08/30/11 09:18, Laurent wrote

[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] another mini-tutorial: a racket slice: munging IRC logs

2011-08-11 Thread Marijn
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 match isn't much less verbose. Wouldn't a simple (apply on-action (rest a-match)) work? Marijn -BEGIN PGP

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

2011-08-11 Thread Marijn
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 hk...@gentoo.org wrote: My understanding so far is that `macro' expands to a use of the `link' constructor which is somehow not allowed. All my attempts to duplicate

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 hacking. Unfortunately it seems

[racket] Changing the background color dynamically in FrTime

2011-06-22 Thread Marijn
-number field2)) (define field-sum (new ft-message% (parent root) (stretchable-width #t) (label (string-append Sum: (number-string (+ number1 number2)) (send root show #t) Marijn -BEGIN PGP SIGNATURE

Re: [racket] sexp highlighting

2011-06-20 Thread Marijn
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 old git version on an amd64 Gentoo linux box. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

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

2011-06-20 Thread Marijn
(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: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3/DUYACgkQp

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

2011-06-08 Thread Marijn
. Further I do not understand why my custom display code is called so often. Lastly, I wonder if there is a benefit to specific orderings of the shared clauses or not? Thanks, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http

Re: [racket] Bug or feature?

2011-06-06 Thread Marijn
and release to increase the slider from 0 to 1 the interactions window shows: (object:slider% ...) slider@1307345547311: 1 Marijn On 06/03/11 18:19, Antonio Menezes Leitao wrote: Hi, I noticed a strange behavior in Racket slider% widget. It seems that when I stop dragging the slider it makes

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

2011-06-06 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/06/11 15:14, Eli Barzilay wrote: 20 minutes ago, Marijn wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, why does the following code #lang racket (struct _dl (left val right)) (define (dlist a b c) #1=(_dl #f a #2=(_dl

[racket] iteration for user-defined data structures

2011-06-01 Thread Marijn
in the place of id, or a thunk which returns an identifier other-id, which is used to convert each use of id to other-id. My understanding of the rest of that subsection is yet too low to attempt a rewrite. Marijn [1]:http://docs.racket-lang.org/reference/for.html?q=for/hash#(part._.Deriving_

[racket] empty hash tables

2011-05-30 Thread Marijn
-first' which returns #f for empty hashes but otherwise returns an integer which is an index to the first element in the hash table (which sounds like hash tables are implemented using arrays and an index to the underlying array is returned). Marijn PS Note how hash table is spelled differently

Re: [racket] empty hash tables

2011-05-30 Thread Marijn
, forcing me to write (make-immutable-hash '()).. Is there a reason for this lack of simmetry? P. `make-immutable-hash' is for constructing immutable hashes from association lists; `hash' is the immutable equivalent of `make-hash'. Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU

Re: [racket] empty hash tables

2011-05-30 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/30/11 10:30, Marijn wrote: Hi Pierpaolo, On 05/30/11 10:24, Pierpaolo Bernardi wrote: BTW, since the topic of empty tables has been brought up: I am often (mildly) annoyed by the fact that make-hash takes 0 or 1 argument, while make

Re: [racket] empty hash tables

2011-05-30 Thread Marijn
the difference between traversing until the first non-disappeared key and traversing the complete table would still be significant, wouldn't it? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

[racket] racket/gui: reacting to close window event?

2011-05-26 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I would like to call some code when a user clicks the X in the upper left/right corner (close window button) or presses Alt-F4, but I didn't find anything about it in the docs. Any help? Thanks, Marijn -BEGIN PGP SIGNATURE- Version

Re: [racket] toy graphical list editor

2011-05-25 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Matthew, On 05/24/11 20:59, Matthew Flatt wrote: At Tue, 24 May 2011 15:54:55 +0200, Marijn wrote: After changing all the values to 1, when pressing an insert-button *sometimes* the window is resized horizontally (slightly larger width

Re: [racket] toy graphical list editor

2011-05-24 Thread Marijn
Hi Matthew, On 05/24/11 05:02, Matthew Flatt wrote: At Mon, 23 May 2011 16:04:24 +0200, Marijn wrote: I'm trying to implement a toy graphical list editor program to get a feel for GUI programming in racket. Basic idea is a graphical representation of a list with text-field%s alternated

[racket] line-spacing in scribble?

2011-05-24 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, is it possible to set the line-spacing in scribble documents? I searched for `line-spac' in the manual but that only seems to find racket/gui methods... Thanks, Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment

[racket] toy graphical list editor

2011-05-23 Thread Marijn
and rudimentary functioning of the program is attached. Side-question: why does pressing an insert-button resize the top-level frame%? Any help appreciated, Marijn #lang racket/gui (define f (new frame% [label List Editor])) (define items (new vertical-pane% (parent f))) (define (create-item