00:03:47 -!- Aardwolf has quit ("Leaving"). 00:07:26 5114 00:07:29 COME ON, BREAK 5000!!! 00:14:57 so it's already complete and working? 00:17:16 Huh? 00:19:26 what are you talking about? 00:19:35 you're shrinking the size of your checkers program, right? 00:22:30 my bf interpreter/compiler test-suite-scripts are done 00:23:00 it runs on a 99% cpu idle box with nice -20 00:23:11 400mhz intel celeren 00:23:13 celeron 00:23:26 now name interpreters / compilers to add! 00:23:34 Heheh. 00:23:44 No, I'm compressing the first 5 lines of the King James Bible. 00:23:47 Not for any good reason. 00:24:14 jix: egobfi :P 00:24:18 jix: qdb 00:24:36 jix: bff, bftools, brfd, yabfi2 00:25:29 afbi is the only interpreter i added atm 00:25:38 i'm going to add the other ones 00:25:41 And the only one I haven't listed :P 00:25:52 GregorR: hmm do you know afbi? 00:26:14 Not personally, would you mind introducing us? ;) 00:26:22 the interpreter 00:26:27 Yeah, I know. 00:26:41 http://www.harderweb.de/jix/langs/brainfuck/afbi.c 00:26:56 i wrote it for pgimeno's brainfuck interpreter speed-test 00:27:16 it's faster than brfd on ppc but slower on pgimeno's computer 00:30:34 lol 00:30:37 * GregorR compares it to egobfi 00:34:10 It would appear that I'm afbi-incompetent >_> 00:35:28 When I run it against mandelbrot.b, it drags my CPU into the mud and doesn't seem to do anything ... 00:35:32 Oh wait, it segfaulted. 00:35:57 * GregorR is perplexed. 00:38:13 hrmg 00:38:51 afbi has some problems with reallocating and computed gotos 00:43:30 I assume Mandelbrot works for you? 00:44:39 jix: obi2, wib, pibfi, awib 00:45:10 jix: this javascript interpreter: http://www.esolangs.org/svn/esofiles/brainfuck/impl/di.html 00:45:31 Umm, isn't wib a compiler? 00:45:35 And awib? 00:45:43 Or was he looking for compilers? 00:45:52 jix: this longer javascript interpreter: http://www.esolangs.org/svn/esofiles/brainfuck/impl/i.html 00:46:16 jix: If you do test both, please clearly mark them - obviously compilers will generally be faster. 00:46:41 jix: this interpreter in ORK: http://www.esolangs.org/files/ork/src/orkfuck.ork 00:46:58 jix: this interpreter in Kipple: http://www.esolangs.org/files/kipple/src/bfi.k 00:47:26 I can't believe I didn't mention orkfuck XD 00:48:00 GregorR: i will mark them 00:48:14 OK, good :) 00:48:41 hmm interpreters with program/input in one file arn't supported yet 00:48:53 uhm... they are.. 00:49:05 i have InterpreterSetup.prepare 00:54:17 BTW jix, what are your tests? 00:54:35 helloworld & mandelbrot atm 00:54:39 but i'm going to add more 00:54:47 I would recommend adding primes-up-to-200. 00:55:03 Merely because for some inexplicable reason, egobfi beats qdb with it, but not with mandelbrot :P 00:56:52 for compilers, you could also produce a second series of results, with the time taken to compile factored in 00:57:23 graue: i could.. if i rewrite my whole test-code 00:57:37 just a thought 00:57:38 OH! And also, you should be VERY careful to compile all the compilers with the same optimizations. 00:57:53 Some will default to -O3, some will default to -O0, they should all use -O2 for fairness. 00:57:53 GregorR: and interpreters too 00:58:02 Err, s/compilers/interpreters/ 00:58:03 all -O3 or? 00:58:09 -O3 breaks some things. 00:58:12 yes? 00:58:14 So I'd lean towards -O2. 00:58:24 ok 00:58:27 Most things don't break with -O2. 00:58:35 is egobfi default -O2? 00:58:41 Yes 00:59:02 make sure you compile Erlang, Ruby, and the JavaScript interpreter you use with -O2 as well 01:00:45 yes 01:01:02 If there's any interpreted interpreter that's actually FASTER than a C interpreter, I will be blown away. 01:01:51 optimizing interpreted interpreter vs unoptimized c interpreter? 01:02:14 Hmmmmmmmmmmmmmmmm, then it might get close. 01:02:22 I guess it would depend on the interpreter of the interpreter. 01:03:10 theres a bug in my test-code 01:03:33 See, nobody's seen it yet, so you didn't need to tell anybody, and we would have never thought you were capable of writing bugs ;) 01:07:04 if i run the command manually it works 01:07:09 but from the script it doesnt 01:07:31 What's the command, what's the language, how are you calling it? 01:08:42 it's ruby i use system and the command is nice -n -20 sudo -u jannis time -o /tmp/to -f "%e %S" ./qdb /home/jannis/interpretertest/b/helloworld.b > /home/jannis/interpretertest/b/helloworld.out.cmp 2>/dev/null 01:08:53 uhh %U where underline starts 01:09:36 Well, for one, there's no reason to run it through sudo, that will only effect the real time, not the user/system time (which are the only valuable ones) 01:09:50 It may be that sudo wants a password there, and can't possibly get one. 01:09:57 GregorR: nonono 01:10:06 i start the script as root because i want to nice it 01:10:08 Err, nice rather. 01:10:18 Sorry, I meant "there's no reason to nice it there" 01:10:18 but i don't want the interpreter as root 01:10:22 ok 01:10:42 Because nice would only effect real time, which is irrelevent, it's user/sys time that are important, and they're unaffected by nice. 01:11:56 same problem 01:12:12 Today on #esoteric, Gregor solves nothing! 01:12:13 but only qdb fails egobfi doesn't 01:12:54 I would continue to try to help diagnose, but I've actually got to go. 01:13:05 So, I'll see y'all later, hope to see some interesting results at some point ^_^ 01:13:20 later 01:13:57 /usr/bin/time: cannot run ./qdb: No such file or directory wtf? 01:14:29 It could be that your script silently chdir'd somewhere, I would try using a full path. 01:14:40 (or worse, the interpreter silently chdir'd somewhere) 01:14:44 ahh found the bug 01:14:54 no the interpreter may chdir anywhere 01:15:00 i'm chdiring back at the end 01:15:12 Incidentally, I'm not here 8-D 01:15:13 but i used always the dir of the first interpreter for all interpreters 01:20:37 fixed 01:25:28 bff added 01:28:49 GregorR: whats the current size? :) 01:35:03 g'night 01:36:12 -!- jix has quit ("Bitte waehlen Sie eine Beerdigungnachricht"). 01:59:26 -!- calamari_ has quit ("Leaving"). 02:17:37 -!- kipple___ has quit (Read error: 110 (Connection timed out)). 05:54:19 -!- graue has quit (Read error: 110 (Connection timed out)). 05:57:28 -!- cmeme has quit (Connection timed out). 05:57:57 -!- cmeme has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:06:22 -!- ChanServ has quit (kornbluth.freenode.net irc.freenode.net). 08:06:22 -!- pgimeno has quit (kornbluth.freenode.net irc.freenode.net). 08:06:22 -!- {^Raven^} has quit (kornbluth.freenode.net irc.freenode.net). 08:06:23 -!- CXI has quit (kornbluth.freenode.net irc.freenode.net). 08:06:23 -!- mtve has quit (kornbluth.freenode.net irc.freenode.net). 08:06:24 -!- GregorR has quit (kornbluth.freenode.net irc.freenode.net). 08:06:24 -!- lament has quit (kornbluth.freenode.net irc.freenode.net). 08:06:45 -!- ChanServ has joined. 08:06:45 -!- irc.freenode.net has set channel mode: +o ChanServ. 08:06:47 -!- {^Raven^} has joined. 08:06:47 -!- CXI has joined. 08:06:47 -!- mtve has joined. 08:07:11 -!- GregorR has joined. 08:07:11 -!- lament has joined. 08:46:10 -!- pgimeno has joined. 09:20:17 Well, I either just made egobfi mind-blowingly slow, or I just broke it. 09:29:37 YES YES YES YES YES!!!!!!!!!!!!!!!!!!! 09:29:45 egobfi pulls WAAAAAAAAAY ahead!!! 09:31:35 Damn bff, how the hell does it do it?! 09:54:15 Just got add-to optimization, checking if it's actually helpful :P 09:55:14 Wow, that was much much worse. 12:03:53 -!- jix has joined. 12:04:37 moin 13:27:48 brfd fails on hello world 13:28:00 it doesn't output the last newline 13:31:46 should i strip all leading \n? 13:49:21 pgimeno: brfd fails on hello world 15:07:43 i have to include compile time because awib needs 4 mins cpu time to compile mandelbrot but only 49secs to execute it 15:20:17 pfoo added compile times 15:21:01 if compile times are < 0.1 seconds they don't show up 15:21:34 and they aren't as exact as the execution times 15:21:44 and no one listens to me :'( 15:25:40 yep, we're just reading. 15:38:12 haha 15:39:40 fixed some bugs 15:43:03 -!- ZeroOne has quit (Ping timeout: 14400 seconds). 15:49:29 -!- fizzie has quit ("muutto"). 16:00:15 -!- cmeme has quit (kornbluth.freenode.net irc.freenode.net). 16:00:15 -!- puzzlet has quit (kornbluth.freenode.net irc.freenode.net). 16:00:15 -!- lindi- has quit (kornbluth.freenode.net irc.freenode.net). 16:02:42 -!- cmeme has joined. 16:02:42 -!- puzzlet has joined. 16:02:42 -!- lindi- has joined. 16:37:53 -!- fizzie has joined. 16:38:38 jix: fails in what sense? the parser is a bit quirky, I guess 16:39:42 I wrote it before I knew about any established standard 16:55:12 in the helloworld example the newline is missing 16:55:34 and i'm not going to include interpreters that need more than 10 minutes for mandelbrot 16:55:39 obi2.rb is at 40minutes 16:56:14 killed 16:56:17 what helloworld? 16:57:24 http://en.wikipedia.org/wiki/Brainfuck#Hello_World.21 16:57:56 jix: include in what? 16:58:12 lindi-: in my brainfuck interpreter/compiler speed test 16:58:29 jix: you are doing one? great! 16:58:45 jix: please put the results online 16:59:00 jix: what's the fastest so far? 16:59:02 lindi-: the first test run is still running 16:59:15 and it's just a test test run 16:59:20 :) 17:00:12 oh and if obi2.rb fails it's because i killed it 17:00:13 jix: it's because of the parser; the ! is the frontier between code and input 17:00:35 pgimeno: thanks 17:00:39 i'm going to fix that 17:01:10 i commented out print("Optimizing") and print.... because they ignored -Q 17:01:29 oh 17:01:48 well, the optimizing run.c was not ready for release :) 17:03:36 the non optimizing one was at 6mins for mandelbrot (i have top running during the tests which takes ALWAYS 0.3%cpu) maybe it needs more than 10min 17:05:30 it was 4:31 on my machine 17:05:41 I'm not good at optimizing C code, though 17:05:50 so doesn't bff run on your box? 17:06:07 i'm not testing on my main computer 17:06:13 (too many processes running) 17:06:27 but on a 400mhz intel celeron computer with ~300mb ram 17:06:47 oh, I guess that bff runs properly there 17:06:56 it does 17:08:13 ahh no! 17:08:29 there is a bug 17:08:39 mandelbrot can't be completed in 0secs 17:09:07 and yes slow brfd is too slow 17:09:35 ah i forgot to activate output validation for mandelbrot 17:09:51 hm, bff gives a couple of warnings with valgrind 17:10:10 bff is the fastest interpreter here 17:10:35 egobfi the slowest with no fail 17:10:59 you said it doesn't run on your mac or am I wrong? 17:11:29 bff? 17:11:45 yes doesn't run here 17:11:55 mandelbrot validation is on 17:14:36 need to find the bug 17:14:50 in bff? 17:14:55 no in my test script 17:14:57 -!- BigZaphod has quit. 17:14:58 ah 17:15:19 it's impossible to calculate mandelbrot in <0m0.0005s 17:15:36 guess so 17:15:56 ok with c it's possible 17:16:02 but not with brainfuck!? 17:16:45 it depends on how optimizing is the optimizer :P 17:17:20 compilers writtin in bf are now self bootstrapped 17:19:46 the testbox has 0k swap used 17:20:01 291mb ram free 17:20:50 -!- ZeroOne_ has joined. 17:35:12 the fastest way to bootstrap awib with a bootstrapped wib... wib awib.b => awib.c;gcc awib.c => awib_wib;awib_wib awib.b => awib 17:57:38 Wowsa. 18:01:57 UAHRG 18:02:01 time output: Command exited with non-zero status 42 18:02:16 Command is as float.. 0 exited is as float 0 with is as float 0 18:08:15 fixed all bugs running a new test 18:08:29 /away 18:35:41 -!- graue has joined. 18:37:11 bff doesn't work for me, it seems to either crash or inexplicably print wrong things forever 18:39:29 valgrind reports a few errors 18:41:36 I've taken a quick glance but couldn't find what's wrong 18:42:41 I'm apparently incapable of implementing add-to loop optimization in such a way that it's actually better :P 18:42:52 I've tried two schemes now. 18:43:38 Both very simple because I don't actually care :P 18:47:36 it's easy, but complicated and possibly time-consuming 18:48:39 implement an intermediate language with a command ADD_MEM(M,N) where M is a signed integer and N is an integer with the range of the integers you're using for each cell, that adds N to the cell M cells forward from the current location of the memory pointer 18:48:55 then add a command ADD_PTR(M) where M is a signed integer, that moves the memory pointer M cells forward 18:49:40 whenever you see any string of only ><+-, reduce it to at most one ADD_PTR and at most one ADD_MEM for each M 18:49:57 then, if a loop contains only the ADD_MEM command, you can reduce it to a series of multiplications 18:50:08 http://www.harderweb.de/jix/langs/brainfuck/result2.txt 18:51:25 graue: hey that's what my compiler is going to do 18:53:17 graue: That's precisely what I did 18:53:18 if you add a PUTCHAR(N) command you can also optimize strings containing . 18:53:38 GregorR, have you tried it on something that takes much longer to run than to parse/optimize? 18:53:48 I used mandelbrot.b 18:59:11 ....... 18:59:19 I just made a change that ought to have made it more optimal, and yet it's slower ... 18:59:32 what change? 19:00:10 GregorR: egobfi is #8 in the test 19:00:17 #6 with out compilers 19:00:22 jix: you need to add more programs 19:00:29 graue: yes i know 19:00:30 hello world is trivial and mandelbrot is just one example 19:00:41 graue: it's my first complete test 19:00:47 Hello World would throw most optimizers waaay below. 19:00:53 -!- sp3tt has joined. 19:01:06 I did the check to make sure that it had parsed as much as would be needed for an add-to loop in the main function instead of the add-to function. 19:01:12 That should have saved a function call and been faster. 19:01:16 Instead it was slower. 19:01:16 graue: all other tests had some bugs in my test scripts 19:01:45 jix: BTW, 0.3 is quite a bit faster. 19:02:04 Someone needs to implement RPN in brainfuck... <.< 19:02:52 I'm sure there's an RPN calculator in BF ... 19:05:28 http://lancelot.pecquet.org/download/soft/rpn.html#Brainfuck teh pain! 19:05:56 lol... Compare the BF version to the C version... 19:11:49 http://gregorr.homelinux.org/egobfi-0.3.tar.bz2 < now fassssssssster, still powerfullllllllllllller. 19:18:31 GregorR: that runs mandelbrot.b in 26 seconds on pentium@2.8GHz. if i compile mandelbrot.b with BF2C.c and gcc it runs in 2.9 seconds 19:18:45 how long does the compilation take? 19:19:21 graue: gcc runs for 6 seconds 19:20:00 so, is there any point in writing interpreters? ;) 19:20:18 * jix is writing a compiler 19:21:09 Har har har. 19:21:13 Yukk it up :P 19:21:24 lindi-, how long does BF2C run? 19:21:52 graue: hard to measure, less than 0.004 seconds 19:22:01 whoa 19:22:03 * GregorR writes a compiler backend for egobfi :P 19:22:20 I guess BF2C does no optimizations whatsoever? 19:22:25 jix: GregorR: we should all just start optimizing gcc's optimizer :) 19:22:29 graue: true 19:22:56 then every gcc user would benefit too 19:22:56 where is BF2C, I don't have it 19:23:08 esoteric.sange.fi/brainfuck/impl/compilers/BF2C.c 19:23:46 heh, I wrote something like this before :) 19:26:00 how fast is it if you do the gcc compilation with -O0? 19:27:17 graue: then gcc runs for 1.0 seconds and mandelbrot runs for 22 seconds 19:27:43 -O1 is 1.7 and 3.0 19:28:17 and -O3 is 11 and 2.9 19:29:56 so even on -O0 it beats egobfi, heh 19:30:24 yes, barely 19:31:11 -O2 and gcc from cvs 2005-07-20 produces a binary that runs in 2.6 seconds ;) 19:32:15 i think it's going to be hard to beat that 19:32:17 so -O1 gets the best results, if compilation time is counted 19:32:36 graue: yep 19:34:08 graue: but if i changed that mandelbrot to use higher resolution then -O2 would be better 19:34:32 cause it would not affect compilation time but it would affect running time 19:37:11 graue: http://iki.fi/lindi/mandelbrot.asm has disassembly of the created binary 19:44:46 Darn, egobfc only gets it down to 5sec. 19:44:58 However, it supports unicode and any-size characters :) 19:48:42 gcc seems to optimize multiple +'s 19:49:21 Well, that makes my optimization of multiple +s suboptimal. 19:49:22 i mean > 19:49:45 Well, that makes my optimization of multiple >s suboptimal. 19:50:32 With gcc -O2, the actual compilation of mandelbrot.c is quite slow. 19:50:40 Is that also the case with bf2c? 19:51:10 yes, see above 19:51:22 I don't read *shrugs* 19:51:41 So it's possible that compile b-c + compile c-bin + run is still slower than interpreting. 19:52:05 yep 19:52:34 Well, I'm off, I'll release egobfc later when I've knocked out some bugs. 19:54:05 see you later then 19:55:03 -!- graue has quit (Read error: 104 (Connection reset by peer)). 19:55:53 -!- graue has joined. 20:04:18 -!- _graue_ has joined. 20:06:04 <{^Raven^}> what about a JIT interpreter? 20:07:42 <{^Raven^}> i've got some ideas based on the assumption that a BF interpreter is actually a virtual machine 20:08:08 <{^Raven^}> there's some useful emulator techniques that would be handy for a BF-VM 20:08:15 {^Raven^}: why not just use gij? 20:09:41 <{^Raven^}> wouldn't that imply Java?, that would give a VM running on a VM running on a RM 20:09:50 <{^Raven^}> too many VMs spoil the speed 20:10:36 dynamic recompiling? jit compiling? 20:10:45 vm's often jit compile 20:10:53 emulators often dynrecompile 20:11:30 dynamic recompiling is a special form of jit compiling 20:11:56 <{^Raven^}> it would preferably need to be host platform independant 20:12:15 uhm thats impossible 20:12:22 <{^Raven^}> yeah i know 20:12:26 without calling gcc 20:12:59 {^Raven^}: not really, python can be compiled to the same bytecode too, so why not brainfuck? 20:13:22 <{^Raven^}> lindi-: gij is not in my area of expertise 20:13:29 brainfuck can be compiled to machine code.. that's faster 20:15:25 <{^Raven^}> a interpreter/VM/emu could store the compiled code in a cache, meaning that a program would only need to be compiled once 20:15:39 <{^Raven^}> using the compiled code from the cache on subsequent runs 20:16:40 that could be a shell script that caches results to ~/.bf-cache :) 20:17:41 <{^Raven^}> or %APPDATA% or Choices: depending on OS 20:19:29 -!- graue has quit (Read error: 110 (Connection timed out)). 20:19:49 Why not write a brainfuck module for gcc or some other compiler? 20:19:56 I mean, that removes some overhead. 20:20:13 good idea 20:20:19 * {^Raven^} doesn't know how to 20:20:33 shouldn't be that difficult 20:21:25 Imagine the overkill of getting the dragon book for that. 20:21:34 dragon book? 20:22:05 ah 20:22:37 Compiler book with a dragon on the cover. 20:24:46 <{^Raven^}> IMHO we need a good intermediate language to compile through 20:25:18 C is one :) 20:26:15 <{^Raven^}> no, before C, straight BF>C is non-optimal even after run-length encoding 20:26:51 <{^Raven^}> unless you know something i don't :) 20:27:01 i'm not sure what you mean :/ 20:27:24 you want lower or higher level than C? 20:28:01 <{^Raven^}> i want high level than straight BF>C 20:28:13 <{^Raven^}> *higher 20:28:21 {^Raven^}: thats what my bf2c compiler does 20:28:36 <{^Raven^}> jix: link? 20:29:12 {^Raven^}: myharddisk://under.dev.el/opement 20:29:31 not ready and the intermediate language is still growing 20:29:38 and the only output language atm is ruby 20:29:42 <{^Raven^}> hehe 20:31:22 <{^Raven^}> i am working on a compiler here, not much dev-time though 20:31:40 <{^Raven^}> idea is to reduce the number of instructions in a BF program to as few as possible 20:33:13 -!- _graue_ has changed nick to graue. 20:33:19 <{^Raven^}> mine outputs to BF, C, C(ommented), BBC BASIC and pure object code 20:41:22 <{^Raven^}> purely an exercise atm rather than a releasable tool 20:45:57 <{^Raven^}> jix: i'd like to see what you've got 20:52:19 i'm still writing the top framework no optimizations yet 20:58:06 modulo math.. 0o 20:58:30 Easier than RPN. 20:58:38 rpn is easy 20:58:46 Exactly. 20:58:50 I learned about it today. 20:58:56 i love rpn 20:59:04 i use it on my calculator 20:59:05 Wrote an infix-> RPN. 20:59:12 and no it's not a hp calc 20:59:16 And a 12 line RPN-calculator. 20:59:21 sp3tt: pha.. i do that in my head 20:59:25 I want an RPN calculator 20:59:34 gimme an infix expression and i output rpn 20:59:35 jix: so? 20:59:40 Heh. 21:00:12 Imagine my math teacher's face. 21:00:22 hehe 21:00:30 i'm going to write my next math test using base -9 21:00:35 "But this is gibberish" "You don't know RPN?" "No, wtf is that?" "N00B!" 21:00:45 Base... negative 9? 21:00:46 no one ever said that i have to use base 10 21:00:47 o.0 21:00:53 sp3tt: yes no need for a sign 21:00:53 Good one. 21:01:19 How about binary? Or is that too easy. 21:01:24 of course i write a converter base 10 <=> -9 for my calculaotr 21:01:31 Probably... base 3 is hard. 21:01:34 sp3tt: my teacher has a computer no problem to convert 21:01:41 Well, not hard. 21:01:44 and there are programs for any positive base 21:01:52 No base is hard. 21:01:54 but no programs for negative bases 21:02:06 It's just that some are more confusing. 21:02:19 I love to count in binary with my fingers though. Especially 4. 21:02:31 10 is in -9 => 181 21:02:41 sp3tt: *g* 21:03:03 That is just... painful. 21:03:15 -9 is in -9 => 10 21:03:22 -8 is in -9 => 11 21:03:33 9 is in -9 180 21:03:34 I like that 21:03:34 -9 + 81 + -81*9? 21:03:55 uhm ? 21:04:09 I don't think I follow the logic of negative bases. 21:04:10 181 == 1*81 + 8*-9 + 1*1 21:04:31 1*(-9)^2 + 8*(-9)^1 + 1*(-9)^0 21:04:35 just like positive bases 21:04:57 Ah yeah... 21:05:09 the rightmost digit counts 1 the 2nd digit counts base the 3rd digit counts base square... 21:05:21 Forgot that... 21:05:23 <.< 21:05:29 Beat me with a stick. 21:05:41 sp3tt: too much brainfuck programming? 21:05:44 Nah. 21:05:51 Not done any of that for a while. 21:06:17 I'm not forgetting Latin conjugations and declinations at least :) 21:06:30 who needs latin... 21:06:40 Study Latin in one's free time. Can it get geekier? 21:06:56 Don't know. 21:06:58 i don't like latin 21:07:01 But it is fun to know. 21:07:17 japanese or russian would be cool 21:07:19 Because insulting people in a language they cannot grasp is hilarious. 21:07:33 My father once got in a car accident in Portugal. 21:07:47 Well, not accident, but some Portuguese idiot reversed into his cars. 21:08:02 and...? 21:08:08 And the Portuguse started shouting in Portuguese. 21:08:24 And he told them to stfu and called them mofos in Swedish XD 21:08:41 haha 21:08:59 They shouted "Calma, calma!" 21:09:18 Calma? 21:09:28 "Calm down" or something to that effect. 21:09:44 ah 21:09:45 AFK, movie's on again. 21:09:48 The Godfather :) 21:25:18 argh modulo math 21:27:05 val-(c*e) === 0 (mod 256) i know c and want a rule for getting e if i know val 21:27:23 uh val+(c*e) 21:29:35 if c is 1 then e === val (mod 256) 21:30:01 if c is 2 there is only a solution if val === 0 (mod 2) 21:30:26 but for all odd c there is a solution for all val 21:30:32 i know that because of brute-forcing 21:32:04 I suppose this will be 8-bit with wrapping only? 21:32:43 will you optimize exponentiation and tetration 21:32:44 ? 21:33:39 i want to optimize all loops that don't contain other loops or input output 21:35:34 will you optimize recursively, e.g. [[[[[[-]]]]]] (for a trivial example)? 21:35:44 yes but only trivial examples 21:35:54 why? 21:36:06 is this because you have decided that nontrivial cases of that cannot be optimized? 21:36:18 because i optimize '['*n + bla + ']'*n 21:36:30 an that's trivial 21:37:04 what about [+>>-<<->>+[+>>-<<->>+[+>>-<<->>+[+>>-<<->>+[+>>-<<->>+[-]+>>-<<->>+]+>>-<<->>+]+>>-<<->>+]+>>-<<->>+]+>>-<<->>+]? 21:37:22 oh wait, I got that wrong 21:37:29 but what I mean is, you're not naive about it, right? 21:37:39 hn? 21:37:57 i would probably optimize [+>>-<<->>+[-]+>>-<<->>+] 21:37:58 i.e., if it's effectively such a trivial example, will you hndle it? 21:38:00 okay 21:38:31 but i'm at the code for handling non-moving non-nested non-io loops 21:38:43 ie multiplication / naive-divide 21:38:50 move 21:38:58 copy 21:39:03 and combinations of that 21:39:35 -!- BigZaphod has joined. 21:39:47 and that's where i need a solution for that modulo equation 21:49:02 my newest optimization [-]++ => cell=2 (and things like that) 21:49:27 still not done with the move/mul/div optimization 21:53:07 do you also optimize by removing any instructions prior to a [-] that modify only that cell? 21:54:41 yes that too 21:54:49 but [-]++ could be e = 0 ; e+=2 21:54:56 i output e=2 21:55:25 yes 21:56:17 i do some bf-space o11s ( [odd number of + or -] => z ; delete <>|><|+-|-+ and + or - in front of z) 21:56:37 and some o11s within the loop tree 21:57:10 ++>+<- => p[0]+=1 p[1]+=1 21:57:28 what's an oll? 21:57:32 and even ++>[-]<->+<- => p[1]=1 21:57:42 its o-eleven-s optimisations 21:57:46 oh 21:57:49 optimizations 21:58:15 like i18n 21:58:24 and a10y, yes 21:58:44 a10y? 21:58:49 or maybe a11y 21:58:51 accessibility 21:59:35 i don't remember them.. and i only use them if i wrote the whole word at least once 22:00:33 BFCode.new("++>[-]<->+<-").gencode => [[:set, 1, 1]] 22:15:01 fixed some bugs 22:15:02 and now: 22:15:03 e = BFCode.new("[>++<[-]>-<+>-<]").gencode => [[:inf_loop]] 22:31:20 when i'm done i have 3 optimization stages 22:32:30 1 that works on the brainfuck source 1 that does the bf-tree => intermediate-lang and 1 that removes dead code from the intermediate-lang 22:54:33 Here's a question ... 22:54:46 Would it be a speed improvement to write the BF code to a void * memory array and then call that as a function? 22:54:54 Err, write machine code, but from BF, obviously. 22:55:30 yes 22:55:59 Hmmmmmmmmm. 22:56:17 I don't think it would be TOO difficult ... 22:56:24 It would be totally architecture-dependent of course. 22:56:32 that's like jit compiling 22:56:50 Oh, yes it is. 22:56:54 lol, didn't occur to me. 22:57:46 if you compile all loops as soon as they get executed it's real jit compiling if you always translate the next n instructions it's dynamic recompiling 22:58:30 And cache said loops I assume *shrugs* 22:59:33 While I think that if I really wanted to, I could probably write something like that, I'm still not going to :P 23:08:01 -!- heatsink has joined. 23:33:04 -!- sp3tt has quit (Client Quit). 23:52:40 i'm done with the modulo math 23:52:59 good ol'paper and pencil