[racket] SRFI 19 string->date: Error reading dates

From: Alexis King (lexi.lambda at gmail.com)
Date: Mon Feb 2 16:12:43 EST 2015

FWIW, I can reproduce that bug in DrRacket 6.1.1, but I can’t reproduce it in a snapshot build (currently 6.1.1.8), so it might have already been fixed.

> On Feb 2, 2015, at 11:31, Gustavo Massaccesi <gustavo at oma.org.ar> wrote:
> 
> The crashes are unrelated to the srfi/19, you should fill another bug
> report for that :).
> 
> A simpler example (inspired by the reply of Alexis King) is:
> 
> #lang racket
> (+ (values) 777)
> 
> ------
> Error:
> result arity mismatch;
> expected number of values not received
>  expected: 1
>  received: 0
>  values...:
> ------
> 
> The problem is in the ellipsis after "values". If you hoover the mouse
> over them you got an error in the console:
>>>>  setting cursor to #(struct:object:cursor% ...)
> 
> if you copy text that include the ellipsis you get:
>>>>  write method in ellipsis-snip%: arity mismatch;
>>>>   the expected number of arguments does not match the given number
>>>>    expected: 1
>>>>    given: 2
>>>>    arguments...:
>>>>     '()
>>>>     #<output-port:string>
> 
> Gustavo
> 
> On Sun, Feb 1, 2015 at 1:31 AM, Jordan Johnson <jmj at fellowhuman.com> wrote:
>> Hi all,
>> 
>> I’m running into this problem with string->date in srfi/19:
>> 
>> ;;; begin Interactions
>>> (require srfi/19)
>>> (string->date "Sun, 02 Feb 2015" "~a, ~d ~b ~Y”)
>> result arity mismatch;
>> expected number of values not received
>> expected: 1
>> received: 0
>> values...:
>> ;;; end Interactions
>> 
>> I’m assuming there’s something I am missing about how dates are handled, but
>> from what I’ve read it seems like the code above should be doing it. What am
>> I missing?
>> 
>> (And, is there a better way to be reading dates in Racket, or is this the
>> preferred way?)
>> 
>> Best,
>> jmj
>> 
>> P.S. Attempting to copy/paste the above error message from the Interactions
>> window crashed DrR (v6.1.1) three times. This doesn’t seem to be
>> reproducible by copying any other error messages, though, so I haven’t filed
>> a bug report yet; figured perhaps the answer to the string->date problem may
>> shed some light on this, too...
>> 
>> 
>> 
>> ____________________
>>  Racket Users list:
>>  http://lists.racket-lang.org/users
>> 
> 
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users



Posted on the users mailing list.