RE: [racket-users] define-language, trouble with parentheses.

2015-04-26 Thread Jos Koot
-Original Message- From: William J. Bowman [mailto:w...@williamjbowman.com] Sent: domingo, 26 de abril de 2015 19:54 To: Jos Koot Cc: racket-users@googlegroups.com Subject: Re: [racket-users] define-language, trouble with parentheses. (resending due to issues posting to list) Jos, What are you

[racket-users] constant propagation

2015-05-18 Thread Jos Koot
info, please tell me where. Thanks to the plt Racket team! Jos koot -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroup

RE: [racket-users] constant propagation

2015-05-18 Thread Jos Koot
lunes, 18 de mayo de 2015 13:17 To: Jos Koot Cc: racket-users@googlegroups.com Subject: Re: [racket-users] constant propagation Constant propagation is not a property of a language but its implementation. Few implementations document which transformations they currently implement. -- Matthi

RE: [racket-users] Strange behaviour of the eq? operator in racket repl

2015-05-18 Thread Jos Koot
I think Rackets's reference and guide are *very clear* about eq?, eqv? and equal?. They are even described well for structures and hashes and much more. Be aware, though, that in general equality can be interpreted in many ways. At the mathematical level equality is a difficult and in many cases ev

RE: [racket-users] Strange behaviour of the eq? operator in racket repl

2015-05-18 Thread Jos Koot
A fact is that equal? does not distinguish between for example two mutable lists that happen to have the same content (whatever the "same" may mean) They may be equal? at one moment and not be equal? a little bit later. With eq? you don't have this problem, BUT that's a very distinct kind of equali

RE: [racket-users] Strange behaviour of the eq? operator in racket repl

2015-05-18 Thread Jos Koot
[mailto:michael.tied...@o2online.de] Sent: lunes, 18 de mayo de 2015 21:26 To: Jos Koot; racket-users@googlegroups.com Subject: Re: [racket-users] Strange behaviour of the eq? operator in racket repl snip Maybe, I never thought about that in mathematical terms if not with the concept of identity. How could

RE: [racket-users] try a new macro expander

2015-05-22 Thread Jos Koot
Hi Matthew, Your proposal sounds very good to me (for what my opinion is worth). Thanks. FWIW I give you my findings, which are positive. I have tried the snapshot with the tests of three of my systems: lc-with-redex (not in planet or github) fmt (on planet) infix (not yet in planet or github) In t

[racket-users] disappeeraing binding arrows

2015-05-22 Thread Jos Koot
Below two versions of a very stripped version of a macro I have made. In version 1 background expansion and check-syntax show binding arrows within macro stx-case. However, in version 2 the arrows are not shown. How come? Thanks, Jos #lang racket (require (for-syntax racket)) ;;; version 1

RE: [racket-users] disappeeraing binding arrows

2015-05-22 Thread Jos Koot
Hi Alexander Thanks for taking notice of my post. Yes, it is within the *definition* that the arrows don't show up. I apologize if my post wasn't clear. Jos _ From: Alexander D. Knauth [mailto:alexan...@knauth.org] Sent: viernes, 22 de mayo de 2015 21:42 To: Jos Koot Cc: Ra

RE: [racket-users] disappeeraing binding arrows

2015-05-23 Thread Jos Koot
Thanks, that is minimal indeed. Jos -Original Message- From: gus.ma...@gmail.com [mailto:gus.ma...@gmail.com] On Behalf Of Gustavo Massaccesi Sent: sábado, 23 de mayo de 2015 0:17 To: Jos Koot Cc: Alexander D. Knauth; Racket-Users List Subject: Re: [racket-users] disappeeraing binding

[racket-users] racket versus racket/base

2015-05-23 Thread Jos Koot
This works: #lang racket (define-syntax (x y) (syntax-case y () (_ (syntax (quote monkey) x ; -> monkey This does not work #lang racket/base (define-syntax (x y) (syntax-case y () (_ (syntax (quote monkey) gives the expansion time error: syntax-case: unbound identifier in the tran

RE: [racket-users] racket versus racket/base

2015-05-23 Thread Jos Koot
Thanks. Your answer clarifies my brain. Jos _ From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Alexander D. Knauth Sent: sábado, 23 de mayo de 2015 20:06 To: Jos Koot Cc: Racket-Users List Subject: Re: [racket-users] racket versus racket/base It

