[racket] Suggestion: Allow above, beside etc. to accept a single image.

2013-10-21 Thread Daniel Prager
Currently *above* from 2htdp/image requires at least two arguments. I.e. procedure (above i1 i2 is ...) → image? Recently I have been using an idiom where I stack a list of one or more images. I.e. (apply above list-of-images) I have a workaround, but it seems to me that a more tolerant "abo

[racket] curious behavior of path-replace-suffix for files beginning with dot?

2013-10-21 Thread Matthew Butterick
Looking over the documentation I'm not clear why this would be so: > (path-replace-suffix (string->path ".foobar") "") # If the behavior is undefined, seems like path-rep

Re: [racket] new S3 page "upload" link just creates blank package?

2013-10-21 Thread Ryan Culpepper
On 10/18/2013 06:27 PM, Jay McCarthy wrote: On Fri, Oct 18, 2013 at 4:10 PM, John Clements wrote: [...] - Clicking the 'x' in the UR corner still seems like a very counter-intuitive way to say "yes, I like my package, add it to the catalog." Perhaps there could just be another button that says

Re: [racket] Small and short-lived data structures

2013-10-21 Thread Sam Tobin-Hochstadt
On Mon, Oct 21, 2013 at 3:36 PM, Neil Van Dyke wrote: > Sam Tobin-Hochstadt wrote at 10/21/2013 02:35 PM: >> >> https://gist.github.com/samth/7088570 >> > > [...] > >> Direct is always fastest, multiple values are very slow, and cons is >> always slower than mcons. > > > Is there any relatively lo

Re: [racket] Small and short-lived data structures

2013-10-21 Thread Neil Van Dyke
Sam Tobin-Hochstadt wrote at 10/21/2013 02:35 PM: https://gist.github.com/samth/7088570 [...] Direct is always fastest, multiple values are very slow, and cons is always slower than mcons. Is there any relatively low-hanging fruit optimization that can be done for multiple-value returns

Re: [racket] Question about post-pure-port in the library net/url

2013-10-21 Thread Jay McCarthy
I suggest using the new http-client library if possible: http://www.cs.utah.edu/plt/snapshots/current/doc/net/http-client.html?q=http-client#%28def._%28%28lib._net%2Fhttp-client..rkt%29._http-sendrecv%29%29 The http-sendrecv function is a lot easier to control in my opinion. In your specific cas

Re: [racket] running racket from the command line

