AustNet AustNet Archive Project — IRC Logs
« All channels | Contribute a log »

// #marryatvillehs — 2007-02-23

1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
07:53:20 Quit: ash_ ([email protected]) Ping timeout for ash_
09:34:37 Quit: ChanOP ([email protected]) *.net.split *.net.split
09:34:43 Mode: (by ChanOP) +ntr
09:34:43 Join: ChanOP ([email protected]) to #marryatvillehs
09:34:43 Mode: (by ChanOP) +o ChanOP
09:34:43 Mode: (by ChanOP) -o stefan
09:54:50 Join: ash_ ([email protected]) to #marryatvillehs
11:59:26 Quit: Talesin ([email protected]) Ping timeout for Talesin
12:45:52 Quit: stefan ([email protected]) SVSKilled: NickOP (GHOST command used by stefan_)
12:46:03 Quit: ChanOP ([email protected]) *.net.split *.net.split
12:46:10 Mode: (by ChanOP) +ntr
12:46:10 Join: ChanOP ([email protected]) to #marryatvillehs
12:46:10 Mode: (by ChanOP) +o ChanOP
12:49:31 Quit: stefan ([email protected]) Ping timeout for stefan
13:56:35 Join: stefan ([email protected]) to #marryatvillehs
13:56:36 Mode: (by ChanOP) +o stefan
13:56:56 Quit: stefan ([email protected]) Quit:
14:01:41 <ash_> hey
15:29:04 Join: stefan ([email protected]) to #marryatvillehs
15:29:05 Mode: (by ChanOP) +o stefan
15:29:17 Join: stefan ([email protected]) to #marryatvillehs
15:29:18 Mode: (by ChanOP) +o stefan
15:31:57 Join: Taliesin ([email protected]) to #marryatvillehs
15:41:27 Quit: stefan ([email protected]) Killed (NickOP (Kill requested by stefan_))
15:41:27 Quit: stefan ([email protected]) SVSKilled: NickOP (GHOST command used by stefan_)
15:41:36 Join: stefan ([email protected]) to #marryatvillehs
15:41:37 Mode: (by ChanOP) +o stefan
15:41:51 Join: stefan ([email protected]) to #marryatvillehs
15:41:51 Mode: (by ChanOP) +o stefan
15:43:56 <ash_> ey
15:44:17 <stefan> hai
15:44:22 <ash_> sup
15:44:26 <stefan> you see my first little perl script earlier?
15:44:32 <ash_> nope ?
15:44:41 <stefan> not a lot, looks like I'll be spending a bit on electricians next week though :\
15:44:47 <stefan> [02:22:08] (@stefan) finally done my first remotely decent perl script, http://home.stefan.id.au/~stefan/cidr/
15:45:45 <stefan> suggestions welcome, they're probably a bit crude
15:54:51 <ash_> nice, getting back into coding?
16:02:44 <stefan> when I need to, yeah
16:03:04 <stefan> using the au list to block off spammers from seeing my webalizer stats on my local server
16:03:23 <stefan> I'd have just allowed the apnic /8s, but most of the spammers are from asia
16:03:35 <stefan> the nsw is for a p2p group though, uses pipe's ranges
16:03:47 <stefan> I've done all sorts of random things recently
16:04:06 <stefan> http://cc.stefan.id.au/doupload.phps is quite funky
16:13:06 <ash_> you know if you want to calculate powers of 2 you can do it really quickly using bitwise shift
16:13:19 <ash_> eg. 1 << 8, is like 2 ** 8
16:17:33 <stefan> ah, knew there'd be a better way
16:17:45 <stefan> still good filling the array first instead of continually sqrting them
16:20:33 <ash_> yeah, you can also shift right to divide by 2
16:30:26 <stefan> ah yeah, not sqrt is it, still, with several thousand rows should be more efficent matching an array key than dividing by 2 that many times
16:44:49 <ash_> yeah
16:45:04 <ash_> although you are creating a pretty big array for holding only 24 or so values
16:45:12 <ash_> you should consider a hash
16:51:34 <stefan> meh, nsw takes 3 seconds, au takes 8, and that's on a p550 :P
16:51:37 <stefan> including fetch time
16:52:34 <stefan> was hoping it'd reduce the ranges more as so many of them are /24s
16:52:36 <ash_> yeah, it won't effect speed, i just mean that you're creating an array with millions of undef elements
16:52:40 <stefan> but it only about halves them
16:53:30 <ash_> $a[16777216] = blah; means the array will have 16 million elements
16:53:40 <stefan> ahhh
16:54:15 <ash_> $a{16777216} would be a hash
16:54:33 <stefan> so hashes are more like how arrays work in php and whatever it is I used them in before
16:54:39 <stefan> tcl and something else
16:54:48 <ash_> yeah
16:54:59 <stefan> still @prefix ?
16:55:03 <ash_> php makes everything into an associative array (hash)
16:55:13 <ash_> perl has proper data types of list and hash
16:55:22 <ash_> % prefix for hash
16:56:18 <ash_> the benefit of a real array is that you can read/write in constant time, but a hash if very close to that anyway
16:57:58 <stefan> hmm
16:58:02 <stefan> not %tocidr{$a} = $i; ?
16:58:13 <stefan> was @ [] before
16:58:43 <stefan> $ works nicely, should I be using that instead of @s too ?
16:59:11 <ash_> $tocidr{$a} = $i;
16:59:25 <stefan> yeah
16:59:32 <stefan> 12c12
16:59:33 <stefan> < @tocidr[$a] = $i;
16:59:33 <stefan> ---
16:59:33 <stefan> > $tocidr{$a} = $i;
16:59:48 Quit: Taliesin ([email protected]) Ping timeout for Taliesin
17:00:20 <ash_> yup. and for the list it should be $tocidr[$a]
17:01:15 Join: Taliesin ([email protected]) to #marryatvillehs
17:01:42 <stefan> ta, bbs
17:09:36 Quit: Taliesin ([email protected]) Ping timeout for Taliesin
17:10:55 Join: Taliesin ([email protected]) to #marryatvillehs
17:27:17 Quit: stefan ([email protected]) Ping timeout
17:28:33 Quit: stefan ([email protected]) Ping timeout for stefan
17:33:11 Join: stefan ([email protected]) to #marryatvillehs
17:33:12 Mode: (by ChanOP) +o stefan
17:33:50 Join: stefan ([email protected]) to #marryatvillehs
17:33:52 Mode: (by ChanOP) +o stefan
17:34:49 <stefan> hah, we're "the crosstalk job" at node corp support