[racket-users] test amazes me

2015-05-24 Thread Jos Koot
#lang racket (module a racket (require test-engine/racket-tests) (check-expect 1 1) (test)) (module b racket (require test-engine/racket-tests) (check-expect 2 2) (test)) (require 'a 'b) This gives me: Welcome to DrRacket, version 6.2.900.3--2015-05-16(e8b52f6/a) [3m]. Language: rac

RE: [racket-users] test amazes me

2015-05-24 Thread Jos Koot
that value was mutated in between the runs of test, but was that the intention? I don't know. Also it appears to evaluate the second expression first and the first expression second. Weird. On May 24, 2015, at 6:42 PM, Jos Koot wrote: #lang racket (module a racket (require test-e

[racket-users] 2 point about sribble

2015-05-28 Thread Jos Koot
Hi to all, margin-note of scribble no longer puts the notes in the right hand margin. I prefer the older layout with the margin-notes at the right hand side of the text proper. This may be a problem for margin-notes consisting of much text. However, I think a margin notes should always be very co

RE: [racket-users] 2 point about sribble

2015-05-29 Thread Jos Koot
Thanks to Metthew Burrerick and Gereg Henderschott for your replies. Deleting the css files works. I think best for me is to get accustomed to the new format. I think uniformness of format of docs is important, especially when putting things available for others. Thanks again, Jos _ From:

RE: [racket-users] 2 point about sribble

2015-05-29 Thread Jos Koot
BTW, expanding to full screen,does not immediately do what I want. Reducing far enough the zoom factor of the browser automatically places the margin notes in the margin. Of course a full screen allows larger zoom factors than delimited screens. Very nice. Thanks, Jos _ From: Jos Koot

[racket-users] infix

2015-05-30 Thread Jos Koot
To whom is interested, https://gist.github.com/joskoot/797a9e7d2276cf59d747 A toy allowing infix notation to be embedded in Racket. Based purely on pattern matching of syntax-case. In many aspects differs from the infix of Jens Axel Søgaard. I probably never shall use it, but I had much fun mak

[racket-users] defform quastion

2015-06-04 Thread Jos Koot
Hi, I have tried to use defform of scribble to describe the following: syntax ($ infix-expr) → any infix-expr ::= addition addition ::= term addition ::= addition + term addition ::= addition - term term ::= etc. Using #:grammar I can easily get: addition = term | (ad

RE: [racket-users] defform quastion

2015-06-04 Thread Jos Koot
Hi Mathhew, Thanks very much. I am sorry I did not see code:line by myself. Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: jueves, 04 de junio de 2015 17:01 To: Jos Koot Cc: 'Racket-Users List' Subject: Re: [racket-users] defform quastion Y

RE: [racket-users] defform quastion

2015-06-05 Thread Jos Koot
l and many errors. It seems like unquote-syntax, but I don't see a quasiquote-syntax. Surely I ought to read more docs on scribble, but where? Thanks, Jos Koot -Original Message- From: Matthew Flatt [ <mailto:mfl...@cs.utah.edu> mailto:mfl...@cs.utah.edu] Sent: jueves, 04 de j

[racket-users] debug on letrec

2015-06-10 Thread Jos Koot
as above. Best wishes, Jos Koot -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, v

[racket-users] allignment in defform

2015-06-13 Thread Jos Koot
defform of scribble/manual very well alligns the elements of #:grammar. Every = and | is well alligned. However, it does not align the collons of #:contract. Not a problem, of course. Just a matter of elegance, I think. Best wishes, Jos Koot BTW The more I use scribble, the more I like it

[racket-users] stream-lazy

2015-07-26 Thread Jos Koot
example shows, stream-lazy can be exposed by means of stream-lambda. Best wishes, Jos Koot -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ra

[racket-users] Distinct instantiations of modules

2015-08-01 Thread Jos Koot
s wanted Nevertheless, is there any chance to modify things such that once a module has been instantiated, each new require of that module gives the same instantiation? May be there are reasons not to do so, but I do not know why not. Your opinion would be much appreciated. Thanks, Jos Koot

RE: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Jos Koot
rom that file. PS: There is a lot more about testing metacircularity, but that is off topic here. Jos Koot -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Neil Van Dyke Sent: martes, 04 de agosto de 2015 19:59 To: Sean Kanal

RE: [racket-users] Distinct instantiations of modules

