Re: [racket] again: timeouts and exceptions

2012-07-05 Thread Rüdiger Asche
1. It's right in the docs for call-with-exception-handler: http://docs.racket-lang.org/reference/exns.html?q=call-with-exception-handler&q=with-handlers#(def._((lib._racket/private/more-scheme..rkt)._call-with-exception-handler)) 2. Thanks for the pointer! - Original Message - From: "M

Re: [racket] Scribbling LaTeX tables with lines

2012-07-05 Thread J. Ian Johnson
My env function can handle that. More specifically, my style-matrix macro could easily be extended to allow vertical bar separators. https://github.com/ianj/scribble-latex-utils -Ian - Original Message - From: Kathi Fisler To: users@racket-lang.org Sent: Thu, 5 Jul 2012 21:10:23 -0400 (ED

[racket] Scribbling LaTeX tables with lines

2012-07-05 Thread Kathi Fisler
I'm trying to create a simple LaTeX table with lines between the columns/rows from Scribble source. The last posts I find on this date back a couple of years (when this wasn't directly supported). Is it supported yet? If not, does anyone have LaTeX macros for this that I could use as a starting

Re: [racket] state of math expressions in Scribble?

2012-07-05 Thread Jens Axel Søgaard
2012/7/5 Prabhakar Ragde : > Jens Axel wrote: >> Prabhalar Ragde's code from >> >> http://con.racket-lang.org/pr-slides.pdf >> >> works quite well. Code ready to use in: >> >> https://github.com/soegaard/bracket/blob/master/docs/pr-math.rkt > > Thanks for making this more accessible, Jens Axel. One

Re: [racket] state of math expressions in Scribble?

2012-07-05 Thread Prabhakar Ragde
Jens Axel wrote: Prabhalar Ragde's code from http://con.racket-lang.org/pr-slides.pdf works quite well. Code ready to use in: https://github.com/soegaard/bracket/blob/master/docs/pr-math.rkt Thanks for making this more accessible, Jens Axel. One caveat is that the MathJax approach only wor

Re: [racket] Redefinition of initial bindings/ Resessive genes in GP

2012-07-05 Thread Danny Yoo
> The offspring is basically a module source code. Due to GP's crossover and > mutation functions, the offsprings source code can suggest function > redefinitions in (atleast) two ways. For example You might consider a customized module language that's more amendable to the kinds of code mutations

Re: [racket] what's the best way to make auxilery functions here.

2012-07-05 Thread Matthias Felleisen
A good piece of code is like a love song you write for your girl friend. If it isn't good enough for her, don't serenade to her. It won't work. If your code isn't good enough to read for Racketeers (as in visual appearances) don't present it to the list. So first, here is how you would write

Re: [racket] state of math expressions in Scribble?

2012-07-05 Thread Jens Axel Søgaard
Prabhalar Ragde's code from http://con.racket-lang.org/pr-slides.pdf works quite well. Code ready to use in: https://github.com/soegaard/bracket/blob/master/docs/pr-math.rkt /Jens Axel 2012/7/5 Danny Yoo > > Hi everyone, > > I just wanted to check on what the current state-of-the-art is wit

Re: [racket] arrangements exercise

2012-07-05 Thread Matthias Felleisen
Sean, 1. I have re-arranged your program so that it becomes readable: -- the function that explains it all comes first -- if you need a helper function, it is placed below -- don't place functions at top that are called by functions further down (roughly) -- make sure lines are at mo

Re: [racket] state of math expressions in Scribble?

2012-07-05 Thread J. Ian Johnson
Not that I know of, nor do I have confidence that an /adequate/ solution will ever make its way to Scribble. I like to be pleasantly surprised though. There are TeX to MathML converters out there, so a quick hack would be to write a math-mode macro that conditionally renders your bare LaTeX as i

Re: [racket] again: timeouts and exceptions

2012-07-05 Thread Kieron Hardy
Matthias' comments led me to a couple of articles at Matt Might's site that have helped me greatly in understanding continuations and escape continuations. (I also experienced several functional programming "aha moments" and improved my understanding of exceptions to boot.) http://matt.might.net/a

[racket] state of math expressions in Scribble?

2012-07-05 Thread Danny Yoo
Hi everyone, I just wanted to check on what the current state-of-the-art is with regards to writing math expressions in Scribble. One of the projects I'm working on deals quite a bit with algebra: we would like to write expressions such as the line distance formula in our scribble documents. We'

Re: [racket] again: timeouts and exceptions

2012-07-05 Thread Matthias Felleisen
1. I don't know where this prose is but it reads rather confusing. 2. If I were you, I'd use an escape continuation rather than an exception handler here. What you seem to want is flow of control, and let/ec is the right tool then. On Jul 5, 2012, at 9:42 AM, Rüdiger Asche wrote: > Hi t

[racket] what's the best way to make auxilery functions here.

2012-07-05 Thread Roelof Wobben
Hello, I have this function : ; Vzoo -> Vzoo ; function which alters the happiness and x-coordinate based on the ticks of the computer. (check-expect (tock (make-VZoo (make-VCat 500 5 "rechts") (make-VCham 450 5 "rechts"))) (make-VZoo (make-VCat 503 4.9 "rechts")(make-VCham 453 4.9 "rechts"))

Re: [racket] arrangements exercise

2012-07-05 Thread Sean Kemplay
On Mon, Jul 2, 2012 at 1:51 AM, Dave Yrueta wrote: > I should have been more explicit: "ensuring the function design conforms to > its contract" means testing it in the manner demonstrated by Matthias. > "Check-expect" is your friend :). > On Jul 1, 2012, at 4:12 PM, Matthias Felleisen wrote: >

[racket] again: timeouts and exceptions

2012-07-05 Thread Rüdiger Asche
Hi there, a few of you recommended to implement timeouting reads via sync/timeout. That works neat, but it would be even nicer to combine this w/ exception handling, like so: ... ((readbytetimeout) (lambda (port) (if (sync/timeout READTIMEOUT inport) (read-by