Re: [racket] Does Redex have support for multi-hole evaluation contexts?

2012-07-11 Thread Matthias Felleisen
On Jul 11, 2012, at 3:52 PM, Ryan Newton wrote: > So would this mean using a marking approach like David's example? Or simply > pick an evaluation order, but provide a mechanism to proceed if the desired > redex is stuck (e.g. a blocked 'get' waiting for communication)? short: Redex book cha

Re: [racket] How to load a file at the startup?

2012-07-11 Thread Rouben Rostamian
Ah, OK. the `provide' was missing. Thanks! On Wed, Jul 11, 2012 at 08:06:50PM -0400, Matthias Felleisen wrote: > > Did you provide sq? If so, racket -it tryme.rkt should work. > > On Jul 11, 2012, at 6:33 PM, Rouben Rostamian wrote: > > > I use racket from the command line (in Linux). I loa

Re: [racket] How to check if a key is pressed within interaction block, and not declaration one.

2012-07-11 Thread Oleg Gunkin
Got latest nightly build; it works perfectly. Thank you. On Wed, Jul 11, 2012 at 5:01 PM, Robby Findler wrote: > This is a bug that I fixed in March, I believe. You can either wait > for the next release or use one of the nightly builds. > > Sorry for the inconvenience. > > Robby > > On Wed, Jul

[racket] Cross-Platform Secure RNG?

2012-07-11 Thread Nick Sivo
Hi, Does there exist in Racket a cross-platform way to generate cryptographically secure[1] pseudorandom numbers? Some code I'm currently working on directly uses /dev/urandom which would be fine if I wasn't using Windows. I looked in the openssl bindings and the racket documentation but didn't

Re: [racket] How to load a file at the startup?

2012-07-11 Thread Matthias Felleisen
Did you provide sq? If so, racket -it tryme.rkt should work. On Jul 11, 2012, at 6:33 PM, Rouben Rostamian wrote: > I use racket from the command line (in Linux). I load a racket > file, as in: > > (enter! "tryme.rkt") > > then I proceed with my interactive session. The file tryme.rkt >

Re: [racket] How to check if a key is pressed within interaction block, and not declaration one.

2012-07-11 Thread Robby Findler
This is a bug that I fixed in March, I believe. You can either wait for the next release or use one of the nightly builds. Sorry for the inconvenience. Robby On Wed, Jul 11, 2012 at 6:35 PM, Oleg Gunkin wrote: > I use the following language declaration: > #lang s-exp framework/keybinding-lang >

Re: [racket] Flatten syntax and runtime phases?

2012-07-11 Thread Nick Sivo
Hello again, I'm following up in case anyone is curious. After fighting with defmacro for a while I ended up abandoning it and implementing what I need with syntax/parse instead. This requires re-writing the arc macros, but that isn't all bad since their new forms are generally shorter, clearer,

Re: [racket] How to check if a key is pressed within interaction block, and not declaration one.

2012-07-11 Thread Oleg Gunkin
I use the following language declaration: #lang s-exp framework/keybinding-lang And when I start Dr. Racket, I get: Error when installing the keybindings C:\Users\oleg\Documents\racket-keys.rkt: link: reference (phase 0) to a variable in module "C:\Program Files\Racket\collects\drracket\tool-lib

Re: [racket] How to check if a key is pressed within interaction block, and not declaration one.

2012-07-11 Thread Robby Findler
When you say "crashes Dr. Racket", what do you mean? (What is the precise error message?) Are you using this as a keybinding file? On Wed, Jul 11, 2012 at 3:02 PM, Oleg Gunkin wrote: > Basically, I want to change up/down key behaviour within interaction > window to "put-next-sexp"/ "put-previous

[racket] How to load a file at the startup?

2012-07-11 Thread Rouben Rostamian
I use racket from the command line (in Linux). I load a racket file, as in: (enter! "tryme.rkt") then I proceed with my interactive session. The file tryme.rkt contains: #lang racket (define (sq x) (* x x)) This works fine but I am wondering: Is it possible to prescribe tryme.rkt on t

Re: [racket] Getting a list of keys in specified order

2012-07-11 Thread Neil Van Dyke
Kieron Hardy wrote at 07/11/2012 05:22 PM: I need to get the list of all the keys, of a small collection of key/value pairs, in creation/insertion order. Sounds like you almost certainly want an association list (aka alist). Alists are low-level and lightweight, and once you get some fami

[racket] Getting a list of keys in specified order

2012-07-11 Thread Kieron Hardy
Hi all, I need to get the list of all the keys, of a small collection of key/value pairs, in creation/insertion order. I first thought of a hash, but hash-keys returns a list in (presumably) hash (i.e. no) order. In the Reference for Dictionaries I see the Association List and the dict-keys f

[racket] How to check if a key is pressed within interaction block, and not declaration one.

2012-07-11 Thread Oleg Gunkin
Basically, I want to change up/down key behaviour within interaction window to "put-next-sexp"/ "put-previous-sexp" instead moving the cursor, but only for interaction block. This is what I came up with: (require drracket/tool-lib) (define (rebind key function original-function) (keybinding

Re: [racket] Does Redex have support for multi-hole evaluation contexts?

2012-07-11 Thread Ryan Newton
Thanks, we ended up removing most of our section on Redex until we can explore these issues. Lindsey wasn't comfortable having slightly different semantics in the Redex define-judgment-form implementation

[racket] request for browser test for WeScheme

2012-07-11 Thread Danny Yoo
I'm making a substantial low-level change to how the WeScheme REPL will communicate with clients. This change should be invisible to the regular user, but since it affects every interaction, I'd like to make sure the mechanism works under a variety of browsers. If you have time, please visit:

Re: [racket] Does Redex have support for multi-hole evaluation contexts?

2012-07-11 Thread Matthias Felleisen
This looks like a fairly conventional form of parallel evaluation with some form of attempt at 'free deterministic update'. If I were to model this kind of thing, I am sure I'd use a multi-hole reduction semantics to represent non-coordinated parallelism. Too bad Redex can't model this, but

Re: [racket] Scribble pain-point: itemlist

2012-07-11 Thread Eli Barzilay
Two days ago, Danny Yoo wrote: > > For point 1, one possibility would be to record source location and > make it available for the runtime and the contract system. Most of > the interesting Scribble errors happen at runtime, and the lack of > precise location really hurts since the contract check