Re: [racket] Suggestion for saving preferences

2011-04-04 Thread Neil Van Dyke
Eduardo Bellani wrote at 04/04/2011 11:49 PM: * Create some functions like algorithm->list list->algorithm. The only drawback I see is that I will have to create variations for each struct. A few options... Instead of a procedure like "algorithm->list" for each struct, what about defining

[racket] Suggestion for saving preferences

2011-04-04 Thread Eduardo Bellani
Hello list. I am trying to figure out a way to save the state of an app and I am having trouble trying to come up with a decent solution, so I figure that is wise to ask wiser people :) The state of the app is given by several different structs such as this one: ;; algorithm contains : ;; a na

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Robby Findler
On Mon, Apr 4, 2011 at 6:25 PM, Eli Barzilay wrote: > Four hours ago, Robby Findler wrote: >> >> It looks like a great macro essay for a certain crowd (altho the >> essay seems to insult that selfsame crowd; perhaps you are assuming >> that that crowd is into S&M?). > > Where's the insult?  (I did

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Eli Barzilay
Four hours ago, Robby Findler wrote: > > It looks like a great macro essay for a certain crowd (altho the > essay seems to insult that selfsame crowd; perhaps you are assuming > that that crowd is into S&M?). Where's the insult? (I didn't mean any insult -- the only thing I can think of is the "

Re: [racket] slatex and conference papers

2011-04-04 Thread Carl Eastlund
I've had trouble with that process, due to different systems' handling of "dot-files". The most reliable way is to paste the contents of each .Z file in place of the slatex code that generates them. Also remember to include slatex.sty with your submission. Carl Eastlund On Mon, Apr 4, 2011 at 5

Re: [racket] slatex and conference papers

2011-04-04 Thread Jay McCarthy
Just run slatex on your end. It will produce a whole bunch of .Z*tex files that you can send to the other side along with the slatex latex package (in your directory.) Jay 2011/4/4 Neil Toronto : > I've just had a paper that uses slatex accepted for publication at a > Springer conference. The pro

[racket] slatex and conference papers

2011-04-04 Thread Neil Toronto
I've just had a paper that uses slatex accepted for publication at a Springer conference. The proceedings won't be put together using our camera-ready PDFs, but from the sources. How can I package the sources so that everything compiles neatly on a system that doesn't have slatex? Neil

Re: [racket] Scribble: Different output for LaTeX and HTML backends

