--- Log opened Tue Dec 25 00:00:02 2007 |
--- Day changed Tue Dec 25 2007 |
00:00 | <@MyCatVerbs> | *Really* late start there, all told. |
00:02 | <@MyCatVerbs> | Merry ecksmass, all. |
00:29 | | * Kyrre dances with MyCatVerbs. |
00:49 | | Chalain [~chalain@Admin.Nightstar.Net] has joined #code |
00:49 | | mode/#code [+o Chalain] by ChanServ |
03:08 | | Attilla [~The.Attil@172.201.5.ns-2743] has quit [Connection reset by peer] |
04:53 | | Vornicus-Latens is now known as Vornicus |
05:42 | | C_tiger changed the topic of #Code to: It's like swiss bank accounts, but for coders! | Have a pastebin! http://rafb.net/paste | Channel mode +U, ask for voice to post links. | &tidings($comfort && $joy); sub tidings{if(@_){$lyric = "";for($i=1;$i<=3;$i++){$lyric .= "We wish you a merry Christmas,\n";}$lyric.="And a happy new year.";}return $lyric;} |
05:46 | <@C_tiger> | Sorry, I couldn't do it in python... stupid whitespace requirement. |
06:44 | | Forj [~Forj@Nightstar-2443.ue.woosh.co.nz] has joined #code |
06:44 | | mode/#code [+o Forj] by ChanServ |
06:46 | | Forj [~Forj@Nightstar-2443.ue.woosh.co.nz] has quit [Quit: Gone] |
07:20 | | You're now known as TheWatcher |
09:38 | | You're now known as TheWatcher[afk] |
10:05 | | Chalcedon [~Chalcedon@Nightstar-2443.ue.woosh.co.nz] has quit [Connection reset by peer] |
11:15 | | Attilla [~The.Attil@Nightstar-23974.ipt.aol.com] has joined #code |
13:44 | | AnnoDomini [AnnoDomini@Nightstar-29183.neoplus.adsl.tpnet.pl] has quit [Ping Timeout] |
13:51 | | AnnoDomini [AnnoDomini@Nightstar-29495.neoplus.adsl.tpnet.pl] has joined #Code |
13:51 | | mode/#code [+o AnnoDomini] by ChanServ |
16:42 | | * MyCatVerbs hugs Kyrre belatedly. |
16:42 | <@MyCatVerbs> | C_tiger: I was going to make fun of you for what you just said about whitespace, but then I realised that this is #code, not #haskell. Adjacent windows will one day be the downfall of me, I'm sure. ;) |
16:45 | <@MyCatVerbs> | (Since Haskell has (optional) syntactic whitespace in more or less exactly the same manner. ¬_¬) |
17:05 | <@C_tiger> | Ah, well. Merry Christmas anyhow. |
18:09 | <@MyCatVerbs> | Heh. Have a great time. :) |
18:09 | <@MyCatVerbs> | (I just meant that sitting in #haskell complaining about significant whitespace would've been slightly silly.) |
20:01 | | You're now known as TheWatcher |
20:59 | | Attilla [~The.Attil@Nightstar-23974.ipt.aol.com] has quit [Ping Timeout] |
21:18 | | Attilla [~The.Attil@Nightstar-23974.ipt.aol.com] has joined #code |
21:18 | | Vornicus [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout] |
21:26 | | * C_tiger ponders... tidies his code. |
21:27 | | C_tiger changed the topic of #Code to: It's like Swiss bank accounts, but for coders! | Have a pastebin! http://rafb.net/paste | Channel mode +U, ask for voice to post links. | &tidings($comfort && $joy); | sub tidings{if(@_){$lyric = "";for $i (1..3){$lyric .= "We wish you a merry Christmas,\n";}$lyric.="And a happy new year.";}return $lyric;} |
21:29 | | Attilla [~The.Attil@Nightstar-23974.ipt.aol.com] has quit [Ping Timeout] |
21:38 | <@MyCatVerbs> | Is that Perl? |
21:38 | <@TheWatcher> | Yes |
21:38 | | * MyCatVerbs ponders a more ruby-ish syntax. (comfort && joy).tidings(); |
21:38 | <@jerith> | Ruby-- |
21:39 | <@jerith> | They're ignoring my patches. :-( |
21:42 | <@MyCatVerbs> | Fair enough, but everything-is-an-object sounds more fun than some-things-are-objects. |
21:43 | | * MyCatVerbs glances askew at Java's fugly little syntax. |
21:45 | | * TheWatcher prefers Perl's 'Eh, just do it how you want' approach, personally |
21:46 | | * TheWatcher tends to like c/c++ for similarish reasons |
21:46 | <@jerith> | MCV: I'll take Python's object system over Ruby's any day. |
21:46 | <@MyCatVerbs> | TheWatcher: I can see C, but C++? Aieee! |
21:46 | <@MyCatVerbs> | jerith: the implementation, or the semantics? |
21:54 | <@jerith> | Both, but mostly the implementation. |
21:57 | | * C_tiger ponders how best to implement the classic "print the lyrics to 12 days of christmas" task. |
21:58 | <@jerith> | With a big string literal? |
21:59 | <@C_tiger> | Yes, that thought did cross my mind. |
21:59 | <@C_tiger> | Also recursively. |
22:02 | <@C_tiger> | (although really not necessary since nested for-loops would do just as well and not require recursion... but the word is fun) |
22:02 | <@MyCatVerbs> | Twelve string literals. Compose them. |
22:02 | <@jerith> | My plan has one big string literal. |
22:02 | <@jerith> | And a print statement. |
22:02 | <@C_tiger> | There is a certain elegance to that plan. |
22:03 | <@jerith> | 'Tis the simplest one. |
22:03 | <@C_tiger> | It does sort of defeat the whole "programming" aspect that they're going for when then assign this as a project in the beginner's CS class. |
22:03 | <@jerith> | The second simplest requires an http client and the URL of a lyrics website. |
22:03 | <@jerith> | C_tiger: It's a silly toy problem. |
22:04 | <@C_tiger> | Yes. |
22:05 | <@C_tiger> | I was just wondering if I could squeeze an implementation down so that it would fit into the topic. The http one is very clever. |
22:06 | <@C_tiger> | That's definitely the best approach I've every seen to this problem. |
22:06 | <@C_tiger> | ever |
22:06 | <@jerith> | Can do it in bash, too. |
22:06 | <@jerith> | With suitable greps and seds. |
22:24 | | * MyCatVerbs ponders an implementation in gzip. ;) |
22:25 | <@jerith> | curl http://www.41051.com/xmaslyrics/twelvedays.html | grep -A 115 'ter">The' | sed 's/<[^>]*>//g' | sed 's/^[^a-zA-Z0-9]*//' |
22:25 | <@jerith> | You could prbably make that shorter by using perl or awk. |
22:25 | <@jerith> | But I'm tired. |
22:26 | <@jerith> | Runtime is determined almost entirely by the interweb connection. |
22:26 | <@jerith> | Oh, I forgot to shrink the grep. |
22:26 | <@MyCatVerbs> | Clever. |
22:27 | <@ToxicFrog> | Or by piping it through lynx -dump rather than the HTML-stripper |
22:27 | <@jerith> | curl http://www.41051.com/xmaslyrics/twelvedays.html | grep -A 115 'r">T' | sed 's/<[^>]*>//g' | sed 's/^[^a-zA-Z0-9]*//' |
22:28 | <@jerith> | lynx -dump doesn't like the partial html and I want to strip out all the gumph around it. |
22:28 | <@MyCatVerbs> | lynx -dump is pretty cool. |
22:28 | <@jerith> | Also, lynx is less standard than the other tools. |
22:29 | <@jerith> | Of those, only curl needs to be separately installed and even that only on some systems. |
22:29 | <@ToxicFrog> | I find lynx to be present a lot more reliably than curl. |
22:29 | <@jerith> | Will wget output to stdout? |
22:29 | <@jerith> | If so, that's even more reliable. |
22:31 | <@MyCatVerbs> | You can mkfifo if you're desperate. |
22:31 | <@ToxicFrog> | Yes, it will |
22:31 | <@MyCatVerbs> | I think wget -O - will work, but if it doesn't then just mkfifo fifo && wget -O fifo; |
22:32 | <@ToxicFrog> | wget -O- works |
22:32 | <@jerith> | mkfifo is unlikely to work on a Windows box with cygwin, I suspect. |
22:32 | <@MyCatVerbs> | Yep, the man page says wget -O - works (use wget -O ./- if you need to create a file literally called "-" in the cwd). |
22:32 | <@ToxicFrog> | -O file |
22:32 | <@ToxicFrog> | --output-document=file |
22:32 | <@ToxicFrog> | The documents will not be written to the appropriate files, but all will be concatenated together and written to file. If - is |
22:32 | <@ToxicFrog> | used as file, documents will be printed to standard output, disabling link conversion. (Use ./- to print to a file literally |
22:32 | <@ToxicFrog> | named -.) |
22:32 | <@ToxicFrog> | jerith: it will on recent cygwins, but isn't entirely reliable |
22:32 | <@MyCatVerbs> | TF: pray tell, what's your terminal width? |
22:32 | | * jerith nods. |
22:33 | <@jerith> | Lots, I suspect. |
22:33 | <@ToxicFrog> | How do I find out? |
22:33 | <@ToxicFrog> | Also, it varies from term to term |
22:33 | <@ToxicFrog> | That one is almost-fullscreen |
22:33 | <@jerith> | I usually leace my terminals at 80 chars unless I'm watching logs. |
22:33 | <@jerith> | *leave |
22:33 | <@ToxicFrog> | The one I play nethack in is fullscreen (resulting in screams of horror when people try to spectate from 80x24 terminals) |
22:34 | <@jerith> | My terminals are usually full-height, though. |
22:34 | <@MyCatVerbs> | ToxicFrog: if you're dragging an xterm, it uses pops up a box showing the width. |
22:34 | <@jerith> | Anyways, too sleep with me. |
22:34 | <@jerith> | Cheers all. |
22:34 | <@MyCatVerbs> | ToxicFrog: no clue how to get at it in Cygwin. Nor PuTTY, come to thing of it. |
22:34 | <@ToxicFrog> | It's a gnome-tyerminal |
22:34 | <@ToxicFrog> | 'night, jerith |
22:35 | <@ToxicFrog> | In Cygwin it's -always- 80x24 unless you've modified cygwin.bat to use xterm or rxvt or similar, in which case you use whatever technique is appropriate for that terminal. |
22:35 | <@MyCatVerbs> | Huh, I thought cygwin used rxvt by defa-no wait, I'm thinking of MSYS. |
22:36 | <@MyCatVerbs> | I've never really used Cygwin much, MSYS was always so much easier to get set up initially>_> |
22:36 | <@ToxicFrog> | I find cygwin easier, since it actually has an installer rather than a bunch of sketchily-documented tarballs |
22:37 | <@ToxicFrog> | But MSYS does has the advantage of being a fraction of the size, so even with experimentation overhead you can get it installed much faster. |
22:37 | | * MyCatVerbs nods. |
22:37 | <@ToxicFrog> | Doesn't come with all the tools I need, though, so I used cygwin for day to day work and msys for generating builds. |
22:37 | <@MyCatVerbs> | Often as not, the only thing I actually *use* in MSYS is the OpenSSH implementation. Not really worthwhile when PuTTY is so much nicer. |
22:37 | <@ToxicFrog> | And now I have a mingw cross compiler, so I don't need msys at all. |
22:39 | <@MyCatVerbs> | Sweet. |
23:24 | | Attilla [~The.Attil@Nightstar-23974.ipt.aol.com] has joined #code |
23:42 | | You're now known as TheWatcher[T-2] |
23:44 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Wed Dec 26 00:00:01 2007 |