[racket] FFI question again - how to get a string back from C

2011-06-10 Thread keyd...@gmx.de
Hi again, sorry for again asking such a basic FFI question, but I have a problem getting an output string from the C side... E.g. in one case, in my first attempt (def-ocilib datetotext OCI_DateToText : (date_ptr : _pointer) (fmt : _string) (size : _int) (strval : (_ptr o _string)) -> (result

[racket] regexp-match-evt and file-position

2011-06-10 Thread Milo Arvidsson
In the following program, (sync (regexp-match-evt #rx"^..." in)) returns '(#"123") but (file-position in) returns 0 instead of 3: #lang racket/base (require racket/port) (define-values (in out) (make-pipe)) (display "12345" out) (sync (regexp-match-evt #rx"^..." in)) (file-position in) Tha

Re: [racket] Server side continuations

2011-06-10 Thread Shriram Krishnamurthi
Since this is a public forum, so someone reading that post might also find this thread, let me point out one more source of confusion. Continuations do not manufacture more names *than there really are*. So, no matter how you program (continuations or CPS, Ajax or not) you still have to come up wi

Re: [racket] Server side continuations

2011-06-10 Thread Paul A. Steckler
On Sat, Jun 11, 2011 at 10:59 AM, Shriram Krishnamurthi wrote: > Where to start?  Oh, where to start?  Every sentence begins half-right > and then ends up all-wrong.  (Even the premise of this flame is wrong. >  Continuations are not solely about managing client-side state.) > > I guess it's up t

Re: [racket] Server side continuations

2011-06-10 Thread Sam Tobin-Hochstadt
On Fri, Jun 10, 2011 at 8:59 PM, Shriram Krishnamurthi wrote: > I wonder if he's read the structure of JavaScript programs, which -- > because of the cooperative multi-tasking structure of JavaScript -- > have to return control to the event loop (ie, "terminate") whenever > they make an Ajax requ

Re: [racket] Server side continuations

2011-06-10 Thread Robby Findler
And I take what I said back: they are still crucial. Javascript really just opens new doors that, pre-javascript, we had kind of wedged our fingers underneath but hadn't really opened. For example, just the other day, Casey crashed travelocity when he tried to buy two tickets at once (he and Diana

Re: [racket] Server side continuations

2011-06-10 Thread Shriram Krishnamurthi
Where to start? Oh, where to start? Every sentence begins half-right and then ends up all-wrong. (Even the premise of this flame is wrong. Continuations are not solely about managing client-side state.) I guess it's up to Jay to post the brilliant follow-up that will...well, who knows what wil

Re: [racket] Server side continuations

2011-06-10 Thread Robby Findler
There may be a grain of truth to what he says (that the existence of javascript in every browser makes continuation-based web servers less crucial than it was before that) but overall that post just seems confused. Robby On Fri, Jun 10, 2011 at 7:47 PM, Paul A. Steckler wrote: > I came across th

[racket] Server side continuations

2011-06-10 Thread Paul A. Steckler
I came across this post recently: http://carcaddar.blogspot.com/2011/06/continuation-based-web-applications.html The claim is that AJAX makes server-side continuations (invented at PLT) unnecessary. -- Paul _ For list-related administrative tas

Re: [racket] Typed Racket: Infinite Subtypes?

2011-06-10 Thread Sam Tobin-Hochstadt
On Fri, Jun 10, 2011 at 7:03 PM, Richard Lawrence wrote: > Sam Tobin-Hochstadt > writes: > >> I'll try to respond more comprehensively about the more general >> question, but for this: >>> (define-type Variable (Pair 'var Symbol)) >>> (define-predicate variable? Variable) >> >> Just use a struct:

Re: [racket] Typed Racket: Infinite Subtypes?

2011-06-10 Thread Richard Lawrence
Sam Tobin-Hochstadt writes: > I'll try to respond more comprehensively about the more general > question, but for this: >> (define-type Variable (Pair 'var Symbol)) >> (define-predicate variable? Variable) > > Just use a struct: > > (struct: variable ([s : Symbol])) > > Now you have `variable' an

Re: [racket] Embedding a GUI editor into Slideshows

2011-06-10 Thread Robby Findler
That would be easier, but would also have to be added, I believe. Robby On Fri, Jun 10, 2011 at 4:09 PM, Rodolfo Carvalho wrote: > Ok, thanks. > Alt + G brings up a "Go to slide" window. Isn't there a way to do something > similar for let's say Alt + V to bring something else like a video player

Re: [racket] Embedding a GUI editor into Slideshows

2011-06-10 Thread Rodolfo Carvalho
Ok, thanks. Alt + G brings up a "Go to slide" window. Isn't there a way to do something similar for let's say Alt + V to bring something else like a video player or code editor?! []'s Rodolfo Carvalho On Fri, Jun 10, 2011 at 18:03, Robby Findler wrote: > At the moment, I don't think that the

Re: [racket] Embedding a GUI editor into Slideshows

2011-06-10 Thread Robby Findler
At the moment, I don't think that the slideshow pict objects (the things that are displayed in the window) can react to mouse/keyboard events to do what you want. Probably the easiest thing would be to add something at the slide level that would let you direct the viewer to put a GUI control somewh

[racket] Embedding a GUI editor into Slideshows

2011-06-10 Thread Rodolfo Carvalho
Hello everybody, Has anyone had the experience of embedding a "live code editor" into Slideshow? I woke up with this idea for a coming presentation, I would talk with slides and from time to time I would show a code editor, type, and run a script (not necessarily racket code) and see the result /

Re: [racket] Limit command-line Racket's memory

2011-06-10 Thread Matthew Flatt
At Fri, 10 Jun 2011 14:51:00 -0400, Tony Garnock-Jones wrote: > Hi Matthew, everybody, > > On 2011-06-09 7:35 PM, Matthew Flatt wrote: > > Racket normally relies on memory limits imposed by the OS. > > After I posted my message, I thought to try ulimit. Unfortunately, it > didn't help: I couldn'

Re: [racket] Typed Racket: Infinite Subtypes?

2011-06-10 Thread Sam Tobin-Hochstadt
I'll try to respond more comprehensively about the more general question, but for this: On Fri, Jun 10, 2011 at 2:12 PM, Richard Lawrence wrote: > > And if it isn't possible, the cleanest workaround I can think of is to > tag all Variable values, like: > > (define-type Variable (Pair 'var Symbol)

Re: [racket] Limit command-line Racket's memory

2011-06-10 Thread Tony Garnock-Jones
Hi Matthew, everybody, On 2011-06-09 7:35 PM, Matthew Flatt wrote: Racket normally relies on memory limits imposed by the OS. After I posted my message, I thought to try ulimit. Unfortunately, it didn't help: I couldn't find any setting smaller than all of available RAM within which Racket w

[racket] Typed Racket: Infinite Subtypes?

2011-06-10 Thread Richard Lawrence
Hi Racketeers, I'm wondering if there's a way to specify a type in Typed Racket that is an infinite subtype of an existing type. (Not sure if I'm using the terminology correctly; by "subtype" I just mean a type whose values are a subset of another type's values.) For example, suppose I want to sp