2015-08-07 Thread Jos Koot
Thanks for the suggestion, Jos _ From: Alexander D. Knauth [mailto:alexan...@knauth.org] Sent: jueves, 06 de agosto de 2015 16:55 To: Jos Koot Cc: Racket-Users List Subject: Re: [racket-users] Distinct instantiations of modules I think namespace-attach-module is one way to do this

[racket-users] namespace-undefine-variable! question

2015-08-27 Thread Jos Koot
The following works: #lang racket/base #;1 (define ns (make-base-namespace)) #;2 (namespace-variable-value 'list #t (λ () 'not-found) ns) ; -> # #;3 (namespace-set-variable-value! 'list 'whatever (λ () #f) ns) #;4 (namespace-undefine-variable! 'list ns) #;5 (namespace-variable-value 'list#t (λ ()

RE: [racket-users] namespace-undefine-variable! question

2015-08-27 Thread Jos Koot
hanks again, Jos _ From: jensaxelsoega...@gmail.com [mailto:jensaxelsoega...@gmail.com] On Behalf Of Jens Axel Søgaard Sent: jueves, 27 de agosto de 2015 17:35 To: Jos Koot Cc: Racket-Users List Subject: Re: [racket-users] namespace-undefine-variable! question The issue here is whethe

RE: [racket-users] namespace-undefine-variable! question

2015-08-27 Thread Jos Koot
playing around. Thanks for your comment, Jos _ From: Deren Dohoda [mailto:deren.doh...@gmail.com] Sent: jueves, 27 de agosto de 2015 20:19 To: Jos Koot Cc: Jens Axel Søgaard; Racket-Users List Subject: Re: [racket-users] namespace-undefine-variable! question Hi Jos, >But some of them

RE: [racket-users] namespace-undefine-variable! question

2015-08-28 Thread Jos Koot
ap? argument to namespace-undefine- variable!. Thanks again, Jos _ From: jensaxelsoega...@gmail.com [mailto:jensaxelsoega...@gmail.com] On Behalf Of Jens Axel Søgaard Sent: viernes, 28 de agosto de 2015 13:48 To: Jos Koot Cc: Racket-Users List Subject: Re: [racket-users] namespace-un

[racket-users] custom-print called twice?

2015-09-01 Thread Jos Koot
(list (cons prop:custom-write printer ((name) (make-struct-field-accessor acc 0 'name))) (constr 'y)) ; -> # n ; -> 2 ;Done with ;DrRacket, version 6.2.0.5--2015-07-06(d6fa581/a) [3m]. ;Language: racket [custom]; memory limit: 2000 MB. Best wishes, Jos Koot -- You re

RE: [racket-users] custom-print called twice?

2015-09-01 Thread Jos Koot
Thanks for the answer, rapid as always. Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: miércoles, 02 de septiembre de 2015 2:11 To: Jos Koot Cc: 'racket users'; jos.k...@gmail.com Subject: Re: [racket-users] custom-print called twice? The first

RE: [racket-users] values considered harmful

2015-09-14 Thread Jos Koot
In the last line split&flip receives 0, but it needs a pair. The following wotks correct: #lang racket/base (define (split&flip xy) (define-values (x y) (values (car xy) (cdr xy))) (values y x)) ;; My mistake: x should be a pair (define-values (a b) (split&flip (cons 0 1))) (cons a b) ; -> (

RE: [racket-users] values considered harmful

2015-09-14 Thread Jos Koot
Please ignore my stupid remark. Trying the code of Benjamin Greenman in DrRacket, version 6.2.0.5--2015-07-06(d6fa581/a) [3m] I did not get a segfault but a correct error message. I did not realize that Benjamin Greenman was referring to a segfault. Sorry for the noise, Jos _ From: Jos

RE: [racket-users] Re: Writing text to a file with correct newlines

2015-10-06 Thread Jos Koot
Yes, notepad is strange. Why not use wordpad? Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Josh English Sent: martes, 06 de octubre de 2015 6:06 To: Racket Users Subject: [racket-users] Re: Writing text to a file with corre

RE: [racket-users] (atanh -2) -> +nan.0

2015-10-07 Thread Jos Koot
#lang racket (require math/base) (define-syntax-rule (tst x ...) (begin (let ((y (string->number 'x))) (printf "~a ~s ~s ~s~n" 'x y (atanh y) (real? y))) ...)) (tst "-2" "-2+0i" "-2+0.0i" "-2.0" "-2.0+0i" "-2.0+0.0i") Produces -2 -2 +nan.0 #t -2+0i -2 +nan.0 #t -2+0.0i -2.0+0.0i -0.54

[racket-users] question and opinion about phylosophy behind procedure curry

2015-11-17 Thread Jos Koot
#lang racket #| In the docs about procedure curry I read: " A function call (curry proc v ...) is equivalent to ((curry proc) v ...). In other words, curry itself is curried. " This means: |# ((curry list)) ; -> # #| where I would prefer: ((curry list)) ; -> () To me the following see

[racket-users] Calling a procedure without allowing it to permanently alter parameters.

2016-01-12 Thread Jos Koot
#| Hi, Consider a procedure, say protected-caller, that accepts a thunk and calls it, but does not want any parameter or handler to be altered by the thunk. Of course the called thunk can alter parameters and handlers for its own use, but I want all parameters and handlers reset after return from t

RE: [racket-users] Calling a procedure without allowing it to permanently alter parameters.

2016-01-12 Thread Jos Koot
Your suggestion works, but only for explicitly parameterized parameters. There may be parameters that I don't know of, but nevertheless may affect my protected-caller. Therefore I want ALL parameters protected. Thanks, Jos -Original Message- From: racket-users@googlegroups.com [mailto:rack

RE: [racket-users] Calling a procedure without allowing it to permanently alter parameters.

2016-01-13 Thread Jos Koot
Jon and Jon, Both thanks for your replies. I'll stick to call-in-nested-thread. Jos _ From: Jon Zeppieri [mailto:zeppi...@gmail.com] Sent: miércoles, 13 de enero de 2016 6:03 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] Calling a procedure without allowing it to perman

[racket-users] defproc duplicate argumnt

2016-01-20 Thread Jos Koot
I have: @defproc[(fmt (format (or/c string? fmt?)) ... (port (or/c output-port? 'string 'str 'current 'cur 'argument 'arg) 'string) (and/c procedure? fmt?)]{bla bla bla} in a scrbl file, where 'bla bla bl

RE: [racket-users] Re: (eqv? Racket-land Wonderland) -> #t

2016-02-14 Thread Jos Koot
y weak spots in poor code. My 2 cents, Jos Koot -Original Message- From: racket-users@googlegroups.com [ <mailto:racket-users@googlegroups.com> mailto:racket-users@googlegroups.com] On Behalf Of Neil Van Dyke Sent: domingo, 14 de febrero de 2016 15:26 To: Saša Janiška;

RE: [racket-users] Re: recursive definition of a PROPOSITION

2016-02-19 Thread Jos Koot
Do you mean the following? (define (a) (case (random 6) [(0) (string-append "P" "→" (a))] [(1) (string-append "R" "↔" (a))] [(2) (string-append "T" "∧" (a))] [(3) (string-append "Z" "⊕" (a))] [(4) (string-append "S" "q" (a))] [(5) "" ])) Jos -Original Message-

[racket-users] second->date

2016-02-19 Thread Jos Koot
The following surprises me: > (seconds->date (sub1 (expt 2 40))) seconds->date: integer is out-of-range integer: 1099511627775 Nevertheless I can go further on in time: > (seconds->date (sub1 (expt 2 50))) #(struct:date* 40 5 11 23 9 22520 1 266 #t 7200 0 "Romance Day

RE: [racket-users] second->date

2016-02-19 Thread Jos Koot
tly) 35680317? Jos _ From: Jon Zeppieri [mailto:zeppi...@gmail.com] Sent: viernes, 19 de febrero de 2016 23:31 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] second->date I'm not especially familiar with the code in question, but it looks to me like some time-handling

RE: [racket-users] second->date

2016-02-20 Thread Jos Koot
Thanks to both Jon and Matthew. BTW, Jon, my mailer (microsoft outlook) sometimes does strange things with the fonts :) Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: sábado, 20 de febrero de 2016 2:58 To: Jos Koot; Jon Zeppieri Cc: Racket Users Subject

[racket-users] ispell

2016-02-25 Thread Jos Koot
Hi, Trying to check spelling in DrRacket for a scrbl document, I get the message that aspell or ispell cannot be found. Where can I find it? How to install it? I work with Windows 7. Thanks, Jos -- You received this message because you are subscribed to the Google Groups "Racket Users" group. T

RE: [racket-users] Re: ispell

2016-02-26 Thread Jos Koot
Thanks, I tried to download the english dictionary, but my computer can't run the .exe file. Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Lehi Toskin Sent: viernes, 26 de febrero de 2016 0:30 To: Racket Users Subject: [rack

RE: [racket-users] Re: ispell

2016-02-26 Thread Jos Koot
. (I usually use the 64 bit version) Thanks for your help. Jos _ From: Stephen De Gabrielle [mailto:spdegabrie...@gmail.com] Sent: viernes, 26 de febrero de 2016 18:15 To: Jos Koot; Lehi Toskin; Racket Users Subject: Re: [racket-users] Re: ispell It's been a while but I believe the W

RE: [racket-users] Re: ispell

2016-02-29 Thread Jos Koot
14:32 To: Jos Koot; Lehi Toskin; Racket Users Subject: Re: [racket-users] Re: ispell Lyx FTP site for Aspell for Windows <ftp://ftp.lyx.org/pub/lyx/contrib/aspell6-windows/> sorry pasting the shortcut did work ftp://ftp.lyx.org/pub/lyx/contrib/aspell6-windows/ (use 'guest') I unf

[racket-users] submodules in definitions and interactions window.

2016-03-09 Thread Jos Koot
The following does not work in the definitions window of DrRacket: #lang racket (module a racket (display "hello")) (module b racket (require 'a)) (module c racket (require 'b)) (require 'c) But when putting it in the interactions-window (without the #lang line), it works. After reading the d

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
See https://en.wikipedia.org/wiki/Eight_queens_puzzle For a non recursive non-back-tracking algorithm. It is a loop that (when using a vector) can easily be unrolled in parallelly executed loops. I implemented it as follows running on 2 processors: #lang racket #| The following text is copied from

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
symmetrical problems. Best wishes, Jos -Original Message- From: Brian Adkins [mailto:lojicdot...@gmail.com] Sent: sábado, 12 de marzo de 2016 23:33 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] Sequential vs. Parallel 13-Queens program The code is a little difficult for me to

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
symmetrical problems. Best wishes, Jos -Original Message- From: Brian Adkins [mailto:lojicdot...@gmail.com] Sent: sábado, 12 de marzo de 2016 23:33 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] Sequential vs. Parallel 13-Queens program The code is a little difficult for me

