Re: [racket] Regexp-match question: ? means what, or .*? means what...

2013-05-08 Thread JP Verkamp
> > ;This I understand: > ;To return pattern and everything to left of first instance of pattern, > use: [^]* ;where ^ means 'not'; example: > (car (regexp-match* #rx"[^/]*/" "12/4/6")) ; => "12/" > A caveat for this. in the first instance isn't quite right. [...] defines a single character. [abc

[racket] Regexp-match question: ? means what, or .*? means what...

2013-05-08 Thread Don Green
Regexp-match question: ? means what, or .*? means what... ;This I understand: ;To return pattern and everything to left of first instance of pattern, use: [^]* ;where ^ means 'not'; example: (car (regexp-match* #rx"[^/]*/" "12/4/6")) ; => "12/" ;This I do not understand: ;To return pattern and ev

Re: [racket] how to use ``smtp-send-message''?

2013-05-08 Thread John Gateley
The original code used port 587. This is for SSL/TLS encrypted communication. Try the same port as Matthias: 465. j On 5/8/2013 8:05 PM, Matthias Felleisen wrote: I have used the script below to send email to my students via gmail: #! /bin/sh #| exec racket -t "$0" ${1+"$@"} |# #lang racke

Re: [racket] how to use ``smtp-send-message''?

2013-05-08 Thread Matthias Felleisen
I have used the script below to send email to my students via gmail: #! /bin/sh #| exec racket -t "$0" ${1+"$@"} |# #lang racket ;; - ;; send graded solutions located in _directory_ and label them _subject_ (define d

[racket] how to use ``smtp-send-message''?

2013-05-08 Thread Kejia柯嘉
hello all, i am trying to use ``smtp-send-message" to send emails via gmail. my code is following: `` #! /usr/local/bin/racket #lang racket (require net/head net/smtp) (smtp-send-message "smtp.gmail.com" "w1 " '("w2 ") (standard-message-header "w1 " '("w2 ") '() ; CC '() ; BCC "Su

Re: [racket] Racket v5.3.4

2013-05-08 Thread John Gateley
On 5/8/2013 11:46 AM, Eli Barzilay wrote: Racket version 5.3.4 is now available from http://racket-lang.org/ One thing I have noticed with this and other versions of Racket: the downloader website chooses Windows 32 bit for me, even though my platform is Windows 64 bit. Small minor detail

Re: [racket] Racket v5.3.4

2013-05-08 Thread Joe Gilray
Thanks Eli. The installation "feels" faster, but I have seen a couple of random "not responding"s so far on a W7/32bit OS. Tonight I will try out W7/64bit and OSX. -joe On Wed, May 8, 2013 at 9:46 AM, Eli Barzilay wrote: > Racket version 5.3.4 is now available from > > http://racket-lang.o

Re: [racket] order-of-magnitude (was ~r: formatting 0.0 with 'exponential and #:precision)

2013-05-08 Thread Jos Koot
I have speeded up the procedure a little bit by avoiding to recompute the inverse of the logarithm of the base each time the procedure is called. Please let me know whether or not you want the new version. In that case I'll send you the new version. Jos > -Original Message- > From: Jos Ko

Re: [racket] missing documentation for racket-5.3.4

2013-05-08 Thread Juan Francisco Cantero Hurtado
On 05/08/13 21:39, Neil Van Dyke wrote: I had a similar problem this morning when installing from the pre-release source, but figured it was probably my fault and didn't have time to investigate. (Sorry, I didn't know the release was going to be today, or I would've emailed.) Neil V. I've t

Re: [racket] 5.3.4 on windows .. minor gripe

2013-05-08 Thread Eli Barzilay
40 minutes ago, Tim Brown wrote: > I've just installed 5.3.4 for windows 64 bit. I've ended up with a > GRacket icon in my start menu, whereas I'd rather expect a DrRacket. I think that Windows 7 uses some obscure guess about programs that it shows you in the menu's toplevel, but I have no idea ho

Re: [racket] order-of-magnitude (was ~r: formatting 0.0 with 'exponential and #:precision)

2013-05-08 Thread Jos Koot
Attached an order-of-magnitude with optional base argument. May be you want to replace the current version that I wrote about one or two years ago. IIRC Matthew Flatt included it in the math. File order-of-magnitude.rkt includes a commented out test. Jos > -Original Message- > From: R

[racket] 5.3.4 on windows .. minor gripe

2013-05-08 Thread Tim Brown
Folks, I've just installed 5.3.4 for windows 64 bit. I've ended up with a GRacket icon in my start menu, whereas I'd rather expect a DrRacket. DrRacket is installed and running lovely from the "Programs" menu. But it's at least one (if not two) more clicks away! Tim -- | Tim Brown | M:+44(0)7

Re: [racket] missing documentation for racket-5.3.4

2013-05-08 Thread Neil Van Dyke
I had a similar problem this morning when installing from the pre-release source, but figured it was probably my fault and didn't have time to investigate. (Sorry, I didn't know the release was going to be today, or I would've emailed.) Neil V. Racket Users list: http:

[racket] missing documentation for racket-5.3.4

2013-05-08 Thread Axel
Hello! First thanks for this great programming environment. I just downloaded and compiled racket-5.3.4. The programm drracket started as usual and worked fine. But as I tried to open the documentation via the help-button my browser announced file file:///home/axel/racket-5.3.4/share/doc/racket

Re: [racket] Regexp question: Pattern that can match everything to left of first pattern?

2013-05-08 Thread John Clements
On May 8, 2013, at 11:54 AM, Eli Barzilay wrote: > An hour ago, John Clements wrote: >> >> The traditional way to do this would be to match a sequence of >> non-x's followed by an x, like this: >> >> #lang racket >> >> (regexp-match #rx"[^x]*x" "12x4x6") ; => '("12x") >> >> Things get a bit m

Re: [racket] [racket-dev] [ANN] RacketCon 2013: 29 September

2013-05-08 Thread Doug Williams
Sorry I missed last year's RacketCon. It was held on the same weekend we had all the kids (and now grandkids) here in Denver for a long weekend. It also coincided with the American Beer Festival held in Denver, which is probably why the kids - especially our son and son-in-laws - wanted the reunion

Re: [racket] Regexp question: Pattern that can match everything to left of first pattern?

2013-05-08 Thread Eli Barzilay
An hour ago, John Clements wrote: > > The traditional way to do this would be to match a sequence of > non-x's followed by an x, like this: > > #lang racket > > (regexp-match #rx"[^x]*x" "12x4x6") ; => '("12x") > > Things get a bit more interesting if you put a more complex pattern > in place o

Re: [racket] typed racket slow?

2013-05-08 Thread Manfred Lotz
On Wed, 8 May 2013 13:55:28 -0400 Eli Barzilay wrote: > Three hours ago, Ray Racine wrote: > > On a tangent, if you run your Racket on Linux (like anyone would use > > anything else :0 ) you can "install" *.rkt files as executables with > > binfmt. > > [...] > > Better odds Eli has something done

[racket] A language mode for SQL

2013-05-08 Thread Sean McBeth
Is there a language mode for Racket, or perhaps a 3rd party library, that can do basic syntax checking for ANSI SQL? I hate writing a query, starting the app, getting through the UI to the point I'm working on, executing a command, and only THEN learning I have a syntax error from accidentally typi

Re: [racket] Regexp question: Pattern that can match everything to left of first pattern?

2013-05-08 Thread Norman Gray
Don, hello. On 2013 May 8, at 18:25, Don Green wrote: > (regexp-match #rx"___" "12x4x6") ; => '("12x") ;returns everything to left > of first pattern x Orthogonally to John's answer (which is all about matching the thing you want), you can aim to match the pattern you want to terminate the th

[racket] Fwd: [Racket announcement] [ANN] RacketCon 2013: 29 September

2013-05-08 Thread Matthias Felleisen
RacketCon is listed as co-event for "Lisp in Summer." Begin forwarded message: > From: Asumu Takikawa > Subject: [Racket announcement] [ANN] RacketCon 2013: 29 September > Date: May 8, 2013 12:10:28 PM EDT > To: Racket Announce > > RacketCon 2013 > -- > > We are please

Re: [racket] typed racket slow?

2013-05-08 Thread Eli Barzilay
Three hours ago, Ray Racine wrote: > On a tangent, if you run your Racket on Linux (like anyone would use > anything else :0 ) you can "install" *.rkt files as executables with > binfmt. > [...] > Better odds Eli has something done along these lines polished to > perfection. : ) I played with it i

Re: [racket] Regexp question: Pattern that can match everything to left of first pattern?

2013-05-08 Thread John Clements
On May 8, 2013, at 10:25 AM, Don Green wrote: > Regexp question: Is there a pattern that can match everything to left of > first pattern? > > (regexp-match #rx"x.*" "12x4x6") ; => '("x4x6") ;returns everything to right > of first pattern x > > (regexp-match #rx"___" "12x4x6") ; => '("12x") ;r

Re: [racket] typed racket slow?

2013-05-08 Thread Ray Racine
Nothing wrong at all. binfmt is both a more complex and a more powerful approach. It could be set up files where one cannot place a hashbang such as zo files or and often is for jar files. While I haven't tried this, imagine you have several cloud servers and wish to "promote" Racket applicatio

[racket] Regexp question: Pattern that can match everything to left of first pattern?

2013-05-08 Thread Don Green
Regexp question: Is there a pattern that can match everything to left of first pattern? (regexp-match #rx"x.*" "12x4x6") ; => '("x4x6") ;returns everything to right of first pattern x (regexp-match #rx"___" "12x4x6") ; => '("12x") ;returns everything to left of first pattern x Thanks. Don Gr

Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision

2013-05-08 Thread Ryan Culpepper
Thanks for the report! I've taken your suggestion for ~r's order-of-magnitude estimate. (I didn't change the version in racket/math, though, but it seems like a reasonable idea to me.) Ryan On 05/08/2013 03:21 AM, Jos Koot wrote: I came across another thing: #lang racket (define x #e100.e-5

Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision

2013-05-08 Thread Ryan Culpepper
On 05/07/2013 01:12 PM, Dmitry Pavlov wrote: Hello, I just came across the following oddness with formatting of real numbers: > (~r 1.0 #:notation 'exponential #:precision '(= 4)) "1.e+00" OK > (~r 0.0 #:notation 'exponential #:precision '(= 4)) "0.e+04" ??? Is there a rational expla

Re: [racket] typed racket slow?

2013-05-08 Thread Juan Francisco Cantero Hurtado
On 05/08/13 16:27, Ray Racine wrote: On a tangent, if you run your Racket on Linux (like anyone would use anything else :0 ) you can "install" *.rkt files as executables with binfmt. Very Short (no validation) Path 1) Create a shell script runracket.rkt in your racket installation bin. i.e. /us

Re: [racket] typed racket slow?

2013-05-08 Thread Manfred Lotz
On Wed, 8 May 2013 10:27:09 -0400 Ray Racine wrote: > On a tangent, if you run your Racket on Linux (like anyone would use > anything else :0 ) you can "install" *.rkt files as executables with > binfmt. > > Very Short (no validation) Path > > 1) Create a shell script runracket.rkt in your rack

[racket] Racket v5.3.4

2013-05-08 Thread Eli Barzilay
Racket version 5.3.4 is now available from http://racket-lang.org/ * Extflonums (80-bit floating-point numbers) are supported on some x86/x86_64 platforms -- including Windows, and including platforms where Racket is compiled to use SSE instructions for flonum arithmetic. Thanks to Micha

[racket] Lisp in Summer

2013-05-08 Thread Matthias Felleisen
Everyone, please take a look at the Lisp in Summer project page: http://lispinsummerprojects.org/welcome The FAQ explicitly lists Racket, and it would be wonderful to see some Racket projects carried out under the Lisp in Summer umbrella. -- Matthias Racket Users

Re: [racket] typed racket slow?

2013-05-08 Thread Matthew Flatt
They're using a shared image of the Racket run-time system, but they have separate copies of the Racket-implemented libraries that are in bytecode form and embedded in each executable. The reason that `raco exe' produced slower results than `raco make' is that the generated executable did not supp

Re: [racket] Is there a symbol in regexp-match syntax, similar to the period but...

2013-05-08 Thread Laurent
I think you're looking for ".*": > (regexp-match "a.*e" "zaijklez") ("aijkle") See: docs.racket-lang.org/guide/regexp.html Laurent On Wed, May 8, 2013 at 6:06 PM, Don Green wrote: > Is there a symbol in regexp-match syntax, similar to the period but... a > representation for all the charact

Re: [racket] Is there a symbol in regexp-match syntax, similar to the period but...

2013-05-08 Thread Norman Gray
Don, hello. On 2013 May 8, at 17:06, Don Green wrote: > The ___ below represents the pattern and all the remaining characters in > the string to the right of the pattern 'x': > > (regexp-match #rx"x___" "12x4x6") ; => '("x4x6") > > > I realize I could place a period for each character I want

[racket] Is there a symbol in regexp-match syntax, similar to the period but...

2013-05-08 Thread Don Green
Is there a symbol in regexp-match syntax, similar to the period but... a representation for all the characters to one side of the pattern? For example, the period below represents the pattern and a single character to the right of the pattern 'x': (regexp-match #rx"x." "12x4x6") ; => '("x4") Th

[racket] [ANN] RacketCon 2013: 29 September

2013-05-08 Thread Asumu Takikawa
RacketCon 2013 -- We are pleased to announce that (third RacketCon) will take place on September 29, 2013 at Northeastern University in Boston. This year, we plan to bring in several speakers from industry, as well as host talks from Racket developers and users. Lunch will be provide

Re: [racket] typed racket slow?

2013-05-08 Thread Ray Racine
After a raco make r.rkt tr.rkt ray@rpr:~$ time racket r.rkt real0m0.036s user0m0.020s sys0m0.016s ray@rpr:~$ time racket tr.rkt real0m0.382s user0m0.352s sys0m0.028s ray@rpr:~$ On Wed, May 8, 2013 at 11:26 AM, Sam Tobin-Hochstadt wrote: > I have a fast SSD, so that mi

Re: [racket] typed racket slow?

2013-05-08 Thread Sam Tobin-Hochstadt
I have a fast SSD, so that might be the difference. Sam On Wed, May 8, 2013 at 11:05 AM, Ray Racine wrote: > Oddly > > ray@rpr:~$ time racket r.rkt > > real0m0.052s > user0m0.040s > sys0m0.012s > > ray@rpr:~$ time racket tr.rkt > > real0m0.958s > user0m0.876s > sys0m0.080

Re: [racket] typed racket slow?

2013-05-08 Thread Ray Racine
Oddly ray@rpr:~$ time racket r.rkt real0m0.052s user0m0.040s sys0m0.012s ray@rpr:~$ time racket tr.rkt real0m0.958s user0m0.876s sys0m0.080s On Wed, May 8, 2013 at 10:35 AM, Sam Tobin-Hochstadt wrote: > On Wed, May 8, 2013 at 6:19 AM, Carl Eastlund wrote: > > > > I

Re: [racket] typed racket slow?

2013-05-08 Thread Sam Tobin-Hochstadt
On Wed, May 8, 2013 at 6:19 AM, Carl Eastlund wrote: > > I see just under 5 seconds for test.rkt and just over 5 seconds for > utest.rkt. So there's a fraction of a second extra startup time for Typed > Racket, but it takes less time for each subsequent computation, so the > difference depends on

Re: [racket] typed racket slow?

2013-05-08 Thread Ray Racine
On a tangent, if you run your Racket on Linux (like anyone would use anything else :0 ) you can "install" *.rkt files as executables with binfmt. Very Short (no validation) Path 1) Create a shell script runracket.rkt in your racket installation bin. i.e. /usr/local/racket/bin/runracket #! /bin/sh

Re: [racket] typed racket slow?

2013-05-08 Thread Sean McBeth
Perhaps the EXEs take longer because they are not using a shared image of Racket, thus the OS must load code that is 99% equivalent from two different disk locations. On Wed, May 8, 2013 at 7:55 AM, Manfred Lotz wrote: > On Wed, 8 May 2013 07:31:37 -0400 > Carl Eastlund wrote: > > > On Wed, Ma

Re: [racket] [ANN] Geiser 0.4 released

2013-05-08 Thread Reuben Thomas
On 3 May 2013 22:49, Jose A. Ortega Ruiz wrote: > Of course, if anyone has the time and inclination to create an > independent package, whatever Geiser does would be done using it. > Making an independent package is as simple as adding a standard comment header sensible autoloads and then either

Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision

2013-05-08 Thread Jos Koot
Correct, my message has nothing to do with the initial problem. Jos > -Original Message- > From: Dmitry Pavlov [mailto:dpav...@ipa.nw.ru] > Sent: miércoles, 08 de mayo de 2013 12:11 > To: Jos Koot > Cc: users@racket-lang.org > Subject: Re: [racket] ~r: formatting 0.0 with 'exponential >

Re: [racket] typed racket slow?

2013-05-08 Thread Manfred Lotz
On Wed, 8 May 2013 07:31:37 -0400 Carl Eastlund wrote: > On Wed, May 8, 2013 at 7:04 AM, Manfred Lotz > wrote: > > > On Wed, 8 May 2013 06:19:27 -0400 > > Carl Eastlund wrote: > > > > > I'm seeing similar results on my end; I timed by first running > > > "raco make" on both files, then timing

Re: [racket] typed racket slow?

2013-05-08 Thread Carl Eastlund
On Wed, May 8, 2013 at 7:04 AM, Manfred Lotz wrote: > On Wed, 8 May 2013 06:19:27 -0400 > Carl Eastlund wrote: > > > I'm seeing similar results on my end; I timed by first running "raco > > make" on both files, then timing "racket" on both. I think what > > we're seeing is a small startup time

Re: [racket] typed racket slow?

2013-05-08 Thread Manfred Lotz
On Wed, 8 May 2013 06:19:27 -0400 Carl Eastlund wrote: > I'm seeing similar results on my end; I timed by first running "raco > make" on both files, then timing "racket" on both. I think what > we're seeing is a small startup time cost on Typed Racket. I ran a > longer benchmark and Typed Racke

Re: [racket] typed racket slow?

2013-05-08 Thread Carl Eastlund
I'm seeing similar results on my end; I timed by first running "raco make" on both files, then timing "racket" on both. I think what we're seeing is a small startup time cost on Typed Racket. I ran a longer benchmark and Typed Racket edges out untyped Racket if I run a few million iterations (giv

Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision

2013-05-08 Thread Dmitry Pavlov
Hi Jos, I have nothing sensible to say about line 340 and the fix you propose (probably it is right), but the initial problem with 0.0 originates not in line 340 but rather in lines 330-331 (if (zero? N-abs) (values 0 0 (if exactly? significand-precision 0)) or line 311 [exponent (- signif

[racket] typed racket slow?

2013-05-08 Thread Manfred Lotz
Hi there, I did a small test using typed racket. This is an example from the documentation: #lang typed/racket ;; test.rkt (struct: pt ([x : Float] [y : Float])) (: distance (pt pt -> Float)) (define (distance p1 p2) (sqrt (+ (sqr (- (pt-x p2) (pt-x p1))) (sqr (- (pt-y p2) (pt-y p

Re: [racket] ~r: formatting 0.0 with 'exponential and #:precision

2013-05-08 Thread Jos Koot
I came across another thing: #lang racket (define x #e100.e-5) (rational? x) ; #t (log x) ; -inf.0 (exact->inexact x); 0.0 (~r x #:notation 'exponential) ; error inexact->exact: no exact representation number: -inf.0 I think this is introduced in line 340 of racket/format.rkt which contain