2011-04-04 Thread Matthew Flatt
Maybe too late for your purposes, but... At Tue, 7 Dec 2010 16:27:42 +0100, Jens Axel Søgaard wrote: > I have a YouTube video, that I'd like to embed in the HTML output using the > following code: > > type="text/html" width="480" height="390" > src="http://www.youtube.com/embed/J3WIPS3Uh_A?rel=0

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Robby Findler
On Mon, Apr 4, 2011 at 1:27 PM, Eli Barzilay wrote: > 6 hours ago, Sam Tobin-Hochstadt wrote: >> >> Eli wrote an excellent introduction to Racket macros on >> comp.lang.scheme recently, which I've encouraged him to post on the >> Racket blog. > > I'm not sure how "excellent" it is, but I posted it

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Eli Barzilay
6 hours ago, Sam Tobin-Hochstadt wrote: > > Eli wrote an excellent introduction to Racket macros on > comp.lang.scheme recently, which I've encouraged him to post on the > Racket blog. I'm not sure how "excellent" it is, but I posted it now. Please let me know if you see any obvious problems. (

Re: [racket] Typeof

2011-04-04 Thread Matthias Felleisen
Use classes. On Apr 4, 2011, at 1:03 PM, Nadeem Abdul Hamid wrote: > Store the functions go-1, go-2, etc. in whatever is produced by "e"? > Such that you can do: > > ((func-of e) s) > > --- nadeem > > > 2011/4/4 José Lopes : >> I have a function which, at the moment, is performing manual

Re: [racket] Typeof

2011-04-04 Thread Nadeem Abdul Hamid
Store the functions go-1, go-2, etc. in whatever is produced by "e"? Such that you can do: ((func-of e) s) --- nadeem 2011/4/4 José Lopes : > I have a function which, at the moment, is performing manual dispatch: > > (cond ((something1? e) (go-1 s)) >        ((something2? e) (go-2 s

Re: [racket] Typeof

2011-04-04 Thread José Lopes
I have a function which, at the moment, is performing manual dispatch: (cond ((something1? e) (go-1 s)) ((something2? e) (go-2 s)) (...)) Do you have any suggestions on how to avoid this manual dispatch? José Lopes On 04-04-2011 16:29, Shriram Krishnamurthi wrote:

Re: [racket] Typeof

2011-04-04 Thread Shriram Krishnamurthi
Approximate our reconstruct? -- Pardon terseness and mistakes -- sent from phone. On Apr 4, 2011 11:24 AM, "Matthias Felleisen" wrote: > > Types are compile-time entities. They don't exist at run-time, so you can't query them at run-time. > > If you mean the type-tags of objects, we don't provide

Re: [racket] Typeof

2011-04-04 Thread Matthias Felleisen
Types are compile-time entities. They don't exist at run-time, so you can't query them at run-time. If you mean the type-tags of objects, we don't provide direct access. You can approximate it ... -- Matthias On Apr 4, 2011, at 11:18 AM, José Lopes wrote: > Hello, > > How do I query

[racket] Typeof

2011-04-04 Thread José Lopes
Hello, How do I query the type of an expression? Regards, José Lopes -- José António Branquinho de Oliveira Lopes 58612 - MEIC-A jose.lo...@ist.utl.pt _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] Solumns: evil version of columns

2011-04-04 Thread Matthias Felleisen
On Apr 4, 2011, at 10:50 AM, Noel Welsh wrote: > - provide/contract can be faster than define/contract for recursion functions This shouldn't be the case. If you have examples, report them as bugs. _ For list-related administrative tasks: htt

Re: [racket] Out of memory

2011-04-04 Thread Matthias Felleisen
On Apr 4, 2011, at 10:10 AM, Pierpaolo Bernardi wrote: > On Mon, Apr 4, 2011 at 16:04, Pierpaolo Bernardi wrote: > >> The function looks fine to me. So, what is the problem? > > I mean, fine as it shouldn't run out of memory. > I am aware that the function is not testing what I wanted to test,

Re: [racket] Solumns: evil version of columns

2011-04-04 Thread Noel Welsh
Interesting program. You blog that it is too slow, so I took a look at your code. I expect you could speed it up substantially with a few changes to the data structures and so on. Some hints: - Classes are going to be slower than functions and structures - Use fxvector for a vector of integers a

[racket] [LinkedIn] Racket is now an open group

2011-04-04 Thread Tom Schouten
LinkedIn Groups * Group: Racket * Subject: Racket is now an open group All future discussions will be fully visible, searchable, and shareable on the Web. All past discussions are now closed in a members-only archive. Posted By Tom Schouten View or add comments »

Re: [racket] Out of memory

2011-04-04 Thread Pierpaolo Bernardi
On Mon, Apr 4, 2011 at 16:04, Pierpaolo Bernardi wrote: > The function looks fine to me. So, what is the problem? I mean, fine as it shouldn't run out of memory. I am aware that the function is not testing what I wanted to test, but that's not the point :) Cheers P.

Re: [racket] Out of memory

2011-04-04 Thread Jos Koot
I think you have to increase the memory limit. With limit 128 Mb Racketb consequently runs out of memory on my system. The program runs well with limit 256 Mb. Jos > -Original Message- > From: users-boun...@racket-lang.org > [mailto:users-boun...@racket-lang.org] On Behalf Of Pierpaolo Be

Re: [racket] Out of memory

2011-04-04 Thread Pierpaolo Bernardi
On Mon, Apr 4, 2011 at 16:19, Jos Koot wrote: > I think you have to increase the memory limit. With limit 128 Mb Racketb > consequently runs out of memory on my system. > The program runs well with limit 256 Mb. Yes, I know this. But this function should not consume memory in the loop. I forgot

[racket] Out of memory

2011-04-04 Thread Pierpaolo Bernardi
Hello, in this racket: Welcome to DrRacket, version 5.1.0.4--2011-03-26(fe75ed9/a) [3m]. Language: racket [custom]; memory limit: 128 MB. (windows XP) this program: #lang racket (define (test n exp) (let ((v (make-vector n))) (for ((i (in-range n))) (vector-set! v i (expt (random)

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Sam Tobin-Hochstadt
On Mon, Apr 4, 2011 at 8:13 AM, Matthias Felleisen wrote: > > On Apr 4, 2011, at 5:45 AM, Archie Maskill wrote: > > On Wed, Mar 30, 2011 at 11:29 AM, John Sampson wrote: >> >> Do you think these give a better explanation of macros? On the whole, I >> have found Teach Yourself Scheme >> relatively

Re: [racket] scribble secref does not render consistently between HTML and PDF

2011-04-04 Thread Matthew Flatt
I'm inclined to call this a documentation bug, both because the docs for `secref' are partly specific to HTML and because there's no documentation of the Latex commands to redefine to control the generated section reference. For Latex/PDF output, the section title is currently only included for th

Re: [racket] scribble secref does not render consistently between HTML and PDF

2011-04-04 Thread Matthias Felleisen
Since PDF is intended for the world of printed papers, the rendering process follows the grammatical rules of the printed media. Those dictate that sections, chapters, etc. are referred to via numbers. Why those conventions developed the way they did is beyond the scope of this email but we try

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Matthias Felleisen
On Apr 4, 2011, at 5:45 AM, Archie Maskill wrote: > On Wed, Mar 30, 2011 at 11:29 AM, John Sampson wrote: > Do you think these give a better explanation of macros? On the whole, I have > found Teach Yourself Scheme > relatively easy to follow. > > Regards > > _John Sampson_ > > I was learnin

[racket] scribble secref does not render consistently between HTML and PDF

2011-04-04 Thread Tim Brown
I'm writing some general documentation with scribble and have, so far, been generating HTML output. I'm now moving to PDF/Latex output, and the @secref calls are not being rendered consistently between my output formats. In --html, --htmls and --text rendering modes, secref renders the title of th

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Archie Maskill
On Wed, Mar 30, 2011 at 11:29 AM, John Sampson wrote: > Do you think these give a better explanation of macros? On the whole, I > have found Teach Yourself Scheme > relatively easy to follow. > > Regards > > _John Sampson_ I was learning how to use scheme macros recently, and I found this docum

[racket] Modifying source code, keeping comments and formatting intact

2011-04-04 Thread Jukka Tuominen
Hi, I seem to be coming back to this problem repeatedly. I need to modify source code by code so that the outcome is the modified source code with the original formatting and comments. For example... BEFORE: ";; comment1 (list 'a ;comment2 'b ;comment3 mentions 'a )" >> (a b) ~TWE