Re: [racket] Looking for better designs to learn principles.

2015-03-12 Thread Jos Koot
#lang racket (define (print-two f) (print (car f)) (print (cadr f))) (print-two '(1 2)); prints 12 (define (print-all f) (for-each print f)) (print-all '(1 2)); prints 12 (print-all '(1 2 3 4)); prints 1234 Best wishes, Jos Koot _ From: users [mailto:users-boun...@racket-lang.org

Re: [racket] Inconsistency of `in-range` and numerical issues

2015-02-26 Thread Jos Koot
IIRC, Fortran (70 or 90, I don't remember) already recognized the problem. In Racket notation and for simplicity ignoring the fact that a Fortran-loop includes the finish and that the step may be negative: (for ((f (in-range float-start float-finish float-step))) body) was translated as

Re: [racket] Void expression found

2015-01-05 Thread Jos Koot
Void is a peculiar thing. It is used by Racket where no result is ment. But every expression must have a (multiple) value (if it computes in finite time) Because the value of (void) has to be considered to be the absence of a value, the repl and the interactions window do not show them. For

Re: [racket] Little Schemer, lat?

2015-01-03 Thread Jos Koot
Matthias, you write: all-true is the same as cannot-find-a-false-on-the-list. Then I take an inverse: all-false is the same as cannot-find-a-true-on-the-list. But we have (in Racket): (and) - #t (or) - #f Something is wrong with the inversion. But what? Happy new year to all, Jos

Re: [racket] Little Schemer, lat?

2015-01-03 Thread Jos Koot
The addition at least does it. Thanks, Jos _ From: Carl Eastlund [mailto:carl.eastl...@gmail.com] Sent: 03 January 2015 20:17 To: Jos Koot Cc: Matthias Felleisen; Frank Weytjens; users Users Subject: Re: [racket] Little Schemer, lat? Because all-true and all-false are both all

Re: [racket] beep

2014-11-09 Thread Jos Koot
It does not in DrRacket but does in Racket (windows 7) Jos -Original Message- From: users [mailto:users-boun...@racket-lang.org] On Behalf Of Jon Zeppieri Sent: viernes, 07 de noviembre de 2014 19:10 To: Christian Wagenknecht Cc: Racket Users Subject: Re: [racket] beep (display #\u0007)

Re: [racket] http://pkgs.racket-lang.org hanging in loading screen

2014-10-10 Thread Jos Koot
I saw ans still see the same problem (Windows, Internet explorer) Jos -Original Message- From: users [mailto:users-boun...@racket-lang.org] On Behalf Of J. Ian Johnson Sent: viernes, 10 de octubre de 2014 15:19 To: Stephen De Gabrielle Cc: Jay McCarthy; Racket Users Subject: Re: [racket]

Re: [racket] Pass by value/name/reference

2014-07-21 Thread Jos Koot
Do you mean 1: Pascal showed you a calling convention that was new for you. or 2: Pascal showed you to have more than one calling convention. ? I have used Pascal a lot in earlier days, but I am not aware of Pascal providing more than one kind of calling convention. Some decades ago I wrote my

Re: [racket] Pass by value/name/reference

2014-07-20 Thread Jos Koot
See section 4.3.1 of the Racket guide. Jos _ From: users [mailto:users-boun...@racket-lang.org] On Behalf Of ? ?? Sent: domingo, 20 de julio de 2014 11:03 To: users@racket-lang.org Subject: [racket] Pass by value/name/reference Hey :) How the arguments are passed in racket?

Re: [racket] Pass by value/name/reference

2014-07-20 Thread Jos Koot
Be aware there is also a lazy racket (#lang lazy) #lang racket ; call by value (define (show x) (display x) (newline) x) (define (plus x y z) (display now we are in the procedure\n) (+ x y z)) the procedure has been defined (plus (show 1) (show 2) (show 3) ) the proceedure has been called

Re: [racket] FW: q about code for partitions

2014-07-17 Thread Jos Koot
-Original Message- From: Vincent St-Amour [mailto:stamo...@ccs.neu.edu] Sent: domingo, 29 de junio de 2014 22:52 To: Eric Dobson Cc: Jos Koot; Matthew Flatt; Jens Axel Søgaard; Racket Users List Subject: Re: [racket] FW: q about code for partitions Ah, that explains it. Thanks! Vincent

Re: [racket] FW: q about code for partitions

2014-07-17 Thread Jos Koot
-Original Message- From: jensaxelsoega...@gmail.com [mailto:jensaxelsoega...@gmail.com] On Behalf Of Jens Axel Søgaard Sent: jueves, 17 de julio de 2014 13:12 To: Jos Koot Cc: Vincent St-Amour; Eric Dobson; Matthew Flatt; Racket Users List Subject: Re: [racket] FW: q about code

Re: [racket] FW: q about code for partitions

2014-07-17 Thread Jos Koot
Strange: I do not get a segfault when running racket, only when running from DrRacket. Jos -Original Message- From: jensaxelsoega...@gmail.com [mailto:jensaxelsoega...@gmail.com] On Behalf Of Jens Axel Søgaard Sent: jueves, 17 de julio de 2014 13:12 To: Jos Koot Cc: Vincent St

Re: [racket] FW: q about code for partitions

2014-07-17 Thread Jos Koot
Version 6.0.1 shows the same problem, that is, no problem with racket, only with DrRacket. Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: jueves, 17 de julio de 2014 13:48 To: Jos Koot Cc: 'Jens Axel Søgaard'; 'Vincent St-Amour'; 'Eric Dobson

Re: [racket] FW: q about code for partitions

2014-07-17 Thread Jos Koot
in version 6.0.1 there is a global cash that never shrinks and a local one. This I understand to run well in concurrent processes. -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: jueves, 17 de julio de 2014 18:02 To: Jos Koot Cc: 'Jens Axel Søgaard'; 'Vincent St

Re: [racket] FW: q about code for partitions

2014-06-29 Thread Jos Koot
I timed a version unrolling the loops for even and odd k. I see no speed up. Just to let you know. Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: domingo, 29 de junio de 2014 8:47 To: Jens Axel Søgaard Cc: Jos Koot; Racket Users List Subject: Re

Re: [racket] FW: q about code for partitions

2014-06-29 Thread Jos Koot
...@gmail.com] On Behalf Of Jens Axel Søgaard Sent: domingo, 29 de junio de 2014 12:48 To: Matthew Flatt Cc: Jos Koot; Racket Users List Subject: Re: [racket] FW: q about code for partitions I have made a new vector version using zero? instead of exact-zero?. To give users a chance to remove

Re: [racket] Please help with syntax

2014-06-28 Thread Jos Koot
#lang racket (define-syntax (set!-values* stx) (syntax-case stx () ((_ (var ...) values-expr) (with-syntax (((local-var ...) (generate-temporaries #'(var ... #'(let-values (((local-var ...) values-expr)) (set!* var local-var) ...) (define-syntax (set!* stx) (syntax-case

[racket] FW: q about code for partitions

2014-06-28 Thread Jos Koot
Sorry, forgot to post the following to the users list. Hi, count partitions, much faster and exact. You may want to put the hash or part of it within function p such as to avoid spllling much memory. Jos #lang racket (require math/number-theory) (define p-hash (make-hash '((0 . 1 (define

Re: [racket] FW: q about code for partitions

2014-06-28 Thread Jos Koot
To: Jos Koot Cc: Neil Toronto; Racket Users List Subject: Re: [racket] FW: q about code for partitions Hi, I have converted your code to Typed Racket and made two versions. The first version use a hash as cache and the second version us a vector. Timings show that the vector version is 1.5

Re: [racket] FW: q about code for partitions

2014-06-28 Thread Jos Koot
-Original Message- From: jensaxelsoega...@gmail.com [mailto:jensaxelsoega...@gmail.com] On Behalf Of Jens Axel Søgaard Sent: sábado, 28 de junio de 2014 16:51 To: Neil Toronto Cc: Jos Koot; Racket Users List Subject: Re: [racket] FW: q about code for partitions The vector grows only once

Re: [racket] newlines in strings not the same in DrRacket and Racket

2014-06-21 Thread Jos Koot
-Original Message- From: Robby Findler [mailto:ro...@eecs.northwestern.edu] Sent: sábado, 21 de junio de 2014 0:51 To: Alexander D. Knauth Cc: Jos Koot; users Subject: Re: [racket] newlines in strings not the same in DrRacket and Racket The issue is probably that the file

Re: [racket] newlines in strings not the same in DrRacket and Racket

2014-06-21 Thread Jos Koot
I find the following: (write (string-list #end a a end )) In DrRacket (#\a #\newline #\a) In Racket: (#\a #return #\newline #\a #\return) Jos -Original Message- From: Robby Findler [mailto:ro...@eecs.northwestern.edu] Sent: sábado, 21 de junio de 2014 8:29 To: Jos Koot Cc

Re: [racket] newlines in strings not the same in DrRacket and Racket

2014-06-21 Thread Jos Koot
Nonetheless many thanks for your help and attention. Jos -Original Message- From: Robby Findler [mailto:ro...@eecs.northwestern.edu] Sent: sábado, 21 de junio de 2014 9:54 To: Jos Koot Cc: Alexander D. Knauth; users Subject: Re: [racket] newlines in strings not the same

Re: [racket] newlines in strings not the same in DrRacket and Racket

2014-06-21 Thread Jos Koot
: sábado, 21 de junio de 2014 11:20 To: users@racket-lang.org Subject: Re: [racket] newlines in strings not the same in DrRacket and Racket You are using Windows? Am Samstag, 21. Juni 2014 schrieb Jos Koot: I find the following: (write (string-list #end a a end

[racket] newlines in strings not the same in DrRacket and Racket

2014-06-20 Thread Jos Koot
Running the following in DrRacket goes well. #lang racket (require test-engine/racket-tests) (check-expect (format ~n) ) (test) (read-line) ; wait until the user has read the results. Displays: The only test passed! But running the same with Racket tells me the test fails. I have a solution

Re: [racket] newlines in strings not the same in DrRacket and Racket

2014-06-20 Thread Jos Koot
de junio de 2014 22:41 To: Jos Koot Cc: users Subject: Re: [racket] newlines in strings not the same in DrRacket and Racket This doesn't exactly solve your problem, but what happens (for both cases) when you do this?: #lang racket

Re: [racket] newlines in strings not the same in DrRacket and Racket

2014-06-20 Thread Jos Koot
Message- From: Jos Koot [mailto:jos.k...@gmail.com] Sent: viernes, 20 de junio de 2014 23:03 To: 'Alexander D. Knauth' Cc: 'users'; 'Jos Koot' Subject: RE: [racket] newlines in strings not the same in DrRacket and Racket Gives me (format ~n) = \n = \n The only test passed

Re: [racket] newlines in strings not the same in DrRacket and Racket

2014-06-20 Thread Jos Koot
I always use DrRacket for editing rkt files. Thanks, Jos From: Alexander D. Knauth [mailto:alexan...@knauth.org] Sent: sábado, 21 de junio de 2014 0:20 To: Jos Koot Cc: users Subject: Re: [racket] newlines in strings

Re: [racket] Make printer abbreviate unquote at the end of a list

2014-06-17 Thread Jos Koot
I always use write-style. When I want another format, I use my own formatter (available on planet as planet-fmt) Best wishes, Jos PS _ From: users [mailto:users-boun...@racket-lang.org] On Behalf Of Laurent Sent: martes, 17 de junio de 2014 17:12 To: Jason Hemann Cc: users Subject:

[racket] q about code for partitions

2014-06-04 Thread Jos Koot
Hi In share/pkgs/math-lib/math/private/number-theory I find the following two pieces of code: line 34: (define m (/ (+ 1.0 (flsqrt (+ 1.0 (* 24.0 n 6.0)) line 39: (exact-floor m) Obviously for finding the positive root of the equation n-k(3k-1)/2=0 for k in terms of n. (from wikipedia:

Re: [racket] You're invited to Neil Toronto's Dissertation Defense

2014-06-04 Thread Jos Koot
I am very interested but not in the neighbourhood, otherwise I attend. Looking forward to the recording. Good luck, Jos -Original Message- From: users [mailto:users-boun...@racket-lang.org] On Behalf Of Jay McCarthy Sent: miércoles, 04 de junio de 2014 6:48 To: users Subject:

[racket] partitions

2014-05-22 Thread Jos Koot
On https://gist.github.com/joskoot you can find function (partition n k) which returns the k-th partition of n. Racket Users list: http://lists.racket-lang.org/users

[racket] partitions

2014-05-06 Thread Jos Koot
Hi Library *math/number-theory* provides procedure *partitions*, which fastly tells you how many partitions a given nonnegative integer has (based on http://en.wikipedia.org/wiki/Partition_(number_theory)) I have not found any procedure that generates the partitions themselves, nor in PLT

Re: [racket] partitions

2014-05-06 Thread Jos Koot
Thanks for your advice. Source is now on https://gist.github.com/joskoot/c80cee6fadce3434e941 Jos _ From: Laurent [mailto:laurent.ors...@gmail.com] Sent: martes, 06 de mayo de 2014 21:56 To: Jos Koot Cc: Racket mailing list Subject: Re: [racket] partitions Why not making it a package

Re: [racket] #undefined and backward compatibility

2014-04-19 Thread Jos Koot
Hi Matthew Yes, I have (define undefined (letrec ((x x)) x)) in some of my programs. No, the backward incompatibility would not hurt me. A few simple changes in my code would be sufficient, I would not need the `racket/undefined` library. I could replace (letrec ((x x)) x)) by (let () (struct

[racket] streams and promises

2014-04-01 Thread Jos Koot
Hi The streams as provided by racket/stream are very nice and much simpler than in srfi 41. Racket Users list: http://lists.racket-lang.org/users

[racket] streams and promises

2014-04-01 Thread Jos Koot
Something went wrong with my previous email. Sorry. I try again. Hi. First of all congratulations with version 6.0. Very mice indeed. The streams as provided by racket/stream are very nice and much simpler than in srfi 41. two remarks though. one. racket/stream duplicates code as found in

Re: [racket] FW: weakly held symbols?

2014-01-28 Thread Jos Koot
[mailto:carl.eastl...@gmail.com] Sent: martes, 28 de enero de 2014 1:28 To: Jos Koot Cc: Racket Users Subject: Re: [racket] FW: weakly held symbols? This isn't a typo. The docs are talking about the properties of the symbol tables for interned and unreadable symbols. There is no symbol table

Re: [racket] FW: weakly held symbols?

2014-01-28 Thread Jos Koot
] Sent: martes, 28 de enero de 2014 1:28 To: Jos Koot Cc: Racket Users Subject: Re: [racket] FW: weakly held symbols? This isn't a typo. The docs are talking about the properties of the symbol tables for interned and unreadable symbols. There is no symbol table for uninterned symbols, so it wouldn't

Re: [racket] FW: weakly held symbols?

2014-01-28 Thread Jos Koot
Thanks. I dont know why Racket wont release quoted literals after disappearing, but your answer is clear. Jos _ From: Carl Eastlund [mailto:carl.eastl...@gmail.com] Sent: martes, 28 de enero de 2014 18:13 To: Jos Koot Cc: Racket Users Subject: RE: [racket] FW: weakly held symbols

[racket] weakly held symbols?

2014-01-27 Thread Jos Koot
Hi to all, Section 3.6 symbols of the Racket reference manual states: Interned and unreadable symbols are only weakly held ... but a symbol maay disappear when ... used as the key in a weak hash table ... Racket Users list: http://lists.racket-lang.org/users

[racket] FW: weakly held symbols?

2014-01-27 Thread Jos Koot
It appears that my previous email was not sent completely. Sorry for that. Here is the complete question. Hi to all, Section 3.6 symbols of the Racket reference manual states: Interned and unreadable symbols are only weakly held ... but a symbol maay disappear when ... used as the key in a

Re: [racket] Thought about namespaces

2013-05-26 Thread Jos Koot
...@gmail.com] Sent: domingo, 26 de mayo de 2013 20:38 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] Thought about namespaces Try using make-empty-namespace instead of make-base-empty-namespace. It won't work but will explain why the add1 procedures are the same when you do get

Re: [racket] Problem Stream with alternating values

2013-05-21 Thread Jos Koot
de 2013 21:20 To: users@racket-lang.org Subject: Re: [racket] Problem Stream with alternating values On 19/05/2013 21:22, Jos Koot wrote: Your function H1 is not lazy enough. Closely following the instructions of the exercise I immediately come with: (define (dan-then-dog) (cons

Re: [racket] Problem Stream with alternating values

2013-05-19 Thread Jos Koot
Your function H1 is not lazy enough. Closely following the instructions of the exercise I immediately come with: (define (dan-then-dog) (cons dan.jpg (lambda () ???))) Can you fill in the question-marks? Can easily be done with stream-cons too: (define dan-then-dog-str (stream-cons dan.jpg

Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision

2013-05-08 Thread Jos Koot
I came across another thing: #lang racket (define x #e100.e-5) (rational? x) ; #t (log x) ; -inf.0 (exact-inexact x); 0.0 (~r x #:notation 'exponential) ; error inexact-exact: no exact representation number: -inf.0 I think this is introduced in line 340 of racket/format.rkt which

Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision

2013-05-08 Thread Jos Koot
Correct, my message has nothing to do with the initial problem. Jos -Original Message- From: Dmitry Pavlov [mailto:dpav...@ipa.nw.ru] Sent: miércoles, 08 de mayo de 2013 12:11 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] ~r: formatting 0.0 with 'exponential

Re: [racket] order-of-magnitude (was ~r: formatting 0.0 with 'exponential and #:precision)

2013-05-08 Thread Jos Koot
: Ryan Culpepper [mailto:ry...@ccs.neu.edu] Sent: miércoles, 08 de mayo de 2013 18:58 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision Thanks for the report! I've taken your suggestion for ~r's order-of-magnitude estimate. (I

Re: [racket] order-of-magnitude (was ~r: formatting 0.0 with 'exponential and #:precision)

2013-05-08 Thread Jos Koot
[mailto:ry...@ccs.neu.edu] Sent: miércoles, 08 de mayo de 2013 18:58 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision Thanks for the report! I've taken your suggestion for ~r's order-of-magnitude estimate. (I didn't change

Re: [racket] Thanks for being awesome

2013-04-29 Thread Jos Koot
+1 Jos _ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Sean McBeth Sent: lunes, 29 de abril de 2013 19:44 To: users Subject: [racket] Thanks for being awesome Dear Racketeers, snip Or that it setup on all of my machines--Windows, Linux,

Re: [racket] string to file

2013-04-22 Thread Jos Koot
You already have the file, isn't it? If you want to convert the string to a new file, open it with the appropriate #:exists keyword argument and write. If you want an input string, use open-input-string. Jos _ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On

Re: [racket] defproc without indexing?

2013-04-22 Thread Jos Koot
Thanks Matthew, I too did want such an option, but never thought it important enough to complain about. Jos -Original Message- From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Matthew Flatt Sent: domingo, 21 de abril de 2013 17:59 To: Asumu

Re: [racket] another scribble newbie question

2013-04-22 Thread Jos Koot
As in my other mail a minute ago, thank you Matthew. Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: domingo, 21 de abril de 2013 17:59 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] another scribble newbie question I finally added

Re: [racket] Math - factorial.rkt, binomial.rkt and memoization

2013-04-09 Thread Jos Koot
Would it be possible to use http://en.wikipedia.org/wiki/Stirling%27s_approximation Stirling's approximation for a fast inexact first approximation for factorials of very big numbers and from there quickly get to an exact factorial? (if exactness is required) I don't know for I haven't thought

Re: [racket] Math - factorial.rkt, binomial.rkt and memoization

2013-04-09 Thread Jos Koot
] Math - factorial.rkt, binomial.rkt and memoization On 04/09/2013 11:41 AM, Hendrik Boom wrote: On Tue, Apr 09, 2013 at 08:26:31PM +0200, Jos Koot wrote: Would it be possible to use http://en.wikipedia.org/wiki/Stirling%27s_approximation Stirling's approximation for a fast inexact first

Re: [racket] Help generating PDF documents with Scribble

2013-03-23 Thread Jos Koot
Could be well Windiws 7. I have experienced the same type of problem and solved it by removing the read-only vink in the properties of the whole Racket directory. When installing a new nightly build I (sometimes?) have to repeat that. Jos -Original Message- From:

Re: [racket] Graphing Help

2013-03-22 Thread Jos Koot
I'll be happy to help. I assume you are dealing with an exercise. Is this a self-study or do you have a teacher? If you have a teacher he or she is the best person to help you. Can you show me what you have so far? (if you like off list) Without some more input from your part, it is difficult to

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-21 Thread Jos Koot
, Patrick Li wrote: My personal experience is that a good and detailed design is hard to get to *without* doing the coding. -Patrick On Tue, Mar 19, 2013 at 1:50 PM, Jos Koot jos.k...@gmail.com wrote: One remark down intermixed in your email. Jos -Original

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-19 Thread Jos Koot
and talk with future users before coding. If you wish you can interpret my comment as a frustration that I felt like a profet in the desert. Jos _ From: Laurent [mailto:laurent.ors...@gmail.com] Sent: martes, 19 de marzo de 2013 8:20 To: Jos Koot Cc: Harry Spier; users Subject: Re: [racket

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-19 Thread Jos Koot
on Programming I forget where that quotation came from originally, but it antedated the days where internal documentation was the norm. On Tue, Mar 19, 2013 at 06:20:57AM +0100, Jos Koot wrote: Well, that may depend on how you define clever code. Surely it is clever to write well documented

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-18 Thread Jos Koot
Well, that may depend on how you define clever code. Surely it is clever to write well documented code that can easily be understood, debugged, maintained and reused by yourself and by others. Understanding may require knowledge of the discipline the code is written for, of course. In my opinion

Re: [racket] planet question

2013-03-01 Thread Jos Koot
Thanks for attention to my question. I tried your advice and some variations on this theme, but without luck. Jos _ From: Robby Findler [mailto:ro...@eecs.northwestern.edu] Sent: viernes, 01 de marzo de 2013 14:05 To: Jos Koot Cc: Racket mailing list Subject: Re: [racket] planet

Re: [racket] planet question

2013-03-01 Thread Jos Koot
directories are made as well: compiled and planet-docs/examples. Is this expected and correct? Forgive me my ignorance. Thanks for the help, Jos _ From: Jos Koot [mailto:jos.k...@gmail.com] Sent: viernes, 01 de marzo de 2013 19:15 To: 'Robby Findler' Cc: 'Racket mailing list' Subject: RE

Re: [racket] planet question

2013-03-01 Thread Jos Koot
Great, Thanks Jos _ From: Robby Findler [mailto:ro...@eecs.northwestern.edu] Sent: viernes, 01 de marzo de 2013 20:30 To: Jos Koot Cc: Racket mailing list Subject: Re: [racket] planet question Looking at the code, it appears that make-planet-archive is sensitive to the current

Re: [racket] planet question

2013-03-01 Thread Jos Koot
. Thanks to the whole PLT community for convincing me to scribble and helping me with my newbie questions. Jos From: Robby Findler [mailto:ro...@eecs.northwestern.edu] Sent: sábado, 02 de marzo de 2013 4:15 To: Jos Koot Cc: Robby Findler; Racket mailing list Subject

Re: [racket] Racket v5.3.3

2013-02-25 Thread Jos Koot
Hi all, Working with DrRacket and Windows 7, I frequently see DrRacket being aborted by Windows. This applies to previous versions of Racket too. At this moment I use version 5.3.3.3--2013-02-18(1c2432e/a) [3m]. Language: racket [custom]; memory limit: 2000 MB. IIRC I have submitted a bug

Re: [racket] Visualization of Exercise 12.4.2 (arrangements)

2013-02-24 Thread Jos Koot
I'll be happy to look into your code. Send it me personally. Jos _ From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Michael Situ Sent: domingo, 24 de febrero de 2013 0:31 To: users@racket-lang.org Subject: [racket] Visualization of Exercise 12.4.2

Re: [racket] lambda as default value to dict-ref

2013-02-15 Thread Jos Koot
If the failure-result is a procedure, it is called without arguments. I quote part of the doc: quote •If failure-result is a procedure, it is called (through a tail call) with no arguments to produce the result. endquote Jos -Original Message- From: users-boun...@racket-lang.org

[racket] another scribble newbie question

2013-02-04 Thread Jos Koot
Hi, At last, with help of this list, I have a readable scribble/manual for my planet-fmt, I think. In this manual I have: #lang scribble/manual blah blah blah @defproc[(fmt (format (or/c string? fmt?)) ... (port (or/c output-port? 'string 'current 'argument) 'string))

Re: [racket] confusing behaviour of managed-compile-zo

2013-02-02 Thread Jos Koot
Thanks Matthew, I'll try your advice. Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: viernes, 01 de febrero de 2013 22:38 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] confusing behaviour of managed-compile-zo I think the issue

Re: [racket] confusing behaviour of managed-compile-zo

2013-02-02 Thread Jos Koot
Cc: Jos Koot; users@racket-lang.org Subject: Re: [racket] confusing behaviour of managed-compile-zo There was a related problem that Sam noticed a while back about how the same set of parameters (if not the same uses) leaked out into his program and the best I came up with was the advice to disable

Re: [racket] scribbling newbie questions

2013-02-01 Thread Jos Koot
Hi Matthias, That would be great. Jos -Original Message- From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] Sent: jueves, 31 de enero de 2013 23:33 To: Jos Koot Cc: 'Matthew Flatt'; 'Danny Yoo'; users@racket-lang.org Subject: Re: [racket] scribbling newbie questions We should

[racket] scribbling newbie questions

2013-01-31 Thread Jos Koot
Inspired by http://www.infoq.com/presentations/Racket http://www.infoq.com/presentations/Racket and now that DrRacket shows the 'Scribble HTML' button, I do my first serious attempt to scribble. With this button I can easily see what I get. I use it very frequently. Marvelous! I use

Re: [racket] scribbling newbie questions

2013-01-31 Thread Jos Koot
Thanks very much. I'll try your suggestions. Your pointer provides a lot of useful information. Jos -Original Message- From: danny@gmail.com [mailto:danny@gmail.com] On Behalf Of Danny Yoo Sent: jueves, 31 de enero de 2013 20:36 To: Jos Koot Cc: users@racket-lang.org Subject: Re

Re: [racket] scribbling newbie questions

2013-01-31 Thread Jos Koot
-Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: jueves, 31 de enero de 2013 22:14 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] scribbling newbie questions At Thu, 31 Jan 2013 18:40:06 +0100, Jos Koot wrote: Q1 @racket[(string-length ((fmt I) #e1e10

[racket] confusing behaviour of managed-compile-zo

2013-01-30 Thread Jos Koot
When compiling with managed-compile-zo, manager-compile-notify-handler and manager-trace-handler, I see that parts of the racket directory are (re)compiled, for example: TRACE: compiling: C:\Program Files (x86)\Racket-Full-5.3.1.10\collects\racket\private\small-scheme.rkt Thìs even happens

Re: [racket] novice question about expressions

2013-01-12 Thread Jos Koot
Assuming Jamel does a self study. I think Jamel ment (/ (+ (* n n) 300) (* 13 n)). Grant, with your definition: (define (f n) ( + ( * n 2 ) 300)) (f 5) - 310 As Jamel is expecting 325, I assume n*2 is ment as an exponentiation. There are many ways to write this down, for example: (define (f

[racket] requiring modules in a namespace

2013-01-03 Thread Jos Koot
In some cases I want a namespace that includes more than racket/base only, preferably a namespace that includes all of module racket. For example, a base-namespace does not include procedure force (as clearly documented) I see two methods to require all of racket into a base-namespace (I imagine

Re: [racket] requiring modules in a namespace

2013-01-03 Thread Jos Koot
enero de 2013 23:29 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] requiring modules in a namespace Method 1 is better, because it doesn't depend on `require' being bound in the target namespace. For example, you can start with `(make-empty-base-namespace)' instead of `(make-empty

Re: [racket] internal define

2012-12-28 Thread Jos Koot
I trust you, Matthias, as much as Kent Dybvig. Happy new year to all, Jos. -Original Message- From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] Sent: jueves, 27 de diciembre de 2012 16:13 To: Jos Koot Cc: 'Eli Barzilay'; 'J. Ian Johnson'; 'Dmitry Pavlov'; users@racket-lang.org

Re: [racket] internal define

2012-12-27 Thread Jos Koot
Some years ago I had a discussion with Eli Barzilay about a different approach to letrec. The idea was to evaluate the expressions of the bindings automatically in appropriate order. As an example: (special-letrec ((a (+ b 2)) (b (* c 3)) (c 4)) (list a b c)) would be evaluated in the

Re: [racket] internal define

2012-12-27 Thread Jos Koot
Correct, I used promises and make-set!-transformer. Jos -Original Message- From: Eli Barzilay [mailto:e...@barzilay.org] Sent: jueves, 27 de diciembre de 2012 14:48 To: Jos Koot Cc: Matthias Felleisen; J. Ian Johnson; Dmitry Pavlov; users@racket-lang.org Subject: Re: [racket] internal

Re: [racket] Behavior of file-exists? and directory-list

2012-12-06 Thread Jos Koot
(directory-exists? C:\\Windows\\System32) - #t (file-exists? C:\\Windows\\System32) - #f You wrote: (Yes, Windows 8, please don't laugh at me. :-) ) I am laughing to myself, for I use windows 7 and windows XP :) Jos _ From: users-boun...@racket-lang.org

Re: [racket] Matching patterns of two function

2012-11-30 Thread Jos Koot
What you are asking for seems like alpha congruence, but less restrictive. How much less restrictive? That depends on you definition of the same pattern. In length you have (car l) and in length you have 1. Do they have the same structure? That, of course depends on the definition of car (it may

Re: [racket] Decimal rounding problem

2012-11-30 Thread Jos Koot
As 4.225 is inexact, it may be somewhat smaller that #e4.225 or somewhat greater than #e4.225. Therefore, whether rounding an inexact number very close to the edge of the rounding point goes up or down, seems irrelevant to me. BTW, explicit rounding normally is the last operation in an inexact

[racket] procedure-rename

2012-11-11 Thread Jos Koot
Hi, I wanted procedure -procedure-rename-, but forgot its name. I looked in page -Inferred Value Names- in the help desk, but there no mention is made of procedure -procedure-rename-. It took me some time to find the name of the procedure I wanted. May be a mention of -procedure-rename- in

Re: [racket] Formating Printing of Real Number

2012-08-08 Thread Jos Koot
: Jos Koot has a formatting library that deals with fp numbers. But I couldn't find it on planet. On Jul 27, 2012, at 2:27 PM, Ray Racine wrote: Unable to locate a means to control the output formatting of Real/Floats/what-have-you either via current formatting facilities (format procedure etc

Re: [racket] Redex on Windows - problem with GraphViz /find-executable-path

2012-01-17 Thread Jos Koot
at 12:34 PM, Rodolfo Carvalho rhcarva...@gmail.com wrote: Hi, I'm playing with lc-with-redex by Jos Koot, with example uses of Redex. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Formatted output of floating-point numbers?

2012-01-14 Thread Jos Koot
the current procedure. Thanks for your attention, Jos -Original Message- From: dmitry.pav...@gmail.com [mailto:dmitry.pav...@gmail.com] On Behalf Of Dmitry Pavlov Sent: sábado, 14 de enero de 2012 8:24 To: Jos Koot; r...@cs.utah.edu Cc: users@racket-lang.org Subject: Re: [racket] Formatted

Re: [racket] Formatted output of floating-point numbers?

2012-01-13 Thread Jos Koot
You may want a look into http://planet.racket-lang.org/display.ss?package=planet-fmt.pltowner=joskoo t Documentation as a doc file I'm afraid. Jos -Original Message- From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Dmitry Pavlov Sent: jueves, 12 de

Re: [racket] cpu usage of DrRacket

2011-12-24 Thread Jos Koot
[mailto:mfl...@cs.utah.edu] Sent: miércoles, 21 de diciembre de 2011 19:36 To: Jos Koot Cc: users@racket-lang.org Subject: Re: [racket] cpu usage of DrRacket We tracked this down to a Win64-specific problem with the recent JIT switch from x87 to SSE for floating point --- now fixed. Thanks for the report

Re: [racket] cpu usage of DrRacket

2011-12-21 Thread Jos Koot
Thank you for fixing the problem. I am sorry I was not a great help. I'll try the next nightly build. Thanks again, Jos -Original Message- From: Matthew Flatt [mailto:mfl...@cs.utah.edu] Sent: miércoles, 21 de diciembre de 2011 19:36 To: Jos Koot Cc: users@racket-lang.org Subject: Re

[racket] cpu usage of DrRacket

2011-12-14 Thread Jos Koot
I see that after starting up, DrRacket constantly uses between 40 and 60 % of my two CPUs, even with empty definitions window and before doing anything by myself. I use: Welcome to DrRacket, version 5.2.0.6--2011-12-10(6fae172/a) [3m] without debugging and without preserving stacktrace. Language

Re: [racket] shortest paths, resource allocation/scheduling

2011-12-05 Thread Jos Koot
If there is a less-than predicate for the elements of the list, the list can be sorted and things may be speeded up, I think. Jos -Original Message- From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Eli Barzilay Sent: lunes, 05 de diciembre de 2011

Re: [racket] Units/measures library

2011-11-17 Thread Jos Koot
What would this library have to do/provide? I may be interested in a contribution, if within my powers. Jos -Original Message- From: users-boun...@racket-lang.org [mailto:users-boun...@racket-lang.org] On Behalf Of Matthias Felleisen Sent: jueves, 17 de noviembre de 2011 12:58 To: José

Re: [racket] Units/measures library

2011-11-17 Thread Jos Koot
: jueves, 17 de noviembre de 2011 16:11 To: Jos Koot Cc: Racket Users Subject: Re: [racket] Units/measures library On Nov 17, 2011, at 8:41 AM, Jos Koot wrote: That should not be too difficult. I think of: Temperatures: Celcius, Fharenheit, Kelvin Distance: Meters, kilometers, land miles

[racket] syntax-case in r5rs

2011-11-17 Thread Jos Koot
How can I import Racket's versions of define-syntax and syntax-case into r5rs? I tried the following: #lang r5rs (#%require (only racket define-syntax syntax-case)) (define-syntax (a stx) (syntax-case stx () (_ #'here))) Gives error: macro-transformer: only a `syntax-rules' form is allowed in:

Re: [racket] Units/measures library

2011-11-17 Thread Jos Koot
Another approach can be to represent numbers representing an amount of a unit as a pair or a struct containing both the number and the unit. However, this would require updates of a number of arithmetic operators. In addition, read should accept numbers annotated with a unit. Writing them is less

[racket] long lines in definitions window

2011-11-10 Thread Jos Koot
If I recall correctly, long lines in the definitions window of DrRacket were automatically split such as to be visible in even a small window. Nowadays I see a scrollbar appear and lines are not shown split up. This is in DrRacket, version 5.2.0.1--2011-11-07(7d607fd/a) [3m]. Is there an option to

  1   2   3   >