Re: [racket] code to HTML

2011-03-18 Thread Neil Van Dyke
Oh, if you're going to do the simple syntax colorer, you can also do it in JavaScript, in the browser. There are existing JS scripts for doing this for various languages. I would prefer the result of using Scribble. Neil Van Dyke wrote at 03/18/2011 05:21 PM: If you want to see the code in a

Re: [racket] data mining business information on web sites w/Racket

2011-03-18 Thread Neil Van Dyke
Oh yeah, I forgot to mention backing off and such. When I first did Web crawling of particular sites around 10 years ago with PLT Scheme, I had to schedule my visits with delays so as not to abuse the site. There was a random component to the scheduling, too. Note that an off-the-shelf tool

Re: [racket] code to HTML

2011-03-18 Thread Neil Van Dyke
If you want to see the code in a Web browser window (not even use DrRacket as a helper program launched from the browser for a Racket MIME type), then I like Robby's suggestion of how to use Scribble. You might have to see whether the parts of Scribble you need are fast enough to format on-the

Re: [racket] data mining business information on web sites w/Racket

2011-03-18 Thread Noel Welsh
It should be fine. Hundreds of sites is not really that many. You just need to have backoffs etc. to avoid getting blacklisted. Using sync and friends would make implementing this easy. If you want to extract unstructured data, there is some good reading here: http://metaoptimize.com/qa/questio

Re: [racket] data mining business information on web sites w/Racket

2011-03-18 Thread Neil Van Dyke
Scraping information off of Web pages was the first thing I ever did with Racket (then called PLT Scheme). It worked great. Racket is up to most tasks in this general category that I can imagine. Also, Racket's support for minilanguages and rapid programming in general make it especially prod

Re: [racket] code to HTML

2011-03-18 Thread Todd O'Bryan
Having the code web accessible means that I can do more interesting things, like putting two examples side by side for comparison, have a web form for grading, etc., more easily than I could if I just stuck with DrRacket. I could also write code to do a quick syntactic analysis on code and present

Re: [racket] code to HTML

2011-03-18 Thread Todd O'Bryan
Anybody have any idea where I should look for that? On Fri, Mar 18, 2011 at 4:18 PM, Jens Axel wrote: > Well, I modified some code Anton wrote. And I think he in turn used code from > Sitaram. But that aside, I am not sure where in SVN the code lives now. > > -- > Jens Axel Søgaard > > > Den 18/

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Miguel Villaverde
I just found out that this doesn't work for Italian keyboard layouts (http://en.wikipedia.org/wiki/Keyboard_layout#Italian). Sorry about the bad info. :( -Mensaje original- De: Miguel Villaverde [mailto:mvillave...@gmail.com] Enviado el: viernes, 18 de marzo de 2011 20:43 Para: 'Pierpao

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Miguel Villaverde
Alternatively, you could try the combination AltGr+4, followed by the next character after the tilde (as if you were typing an accentuated vowel). This works on my Spanish keyboard, where tildes are a nuisance too. I haven't tried on an Italian layout, but I'm guessing it should work. -Mens

Re: [racket] code to HTML

2011-03-18 Thread Robby Findler
Isn't that some code you wrote?! Robby On Fri, Mar 18, 2011 at 2:28 PM, Jens Axel Søgaard wrote: > 2011/3/18 Todd O'Bryan : >> Given that Scribble does it, I imagine that there's a way to convert a >> .rkt file into something that would look similar in a web browser. > > PLaneT displays the sour

[racket] data mining business information on web sites w/Racket

2011-03-18 Thread Geoffrey S. Knauth
I'm evaluating whether to use Racket to data mine hundreds of websites pulling out business information within an industry. I think Racket is up to it, but I'm wondering if anyone else has had experiences positive or negative. I've used other tools to do rudimentary digging, but this project i

Re: [racket] code to HTML

2011-03-18 Thread Jens Axel Søgaard
2011/3/18 Todd O'Bryan : > Given that Scribble does it, I imagine that there's a way to convert a > .rkt file into something that would look similar in a web browser. PLaneT displays the source as HTML like this: http://planet.racket-lang.org/package-source/soegaard/math.plt/1/4/number-theory.ss

Re: [racket] code to HTML

2011-03-18 Thread Robby Findler
Not to be too ludditian, but why not just pull it up in drracket in class? If not, I guess you could put together a script that stuck (racketblock ...) around everything or the module-enhanced variant, which makes it into a scribble file and then run scribble --html on that. Robby On Fri, Mar 18

[racket] code to HTML

2011-03-18 Thread Todd O'Bryan
Given that Scribble does it, I imagine that there's a way to convert a .rkt file into something that would look similar in a web browser. Is there a (not-too-complicated) way to convert a file in WXME format into something I could inline in an HTML document so that it would look reasonable. Related

[racket] Binary distribution

2011-03-18 Thread José Lopes
Hello, I have made some modifications to the source code of racket and compiled it. Now, I want to give the modified binary application to another person. How do I make a binary distribution? Regards, José -- José António Branquinho de Oliveira Lopes 58612 - MEIC-A jose.lo...@ist.utl.pt _

Re: [racket] racket and OS threads

2011-03-18 Thread Jukka Tuominen
OK, I see. I actually have some custodian thingies used in the child thread, but having genetic-programming incubation going on overnight, the whole VM is usually jammed. That's why I thought an extra, heavy-duty sandbox might "fix" the situation. Of course, I could just learn use custodians

Re: [racket] racket and OS threads

