00:09:46 -!- RedDak has quit (Remote closed the connection). 00:49:02 -!- Tritonio has joined. 00:53:59 ehird`: Any further clues on PEBBLE in PEBBLE? 00:54:17 pikhq: no, i haven't tried today :( sorry 00:54:19 what?!?! 00:54:24 pikhq: tomorrow, though, i'll do it 00:54:26 It's pebbles all the way down! 00:54:30 bsmntbombdood: i'm going to write a pebble compiler in pebble 00:54:41 and vanquish the evil tcl... from my version, at least. 00:54:50 i mean, the compiler for pebble looks pretty trivial 00:55:00 but, no string manip in PEBBLE iirc, so a bit harder 00:55:03 for some reason i just started downloading 2gb of nigel kennedy >_< 01:02:45 -!- sebbu has quit ("@+"). 01:08:05 -!- pikhq has quit (Read error: 104 (Connection reset by peer)). 01:10:28 -!- pikhq has joined. 01:26:45 pikhq: hmm, what would pebble-in-pebble mean for pfuck? 01:26:50 i'm sure there's some profound implication 01:31:13 XD 01:31:25 would the universe explode? 01:31:28 would it go 50 times faster? 01:35:02 :) 01:35:12 pikhq: IT WOULD ENVELOP AWESOMENESS INTO ITS COMPILED CODE 01:36:13 -!- oerjan has quit ("Late very good"). 01:36:17 It would merely be amusingly recursive. 01:36:28 So, distro: 01:36:36 pebble.b src/lotsofstuff.pebble 01:36:52 pebble.b, compiled with PFUCK, running under a C version of PEBBLE, compiled by pebble.b 01:36:56 Understand THAT! 01:37:47 pebble compiles pebble.bfm. pfuck compiles pebble.b. gcc compiles pebble.c. pebble comipiles pfuck.bfm. pfuck compiles pfuck.b. gcc compiles pfuck.c. 01:37:52 ;) 01:38:01 (bfm? that's pebble, right?) 01:38:12 (I use the .bfm prefix still) 01:38:18 (s/pre/post/) 01:38:22 ok, right, i'll explain, in PEBBLE/tcl and PEBBLE/pebble: 01:38:32 PEBBLE/tcl, long time ago, compiles pebble.bfm 01:38:34 LATER 01:38:41 wait 01:38:50 PEBBLE/tcl, long time ago, compiles pebble.bfm to-C: now it's PEBBLE/pebbleC 01:38:51 LATER 01:39:05 PEBBLE/pebbleC runs PFUCK, compiles pebble.bfm 01:39:27 (producing PEBBLE/pebbleBF) 01:39:50 of course, since PEBBLE/pebble's output - BF and C - will not always be identical to PEBBLE/tcl 01:40:02 there are more iterations of PEBBLE/pebbleC compiling pebble.bfm to-C in "LATER" 01:41:17 :D 01:41:22 pikhq: crazy, no? 01:41:41 I'd consider pebble.bfm to be *another* implementation of PEBBLE; I'd still maintain pebble.tcl. ;) 01:41:47 And, yeah, that is crazy. 01:41:50 of course 01:42:10 * pikhq assumes pebble.bfm, for a first run, at least, would not support optimization, language-specific macros, etc. 01:42:24 pebble.tcl is needed! 01:42:25 (For bootstrapping, of course. What do you mean, it may be useful as an implementation? Pff. Surely you jest. pebble.tcl would not come out of my hands originally! My logic is infallable. I do not suffer from NIH-overload.) 01:42:37 yeah, i would implement those after though 01:44:00 i'm heading off now 01:44:10 pikhq: pebble.bfm - the revolution begins tomorrow! ;) 01:44:35 -!- ehird` has quit (Read error: 104 (Connection reset by peer)). 01:45:07 -!- RodgerTheGreat has joined. 01:45:17 hi everyone 01:45:50 XD 01:46:31 * pikhq wants to see how ehird handles the "source" command. 02:30:16 Someone appears to be suggesting that ais523's 2,3 Turing machine proof is inaccurate. . . 02:31:02 haha 02:31:13 link 02:32:27 oh i see on slashdot 02:33:03 We of #esoteric should make the news by fixing that. ;p 02:33:19 what's FOM? 02:36:53 and what did we fix? 02:38:45 it's funny that a single mailing list post is enough for slashdot to post 02:39:11 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)). 02:39:26 I'd need to review the proof quite thouroughly before being sure the mailing list post is at all correct. 02:42:22 ...as would anyone 02:42:28 Yeah. 02:48:09 -!- Sgeo has joined. 02:51:54 aww feck, homeworkd 02:55:36 homeworkd(1): Assigns homework based on crond scheduling. 02:56:43 lold 02:57:08 i should learn IPA 02:58:27 (instead of doing my homework) 02:59:19 transcription to extended ipa would be a fun speach compression method 03:33:18 I recently came up with what I think is a fairly robust BF "While x> constant n: do code" construct 03:33:44 I will use the notation n(stuff) to represent "stuff" being repeated n times 03:34:11 x, tmp and flag are variable cells, and zero is initialized to be a constant zero 03:35:01 x [ flag [-] n( [x - tmp + ) [ code flag + zero ] n( ] ) tmp [ - x + tmp ] flag ] 03:35:07 what do you guys think? 03:35:42 Clever. 03:35:46 :) 03:45:37 I think it might be possible to do with fewer cells, but 1 cell for x and an overhead of 3 doesn't seem too bad for a reasonably high-level construct 03:58:50 Is there a good general approach to string generation when you allow temporary space, or do most people do it with genetic algorithms/ brute force/ dynamic programming? 03:59:30 Define "good". 03:59:37 And the amount of temporary space. 04:00:37 let's say three cells 04:01:01 and the emphasis is on a "good, general" approach rather than simply a "good" approach 04:05:46 Well, you *could* do what PEBBLE does. . . 04:05:53 there needs to be a better algorithm for it 04:05:55 pikhq: what's that? 04:06:01 It ain't terribly good, but it's general. 04:06:25 I am quite curious 04:06:38 bsmntbombdood: It just uses two-cell wrapping implementations of the constants to add and subtract from a cell. . . 04:06:46 lame 04:06:53 the algorithm is very straightforward if you try generating strings from a single cell 04:06:56 hm 04:07:03 It doesn't work too badly for a naive algorithm. 04:07:28 I suppose that'd generate decent output, but clearly far from optimal 04:10:00 i think i'm going to work on an algorithm 04:10:42 go for it, dude 04:12:08 If it's good, I may well include it in PEBBLE. 04:14:15 maybe try to find numbers that meet a balance between being the most common in the target string and the furthest apart from one another? 04:24:28 -!- Tritonio has quit (Remote closed the connection). 04:42:55 I'm looking at this "while". If n=3 then it translates as 04:42:59 x tmp flag zero 04:42:59 [>>[-][<<->+[<->+[<->+[code>+>]]]]<<[-<+>]>] 04:43:00 ? 04:45:23 that looks correct 04:45:48 geez, i haven't coded in a while 04:46:00 i'm getting confused >_< 04:47:15 That can't be right. For one thing, it has a ][ in it. 04:47:50 yes. removing the ][, you get [>>[-]<<[-<+>]>] 04:47:53 what's the brainfuck for taking [n, 0, 0, ...] to [n, n*2, n*3, ..., n*m, 0, 0 ...]? 04:48:12 which never executes the code. 04:48:17 ttm: ah... whoops 04:48:46 good catch- you need to move to x after zeroing flag, before you begin the if block 04:49:01 bsmnt how confident are you that all values will fit in a byte? 04:49:09 ttm: perfectly 04:49:22 Okay. Let's think then. 04:49:30 m is below floor(n/256) 04:49:44 *m = floor(n/256) 04:50:55 x tmp flag zero 04:50:55 [>>[-]<<[->+[<->+[<->+[code>+>]]]]<<[-<+>]>]? 04:51:59 yeah 04:58:52 Hm. Still can't be right. [>>[-]<<[->+<[->+<[->+<[code>>+>]]]]<<[-<+>]>] is probably getting closer... 05:00:24 that really depends on what's in code 05:01:24 bsmnt is m stored in memory, and are we okay with wiping it out? Or is it constant? 05:08:35 the two things that must occur in the main [] set with code are that flag is set to "true" (nonzero), and we move to constant zero to break out of all our nested brackets 05:08:57 That's clear. 05:11:32 What's not entirely clear is how the outermost loop is supposed to match up. We started it at x, and we end it at flag. So we need some code near the start of the outermost loop to resynch the pointer location...and we also need to leave ourselves a way, after we break out of that outer loop, to check on whether we went through it at all. 05:16:42 that's the purpose of flag 05:17:13 if we make it to the innermost loop and execute code, flag is set, and we continue the main while loop, and it's reset for the next iteration 05:22:26 Yeah...but if we end the main while loop at flag, when we started it at x, then the code will not be acting on the same things unless we add other code to insure the pointer is at the same place in both cases. 05:22:59 Whereas if we start the main loop at flag both times, then it won't have the correct value at first unless we add extra code first to set it... 05:26:57 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 05:30:29 well, I need to sleep. I'll look this over again in the morning, and think about some revisions 05:30:41 Good night and good luck. 05:30:55 thanks for helping me find my mistakes 05:31:01 -!- RodgerTheGreat has quit. 05:57:33 ttm: constant 05:58:19 and the code is [>+>++>+++<<<-] 05:58:44 etc 06:00:20 although that would get inneficient when n is small 06:10:42 Ah. I was trying to figure the most concise way to do it with variable m. 06:12:00 it would be cool if there was a way to do it without all the redundant +s 06:14:30 Well, if you put m just to the right of where you want the last one to end up, you can do [<[+<]+[>]<-] 06:14:58 where does that start? 06:15:08 at m. 06:15:58 i don't think that works 06:20:06 And...you're right. You can do it once, but it won't work right twice let alone n times. 06:20:41 -!- DawnLight has joined. 06:22:16 /bed 06:26:09 It works if you space them out. for m=5 we have >>>>>>>>>>>>>>,[<<+++++[<[+<<]+[>>]<-]<[<<]>>[[<+>-]>>]>-]<<<<.<<.<<.<<.<<. 06:33:02 my god 06:39:50 There should be some really clever concise way to do this without using so much apparatus. But I'm not seeing it right now. 07:37:53 -!- DawnLight has quit (Read error: 110 (Connection timed out)). 07:51:14 -!- DawnLight has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:21:02 i need a command that will print a certain number of byes from a serial port and quit! 08:21:40 a command in what language 08:22:17 a linux command 08:22:25 doh 08:23:03 cat works the way it does because files have endings but /dev/ttyS0 doesn't 08:23:31 that's also true about inotail and dog doesn't read it at all 08:25:30 try 'head -cNUMBER_OF_BYTES /dev/ttyS0' 08:27:28 immibis: yay! 08:28:12 thanks 08:32:32 -!- immibis has quit (Read error: 104 (Connection reset by peer)). 09:54:38 -!- jix has joined. 10:34:37 -!- AnMaster has joined. 11:49:59 -!- RedDak has joined. 12:22:08 -!- sekhmet has quit (Read error: 110 (Connection timed out)). 12:25:25 btw, somewhat insane optimizing brainfuck compiler coded in bash: http://rage.kuonet.org/~anmaster/bzr/index.py/get/bashfuck/head/bashfuck 12:25:31 there are still a few bugs to fix in it 12:25:56 it does have some problems with LostKng.b, some off by one error that I'm trying to find 12:26:35 s/compiler/interpreter 13:34:38 -!- lifthrasiir has quit (Remote closed the connection). 13:51:20 -!- puzzlet has quit (Remote closed the connection). 13:51:28 -!- puzzlet has joined. 13:53:50 -!- oerjan has joined. 14:01:01 -!- DawnLight has quit (Read error: 113 (No route to host)). 14:26:59 -!- puzzlet has quit (Remote closed the connection). 14:27:06 -!- puzzlet has joined. 14:27:25 -!- sekhmet has joined. 15:09:29 -!- ehird` has joined. 15:56:57 does any known BF interp optimize [+>-+<-] to []? 16:04:00 EgoBot prolly 16:04:05 that's a trivial optimization 16:04:36 "+-" -> "", "><" -> "", actually, many of my bf's would do that too 16:05:09 yeah 16:05:12 mine is going to do that 16:05:41 it'll optimize in a loop 16:05:49 first it'll see -+ 16:05:55 so [+><-] 16:05:58 then it'll see >< 16:05:59 so [+-] 16:06:02 then it'll see +-, so [] 16:06:04 and we're done 16:09:23 i assume it optimizes any string of + 16:09:24 ... 16:09:36 yeah 16:09:38 i assume it optimizes any string of +'s and -'s into one with just one of them 16:09:39 but that's how mine does it 16:09:41 yeah 16:09:49 i have a "modify" instruction 16:09:55 +-- is { modify, -1 } 16:10:07 yeah i did it that way too 16:10:20 fast 16:18:16 -!- RedDak has quit (Remote closed the connection). 16:26:18 oh dear 16:26:20 http://cs.nyu.edu/pipermail/fom/2007-October/012156.html 16:26:23 found this on reddit... 16:26:35 apparently it's wrong 16:26:36 but... 16:37:05 poor guy 16:37:12 indeed 16:37:30 people seem to be disagreeing 16:38:02 it's a fundamental added subtlety when you have things like CAs with infinite initial state 16:39:01 lool 16:39:06 this crappy page on pi is hilarious 16:39:08 "*known to be over 5 billion digits long" 16:39:31 (this is from 1997, and has MIDI background music) 16:41:06 * cherez chortles his posterior off. 16:41:17 ehird`: Where's this pi page? 16:41:29 http://members.aol.com/loosetooth/info.html 16:41:39 *the equivalent of 180 degrees when measured in radians 16:41:43 you know i don't think that's coincidential! 16:43:37 "If pi were just 3, then we wouldn't have circles at all!" 16:45:20 "At the end of most Macintosh source codes." 16:45:36 Whenever I port stuff to Mac, I define pi at the end of the file. 16:45:45 it's probably a magic number 16:46:00 hm 16:46:11 what's the most efficient way of parsing brainfuck [ ... ]s when using instruction structs? 16:46:17 (i.e. you can't store positions in code in a stack) 16:47:35 -!- DawnLight has joined. 16:50:43 is it ok if i come here once in a while asking questions that will probably be irrelevant to the channel but which i assume someone here may know the answer for? and they may be dumb questions. and they may be questions for which the answers may be a few pages of reading away from me. so can i do that? 16:52:25 well everyone here does that, but it would be nice if you were on-topic occasionally :) 16:52:29 no, this channel never gets offtopic, try asking something irrelevant and you get banned instantly 16:52:36 err... what oerjan said. 16:53:02 HEY, I LIKE PIE 16:53:15 we agree completely, as you can see 16:53:27 IN THE SKY 16:53:36 NEVERMIIIND THE WINDS 16:53:39 we agree completely IN THE SKY 16:53:55 * oerjan just learned that expression 16:53:59 did i guess the rest of the song correct? 16:54:16 oklopol: indeed 16:54:17 in the ski 16:54:31 so i'm gon' ask 16:54:38 ``sk`sii```ksi 16:54:53 >>> sk ``sk`sii```ksi 16:54:58 >>> ul ``sk`sii```ksi 16:55:00 -> ('s', 'k', ('s', 'i')) 16:55:01 i should rename that. 16:55:03 it's not unlambda.. 16:55:14 or better yet! i should make it unlambda ;) 16:55:19 >>> ul `ss 16:55:20 -> ('s', 's') 16:55:20 alas, it was just something i banged on my keyboard 16:55:22 >>> ul `s`sk 16:55:23 -> ('s', ('s', 'k')) 16:55:30 >>> ul `k`s`sk 16:55:31 -> ('k', ('s', ('s', 'k'))) 16:55:49 >>> ul ```sii``sii 16:55:50 -> [['i', ('s', 'i', 'i')], ['i', ('s', 'i', 'i')]] 16:55:55 That's Not Right 16:56:01 oerjan: tell that to your computer next time you just "bang on your keyboard" and erase all your files. 16:56:30 interesting 16:56:50 >>> ul ```sii``si.k 16:56:51 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk -> [['i', ('s', 'i', '.k')], ['.k', ('s', 'i', '.k')]] 16:57:02 yeah, it just terminates at some point 16:57:14 should i make it crash instead? 16:57:30 nah 16:57:30 -!- puzzlet has quit (Remote closed the connection). 16:57:35 -!- puzzlet has joined. 16:57:35 make it detect infinite loops 16:57:39 DAZ WHUTTI THOUGHT 16:57:41 as a mad genius to another, i say make it take over the world 16:57:53 MWAHAHAHA IT ALREADY DOES THAT! 16:57:55 store all previous states, if it returns to a previous state, output "infinite loop, reached [matching state]" 16:58:07 ski programs are not going to be big enough to make that slow :P 16:58:45 hm, what about making Alabama sink into the ocean? 16:58:57 that's a pretty useless optimization, since they only help with small progs like ```sii``sii, and irc bots never get short programs, it's always something huge. 16:58:58 i need a linux command that will take some ascii as stdin and give raw bytes in stdout. for example, i give it 400132 and it gives me three bytes, 40, 01 and 32 16:59:07 oklopol: oh come on 16:59:09 oklopol: it'll be fun 16:59:13 kay 16:59:15 wait 16:59:55 btw. don't use it while i code, i could disable it, but i trust you 17:00:05 * oklopol likes egging ppl on 17:00:21 hey, that's clever 17:00:27 a bf interpreter using mmap 17:00:30 to read in code 17:01:41 DawnLight: in hex? 17:01:52 oerjan: right 17:02:24 hm, can hexdump work in reverse? 17:02:47 does anyone know? 17:02:55 i mean you can't do a stack, with a struct 17:03:27 you can if it contains a pointer to the next one 17:03:42 right, but that's O(n) bracket matching 17:04:11 well obviously loops will be implemented as a unit 17:04:19 oerjan: i think not 17:04:26 what do you mean oerjan? 17:04:39 by stack-parsing 17:04:41 i mean like this does http://www.hevanet.com/cristofd/brainfuck/sbi.c 17:04:53 uh, i just love python sometimes, i need to reindent every line, because it decided "indentation mixes spaces and tabs" 17:04:58 even though it totally doesn't. 17:05:10 indentation using both is forbidden in python 17:05:13 you can either use tabs or spaces 17:05:24 errr... orly :) 17:05:32 um, you can have a stack of currently open loops being parsed 17:05:54 that stack could be a linked list 17:06:00 yeah 17:06:03 that's what sbi.c does, kind of 17:06:09 but is it the fastest way? 17:06:31 i'm trying to make the parsing very quick in this interp, because the optimization step will be very heavy 17:06:47 the interpreting part is already compact, so if i can get the parsing fast too... 17:06:51 then i can concentrate on optimizations 17:07:55 interpreting will take too little to notice compared to the optimization even if you *try* to make it slow. 17:08:36 of course 17:08:37 but parsing 17:08:39 is pretty big 17:10:31 okay, i'll make the loop checker now 17:10:39 got everything reindented :P 17:10:47 IDLE can do that for you 17:13:35 >>> sk ```sii``sii 17:13:36 Infinite loop detected 17:13:59 noo 17:14:02 make it output where it finds it 17:14:05 i.e. the frame that it finds to repeat 17:14:06 :D 17:14:11 oh 17:14:11 it'll be a debugger! 17:14:13 kay. 17:15:18 glah, why isn't there a "return from whole recursion", like in oklotalk :< 17:15:34 just return None 17:15:35 then 17:15:38 when you recurse 17:15:44 if (recurse) == None: return None 17:16:33 -!- sebbu has joined. 17:16:50 -!- puzzlet has quit (Remote closed the connection). 17:16:57 -!- puzzlet has joined. 17:17:25 -!- SEO_DUDE56 has quit (Read error: 104 (Connection reset by peer)). 17:17:37 whoops. 17:17:52 i just realized that is not a trivial problem 17:18:08 given my current implementation, that is 17:18:19 XD 17:18:23 its very simple 17:18:26 each reduction step 17:18:30 states.append(frame) 17:18:33 then, each reduction step 17:18:37 if frame in states: 17:18:54 self.say("OMG " + frame + " REPEATS") 17:18:57 -!- DawnLight has left (?). 17:19:01 lol 17:19:17 i do evaluation recursively 17:19:33 so? 17:19:38 it's not trivial in that case, but this won't take long anyway 17:19:44 so? :\ 17:20:04 i did exactly that, and now ```sii``sii evaluates i twice and says it's an infinite loop 17:20:14 it's not trivial, but it's easy 17:21:14 i mean, it's trivial if my next attemp works, if not, then i'll have to think a bit 17:21:54 okay 17:21:57 i think it's ready 17:22:06 >>> sk ```sii``sii 17:22:07 Infinite loop detected at [('s', 'i', 'i'), ('s', 'i', 'i')] 17:22:10 :D 17:22:16 >>> sk ``khs 17:22:17 -> h 17:22:55 i think i have a function to make that into an unlambda-like string, wait 17:23:05 >>> sk ``kh```sii``sii 17:23:06 Infinite loop detected at [('k', 'h'), [['i', ('s', 'i', 'i')], ['i', ('s', 'i', 'i')]]] 17:23:10 wtf 17:23:12 oh 17:23:13 no 17:23:14 that's right 17:23:16 i don't :< 17:23:18 hmm 17:23:25 it isn't lazily evaluating 17:23:27 it is? :\ 17:23:41 ``kxy should only evaluate x 17:23:55 well, not really 17:23:57 no 17:24:00 that is how it works 17:24:01 its lazy 17:24:04 this is the ski part of unlambda 17:24:13 == strict 17:24:22 but... 17:24:24 well its not unlambda 17:24:29 so make it SKI and make it lazy :-) 17:24:41 so, what IS the most efficient method of matching braces brainfuck? 17:24:45 i can make k, i'm not making it fully lazy. 17:24:47 presumably not looping through teh program 17:25:17 oh, actually, i'm not making even k lazy. 17:25:28 now that i glanced at my code, and saw i'd have to do something. 17:26:24 ehird`: when you see a [ you start the parser recursively? 17:26:39 oerjan: recursion is bad though :/ 17:26:42 oerjan: in this case 17:26:56 -!- jix has quit (Nick collision from services.). 17:27:06 -!- jix has joined. 17:27:15 equivalently, you push your current block on the stack, and start an empty one 17:27:33 that's pretty slow in this case though too 17:27:42 >>> sk `4 5 17:27:48 ..? 17:27:49 whut... 17:27:52 i just wonder, with my really simple struct what the most efficient way is to parse braces 17:27:55 >>> sk `45 17:28:01 that should return `45 :| 17:28:09 this is weird 17:29:50 i don't get it... 17:30:59 >>> sk ``s`kr``s``si`k.*`ki 4 17:31:00 -> ('s', ('k', 'r'), ('s', ('s', 'i', ('k', '.*')), ('k', 'i'))) 17:31:05 .. 17:31:25 >>> pl ^n`r``$n.*i 17:31:26 ``s`kr``s``si`k.`k* 17:31:35 >>> pl ^n`r``$n*i 17:31:36 ``s`kr``s``si`k*`ki 17:32:36 i'm pretty sure that worked in the past... 17:32:47 oh 17:32:47 >>> pl ^a$a 17:32:48 r. 17:32:50 i 17:32:58 >>> pl ^a^b$a 17:32:59 ``s`kki 17:33:02 um 17:33:05 im pretty sure that's k 17:33:43 it doesn't optimize, it does the trick on the unlambda page 17:33:58 >>> pl ^a^b$b 17:33:59 `ki 17:34:23 >>> pl `^x`$x$x^x`$x$x 17:34:23 ```sii``sii 17:34:26 (gosh that syntax is ugly) 17:34:30 pl works, no doubt about it, it's the sk i'm worried about 17:35:05 shouldn't `4 5 exponentiate 4^5 :\ 17:35:10 ... 17:35:12 what? 17:35:12 no 17:35:15 using the representation on the unlambda pge 17:35:15 it should return `45 17:35:16 *page 17:35:21 err kay. 17:35:31 >>> sk 4 17:35:32 -> ('s', ('s', ('k', 's'), 'k'), ('s', ('s', ('k', 's'), 'k'), ('s', ('s', ('k', 's'), 'k'), 'i'))) 17:35:35 oh 17:35:38 you have them defined 17:35:39 that is correct 17:35:40 as constants 17:35:41 but... 17:36:03 >>> sk ` ``s`k.i``s``si`k.*`ki 4 17:36:04 ****i -> i 17:36:08 :DDDDDDDDDDDDDDDDDDDDDDDDDD 17:36:11 >>> sk * 17:36:12 -> * 17:36:12 god i'm an idiot xD 17:36:15 >>> sk x 17:36:16 -> x 17:36:17 >>> sk `xx 17:36:18 -> ('x', 'x') 17:36:19 >>> sk ` ``s`k.i``s``si`k.*`ki ` 4 5 17:36:25 >>> sk ` ``s`k.i``s``si`k.*`ki ` 4 3 17:36:26 *********************************************************************************i -> i 17:36:28 >>> sk `*`ik 17:36:29 -> ('*', 'k') 17:36:34 >>> sk `45 17:36:38 >>> sk `4 5 17:36:38 kay, it works, i just fail @ unlambda. 17:36:44 >>> sk `4 5 17:36:49 >>> sk ` 4 5 17:36:51 wtf 17:37:09 4^5 is a big number, i also failed at math :)) 17:37:36 if the result is too long, it just produces no output currently 17:37:48 >>> sk `s`4 5 17:37:56 omg, where's my time! it's 19:37 already :< 17:38:03 * ehird` wonders how to do "for i=0 to i=N, ..." in ski 17:38:19 use a different representation 17:38:22 for that 17:39:31 You would think parsing [] really quickly would be simple. :-| 17:40:25 >>> ` ``s`k.i``s``si`k.o`k. sk ```s``si`k``s``s``s``si`ki`k`ki`k`ki`s``s`ksk`k`k`kk4 5 17:40:32 whoops. 17:40:35 >>> ` ``s`k.i``s``si`k.o`k. sk ```s``si`k``s``s``s``si`ki`k`ki`k`ki`s``s`ksk`k`k`kk6 5 17:40:54 >>> ```s``si`k``s``s``s``si`ki`k`ki`k`ki`s``s`ksk`k`k`kk 6 5 17:40:59 >>> sk ```s``si`k``s``s``s``si`ki`k`ki`k`ki`s``s`ksk`k`k`kk 6 5 17:41:00 lol. 17:41:00 -> ('s', ('s', ('k', 's'), 'k'), ('s', ('s', ('k', 's'), 'k'), ('s', ('s', ('k', 's'), 'k'), ('s', ('s', ('k', 's'), 'k'), ('s', ('s', ('k', 's'), 'k'), ('k', 'i')))))) 17:41:14 >>> sk ` ``s`k.i``s``si`k.o`k. ```s``si`k``s``s``s``si`ki`k`ki`k`ki`s``s`ksk`k`k`kk7 5 17:41:15 ooooooi -> . 17:41:25 that's... almost correct.. :< 17:42:57 oklopol> omg, where's my time! it's 19:37 already :< 17:43:08 me thinks you forgot to change to winter time? 17:43:18 lol, daylight savings 17:44:38 unless finland actually changes on a different day than most of europe 17:44:39 oerjan: it's not my birthday yet, but thanks for the hour, best gift i've ever gotten :) 17:44:55 or... 17:44:56 yay 17:45:04 it's backwards right? :P 17:45:16 o 17:45:19 (19:44:40) (oklopol) it's backwards right? :P 17:45:19 (18:44:50) (oklopol) o 17:45:22 success! 17:45:24 17:45 here 17:45:36 * ehird` wonders whether to mmap or getc repeatedly 17:45:36 * oklopol does a little dance 17:45:43 it seems like mmap would be more efficient 17:46:36 how would you use it? 17:48:31 umm 17:48:32 like mmap? 17:50:26 how would that help in parsing? 17:52:28 well 17:52:29 i just mean 17:52:31 for reading in 18:03:54 case O_JMP: 18:03:54 if ((arg && !tape[tapep]) || (!arg && tape[tapep])) { 18:03:54 i = i->arg2; 18:03:54 continue; 18:03:54 } 18:04:01 that's clever :-) no more [ and ] instructions 18:05:49 -!- RodgerTheGreat has joined. 18:10:44 -!- SEO_DUDE56 has joined. 18:10:49 ok, efficient interpreter - check 18:10:51 now to write the parser 18:10:52 :P 18:11:16 poll: mmap or getchar over and over? 18:11:53 mmap sounds nicer. 18:12:11 that's not helpf 18:12:13 ul 18:12:15 :P 18:31:09 -!- oerjan has quit ("Dinner from hazard"). 18:38:04 oh well 18:38:09 you are all very helpful 18:41:31 hmm 19:19:22 which is more efficient: 19:19:26 optimizing after parsing 19:19:30 or parsing and optimizing at the same time 19:32:16 mmap? 19:32:21 you can mmap stdin? 19:35:44 um 19:35:52 bsmntbombdood: no 19:36:01 about the whole turing-completess thing 19:36:04 my interpreter takes program file name as first argument 19:36:06 ^a 19:36:08 if we allow "non-repetitive infinite initial conditions" 19:36:20 wha? 19:36:23 i'm pretty sure that makes SMETANA turing-complete as well 19:36:27 http://forum.wolframscience.com/showthread.php?s=&threadid=1472 19:37:30 it would be a very simple structure, it has a "head" and then a "tail" consisting of identical pieces of code with different numbers (trivially generated by any process) 19:37:40 how can you solve the halting problem with an infinite starting condition? 19:37:58 bsmntbombdood: "infinite starting condition" means an infinitely big program. You can do a lot of stuff with infinitely big programs. 19:38:07 how... 19:38:23 lament: you cannot solve the halting problem with an infinitely big program unless you hardcode EVERY SINGLE PROGRAM and if it halts or not 19:38:32 ... generating that program is equivilant to the halting problem of course 19:38:50 ehird`: right, but the point is that you can :) 19:38:58 oh that's lame 19:38:59 ehird`: and he does say such programs are uncomputable 19:39:13 no dice if the starting condition is uncomputable 19:39:20 right 19:39:30 ais's starting conditions in the proof are computable 19:39:33 but infinite 19:39:38 so this guy claims that that's enough 19:39:49 but if that's allowed, then SMETANA should be turing-complete 19:40:30 you can represent a brainfuck "memory cell" with ~20 lines of smetana 19:40:40 so with an infinite smetana program, you can represent the entire brainfuck memory tape 19:43:50 so anyone have comments on my parsing/optimizing order? 19:44:00 i would think that i should do parsing first, then optimize 19:44:05 because i have my nice tokens to play with 19:45:10 ok 19:45:18 i'll flip a coin for mmap vs getchar 19:45:18 :P 19:45:32 no me understando 19:45:39 bsmntbombdood: for what 19:45:49 then again i've never understood mmap 19:46:15 well 19:46:19 i shall mmap the code file 19:46:28 mmap just maps N bytes of a file to a pointer 19:46:33 and lazily reads them out on read 19:47:01 the major difference, i think, here, is that i need to do a stat on the file before mmaping 19:47:02 that's it 19:47:09 but of course getc is more complex 20:05:35 we s;; lmpe yjsy vpm[;rc od nryyrt 20:05:44 *we all know that complex is better 20:07:09 -!- sebbu2 has joined. 20:23:08 -!- sebbu has quit (Connection timed out). 20:23:09 -!- sebbu2 has changed nick to sebbu. 20:25:16 hmm 20:25:41 changing +-+ to +(1) should be done at optimizing stage right? 20:25:44 not parsing stage 20:25:50 (alternatively, just ++ to +(2)) 20:33:11 anyone? 20:33:17 i'm thinking because i optimize away e.g. >< 20:33:17 so: 20:33:20 +><+ 20:33:22 should be +(2) 20:33:33 but it'll be +(1)+(1) if i do ++->+(2) at parse-time 20:48:37 after working on this interp for hours 20:48:44 i'm compiling it for the First. Damn. Time. 20:48:47 here comes the bugfixes. 20:59:10 hm 21:00:00 hmm 21:00:12 all the brainfuck optimizations i can think of just remove redundant code 21:00:18 not really speed it up in any way 21:00:24 (apart from +++++++ -> + stuff) 21:00:31 are there any REAL optimizations you can do? 21:00:37 i currently optimize [-]... 21:00:43 (and [+] of course) 21:00:49 (and then [+--], etc) 21:22:17 [->>++<<] and everything else of that form can be quite trivially optimized 21:23:30 in fact, any loop which has no net effect on the memory pointer and contains no nested loops 21:24:39 ok i have a brainfuck text generating algorithm but it's pretty sucky 21:28:23 ehird`: didn't you say you have tons of brilliant brainfuck optimization techiniques? 21:28:28 asd typoes. 21:28:58 i've been watching south park for like 5 hours. 21:29:07 blah 21:29:10 soon 21:29:11 code 21:29:14 . 21:29:17 must 21:32:29 +++++[>+++++<-]>[>+>++>+++>++++>+++++<<<<<-]>>>.>+++++.+++++++..+++.<<----.<++++++++.>>>>-.<.+++.------.--------.<<<+. 21:32:39 that's "Hello, world!" 21:33:33 erm, no it's not 21:33:52 oklopol: yes, but compiler suited 21:33:56 oklopol: not for an interp 21:33:57 ++++++++++++++++++++++++[>+>++>+++>++++>+++++<<<<<-]>>>.>+++++.+++++++..+++.<<----.<++++++++.>>>>-.<.+++.------.--------.<<<+. 21:34:00 that is 21:35:16 whoa, that's better than the hello world on the wiki 21:38:42 ehird`: i see. 21:38:57 i don't see a difference, really 21:38:57 bsmntbombdood: is it? 21:39:09 oklopol: optimizations that take ages to apply = compiler territory 21:39:18 yeah 21:39:32 ehird`: i see 21:39:56 oklopol: after all, speed is the goal :) 21:41:18 true, but no one cares about a delay that only occurs once 21:41:32 think about mandelbrot.b runtime 21:41:41 if the parsing+optimizing takes a long time 21:41:47 then it'll rank, on the whole, badly 21:41:55 "rank"? 21:42:06 compared to other interps 21:42:08 on the top10 of bf-interpreters? 21:42:18 the official list 21:42:22 the official list? 21:43:13 what kind of optimizations do you have that would take long to apply, and what's a long time? 21:43:29 1. everything non-trivial 2. everything that's slow 21:43:57 err... kay 21:44:06 now wanna answer at least one of those? 21:44:26 human nature is completely subjective 21:44:31 i cannot explain subjective things objectively 21:44:43 ...you can explain what you meant by a long time. 21:44:52 ok, let me elaborate 21:45:12 an optimization that takes a long time is an optimization where taking in account the time taken to apply it, it slows the interpretation process down on the whole 21:45:23 this of course does not matter for compilers - compiling time does not matter 21:45:54 ...okay, from now on, i'll just say not-orly everytime i don't feel like orlying what you say. 21:45:59 anyway, wanna answer the questions? 21:46:15 no 21:46:19 i see 21:48:40 what other big programs do people use to test their brainfuck interpreter? 21:48:46 right now i'm using mandelbrot.b and LostKng.b 21:59:39 anyone? 22:42:49 -!- RedDak has joined. 22:49:00 -!- ihope has joined. 22:53:17 "Leopard is so powerful, it makes Reddit's search function work right." 23:20:49 I see we are not discussing parser-based esoteric programming languages. This must be rectified. 23:21:01 parser-based? 23:23:55 Yes. Let me wrestle the logs and find it... 23:25:35 Mmf. ircbrowse.com's search feature seems non-functional. 23:31:17 Here we go! http://pastebin.ca/679421 23:31:58 ahh yes 23:32:24 show me a fibonacci generator and i'll be impressed 23:32:24 ;) 23:32:46 Is unary okay? :-P 23:33:03 sure 23:33:14 then write an unary->something else converter :-) 23:33:22 "it's modular" 23:33:27 I'll do the unary first. 23:33:37 Or maybe decimal would actually be easier. 23:33:51 easiest is probably binary 23:34:00 Oh, yes. 23:34:19 Then I guess I need a parser that parses stuff like 101|1000 into stuff like 1000|1101. 23:34:26 http://en.wikipedia.org/wiki/L-system#Example_2:_Fibonacci_numbers 23:34:29 that will be the simplest 23:34:34 you can EASILY do that in your language 23:34:49 Oh, of course. 23:34:56 it produces fibonacci numbers in unary 23:35:01 (B = A, of course) 23:35:13 so, wrap an unary->something else converter over that 23:35:13 and voila 23:36:01 * ihope nods 23:37:55 Halfway done: http://pastebin.ca/755820 23:37:57 Except not. 23:38:01 -!- oerjan has joined. 23:39:04 I'll finish it later! 23:39:23 Since I have to go eat and all. 23:40:00 bye :) 23:40:05 you havent been in here for ages 23:40:07 (Also, I forgot the period at the end.) 23:40:09 Bye. 23:41:16 i'm pretty sure that makes SMETANA turing-complete as well 23:41:57 indeed, i discussed that on the esoteric mailing list once upon a time 23:42:05 called it SMETANA+1 23:42:45 you'd think turing completeness would be an unambiguous consept 23:42:56 oklopol: it is 23:43:04 it's just hard to prove :-) 23:44:27 hmm 23:44:48 i wonder what the simplest pattern-matching-and-substitution language is that is TC 23:44:55 i.e. a mapping of state 1 to state 2 23:44:58 ehird`: i mean all these debates arguing over stuff like pointer-size-defined-when-program-starts (c) and initial-conditions-are-infinite-but-created-by-a-non-universal-machine (smetana, the 2,3 tm) 23:45:04 and the input to a program is transformed from state 1 to state 2 repeatedly 23:45:24 http://esoteric.sange.fi/archive/2001-q3 23:45:32 lament: ^^ 23:45:48 the first one is trivially not turing complete, but i'm not sure about the second one. 23:45:58 i trust ais 23:45:59 :) 23:46:13 heh 23:46:38 later i extended it to something called Moldau, in http://esoteric.sange.fi/archive/2001-q4 23:46:51 ais is quite inactive, i don't have a strong opinion on him 23:46:52 *them 23:47:36 markus is sounds finnish. 23:47:46 oerjan: i'm talking about regular smetana. 23:47:55 *-is 23:48:08 lament: Smetana+1 can be considered simply a notation for your infinite initial pattern 23:50:43 i think i'm doZzZering off here -> 23:50:45 Moldau on the other hand was seriously overkill, as i mentioned already in my initial post 23:50:51 *dosing 23:50:55 ----> 23:51:15 with only Goto, it was essentially continuation-passing Prolog 23:51:27 anyone? 23:51:33 i wonder how minimal you can get it 23:51:40 obviously less minimal than tode (@oklopol ;)) 23:53:51 :/