00:43:36 arke: bf golf? :) 00:48:36 yeah 00:48:43 because I just started trying in pure BF 00:48:48 and i didnt even know where to start 00:48:49 ;) 00:49:11 And I'm pretty familiar with Forth 00:52:20 arke: I did something similar in a previous contest.. first I wrote it in basic, using functions.. then I removed the functions and used gosub, then I removed the gosubs, just using if/goto/stack. then I saw that someone had it to something like 37 bf instructions, and I gave up :) 00:52:56 calamari: hehe. If you look at the description, though, this one will be quite large no matter how goood you are 00:53:15 calamari: because you have to implement binary operators in terms of add/subtract, and thats hell :) 00:53:33 I'm glad for the contest.. I need binary ops for bfbasic :) 00:53:44 err bitwise 00:54:06 are they logical operators ? 00:54:14 hope not.... that'd be useless 00:54:41 or I just don't don't the right terminology :) 00:54:43 nope, I think he means binary :) 00:54:48 bitwise 00:54:49 ;) 00:55:03 bitwise => #, ??? => true/false 00:55:04 ? 00:55:28 bitwise = and/or/xor, boolean = true/false 00:55:58 so yeah, I do want bitwise operators 00:56:34 of course, there isn't the contraint of using a fixed amunt of memory that I was hoping for :) 00:57:18 I think the best bet is to use the BF pointer as a stack, in pretty much every situation 00:57:24 :D 00:58:16 arke: well the problem is whether it is even possible to do.. I know that bf css program does a bitwise operation, but it uses as much memory as it feels like 00:58:51 calamari: well, this is pretty complex, so no matter what you do you'll be using a good amount of memory 00:59:02 I think it was using 2 cells for each bit, or such 00:59:18 I'm hoping for a constant memory usage, regardless of cell size 01:01:13 arke: happen to know of an equation to find the optimal add-to loop multipliers to produce a certain number? 01:02:49 never mind.. I think I found a pattern finally :) 01:05:59 calamari: Find the greatest number less than or equal to it that is not prime. Add that number, as a multiplication of two of its factors, and the difference :) 01:06:41 (I did 47 earlier, which was >++++++++[<++++++>-]<- 01:08:20 so with 47 you get 46 = 2*23 01:08:49 actually, I did 48 = 6*8 01:08:59 :) 01:09:09 you said less that or equal 01:09:29 okay.. so 48.. = 2*24 01:09:58 2*24 or 4*12 or 8*6 .. :) 01:10:13 right.. 01:10:37 so how did you choose 8*6? 01:11:18 just the sum was lowest/ 01:13:20 yeah 01:13:22 :) 01:39:02 -!- Tefad has joined. 01:46:47 <{^Raven^}> nite all 01:47:02 night {^Raven^} 02:49:01 -!- calamari has quit (Read error: 110 (Connection timed out)). 02:57:33 -!- kipple has quit (Read error: 60 (Operation timed out)). 03:26:22 -!- calamari has joined. 03:33:12 hi 03:34:38 hi 03:39:04 ark2: 22 = 2 * 11, but 21+1 is shorter :) 03:39:46 :) 03:39:51 just depends 03:39:58 i dont think theres a definite algo 03:40:19 >+++++++[<+++>-]<+ 03:40:19 :) 03:40:24 I think there is, I just haven't been able to describe it in algebraic terms yet :) 03:40:35 :) 03:40:56 if you graph out the optimal solutions, they follow each other diagonally 03:41:32 for example 32-33, 34-35, and 36-38 are all diagonals (4*8, 5*7, 6*6) 03:41:46 there are no gaps between them 03:42:17 the problem is knowing that 3*9 isn't any good 03:43:31 3*9 => >>+++[<+++[<+++>-]>-]<< 03:43:33 :) 03:44:20 ;) that's longer I think 03:44:54 probably 03:44:55 :D 03:45:02 22 vs 7+12=19 04:04:22 I think the smaller number should go first tho.. go around the loop less times, so it's faster :) 04:22:15 I think I just figured it out.. was on to something with the diagonals. If the sums are displayed on a grid: 04:22:24 1 2 3 4 5 04:22:32 2 3 4 5 04:22:39 3 4 5 04:22:44 45 04:22:57 5 04:23:04 oops.. oh well, you get the idea 04:23:20 no maybe not, let me try again, lol 04:23:52 1 2 3 4 5 04:23:59 3 4 5 6 04:24:15 4 5 6 04:24:18 bah 04:24:35 anyhow, the / diagonals all have the same number 04:24:42 (if I did it right) 04:25:11 so that means that any combo in a diagonal LEFT of that will be more optimal 04:26:04 the squares, 1 4 9 16 25 36 are optimal 04:28:07 there are diagonals in between those with squares, but the square is the base 04:28:44 anyhow, what I'm getting at is that the "formula" goes something like: 04:29:18 1) take the square root of the number and round down, this is the startinng point 04:30:12 2) if this isn't the answer, start at the top of the next diagonal to the right. 04:31:49 3) go down the diagonal until a number larger than the one we're looking for is found (down the diagonal means left and down) 04:33:07 if not found, travel down the next diagonal.. the larger number WILL be found (I think it's possible to know to go to the second column right away, but I haven't figured out for sure) 04:33:32 Hehe 04:33:35 I should say greater or equal to 04:33:36 I'd rather just do it by hand 04:33:36 :) 04:33:40 But, nice work 04:33:51 either the greater number will be the answer, or the previous on the diagonal 04:33:52 maybe if you get it to like a single function that would be awesome 04:34:05 yeah, that's the idea :) 04:34:54 it will only work for the simple loop, none of that nested fun you were doing :) 04:36:19 the "in-between" diagonal is int(sqrt(#))*(1 + int(sqrt(#))) 04:37:45 the question is whether that is optimal.. I'm 99% sure it is 04:37:52 -!- Frobozz has joined. 04:38:43 so that way you only have to check a single diagonal 04:39:38 it's probably best to work upwards rather than downwards, though.. the numbers at the top are almost certainly not optimal 04:40:03 anyhow.. I think I have enough to code it.. afk :) 04:40:21 :) 07:24:12 -!- Frobozz has quit ("Leaving"). 07:45:43 -!- calamari has quit (Read error: 110 (Connection timed out)). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 09:19:22 -!- calamari has joined. 09:19:29 hi 09:39:57 bye 09:39:59 -!- calamari has quit ("Leaving"). 10:51:34 -!- kipple has joined. 13:06:42 -!- FreeNSK has joined. 13:08:29 <{^Raven^}> this sucks.... 13:08:50 <{^Raven^}> i can do the bitwise operations but not the reverse polish input thingy 13:09:17 lol the topic url is funny 13:23:45 -!- FreeNSK has changed nick to FreeNSK-away. 13:59:58 -!- FreeNSK-away has changed nick to FreeNSK. 14:30:18 <{^Raven^}> i hate it when perfectly correct code doesn't work 14:30:25 <{^Raven^}> the universe needs rebooting again 14:52:16 -!- Keymaker has joined. 14:52:20 yo 14:52:27 <{^Raven^}> hi there 14:52:32 hi 14:52:44 i see you're going to enter the competition as well.. good luck! :) 14:52:56 i should start my entry soon. i wish i had more time 14:53:05 <{^Raven^}> i can do the logic but not the input processing :( 14:53:13 i see 14:53:34 remember that this takes a lot space; i have a feeling my code will be at least 1000+ 14:53:38 :) 14:54:41 <{^Raven^}> not got it all in BF yet but the algrithm is sound 14:55:03 sound? i can't understand! 14:55:28 <{^Raven^}> ahh, means algorithm is perfect (for BF) 14:55:56 i see 14:55:59 :) 14:56:47 by the way, were you in the previous competition (BFCC #1?) 14:57:04 and to not everyone, this is NOT part of BF Golf 14:57:12 *to note 14:59:45 <{^Raven^}> no, i'm not intending to enter really but it seemed an interesting challenge to work out a BF algorithm 14:59:54 <{^Raven^}> for bitwise operations 15:00:08 ok 15:00:12 but why not enter!?! 15:00:32 i'm the lamest bf coder ever and i still will enter.. 15:02:10 <{^Raven^}> hmmm, good point 15:02:30 <{^Raven^}> about entering...not ur BF coding 15:03:11 hehe :) 15:08:01 must go another channel! quick! 15:08:03 -!- Keymaker has quit. 15:11:27 -!- FreeNSK has changed nick to FreeNSK-away. 15:21:44 -!- FreeNSK-away has quit ("http://portal.wikinerds.org"). 15:29:14 -!- kipple has quit. 16:46:45 -!- Keymaker has joined. 16:46:55 hmm 17:39:19 -!- Keymaker has left (?). 18:02:42 -!- calamari has joined. 18:02:50 hi 18:03:00 <{^Raven^}> hi there 19:11:39 -!- Keymaker has joined. 19:11:43 -!- Keymaker has left (?). 19:12:22 -!- Keymaker has joined. 19:12:35 yo 19:22:17 <{^Raven^}> hi 19:23:12 hiya 19:23:33 btw, do you ever sleep? you seem to be here no matter when i check the place. :p 19:24:15 <{^Raven^}> i sleep, but I have a different timezone every day 19:24:27 :) 19:25:19 <{^Raven^}> gotta go make an auto program loading BF interpreter for dumb windowz ppl to use 19:25:30 hmm 19:25:34 <{^Raven^}> who wouldn;t know a command line if ....well you can imagine 19:25:40 heh 19:26:42 <{^Raven^}> i just hope they can live with a dos box, i don't fancy putting it in a fancy window 19:26:51 what? there are bf interpreters for computers now?! i've always used paper and pen! 19:27:06 yeah, that should be fine 19:27:26 windows is missing a good console system 19:27:59 <{^Raven^}> definately, since they removed most of the DOS functionality it's next to useless 19:28:10 that's why I went to linux 19:28:16 :) 19:28:21 win98 is fine, but xp is crap 19:28:29 <{^Raven^}> I have 5 logins on 3 different OSs atm 19:28:35 hehe 19:28:48 <{^Raven^}> RISC OS, Linux and Windows and I develop software for all of em 19:29:10 <{^Raven^}> :( 19:29:11 which is your favorite, risc? 19:29:22 <{^Raven^}> umm, depends what for 19:29:29 (i use linux (and xp) although i don't really need much more than ability to print out a character or get input) 19:29:43 what is risc? 19:30:01 Keymaker: some funky UK os 19:30:05 <{^Raven^}> Reduced Instruction Set Computer 19:30:06 written in asm 19:30:10 hmmm 19:30:16 <{^Raven^}> it is a technichal term for a type of processor 19:30:27 hmm 19:30:32 screenshots make it look a little like win3.1 19:30:38 :) 19:30:55 could be nice 19:31:00 <{^Raven^}> CISC (complex instruction set computer) processors have millions and millions of machine language instructions 19:31:08 aaargh 19:31:14 not millions :) 19:31:27 <{^Raven^}> RISC processors have a small core highly useful instructions 19:31:35 million = more than 8 :) 19:31:50 thanks for the translattion ;) 19:32:16 :) 19:32:25 of course there is OISC 19:32:27 <{^Raven^}> x86 is an example of CISC, whereas ARM only has 20 instructions and you need less than 12 for most programs 19:32:36 haven't played with that any 19:33:23 hey.. iirc was there something that had only three instructions or something? the name sounded like something OISC or something.. can't remember, read in wikipedia.. 19:33:35 oisc only has one 19:33:41 wooh 19:33:46 how does it work?! 19:33:53 google: oisc ;) 19:34:00 what's google? 19:34:04 lol 19:34:17 found it! "Office of the Immigration Services Commissioner OISC." 19:34:46 http://en.wikipedia.org/wiki/OISC 19:34:52 ah 19:34:59 this is the oisc i've read about 19:35:05 although didn't understand :\ 19:35:32 all i'm wondering is how to make it esoteric programming language ;) 19:35:51 eh 19:35:57 it already is an esoteric programming language 19:36:16 <{^Raven^}> source code is available from the main page 19:36:38 hm.. main page? 19:36:50 that sounds nice 19:38:15 wonder how much it'd be to translate bf -> oisc 19:38:23 :) 19:38:41 theres a project for you, Keymaker .. hehe 19:38:46 :) 19:38:56 <{^Raven^}> site has link rot :( 19:39:03 sorry, i'm not much into that kind of projects 19:39:29 :) 19:40:30 afk.. my code needs pest control 19:41:08 ESR is the OISC maintainer 19:41:11 of all people 19:41:38 <{^Raven^}> afk, but it still sucks writing a BF 'terp that only runs one program just cos of windows ppl 19:43:13 can anyone get this file opened? 19:43:14 http://catb.org/~esr/retro/oisc.shar.gz 19:43:21 it complains something to me 19:45:46 <{^Raven^}> works fine here...if you can unpack the .shar file, load it into a text editor and read the info 19:46:13 hmmm, probably i can't, i suck using all those tools 19:50:17 i think OISC is an older version of OIC 19:50:20 and OIC is what you should actually download 19:50:57 yep yep. 19:51:09 http://www.catb.org/~esr/retro/oic.tgz 19:51:11 get that instead. 19:51:13 -!- calamari has set topic: Logical Brain**** Competition, http://sourceforge.net/forum/forum.php?thread_id=1244436&forum_id=201037. 19:51:37 cheers calamari, that's friendly :) 19:51:58 lament: ok 19:52:22 calamari: do you want control over the brainfuck golf page? 19:52:25 i.e. brainfuck.sf.net 19:52:35 i could :D 19:52:37 i'm the owner 19:52:41 wow 19:52:44 never knew that 19:52:53 but i haven't done anything in years :) 19:52:59 lament: sure, but I may never use it, is that okay?.. :) 19:53:04 := 19:53:18 you could at least update it with the results of current competitions :) 19:53:27 i have a whole automatic submittal/judging system there 19:53:33 but it's a bit of a mess 19:53:44 cool.. I haven't been keeping up with the bf golf stuff 19:53:58 actually, that competition isn't a bf golf, i'm just borrowing your forums :) 19:54:17 well who cares 19:54:22 brainfuck golf is dead 19:54:34 the project is simply called 'brainfuck' so you could put anything there 19:54:40 wow 19:54:52 i'm not sure why they allowed me to name the project that :) 19:54:54 that would be neat 19:54:57 :) 19:55:20 if calamari don't want it i could take it :) 19:55:47 Keymaker: do you have a SF account? 19:55:52 nope 19:55:55 get one 19:55:58 ok 19:58:12 <{^Raven^}> does anyone here have MacOS X and would be willing/able to compile a BF interpreter (in C) for me? 19:58:20 I can try 19:58:52 :( only os9 here 19:59:06 i have os x :)) 19:59:10 it's cute 19:59:34 <{^Raven^}> thx. an OS 9 one would be cool too, have no Macs here and I'd like to make an interpreter available on my site 20:00:05 it might be cool, but I don't even know what to do with that crazy mac c compiler 20:00:13 weird stuff 20:00:45 <{^Raven^}> source archive is at http://jonripley.com/volatile/bftools.zip 20:00:55 I'm not sure that os9 has any concept of a command line app 20:01:02 <{^Raven^}> no probs 20:01:57 raven: really weird.. those temp vars ARE being dimmed, and rearranged, but it apparently isn't finding the best arrangement 20:02:26 I'm noticing some weird shadowing of array vars, could be throwing things off 20:02:33 <{^Raven^}> that is weird 20:04:00 make fails 20:04:05 in a very silly way: 20:04:10 strip --strip-all bf 20:04:11 strip: unrecognized option: --strip-all 20:04:43 other than that, the interpreter seems to work fine 20:04:49 (why wouldn't it?) 20:05:12 <{^Raven^}> sweet, it is Erik Bosman's optimising interpreter 20:05:16 lament: i'm "bf_keymaker" now in sourceforge. 20:06:45 ok, i made you an admin 20:06:50 wow! 20:06:52 thanks :) 20:07:05 {^Raven^}: welcome ;) 20:08:34 :) 20:10:24 but, now i must go. bye 20:10:34 -!- Keymaker has left (?). 20:12:15 cool.. he'll do a lot better at maintaining things than I would :) 20:12:59 I could make you an admin as well :) 20:14:21 sure, if you'd like to: killerkalamari 20:15:05 raven: now I can add you as a developer and we can have bfbasic cvs 20:15:17 ok added 20:15:19 <{^Raven^}> ooh, 20:15:29 <{^Raven^}> do i need to join SF? 20:15:37 lament: thanks 20:15:39 yeah 20:19:54 <{^Raven^}> lament: have registered a new account, just have to wait to complete the registration 20:21:50 raven: i'll add you as a developer rather than an op 20:22:27 I should just be a developer too, but it's cool :) 20:23:06 hehe 20:23:18 just don't start a war there or anything 20:24:49 <{^Raven^}> np 20:25:03 <{^Raven^}> ok, i'm in username is ravenswolf_ 20:26:38 <{^Raven^}> what do i need to do now? 20:32:28 -!- cpressey has quit (Read error: 104 (Connection reset by peer)). 20:33:01 -!- cpressey has joined. 20:39:03 Raven: I've added you 20:40:54 do you know how to use cvs? 20:41:16 <{^Raven^}> no 20:42:41 it's a little complicated 20:47:14 <{^Raven^}> i'll work it out 20:47:35 I can help you.. I just need to set up a couple things with the repository 20:52:31 ok 20:52:50 I assume you use bash 20:53:00 add these to your .bashrc 20:53:03 export CVS_RSH=ssh 20:53:55 export CVSROOT=:ext:ravenswolf_@cvs.sourceforge.net:/cvsroot/brainfuck 20:54:19 then do "cvs checkout bfbasic" 20:54:28 tell me how that goes 20:56:41 <{^Raven^}> yup 20:57:17 should get one file 20:57:29 <{^Raven^}> bfbasic.sh :D 20:57:32 yeah 20:57:41 I didn't put anything else on yet 20:58:25 one thing to know about cvs is that once something is put on, it can be removed, but it will still be there, in a deleted fashion 20:58:41 so don't put things on unless you're sure where it goes :) 20:58:51 <{^Raven^}> :) 20:59:04 to add something to the repository, you first tell it cvs add (filename) 20:59:20 this is how you add directories too 20:59:23 * {^Raven^} is listening but has to pop out for a few mins... 20:59:33 okay 20:59:57 I'll keep going, come back and read the history or whatever :) 21:00:27 to actually put a file on the repository after the add, you do: cvs commit filename 21:00:54 it will ask for a log file entry.. put something like "initial version" 21:01:16 to remove a file it's: cvs remove file, then: cvs commit file 21:01:49 what about existing files? to update your file to the latest, do cvs update filename. Always a good idea 21:02:08 you can also leave off the filename and it will update recursively: cvs update 21:03:06 if the update gives a "U" or "M", you're good to go, do a: cvs commit filename to commit your changes. add an appropriate log entry explaining the changes 21:03:15 if you get "C", then there was a conflict 21:04:21 check the file and you'll see a lines such as <<<<<, code, ||||||, code, >>>> this shows the conflicting lines. one side will be what you had, the other will be what was already there 21:05:41 usually, they will need to be combined "somehow" to resolve the conflict. "somehow" isn't always obvious, but looking at both pieces usually gives a good idea about what should stay and what shouldn't 21:05:56 then remove the << || >> and re-update 21:06:01 then commit 21:06:35 other useful commands: cvs diff filename (to see the differences between your file and the repos).. good for remembering what you changed for the log comment 21:06:44 cvs log filename (see the log entries) 21:07:28 cvs update doesn't give you new files.. use cvs checkout for that.. it won't mess up existing files 21:07:41 that's about it from off the top of my head 21:25:46 <{^Raven^}> cheers, i'll save that in a file somewhere 21:27:19 <{^Raven^}> s0urcef0rgedude 21:27:22 <{^Raven^}> oops 21:29:37 <{^Raven^}> changed that one, must remember who has the caret 21:49:04 teh hies 21:53:17 -!- calamari_ has joined. 21:58:19 -!- calamari has quit (Read error: 110 (Connection timed out)). 22:24:05 -!- calamari_ has changed nick to calamari. 22:38:50 <{^Raven^}> hi 22:39:02 <{^Raven^}> calamari: how goes? 22:50:21 raven: testing out the new variable optimizer now 22:50:26 takes forever :( 22:50:41 <{^Raven^}> aww 22:53:05 been running about 5 minutes now, I have it printing updates as it finds a better combo 22:54:10 <{^Raven^}> is it looking any better atm? 22:54:31 I'll know when it's done.. the T's should be close to the front 23:01:27 started at 625774 arrows, currently at 340884 23:01:45 definitely down to the spare change now 23:07:08 lol, still going 339772 23:07:54 <{^Raven^}> eep 23:08:15 it's almost had it.. improvements are 10 or less now 23:09:12 <{^Raven^}> are the temps being declared for the -O1 improvement or will it just be for -O2 or above? 23:09:46 I'm going to let this finish, because I'm pretty sure it will give me the rock bottom answer 23:09:57 then I can experiment with ways of speeding it up 23:11:00 it's basically a bubble sort right now, where you swap the two items that improve things the most 23:11:24 so for all that searching, only one change takes place 23:12:12 still hanging on, down to 4-5 23:15:27 whoa, that was a big drop.. might be a while yet 23:15:41 <{^Raven^}> what happened? 23:15:57 it was piddling along 2 at a time, then dropped about 75 23:16:28 just happened to move the right thing I guess :) 23:17:14 dropping by 12's now.. blah 23:21:42 yep, t0 t1, are right at the start 23:21:47 t2 is a little farther down 23:21:59 <{^Raven^}> are cmd and room very close to the start? 23:22:13 {_Q=0, _G=1, _T=2, _0=3, _1=4, _2=5, _3=6, _4=7, _5=8, _6=9, _T0=10, _T1=11, COMPASS=12, NOUN=13, ERR=14, ROOM=15, _T2=16, SCORE=17, EXITN=18, OBJSHELD=19, YORN=20, TEMP=21, WOF=22, CTR=23, LAMP=24, OLDCMD=25, QUIT=26, URN=27, WIN=28, PCAT=29, EXITE=30, EXITW=31, MAGE=32, PCOMPASS=33, PPRAY=34, MAXSCORE=35, LIGHT=36, EXITS=37, CMD=38, ROOMTMP=39, ADDSCORE=40, _L1=41, ~ILOC=42, _L3=75, _L4=76, _L5= 23:22:42 512080 bytes total 23:22:51 <{^Raven^}> try this... 23:22:59 trying it wit the older algorithm for comparison 23:23:08 <{^Raven^}> count the number of times that the variable occurs in the procram 23:23:11 <{^Raven^}> *program 23:23:27 <{^Raven^}> pre-sort the list in descending order of occurences 23:23:58 <{^Raven^}> so most common vars come first in the list 23:24:31 <{^Raven^}> that might drop the time taken to do the rest of the sort 23:25:26 <{^Raven^}> with a few exceptions the final output has a high correlation 23:25:33 uhoh.. might be a bug 23:25:45 <{^Raven^}> ? 23:25:55 took the matches and it froze 23:30:07 bah, something is wrong with it 23:39:10 hopefully that's fixed.. trying it again with a few speed changes 23:40:04 {_Q=0, _G=1, _T=2, _0=3, _1=4, _2=5, _3=6, _4=7, _5=8, _6=9, _T0=10, _T1=11, COMPASS=12, NOUN=13, ERR=14, ROOM=15, _T2=16, YORN=17, LAMP=18, OBJSHELD=19, SCORE=20, TEMP=21, WOF=22, CTR=23, MAGE=24, QUIT=25, URN=26, WIN=27, _L3=28, OLDCMD=29, EXITN=30, EXITW=31, MAXSCORE=32, PCAT=33, PPRAY=34, PCOMPASS=35, LIGHT=36, EXITE=37, CMD=38, ROOMTMP=39, ADDSCORE=40, _L4=41, EXITS=42, ~ILOC=43, _L5=76, _L6= 23:40:46 argh.. still freezing up 23:58:26 -!- calamari_ has joined.