Thanks, Jens, much appreciated. I suspect I even knew this once and had since
forgotten it.
(I even glanced at the docs, saw the two kinds, but didn’t pause long enough to
wonder if it mattered to me.)
--
You received this message because you are subscribed to the Google Groups
"Racket Users"
hi, just now I'm debugging a regular expression and trying to understand why
this:
> (regexp-match-positions #rx"[-+][0-9]+" "-0500")
'((0 . 5))
works as I expect, whereas this:
> (regexp-match-positions #rx"[-+][0-9]{4}" "-0500")
#f
doesn't. (My naive opinion is the second expression
very helpful that you linked to the issue, thank you. I now understand there
are non-trivial problem domain issues (for example, “CDT” is ambiguous,
probably even with locale specified.)
I will think about how to tackle my specific problem and whether I can help
with issues like these.
--
You
Thanks for the quick reply, Jon!
OK, good to know. Maybe I can add the ones I need (if I can figure out how...).
:)
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
p.s. I'm stuck on parsing one pattern that comes up in my data. Here's a
corresponding test:
(parameterize ([current-locale "en"])
(check-equal?
(parse-datetime "Sun, 21 Jun 2015 17:50:44 -0500 (CDT)" "EEE, dd MMM
HH:mm:ss ()") (datetime 2015 6 21 17 50 44)))
Thanks, Jon!
I agree with your analysis and thoughts about which cases should always raise
exceptions. (I can't recall whether you scan patterns that include
semi-redundant information such as day-of-week; wondered just now whether a
contradictory day of week would be another category of except
Thanks. Something like that will let me proceed for now.
I'd still be curious what folks think about an approach avoiding exceptions.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from
hi, I've installed and am trying out
Gregor: a date and time library for Racket
and find it to be very powerful and useful.
In my current application (digging through mail headers) I'm wondering whether
there is a way to test whether a given date-time format matches without using
exceptions
Thanks, Dominik,
that appears to do the trick! (pdfgrep is immediately happy...).
Much appreciated,
Tim
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket
hi,
I need to fetch a number of PDF documents and wrote a bit of racket to make it
easier. The part that "downloads" is this:
(let ([content
((compose port->string get-pure-port string->url) (url-for-doc year
doc-name))])
(let ([out (open-output-file full-path-of-file-to-w
hi,
I just upgraded to 7.4 and rediscovered (here, thanks for helpful posts!) the
best practice for the bash $PATH using /etc/paths.d/racket.
Is there an analogous trick to "update" which version I get when I click on the
drracket icon in the macOSX dock? (OK, it's only a few clicks to remove
t;
>
>> On Jan 8, 2019, at 4:09 PM, Tim Hanson wrote:
>>
>> great piece by Michelle Goldberg, imho:
>>
>> https://www.nytimes.com/2019/01/07/opinion/rashida-tlaib-profanity.html
>>
>> --
>> You received this message because you are subscribed
great piece by Michelle Goldberg, imho:
https://www.nytimes.com/2019/01/07/opinion/rashida-tlaib-profanity.html
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Many thanks, Jens Axel! That looks very good and includes several techniques
that will help and inspire me, in particular for*/matrix, which I hadn't used
yet.
I'll try it out the next chance I get.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" gr
hi,
I'm trying out matrices (without typed racket, though I read the performance
caveat -- I'm not worried about performance at the moment) and am trying to
find the best idioms for a small function I'd like to build.
Q1: is there an elegant away to assemble a matrix column-wise? (my first dra
Thanks for fixing it!
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.co
Hi, I tried to grab the latest racket version from download.racket-lang.org and
chrome and edge tell me the certificate of the site at mirror.racket-lang.org
is not yet valid or expired. It's no problem as I found a mirror with a valid
certificate, but I guess you'll want to renew the certificat
Thanks again.
I've tweaked and commented the end of Mathias's example:
(module+ test
(check-exn exn:fail:contract? (lambda () (f 1))) ; violates contract by
returning non-integer
(check-exn exn:fail:contract? (lambda () (f 'a ; violates contract by
being called with a non-integer
and
Beautiful! Thanks to both of you. Can't wait to try it out.
Cheers,
Tim
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com
Hi, I guess this didn't find the right subject matter expert yet. Would it be
better to ask a specific person or use a different channel?
Cheers, tbh
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiv
hi,
As part of something I'm working on I want to convert a stream of values
into a stream of pairs of values, e.g.
1 2 3 4
becomes
(1 2) (3 4)
The following seems to work fine:
(define (pairwise-stream astream)
(if (stream-empty? astream)
empty-stream
(stream-cons
(c
Heh, cool, Laurent! This dabbler had missed this until now -- I will read and
probably use.
Cheers, tim
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-
p.s. I just found this:
https://planet.racket-lang.org/package-source/gh/gapi.plt/1/3/planet-docs/manual/Examples.html
which leads here:
https://github.com/greghendershott/gapi/blob/master/examples/macro/gplus-oauth.rkt
and looks promising. (I didn't find any signs of oauth use in sirmail (
Bravo! This parallels my motivation. I'm kind of a beginner in Racket, but it
is powerful, portable, elegant, well-documented, and well-supported, so I keep
dabbling ...
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this
Thanks, all, this rings a bell and I note that:
https://docs.racket-lang.org/webapi/oauth2.html
says use with caution. I will look around and see if I can figure out how to do
imap in conjunction with oauth2.
Cheers,
Tim
--
You received this message because you are subscribed to the Google
Thanks again for several helpful pointers. I've recorded humble beginnings here:
https://github.com/tbhanson/imap-with-racket
Comments and suggestions very welcome. (I know in particular I'd like to have a
handy way to store my credentials somewhere, am using ~/.myImapCreds for now,
but am un
Hi, Huang,
Thanks for sharing.
Cheers, Tim Hanson
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For mo
I should have dug around in sirmail sooner. Armed with the hint about
parametrize I've now found this:
(if (get-pref 'sirmail:use-ssl?)
(let-values ([(in out) (ssl-connect server port-no)])
(imap-connect* in out (USERNAME) passwd mailbox-name))
Cool, thank you! I had no idea about parameterize. I will try that and continue
my investigations.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+
P.s. For that matter couldn't folder also be optional, defaulting to "INBOX"?
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegrou
hi, I'm finally finding time to dig into this a little and have a question about
https://docs.racket-lang.org/net/imap.html#%28def._%28%28lib._net%2Fimap..rkt%29._imap-port-number%29%29
Does this make imap-port-number a kind of global variable? My naive view is it
would be somewhat friendlier
Thanks for both answers! I'll report back when I've made some progress!
Cheers,
Tim
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@go
Hi, I think I'd like to try using racket as a way to explore relatively simple
ways of getting a grip on some mail accounts that have gotten out of hand.
Specifically I'd like to be able to
- compute some statistics, such as number of mails from various addresses
- reorganize / clean-up, say by m
hi,
I was hoping yesterday to read UTF-16 characters from a file using, e.g., a
small snippet such as the following:
(for ([c (in-port read-char (open-input-file "myfile.txt"))]
[counter naturals]
#:break (>= counter 100))
(printf "(~a [~a]) " c (char->integer c)))
For a UFT-16 fi
egular expressions that is more compatible with Perl."
>
> That must be the only thing in Racket influenced by Perl.
>
>
>
>
> On Friday, October 30, 2015 at 11:46:27 AM UTC-7, Tim Hanson wrote:
> > On Friday, October 30, 2015 at 7:21:58 PM UTC+1, Matthew Butteric
rence/regexp.html?q=pregexp#%28elem._%28rxex._25%29%29
>
>
> On Friday, October 30, 2015 at 11:15:08 AM UTC-7, Tim Hanson wrote:
> > hi,
> >
> > I must be overlooking something basic, but can't figure out why the second
> > and third tests here fail. (Makes n
hi,
I must be overlooking something basic, but can't figure out why the second and
third tests here fail. (Makes no difference whether I spell {space-character}
the [[:space:]] or the \\s way.)
I'd be grateful for enlightenment. :)
Cheers,
Tim
(define rx-empty-or-all-blank-string
;#rx"^[[:
37 matches
Mail list logo