2013-10-21 Thread Ryan Culpepper
(for ([dir (map path->string (directory-list))]) (define newdir (string-replace dir " " "_")) (unless (equal? dir newdir) (rename-file-or-directory dir newdir #f))) or for dir in *; do newdir=`echo "$dir" | tr " " _` ; if [ "$dir" != "$newdir" ] ; then mv -i "$dir" "$newdir" ; fi ; d

Re: [racket] Small and short-lived data structures

2013-10-21 Thread Sam Tobin-Hochstadt
I encourage you to find some evidence showing that Konrad's assumption is mistaken, then. Sam On Mon, Oct 21, 2013 at 2:38 PM, Matthias Felleisen wrote: > > WIth respect, I think this shows nothing :-) > > > > On Oct 21, 2013, at 2:35 PM, Sam Tobin-Hochstadt wrote: > >> On Mon, Oct 21, 2013 at

Re: [racket] Small and short-lived data structures

2013-10-21 Thread Matthias Felleisen
WIth respect, I think this shows nothing :-) On Oct 21, 2013, at 2:35 PM, Sam Tobin-Hochstadt wrote: > On Mon, Oct 21, 2013 at 12:47 PM, Matthias Felleisen > wrote: >> >> In general, it is a mistaken assumption however that even in a >> 'managed' language -- such as Java or Racket -- mutat

Re: [racket] Small and short-lived data structures

2013-10-21 Thread Sam Tobin-Hochstadt
On Mon, Oct 21, 2013 at 12:47 PM, Matthias Felleisen wrote: > > In general, it is a mistaken assumption however that even in a > 'managed' language -- such as Java or Racket -- mutation is still > faster than de/allocation of short-lived data structures. If you > choose to go with 'managed' langua

Re: [racket] running racket from the command line

2013-10-21 Thread Matthew Johnson
Thanks - good tip. I don't suppose there some awesome one liner that does this for all working directory paths? On 22/10/2013, at 5:21 AM, Greg Hendershott wrote: > Early on using Racket, like you I had some trouble or other quoting. I > adopted the perhaps dubious habit of, right after install

Re: [racket] running racket from the command line

2013-10-21 Thread Greg Hendershott
Early on using Racket, like you I had some trouble or other quoting. I adopted the perhaps dubious habit of, right after installing a new version, renaming to e.g. /Applications/Racket_v5.3.6" -- i.e. " " -> "_". On Mon, Oct 21, 2013 at 4:50 AM, Matthew Johnson wrote: > Thanks very much. Working

Re: [racket] [Frog] Code examples in handwritten HTML

2013-10-21 Thread Greg Hendershott
Fix pushed, and package catalog updated, so you can get it with: raco pkg update markdown (Eventually I'll bump the version of the markdown pkg, and update Frog's deps, but meanwhile the above should get you the fix.) Let me know if you have any other questions. Also, if you have things you

Re: [racket] [Frog] Code examples in handwritten HTML

2013-10-21 Thread Greg Hendershott
On Mon, Oct 21, 2013 at 9:34 AM, Joe Gibbs Politz wrote: > I want to write an index page with some handwritten HTML using Frog, > and I want it to include source code. Two issues. First, it seems > like Frog doesn't respect my structure. If I write something > like this in _src/index.html: Th

Re: [racket] Small and short-lived data structures

2013-10-21 Thread Matthias Felleisen
On Oct 21, 2013, at 11:33 AM, Konrad Hinsen wrote: > Hi everyone, > > I am facing a situation quite frequent in scientific computing: the > use of small and often short-lived data structures, where the overhead > of construction, element access, and garbage collection can easily > dwarf the cos

[racket] Small and short-lived data structures

2013-10-21 Thread Konrad Hinsen
Hi everyone, I am facing a situation quite frequent in scientific computing: the use of small and often short-lived data structures, where the overhead of construction, element access, and garbage collection can easily dwarf the cost of computation. The classical example is Geometry in 3D space.

[racket] [Frog] Code examples in handwritten HTML

2013-10-21 Thread Joe Gibbs Politz
I want to write an index page with some handwritten HTML using Frog, and I want it to include source code. Two issues. First, it seems like Frog doesn't respect my structure. If I write something like this in _src/index.html: # Index page Some exciting text! fun sum(l :: List)

Re: [racket] Is it possible to create a package without including source code?

2013-10-21 Thread Matthew Flatt
At Sun, 20 Oct 2013 20:15:12 -0400, Norman Ramsey wrote: > > In HEAD, you can do "raco pkg create --binary" > > I need to distribute to students using vanilla 5.3.6. > Should I expect the binaries to be compatible? No. > Can I create a 5.3.6 binary package by hand somehow? Yes. Let's assume t

Re: [racket] Scribble continuous previsualisation?

2013-10-21 Thread Ismael Figueroa
Hi Laurent, Thanks for the tip, I didn't know about these new procedures. Indeed it would be better if the functionality only requires a Racket install, so I will try to look at it soon. Cheers 2013/10/18 Laurent > Looks very interesting! > I see you are requiring python's watchdog. If you li

Re: [racket] Frog/Pygments build error

2013-10-21 Thread Greg Hendershott
Glad to hear it. Not only is it not a bother, it's a great opportunity to improve the docs. On Sun, Oct 20, 2013 at 10:47 PM, Joe Gibbs Politz wrote: > Uh, yeah, this was an easy fix once I realized what was going on. > Hopefully at least my silly confusion leads to a Google-able answer > for som

Re: [racket] running racket from the command line

2013-10-21 Thread Matthew Johnson
Thanks very much. Working well now. For those that find this, a trap for young players is that you must quote paths with spaces in them, else you will lose everything you depend upon (even the command 'ls'). So it is Export PATH="/Applications/Racket v5.3.6/bin":$PATH mj On 21/10/2013, at 7:30

Re: [racket] running racket from the command line

2013-10-21 Thread Norman Gray
Matt, hello. On 2013 Oct 21, at 08:59, Matthew Johnson wrote: > I just downloaded the Racket binaries and installed them. Ah, but where have you installed them? > I have been able > to fire up DrRacket, however given that i prefer vim i was hoping to run > racket from the command line. > > I

[racket] running racket from the command line

2013-10-21 Thread Matthew Johnson
Dear List, I just downloaded the Racket binaries and installed them. I have been able to fire up DrRacket, however given that i prefer vim i was hoping to run racket from the command line. I've tried $ racket and $ which racket but the command is not found. Is there some linking step that i've