RE: [racket-users] Sequential vs. Parallel 13-Queens program

2016-03-12 Thread Jos Koot
)), because only rows (or cullums) are considered, not all N^2 squares of the board. Jos -Original Message- From: Brian Adkins [mailto:lojicdot...@gmail.com] Sent: sábado, 12 de marzo de 2016 23:33 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] Sequential vs. Parallel 13-Queens

RE: [racket-users] Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Jos Koot
Consider (define/memoized (a b c d) form0 form1 form2) . body allows the body to consist of more than one form. Without the dot, syntax define/memoized would accept bodies of one form only, that is (define/memoized (a b c d) form0) would match, but (define/memoized (a b c d) form0 form1 form2) woul

RE: [racket-users] Re: Sequential vs. Parallel 13-Queens program

2016-03-14 Thread Jos Koot
I have looked up a N-queens program I made a long time ago. It finds all solutions. My timings are faster I think. I need 2 seconds (in DrRacket) for N=12. 14200 solutions of which 1787 are not symmetrically equivalent. If you want I send you the code privately. 83 lines. Finding the solutions take

RE: [racket-users] dynamic-require

2016-03-18 Thread Jos Koot
Ir works fine. I must have overlooked something in the docs. Thanks again. Jos _ From: Scott Moore [mailto:sc...@thinkmoore.net] On Behalf Of Scott Moore Sent: miércoles, 16 de marzo de 2016 18:05 To: Jos Koot; Racket Users Cc: Jos Koot Subject: Re: [racket-users] dynamic-require If

RE: [racket-users] dynamic-require

2016-03-19 Thread Jos Koot
Thanks very much. I'll try that. I wonder what happens when I already have a file test.rkt in the current directory, but I'll find out. Thanks again, Jos. _ From: Scott Moore [mailto:sc...@thinkmoore.net] Sent: miércoles, 16 de marzo de 2016 18:03 To: Jos Koot; Racket Users Cc

[racket-users] dynamic-require

