00:00:03 but it works like supped up dictionary. 00:02:25 oh boy, suped up dictionary... 00:02:44 Just a dictionary of dictionarys would be good 00:03:31 {"K":{"full-name":"pottassium", valence:whatever...}...} 00:04:00 taste: AAAARGGHHHH 00:04:19 "spelling":"incorrect" 00:05:27 it is basically... 00:05:47 ~exec sys.stdout(sys) 00:05:48 00:05:52 it's 5 or 6 dictionaries of a bunch of objects. 00:06:07 objects have the advantage of having methods as well as data. ;) 00:06:18 ~exec sys.stdout(sys.__dict__) 00:06:18 {'_SysWrapper__sys': , 'stderr': <__main__.IRCFileWrapper instance at 0xb7bda7cc>, 'stdout': <__main__.IRCFileWrapper instance at 0xb7bda76c>} 00:06:29 hmph 00:06:30 and the 5 or 6 dictionaries are just optimization for some common ways to refer to elements. 00:06:34 ~exec sys.stdout(sys.sys.__dict__) 00:06:47 ~exec sys.stdout(sys._SysWrapper__sys.__dict__) 00:06:48 -!- bsmnt_bot has quit (Excess Flood). 00:06:50 -!- bsmnt_bot has joined. 00:06:52 argh 00:07:05 I need to put flood protection in IRCFileWrapper 00:07:06 CakeProphet: I still don't exactly see the point of objects when methods are really just functions on them. Then again, in Python, objects' methods are really just functions on them, so... 00:07:21 ~exec raw(self,"PRIVMSG #esoteric :Foo") 00:07:29 Fun. 00:07:34 eh... self-containedness... there's no functional benefit... it just makes organizing everything easier. 00:07:40 when everything's in a scope of some sort. 00:07:48 Well, yeah. 00:08:13 Of course, some things *do* have points. 00:08:26 I'm still waiting for my language where programs are first-order logic theories. 00:09:04 Call it a FOLTE, for First Order Logic Theory Evaluator. And pronounce it "faulty". 00:09:19 ~exec IRCbot.raw(self, "PRIVMSG #esoteric :foo") 00:09:20 foo 00:09:25 ^^ ihope 00:09:27 Gasp! 00:09:37 Wonderful. 00:09:43 I'm going with interesting data types as my main theme for any sort of language-inventing 00:09:48 at the moment. 00:10:09 ~exec self.esoteric("asdf") 00:10:18 gasp 00:10:32 and with some new ways to treat procedures as data. 00:10:38 * bsmntbombdood wonders how to implement flood protection 00:10:40 like the "ring" concept. 00:10:42 You oughta save at least some state, bsmnt. 00:10:50 bombdood. 00:12:12 * CakeProphet remember his first encounter with programming. 00:12:42 pure imperitive... global-variables-for-state-and-conditional-mechanisms hacking 00:12:59 it was like building some weird ass clock.. 00:13:27 ihope: like what? 00:13:30 ~quit 00:13:31 -!- bsmnt_bot has quit. 00:13:33 -!- bsmnt_bot has joined. 00:13:41 ~exec print >> sys.stdout, sys 00:13:42 00:13:46 ~exec new_bot = IRCbot({"HOST": "blue", "PORT": 6667, "NICK": "AlsoBot", "IDENT": "bsmnt", "REALNAME": "not applicable", "CHAN": "#esoteric", "VERBOSE": True}); new_bot.listen() 00:13:48 ~exec print >> sys.stdout, "a" * 400 00:13:57 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 00:13:58 bsmntbombdood: well, you could have the thing not actually disappear when it disconnects. 00:14:01 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 00:14:07 Hmm. 00:14:08 bsmntbombdood, make a wrapper class for whatever you print in and make it keep track of when smth was said last... 00:14:21 ~exec new_bot = IRCbot({"HOST": "irc.freenode.net", "PORT": 6667, "NICK": "AlsoBot", "IDENT": "bsmnt", "REALNAME": "not applicable", "CHAN": "#esoteric", "VERBOSE": True}); new_bot.listen() 00:14:37 Huh 00:14:53 now IRCFileWrapper splits it up into 300 byte chunks 00:15:00 ~exec new_bot = IRCbot({"HOST": "85.188.1.26", "PORT": 6667, "NICK": "AlsoBot", "IDENT": "bsmnt", "REALNAME": "not applicable", "CHAN": "#esoteric", "VERBOSE": True}); new_bot.listen() 00:15:03 -!- AlsoBot has joined. 00:15:04 ihope: I haven't gotten dns working inside the chroot 00:15:06 :) 00:15:08 Wonderful. 00:15:14 bsmntbombdood: ah. 00:15:26 So, there's a, uh... hmm. 00:15:36 ~raw "PRIVMSG #esoteric :Foo" 00:15:52 ~exec self.raw("PRIVMSG #esoteric :Foo") 00:15:52 Foo 00:15:52 Foo 00:15:53 ~raw PRIVMSG #esoteric :foo 00:15:54 foo 00:15:54 foo 00:15:58 Yay. 00:15:59 huh 00:16:01 *heh 00:16:22 ~exec print >> sys.stdout, new_bot 00:16:26 argh 00:16:44 ~exec new_bot.COMMAND_CHAR = r"@" 00:16:51 @raw PRIVMSG #esoteric :Foo 00:16:55 no 00:17:15 you borked it 00:17:19 I did? 00:17:23 That's nice. 00:17:27 ~quit 00:17:35 Uh, yeah. 00:17:39 there's no references to new_bot 00:17:43 ~exec self.disconnect() 00:17:48 ~quit 00:17:48 -!- AlsoBot has quit (Remote closed the connection). 00:17:48 -!- bsmnt_bot has quit (Client Quit). 00:17:51 -!- bsmnt_bot has joined. 00:17:52 I can't figure this out, can I? 00:18:13 ~exec self.new_bot = IRCbot({"HOST": "85.188.1.26", "PORT": 6667, "NICK": "AlsoBot", "IDENT": "bsmnt", "REALNAME": "not applicable", "CHAN": "#esoteric", "VERBOSE": True}); self.new_bot.listen() 00:18:17 there 00:18:20 -!- AlsoBot has joined. 00:18:25 Ah, better, yes. 00:18:34 ~exec self.new_bot.COMMAND_CHAR = r"@" 00:18:41 @raw PRIVMSG #esoteric :Foo 00:18:43 won't work 00:18:47 I see. 00:19:07 self.COMMAND_CHAR only matters during __init__ 00:19:13 Oh. 00:19:43 That gives me an idea. 00:19:54 ~exec self.disconnect("") 00:19:55 -!- bsmnt_bot has quit (Client Quit). 00:19:55 -!- AlsoBot has quit (Client Quit). 00:19:56 ~exec print >> sys.stdout, self.COMMAND_CHAR 00:19:57 -!- bsmnt_bot has joined. 00:20:02 ~exec print >> sys.stdout, self.COMMAND_CHAR 00:20:02 ~ 00:20:16 ~exec self.__init__(args) 00:20:26 whoa 00:20:27 -!- bsmnt_bot has quit (Remote closed the connection). 00:20:28 ~raw PRIVMSG #esoteric :Foo 00:20:29 -!- bsmnt_bot has joined. 00:20:32 BUGGAGE 00:20:33 Uh, hmm. 00:20:38 Did you kill it? 00:20:41 no 00:20:54 I'll have to do it faster, then :-P 00:20:55 we got some weird exception on the real stderr 00:21:04 ~exec self.__init__(args) 00:21:05 ~raw PRIVMSG #esoteric :Foo 00:21:06 -!- bsmnt_bot has quit (Remote closed the connection). 00:21:08 -!- bsmnt_bot has joined. 00:21:11 Clearly not working. 00:21:31 what are you trying to do? 00:21:35 you can't call __init__ on a class that's already inited 00:21:43 you can... it's just.. 00:21:47 without breakage 00:21:49 not something you'd usually want to do. 00:22:14 ~exec sys.stdout(self.__init__) 00:22:15 > 00:22:39 ~exec IRCbot.__init__ 00:22:48 ...Right. 00:22:49 ~exec IRCbot.__init__() 00:23:03 why are you calling init anyways? 00:23:03 Fun. 00:23:05 ~exec IRCbot.__init__(self, args) 00:23:08 Oh, because. 00:23:09 -!- bsmnt_bot has quit (Remote closed the connection). 00:23:11 -!- bsmnt_bot has joined. 00:23:17 ValueError: list.remove(x): x not in list 00:23:19 ???? 00:23:23 ~exec IRCbot.__init__(args, self) 00:23:37 ~exec IRCbot.__init__(self, self) 00:23:47 self probably isn't defined. 00:23:53 it is 00:24:07 ~exec def IRCbot.__getitem__: return 3 00:24:08 ~exec sys.stdout(self) 00:24:11 oh... well then that just does the same thing as self.__init__() 00:24:12 <__main__.IRCbot instance at 0xb7c5a42c> 00:24:14 ~exec IRCbot.__init__(self, self) 00:24:23 ihope, Can't define methods like that. 00:24:24 Erm, wait... 00:24:30 wtf are you doing 00:24:40 bsmntbombdood: playing? 00:24:45 def 00:24:54 IRCbot.__getitem__ is an expression. 00:24:55 ihope: ...continue 00:25:05 CakeProphet: I see. 00:25:12 using the . operator... so it's not a valid "identifier"... plus it's just plain weird. :P 00:25:25 ~exec IRCbot = 3 00:25:28 It would be nice if python could do that like ruby 00:25:31 def myFunc(blah, blah): blah blah blah 00:25:37 ~raw PRIVMSG #esoteric :Foo 00:25:41 IRCbot.__getitem__ = myFunc 00:25:44 Did I break it? 00:25:50 not yet 00:26:05 you can't make any more IRCbot s, though 00:26:06 ~exec self.raw("PRIVMSG #esoteric :Foo") 00:26:06 Foo 00:26:11 Hmm. 00:26:21 bsmntbombdood, it doesn't... because that's not consistent with pretty much anything else.... and it's kind of tacky. 00:26:22 ~exec self = 3 00:26:27 Woot! 00:26:29 now it's broken 00:26:33 ~exec self.raw("PRIVMSG #esoteric :Foo") 00:26:33 I think 00:26:34 Foo 00:26:36 or no 00:26:37 t 00:26:47 ~exec sys.stdout(self) 00:26:47 ~exec del IRCbot 00:26:47 <__main__.IRCbot instance at 0xb7c5a42c> 00:26:52 weird 00:26:59 ~exec self.disconnect("pero ya eres todo un hombre pa la guerra y pa matar") 00:26:59 -!- bsmnt_bot has quit (Client Quit). 00:27:02 -!- bsmnt_bot has joined. 00:27:05 Yay!... no. 00:27:12 oh right, self is passed by value 00:27:17 bsmntbombdood, how does the bot handle the scope of subprocesses? 00:27:31 if you just make the dict on the fly in the exec statement... it won't preserve the dict beyond the exec. 00:27:45 in the (globals(), locals()) of IRCbot.do_exec 00:28:17 assign it to an attribute of the bot object 00:28:27 * CakeProphet would make a private dictionary for subprocesses... and then update the main one or something when the subprocess is done executing. 00:28:32 to prevent weird race conditions and stuff. 00:28:47 ~exec self.self = 3 00:28:57 Did it work or something?... no, probably didn't. 00:29:03 ~raw PRIVMSG #esoteric :Foo 00:29:12 CakeProphet: having one sepperate global dictionary for all ~execs might be good 00:29:14 Well, ~raw isn't working, at least. 00:29:25 ~exec self.raw("PRIVMSG #esoteric :Foo") 00:29:26 Foo 00:29:30 ihope: you don't match the ~raw regex 00:29:36 Oh. 00:29:39 ~exec die 00:29:42 if ~exec re-assigns self each time... that's why. 00:29:47 ~exec self.disconnect = 3 00:29:58 ~quit 00:30:02 ~exec self.do_kill = 3 00:30:14 ~exec self.do_exec = 3; self.exec = 3 00:30:17 it probably does... 00:30:28 now it's broken 00:30:34 considering do_exec is called with do_exec.im_self passed to the first parameter. 00:30:34 ~exec foo 00:30:43 each time it's called. 00:30:56 so reassigning self does little to nothing but alter that function calls local scope. 00:30:58 huh? 00:31:00 ~exec self.exec_execer = 3 00:31:07 ~exec foo 00:31:12 there you go 00:31:25 Yay! 00:31:34 now it's broken 00:31:39 ~exec self.raw("foo") 00:31:44 Yep. 00:31:57 !exec sys.stdout.write(dir(locals())) 00:31:58 only way to kill it now is ^C on the console 00:32:01 Huh? 00:32:09 ~exec sys.stdout.write(dir(locals())) 00:32:13 -!- bsmnt_bot has quit (Remote closed the connection). 00:32:16 -!- bsmnt_bot has joined. 00:32:19 ~exec sys.stdout.write(dir(locals())) 00:32:20 ['__class__', '__cmp__', '__contains__', '__delattr__', '__delitem__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__seti 00:32:20 tem__', '__str__', 'clear', 'copy', 'fromkeys', 'get', 'has_key', 'items', 'iteritems', 'iterkeys', 'itervalues', 'keys', 'pop', 'popitem', 'setdefault', 'update', 'values'] 00:32:31 you don't want dir 00:32:32 sweet... plenty of stuff to tinker with. 00:32:32 I'm guessing what CakeProphet did didn't kill it. 00:32:55 oh... erm.. yeah 00:32:57 How do I list all the files in /? >:-) 00:33:04 ~exec sys.stdout.write(locals()) 00:33:05 {'message': ':CakeProphet!n=CakeProp@h146.231.213.151.ip.alltel.net PRIVMSG #esoteric :~exec sys.stdout.write(locals())', 'r': <_sre.SRE_Match object at 0xb7c95b18>, 'command': 'sys.stdout.write(locals())', 'self': <__main__.IRCbot instance at 0xb7c3542c>} 00:33:05 os.listdir("/") 00:33:23 hmmm... 00:33:36 ~exec sys.stdout.write(os.listdir("/")) 00:33:36 ['bin', 'bot', 'etc', 'lib', 'usr'] 00:33:39 so wait... I have access to the source code of my exec in the exec itself? 00:33:40 Hmm. 00:33:44 ~exec sys.stdout.write(os.listdir("/bot")) 00:33:45 ['betterbot.py', 'start.sh', 'better.sh', 'ircbot.py'] 00:33:49 ~exec sys.stdout.write(os.listdir("/bin")) 00:33:50 ['bash'] 00:33:51 CakeProphet: yeah 00:33:58 ~exec sys.stdout.write(os.listdir("/etc")) 00:33:59 ['hosts', 'passwd', 'resolv.conf'] 00:34:05 ~exec sys.stdout.write(command) 00:34:06 sys.stdout.write(command) 00:34:09 quine 00:34:14 Ooh! Let's change... wait, is passwd... what is it? 00:34:23 Oh well. 00:34:30 ~exec sys.stdout.write(os.listdir("/lib")) 00:34:30 ['libm.so.6', 'libreadline.so.5', 'libdl-2.4.so', 'libresolv.so.2', 'libutil.so.1', 'libncurses.so.5', 'libcrypt.so.1', 'ld-linux.so.2', 'libdl.so.2', 'libpthread.so.0', 'libpam_misc.so.0', 'libpam.so.0', 'libc.so.6'] 00:34:33 ~exec sys.stdout(open("/etc/passwd").read()) 00:34:34 root:x:0:0:root::/bin/bash 00:34:34 bsmnt_bot:x:1343:1343:::/bin/bash 00:34:36 ~exec sys.stdout.write(dir(self)) 00:34:36 ['COMMAND_CHAR', 'THREADING', '__doc__', '__init__', '__module__', 'chan', 'commands_running', 'commands_running_lock', 'connect', 'connected', 'disconnect', 'do_callbacks', 'do_ctcp', 'do_exec', 'do_kill', 'do_ps', 'do_quit', 'do_raw', 'errorchan', 'exec_execer', 'get_message', 'host', 'ident', 'li 00:34:37 sten', 'message_re', 'nick', 'pong', 'port', 'print_callbacks', 'raw', 'raw_regex_queue', 'readbuffer', 'realname', 'register_raw', 'socket', 'sockfile', 'verbose'] 00:34:38 ~exec sys.stdout.write(os.listdir("/usr")) 00:34:38 ['bin', 'lib', 'include'] 00:34:56 All so very confusing, I'm sure. 00:34:59 ~exec sys.stdout.write(os.listdir("~")) 00:35:17 ~exec sys.stdout.write(os.exec("/bin/bash")) 00:35:30 I see, maybe. 00:35:42 If you want a bash prompt, you are gonna have to wrap in in some sockets 00:35:45 Did that say syntax error? 00:35:53 yeah, exec is a statement 00:36:20 ~exec sys.stdout.write(self.__doc__) 00:36:20 None 00:36:25 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 00:36:30 Lousy documentation :P 00:36:31 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 00:36:34 yep 00:37:02 ~exec sys.stdout.write(self.socket) 00:37:02 00:37:16 i'd be ready now if i knew wtf Tory is 00:37:21 but i can't find it anywhere 00:37:23 ~exec sys.stdout.write(self.chan) 00:37:23 #esoteric 00:37:39 self.chan is kinda useless 00:37:44 ~exec sys.stdout.write(self.THREADING) 00:37:44 True 00:37:48 ~exec sys.stdout.write(self.chan**2) 00:38:03 does someone know it? 00:38:03 ~exec sys.stdout.write(dir(self.__class__)) 00:38:04 ['__doc__', '__init__', '__module__', 'connect', 'disconnect', 'do_callbacks', 'do_ctcp', 'do_exec', 'do_kill', 'do_ps', 'do_quit', 'do_raw', 'exec_execer', 'get_message', 'listen', 'pong', 'print_callbacks', 'raw', 'register_raw'] 00:38:23 ~exec sys.stdout.write(self.chan*2) 00:38:23 #esoteric#esoteric 00:38:34 ~exec sys.stdout.write(self.chan-"#") 00:38:46 oklofok: your errors go to #bsmnt_bot_errors 00:38:57 < bsmnt_bot> TypeError: unsupported operand type(s) for -: 'str' and 'str' 00:39:07 ~exec sys.stdout.write(dir(sys)) 00:39:07 ['_SysWrapper__sys', '__doc__', '__getattr__', '__init__', '__module__', 'stderr', 'stdout'] 00:39:26 ~exec sys.stdout.write(dir(sys.stdout)) 00:39:27 ['__call__', '__doc__', '__init__', '__module__', 'channel', 'raw', 'write'] 00:39:52 ~exec sys.stdout.write(dir(sys.__sys)) 00:40:08 AttributeError: 'module' object has no attribute '__sys' 00:40:14 oklofok: http://web.archive.org/web/20051218132142/http://chimpen.com/tory/ 00:41:19 ~exec raise "foo" 00:41:26 ~exec sys.stdout.write(globals()) 00:41:26 {'IRCbot': , 'args': {'IDENT': 'bsmnt', 'REALNAME': 'bsmntbombdood bot', 'CHAN': '#esoteric', 'NICK': 'bsmnt_bot', 'HOST': '85.188.1.26', 'PORT': 6667, 'VERBOSE': True}, '__builtins__': , '__file__': '/bot/ircbot.py', 'inspect': < 00:41:26 module 'inspect' from '/usr/lib/python2.4/inspect.pyc'>, 'IRCFileWrapper': , 'sys': , 'thread_info': , '__name__': '__main__', 'exec_global_tracer': , 00:41:28 'copy': , 'socket': , 'thread': , 'traceback': , 'os': , 'ppri 00:41:31 ... 00:41:32 nt': , 'bot': <__main__.IRCbot instance at 0xb7c3542c>, 're': , 'time': , 'threading': ng.pyc'>, 'SysWrapper': , 'exec_local_tracer': , '__doc__': None} 00:41:45 yay, no excess flood 00:42:03 * CakeProphet loves introspection. 00:42:58 now it just needs random quotes... and support for persistence. 00:43:10 CakeProphet: code it 00:43:42 http://bsmntbombdood.mooo.com/chroot_ircbot.py 00:43:45 ~exec globals()["random"] = __import__("random") 00:44:38 ~exec self.__class__.dice = lambda : random.randint(1,6) 00:44:59 ~exec sys.stdout.write(self.dice() 00:45:02 ~exec sys.stdout.write(self.dice()) 00:45:21 CakeProphet: #bsmnt_bot_errors 00:45:30 ~exec globals()["random"] = __import__("random") 00:45:36 ~exec self.__class__.dice = lambda : random.randint(1,6) 00:45:45 ~exec sys.stdout(random) 00:45:54 odd 00:46:20 oh, right 00:46:22 ~quit 00:46:22 -!- bsmnt_bot has quit. 00:46:25 -!- bsmnt_bot has joined. 00:46:30 ~exec globals()["random"] = __import__("random") 00:46:34 ~exec sys.stdout(random) 00:46:35 00:47:06 there 00:47:13 I was making a copy.copy for some reason 00:47:50 you wanted to make sure exec didn't effect globals? 00:47:58 by the way... dictionaries have a copy method. 00:48:06 ..so... you didn't really need to use the copy module. 00:48:10 ok 00:48:11 ~exec globals()["random"] = __import__("random") 00:48:16 ~exec self.__class__.dice = lambda : random.randint(1,6) 00:48:21 ~exec sys.stdout.write(self.dice()) 00:48:33 self.__class__.dice? 00:48:43 it would have it simply from inheritance. 00:48:49 That would force you to reinstanciate the bot 00:48:53 nope. 00:48:57 ~exec globals()["random"] = __import__("random") 00:49:05 ~exec self.__class__.dice = lambda self : random.randint(1,6) 00:49:10 ~exec sys.stdout.write(self.dice()) 00:49:10 5 00:49:33 method resolution is dynamic... if the class has it... the instance gets it to. 00:49:45 you would only need to re-init the bot if you did an entire class statement. 00:49:47 orly? 00:49:57 as then you would be creating an entirely new class... instead of modifying the old one... 00:49:59 rly 00:50:37 heh... meta-programming is scary shit... 00:50:46 what's that? 00:50:49 it's probably the part of Python I'm most familiar with. 00:50:55 programming things that program. 00:51:16 basically all of that was... sorta kinda... basic "meta-programming" 00:51:41 I created a program that re-programmed your class. 00:51:47 basic example... but that's the core of it. 00:52:28 ~exec self.register_raw(r"\S+ PRIVMSG (\S+) :~dice", lambda x,y: self.raw("PRIVMSG %s :%s" % (y.group(1), random.randint(1,6))) 00:52:37 ~dice 00:52:42 ~exec self.register_raw(r"\S+ PRIVMSG (\S+) :~dice", lambda x,y: self.raw("PRIVMSG %s :%s" % (y.group(1), random.randint(1,6)))) 00:52:46 ~dice 00:52:46 -!- bsmnt_bot has quit (Remote closed the connection). 00:52:48 -!- bsmnt_bot has joined. 00:52:53 argh 00:53:02 ~exec self.register_raw(r"\S+ PRIVMSG (\S+) :~dice", lambda x,y: bot.raw("PRIVMSG %s :%s" % (y.group(1), random.randint(1,6)))) 00:53:05 ~dice 00:53:06 -!- bsmnt_bot has quit (Remote closed the connection). 00:53:08 -!- bsmnt_bot has joined. 00:53:11 why group? 00:53:13 argh 00:53:16 there's nothing to group. 00:53:21 ~exec globals()["random"] = __import__("random") 00:53:23 ~exec self.register_raw(r"\S+ PRIVMSG (\S+) :~dice", lambda x,y: bot.raw("PRIVMSG %s :%s" % (y.group(1), random.randint(1,6)))) 00:53:26 CakeProphet: ? 00:53:29 oh. 00:53:31 nevermind,. 00:53:35 group is a regex match object method 00:53:40 yah yah 00:53:45 ~dice 00:53:45 it's the channel... nevermind. 00:53:45 1 00:53:52 ~dice 00:53:52 3 00:54:01 * CakeProphet has, funnily enough, a dice library. 00:54:26 with some weird callback stuff for constructing tabletop style dice functions. 00:54:41 that I made. 00:54:49 ok i have to go 00:55:03 * CakeProphet gets to work on that pickling stuff. 00:55:06 have fun. 00:55:54 ~exec insert 00:56:01 Hmm. 00:56:07 k made a new language instead of looking for Tory 00:56:14 and i'm sure mine is better too 00:56:30 hmm... you can't pickle functions though.... unless you save their source code. 00:56:49 but... I could go ultra-fancy and use some insane abuse of the pickle protcol to make it save functions. 00:56:50 oklofok: http://web.archive.org/web/20051218132142/http://chimpen.com/tory/ 00:56:59 I've done it before. 00:57:08 oerjan, too late :( 00:57:18 Why? :) 01:00:55 i made my own brainfuck in it's place 01:00:59 to get to 50 01:01:11 and mine has sence to it :) 01:01:41 made 3 languages today \o/ 01:02:37 maybe i'll make 50 improvised languages tomorrow, sounds like a good use of time 01:04:32 -!- oklofok has changed nick to oklopol. 01:05:47 hmm... I should work on Stue some more. 01:06:09 Stue? 01:06:13 Is that like Thue at all? 01:06:21 Dunno. 01:06:25 * CakeProphet isn't familiar with Thue 01:06:33 Stue is a "stack of queues" language. 01:06:34 that I made. 01:06:45 It is extremely unlike Thue. :) 01:07:14 The only thing in common is that they may be considered Norwegian words. 01:07:23 Hello World --> !m?spam?"Hello, World!\n"^ 01:07:45 with a semicolon at the end 01:07:54 !m?spam?"Hello, World!\n"^; 01:07:57 Huh? 01:08:36 print 2 + 2 --> !m22+^)?spam?^; 01:08:38 so... how do i sleep now that i slept 5 hours during the day and drank a litre of coke just now? 01:09:11 I wrote the entire specification on the esolang wiki... but then I forgot to save it. 01:09:16 and I'm entirely too lazy to type it out again. 01:09:19 in a way that makes sense. 01:09:51 i can't tell how it works from that :'( 01:10:29 yeah... it's a bit... 01:10:48 that's always a good thing 01:10:56 ... 01:11:16 you use stact notation, spam is print, ^ has something to do with pushing? 01:11:19 *stack 01:11:28 kinda sorta 01:11:34 gooda 01:11:39 )? 01:11:46 sorry, ')'? 01:11:54 it appears stack-based... but then you'll notice the order in which you push things seems to change sporatically... 01:12:21 everything is pushed except for commands... and ^ is the call command :D 01:12:43 yeah, i figured that a second before you said that 01:12:49 but, doesn't help 01:13:01 it reads everything character by character... unless it's surrounded by ?'s or quotes. 01:13:47 okay, now it's pretty clear, but ) and !m 01:13:54 poh 01:13:55 oh 01:13:57 i know !m 01:14:09 quoted stuff always being considered strings... and ?'s just denoting a multicharacter version of anything you would push as a single character. 01:14:29 By default, if the interpreter has no clue what the hell you're trying to push... it just becomes a string. 01:14:52 !m is the beginning of a subroutine defintion. :D 01:14:54 Huh? 01:15:03 the main one... to be exact. 01:15:16 yeah, i can exec !m22+^)"spam"^; as well? 01:15:28 hmmm... 01:15:31 yeah, i figured the !, 01:15:32 can't actually remember. 01:15:33 !m 01:15:36 Huh? 01:15:48 okay, doesn't matter, the ) anyway, what is it? 01:15:50 I indeded for that to be possible... but I forgot if it actualyl does it. 01:15:57 hehe :D 01:16:03 That... pushes a new queue onto the stack. 01:16:09 okay 01:16:22 hmm... why? 01:16:27 ...oh wait.. 01:16:35 would !m22+^?spam?^; work? 01:16:52 !m+22^)?spam?^; 01:16:54 Huh? 01:16:56 nopw. 01:17:28 +22^?spam?^ wouldn't work because we're pushing values to a queue. 01:17:34 or is it !m?spam?+22^^; without the new queue? 01:17:38 eh 01:17:50 okay 01:18:01 the ^ would call +... which would add 2 and 2... and then it would call 4. 01:18:15 not knowing how the hell you can call a 4... it proceeds to explode. 01:19:02 it's a very very weird way to think... 01:19:09 totally unintuitive. 01:19:16 cool 01:19:41 the print, does it pop a queue and take values from there=? 01:19:50 the syntax will oscillate between being stack-like and queue-like depending on where you're at. 01:20:06 it pops the value off the top queue. 01:20:11 just one. 01:20:17 !m+22^)?spam?^; here you make 2 queues? 01:20:20 Huh? 01:20:40 you would use % to call ?spam? on everything in the top queue (% is the for-each command) 01:20:41 yeah. 01:21:12 when a queue is depeleted of all values... and something attempts to pop off another value... it junks that queue and pops one off the queue below it. 01:21:24 ah okay 01:21:28 which is why that ?spam? call works. 01:21:42 but, why can't the param be in the same queue? 01:21:53 like in the hello, world 01:22:00 because of the order of evaluation. :D 01:22:11 you had to set up + 2 2 into the queue to call that correctly... 01:22:23 but... there's no way to fit in a ?spam? function -in front- of all of that... 01:22:52 you have to make a new queue... plop ?spam? in that queue... and do a call from there... making it look kinda stack-based. 01:23:05 but with the Hello, World! it looks like prefix notation. :D 01:23:06 ah okay, but here !m?spam?"Hello, World!\n" you first push the "spame", then the "hw", then because it's a FIFO, ^ reads the "spam", spam read "hw", right? 01:23:20 yup 01:23:42 I haven't cabbled much with multiple subroutines yet. 01:23:46 but they all share the same scope. 01:23:51 like most stack-based languages. 01:24:30 hmm... some o ther commands... 01:24:32 coroutines here too? 01:24:37 Nope. 01:24:45 yeah, wouldn't work that well 01:24:53 because of the stack nature 01:24:55 Not sure how it would work... since there's nothing you could return. 01:25:08 you could return normally 01:25:12 by pushing 01:25:15 they're "procedures" more than they are "subroutines". 01:25:18 but there wouldn't be much use 01:25:31 in the world of Stue... I call them ops. 01:25:39 because inventing vocabulary words is fun. 01:25:49 yeah :) 01:25:57 i made a bf for networking 01:26:42 hmmm... . is the "pop an integer off the stack... and push the integer-th value of the queue onto the queue" command. 01:27:11 and i made a 3D bf with the IP being a SPACESHIP (now that's REAL COOL, right?), then i made a lang called metafuck, where you can execute the memory with it's own nulled memory 01:27:13 yay! 01:27:31 is that a question? 01:27:43 no 01:27:47 the . is just hard to see 01:27:54 haha... that sounds awesome. 01:28:07 what? 01:28:11 / which? 01:28:12 @ is the same thing as . but at the stack level... pop an integer off the queue, and get the integer-th queue and push it to the top of the stack. 01:28:15 the spaceship BF 01:28:36 okay, i like the network-thingie best, but you don't know just how sick it is. 01:28:38 :) 01:28:52 @ and . are the only ways I've found to do conditionals so far... because the comparison operations all return either 1 or 0. 01:29:23 you can use the 1 or 0 to conditionally "flip" between the top two queue... or the top two values on the top queue. 01:29:48 yeah, or any two values 01:29:58 *queues or stack indexes 01:30:01 not values 01:30:10 *stack entrys, not indexes 01:30:24 hmm... other than that... there's some debugging command that just prints out the entire Stue... 01:30:32 can't remember what character it was. 01:30:36 * CakeProphet checks his interpreter. 01:31:10 queue number A on cond, B otherwise -> cond*(A-B)+B @ 01:31:16 but, prefic 01:31:17 *x 01:31:42 +*?cond?-ABB@ right? 01:31:44 hmm... 01:31:58 ~ is the PRINTSTEW command... yup. 01:32:16 printstew? 01:32:26 and crap between # are comments (allowed inline) 01:32:32 the debugging command. 01:32:42 it literally just prints out the entire data structure as Python would see it. 01:33:01 okay 01:33:21 python has a lovely way to print tuples, lists etc 01:33:45 [blah, blah, (blah, blah, blah), blah] 01:33:53 How do other languages do it? 01:33:56 or can they do it at all? 01:34:14 Interestingly Haskell has the exact same syntax for lists and strings 01:34:19 i mean tuples 01:34:20 yeah 01:34:36 Haskell's is nice too but i don't know it that well 01:34:43 does Haskell have hash tables? 01:34:51 lists look the same too, or? 01:35:12 Not standard, no. They are difficult to mix with its pure functionality. 01:35:24 heh... yeah 01:35:28 a language without variables... 01:35:33 The Data.Map library uses binary trees. 01:35:36 makes it difficult to use a hash table effectively. 01:36:21 i wanna learn Haskell better :\ 01:36:30 it's like the coolest language :D 01:36:49 Lua looks pretty interesting. 01:37:12 Like Lisp with hash tables instead of lists. 01:37:22 and Python-esque syntax. 01:41:18 BTW there are a couple of libraries providing variables in Haskell. All encapsulated in the infamous monads, of course. 01:42:32 Lisp always has hash tables. 01:43:05 Both Scheme and CL. 01:43:07 no no I meant. 01:43:17 what Lisp does with lists... Lua does with hash tables. 01:43:25 Eww. 01:43:30 :P 01:44:00 Hash tables are much more costly/processor-unfriendly than a linked list is unless you have many data entries that need to be specifically retreived. 01:44:33 That actually is pretty cool. Just too bad it's so much less efficient to use dictionaries for everything. 01:44:52 CakeProphet: You do know how C implements hash tables right? 01:45:02 Nope 01:45:14 Go and learn about what a hash table really is. 01:45:25 I only vageuly know how it works. 01:45:31 An array of pointers to linked lists, I believe. 01:45:38 No no. 01:45:42 I know it associates the key to a "hash value"... but -how- it does all this linkage is beyond me. 01:45:47 CakeProphet: Math. 01:46:00 Using a set of bit-transforms upon the hash value to produce an array index. 01:46:07 + a bit extra info. 01:46:23 or possibly pointers to binary trees, I guess. 01:46:45 Of course, there's always a chance for a misrefer, which is something you're going to suffer unless you implement a ``perfect'' hash table, whose math is more involved than I'm willing to casually talk about. 01:46:49 dictionaries are fairly fast for what they do. (lookup values paired to a key) 01:47:23 If only my NN which does 2 * 10^6 iterations of lookups and loops could say the same thing :) 01:47:59 pfft... anything would start to get stressed out under those numbers. 01:48:01 I don't see how a collision-free hash table is mathematically possible. 01:48:10 oerjan: It's ... complicated. 01:48:17 Read Knuth's articles on the ``perfect'' hash table. 01:48:23 hmmm... I've never actually had a misrefer occur... 01:48:27 -!- pikhq has joined. 01:48:27 seems fairly consistent every time. 01:48:48 Those numbers perform fairly well under linked lists though CakeProphet. 01:49:20 Code isn't always about playing with 80's network protocols in a Y2K world, remember that :P 01:49:56 * CakeProphet plays entirely too much with telnet. 01:50:07 (I follow Cohen's philosophy -- hypothesize the highest load, the most iterations, the most memory lookups, the most of any stress. Make sure your program withstands that, and then it is truly a program.) 01:50:13 it's pretty annoying to work with. >.< 01:51:07 My philosophy is: make it do something... then bang it with a hammer until it can do it with 100000000000 times more shit. 01:51:27 My philosophy is simple: 01:51:38 Get the program to work, and then get it to work *well*. 01:51:42 oh.. 01:51:50 I thought you just had a blank program. 01:51:55 er.. 01:51:57 philosophy. 01:52:16 * CakeProphet dabbles with 60's network protocols... not 80's. 01:52:16 Dunno. It's very rare that I can't get something to work in a very wasteful way. 01:52:37 Let's allocate 100,000 element adjustable arrays! \o/ 01:52:59 I use most of my own "protocols" actually... which is supposed to be bad for you, but oh well. 01:53:12 it's hard to use a network protocol that only you know... at any rate. :P 01:53:13 Of course, inevitably for me the issue with "get the program to work first" is just that it turns out to be illegible as hell, not that it's really wasteful. 01:53:36 My legibiliity is alright. 01:53:49 I admit, my TRAIN generic method here needs some more comments, but, meh. 01:53:55 I've been told I make Python look like Perl... 01:53:57 I'll comment it before I submit it to the judges :P 01:54:24 Pre-rewrite BFM was a bastion of illegibility. 01:54:48 Optimization and two targets combined in *one pass of compilation*. 01:55:11 Meh. 02:32:02 CakeProphet: You might be able to pickle the code object 02:33:32 ihope: insert? 02:35:53 CakeProphet: It would be easy to just store the source code of all ~execs 02:37:44 or inspect.getsource 02:38:55 ~exec sys.stdout(__import__("inspect").getsource(self.print_callbacks)) 02:38:55 def print_callbacks(self): 02:38:56 pprint.pprint( 02:38:56 [(i[0].pattern, i[1].__name__) for i in self.raw_regex_queue]) 02:38:58 neat 02:39:55 ~exec self.f = lambda x : x+1 02:40:02 ~exec sys.stdout(__import__("inspect").getsource(self.f)) 02:40:17 damn 02:40:36 I guess that only works with code from a file 02:42:53 ~exec globals()["pprint"] = __import__("pprint") 02:43:06 ~exec pprint.pprint((1,2,3)) 02:43:13 argh 02:45:04 ~exec sys.stdout( [i[1] for i in inspect.getmembers(self.f) if i[0] == "func_code"][0] ) 02:45:04 at 0xb7cc51e0, file "", line 1> 02:45:07 neat 02:45:37 ~exec self.the_code = [i[1] for i in inspect.getmembers(self.f) if i[0] == "func_code"][0] 02:45:51 ~exec sys.stdout(self.the_code.co_code) 02:45:51 | 02:45:54 hmp 02:46:02 well there you go 02:46:10 pickle the code object 02:47:08 ~exec exec self.the_code 02:47:18 ~exec exec self.the_code(1) 02:47:32 ~exec exec self.the_code in {"x":1} 02:47:57 ~exec exec self.the_code.co_code 02:50:59 I think the best bet is to store the string of source 02:53:30 ah ha! 02:53:40 ~exec sys.stdout(the_code) 02:53:45 ~exec sys.stdout(self.the_code) 02:53:45 at 0xb7cc51e0, file "", line 1> 02:53:51 ~exec del self.f 02:53:57 ~exec sys.stdout(self.f) 02:54:45 ~exec self.f = __import__("types").FunctionType(self.the_code, globals(), "f") 02:54:58 ~exec sys.stdout(f) 02:55:03 ~exec sys.stdout(self.f) 02:55:03 02:55:09 ~exec sys.stdout(self.f(1)) 02:55:10 2 02:55:18 yay!!!! 02:55:58 so you can get the function from the code object 02:56:03 well, there you have it 02:56:13 how to pickle functions 03:12:40 * bsmntbombdood feels clever 03:17:10 -!- CakeProphet has quit (Read error: 113 (No route to host)). 03:20:27 -!- ShadowHntr has joined. 03:34:24 -!- pikhq has quit ("leaving"). 04:04:28 -!- digital_me_ has joined. 04:07:51 -!- digital_me has quit (Read error: 145 (Connection timed out)). 04:39:29 ~quit 04:39:29 -!- bsmnt_bot has quit. 04:39:32 -!- bsmnt_bot has joined. 04:39:46 ~exec self.save_callbacks(sys.stderr) 04:39:47 -!- bsmnt_bot has quit (Excess Flood). 04:39:49 -!- bsmnt_bot has joined. 04:39:54 heh 04:39:58 least I got something 04:42:28 ~quit 04:42:29 -!- bsmnt_bot has quit (Client Quit). 04:42:31 -!- bsmnt_bot has joined. 04:42:53 ~exec self.register_raw("test", lambda x : False) 04:43:13 ~exec self.save_callbacks("/bot/test.pickle") 04:44:15 ~exec sys.stdout(os.getuid()) 04:44:15 1343 04:44:38 ~exec self.save_callbacks("/bot/test.pickle") 04:45:42 ok, scratch that idea 04:46:07 TypeError: can't pickle code objects 04:47:19 :( 04:48:56 That's the saddest smiley I have seen. 04:50:59 Back to pickling command strings I presume... 04:51:07 actually, no 04:51:44 after yelling at me for wanting to pickle functions, the people in #python told me that the marshal module could do it 04:52:25 ~quit 04:52:25 -!- bsmnt_bot has quit. 04:52:27 -!- bsmnt_bot has joined. 04:52:38 ~exec self.save_callbacks("/bot/test.pickle") 04:54:14 -!- bsmnt_bot has quit (Remote closed the connection). 04:54:16 -!- bsmnt_bot has joined. 04:55:02 -!- bsmnt_bot has quit (Remote closed the connection). 04:55:04 -!- bsmnt_bot has joined. 04:55:35 -!- bsmnt_bot has quit (Remote closed the connection). 04:55:40 -!- bsmnt_bot has joined. 04:56:19 -!- bsmnt_bot has quit (Remote closed the connection). 04:56:21 -!- bsmnt_bot has joined. 04:57:16 ~quit 04:57:16 uuuh 04:57:16 ~exec self.disconnect("") 04:57:16 greaaaat 04:57:16 uuuh 04:57:16 DIE 04:57:16 ~quit 04:57:16 ... 04:57:17 -!- bsmnt_bot has quit (Client Quit). 04:57:21 -!- bsmntbombdood has quit (zelazny.freenode.net irc.freenode.net). 04:57:21 -!- bsmnt_bot has joined. 04:57:51 -!- bsmntbombdood has joined. 04:58:02 -!- bsmnt_bot has quit (Remote closed the connection). 04:58:04 -!- bsmnt_bot has joined. 04:58:25 finally 04:58:25 foo 04:58:27 ok bot is broken 04:58:35 -!- bsmntbombdood has left (?). 04:58:37 -!- bsmntbombdood has joined. 04:58:39 -!- bsmntbombdood has left (?). 04:59:15 -!- bsmntbombdood has joined. 04:59:35 ??? 05:00:20 maybe it's just laggy 05:00:29 ok 05:00:35 ~exec self.save_callbacks("/bot/test.pickle") 05:00:43 no errors... 05:00:49 ~exec self.load_callbacks("/bot/test.pickle") 05:00:55 error. 05:01:11 ~quit 05:01:12 -!- bsmnt_bot has quit (Client Quit). 05:01:14 -!- bsmnt_bot has joined. 05:01:17 ~exec self.load_callbacks("/bot/test.pickle") 05:01:23 k 05:01:38 ~exec self.register_raw("testing", lambda x : False) 05:01:44 ~exec self.save_callbacks("/bot/test.pickle") 05:02:00 oh no 05:02:18 the bork 05:02:42 ~quit 05:02:57 -!- bsmnt_bot has quit (Remote closed the connection). 05:03:00 -!- bsmnt_bot has joined. 05:04:58 -!- bsmntbom1dood has joined. 05:05:54 -!- bsmntbombdood has quit (Nick collision from services.). 05:06:22 -!- bsmnt_bot has quit (Remote closed the connection). 05:06:25 -!- bsmnt_bot has joined. 05:06:57 argh 05:07:02 foo 05:07:17 -!- bsmntbom1dood has changed nick to bsmntbombdood. 05:07:29 k 05:07:32 there's like 30 seconds lag 05:08:03 -!- digital_me_ has quit ("Lost terminal"). 05:09:40 Yeah, you are netsplitting a lot. 05:18:48 Does anyone here have some elementary signal processing knowledge? 05:19:41 Not much. 05:19:54 I'll ask anyways :D 05:20:09 Thought so :) 05:20:25 In a typical computer DSP system, does a low pass filter just perform a DFT on the time domain signal and junk the frequency points at which you cap the filter? 05:21:28 OK, I even misunderstood the subject - I somehow thought you were speaking of of Unix signals :) 05:21:39 Meh :D 05:22:18 Alas, I am completely blank on that question. 05:22:20 Sukoshi, that'd sound sensible. 05:22:44 I don't know, but... that's how i'd do it. 05:24:24 (You can say anything you're now sure about as long as you remember to leave right after it ->) 05:24:50 :DD 05:25:22 ... ;D 05:27:54 Well, wikipedia didn't seem to turn up anything specific. 05:29:04 It's not a very common let's-have-coffee-over-it topic. 05:31:01 This seems the most relevant: http://en.wikipedia.org/wiki/Lowpass_filter#Passive_digital_realization 05:32:30 Actually it is rather specific, but whether it is frequently used it doesn't say. 05:33:36 I'm not talking about a filter. 05:33:44 I'm talking about a DFT and a chop-off. 05:35:19 Also, http://en.wikipedia.org/wiki/Digital_filter 05:35:50 It mentions Fourier transforms and essentially chop-offs as well. 05:35:59 Yup. That's good :) 05:40:02 foo 05:40:06 good, less lag 05:40:12 bar 05:40:12 let's try this again 05:40:16 ~exec self.save_callbacks("/bot/test.pickle") 05:40:22 oops 05:40:28 ~exec self.register_raw("testing", lambda x : False) 05:40:31 ~exec self.save_callbacks("/bot/test.pickle") 05:40:39 ~exec self.load_callbacks("/bot/test.pickle") 05:40:55 ~exec self.print_callbacks() 05:41:00 What's that bot written in? Python I'm assuming? 05:41:02 crap 05:41:05 Sukoshi: yeah 05:41:10 Thought so. 05:41:16 well, that borks 05:41:19 -!- bsmnt_bot has quit (Remote closed the connection). 05:41:21 -!- bsmnt_bot has joined. 05:42:06 ~exec sys.stdout.write(pickle.load(open("/bot/test.pickle"))) 05:42:06 [(<_sre.SRE_Pattern object at 0xb7d15bf0>, 'c\x03\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00C\x00\x00\x00s\x1e\x00\x00\x00|\x00\x00i\x01\x00d\x01\x00|\x02\x00i\x03\x00d\x02\x00\x83\x01\x00\x16\x83\x01\x00\x01d\x00\x00S(\x03\x00\x00\x00Ns\x07\x00\x00\x00PONG %si\x01\x00\x00\x00(\x04\x00\x00\x00t\x04 05:42:07 -!- bsmnt_bot has quit (Excess Flood). 05:42:09 -!- bsmnt_bot has joined. 05:42:50 ~exec sys.stdout.write([(i[0], marshal.loads(i[1])) for i in pickle.load(open("/bot/test.pickle")))) 05:42:56 ~exec sys.stdout.write([(i[0], marshal.loads(i[1])) for i in pickle.load(open("/bot/test.pickle"))) 05:43:08 ~exec sys.stdout.write([(i[0], marshal.loads(i[1])) for i in pickle.load(open("/bot/test.pickle")])) 05:43:40 ~exec sys.stdout.write( [(i[0], marshal.loads(i[1])) for i in pickle.load(open("/bot/test.pickle")] ) 05:44:08 Ok, I must be really tired if I can't get that to work 05:44:16 bedtime 05:45:10 ~exec sys.stdout( [ (i[0], marshal.loads(i[1])) for i in pickle.load(open("/bot/test.pickle"))] ) 05:45:10 [(<_sre.SRE_Pattern object at 0xb7cdfbf0>, ), (<_sre.SRE_Pattern object at 0x80d8660>, ), (<_sre.SRE_Pattern object at 0x80d8ea0>, ), (<_sre.SRE_Pattern object at 0x80d8898>, ), (<_sre.SRE_Pattern object at 0x80cde50>, ), (<_sr 05:45:11 e "/bot/ircbot.py", line 183>), (<_sre.SRE_Pattern object at 0x8057b20>, ), (<_sre.SRE_Pattern object at 0x80d2f60>, ), (<_sre.SRE_Pattern object at 0x80cd078>, E_Pattern object at 0xb7c90320>, at 0xb7c588e0, file "", line 1>)] 05:45:17 That's what I wanted 05:45:27 ok well night 05:45:34 feel free to play around with it 05:50:52 Yay spam. 05:50:58 yay 06:06:25 ~exec self.f_code = marshal.loads(pickle.load(open("/bot/test.pickle"))[0][1]) 06:06:36 ~exec sys.stdout(self.f_code) 06:06:37 06:06:59 ~exec self.f = types.FunctionType(self.f_code, globals()) 06:07:04 ~exec sys.stdout(self.f) 06:07:05 06:08:08 ~exec self.f() 06:08:25 oooh, that's the problem 06:08:41 It doesn't know if they are methods or not 06:09:40 I wonder how to resolve this 06:12:55 -!- RodgerTheGreat has quit. 06:13:06 How to make python think it's a method 06:13:15 Put it in a class. 06:13:27 Then it gets the wrong self 06:13:37 ooh 06:15:55 methods are weird 06:16:04 if we duplicate that weirdness, we win 06:21:40 argh, looks like we need to pickle the instance too 06:21:45 ~quit 06:21:46 -!- bsmnt_bot has quit. 06:21:48 -!- bsmnt_bot has joined. 06:22:02 ~exec self.save_callbacks("/bot/test.pickle") 06:22:03 -!- bsmnt_bot has quit (Excess Flood). 06:22:05 -!- bsmnt_bot has joined. 06:23:10 ~quit 06:23:11 -!- bsmnt_bot has quit (Client Quit). 06:23:13 -!- bsmnt_bot has joined. 06:23:14 ~exec self.save_callbacks("/bot/test.pickle") 06:23:15 -!- bsmnt_bot has quit (Excess Flood). 06:23:18 -!- bsmnt_bot has joined. 06:23:22 wtf 06:23:46 ~quit 06:23:47 -!- bsmnt_bot has quit (Client Quit). 06:23:49 -!- bsmnt_bot has joined. 06:23:50 ~quit 06:23:51 -!- bsmnt_bot has quit (Client Quit). 06:23:53 -!- bsmnt_bot has joined. 06:23:55 ~exec self.save_callbacks("/bot/test.pickle") 06:23:56 -!- bsmnt_bot has quit (Excess Flood). 06:23:58 -!- bsmnt_bot has joined. 06:24:18 ~quit 06:24:19 -!- bsmnt_bot has quit (Client Quit). 06:24:21 -!- bsmnt_bot has joined. 06:24:22 ~exec self.save_callbacks("/bot/test.pickle") 06:25:49 PicklingError: Can't pickle : it's not found as __builtin__.instancemethod 06:25:59 no, stupid, it's types.MethodType 06:27:45 we will tackle this in the morning 06:41:12 -!- oerjan has quit ("Good night"). 06:58:24 -!- ShadowHntr has quit ("End of line."). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:48:58 For aspiring Lispers everywhere, here's code that automates the Trapezoidal Rule and Simpson's Rule of estimating the area under the curve between an upper-bound a lower-bound according to a curve expressesd as a function func split up into n intervals: (will paste) 08:50:37 http://paste.lisp.org/display/34869 08:50:41 Feel the power. 09:16:38 -!- ihope_ has joined. 09:29:04 -!- ihope has quit (Connection timed out). 12:07:28 -!- oklofok has joined. 12:08:15 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 12:49:36 -!- oklofok has changed nick to oklopol. 13:11:53 Sukoshi: bah. Haskell could do that in the same number of lines I suspect, or fewer. 13:12:58 You should be showing off the real powerof Lisp: macros. 14:18:59 -!- jix has joined. 14:38:22 Sukoshi: (defun interval (low-bound up-bound n) (loop for i from low-bound to up-bound by (/ (- up-bound low-bound) n) collecting i)) 14:42:55 Haskell: interval l h n = [l, l + step .. h] where step = (h - l) / n 14:43:34 * SimonRC goes 17:26:33 -!- ShadowHntr has joined. 17:36:05 -!- ShadowHntr has quit (Client Quit). 17:46:48 -!- ShadowHntr has joined. 19:19:17 -!- ShadowHntr has quit ("End of line."). 19:21:22 -!- tgwizard has joined. 20:27:05 I wonder how many people in the world are looking at the clock. 20:27:39 And I wonder how many people have claimed January 11 2007 3:23:30 PM my time to be their own personal second. 20:27:59 I'm not that greedy. I'm declaring the third tenth of it to be mine. 20:28:26 From January 11 2007 3:23:30.2 PM to January 11 2007 3:23:30.3 PM... 20:40:36 STOP HOGGING MY TIME! 20:58:51 Well, wait a minute. 20:59:05 Average lifespan divided by world population... 21:01:56 Average lifespan seems to be 66 years. 21:02:49 According to Google, we end up with 0.319188164 seconds per person. 21:03:26 Might as well round that down to 0.31415926535. 21:05:07 -!- ihope__ has joined. 21:05:35 -!- ihope__ has changed nick to ihope. 21:06:51 Of course, the wealthy will get more time. 21:15:51 -!- CakeProphet has joined. 21:17:26 so, basically you just took what's yours 21:21:07 -!- ihope_ has quit (Connection timed out). 21:57:56 -!- ihope has quit ("http://tunes.org/~nef/logs/esoteric/06.08.09"). 22:01:38 -!- Sgeo has joined. 22:07:11 -!- CakeProphet_ has joined. 22:08:29 -!- CakeProphet has quit (Read error: 113 (No route to host)). 22:08:35 -!- CakeProphet_ has changed nick to CakeProphet. 22:11:45 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 22:57:50 -!- Sgeo has quit (Remote closed the connection). 23:24:29 -!- oerjan has joined. 23:37:11 ~exec self.save_callbacks("/bot/test.pickle") 23:37:37 #esoteric, where you can get your 0.3 seconds of fame... 23:37:57 ? 23:38:06 See the recent logs 23:40:13 ...? 23:42:56 What ihope_ said 2-3 hours ago. 23:44:10 Ircbrowse is horribly slow today, unless it's me. 23:44:13 oh 23:44:27 ~quit 23:44:27 -!- bsmnt_bot has quit. 23:44:56 -!- bsmnt_bot has joined. 23:44:58 ~exec self.save_callbacks("/bot/test.pickle") 23:45:05 yess 23:45:19 ~exec self.load_callbacks("/bot/test.pickle") 23:45:48 argh 23:45:50 ~quit 23:45:57 -!- bsmnt_bot has quit (Remote closed the connection). 23:45:59 -!- bsmnt_bot has joined. 23:46:09 ~exec self.load_callbacks("/bot/test.pickle") 23:46:36 -!- bsmnt_bot has quit (Remote closed the connection). 23:46:38 -!- bsmnt_bot has joined. 23:46:43 ~exec self.load_callbacks("/bot/test.pickle") 23:46:55 ~exec self.print_callbacks() 23:47:01 I DUN IT! 23:47:08 ~quit 23:47:09 -!- bsmnt_bot has quit (Client Quit). 23:47:11 -!- bsmnt_bot has joined. 23:47:26 ~exec self.register_raw("testing asdf", lambda x : False) 23:47:29 ~exec self.print_callbacks() 23:47:42 ~exec self.save_callbacks("/bot/test.pickle") 23:47:45 ~quit 23:47:46 -!- bsmnt_bot has quit (Client Quit). 23:47:48 -!- bsmnt_bot has joined. 23:48:16 ~exec print >> sys.stdout, self.raw_regex_queue[-1] 23:48:17 (<_sre.SRE_Pattern object at 0x80c7cd8>, at 0xb7c254c4>) 23:48:21 ~exec print >> sys.stdout, self.raw_regex_queue[-1].pattern 23:48:33 ~exec print >> sys.stdout, self.raw_regex_queue[-1][0].pattern 23:48:34 ^ERROR :Closing Link:.* 23:48:36 k 23:48:42 ~exec self.load_callbacks("/bot/test.pickle") 23:48:46 ~exec print >> sys.stdout, self.raw_regex_queue[-1][0].pattern 23:48:47 testing asdf 23:48:55 OOOOH HOO HOOO HOOOO! 23:48:59 it worked! 23:49:21 ~exec self.raw_regex_queue.pop() 23:50:02 ~exec self.register_raw(".*#esoteric.*DIE BOT DIE.*", lambda x, y : True) 23:50:17 ~exec self.save_callbacks("/bot/test.pickle") 23:50:22 ~quit 23:50:22 -!- bsmnt_bot has quit (Client Quit). 23:50:24 -!- bsmnt_bot has joined. 23:50:29 ~exec self.load_callbacks("/bot/test.pickle") 23:50:35 DIE BOT DIE 23:50:36 -!- bsmnt_bot has quit (Remote closed the connection). 23:50:37 -!- bsmnt_bot has joined. 23:50:40 WOOO HOOOO 23:50:49 I have succesfully serialized a function 23:51:16 I have successfully serialized YOUR MOM! 23:52:19 cool 23:53:56 it works! 23:58:16 * bsmntbombdood is bloody brilliant