code logs -> 2007 -> Tue, 21 Aug 2007< code.20070820.log - code.20070822.log >
--- Log opened Tue Aug 21 00:00:04 2007
01:07 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
03:24 Derakon[AFK] is now known as Derakon
03:25 * Derakon looks up. "TF: and people complain that Perl is line noise?"
03:28
<@ToxicFrog>
That's way more readable when properly formatted.
03:28
< Derakon>
I'm just poking fun.
03:29
<@ToxicFrog>
/^!include/ {
03:29
<@ToxicFrog>
$1="";
03:29
<@ToxicFrog>
system("echo [include: " $0 " ]");
03:29
<@ToxicFrog>
system("cat " $0);
03:29
<@ToxicFrog>
next;
03:29
<@ToxicFrog>
}
03:29
<@ToxicFrog>
{ print $0; }
03:30
< Derakon>
Is this some kind of shell function definition?
03:30
< Derakon>
I'm not familiar with /^ notation.
03:32
<@ToxicFrog>
It's awk.
03:32
<@ToxicFrog>
Like it says in the command.
03:32
< Derakon>
Ah.
03:32
< Derakon>
...oh, yeah, there it is.
03:32
< Derakon>
Don't mind me, I'm blind.
03:32
<@ToxicFrog>
The format of an awk script is one or more /pattern/ { action } blocks
03:33
< Derakon>
Zero or more, actually.
03:33
<@ToxicFrog>
It's 2233
03:33
< Derakon>
I use a lot of "awk '{print $4}'" and the like.
03:33
<@ToxicFrog>
I'm allowed to say + where I meant * >.>
03:33
< Derakon>
Heh.
03:33
<@ToxicFrog>
Well, that's still one or more, it's just that the pattern is empty
03:33
<@ToxicFrog>
As it turns out, however, awk -will- accept an empty script.
03:33 * Derakon facepalms.
03:34
< Derakon>
That would, uh, just result in no output, yes?
03:34
<@ToxicFrog>
Correct.
03:36
<@ToxicFrog>
Anyways. Yes. Zero or more blocks. Empty pattern matches everything; empty action is considered to be { print $0 }; empty everything reads and discards all input.
04:14 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
04:15 Syloq is now known as Syloqs-AFH
05:22 Pi [~sysop@Admin.Nightstar.Net] has joined #code
05:22 jerith [~jerith@Nightstar-21563.slipgate.za.net] has joined #code
05:23 jerith is now known as NSGuest-169
05:28 ReivZzz [~reaverta@Admin.Nightstar.Net] has quit [Quit: Changing servers]
05:28 ReivClass [~reaverta@Admin.Nightstar.Net] has joined #Code
05:28 ReivClass is now known as Reiver
05:29 Forj [~Forj@Nightstar-10147.ue.woosh.co.nz] has joined #code
05:29 mode/#code [+o Forj] by ChanServ
05:34 Raif [~corvusign@Nightstar-5406.hsd1.ca.comcast.net] has joined #Code
06:48 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
06:48 mode/#code [+o gnolam] by ChanServ
06:56 Derakon is now known as Derakon[AFK]
07:18 NSGuest-169 is now known as jerith
07:19 AnnoDomini [~farkoff@Nightstar-29744.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
07:26 AnnoDomini [~farkoff@Nightstar-29313.neoplus.adsl.tpnet.pl] has joined #Code
07:26 mode/#code [+o AnnoDomini] by ChanServ
07:44 Forj is now known as ChalcyPanicked
07:46 ChalcyPanicked is now known as Forj
08:19 Vornicus is now known as Vornicus-Latens
08:51 mode/#code [+o DiceBot] by Reiver
08:51 mode/#code [-o DiceBot] by Reiver
08:51 mode/#code [+v DiceBot] by Reiver
08:52 mode/#code [+oooooo Derakon[AFK] EvilDarkLord jerith Pi Raif Reiver] by Reiver
09:02 * Serah hugs Reiver
09:03
<@Serah>
My mac is being stupid.
09:03
<@Reiver>
You have a mac?
09:08
<@Serah>
I have something with the mac logo?
09:08
<@Serah>
It doesn't act like a mac though.
09:08
<@Serah>
It acts like a spoiled child.
09:08
<@Serah>
I had a problem with it and is now trying to reformat it.
09:08
<@Serah>
So far, for the last 13 hours without luck.
09:19
<@Serah>
How're you doing?
09:27
<@Reiver>
Tired.
09:28
<@Reiver>
Ill. Foggybrained.
09:28
<@Reiver>
So, the usual.
09:28 * Serah nuzzles Reiver
09:49 gnolysator [~gnolysato@Nightstar-18729.lysator.liu.se] has joined #Code
10:30 gnolysator [~gnolysato@Nightstar-18729.lysator.liu.se] has quit [Quit: HELP HELP I'M BEING OPPRESSED!]
11:13 Forj [~Forj@Nightstar-10147.ue.woosh.co.nz] has quit [Quit: Gone]
11:25 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: +DiceBot, @EvilDarkLord, @Vornicus-Latens, @Thaqui, @Derakon[AFK], @Chalcedon
11:26 Netsplit over, joins: EvilDarkLord
11:26 Netsplit over, joins: Vornicus-Latens, Derakon[AFK], Thaqui, DiceBot
11:26 mode/#code [+o Thaqui] by ChanServ
11:26 Netsplit over, joins: Chalcedon
11:26 mode/#code [+v DiceBot] by ChanServ
11:26 mode/#code [+o Chalcedon] by ChanServ
11:26 ServerMode/#Code [+ooo Vornicus-Latens Derakon[AFK] EvilDarkLord] by Blargh.CA.US.Nightstar.Net
11:26 mode/#code [-o Vornicus-Latens] by ChanServ
11:26 mode/#code [-o Derakon[AFK]] by ChanServ
11:26 mode/#code [-o EvilDarkLord] by ChanServ
11:53 Chalcedon [~Chalcedon@Nightstar-10147.ue.woosh.co.nz] has quit [Quit: Gone]
12:04 MyCatVerbs [~rb6822@Nightstar-23319.cs.bris.ac.uk] has joined #code
12:23 mode/#code [+ooooo Derakon[AFK] EvilDarkLord MyCatVerbs Syloqs-AFH Vornicus-Latens] by AnnoDomini
12:31
<@Reiver>
http://photos1.blogger.com/blogger/5418/1493/1600/software_development.jpg
12:33
<@AnnoDomini>
Old. So very, very old.
12:34 * Reiver goes to reply, then stops short as he ponders the discussion taking place at all.
12:34
<@Reiver>
What is it about the internet that praises neophillia to the point where the old is critisized by /dint/ of its age?
12:35
<@Reiver>
I can understand it with memes and the like, which burn out over time yet get marched out by lamers long past their novelty stage.
12:35
<@Reiver>
But the internet as a whole?
12:35 * AnnoDomini thinks he's seen that picture linked to thrice in the past few days.
12:37
<@gnolam>
It's old, but that one's good enough to be in the topic.
12:37
<@Reiver>
Seeing something multiple times in the last few days makes something old?
12:37
<@AnnoDomini>
Nah, not really.
12:37
<@gnolam>
It's a couple of years old, actually. :)
12:37
<@gnolam>
But still. Deserves to be in the topic.
12:37
<@AnnoDomini>
Just -- yeah, what gnolam said.
12:39 gnolam changed the topic of #Code to: #Code - It's like swiss bank accounts, but for coders! | Have a pastebin! http://pastie.caboo.se/ | Text editors in a nutshell: http://sycophant.wordpress.com/files/2006/03/emacs.jpg | http://www.nearingzero.net/screen_res/nz214.jpg | http://photos1.blogger.com/blogger/5418/1493/1600/software_development.jpg
12:39
<@gnolam>
So there.
13:23
<@gnolam>
MWAHAHAH!
13:23 * gnolam holds the POWER OF SQL.
13:44
<@TheWatcher>
....
13:44 * TheWatcher finds an apparently undocumented `terp error in perl
14:36
<@ToxicFrog>
Joy.
14:37 * ToxicFrog figures out how to rescue an NX session that's gotten stuck in Connecting status
16:02 * gnolam reluctantly reinstalls PHP.
16:03
<@ToxicFrog>
Ew.
16:13 Vornicus-Latens is now known as Vornicus
16:51 Chalain [~chalain@Nightstar-4184.res.logixcom.net] has joined #code
16:51 mode/#code [+o Chalain] by ChanServ
16:56 MyCatVerbs [~rb6822@Nightstar-23319.cs.bris.ac.uk] has quit [Client exited]
17:20 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
17:21 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
17:21 mode/#code [+o ToxicFrog] by ChanServ
19:15
<@Vornicus>
Oh, and, my opinion on the SDL namespace thing, I personally prefer the subtables.
19:15
<@Vornicus>
It feels more natural.
19:17
<@ToxicFrog>
Of course, in practice, it's trivial to implement both
19:17
<@ToxicFrog>
So I might just do that.
19:17
<@ToxicFrog>
Wow, downloading stuff at 600KBps is really noticeable when you're using NX
20:01
<@Karnaugh>
whats with all the random notices
20:07
<@Vornicus>
we're all mad here.
20:07
<@Vornicus>
Get used to it.
20:07
<@Karnaugh>
thats fine
20:08
<@Karnaugh>
I'm learning Lua
20:08 * Karnaugh laughs manicly
20:08
<@Vornicus>
heh
20:08
<@Karnaugh>
it's like javascript for computers
20:08
<@Vornicus>
20:09
<@Karnaugh>
yeah...
20:09
<@ToxicFrog>
...
20:10
<@Vornicus>
o...kaythen.
20:10
<@ToxicFrog>
...in what way?
20:10
<@Vornicus>
idunno. Javascript is actually a vaguely sane language, except that the libraries are fucking scary.
20:11
<@AnnoDomini>
beer_pump.c: Error in Traffic_Cone(): traffic_light is not a budgerigar
20:11
<@Karnaugh>
I like javascript for some reason
20:11
<@Karnaugh>
defining random functions all over as a design pattern is quite interesting
20:12
<@ToxicFrog>
Vornicus: and the fact that 99% of extant JS code is incredibly nasty, partly-generated page-embedded code, so finding JS that doesn't look like the spawn of Azathoth is a chore.
20:12
<@ToxicFrog>
AnnoDomini: didn't I paste that earlier?
20:12
<@Karnaugh>
if I could do like multiline lambdas in Python that would be awesome
20:12
<@Vornicus>
a true thing.
20:12
<@AnnoDomini>
ToxicFrog: Yep.
20:12 * AnnoDomini wrote it from memory, though.
20:12
<@Karnaugh>
ToxicFrog: well thats because 99% of people who write JS code pick up a book from 1995 authored by bill gates and hack away
20:14
<@ToxicFrog>
Anyways. How is Lua like JS?
20:15
<@Karnaugh>
well like
20:15
<@Karnaugh>
table.extend = function (dest, source)
20:15
<@Karnaugh>
table.foreach(source, function(elm)
20:15
<@Karnaugh>
table.insert(dest, elm)
20:15
<@Karnaugh>
end)
20:15
<@Karnaugh>
end
20:15
<@Karnaugh>
that sort of thing
20:15
<@Karnaugh>
is javascripty to me
20:16
<@ToxicFrog>
...using 5.0, are you?
20:16
<@Karnaugh>
http://rafb.net/p/GinLHj66.html
20:16
<@Karnaugh>
wrote that js today
20:16
<@Karnaugh>
ToxicFrog: 5.1
20:16
<@ToxicFrog>
Aah. Foreach and foreachi are deprecated in 5.1.x, and will probably be removed entirely in 5.2.
20:17
<@Karnaugh>
what do you use instead then?
20:17
<@ToxicFrog>
pairs and ipairs.
20:17
<@ToxicFrog>
table.extend = function(dst, src)
20:17
<@ToxicFrog>
for k,v in pairs(source) do
20:17
<@ToxicFrog>
table.insert(dst, v)
20:17
<@ToxicFrog>
end
20:17
<@ToxicFrog>
end
20:17
<@Karnaugh>
thats not zen :(
20:18
<@ToxicFrog>
Err, table.insert(dst,k) rather
20:18 * ToxicFrog eyeballs that function
20:18
<@Karnaugh>
right the first time
20:18
<@ToxicFrog>
Given two tables, appends all keys in src to the array-part of dst?
20:18
<@Karnaugh>
values
20:18
<@Karnaugh>
not keys
20:18
<@ToxicFrog>
Foreach passes in (key, value)
20:18
<@Karnaugh>
was trying to reimplement pythons list.extend function
20:19
<@ToxicFrog>
So your function(elm) is only getting passed the key.
20:19
<@Karnaugh>
hrm
20:19
<@Karnaugh>
then my function was for teh sucks
20:19
<@ToxicFrog>
And what does python's list.extend do?
20:20
<@ToxicFrog>
Concatenates two lists?
20:20
<@Vornicus>
list.extend: concatenation in place.
20:20
<@ToxicFrog>
(in which case you want foreachi, or in 5.1, ipairs())
20:20
<@Karnaugh>
>>> l = [1,2,3,4]
20:20
<@Karnaugh>
>>> l.extend([5,6,7])
20:20
<@Karnaugh>
>>> l
20:20
<@Karnaugh>
[1, 2, 3, 4, 5, 6, 7]
20:20
<@ToxicFrog>
Yeah, you don't want foreach/pairs here.
20:21
<@ToxicFrog>
function table.extend(dst, src) for i,v in ipairs(src) do table.insert(dst,v) end; return dst end
20:21
<@ToxicFrog>
You can implement it tail-recursively, but without an efficient car/cdr there's not much point.
20:22
<@Karnaugh>
perhaps you can tell me why lua has a method to return a table as a string separated by some character
20:22
<@Karnaugh>
but nothing to split a string on some character into a table
20:24
<@Karnaugh>
or not
20:24
<@ToxicFrog>
On the latter: because it's trivial to write your own string.split, and indeed I have one for download
20:24
<@ToxicFrog>
On the former: no idea, one would think that they'd omit this too.
20:24
<@Karnaugh>
well I have one using gmatch
20:25
<@Karnaugh>
my problem is I'm trying to find a light replacement for python
20:26
<@Karnaugh>
so I keep thinking stuff like "It would be really cool if it had list comprehensions"
20:26
<@Karnaugh>
instead of just accepting what it does have :P
20:34
<@ToxicFrog>
Heh. Well, it's flexible enough that lots of stuff is easy to add, although if you want to modify the actual grammar, something like metalua is the way to go.
21:18 Chalcedon [~Chalcedon@Nightstar-10147.ue.woosh.co.nz] has joined #code
21:18 mode/#code [+o Chalcedon] by ChanServ
21:36
<@jerith>
I had to check twice that this was the right channl.
21:36
<@jerith>
+e
21:36
<@jerith>
Odd seeing Karnaugh in here too. :-)
21:37
<@Reiver>
:)
22:33 Reiver is now known as ReivOUt
22:33 ReivOUt is now known as ReivOut
22:51 ReivOut is now known as Reiver
23:37 You're now known as TheWatcher[T-2]
23:54 You're now known as TheWatcher[zZzZ]
23:58 ToxicFrog is now known as BioFrog
--- Log closed Wed Aug 22 00:00:11 2007
code logs -> 2007 -> Tue, 21 Aug 2007< code.20070820.log - code.20070822.log >