2016-03-19 Thread Jos Koot
Hi, The following example of dynamic-require in the reference manual works in the interactions window of DrRacket, but not in its definitions window: (module a racket/base (displayln "hello")) (dynamic-require ''a #f) How do I do this in the definitions window? The reason I use dynamic-req

[racket-users] submodule order dependency

2016-03-22 Thread Jos Koot
The following works in the definitions window of DrRacket: #lang racket (module a racket (display 'dog)) (module b racket (require (submod ".." a))) (require 'b) Display 'dog' when run. But reversing the order of the submodules a and b does not work: #lang racket (module b racket (require (

RE: [racket-users] submodule order dependency

2016-03-22 Thread Jos Koot
hatever) So indeed, the choice of order as has been made seems more natural. Thanks again, Jos -Original Message- From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] Sent: martes, 22 de marzo de 2016 17:13 To: Jos Koot Cc: 'Racket Users' Subject: Re: [racket-users] submodule

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 program

Re: [racket] begin vs +

2010-08-02 Thread Jos Koot
Because all the time 9 is added to 2 yielding 11. Jos > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Keiko Nakata > Sent: 02 August 2010 14:55 > To: mfl...@cs.utah.edu > Cc: users@racket-lang.org > Subject: Re: [racket] be

Re: [racket] syntax, differently

