Re: [racket] Getting unusual behavior from racket/sandbox: not truly capping memory usage?!

2013-04-19 Thread Danny Yoo
It might be that I've found an issue with web-server. But I hate being Peter calling wolf. Let me post code and see if anyone agrees: https://github.com/dyoo/web-server-under-sandbox I create a trivial web server with a servlet that immediately errors out. I have it also serve static JavaS

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Manfred Lotz
On Fri, 19 Apr 2013 17:27:03 -0400 Matthias Felleisen wrote: > > On Apr 19, 2013, at 4:02 PM, Manfred Lotz wrote: > > > But it is more powerful. > > > [[ This is a quibble that could take you off your chosen path for > years. The words 'more powerful' aren't that easy to agree with. Here > ar

Re: [racket] Getting unusual behavior from racket/sandbox: not truly capping memory usage?!

2013-04-19 Thread Danny Yoo
Followup on the sandbox issue: Eli suggested that I push move of the evaluation stuff into the sandbox. I had assumed that there was some parameterization that controlled values coming out of eval, but perhaps not! So I made the following change: https://github.com/dyoo/whalesong/commit/f557

Re: [racket] Changing at-expressions to other-glyph-expressions

2013-04-19 Thread Eli Barzilay
20 minutes ago, Matthew Flatt wrote: > At Fri, 19 Apr 2013 16:42:40 -0700, Matthew Butterick wrote: > > Thanks. Yes, I did see that in the docs. The problem with this technique is > > that once I wrap the input text in @list| (or @list|^, or ... etc.) to get > > the benefit of @-escaping, then I lo

Re: [racket] Changing at-expressions to other-glyph-expressions

2013-04-19 Thread Matthew Flatt
At Fri, 19 Apr 2013 16:42:40 -0700, Matthew Butterick wrote: > Thanks. Yes, I did see that in the docs. The problem with this technique is > that once I wrap the input text in @list| (or @list|^, or ... etc.) to get > the benefit of @-escaping, then I lose the ability to do defines within the > bod

Re: [racket] the extra empty string

2013-04-19 Thread Pierpaolo Bernardi
Or, maybe, what he's after is (for-each display '("" "0" "" "0")) ? (just guessing) Cheers P. On Sat, Apr 20, 2013 at 2:56 AM, Danny Yoo wrote: > On Fri, Apr 19, 2013 at 6:47 PM, Kejia柯嘉 wrote: > > Hi Yoo, > > > > You may try (display '("" "0" "" "0")), and you will find two whitepaces > >

Re: [racket] the extra empty string

2013-04-19 Thread Danny Yoo
On Fri, Apr 19, 2013 at 6:47 PM, Kejia柯嘉 wrote: > Hi Yoo, > > You may try (display '("" "0" "" "0")), and you will find two whitepaces > between 0. The function "display" delimits between elements of a list by inserting a space between each pair. It simply turns out that displaying the empty st

Re: [racket] the extra empty string

2013-04-19 Thread Kejia柯嘉
Hi Yoo, You may try (display '("" "0" "" "0")), and you will find two whitepaces between 0. 在 2013年4月19日星期五,Danny Yoo 写道: > On Fri, Apr 19, 2013 at 5:44 PM, Kejia柯嘉 > > wrote: > > Hi all, > > > > In DrRacket, why is there an extra empty string (`[]`between 0s) in > > the list:`'("" "0" "" "0")`.

Re: [racket] Changing at-expressions to other-glyph-expressions

2013-04-19 Thread Danny Yoo
> "But you can move the defines outside the @list| form, as seen in > https://gist.github.com/dyoo/5423623."; True, but in that case, I can no > longer programmatically parse my source files, since they may have defines > within them. (This is, as I understand it, the major benefit of using > scrib

Re: [racket] the extra empty string

2013-04-19 Thread Danny Yoo
On Fri, Apr 19, 2013 at 5:44 PM, Kejia柯嘉 wrote: > Hi all, > > In DrRacket, why is there an extra empty string (`[]`between 0s) in > the list:`'("" "0" "" "0")`. This generates `([]0[][]0)`, instead of > `([]0[]0)`. Unfortunately, the question here is ambiguous. What are you trying to do? Can y

[racket] the extra empty string

2013-04-19 Thread Kejia柯嘉
Hi all, In DrRacket, why is there an extra empty string (`[]`between 0s) in the list:`'("" "0" "" "0")`. This generates `([]0[][]0)`, instead of `([]0[]0)`. - Daniel Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Changing at-expressions to other-glyph-expressions

2013-04-19 Thread Matthew Butterick
Thanks. Yes, I did see that in the docs. The problem with this technique is that once I wrap the input text in @list| (or @list|^, or ... etc.) to get the benefit of @-escaping, then I lose the ability to do defines within the body of that text. (Throws error "define not allowed in expression conte

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Matthias Felleisen
On Apr 19, 2013, at 7:06 PM, Shannon Severance wrote: > On 4/19/13 2:27 PM, "Matthias Felleisen" wrote: >> -- our contract system has a really hard time expressions g : ∀ t : t -> t. > > I'd like to double check my understanding. Is the SML type fn : 'a -> 'a > the same as what you meant by g

[racket] Unable to use Racket for CGI...

2013-04-19 Thread Danny Yoo
Let's try not to guess. Can you check your web server's error log. The web server's error log is usually a lot more specific than the "Internal error" that it sends to the browser. Apache often keeps it in the same location as the regular server logs. Racket Users list:

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Shannon Severance
On 4/19/13 2:27 PM, "Matthias Felleisen" wrote: > -- our contract system has a really hard time expressions g : ∀ t : t -> t. I'd like to double check my understanding. Is the SML type fn : 'a -> 'a the same as what you meant by g : ∀ t : t -> t? -- Shannon Racket User

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Robby Findler
Technically, paths are path-string?. Robby On Fri, Apr 19, 2013 at 1:57 PM, Asumu Takikawa wrote: > On 2013-04-19 20:18:53 +0200, Manfred Lotz wrote: > > path : path-string? > > > > [...] > > > > I would expect that the first parameter path is a string and that the > > second parameter is an

Re: [racket] Changing at-expressions to other-glyph-expressions

2013-04-19 Thread Danny Yoo
Slightly larger example: https://gist.github.com/dyoo/5423623 Hope this helps! Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Changing at-expressions to other-glyph-expressions

2013-04-19 Thread Danny Yoo
Can you use the escaping syntax that Scribble provides? Here's an example: #lang scribble/base @list|{ this is an example with @ signs in it. I can still use @ by using it like this: |@tt{Hello world}, right?}| It'

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Matthias Felleisen
On Apr 19, 2013, at 4:02 PM, Manfred Lotz wrote: > But it is more powerful. [[ This is a quibble that could take you off your chosen path for years. The words 'more powerful' aren't that easy to agree with. Here are ways to make them incorrect: -- in a sound type system, the type signature

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Manfred Lotz
On Fri, 19 Apr 2013 15:00:29 -0400 Neil Van Dyke wrote: > Manfred Lotz wrote at 04/19/2013 02:18 PM: > > From this I'm wondering why there are predicates when for example I > > would expect strings? > > > > The language you're seeing is mostly that of Racket *contracts*, even > though the

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Manfred Lotz
Hi Norman, First, thanks to you and Asumu for your help. On Fri, 19 Apr 2013 19:56:22 +0100 Norman Gray wrote: > > Manfred, hello. > > On 2013 Apr 19, at 19:18, Manfred Lotz wrote: > > > I don't seem to know how to read procedure documentation like in the > > following example. > > > >(f

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Neil Van Dyke
Manfred Lotz wrote at 04/19/2013 02:18 PM: From this I'm wondering why there are predicates when for example I would expect strings? The language you're seeing is mostly that of Racket *contracts*, even though the implementation might not be using the Racket contract software mechanism:

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Asumu Takikawa
On 2013-04-19 20:18:53 +0200, Manfred Lotz wrote: > path : path-string? > > [...] > > I would expect that the first parameter path is a string and that the > second parameter is an optional parameter denoting a file mode. Further > I would assume that file->string returns a string containing the

Re: [racket] How to read procedure documentation?

2013-04-19 Thread Norman Gray
Manfred, hello. On 2013 Apr 19, at 19:18, Manfred Lotz wrote: > I don't seem to know how to read procedure documentation like in the > following example. > >(file->string path [#:mode mode-flag]) → string? > > path : path-string? > mode-flag : (or/c 'binary 'text) = 'binary > > > I wou

[racket] How to read procedure documentation?

2013-04-19 Thread Manfred Lotz
Hi there, I don't seem to know how to read procedure documentation like in the following example. (file->string path [#:mode mode-flag]) → string? path : path-string? mode-flag : (or/c 'binary 'text) = 'binary I would expect that the first parameter path is a string and that the second

[racket] Changing at-expressions to other-glyph-expressions

2013-04-19 Thread Matthew Butterick
New to Racket & Scribble. I specialize in dumb questions. I'm looking at using Scribble/text as a preprocessor for a lot of files that happen to have a lot of @ signs in them. So either I need to escape the @ signs programmatically (hm, could be done, but could also be error prone). Or, as I gathe

Re: [racket] `send-url', unix and `xdg-open'

2013-04-19 Thread Diogo F. S. Ramos
Ryan Culpepper writes: > On 04/18/2013 11:35 AM, Diogo F. S. Ramos wrote: >> Looking at `collects/net/sendurl.rkt' I see that `xdg-open' is commented >> out in the `all-unix-browsers' list, although it's still a key in a case >> in `send-url/unix'. >> >> Is there a reason to not use `xdg-open'? >

[racket] string to file

2013-04-19 Thread deepak verma
if we convert a file into a string using file->string how do we get back the file? Racket Users list: http://lists.racket-lang.org/users

[racket] multimedia files through tcp

2013-04-19 Thread deepak verma
how can we stream multimedia files through tcp ? Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Windows to Ubuntu quirk

2013-04-19 Thread Patrick King
On Fri, Apr 19, 2013 at 12:36 AM, Eli Barzilay wrote: > Three hours ago, Patrick King wrote: > > It really was a > > simple cut & paste of the whole directory tree, and the use of case > > higher up the tree doesn't seem to cause any problem. > > Windows is "case preserving" which means that it d

Re: [racket] Unable to use Racket for CGI...

2013-04-19 Thread Tim Brown
Neil wrote, then my stupid phone over-edited: > By the way, Racket has been used very successfully in Web CGI and SCGI for a decade. Not according to wikipedia it doesn't! ;-) I just looked (which is about all this device is any good for). And racket is neither a language with an SCGI API nor a w