[racket] Creating / rendering GUI elements in a Racket sandbox

2013-12-31 Thread Duncan Bayne
Hi All, I'm trying to execute Racket code with reduced permissions. My intent is that the sandboxed code will be rendering content to be displayed by the application. I can create an evaluator with the following function: (define sandbox (call-with-trusted-sandbox-configuration (lambda ()

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-31 Thread
I am not familiar with Mac yet, thanks for your prompt. Now that Command & Option have their own usage and there is a large number of emacs users in Mac, it seems like what we should do is simply copying the emacs keybindings until a better solution be found. At 2014-01-01 10:49:08,"Piotr Kalino

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-31 Thread Piotr Kalinowski
Robby Findler writes: > Just in case: the package should probably not change the meta/command > settings. That is something that only a user should configure > explicitly. Yeah, I've figured that much after finding that option in preferences. > On Tuesday, December 31, 2013, 钟 wrote: > >> Accor

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-31 Thread Robby Findler
Just in case: the package should probably not change the meta/command settings. That is something that only a user should configure explicitly. Robby On Tuesday, December 31, 2013, 钟 wrote: > Thank you very much, Piotr. > I don't have a Mac now, so I have no chance to do test on Mac by > myself.

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-31 Thread
Thank you very much, Piotr. I don't have a Mac now, so I have no chance to do test on Mac by myself.Thank you for your help. According to the document, Command is mapped to Meta when 'map-command-as-meta-key' produces #t, or we can use "d:" for command. It should be better to set it to #t by def

Re: [racket] Calling ActiveX DLL

2013-12-31 Thread Matthew Flatt
MysterX is deprecated because there is a newer interface: the `racket/com` library. The documentation for `racket/com` is here: http://docs.racket-lang.org/foreign/com.html That documentation doesn't try to explain COM, though, and I'm not sure where to point you, so I hope someone else here ca

Re: [racket] Datalog extensions

2013-12-31 Thread Jay McCarthy
Hi Evan, I was planning on working on this per your previous email to the list. Basically all that needs to be done is document datalog/runtime and maybe provide some helpers for constructing queries via datalog/ast. The runtime is very simple: (provide/contract [safe-clause? (clause? . -> . b

[racket] Calling ActiveX DLL

2013-12-31 Thread John Sampson
I use a proprietary program which recently has had a user interface added to it, consisting of an ActiveX DLL. Details are at http://www.sky-software.com/developer/ - one can send commands to the program and retrieve data from it. It can be called from Visual Basic for Applications or, for tho

Re: [racket] procedure to string

2013-12-31 Thread Alexander D. Knauth
Yes, you can do it with a struct with the property prop:procedure. #lang racket (require rackunit) (struct my-proc (proc str) #:property prop:procedure (struct-field-index proc)) (define f (my-proc (lambda (x) (+ x 1)) "(lambda (x) (+ x 1))")) (check-true (procedure? f)) (chec

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-31 Thread Piotr Kalinowski
Piotr Kalinowski writes: > However, notice that instead of C-( and C-) that are used in Emacs as > alternatives for slurpage, I had to use C-[ and C-]. For some reason, > when I try to input C-( or C-) in DrRacket I end up with just 9 or 0 (is > it a bug in GUI?). I tried different ways of getti

Re: [racket] procedure to string

2013-12-31 Thread Laurent
Not sure that's what you really want, but you can use a simple macro to get both the procedure and the corresponding string when defining the procedure: #lang racket ;; Macro: (define-syntax-rule (lambda+string args body ...) (values (lambda args body ...) (~a '(lambda args body ...

Re: [racket] How to view source code of procedures? MIT scheme "pp" equivalent?

2013-12-31 Thread Mark Watts
inline On Sat, Dec 28, 2013 at 1:01 PM, Scott Klarenbach wrote: > Matthias, > ... > As an aside: > > >> This might be a MIT misunderstanding about the relationship between >> Scheme and the lambda calculus. It is certainly not possible in general and >> I see no pragmatic use case for an approx

Re: [racket] Would someone prefer paredit shortcuts?

2013-12-31 Thread Piotr Kalinowski
钟 writes: > I used to write lisp code in emacs and enjoy paredit-mode.I tried to > find an alternative for DrRacket but found nothing, so I decided to do > it on my own. I has written a prototype in one day at > https://github.com/yjqww6/drracket-paredit , and implemented > Depth-Changing, Barfa

[racket] procedure to string

2013-12-31 Thread Alegria Baquero
Hello, is there any way to transform a function's body to a string such as "(lambda(x)...)"? Thanks Alegria Racket Users list: http://lists.racket-lang.org/users