[racket] FFI Pass/Return By Value

2012-06-04 Thread Vince Kuyatt
I am having a strange issue to do with making an FFI binding to some simple C functions which immediately result in a segmentation fault. In these functions, all arguments are pass by value, and all return values are values, not pointers. I am wondering if there is an issue with the FFI that gettin

[racket] Web server templates

2012-06-04 Thread Simon Haines
Is there any way to change a template provided with include-template without having to restart the web server? Cache-control headers don't work. Thanks. -- Simon. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Jon Rafkind
On 06/04/2012 09:50 PM, Jon Rafkind wrote: > On 06/04/2012 09:48 PM, Eli Barzilay wrote: >> A few minutes ago, Jon Rafkind wrote: >>> Also that example is somewhat bizarre.. I think the (clock a ...) >>> template should be (get-clock) instead of ((get-clock) a ...), >>> right? >> No -- with that ch

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Jon Rafkind
On 06/04/2012 09:48 PM, Eli Barzilay wrote: > A few minutes ago, Jon Rafkind wrote: >> Also that example is somewhat bizarre.. I think the (clock a ...) >> template should be (get-clock) instead of ((get-clock) a ...), >> right? > No -- with that change you get a weird identifier macro where > >

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Eli Barzilay
A few minutes ago, Jon Rafkind wrote: > > Also that example is somewhat bizarre.. I think the (clock a ...) > template should be (get-clock) instead of ((get-clock) a ...), > right? No -- with that change you get a weird identifier macro where clock evaluates to (for example) 0, and (clock

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Eli Barzilay
10 minutes ago, Harry Spier wrote: > [...] > If I now remove the line in the macro " [(clock a ...) ((get-clock) > a ...)]" then entering:either clock or (clock) at the evaluation > prompt returns 0. Why is it that (clock) doesn't still fail with > "procedure application: expected procedure, give

Re: [racket] Macro example in Racket Guide

2012-06-04 Thread Jon Rafkind
I think its because without the (clock a ...) pattern the input (clock) is matched to the pattern 'clock' which matches by default. The pattern for just a lone identifier should be (in terms of syntax/parse) 'clock:identifier'. The docs for make-set!-transformer suggest to use a fender expressio

[racket] Macro example in Racket Guide

2012-06-04 Thread Harry Spier
In section 16.1.3 of the Racket Guide there is this example and explanation: - (define-syntax clock (syntax-id-rules (set!) [(set! clock e) (put-clock! e)] [(clock a ...) ((get-clock) a ...)] [clock (get-clock)])) (define-values (get-clock put-clock!) (l

Re: [racket] ranking of search results in documentation search

2012-06-04 Thread Eli Barzilay
20 minutes ago, Robby Findler wrote: > On Mon, Jun 4, 2012 at 8:31 PM, Eli Barzilay wrote: > > 6 hours ago, Greg Hendershott wrote: > >> > This would be easy to play with: click the [!] and you get a > >> > dialog with preferences. > >> > >> Ah, I'd never noticed the [!]. > > > > Random thought: n

Re: [racket] ranking of search results in documentation search

2012-06-04 Thread Robby Findler
On Mon, Jun 4, 2012 at 8:31 PM, Eli Barzilay wrote: > 6 hours ago, Greg Hendershott wrote: >> > This would be easy to play with: click the [!] and you get a >> > dialog with preferences. >> >> Ah, I'd never noticed the [!]. > > Random thought: now that a gear icon is conventional for settings, > w

Re: [racket] ranking of search results in documentation search

2012-06-04 Thread Eli Barzilay
6 hours ago, Greg Hendershott wrote: > > This would be easy to play with: click the [!] and you get a > > dialog with preferences. > > Ah, I'd never noticed the [!]. Random thought: now that a gear icon is conventional for settings, would it help if it changes to "[*]"? > > Initially, the navig

Re: [racket] Macro for code organisation

2012-06-04 Thread Eli Barzilay
Two hours ago, Harry Spier wrote: > > This works fine, but I was wondering if for readability macros could > be use to set up a kind of "internal require" of the helper > functions so I could have the main loop before the internal > definitions of the helper functions it refers to. You don't need

[racket] Macro for code organisation

2012-06-04 Thread Harry Spier
I have a data-structure called pixel-graph representing a collection of graphs. The data-structure is a vector of structs, each struct representing a node in a graph. There is a main function called "blobify" that determines which nodes are connected in a single graph and assigns a graph number t

Re: [racket] ranking of search results in documentation search

2012-06-04 Thread Greg Hendershott
> This would be easy to play with: click the [!] and you get a dialog > with preferences. Ah, I'd never noticed the [!]. > Initially, the navigation ">>"s used to only at the bottom so I was > concerned to keep a size that fits vertically on most screens.  Now, > the only thing that needs to move

Re: [racket] SSL on Amazon Linux AMI using racket-5.2.1-bin-x86_64-linux-f14

2012-06-04 Thread Greg Hendershott
This time around, it turned out I needed to install the `openssl-devel' package: $ sudo yum install openssl-devel I'll add this to the wiki in case it helps anyone else. On Mon, Jun 4, 2012 at 2:16 PM, Greg Hendershott wrote: > On Amazon Linux 64-bit using racket-5.2.1-bin-x86_64-linux-f14 (64-

Re: [racket] multiple-value sugar in "let"* forms

2012-06-04 Thread Greg Hendershott
> I asked about multiple-value "let"*.  All I wanted was to renovate my > kitchen, but instead you're trying to sell me a downtown penthouse.  You're > going to have to sell me on why I'd want the downtown lifestyle, and allay > my concerns about social diseases.  We could just renovate my kitchen

[racket] SSL on Amazon Linux AMI using racket-5.2.1-bin-x86_64-linux-f14

2012-06-04 Thread Greg Hendershott
On Amazon Linux 64-bit using racket-5.2.1-bin-x86_64-linux-f14 (64-bit for Fedora 14): $ racket Welcome to Racket v5.2.1. -> (require openssl) -> (define-values (in out) (ssl-connect "www.google.com" 80)) ; SSLv23_client_method: implementation not found; no arguments provided [,bt ; for context]

Re: [racket] multiple-value sugar in "let"* forms

2012-06-04 Thread Neil Van Dyke
Eli Barzilay wrote at 06/03/2012 11:25 PM: The way I see it, there are several problems with internal `define's as they currently stand, in decreasing order of importance: 1. Easy to make hard-to-find bugs in both code refactoring and in new code. I think that a lot of these problems w