2011-03-18 Thread Matthew Flatt
Oh, you need to create a custodian, make it the current custodian when creating the thread (with `parameterize' and `current-custodian'), and then shut down with `custodian-shutdown-all' instead of `kill-thread'. At Fri, 18 Mar 2011 15:17:30 +0200, "Jukka Tuominen" wrote: > > I tried first the or

Re: [racket] racket and OS threads

2011-03-18 Thread Jukka Tuominen
I tried first the original "system" procedure having (current-subprocess-custodian-mode 'kill) mode applied. But that didn't have any effect on kill-thread, and for subprocess-kill I should know the subprocess id, I guess? What am I missing here...? br, jukka > -Original Message-

Re: [racket] racket and OS threads

2011-03-18 Thread Matthew Flatt
At Fri, 18 Mar 2011 14:57:34 +0200, "Jukka Tuominen" wrote: > now the problem moved to converting the simple "system" procedure to > not-so-simple "subprocess" procedure. To use `current-subprocess-custodian-mode'? The parameter applies to `system', too. _

Re: [racket] racket and OS threads

2011-03-18 Thread Jukka Tuominen
Thanks Matthew, now the problem moved to converting the simple "system" procedure to not-so-simple "subprocess" procedure. My poor little non-programmer brain overloaded after seeing the following :) --- (subprocess stdout stdin stderr

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Pierpaolo Bernardi
On Fri, Mar 18, 2011 at 13:37, Robby Findler wrote: > How about this? Make a file somewhere, put the code below in it and > then use edit|keybindings|add user-defined keybindings... and point to > the file. > > You will probably have to change the "c:c;c:t" to something that isn't > used on your k

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Robby Findler
How about this? Make a file somewhere, put the code below in it and then use edit|keybindings|add user-defined keybindings... and point to the file. You will probably have to change the "c:c;c:t" to something that isn't used on your keyboard; that one is reasonable on a mac (where I'm working this

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Pierpaolo Bernardi
On Fri, Mar 18, 2011 at 13:27, Casey Klein wrote: > On Fri, Mar 18, 2011 at 7:11 AM, Robby Findler > wrote: >> On Fri, Mar 18, 2011 at 6:46 AM, Pierpaolo Bernardi >> wrote: >>> Could \tilde be added to the list of keyboard macros recognized by M-\ ? >> >> It is called \sim. >> > > But \sim + M-

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Robby Findler
On Fri, Mar 18, 2011 at 7:27 AM, Casey Klein wrote: > On Fri, Mar 18, 2011 at 7:11 AM, Robby Findler > wrote: >> On Fri, Mar 18, 2011 at 6:46 AM, Pierpaolo Bernardi >> wrote: >>> Could \tilde be added to the list of keyboard macros recognized by M-\ ? >> >> It is called \sim. >> > > But \sim +

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Casey Klein
On Fri, Mar 18, 2011 at 7:11 AM, Robby Findler wrote: > On Fri, Mar 18, 2011 at 6:46 AM, Pierpaolo Bernardi > wrote: >> Could \tilde be added to the list of keyboard macros recognized by M-\ ? > > It is called \sim. > But \sim + M-\ does not produce the same character that ~ produces on my keyb

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Robby Findler
On Fri, Mar 18, 2011 at 7:22 AM, Pierpaolo Bernardi wrote: > On Fri, Mar 18, 2011 at 13:11, Robby Findler > wrote: >> On Fri, Mar 18, 2011 at 6:46 AM, Pierpaolo Bernardi >> wrote: >>> Could \tilde be added to the list of keyboard macros recognized by M-\ ? >> >> It is called \sim. > > Oops.  Th

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Pierpaolo Bernardi
On Fri, Mar 18, 2011 at 13:11, Robby Findler wrote: > On Fri, Mar 18, 2011 at 6:46 AM, Pierpaolo Bernardi > wrote: >> Could \tilde be added to the list of keyboard macros recognized by M-\ ? > > It is called \sim. Oops. Thanks. _ For list-relat

Re: [racket] Keyboard input in DrRacket

2011-03-18 Thread Robby Findler
On Fri, Mar 18, 2011 at 6:46 AM, Pierpaolo Bernardi wrote: > Could \tilde be added to the list of keyboard macros recognized by M-\ ? It is called \sim. Not sure about the other keyboard related stuff, tho. Robby _ For list-related administrativ

Re: [racket] racket and OS threads

2011-03-18 Thread Matthew Flatt
At Fri, 18 Mar 2011 13:40:02 +0200, "Jukka Tuominen" wrote: > (define loop > (lambda () >(set! thread:child (thread (lambda () (system "gracket -f > \""...rlt\"" >(sleep 30) >(kill-thread thread:child) >(loop))) > > > But, eventhough the racket process ends a

[racket] Keyboard input in DrRacket

2011-03-18 Thread Pierpaolo Bernardi
Hello, in italian keyboards the character ~ is missing, and, on windows, the usual way of entering it (Alt-126) does not work in DrRacket. Could \tilde be added to the list of keyboard macros recognized by M-\ ? Alternatively, is there a way to enter ~ in DrRacket that I have missed? (other than

[racket] racket and OS threads

2011-03-18 Thread Jukka Tuominen
Hi, I'm trying to build a sandbox (in Linux) so that a custodian process creates a child gracket&OS thread. If the child thread should misbehave, the custodian process ends it and starts a new child thread. Below is a simplified version of what I have tried (define thread:child 0) (define loop