[racket-dev] weirdest bug ever

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Jan 17 07:24:58 EST 2013

Cute. :)

FWIW, it comes out right on the mac.

Robby


On Thu, Jan 17, 2013 at 6:03 AM, Pierpaolo Bernardi <olopierpa at gmail.com>wrote:

> Hello,
>
> try the following in the interaction panel of DrRacket:
>
> (display (integer->char #x2144))
>
> Or, just put this character in an editor buffer.
> The character is displayed 3 lines below its proper position.
>
> AFAIK, this character is a normal ‘Letterlike Symbol’. It shouldn't
> have any misterious formatting properties, and it's a character of
> fundamental importance for writing  ¡uʍop ǝpısdn    8^)
>
> (latest nightly build, on windows 8)
>
> Puzzled P.
>
> ========
> #lang racket
>
> (provide upside-down)
>
> (define table
>   (let ()
>     (define (putin t s1 s2)
>       (for/fold ((t t))
>         ((c1 (in-string s1))
>          (c2 (in-string s2)))
>         (hash-set t c1 c2)))
>     (for/fold ((t (hash)))
>       ((pair (in-list '(("abcdefghijklmnopqrstuvwxyz?!’._()[]{}<>;"
>                          "ɐqɔpǝɟƃɥıɾʞןɯuodbɹsʇnʌʍxʎz¿¡,˙‾)(][}{><؛")
>                         ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>                          "∀qƆpƎℲפHIſʞ˥WNOԀQɹS┴∩ΛMX⅄Z")
>                         ))))
>       (putin t (first pair) (second pair)))))
>
> (define (upside-down string)
>   (list->string
>    (reverse
>     (for/list ((c (in-string string)))
>       (hash-ref table c c)))))
>
> ========
>
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130117/ae6519f3/attachment-0001.html>

Posted on the dev mailing list.