00:11:34 -!- sebbu2 has quit ("@+"). 00:55:15 i made bf with wav output :P 01:09:37 hmmm 01:09:46 I wonder how to parse something like this: 01:10:03 := i 01:10:11 := * 01:15:28 oh, heh, nevermind 01:16:21 that took a whole 8 lines 01:21:13 http://pastebin.ca/364284 01:29:03 hmmm... it's odd how different my mindset was before I started programming. 01:29:10 "complex" had a positive connotation. 01:29:12 ? 01:35:41 oui 01:42:14 -!- oerjan has joined. 01:53:54 -!- ShadowHntr has joined. 02:05:05 -!- kxspxr has quit. 02:25:17 ~exec exec "x='floo'" in globals() 02:25:22 ~exec sys.stdout(x) 02:25:23 floo 02:25:28 cool 02:50:06 bsmnt so why doesn't the normal mode of execution simply go to the "globals"? 02:50:16 ~exec x = 2 02:50:17 because 02:50:25 ~exec sys.stdout(x) 02:50:25 floo 02:50:31 because that would make too much sense right? 02:50:36 no 02:50:44 because then the locals aren't available 02:50:51 self, for example 02:50:53 what locals? 02:51:13 sure they are. 02:51:22 self isn't a local... in this context it's a global. 02:52:02 no, it's local 02:52:03 doesn't exec take two environment arguments, one for the globals and one for the locals? So you could have both. 02:52:10 yes. 02:52:11 it does. 02:52:17 uh huh 02:52:24 self is a variable name... 02:52:35 but if you say something like "x=2", x goes in the locals 02:52:40 it's neither local nor global... it's whatever you decide to put it in. 02:53:00 self isn't in globals() 02:53:00 in my opinion it would be more convient to simply (and more intuitive) to treat everything as globals.. 02:53:18 ~exec global x; x = 2 02:53:38 ~exec sys.stdout.write(x) 02:53:38 2 02:54:08 but then you couldn't do tricks like ihope's extra bot inside the bot 02:54:22 it doesn't make any sense to, nor is it even useful to, by default, bind variables to a temporary local scope. 02:54:24 I think you could 02:54:51 I could copy the globals dict, then add the need locals into i 02:54:52 t 02:55:17 i suppose. 02:55:38 ....just make self a global. 02:55:39 ~exec pprint.pprint(locals(), sys.stderr) 02:55:52 but if self is global you cannot have two bots! 02:55:55 SevenInchBread: no 02:56:02 wrong... you cannot have two selfs. 02:56:07 ~exec pprint.pprint(locals(), sys.stdout) 02:56:08 {'command': 'pprint.pprint(locals(), sys.stdout)', 02:56:08 'message': ':bsmntbombdood!n=gavin@about/copyleft/user/bsmntbombdood PRIVMSG #esoteric :~exec pprint.pprint(locals(), sys.stdout)', 02:56:08 'r': <_sre.SRE_Match object at 0xb7c55cc8>, 02:56:08 'self': <__main__.IRCbot instance at 0xb7c4208c>} 02:56:17 so that works 02:56:38 hmmm... 02:56:40 uno momento 02:56:46 threading would mess up horribly then, wouldn't it? or do threads have different global directories? 02:56:50 I really don't like using the global declaration. 02:57:11 no... they all seem to share a global directory... 02:57:19 no, globals is the same 02:57:37 so it doesn't work, because multiple execs run in separate threads. 02:57:48 what doesn't work? 02:57:50 and they might need different selfs. 02:58:05 it doesn't work to make self global. 02:58:14 of course not 02:58:26 ~quit 02:58:27 -!- bsmnt_bot has quit. 02:58:29 -!- bsmnt_bot has joined. 02:58:36 it would work... if each bot were a different process. 02:58:48 SevenInchBread: then NOTHING would work 02:59:00 ...? 02:59:08 ~exec pprint.pprint(locals(), sys.stderr) 02:59:38 ~exec x=1 02:59:43 ~exec sys.stdout(x) 02:59:52 damnit 03:00:00 it still goes into a local scope 03:00:18 ~exec sys.stdout(self) 03:00:19 <__main__.IRCbot instance at 0xb7bd508c> 03:00:40 it looks like it generates an empty local scope if you dont' give it one 03:01:09 ~exec x= 42; pprint.pprint(locals(), sys.stderr) 03:01:14 hm... can you pass it globals(), globals() ? 03:01:32 i'll try 03:01:45 you could. 03:01:54 ~quit 03:01:55 or just {}, globals() if you wanted.... 03:01:55 -!- bsmnt_bot has quit (Client Quit). 03:01:57 -!- bsmnt_bot has joined. 03:02:06 ~exec x = 32 03:02:08 that would make global declarations act screwy though... 03:02:11 ~exec sys.stdout(x) 03:02:18 nope 03:02:21 weird 03:02:21 so globals(), globals() would be best. 03:02:25 still gebrochen? 03:02:37 gebrochen? 03:02:43 mock german 03:02:43 oh, damn 03:02:50 I was making a copy of the dictionary 03:02:55 so nothing could be added 03:02:55 ...yeah 03:03:04 I was about to say... that would work. 03:03:07 but without making a copy, I can't put self into it 03:03:22 sure you can. 03:03:31 no, you can't 03:03:43 that will break 03:03:52 ~quit 03:03:53 -!- bsmnt_bot has quit (Client Quit). 03:03:56 -!- bsmnt_bot has joined. 03:03:56 globals().update({"self":self}) 03:03:56 Sheesh. Rewrite the bot in Erlang or something :) 03:04:00 ~exec x = 23 03:04:14 ~exec sys.stdout(x) 03:04:15 23 03:04:18 yeah 03:04:23 ~exec sys.stdout(self) 03:04:24 huzzah 03:04:31 or or just globals["self"] = self 03:04:31 NameError: name 'self' is not defined 03:04:37 no, SevenInchBread 03:04:45 globals()["self"] = self 03:04:47 because globals are shared 03:04:52 so? 03:05:00 and self must not be shared. 03:05:09 so you can't have more than one bot running 03:05:10 if you rewrite self each time... it effectively doesn't matter. 03:05:16 threads 03:05:28 execs can run simultaneously 03:05:38 all the execs running use the last exec executed's self 03:05:41 and will, if some are long-running computations 03:05:53 so just fork a new process like a sane person. 03:06:14 What, sane persons, in #esoteric? Perish the thought. 03:06:35 with forks, none of the cool tricks are possible 03:06:55 basically... you want to preserve the locals. 03:07:05 so... give each bot a local dictionary? 03:07:21 and then... all the bots share a glolbal dictionary? 03:07:27 hmmm 03:07:40 it seems kind of obvious now that I think about it... 03:07:47 i thought that was the way it was working already 03:07:56 a global declaration in this case means "all bots can share" 03:07:58 nope 03:07:58 nope... 03:08:03 one sec 03:08:10 locals are basically just discarded after a thread is executed. 03:08:51 ~quit 03:08:52 -!- bsmnt_bot has quit (Client Quit). 03:08:55 -!- bsmnt_bot has joined. 03:08:58 ~exec x=12 03:09:12 ~exec pprint.pprint(locals(), sys.stderr) 03:09:19 yay! 03:09:23 ~exec sys.stdout(x) 03:09:23 ~exec sys.stdout(x) 03:09:23 12 03:09:24 12 03:09:34 ~exec pprint.pprint(locals(), sys.stdout 03:09:36 ~exec pprint.pprint(locals(), sys.stdout) 03:09:39 {'x': 12, 'self': <__main__.IRCbot instance at 0xb7c0008c>} 03:09:43 eh, wait, are you making the local directory persistent? 03:09:47 yeah 03:09:48 weird stuff 03:10:04 each bot has it's own locals dictionary 03:10:17 makes sense... really. 03:10:57 the threads might run over each other still 03:11:09 makes managing scopes between bots far less of a pain in the long run. 03:11:31 might delay updates to the dictionary untill finished executing 03:12:03 hmm... yeah... that might be a good idea. 03:12:10 except not 03:12:23 still conflicts 03:12:26 so two processes on the same thread don't like... murder each other. 03:13:04 what is wrong with the old idea that execs that wanted persistence add attributes to self? 03:13:08 basically... python's scoping makes inter-process memory weird. 03:13:20 but it works great for normal stuff. 03:13:26 oerjan: i dunno 03:14:16 well.. the problem with that is that functions defined on self don't have the closure of their local scope. 03:14:36 which is an unexpected behavior in Python 03:14:39 ~exec foo = lambda : self 03:14:47 ~exec sys.stdout(foo) 03:14:47 at 0xb7c01684> 03:14:51 ~exec sys.stdout(foo() 03:15:02 gAH I HATE THE INSERT KEY 03:15:04 ~exec sys.stdout(foo()) 03:15:17 NameError: global name 'self' is not defined 03:15:20 bargle 03:15:27 like that. 03:15:31 i thought the expected behavior in Python is that scope hardly makes sense ;) 03:15:44 closures are broken 03:15:57 eh... scope makes sense in Python... to me anyways... but that's because I've been using it... a lot. 03:16:09 i don't understand scope in python 03:16:40 everything is local unless stated otherwise. 03:16:47 mm hmmm 03:17:16 and a closure is just an encapsulation of the globals() at the time of definition. 03:17:55 so... any idea of what's causing self to be undefined? I'm thinking it might be something with the way you have it set up... can I see the source? 03:19:10 bsmntbombdood.mooo.com/chroot_ircbot.py 03:20:38 argh 03:20:45 I think it would be cool if python.exe could take URLs as pathnames. 03:21:02 so it would interpret a program off of a URL. 03:21:41 this needs a script to start i 03:21:42 t 03:27:34 there, mime types are better 03:29:47 * oerjan suddenly has a realization: mime types cannot possibly handle sound data. 03:37:22 oerjan: this configuration is equivalent to adding attributes to self 03:37:34 just now it's implicit 03:38:49 but what if an exec needs private local variables? 03:39:12 it can't 03:39:24 it could previously 03:39:26 ...that's kind of a weird choice. 03:39:57 now you're just moving the namespace to self.__dict__... when you could easily just keep a special self.localnamespace dictionary. 03:40:10 what? 03:40:14 that's what i'm doing 03:40:25 self.locals 03:40:28 Python's scoping is very good for handling three scopes (a thread scope, a bot scope, and an all-bot scope) 03:40:35 you have the source 03:40:45 oh? 03:40:46 er... isn't 03:40:48 very 03:40:51 good 03:40:57 oh, yeah 03:41:24 Python basically just recognizes two scopes... I kind of wish it could use a list of scopes. 03:41:37 localest scope all the way to globalest :) 03:41:51 that's how i did it in my mini lisp interpreter 03:44:06 SevenInchBread: you do realize you're completely wrong, right? 03:44:32 >.> ...that sounded really arrogant. :) 03:48:25 What am I wrong aboutZ 03:48:40 >>> def foo(x): 03:48:40 ... def bar(y): 03:48:40 ... def baz(): 03:48:40 ... print x,y 03:48:40 ... return baz 03:48:42 ... return bar 03:48:45 ... 03:49:16 >>> foo(1)(2)() 03:49:16 1 2 03:49:21 Right. 03:49:44 that's a closure... either way... a Python variable still only have two scopes it can be found in. 03:49:52 i see a bunch of scopes here. 03:50:09 x can be found in the scope of foo, the scope of bar and the scope of baz, and those are all different scopes. 03:50:11 yeah... but only two are used to look up a variable. 03:51:17 to look up x from baz, we check baz, then bar, then foo. 03:51:40 no... we check the functions closure... which is one namespace. 03:51:55 it doesn't "slide upwards"... although that's the effect given. 03:53:12 huh? 03:57:13 well no.. 03:57:20 I take that back... functions have -three- namespaces. 03:57:39 still, that's not a list. :/ 04:00:49 #raw names 04:01:00 ~raw names 04:01:02 -!- bsmnt_bot has quit (SendQ exceeded). 04:01:06 lol 04:01:22 -!- bsmnt_bot has joined. 04:01:41 -!- bsmntbombdood has changed nick to xor. 04:26:01 -!- calamari has joined. 04:32:35 xor: Do you know that the xor operation can be defined on ordinal numbers? ;) 04:32:43 heh 04:32:54 I wonder if there's a way to find xors non-bitwisely 04:33:28 Xor is "nimber" addition, and nimbers can be identified with ordinals. 04:33:41 nooooooo! 04:34:11 I know i^j = (j & i) - (j | i) 04:34:14 Alas, it also boils down to ordinals having base 2 representations. 04:34:49 Any base too... the omega base was the one previously mentioned as "Cantor normal form" 04:35:32 You mean i^j = (j | i) - (j & i) 04:36:15 And that works because the bits in the second part are all set in the first, so - requires no borrow and becomes bitwise. 04:38:38 Do you know Nim? 04:39:17 Basically if you have three heaps, of size x, y and z, then the first player loses iff x == y ^ z. 04:39:49 Which is equivalent to x ^ y ^ z == 0 04:40:33 It may not be practical, but there is no mention of bits in it :) 04:41:28 (Assuming both players play perfectly, as usual in mathematical game theory.) 04:42:18 And relax, ordinals are not mentioned either unless your heaps are infinite. 04:42:34 i don't get it 04:42:53 each turn you add one to a heap? 04:43:24 No, each turn the player takes as many iterms as he wishes from one heap. 04:43:28 *items 04:43:31 oh 04:45:36 It turns out there is a large class of games that can all be reduced to Nim and assigned nimbers to their positions. 04:46:02 chess? :) 04:47:24 Not chess, at least not easily. The games should have the property that there are no fundamental differences between the players, each position can in principle occur for each, with the same allowed moves. 04:48:09 In addition, all games must end. 04:48:40 (Well-foundedness, through which the ordinals creep in if you have infinitely many positions) 04:49:55 The nimber of a position is easily defined recursively: It is the smallest natural number (from 0) that cannot be the nimber of the position after the player has moved. 04:50:15 *natural = ordinal, if games are infinite. 04:51:04 Oh, and one final property, the first player who cannot make a move loses. 04:51:14 And there are two players. 04:52:00 For Nim, the nimber of a single heap is its number of items, naturally. 04:52:27 For several heaps you can prove that it is the xor of the heap sizes. 04:53:40 The first player loses iff the nimber is 0. 04:55:50 -!- goban has quit (Read error: 60 (Operation timed out)). 04:56:07 -!- goban has joined. 05:13:23 -!- digital_me has quit ("Lost terminal"). 05:29:19 -!- oerjan has quit ("leaving"). 06:20:56 -!- Sgeo has quit (zelazny.freenode.net irc.freenode.net). 06:20:56 -!- meatmanek has quit (zelazny.freenode.net irc.freenode.net). 06:20:56 -!- sp3tt has quit (zelazny.freenode.net irc.freenode.net). 06:20:57 -!- ShadowHntr has quit (zelazny.freenode.net irc.freenode.net). 06:20:58 -!- cmeme has quit (zelazny.freenode.net irc.freenode.net). 06:20:58 -!- puzzlet has quit (zelazny.freenode.net irc.freenode.net). 06:20:59 -!- bsmnt_bot has quit (zelazny.freenode.net irc.freenode.net). 06:20:59 -!- SevenInchBread has quit (zelazny.freenode.net irc.freenode.net). 06:21:29 -!- bsmnt_bot has joined. 06:21:29 -!- ShadowHntr has joined. 06:21:29 -!- Sgeo has joined. 06:21:29 -!- SevenInchBread has joined. 06:21:29 -!- puzzlet has joined. 06:21:29 -!- meatmanek has joined. 06:21:29 -!- sp3tt has joined. 06:21:29 -!- cmeme has joined. 06:23:03 -!- nooga has quit (Remote closed the connection). 06:23:08 -!- nooga has joined. 06:57:30 -!- calamari has quit ("Leaving"). 06:58:28 -!- ShadowHntr has quit ("End of line."). 07:05:25 -!- GreaseMonkey has joined. 07:06:17 -!- GreaseMonkey has quit (Client Quit). 07:06:41 -!- GreaseMonkey has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:20:21 about that: http://fukung.net/v/720/school.gif 08:20:25 ruby kills u all 08:20:39 500.times {print "yadda yadda"} 08:24:30 -!- oklobot has joined. 08:24:52 !exec 500["yadda yadda"PrntNlDrp1SubDbl] 08:24:55 Huh? 08:24:56 yadda yadda 08:25:00 yadda yadda 08:25:03 yadda yadda 08:25:07 yadda yadda 08:25:10 -!- oklobot has quit (Read error: 104 (Connection reset by peer)). 08:25:12 yeah yeah 08:28:21 but in ruby it's more elegant :> 08:29:10 YOU are more elegant. 08:29:10 !*",211yadda yadda,3500 08:29:13 Huh? 08:29:23 !sadol !*",211yadda yadda,3500 08:29:25 BDSM: Invalid argument types for '*': string, integer (index: 1, row: 1, col: 2) 08:29:30 heh 08:29:34 old interpreter ;p 08:29:41 :) 08:30:05 -!- GreaseMonkey has quit ("gnight"). 08:30:21 i added that to oklobot quite late to 08:30:22 *oo 08:30:47 it's still not turing complete :P 08:31:12 nooga i have a lot shorter quicksort than the page 08:31:19 sow me 08:31:21 show* 08:31:38 i'll search... no idea where it is 08:33:01 okay... was in a folder named posakdif 08:35:13 -!- Sgeo has quit (Remote closed the connection). 08:36:18 http://www.pastebin.ca/364621 08:37:05 i had a lot shoter one than that... put i did some very strange things 08:37:11 and it failed from time to time 08:37:15 cool 08:37:37 but you must admit that reversed quine is genious 08:37:43 something like using then same operator many times... 08:37:46 i don't remember 08:37:48 :D 08:38:04 (7:C",228!R!C!"7822,"R:!R!"9822,"C:7(:R",228(7:C",2289"!R!:R",2287"!C!RR!C!"7822,"R:!R!"9822,"C:7( 08:38:11 the beauty 08:38:24 yeah it's pretty cool :D 08:38:48 7( in the end... eof can be there? 08:39:07 it's within a string 08:40:09 hard to say, i can't read that anymore 08:40:15 :D 08:40:25 need to make indents 08:40:25 ':' is? 08:40:42 where? 08:40:43 what? 08:40:53 what's : 08:40:55 i forgot 08:40:59 in that quine, to see the structure 08:41:05 :ab --> a=b 08:41:30 haven't played with sadol after you were here last 08:41:42 ow 08:42:14 ! 08:42:15 ? 08:42:17 Huh? 08:42:18 ! does? 08:42:21 Huh? 08:42:25 well.. bbl, classes start in 10 mins 08:42:36 ! first 08:42:39 Huh? 08:42:49 ! prints 08:42:51 Huh? 08:42:57 though so 08:42:58 have fun 08:43:03 rtfm ;p 08:43:20 http://esolangs.org/wiki/SADOL here's the cheat sheet 08:49:30 haha 08:49:39 i just came up with trecursion :) 08:50:23 it's neat, gotta come up with a lang around it 09:43:13 -!- oklofok has joined. 09:43:14 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 09:57:20 -!- oklodok has joined. 09:57:22 olp. 09:57:39 pop. 09:57:43 -!- oklofok has changed nick to oklopol. 09:57:52 %out oklodok 09:57:56 -!- oklodok has left (?). 10:23:57 -!- nazgjunk has joined. 10:31:37 -!- ais523 has joined. 10:37:07 -!- UpTheDownstair has joined. 10:37:57 -!- nazgjunk has quit (Read error: 104 (Connection reset by peer)). 10:40:14 -!- UpTheDownstair has changed nick to nazgjunk. 10:51:30 -!- nazgjunk has quit ("Bi-la Kaifa"). 11:08:17 -!- nazgjunk has joined. 11:16:32 I was impressed with Keymaker's Underload interpreter in Brainfuck 11:16:56 so I wrote a Brainfuck (minus input) to Underload compiler: http://pastebin.ca/364737 11:21:18 !help daemon 11:21:21 Use: daemon Function: start a daemon process. 11:21:48 !daemon ul bf http://www.bf-hacks.org/hacks/uload.b 11:22:01 !ul (Hello, world!)S 11:22:18 !ps 11:22:21 2 ais523: ps 11:23:38 !help bf 11:23:39 To use an interpreter: Note: can be the actual program, an http:// URL, or a file:// URL which refers to my pseudofilesystem. 11:24:26 !daemon ul bf http://www.bf-hacks.org/hacks/uload.b 11:24:30 !ps 11:24:34 3 ais523: ps 11:24:38 " can be the actual program" means you can write the binary there i assume? 11:24:55 You can write the source code straight in, like this: 11:24:57 oh 11:25:02 it's not the interpreter 11:25:04 !bf +++++++++++++++++++++++++++++++++++.+.+.+.+. 11:25:06 #$%&' 11:25:07 :) 11:25:15 yeah 11:25:27 but for some reason, daemoning the Underload compiler doesn't seem to take 11:25:28 i reada quickly, though program meant the interpreter 11:25:31 *read 11:25:36 !help 11:25:38 help ps kill i eof flush show ls bf_txtgen usertrig daemon undaemon 11:25:40 1l 2l adjust axo bch bf{8,[16],32,64} funge93 fyb fybs glass glypho kipple lambda lazyk linguine malbolge pbrain qbf rail rhotor sadol sceql trigger udage01 unlambda whirl 11:26:22 !daemon ul bf8 http://www.bf-hacks.org/hacks/uload.b 11:26:26 !ps 11:26:30 4 ais523: ps 11:27:49 !daemon dup bf >+[>,]<[<]>[>.]<[<]>[>.] 11:27:53 !ps 11:27:56 5 ais523: ps 11:28:04 !dup Hello, world! 11:28:26 That's strange, there's no output but there isn't an error message either. 11:28:35 !this makes no sense and should cause an error message 11:28:38 Huh? 11:28:47 !undaemon dup 11:28:50 Process 4 killed. 11:29:55 !daemon dup bf >++++++++++++++++++++++++++++++++[>,----------]<[<]>[++++++++++.>]<[<]>[>.] 11:30:05 !dup Hello, world! 11:30:08 *Hello, world!Hello, world! 11:30:42 The problem seems to be that EgoBot is interpreting newline as newline (10), not EOF 11:31:03 !undaemon ul 11:31:06 Process 3 killed. 11:31:08 * oklopol slaps EgoBot 11:31:10 !undaemon ul 11:31:24 !ps 11:31:26 3 ais523: ps 11:31:40 There are still two broken daemons lying around, it seems 11:31:49 !undaemon ul 11:31:58 !help eof 11:32:00 Use: eof Function: send EOF to a process 11:32:07 That looks promising 11:32:22 !bf http://www.bf-hacks.org/hacks/uload.b 11:32:31 !ps 11:32:34 3 ais523: bf 11:32:36 4 ais523: ps 11:32:48 !i 3 (Hello, world!)S 11:32:51 !eof 3 11:32:54 Hello, world! 11:33:33 !kill 1 11:33:34 Process 1 killed. 11:33:36 !kill 2 11:33:38 Process 2 killed. 11:33:40 !ps 11:33:42 1 ais523: ps 11:34:25 !help usertrig 11:34:28 Use: usertrig Function: manage user triggers. may be add, del, list or show. 11:34:57 !bf-textgen +[] 11:35:00 Huh? 11:35:06 !bf-txtgen +[] 11:35:10 Huh? 11:35:20 !bf_txtgen +[] 11:35:50 45 +++++++++[>+++++>++++++++++>><<<<-]>--.>+.++. [473] 11:36:21 I'm sure that >><< bit can be shortened 11:37:50 :P 11:40:54 !bf http://www.bf-hacks.org/hacks/uload.b 11:41:55 !i 1 (:aSS):aSS 11:41:57 !eof 1 11:42:00 (:aSS):aSS 11:42:09 Underload is a good language for writing quines in 11:43:10 StringIO's eof check in python? 11:45:28 I can't figure out the context of your last comment 12:02:16 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 12:02:26 -!- oklopol has joined. 12:36:30 i've asked this before 12:36:31 but 12:37:02 can i reach a var of the parent functions in a subfunction 12:37:10 in python 12:37:47 def oso: 12:37:48 a="" 12:37:48 def b: 12:37:48 a="adsf" 12:37:48 b() 12:37:48 print a 12:38:52 hmm... globals might be the answer, can a global be global in a function? 12:39:07 def oso: 12:39:08 a="" 12:39:08 def b: 12:39:08 global a 12:39:08 a="adsf" 12:39:08 b() 12:39:10 print a 12:43:24 i feel leetish when i write an interpreter and then close python without saving :) 12:43:42 "lol i can rewrite this in 5 min" 12:54:32 -!- helios24 has joined. 12:54:46 python 2.5 won't work... something about a refused connection... 12:54:49 :\ 12:54:50 wtf 12:57:46 is there True?true_stuph:false_stuph in python? 12:57:54 cond?true_stuph:false_stuph in python? 12:58:39 python 2.5 works fine until i click ok on these all-ways-on-to error messages 12:58:51 after which it quits 12:59:03 *always-on-top 12:59:05 :) 12:59:21 ~exec sys.stdout(true?"True":"False") 12:59:37 seems as though Python doesn't have a ?: operator 12:59:52 ~exec sys.stdout("The previous line would have worked if I had a ?: operator") 12:59:52 The previous line would have worked if I had a ?: operator 13:01:37 True 13:01:49 ~exec sys.stdout(True?"True":"False") 13:02:08 ~exec sys.stdout(("True" if True else "False")) 13:02:33 ~exec sys.stdout((if True then "True" else "False")) 13:03:19 ~exec sys.stdout((["True" for i in [True] if i]+["False"])[0]) 13:03:20 True 13:03:27 ~exec sys.stdout((["True" for i in [False] if i]+["False"])[0]) 13:03:27 False 13:03:38 handy, i must say -____- 13:07:55 def cond_to_for(cond,true,false): 13:07:56 ([true for i in [cond] if i]+[false])[0] 13:07:57 hmph 13:08:03 i don't know how to use exec it seems 13:16:34 http://www.pastebin.ca/364857 13:16:46 i have some serious mental problems :< 13:16:54 exec... wtf, this is metaproggin 13:17:44 -!- helios24 has quit ("Leaving"). 13:39:17 -!- jix has joined. 13:39:20 (23)+(23,6424)+(23534,653) -> (23,23,6424,23534,653) <<<<<< how is that done? 13:39:23 in python 13:39:35 + is not right 13:49:58 -!- helios24 has joined. 13:54:11 -!- helios24 has quit (Client Quit). 13:54:43 -!- ais523 has quit ("/quit"). 13:56:13 -!- helios24 has joined. 13:56:17 y00 13:56:21 sup? 14:03:33 is there something like StringIO in haskell? 14:03:40 it would be a cheat of course 14:03:49 but i suppose you have one anyway 14:04:07 python's StringIO, the one bsmntbombdood used 14:18:02 -!- helios24 has quit (Remote closed the connection). 14:22:23 -!- tgwizard has joined. 14:22:51 huh 14:24:00 well 14:24:37 http://strlen.com/aardappel/index.html this might be interesting 14:25:08 -!- helios24 has joined. 14:26:01 yeah, wouter's a pro 14:26:28 yeah, but false is not as good as sadol :d 14:28:33 :X 14:29:08 sorry to say but it is :\ 14:29:08 well, i like it more 14:29:15 YEAH! 14:29:38 what really lacks in sadol is classic higher order functions 14:30:30 sadol is completely functional but not in the normal wa 14:30:34 way 14:32:41 when i designed it i didn't even know what is lambda ;d 14:34:26 -!- oklofok has joined. 14:34:32 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 14:36:49 ;p 14:43:25 -!- oklofok has changed nick to oklopol. 14:43:48 once i had an idea to write simple lisp interpreter in SADOL 14:43:55 ;d 14:45:31 we all snap from time to tim 14:45:33 *time 14:46:38 :D 14:46:44 but it's possible 14:46:54 and even not so hard 14:47:19 but it requires enormous amoun of time I don't have 14:48:58 true 14:58:25 g2g 14:58:26 bbl 15:10:26 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 15:11:06 -!- oklopol has joined. 15:39:50 -!- goban has quit (Read error: 104 (Connection reset by peer)). 15:58:11 -!- goban has joined. 16:08:20 -!- goban has quit (Read error: 104 (Connection reset by peer)). 16:08:43 -!- goban has joined. 16:09:03 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 16:09:13 -!- oklopol has joined. 16:18:06 -!- goban has quit (Read error: 104 (Connection reset by peer)). 16:18:23 -!- goban has joined. 16:25:43 My compiler lecturer is a bastard. 16:26:16 Basically our assignment is: "This is a 1.24M-instruction machine code program. Make it faster." 16:29:56 -!- goban has quit (Operation timed out). 16:30:59 -!- crathman has joined. 16:31:53 -!- goban has joined. 16:34:35 SimonRC: He's really just a programmer using a class of students to cheat for his company :P 16:35:05 SimonRC that sounds fun imo 16:35:32 That sounds like quite possibly the least fun thing imaginable. 16:36:12 "Tedius" would be a better word. 16:37:02 Plus an o in there :P 16:37:25 well, if you do it manually 16:37:27 i wouldn't 16:37:40 i assume it's a metaprogramming task 16:45:45 Ah, I forgot to mention... 16:45:51 It is for a VM 16:45:56 A 2200-year-old VM 16:46:06 http://www.boundvariable.org/um-spec.txt 16:46:17 oklopol: indeed it is 16:46:36 After all, he has just taught us about optimisation. 16:47:34 -!- oklofok has joined. 16:47:35 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 16:51:18 yeah 16:51:23 then i'd find it fun 16:51:28 maybe i'm sick somehow 16:51:31 -!- oklofok has changed nick to oklopol. 16:52:05 my project in the uni is to create a jave class that can randomize a poker hand and check for straight and flush... 16:52:08 *java 16:53:23 basically a 20 minute job max, but it required a plan that has to be checked before implementation... plus a 5 page documentation 16:53:29 *requires 16:53:44 actually, the example documentation is 15 pages 16:55:05 The assignment is supposed to be about 10h work. 16:56:23 maybe, would take longer for me, prolly 16:57:37 -!- SevenInchBread has quit (Read error: 145 (Connection timed out)). 17:01:59 -!- FabioNET has joined. 17:02:35 -!- FabioNET has quit (Remote closed the connection). 17:03:51 -!- sp3tt has quit (Read error: 54 (Connection reset by peer)). 17:08:28 -!- FabioNET has joined. 17:43:50 -!- sp3tt has joined. 17:46:50 -!- sp3tt has quit (Read error: 104 (Connection reset by peer)). 17:48:07 * SimonRC goes. (Bizarre coursework: http://www.dur.ac.uk/s.r.clarkstone/ASAM%20Compilers%20coursework.eml ) 17:49:50 -!- ais523 has joined. 17:51:13 -!- sp3tt has joined. 17:54:18 -!- sp3tt has quit (Read error: 104 (Connection reset by peer)). 17:57:37 -!- sp3tt has joined. 18:01:17 -!- sp3tt has quit (Read error: 104 (Connection reset by peer)). 18:05:59 -!- sp3tt has joined. 18:29:36 -!- sebbu has joined. 18:31:54 dur 18:38:57 hm 18:42:54 I'll have to complain again about a lack of context, after reading the previous two lines and today's logs 18:47:52 !bf http://www.bf-hacks.org/hacks/uload.b 18:48:21 !i 1 (:*)(:::::::*******)^(*)~^S 18:48:23 !eof 1 18:48:25 **************************************************************************************************************************************************************************************************************************************************************** 18:50:26 . 18:50:32 ? 18:53:14 -!- sp3tt has quit (Read error: 54 (Connection reset by peer)). 18:55:52 I was getting EgoBot to run Underload 18:56:11 * GregorR doesn't know what underload is ^^ 18:56:23 http://esolangs.org/wiki/Underload 18:56:58 I can't daemon Keymaker's interpreter, though, because it expects EOF at the end of the program rather than newline 18:57:18 Aww :( 18:57:36 It could be modified ... but BF is sort of write-only coding ^^ 18:58:18 It shouldn't be too hard; the start of the program looks like a EOF-seeking routine to read the whole program, which could be modified independently 18:58:49 Anyway, I was sufficiently impressed with the Underload interpreter in BF that I wrote a BF (minus input) to Underload compiler: http://pastebin.ca/364737 18:59:10 -!- sp3tt has joined. 19:03:39 !daemon ul bf http://pastebin.ca/raw/365170 19:03:49 !ul (Hello, world!)S 19:03:52 Hello, world! 19:03:59 Whoot 19:04:00 !ps 19:04:00 -!- sp3tt has quit (Read error: 104 (Connection reset by peer)). 19:04:04 1 ais523: ps 19:04:08 !ps d 19:04:12 1 GregorR: ps 19:04:21 OK, so it closes after receiving one line ;) 19:04:25 The modified version ends after it runs one program, though 19:04:31 Crossed messages... 19:05:18 -!- ais523 has quit ("I have to go home"). 19:09:40 -!- sp3tt has joined. 19:22:49 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 19:25:13 -!- oklofok has joined. 19:42:50 -!- sp3tt has quit (Read error: 131 (Connection reset by peer)). 19:56:02 -!- sp3tt has joined. 20:00:12 -!- oklofok has changed nick to oklopol. 20:04:44 -!- voodooattack has joined. 20:28:13 -!- crathman has quit ("Chatzilla 0.9.77 [Firefox 2.0.0.1/2006120418]"). 21:22:43 -!- wooby has joined. 21:39:29 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 22:47:51 -!- sebbu has quit ("@+"). 22:51:46 -!- goban has quit (Read error: 54 (Connection reset by peer)). 22:51:59 -!- goban has joined. 23:12:39 -!- nazgjunk has changed nick to na[zZz]gjunk. 23:15:30 exercise: write a turing-machine evaluator in the lambda calculus. 23:15:50 evil exercise: write a lambda-calculus evaluator for the turing machine 23:15:57 :-P 23:16:00 * SimonRC goes for a bit 23:16:29 heh 23:16:42 * xor just wrote a ski calculus interpreter 23:19:01 unparse(simp(parse("```S`KKIx"))) ==> "`Kx" 23:22:35 -!- tgwizard has quit (Remote closed the connection). 23:22:45 unparse(simp(parse("```S``SI`KS`KKx"))) ==> "``xSK" 23:24:40 :) 23:25:18 * oklopol has nothing clever to say 23:25:19 -!- SevenInchBread has joined. 23:25:37 * oklopol leaves feeling embarrassed --> 23:25:54 hmmm... interesting. 23:26:03 Anyone heard of the term "rope" as a datatype? 23:26:22 I just read about it. 23:26:26 <-- 23:26:30 url 23:27:18 It's basically a binary tree of arrays of characters (a tree of strings). 23:27:58 omg! --------------> 23:28:21 so to concatenate ropes you just make a new node, with the two ropes being the branches. 23:29:19 ? 23:32:26 IT apparently makes concatenation operations faster... at the expense of a few extra chunks of memory lying around. 23:36:56 I wonder how to make it reduce things like S(KK)I automatically 23:37:30 (using extensionality) 23:37:51 hmm... well... 23:38:36 let's see... I don't know if ropes would actually make anything faster. It lightens the burden of the concatenation operation... but in doing so it makes it less straightforeward to traverse. 23:38:58 concantenation of strings is only O(n) 23:40:27 well... that adds up when you insert values onto strings continuously. 23:41:42 -!- FabioNET has quit (Client Quit). 23:47:48 -!- wooby has quit.