Re: [racket] another mini-tutorial: a racket slice: munging IRC logs
I like how you show one way of converting a match to an object, and then show a better way. What I did not like very much is how the first way is really verbose and made me question whether to read on, and in retrospect the way using match isn't much less verbose. Wouldn't a simple (apply on-action (rest a-match)) work? Fortunately, `match' provides some features that make this much nicer. Here's a new version (untested): Ok, second version of parse-irc has been updated to use Sam's version instead. Thanks! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
Re: [racket] another mini-tutorial: a racket slice: munging IRC logs
On Saturday, Eric Hanchrow wrote: I would like to put in a plug for my dear friend Rudybot, written partly by Eli but mostly by me, now playing on #racket and #scheme on Freenode: https://github.com/offby1/rudybot It's written completely by Eric! -- My contribution was mostly in helping him plug in sandboxes, and some semi-fancy way to do a customizable dispatch on various events. BTW, I also have an irc bot sketch -- it's logged as `gabot' in #racket, and that's how the IRC logs are recored. It's not as complete as rudybot (specifically, no evaluation), but it's designed to be very easy to extend. [For example, when freenode suffered from spam attacks, I hacked up some piece of code that would kick spammers...] -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
Re: [racket] another mini-tutorial: a racket slice: munging IRC logs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Danny, On 08/06/11 08:08, Danny Yoo wrote: I'm thinking of writing a series called Racket Slices, which does a cookbook-style approach to learning about Racket. I think there's a need for documentation that takes a slice, a cross section of Racket to do some simple (but real-world!) task. And since we're using the name Racket, it demands that we use a pun about tennis. Here's what I'm thinking of: http://hashcollision.org/racket-slices/irc-parsing/index.html How does it look? I like how you show one way of converting a match to an object, and then show a better way. What I did not like very much is how the first way is really verbose and made me question whether to read on, and in retrospect the way using match isn't much less verbose. Wouldn't a simple (apply on-action (rest a-match)) work? Marijn -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5DlfUACgkQp/VmCx0OL2yrnQCfaZ2EtrvQe+mcSGPOreNPs74k 1uUAoJ4JTCDlRd63TqFTNHzn/vX4JCpD =e5do -END PGP SIGNATURE- _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
Re: [racket] another mini-tutorial: a racket slice: munging IRC logs
On Thu, Aug 11, 2011 at 4:42 AM, Marijn hk...@gentoo.org wrote: I like how you show one way of converting a match to an object, and then show a better way. What I did not like very much is how the first way is really verbose and made me question whether to read on, and in retrospect the way using match isn't much less verbose. Wouldn't a simple (apply on-action (rest a-match)) work? Fortunately, `match' provides some features that make this much nicer. Here's a new version (untested): (define (parse-irc a-line) (match a-line [(regexp action-regexp (list _ hour minute type msg)) (action hour minute type msg)] [(regexp chat-regexp (list _ hour minute who msg)) (chat hour minute who msg)])) Oh, and I love the original essay, Danny! -- sam th sa...@ccs.neu.edu _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
Re: [racket] another mini-tutorial: a racket slice: munging IRC logs
I also tried writing some kind of an IRC library for Racket (inspired by http://wiki.call-cc.org/eggref/4/irc), but I got distracted/bored/whatnot so I did not finish it. https://gist.github.com/959088 2011/8/6 Neil Van Dyke n...@neilvandyke.org: Danny Yoo wrote at 08/06/2011 02:08 AM: http://hashcollision.org/racket-slices/irc-parsing/index.html Tutorials like this can certainly help attract new people and get them started. Perhaps pick a more inspiring hunk of IRC dialogue to use as an example, so as not to demotivate with the impression that IRC is futile? And if you're going to use real-world IRC dialogue for this tutorial and/or other purposes, I suspect you want to anonymize it, lest your human subjects board gets all up in your business. (Although that neilv fellow is strikingly handsome.) BTW, I suspect someone will find this in Google when they're trying to talk with an IRC server from Racket, and be disappointed that this is only about parsing a particular log format. I think that there is some IRC client code for Racket, not necessarily released. I think I've seen a Racket-based bot online, perhaps by Eli. And I wrote an (unreleased) IRC bot in Scheme in 2001, which supported DCC transfers and corrected people's spelling. So that Googling person should ask around when the time comes. -- http://www.neilvandyke.org/ _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
Re: [racket] another mini-tutorial: a racket slice: munging IRC logs
On Sat, Aug 6, 2011 at 02:36, Neil Van Dyke n...@neilvandyke.org wrote: BTW, I suspect someone will find this in Google when they're trying to talk with an IRC server from Racket, and be disappointed that this is only about parsing a particular log format. I think that there is some IRC client code for Racket, not necessarily released. I think I've seen a Racket-based bot online, perhaps by Eli. And I wrote an (unreleased) IRC bot in Scheme in 2001, which supported DCC transfers and corrected people's spelling. So that Googling person should ask around when the time comes. I don't know how good it is, but there is rudybot in github. https://github.com/offby1/rudybot Cheers, Sam _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
Re: [racket] another mini-tutorial: a racket slice: munging IRC logs
I would like to put in a plug for my dear friend Rudybot, written partly by Eli but mostly by me, now playing on #racket and #scheme on Freenode: https://github.com/offby1/rudybot On Sat, Aug 6, 2011 at 2:36 AM, Neil Van Dyke n...@neilvandyke.org wrote: Danny Yoo wrote at 08/06/2011 02:08 AM: http://hashcollision.org/racket-slices/irc-parsing/index.html Tutorials like this can certainly help attract new people and get them started. Perhaps pick a more inspiring hunk of IRC dialogue to use as an example, so as not to demotivate with the impression that IRC is futile? And if you're going to use real-world IRC dialogue for this tutorial and/or other purposes, I suspect you want to anonymize it, lest your human subjects board gets all up in your business. (Although that neilv fellow is strikingly handsome.) BTW, I suspect someone will find this in Google when they're trying to talk with an IRC server from Racket, and be disappointed that this is only about parsing a particular log format. I think that there is some IRC client code for Racket, not necessarily released. I think I've seen a Racket-based bot online, perhaps by Eli. And I wrote an (unreleased) IRC bot in Scheme in 2001, which supported DCC transfers and corrected people's spelling. So that Googling person should ask around when the time comes. -- http://www.neilvandyke.org/ _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users