(archive 'newLISPer)

April 1, 2006

NetNewsWire

Filed under: newLISP — newlisper @ 18:15
Tags:

>

It’s not every day of the year that I have to use newLISP to read an entry in NetNewsWire. But today I saw Bill Stevenson’s entry for today and had to have a go.

See how long it takes you (I’ve made it into a string for you):

(set 'bills-message "4F 66 20 63 6F 75 72 73 65 20 65 76 65 72 79 20
79 65 61 72 20 49 20 68 61 76 65 20 74 6F 20 64
6F 20 73 6F 6D 65 74 68 69 6E 67 20 73 69 6C 6C
79 20 6F 6E 20 41 70 72 69 6C 20 46 6F 6F 6C 27
73 20 44 61 79 2E 20 54 68 69 73 20 79 65 61 72
20 69 73 20 6E 6F 20 64 69 66 66 65 72 65 6E 74
2E 20 49 6E 20 6F 72 64 65 72 20 74 6F 20 72 65
61 64 20 74 68 69 73 2C 20 49 20 69 6D 61 67 69
6E 65 20 74 68 61 74 20 79 6F 75 27 64 20 68 61
76 65 20 74 6F 20 73 6F 6D 65 68 6F 77 20 72 65
61 6C 69 7A 65 20 74 6F 20 6F 70 65 6E 20 69 74
20 69 6E 20 61 20 68 65 78 20 65 64 69 74 6F 72
2E 20 53 6F 20 62 72 61 76 6F 20 74 6F 20 79 6F
75 21 20 41 6E 64 20 68 61 76 65 20 61 20 77 6F
6E 64 65 72 66 75 6C 20 41 70 72 69 6C 20 46 6F
6F 6C 27 73 20 44 61 79 21")

Decoding hex entries is the only thing I’ve encountered that Brent Simmon’s ace newsreader can’t do!

Advertisements

4 Comments »

  1. >(join (map char (map (fn (x) (integer x 0 16)) (parse bills-message ” “))))

    Comment by Anonymous — April 2, 2006 @ 23:03 | Reply

  2. >when pasting bills-message from the post some line-feeds hex 0A chars slip in, this regex parse takes care of it:(join (map char (map (fn (x) (int x 0 16)) (parse bills-message {\s+} 0))))

    Comment by Anonymous — April 3, 2006 @ 02:19 | Reply

  3. >Good work! I had(map (fn (h) (print (char (integer (append “0x” h))))) (parse bills-message ” |\n” 0))which is pretty close!

    Comment by newlisper — April 3, 2006 @ 07:37 | Reply

  4. >aaa yes..welll I tried variations but you simply cant get around the octet issue in newlisp ;-) nice short solutions..!

    Comment by Anonymous — April 4, 2006 @ 18:45 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: