Re: [racket] text%, keymap%, copy/paste question

2013-06-06 Thread Laurent
On Fri, Jun 7, 2013 at 1:50 AM, Matthew Flatt wrote: > FWIW, there's also `(current-text-keymap-initializer)'. > http://docs.racket-lang.org/gui/Editor_Functions.html#%28def._%28%28lib._mred/main..rkt%29._current-text-keymap-initializer%29%29 Here is an example of how to use it: https://gist.gi

Re: [racket] Dynamic Templates?

2013-06-06 Thread Greg Hendershott
Great timing! It's been on my short list to make my static blog generator more flexible. From http://docs.racket-lang.org/web-server/templates.html I got the idea that it would be suitable only for static templates, but now I understand that's not the case. Today I made a topic branch using this ap

Re: [racket] text%, keymap%, copy/paste question

2013-06-06 Thread Matthew Flatt
FWIW, there's also `(current-text-keymap-initializer)'. At Thu, 6 Jun 2013 09:13:09 +0200, Laurent wrote: > As I understand it, `add-text-keymap-funcions' makes these functions > mappable, but does not give you the default mappings. > > You can either add the keybindings yourself, or you can use

Re: [racket] How can a collection in a package get its version?

2013-06-06 Thread Matthew Flatt
At Mon, 3 Jun 2013 13:57:53 -0400, Greg Hendershott wrote: > Let's say I have a command-line utility distributed as a package. > > package/ > info.rkt > collection/ > main.rkt > > package/info.rkt is e.g. > > #lang setup/infotab > (define version "1.1") > > In main.rkt, I want t

Re: [racket] Typo in FFI documentation

2013-06-06 Thread Matthew Flatt
Fixed - thanks! At Thu, 06 Jun 2013 07:23:19 +0400, Клочков Роман wrote: > > http://docs.racket-lang.org/foreign/foreign_procedures.html#%28part._foreign~3ac > ustom-types%29 > > ( define-fun-syntax   _float* >    ( syntax-id-rules   ( _float* ) > [ ( _float* )   ( type:   _float   pre:  

[racket] set!: eval-ing to lvalues

2013-06-06 Thread Sean Kanaley
Hello all, I was curious why Scheme and now Racket does not inherently support a generic set!. I found an SRFI http://srfi.schemers.org/srfi-17/srfi-17.htmlthat suggests a generic method solution requiring a lookup for the "real" setter (and so needing a special setter for every data type. What

Re: [racket] JSON module: why symbols for object keys? lists for arrays?

2013-06-06 Thread Erik Pearson
Hi Eli, The short answer is that I now love using symbols for keys! In the back of my mind are still some reservations, but in day to day coding, it is very pleasurable. E.g. since I often need to extract a value from within a json or other dictionary-like structure (e.g. http header, or sexpr co

Re: [racket] Dynamic Templates?

2013-06-06 Thread Erik Pearson
It bugs me too, at times. But it does solve some problems. My cell hates big giant web pages that take three minutes to load when all I'm looking for is a phone number or "why is my Comcast down?". (The answer is you have to wade through big giant web pages in order to sign up for text alerts.) My

Re: [racket] Dynamic Templates?

2013-06-06 Thread Erik Pearson
I have nothing against Scribble. For me it is practical -- I have tons of mustache templates created for another web server, so I want to (mostly) just drop in a Racket web app to take over. Also, I need to support client side templates. Mustache (or as I like to remind myself c-templates) so some

Re: [racket] Dynamic Templates?

2013-06-06 Thread Joe Gibbs Politz
On Thu, Jun 6, 2013 at 11:01 AM, Jay McCarthy wrote: > I'm curious why you think Mustache is better than Scribble (and the > full power of Racket) in your templates? In this case, I'm willing to give Mustache a chance for a few reasons: 1. Some bias from a web programmer who finds Mustache-like

Re: [racket] Dynamic Templates?

2013-06-06 Thread Sean McBeth
My cellphone and I, we hates the client-side HTML rendering, gollumgollum. On Thu, Jun 6, 2013 at 11:01 AM, Jay McCarthy wrote: > I'm curious why you think Mustache is better than Scribble (and the > full power of Racket) in your templates? > > On Thu, Jun 6, 2013 at 8:53 AM, Joe Gibbs Politz w

Re: [racket] Dynamic Templates?

2013-06-06 Thread Jay McCarthy
I'm curious why you think Mustache is better than Scribble (and the full power of Racket) in your templates? On Thu, Jun 6, 2013 at 8:53 AM, Joe Gibbs Politz wrote: > On Wed, Jun 5, 2013 at 9:37 PM, Erik Pearson wrote: >> @joe I have a relatively simple implementation of "mustache" templates >>

Re: [racket] JSON module: why symbols for object keys? lists for arrays?

2013-06-06 Thread Eli Barzilay
[Late reply, since the other thread reminded me of this. Might be irrelevant for your actual decisions by now...] On April 22nd, Erik Pearson wrote: > Hi Eli, > > Wow, thanks for the great feedback. > > On Mon, Apr 22, 2013 at 3:21 PM, Eli Barzilay wrote: > > General comment: unless you have

Re: [racket] Dynamic Templates?

2013-06-06 Thread Joe Gibbs Politz
On Wed, Jun 5, 2013 at 9:37 PM, Erik Pearson wrote: > @joe I have a relatively simple implementation of "mustache" templates > that I use for web server templating. > > Something similar to your example would be > > (render "Welcome {{username}}" #hasheq((username . "erik"))) > > where the data is

[racket] Rosetta Code Status

2013-06-06 Thread Tim Brown
Folks, FYI - I've just regenerated: http://www.timb.net/popular-languages.html #CountName 1744Tcl 2676Python 3667Racket then lesser languages like C (#4 - 663), Java (#17 - 505) and ZX Spectrum Basic (#93 - 78) That's nine short of the Silver spot! Well done folks! In a flurry of self promotio

Re: [racket] text%, keymap%, copy/paste question

2013-06-06 Thread Matt Jadud
Hi Laurent, Many thanks! The thing worth noting from a document management/improvement perspective: I have never seen the framework collection. (Both are possible), but either: 1. I really missed something obvious somewhere, or 2. No search of mine in the docs ever turned up this very useful c

Re: [racket] Marketplace: A language for network-aware programming

2013-06-06 Thread Tony Garnock-Jones
Hi Ray, On 2013-05-30 12:53 PM, Ray Racine wrote: > Very happy to see this. :-) > What is the general assumption, if any, regarding message delivery > guarantees? Guaranteed, Once-And-Only-Once, At-Most-Once. And Message > Ordering. Say between 2 physical node Ground-VMs across a network? > N

Re: [racket] text%, keymap%, copy/paste question

2013-06-06 Thread Laurent
As I understand it, `add-text-keymap-funcions' makes these functions mappable, but does not give you the default mappings. You can either add the keybindings yourself, or you can use the framework's procedure `keymap:get-editor' which gives you default bindings. Here is a working example: https:/