00:47:22 -!- kipple has quit (Read error: 110 (Connection timed out)). 03:34:36 -!- calamari has joined. 03:34:41 hi 03:48:34 bye 03:48:36 -!- calamari has quit ("Leaving"). 04:01:49 -!- marcan has quit (Connection timed out). 04:15:14 -!- marcan has joined. 04:19:03 -!- Sgep has quit. 05:45:39 -!- GregorR has joined. 07:31:59 -!- kipple has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:33:21 -!- Keymaker has joined. 09:54:24 * Keymaker thinks about writing a brainfuck program that prints out its own amount of instructions as integer 10:14:41 this isn't what i originally had in mind, but it looks nice :) 10:14:42 ++-++-++-++-++[>++++++++<-]>+++.. 10:24:11 here is a bit shorter version, that looks better 10:24:14 >>>+++++[>++++++++++<-]>+.---. 10:29:57 here's a 32-byte version that prints a new-line too 10:29:59 >++++++++++[>+>+++++<<-]>>+.-.<. 10:47:58 -!- int-e has joined. 11:45:05 -!- Keymaker has left (?). 12:48:22 -!- Keymaker has joined. 12:49:03 what is wrong with this python code? 12:49:05 m = [1, 2, 3, 0] 12:49:05 while m[i] > 0: 12:49:05 print m[i] 12:49:49 don't you need to increment i? 12:49:58 yes, 12:50:02 but that whole thing doesn't work 12:50:27 * kipple doesn't know python :( 12:50:33 :( 12:50:44 i'm not very familiar with this either, as you can see ;) 12:50:49 lemme think 12:51:19 NameError: name 'i' is not defined 12:51:25 that's quite a clue, isn't it? 12:51:41 no 12:51:44 add a i = 0 before the loop and it's an infinite loop 12:52:04 i = 0 12:52:04 m = [1, 2, 3, 0] 12:52:04 while m[i] > 0: 12:52:04 print m[i] 12:52:04 i += 1 12:52:07 hmm 12:52:09 fun 12:52:14 i thought i tried it already :) 12:52:25 thanks 12:52:43 i thought python didn't need variable defining 12:53:25 hmm, that's not quite true. (obviously) 12:53:39 but you don't need to declare the variable before assigning a value to it 12:53:44 ah 12:53:48 for a in m: 12:53:48 print a 12:53:58 (that's slightly different though, it prints the 0, too) 12:54:08 (and goes past the 0 if the list is longer) 12:57:17 for a in m: 12:57:17 if a == 0: 12:57:17 break 12:57:17 print a 12:57:36 (ok. that's the obvious alternative if you don't need the index later - I'll stop now) 12:57:44 :) 13:07:31 i hate normal languages.. grhh 13:08:17 Hmm. I think Python is very neat. 13:44:13 done; http://koti.mbnet.fi/yiap/stuff/selfmd5.py 13:45:03 neat 13:45:32 it's md5 (and output) is (or at least should be) b1f532d69db9c1366389ff855da9ae04 13:47:50 ", ".join(map(str, [45,45,45])) -> "45, 45, 45" 13:48:07 you might like this :) 13:48:47 (it works on arbitrary lists, of course) 13:48:57 of numbers. 13:49:18 hmm. actually strings don't hurt either 13:49:35 (but Python prefers to print them with '') 13:49:43 i can't get it working 13:49:48 perhaps my python version is too old 13:50:13 hmm. 13:50:28 -!- jix has joined. 13:50:44 how old is 'old'? 13:50:55 could be few years 13:51:02 moin 13:51:06 hi 13:51:08 I have 2.4.2 - which is fairly modern. 13:51:28 it works in 2.3 too 13:52:29 2.3.3 is says 13:53:01 hmm, do i need to have anything else in the file than that code line? 13:53:11 did you strip off the ' -> [...]' part? 13:53:17 nope 13:53:22 you should, sorry 13:53:29 oh, ok 13:53:42 the interpreter was complaining about "->" part 13:54:07 I just used it to show the result on the same line. 13:54:23 ok 13:54:53 useful line of code 13:56:16 consider nothing obvious when talking to me about something ;) 13:56:44 * jix is working on a emulator... 13:56:46 +n 13:56:50 what kind of? 13:56:55 colecovision 13:57:00 what's that? 13:57:09 some z80 game-device 13:57:19 ah 13:57:23 using sound and graphic chips from TI 13:58:09 nice :) 13:58:17 how do you know how it works? 13:58:58 there are internet sites that describe the hardware 13:59:06 ah 13:59:34 and i know how the z80 works by viewing offical and inoffical z80 documentation 13:59:55 ok 14:03:05 s = ['print s', 'print "\\n".join(s)'] 14:03:05 print "s = ", s 14:03:05 print "\n".join(s) 14:03:10 python quine :) 14:03:21 nice :) 14:03:22 hmm, one space too much. 14:03:31 should be print "s =", s 14:03:36 ok 14:03:52 s = ['print "s =", s', 'print "\\n".join(s)'] 14:03:52 print "s =", s 14:03:52 print "\n".join(s) 14:03:58 that's better 14:04:19 (the fun thing is that python quotes strings inside lists when printing lists) 14:06:12 you can exploit the same thing with the str() function 14:06:22 so it can be used for the md5sum program as well 14:07:13 ruby port: 14:07:14 s = ["puts 's = '+s.inspect","puts s"] 14:07:14 puts 's = '+s.inspect 14:07:14 puts s 14:33:39 -!- Keymaker has left (?). 16:28:59 -!- Keymaker has joined. 16:32:48 247 bytes is quite impressive. 16:33:39 yeah 16:35:36 it's amazing how the task got optimized 17:05:59 -!- int-e has quit ("Bye!"). 17:31:49 -!- lindi- has quit (Read error: 113 (No route to host)). 17:52:02 -!- Keymaker has left (?). 20:33:03 -!- Sgep has joined. 20:56:58 -!- Keymaker has joined. 21:25:56 bf-hacks.org has been updated with a new program i made up today! 21:25:58 http://bf-hacks.org/hacks/ptmbsg.b 21:26:21 it's a Prouhet-Thue-Morse binary sequence generator 21:26:39 i think it's one of my best programs. check it out :) 21:39:15 one of my best programs (sort) not the shortest sort but very short: >>,[[-[->>+<<]+>>]<+<[-<<]>>,]+[>[-<.>]<[->>+<<]>>+] 21:39:27 what it does? 21:39:35 it sorts all input bytes 21:39:41 ah 21:39:43 cool 21:40:17 uses 0 for eof... 21:40:45 ok 21:41:25 that kind of thing has once been in bf golf if i remember correct. if you had been around at that time you would've placed well 21:41:34 (i wasn't around at that time, btw) 21:42:14 the version at short.b (where the shortest hw is in) is 1 or 2 bytes shorter than mine 21:42:38 so, that's pretty good solution ;) 21:48:03 bf golf? 21:48:13 brainfuck golf 21:48:17 brainfuck.sourceforge.net 21:52:30 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 23:00:53 me go 23:00:55 -!- Keymaker has left (?). 23:03:18 -!- kipple has quit ("See you later").