Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Eli Barzilay
About a minute ago, Jukka Tuominen wrote: > > > The sandbox is working in an isolated world (by design, of > > course), so you need to do the (require "sb-functions.rkt") inside > > the sandbox. For example, just use (sb-eval '(require ...)). > > Wouldn't that mean that the sb-evaluator has to b

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Jukka Tuominen
> > The sandbox is working in an isolated world (by design, of course), so > you need to do the (require "sb-functions.rkt") inside the sandbox. > For example, just use (sb-eval '(require ...)). > > -- > ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: >

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Eli Barzilay
6 minutes ago, Jukka Tuominen wrote: > > I made a simplified test case (below), even left out the net-repl > part in belief that replacing the eval with sb-eval will do the > trick in the end. I have the module structure as intended, but still > can't figure out how to give it as an input to the s

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Jukka Tuominen
I made a simplified test case (below), even left out the net-repl part in belief that replacing the eval with sb-eval will do the trick in the end. I have the module structure as intended, but still can't figure out how to give it as an input to the sandbox evaluator. The documentation is there, b

Re: [racket] RacketCon: Web app tutorial

2011-06-27 Thread Veer
Just a suggestion , not request. How about web application for multiple choice tests. For example you can have a online test for "How well you know Racket" or "Simple algebra" etc. Each question has choices and one answer. Any one can submit a test and anyone can take test or only registered users

Re: [racket] RacketCon: Web app tutorial

2011-06-27 Thread Eduardo Bellani
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/27/2011 02:56 PM, Jay McCarthy wrote: > I'll be giving a 15 minute presentation at RacketCon about Web apps. I > was thinking about doing a tiny demo of what's in the online tutorial > and then a walkthrough of some of the other, un-tutorial-ed p

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Eli Barzilay
About a minute ago, Carl Eastlund wrote: > On Mon, Jun 27, 2011 at 4:43 PM, Eli Barzilay wrote: > > An hour ago, Carl Eastlund wrote: > >> This probably requires a new language implementation similar to > >> #lang s-exp that specifies the reader but allows you to specify any > >> language bindings

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Carl Eastlund
On Mon, Jun 27, 2011 at 4:43 PM, Eli Barzilay wrote: > An hour ago, Carl Eastlund wrote: >> This probably requires a new language implementation similar to >> #lang s-exp that specifies the reader but allows you to specify any >> language bindings, in this case scribble/manual. > > IIUC, this part

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Eli Barzilay
An hour ago, Carl Eastlund wrote: > This probably requires a new language implementation similar to > #lang s-exp that specifies the reader but allows you to specify any > language bindings, in this case scribble/manual. IIUC, this part is equivalent to just using `#reader' before the `#lang' line

Re: [racket] textarea-input keys

2011-06-27 Thread Shogo Yamazaki
Thanks for your reply, Jay. Also the "initial-value" key is useful for me, but I don't know if it is correct to write so. Shogo Yamazaki moquo2@gmail.com 2011/6/28 Jay McCarthy : > I've just updated the Web server with docs and tests for that new > version. There's no reason not to have "attr

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Matthias Felleisen
What Carl means is something like this: @;% @(begin #reader scribble/comment-reader (schemeblock ;; Int -> Int ;; increment the argument by 1 (define (plus1 x) (+ x 1)) )) @;% If I don't set the sribble/comment-reader the ;-line comments disappear. -- Matthias On Jun 27, 2011, at 3:32

Re: [racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread Carl Eastlund
Maurizio, Modules, including Scribble documents, are read in their entirety before any compilation or evaluation is performed. The read error you have seen happens long before your mymodule language gets involved. There are a few different ways to fix the example. First, you could put a #reader

Re: [racket] Saving function bodies in Beginning Student Language

2011-06-27 Thread Gregory Marton
On Jun 27, 2011, at 2:40 PM, Gregory Marton wrote: This is also important because, at the moment, WeScheme doesn't have a stepper, and DrRacket's stepper has a (reported) bug about relative teachpack paths, so using the stepper has been challenging. I haven't seen this bug report but that's

Re: [racket] Saving function bodies in Beginning Student Language

2011-06-27 Thread Matthias Felleisen
On Jun 27, 2011, at 2:40 PM, Gregory Marton wrote: > This is also important because, at the moment, WeScheme doesn't have a > stepper, and DrRacket's stepper has a (reported) bug about relative teachpack > paths, so using the stepper has been challenging. I haven't seen this bug report but tha

Re: [racket] Saving function bodies in Beginning Student Language

2011-06-27 Thread Gregory Marton
What you see here is the BSL printer of course. It insists on showing students the list in terms of basic construction steps. Thanks, As Eli said, in BSL, a function definition defines a macro. So your define/source needs to deliver a macro that obeys the same protocol (I am not sure that's

Re: [racket] textarea-input keys

2011-06-27 Thread Jay McCarthy
I've just updated the Web server with docs and tests for that new version. There's no reason not to have "attributes", it was just an oversight. Jay 2011/6/27 Shogo Yamazaki : > Hi. > I'm now reading article about using formlets in > 'Continue: Web Applications in Racket' and trying to use formle

[racket] RacketCon: Web app tutorial

2011-06-27 Thread Jay McCarthy
I'll be giving a 15 minute presentation at RacketCon about Web apps. I was thinking about doing a tiny demo of what's in the online tutorial and then a walkthrough of some of the other, un-tutorial-ed parts of the Web server from a reference perspective. Another option would be to show a relatively

[racket] Help: Scribble does not see readtable extensions when loading a module

2011-06-27 Thread maurizio.giorda
Hi everyone, I have developed a racket module that implements a new language. In this module I have readtable re-definition like this: mymodule.rkt- (module mymodule (require racket/base) ... ; new readtable with extensions to support the reading of a new ; data s

[racket] textarea-input keys

2011-06-27 Thread Shogo Yamazaki
Hi. I'm now reading article about using formlets in 'Continue: Web Applications in Racket' and trying to use formlets. It's very exciting! There is a #:attributes key with text-input, therefore I can use HTML5 attributes with text-boxes. On the other hand, textarea-input has only #:rows and #:cols

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread jukka . tuominen
Thanks Eric, that sounds very interesting. br, jukka > My IRC bot uses sandboxes to securely evaluate racket code; take a > look at https://github.com/offby1/rudybot/blob/master/sandboxes.rkt > > On Mon, Jun 27, 2011 at 6:10 AM, Sam Tobin-Hochstadt > wrote: >> On Mon, Jun 27, 2011 at 8:48 AM,

Re: [racket] Strange behavior of web application , or may be not

2011-06-27 Thread Jay McCarthy
There's also send/back, which sends a single response. Jay 2011/6/27 Veer : > This is  really crazy , I wrote large program , and was getting > the same behavior and whole day I tried to figure why and why me? > Of course I forgot that response/xexpr does not > send the response back to client. >

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Eric Hanchrow
My IRC bot uses sandboxes to securely evaluate racket code; take a look at https://github.com/offby1/rudybot/blob/master/sandboxes.rkt On Mon, Jun 27, 2011 at 6:10 AM, Sam Tobin-Hochstadt wrote: > On Mon, Jun 27, 2011 at 8:48 AM, Jukka Tuominen > wrote: >> >> The basic client/server functionalit

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Jukka Tuominen
Great, thanks again! It will take a while to digest and try this out in practise. br, jukka > -Original Message- > From: sam...@gmail.com [mailto:sam...@gmail.com]On Behalf Of Sam > Tobin-Hochstadt > Sent: 27 June 2011 17:40 > To: Jukka Tuominen > Cc: users@racket-lang.org > Subject: Re

Re: [racket] Strange behavior of web application , or may be not

2011-06-27 Thread Veer
This is really crazy , I wrote large program , and was getting the same behavior and whole day I tried to figure why and why me? Of course I forgot that response/xexpr does not send the response back to client. So view function becomes : (define (view request) (send/suspend/dispatch (lam

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Sam Tobin-Hochstadt
On Mon, Jun 27, 2011 at 10:08 AM, Jukka Tuominen wrote: > > So, once I hopefully have it working locally, how do I apply it into the > net-repl server? I think the following is the correct definition to be > tweaked (non-modified from net-repl). Do I add the sandbox-environment to > evals or somet

Re: [racket] Strange behavior of web application , or may be not

2011-06-27 Thread Jay McCarthy
This is not strange. When you click "Create Something", the continuation is [] When you click "Start Again", the continuation is (begin [] (error 'oops ...) (recur)) When you click "View", the value (response/xexpr `(html)) gets returned to the continuation, so you get an error, because

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Jukka Tuominen
So, once I hopefully have it working locally, how do I apply it into the net-repl server? I think the following is the correct definition to be tweaked (non-modified from net-repl). Do I add the sandbox-environment to evals or something? (define net-repl-eval (let ([eval (current-eval)])

[racket] Strange behavior of web application , or may be not

2011-06-27 Thread Veer
Hello, When I run this web application (given below) , I get strange behavior , don't know if this is correct behavior or not. Follow/click the link in sequence : 1. Create Something 2. Start again 3. View So , when I click "view" I get exception instead of blank page. code : #lang web-server/

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Sam Tobin-Hochstadt
On Mon, Jun 27, 2011 at 9:48 AM, Jukka Tuominen wrote: > BTW, 'secure' in this context may mean allowing even critical system calls > (say format harddisk), if so specified. But the user should not be able to > do anything else than specified. The `sandbox' infrastructure is fairly flexible. Jus

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Jukka Tuominen
Thanks Sam, I'll take (yet) another look at those. BTW, 'secure' in this context may mean allowing even critical system calls (say format harddisk), if so specified. But the user should not be able to do anything else than specified. br, jukka > -Original Message- > From: sam...@gmail

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Jukka Tuominen
Haa, so you know Matthias but won't tell!? :) The problem is not to make it work (since it works already), but to restrict what it provided over TCP. br, jukka > -Original Message- > From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] > Sent: 27 June 2011 16:04 > To: Jukka Tuominen

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Sam Tobin-Hochstadt
On Mon, Jun 27, 2011 at 8:48 AM, Jukka Tuominen wrote: > > The basic client/server functionality is already working, but it's too big a > security risk outside LAN use. It seems to be easier to add functionality > than ripping them off. Perhaps creating a custom #%top definition to > interfere wit

Re: [racket] Saving function bodies in Beginning Student Language

2011-06-27 Thread Matthias Felleisen
On Jun 26, 2011, at 11:01 PM, Gregory Marton wrote: > In BSL: > >> (define/save-source (foo x) (+ x 3)) >> (procedure-source foo) > (cons '? (cons (cons 'x empty) (cons (cons '+ (cons 'x (cons 3 empty))) > empty))) What you see here is the BSL printer of course. It insists on showing student

Re: [racket] Limiting net-repl provided functions

2011-06-27 Thread Matthias Felleisen
Since the server translates the symbol from the wire into a function call, I think this should be straightforward. -- Matthias On Jun 27, 2011, at 8:48 AM, Jukka Tuominen wrote: > > Hi, > > if I was to provide public NET-REPL servers (available at PLaneT), I wonder > if there's an easy and s

[racket] Limiting net-repl provided functions

2011-06-27 Thread Jukka Tuominen
Hi, if I was to provide public NET-REPL servers (available at PLaneT), I wonder if there's an easy and secure way to limit the provided functions per server? Say, I have defined functions f1, f2, and f3, and would only like to provide them over a TCP connection, but nothing else. Not even the ba

[racket] Geiser 0.1.3 released

2011-06-27 Thread Jose A. Ortega Ruiz
Just a quick note to let you know that i've released Geiser 0.1.3. This is just a bug fix release. Geiser is an Emacs/Racket interaction mode, modeled after Slime and FUEL. See http://geiser.nongnu.org for the whole story. Cheers, jao -- Men can live without air a few minutes, without water fo

Re: [racket] Saving function bodies in Beginning Student Language

2011-06-27 Thread Eli Barzilay
Not really an answer -- but note that in BSL functions are actually defined as macros, so it's not surprising that your macro fails. (But probably possible to get it to work somehow.) Four hours ago, Gregory Marton wrote: > > So my question boils down to: > 1. Is there a way that I can use the

Re: [racket] bug?

2011-06-27 Thread Eli Barzilay
8 hours ago, Jordan Schatz wrote: > I'm not sure if this is considered a bug in racket or in the SSL > implementation at mtgox.com. The mtgox url does work fine for me > via curl/wget etc. As far as I can tell when racket tries to > retrieve the mtgox url everything starts off fine: the TLS hands