2010-08-02 Thread Jos Koot
Within 80 columns (not counting the startiong comment. Hope your mailer does not insert or remove line-breaks. #lang racket ;; : state -> (listof state) ;; given a state, compute all possible successor states that can be reached in one boat crossing (define (compute-possible-states state) (loc

Re: [racket] begin vs +

2010-08-02 Thread Jos Koot
Call/cc captures all required variables needed for its continuation, but it does not capture their states. How about a variable bound to a box that have been captured in a continuation? Alter the content of the box and call the continuation. It sees the very same box with the new content. Calling a

Re: [racket] syntax, differently

2010-08-02 Thread Jos Koot
> -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Horace Dynamite > Sent: 02 August 2010 16:31 > To: Robby Findler; users@racket-lang.org > Subject: Re: [racket] syntax, differently > > > That said, if you hit return after ea

Re: [racket] syntax, differently

2010-08-02 Thread Jos Koot
WQhy would this be tricky? Jos > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Robby Findler > Sent: 02 August 2010 16:34 > To: Horace Dynamite > Cc: users@racket-lang.org > Subject: Re: [racket] syntax, differently > > On

Re: [racket] syntax, differently

2010-08-02 Thread Jos Koot
pretty-print (with (pretty-print-columns 80))? jos > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Jos Koot > Sent: 02 August 2010 16:44 > To: 'Robby Findler'; 'Horace Dynamite' > C

Re: [racket] auto-spacer

2010-08-02 Thread Jos Koot
+1, I do this often in my code (in which case I don't touch auto-redent-all) Jos _ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Laurent Sent: 02 August 2010 17:19 To: PLT-Scheme Mailing List Subject: [racket] auto-spacer Speaking of DrRacket U

Re: [racket] syntax, differently

2010-08-02 Thread Jos Koot
> -Original Message- > From: robby.find...@gmail.com > [mailto:robby.find...@gmail.com] On Behalf Of Robby Findler > Sent: 02 August 2010 17:41 > To: Jos Koot > Cc: Horace Dynamite; users@racket-lang.org > Subject: Re: [racket] syntax, differently > > Pretty-

Re: [racket] message passing

2010-08-08 Thread Jos Koot
May be we can help better with a reference to the exercise. I really can't make up what you are trying to do. Jos _ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of iam_h...@aol.in Sent: 08 August 2010 19:20 To: users@racket-lang.org Subject: [racke

Re: [racket] question about foldl implementation

2010-08-12 Thread Jos Koot
_ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Will Kurt Sent: 13 August 2010 03:53 To: users@racket-lang.org Subject: [racket] question about foldl implementation For a presentation I'm working on I've been implementing various higher order

Re: [racket] question about foldl implementation

2010-08-13 Thread Jos Koot
+1, jos > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Matthias Felleisen > Sent: 13 August 2010 23:19 > To: Sam Tobin-Hochstadt > Cc: users@racket-lang.org; Joe Marshall > Subject: Re: [racket] question about foldl implem

Re: [racket] Nested scope in D vs Racket

2010-08-21 Thread Jos Koot
I don't consider this a flaw in the language. How are we going to write a recursive function when not allowing (define (x arg) expr-possibly-calling-x-recursively)? Not by a Y-combinator I hope. I think the following is not too difficult to explain to beginning programmers. In (define (x arg) ...

Re: [racket] Nested scope in D vs Racket

2010-08-21 Thread Jos Koot
Thanks for correcting me Jos > -Original Message- > From: shri...@gmail.com [mailto:shri...@gmail.com] On Behalf > Of Shriram Krishnamurthi > Sent: 21 August 2010 19:01 > To: Jos Koot > Cc: Matthias Felleisen; users@racket-lang.org; Eduardo Cavazos > Subject: Re:

Re: [racket] Question about the double submit bug 'in the wild'

2010-08-23 Thread Jos Koot
As one of the older ones on this list let me tell me my experience. My first job was as a scientific researcher in physics at the university of Amsterdam. (Netherlands) Almost complete freedom. Even before entering this job I had, by self study, become a group expert on programming (assembler an

Re: [racket] Question about the double submit bug 'in the wild'

2010-08-23 Thread Jos Koot
> -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Horace Dynamite > Sent: 24 August 2010 01:26 > To: Neil Van Dyke > Cc: racket > Subject: Re: [racket] Question about the double submit bug > 'in the wild' > > Thanks very m

[racket] problem with map example in docs of typed/racket

2010-08-26 Thread Jos Koot
See below, Jos In definitions window #lang typed/racket (: map (All (C A B ...) ((A B ... B -> C) (Listof A) (Listof B) ... B -> (Listof C (define (map f as . bss) (if (or (null? as) (ormap null? bss))

Re: [racket] problem with map example in docs of typed/racket

2010-08-26 Thread Jos Koot
> From: Hari Prashanth [mailto:krh...@ccs.neu.edu] > Sent: 26 August 2010 20:17 > To: Jos Koot > Cc: PLT-Scheme Mailing List > Subject: Re: [racket] problem with map example in docs of typed/racket > > I think the example should be changed to > > (: my-map >

Re: [racket] problem with map example in docs of typed/racket

2010-08-26 Thread Jos Koot
Ha, Thanks. I'll try. Jos > -Original Message- > From: Hari Prashanth [mailto:krh...@ccs.neu.edu] > Sent: 26 August 2010 22:18 > To: Jos Koot > Cc: PLT-Scheme Mailing List > Subject: Re: [racket] problem with map example in docs of typed/racket > &

Re: [racket] Looking for feedback on code style

2010-09-10 Thread Jos Koot
(select 3 '(1 1 2 2 3 3 4 4 5 5 6 6 7 7)) with http://programmingpraxis.com/2009/12/11/selection/ runs into an infinite loop. I think shuffling beforehand is not enough. The pivot element must be choosen randomly from the remaining list of numbe

Re: [racket] Looking for feedback on code style

2010-09-10 Thread Jos Koot
containing all numbers left so far, resulting in an infinite loop. Jos > -Original Message- > From: Prabhakar Ragde [mailto:plra...@uwaterloo.ca] > Sent: 10 September 2010 23:38 > To: Jos Koot > Subject: Re: [racket] Looking for feedback on code style > > On 9/10/10 5:

Re: [racket] Looking for feedback on code style

2010-09-14 Thread Jos Koot
The following measurement shows O(n). But O(n) = O(C+n) where C may be a big number. Jos #lang racket #| (select k lor (randomize? #f)) -> r k : exact integer number. lor: non empty list of real numbers. randomize? : if false lor is supposed to be in random order. r :

Re: [racket] Looking for feedback on code style

2010-09-14 Thread Jos Koot
> -Original Message- > From: robby.find...@gmail.com > [mailto:robby.find...@gmail.com] On Behalf Of Robby Findler > Sent: 14 September 2010 17:16 > To: Stephen Bloch > Cc: Jos Koot; users@racket-lang.org > Subject: Re: [racket] Looking for feedback on code st

Re: [racket] Looking for feedback on code style

2010-09-14 Thread Jos Koot
This means that even function add1 cannot always be concidered to be O(1). It may depend on the representation of numbers. In this sense I agree with you. Jos > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Stephen Bloch >

[racket] internal definitions in r6rs

2010-09-18 Thread Jos Koot
Hi, Section 11.3 of R6RS states: "An expanded (see chapter 10) containing variable definitions can always be converted into an equivalent letrec* expression." The semantics of letrec* includes "each is assigned in left-to-right order". This I interpret as allowing an internal definition to refe

Re: [racket] internal definitions in r6rs

2010-09-18 Thread Jos Koot
Thanks anyway for taking the trouble to answer. Jos > -Original Message- > From: Deren Dohoda [mailto:deren.doh...@gmail.com] > Sent: 18 September 2010 21:35 > To: Jos Koot > Cc: PLT-Scheme Mailing List > Subject: Re: [racket] internal definitions in r6rs > >

Re: [racket] Limits of init-auto-scrollbars in canvas%

2010-09-18 Thread Jos Koot
A dump question, may be, and off topic too perhaps, but where are you going to store 10x10=10^18=1000 tera pixels? Jos? > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Martin Dirichs > Sent: 18 September 2010

Re: [racket] internal definitions in r6rs

2010-09-18 Thread Jos Koot
obby.find...@gmail.com] On Behalf Of Robby Findler > Sent: 19 September 2010 01:03 > To: Jos Koot > Cc: PLT-Scheme Mailing List > Subject: Re: [racket] internal definitions in r6rs > > It has been a while but I believe the r6 formal model covers > this point. > > Robby >

Re: [racket] internal definitions in r6rs

2010-09-19 Thread Jos Koot
Thanks Matthew, Jos > -Original Message- > From: Matthew Flatt [mailto:mfl...@cs.utah.edu] > Sent: 19 September 2010 03:54 > To: Jos Koot > Cc: 'PLT-Scheme Mailing List' > Subject: Re: [racket] internal definitions in r6rs > > This is a bug in t

Re: [racket] Eugene Kohlbecker's dissertation

2010-09-20 Thread Jos Koot
Thanks, very impressive indeed. Also thanks for contributing to freely accessible scientific publications. Jos > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Matthias Felleisen > Sent: 20 September 2010 19:41 > To: PLT-Sch

Re: [racket] Is there a name for: (lambda (x) (x)) ?

2010-09-23 Thread Jos Koot
I often wondered why -identity- is not included in the exports of racket/base. But which functions would we choose? (lambda (x) x) or (lambda x (apply values x)) which can simply be wrtitten as values So -values- may be the identity you are looking for. Jos > -Original Message- > From: use

Re: [racket] Is there a name for: (lambda (x) (x)) ?

2010-09-23 Thread Jos Koot
s there a name for: (lambda (x) (x)) ? > > On 9/23/10 11:02 AM, Jos Koot wrote: > > I often wondered why -identity- is not included in the exports of > > racket/base. > > But which functions would we choose? > > (lambda (x) x) > > or > > (lambda x (app

Re: [racket] a small programming exercise

2010-10-15 Thread Jos Koot
When taking a long list of pseudo random positive integers most of which are far greater than the base, I expect about the same frequency for each first digit from 1 to base-1. This seems to hold if the base is a power of 10, but for other bases, e.g. base 24, I get rather unexpected results. See p

Re: [racket] a small programming exercise

2010-10-15 Thread Jos Koot
t: Re: [racket] a small programming exercise > > On 15/10/10 11:33, Jos Koot wrote: > > When taking a long list of pseudo random positive integers most of > > which are far greater than the base, I expect about the > same frequency > > for each first digit from 1 to b

Re: [racket] a small programming exercise

2010-10-15 Thread Jos Koot
> -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Chris Stephenson > Sent: 15 October 2010 11:13 > To: users@racket-lang.org > Subject: Re: [racket] a small programming exercise > snip > > Think about the decimal numbers i

Re: [racket] a small programming exercise

2010-10-15 Thread Jos Koot
_ From: Phil Bewig [mailto:pbe...@gmail.com] Sent: 15 October 2010 15:06 To: Jos Koot Cc: Chris Stephenson; users@racket-lang.org Subject: Re: [racket] a small programming exercise Not quite. Random numbers are uniformly distributed, so the first digits of a set of random numbers

[racket] equal normalized paths

2010-10-29 Thread Jos Koot
Hi, Can I trust that normalize-path when given paths or strings referring to the same file produces paths that are equal (in the sense of | equal? | )? >From the docs I guess the answer is yes, but I am not quite sure. Thanks, Jos _ For list-related

<    1   2   3   4   5   6   >