[racket] Scribble and EPUB

2014-03-08 Thread Neil Van Dyke
Has anyone done anything more with turning Scribble manuals into EPUB format? I see Ryan's posts from a couple years ago, but I'm just checking that this is the current state of the art. http://lists.racket-lang.org/users/archive//2012-January/049889.html http://lists.racket-lang.org/users/arc

[racket] Guard Plugin for Racket Rackunit tests

2014-03-08 Thread Chad Albers
Although there didn't seem much interest in this when I posted about it previously, I went ahead and wrote it anyway for myself: I just released a ruby gem which will run Rackunit tests as you update your code. The source is here: https://github.com/neomantic/guard-rackunit with installation inst

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Greg Hendershott
Before posting, I had repeated this multiple times, running this code inside a sandbox. After seeing your reply, I tried but couldn't repro it at the command line. I could still repro it in the sandbox. But with a fresh sandbox, now I can't repro it anymore. I guess some mysterious bit of state w

Re: [racket] create executable on linux

2014-03-08 Thread David T. Pierson
On Sat, Mar 08, 2014 at 10:28:31AM -0700, Jon Stenerson wrote: > If anyone has linux available can you try this out and see if it is > an actual bug, and not just my installation? I did reinstall Racket > 6 to no avail. I also checked that this does not happen on Windows. > Thanks. > > If I enter

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread David T. Pierson
On Sat, Mar 08, 2014 at 11:10:20AM -0700, Matthew Flatt wrote: > At Sat, 08 Mar 2014 12:33:42 -0500, "David T. Pierson" wrote: > > cpu time: 220 real time: 220 gc time: 0 > > cpu time: 112 real time: 112 gc time: 0 > > cpu time: 60 real time: 58 gc time: 0 > > cpu time: 28 real time: 29 gc

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Laurent
I get : > (let ((v (time (make-vector 5000 0 (time (vector-length v)) (time (vector-length v)) (time (vector-length v)) (void)) cpu time: 188 real time: 191 gc time: 12 cpu time: 0 real time: 0 gc time: 0 cpu time: 0 real time: 0 gc time: 0 cpu time: 0 real time: 0 gc time:

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Greg Hendershott
As for length: (for ([i 3]) (collect-garbage)) (let ((ls (time (make-list 5000 0 (time (length ls)) (time (length ls)) (time (length ls)) (void)) It's what I would expect: cpu time: 6733 real time: 6744 gc time: 6419 cpu time: 141 real time: 141 gc time: 0 cpu time: 145 real time

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Alexander McLin
I see, thanks for the detailed explanation. I understand the issue is whether the cost associated with cons checking arguments prior to creating the pair is acceptable or not but truly if cons is checking for list? by whether a bit is set or not, wouldn't that be negligible compared to the cost

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Matthew Flatt
At Sat, 08 Mar 2014 12:33:42 -0500, "David T. Pierson" wrote: > Also, when I do: > > $ racket > Welcome to Racket v6.0.0.2. > > (let ((ls (make-list 5000 0))) > (time (list? ls)) > > (ti

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Alexander McLin
I'm joining in this thread because I'm now wondering about the same questions. It seems to me that if a list is created via list or make-list then the bits should have been set on the car of the new list, so all the list predicates have to do is check the first element in O(1) time. Likewise co

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Matthias Felleisen
I sit corrected :-) (I had it right at some point) On Mar 8, 2014, at 12:52 PM, Carl Eastlund wrote: > If every cons set those bits, it would still take constant time because you'd > only have to look one deep. However, the important part is that currently > cons never has to inspect its arg

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Matthew Flatt
I've never measured carefully enough to be sure that it's better to put the cost in `list?` instead of `cons`, but my guess is that the cost is better in `list?`. There's an `unsafe-cons-list` function sets the is-a-list bit when creating a pair. That is, it always sets the bit without a test on t

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Carl Eastlund
If every cons set those bits, it would still take constant time because you'd only have to look one deep. However, the important part is that currently cons never has to inspect its arguments. Given that cons may be called frequently in a program that never uses list?, one does not want to pay fo

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread Matthias Felleisen
You want cons (the frequent action) to take constant time: allocate pointer, set two fields. On Mar 8, 2014, at 12:33 PM, David T. Pierson wrote: > On Fri, Mar 07, 2014 at 11:03:57PM -0500, Carl Eastlund wrote: >> The first/rest operations do not use a memoization table. They test using >> t

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread David T. Pierson
On Fri, Mar 07, 2014 at 11:03:57PM -0500, Carl Eastlund wrote: > The first/rest operations do not use a memoization table. They test using > the list? primitive, which is built in and actually has a couple of tag > bits reserved on every cons object for memoizing its results. So the > operation r

[racket] create executable on linux

2014-03-08 Thread Jon Stenerson
If anyone has linux available can you try this out and see if it is an actual bug, and not just my installation? I did reinstall Racket 6 to no avail. I also checked that this does not happen on Windows. Thanks. If I enter any program in DrRacket 6.0 on Ubuntu #lang racket "OK" then do "Creat