Re: [racket] OFFTOPIC - Quote on Programming

2013-03-21 Thread Rüdiger Asche
well, I don't know where the myth comes from that design and coding and debugging can be separated, but after 20+ years as a software designer and designer trainer in various companies ranging from a very few to several thousand developers, I've yet to see any (commercial, I'm not talking about

[racket] doc request for serve/servlet

2013-03-21 Thread John Clements
The serve/servlet function has several flags that allude to the ability to serve static files (#:extra-files-paths, etc.). However, nowhere in that documentation does it say under what circumstances the web-server serves content from that pool of files. After much struggling and cursing, I fina

[racket] Question on networking

2013-03-21 Thread Tomás Coiro
I've been seeing the examples of Racket to make a server, and although I learned a lot, I'd love to know how to actually launch it so, for example, a friend can see my page from his house. For the best example, let's say i have the Hello World server, what changes do i need to make so someone

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-21 Thread Jos Koot
No, not just giving a spec to your programmers. More importantly, give them a design! This consists of several layers. At the toplevel a spec telling how things will appear to the future users, or better a user documentation (which is tricky, because at this stage you have to be aware that you must

Re: [racket] for/hash and for/list: adding nothing, adding more than one thing

2013-03-21 Thread J. Ian Johnson
To skip iterations, you want to use the #:when or #:unless for-clauses. In your first example, you should write (for/list ([i '(1 2 3 4 5)] #:when (even? i)) (* i 100)) Your second wish is less doable in the current state of things. I have a library on github [1] that allows you to

Re: [racket] for/hash and for/list: adding nothing, adding more than one thing

2013-03-21 Thread David Van Horn
On 3/21/13 6:55 PM, Tim Nelson wrote: (1) How can I *not* add a hash entry for a given iteration? When I use for/list, can I abuse the nature of empty and append* (I cringe as I write this): (append* (for/list ([i '(1 2 3 4 5)]) (cond [(even? i) (list (* i 100))]

[racket] for/hash and for/list: adding nothing, adding more than one thing

2013-03-21 Thread Tim Nelson
Dear All, I've recently started hacking Racket again, and am loving the for/* constructs. Awesome stuff. However, I have two questions about for/hash. (1) How can I *not* add a hash entry for a given iteration? When I use for/list, can I abuse the nature of empty and append* (I cringe as I write

Re: [racket] Help generating PDF documents with Scribble

2013-03-21 Thread Matthew Flatt
I guess that `scribble --pdf' normally works for you, and scribble --latex example_paper2.scrbl similarly hangs? Does interrupting Scribble with Ctl-C provide a stack trace? At Thu, 21 Mar 2013 16:30:48 -0400, "George Rudolph" wrote: > Matt, > I am running Racket 5.3.1 on Windows 7. > > W

Re: [racket] Help generating PDF documents with Scribble

2013-03-21 Thread George Rudolph
Matt, I am running Racket 5.3.1 on Windows 7. When I include the style parameter as you have shown, either in your document or mine: 1. command line scribble example_paper2.scrbl generates the expected html document. 2. command line scribble --pdf example_paper2.scrbl hangs. Geo

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-21 Thread Hendrik Boom
On Thu, Mar 21, 2013 at 12:16:55PM -0400, Ray Racine wrote: > Ancillary story. > > On one occasion I did do a detailed business rule design to the extant of > constructing a full on Zed document. In this case there were 10-15K lines > of completely opaque RPG code dealing with pricing. Not a liv

Re: [racket] What is a "zed document" (was: programming quote)

2013-03-21 Thread Robby Findler
http://en.wikipedia.org/wiki/Z_notation Robby On Thu, Mar 21, 2013 at 11:30 AM, Mike Eggleston wrote: > In the most recent (that I've read) messsage in the "programming quote" > there is a mention of a "zed document". What is a "zed document"? > > Mike > > Racket Users

[racket] What is a "zed document" (was: programming quote)

2013-03-21 Thread Mike Eggleston
In the most recent (that I've read) messsage in the "programming quote" there is a mention of a "zed document". What is a "zed document"? Mike Racket Users list: http://lists.racket-lang.org/users

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-21 Thread Ray Racine
Ancillary story. On one occasion I did do a detailed business rule design to the extant of constructing a full on Zed document. In this case there were 10-15K lines of completely opaque RPG code dealing with pricing. Not a living soul on this planet understood how pails, buckets, gobs, and dump

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Greg Hendershott
FWIW I recall getting confused by this too. (But unlike you, I haven't detoured at the time to figure out exactly what's going on; instead I've resorted to `rm -rf compiled/` and resumed whatever I was trying to get done). > So the take away is that if I want my running system to represent the > c

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Robby Findler
On Thu, Mar 21, 2013 at 10:42 AM, Eric Dobson wrote: > I am under the assumption that the compiled directory is just a cache > of the byte code version of the compiled source code, and that racket > should use the source code when ever that cache is invalid. This is > currently not true, as my exa

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Eric Dobson
I am under the assumption that the compiled directory is just a cache of the byte code version of the compiled source code, and that racket should use the source code when ever that cache is invalid. This is currently not true, as my examples show, yet racket does work to make it mostly true. So my

Re: [racket] OFFTOPIC - Quote on Programming

2013-03-21 Thread Richard Cleis
My experience is the same. But try to explain to a program or project manager that at least four things gradually change to complete a project: design, code, tests, and docs. I am no longer expecting to ever work on a project where the leaders do not insist each of those is a milestone completed

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Tobias Hammer
You can use a little 'preload' script: wrap-compile.rkt #lang racket (require compiler/cm) (current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)) and run with racket -t wrap-compile.rkt I would really love to see this functionality as a command line option to the co

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Robby Findler
raco make is a command-line tool. Are you maybe asking for a command-line switch to racket to effectively run 'raco make' before requiring the file? (You can do that already with careful use of -e, of course, but maybe you want something shorter.) Robby On Thu, Mar 21, 2013 at 10:31 AM, Eric Do

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Eric Dobson
So anyone who just uses the command line tools is out of luck? I like my build system to be correct, and it seems weird that there is work to make sure the right zo file is matched with the source file but that it is incorrect in some simple cases. On Thu, Mar 21, 2013 at 8:19 AM, Robby Findler w

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Robby Findler
Or use DrRacket and turn on the auto compilation feature. Or set up compiler/cm yourself to do that. Robby On Thu, Mar 21, 2013 at 10:16 AM, Eric Dobson wrote: > That doesn't explain why I can get the same behavior as the macro with > a function call, probably inlining is responsible for that t

Re: [racket] syntax-case + boxes and hash literals

2013-03-21 Thread Matthew Flatt
Pushed to the git repo. At Thu, 21 Mar 2013 07:19:15 -0600, Matthew Flatt wrote: > At Wed, 20 Mar 2013 13:27:02 -0600, Matias Eyzaguirre wrote: > > As per the pattern grammer in the reference guide, I can use syntax > > case to match against vectors, lists, and prefab structures [...] But > > I ca

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Eric Dobson
That doesn't explain why I can get the same behavior as the macro with a function call, probably inlining is responsible for that though. So the take away is that if I want my running system to represent the current state of the source files I either need to run raco make every single time, or nev

Re: [racket] Can `raco test ...' return non 0 values?

2013-03-21 Thread Eli Barzilay
A few minutes ago, Jay McCarthy wrote: > The change to eli-tester is to have it log its tests so that they > will be counted by the raco test usage. Similarly, the change to > rackunit is just to log the tests, not print anything. But assuming that `raco test' still just runs the code, then test f

Re: [racket] Can `raco test ...' return non 0 values?

2013-03-21 Thread Jay McCarthy
The change to eli-tester is to have it log its tests so that they will be counted by the raco test usage. Similarly, the change to rackunit is just to log the tests, not print anything. On Thu, Mar 21, 2013 at 7:24 AM, Eli Barzilay wrote: > 20 minutes ago, Jay McCarthy wrote: >> I just pushed thi

Re: [racket] Can `raco test ...' return non 0 values?

2013-03-21 Thread Eli Barzilay
20 minutes ago, Jay McCarthy wrote: > I just pushed this and made rackunit, eli-tester, and raco test use > it. My tester shows the N/M failures message and throws it as an error anyway. So changing it sounds redundant. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:

Re: [racket] syntax-case + boxes and hash literals

2013-03-21 Thread Matthew Flatt
At Wed, 20 Mar 2013 13:27:02 -0600, Matias Eyzaguirre wrote: > As per the pattern grammer in the reference guide, I can use syntax > case to match against vectors, lists, and prefab structures [...] But > I cannot pattern match inside of the box itself. > [...] > Why is this? It's my understanding

Re: [racket] Can `raco test ...' return non 0 values?

2013-03-21 Thread Jay McCarthy
I just pushed this and made rackunit, eli-tester, and raco test use it. On Thu, Mar 21, 2013 at 1:41 AM, Matthias Felleisen wrote: > > I like the idea of an optional N/M passed message that could also be used in > raco test to signal a status. If someone could take on this task, that would > be w

[racket] syntax-case + boxes and hash literals

2013-03-21 Thread Matias Eyzaguirre
#lang scribble/lp I've been to write some macros but I've run into some rather annoying limitations of syntax-case. They all involve deconstructing/pattern-matching literal boxes and literal hash tables. As per the pattern grammer in the reference guide, I can use syntax case to match against vect

Re: [racket] Understanding raco make and its correctness guarantees

2013-03-21 Thread Tobias Hammer
The difference lies in the method how racket and raco make check for changes. - racket only looks at each individual file's timestamp source and .zo timestamp and uses whichever is never. - raco make always checks if the file has changed or any of its dependencies has changed to decide if it

Re: [racket] Can `raco test ...' return non 0 values?

2013-03-21 Thread Matthias Felleisen
I like the idea of an optional N/M passed message that could also be used in raco test to signal a status. If someone could take on this task, that would be wonderful. On Mar 21, 2013, at 1:22 AM, Robby Findler wrote: > I didn't mean to suggest obligatory output. > > > On Wed, Mar 20, 20