00:48:43 <arke> because I just started trying in pure BF
00:48:48 <arke> and i didnt even know where to start
00:49:11 <arke> And I'm pretty familiar with Forth
00:52:20 <calamari> 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 <arke> calamari: hehe. If you look at the description, though, this one will be quite large no matter how goood you are
00:53:15 <arke> calamari: because you have to implement binary operators in terms of add/subtract, and thats hell :)
00:53:33 <calamari> I'm glad for the contest.. I need binary ops for bfbasic :)
00:54:14 <calamari> hope not.... that'd be useless
00:54:41 <calamari> or I just don't don't the right terminology :)
00:54:43 <arke> nope, I think he means binary :)
00:55:03 <calamari> bitwise => #, ??? => true/false
00:55:28 <arke> bitwise = and/or/xor, boolean = true/false
00:55:58 <calamari> so yeah, I do want bitwise operators
00:56:34 <calamari> of course, there isn't the contraint of using a fixed amunt of memory that I was hoping for :)
00:57:18 <arke> I think the best bet is to use the BF pointer as a stack, in pretty much every situation
00:58:16 <calamari> 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 <arke> calamari: well, this is pretty complex, so no matter what you do you'll be using a good amount of memory
00:59:02 <calamari> I think it was using 2 cells for each bit, or such
00:59:18 <calamari> I'm hoping for a constant memory usage, regardless of cell size
01:01:13 <calamari> arke: happen to know of an equation to find the optimal add-to loop multipliers to produce a certain number?
01:02:49 <calamari> never mind.. I think I found a pattern finally :)
01:05:59 <arke> 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 <arke> (I did 47 earlier, which was >++++++++[<++++++>-]<-
01:08:49 <arke> actually, I did 48 = 6*8
01:09:58 <arke> 2*24 or 4*12 or 8*6 .. :)
01:39:02 -!- Tefad has joined.
01:47:02 <arke> 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:39:04 <calamari> ark2: 22 = 2 * 11, but 21+1 is shorter :)
03:39:58 <arke> i dont think theres a definite algo
03:40:19 <arke> >+++++++[<+++>-]<+
03:40:24 <calamari> I think there is, I just haven't been able to describe it in algebraic terms yet :)
03:40:56 <calamari> if you graph out the optimal solutions, they follow each other diagonally
03:41:32 <calamari> for example 32-33, 34-35, and 36-38 are all diagonals (4*8, 5*7, 6*6)
03:41:46 <calamari> there are no gaps between them
03:42:17 <calamari> the problem is knowing that 3*9 isn't any good
03:43:31 <arke> 3*9 => >>+++[<+++[<+++>-]>-]<<
04:04:22 <calamari> I think the smaller number should go first tho.. go around the loop less times, so it's faster :)
04:22:15 <calamari> I think I just figured it out.. was on to something with the diagonals. If the sums are displayed on a grid:
04:23:04 <calamari> oops.. oh well, you get the idea
04:23:20 <calamari> no maybe not, let me try again, lol
04:24:35 <calamari> anyhow, the / diagonals all have the same number
04:25:11 <calamari> so that means that any combo in a diagonal LEFT of that will be more optimal
04:26:04 <calamari> the squares, 1 4 9 16 25 36 are optimal
04:28:07 <calamari> there are diagonals in between those with squares, but the square is the base
04:28:44 <calamari> anyhow, what I'm getting at is that the "formula" goes something like:
04:29:18 <calamari> 1) take the square root of the number and round down, this is the startinng point
04:30:12 <calamari> 2) if this isn't the answer, start at the top of the next diagonal to the right.
04:31:49 <calamari> 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 <calamari> 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:35 <calamari> I should say greater or equal to
04:33:36 <arke> I'd rather just do it by hand
04:33:40 <arke> But, nice work
04:33:51 <calamari> either the greater number will be the answer, or the previous on the diagonal
04:33:52 <arke> maybe if you get it to like a single function that would be awesome
04:34:54 <calamari> it will only work for the simple loop, none of that nested fun you were doing :)
04:36:19 <calamari> the "in-between" diagonal is int(sqrt(#))*(1 + int(sqrt(#)))
04:37:45 <calamari> the question is whether that is optimal.. I'm 99% sure it is
04:37:52 -!- Frobozz has joined.
04:38:43 <calamari> so that way you only have to check a single diagonal
04:39:38 <calamari> it's probably best to work upwards rather than downwards, though.. the numbers at the top are almost certainly not optimal
04:40:03 <calamari> anyhow.. I think I have enough to code it.. afk :)
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:39:59 -!- calamari has quit ("Leaving").
10:51:34 -!- kipple has joined.
13:06:42 -!- FreeNSK has joined.
13:08:50 <{^Raven^}> i can do the bitwise operations but not the reverse polish input thingy
13:09:17 <FreeNSK> 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:44 <Keymaker> i see you're going to enter the competition as well.. good luck! :)
14:52:56 <Keymaker> 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:34 <Keymaker> remember that this takes a lot space; i have a feeling my code will be at least 1000+
14:54:41 <{^Raven^}> not got it all in BF yet but the algrithm is sound
14:55:28 <{^Raven^}> ahh, means algorithm is perfect (for BF)
14:56:47 <Keymaker> by the way, were you in the previous competition (BFCC #1?)
14:57:04 <Keymaker> and to not everyone, this is NOT part of BF Golf
14:59:45 <{^Raven^}> no, i'm not intending to enter really but it seemed an interesting challenge to work out a BF algorithm
15:00:32 <Keymaker> i'm the lamest bf coder ever and i still will enter..
15:08:01 <Keymaker> 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.
17:39:19 -!- Keymaker has left (?).
18:02:42 -!- calamari has joined.
19:11:39 -!- Keymaker has joined.
19:11:43 -!- Keymaker has left (?).
19:12:22 -!- Keymaker has joined.
19:23:33 <Keymaker> 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:25:19 <{^Raven^}> gotta go make an auto program loading BF interpreter for dumb windowz ppl to use
19:25:34 <{^Raven^}> who wouldn;t know a command line if ....well you can imagine
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 <Keymaker> what? there are bf interpreters for computers now?! i've always used paper and pen!
19:27:26 <Keymaker> 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:29 <{^Raven^}> I have 5 logins on 3 different OSs atm
19:28:48 <{^Raven^}> RISC OS, Linux and Windows and I develop software for all of em
19:29:29 <Keymaker> (i use linux (and xp) although i don't really need much more than ability to print out a character or get input)
19:30:16 <{^Raven^}> it is a technichal term for a type of processor
19:30:32 <calamari> screenshots make it look a little like win3.1
19:31:00 <{^Raven^}> CISC (complex instruction set computer) processors have millions and millions of machine language instructions
19:31:27 <{^Raven^}> RISC processors have a small core highly useful instructions
19:31:50 <calamari> thanks for the translattion ;)
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:33:23 <Keymaker> 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:34:17 <Keymaker> found it! "Office of the Immigration Services Commissioner OISC."
19:34:46 <calamari> http://en.wikipedia.org/wiki/OISC
19:34:59 <Keymaker> this is the oisc i've read about
19:35:32 <Keymaker> all i'm wondering is how to make it esoteric programming language ;)
19:35:57 <lament> it already is an esoteric programming language
19:36:16 <{^Raven^}> source code is available from the main page
19:38:15 <calamari> wonder how much it'd be to translate bf -> oisc
19:38:41 <calamari> theres a project for you, Keymaker .. hehe
19:39:03 <Keymaker> sorry, i'm not much into that kind of projects
19:40:30 <calamari> afk.. my code needs pest control
19:41:08 <lament> ESR is the OISC maintainer
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 <Keymaker> can anyone get this file opened?
19:43:14 <Keymaker> http://catb.org/~esr/retro/oisc.shar.gz
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 <Keymaker> hmmm, probably i can't, i suck using all those tools
19:50:17 <lament> i think OISC is an older version of OIC
19:50:20 <lament> and OIC is what you should actually download
19:51:09 <lament> http://www.catb.org/~esr/retro/oic.tgz
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 <Keymaker> cheers calamari, that's friendly :)
19:52:22 <lament> calamari: do you want control over the brainfuck golf page?
19:52:53 <lament> but i haven't done anything in years :)
19:52:59 <calamari> lament: sure, but I may never use it, is that okay?.. :)
19:53:18 <lament> you could at least update it with the results of current competitions :)
19:53:27 <lament> i have a whole automatic submittal/judging system there
19:53:33 <lament> but it's a bit of a mess
19:53:44 <calamari> cool.. I haven't been keeping up with the bf golf stuff
19:53:58 <Keymaker> actually, that competition isn't a bf golf, i'm just borrowing your forums :)
19:54:22 <lament> brainfuck golf is dead
19:54:34 <lament> the project is simply called 'brainfuck' so you could put anything there
19:54:52 <lament> i'm not sure why they allowed me to name the project that :)
19:55:20 <Keymaker> if calamari don't want it i could take it :)
19:55:47 <lament> Keymaker: do you have a SF account?
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: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 <calamari> it might be cool, but I don't even know what to do with that crazy mac c compiler
20:00:45 <{^Raven^}> source archive is at http://jonripley.com/volatile/bftools.zip
20:00:55 <calamari> I'm not sure that os9 has any concept of a command line app
20:01:57 <calamari> raven: really weird.. those temp vars ARE being dimmed, and rearranged, but it apparently isn't finding the best arrangement
20:02:26 <calamari> I'm noticing some weird shadowing of array vars, could be throwing things off
20:04:11 <lament> strip: unrecognized option: --strip-all
20:04:43 <lament> other than that, the interpreter seems to work fine
20:05:12 <{^Raven^}> sweet, it is Erik Bosman's optimising interpreter
20:05:16 <Keymaker> lament: i'm "bf_keymaker" now in sourceforge.
20:06:45 <lament> ok, i made you an admin
20:10:34 -!- Keymaker has left (?).
20:12:15 <calamari> cool.. he'll do a lot better at maintaining things than I would :)
20:12:59 <lament> I could make you an admin as well :)
20:14:21 <calamari> sure, if you'd like to: killerkalamari
20:15:05 <calamari> raven: now I can add you as a developer and we can have bfbasic cvs
20:19:54 <{^Raven^}> lament: have registered a new account, just have to wait to complete the registration
20:21:50 <calamari> raven: i'll add you as a developer rather than an op
20:22:27 <calamari> I should just be a developer too, but it's cool :)
20:23:18 <lament> just don't start a war there or anything
20:25:03 <{^Raven^}> ok, i'm in username is ravenswolf_
20:32:28 -!- cpressey has quit (Read error: 104 (Connection reset by peer)).
20:33:01 -!- cpressey has joined.
20:47:35 <calamari> I can help you.. I just need to set up a couple things with the repository
20:53:55 <calamari> export CVSROOT=:ext:ravenswolf_@cvs.sourceforge.net:/cvsroot/brainfuck
20:54:19 <calamari> then do "cvs checkout bfbasic"
20:57:41 <calamari> I didn't put anything else on yet
20:58:25 <calamari> 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 <calamari> so don't put things on unless you're sure where it goes :)
20:59:04 <calamari> to add something to the repository, you first tell it cvs add (filename)
20:59:20 <calamari> this is how you add directories too
20:59:23 * {^Raven^} is listening but has to pop out for a few mins...
20:59:57 <calamari> I'll keep going, come back and read the history or whatever :)
21:00:27 <calamari> to actually put a file on the repository after the add, you do: cvs commit filename
21:00:54 <calamari> it will ask for a log file entry.. put something like "initial version"
21:01:16 <calamari> to remove a file it's: cvs remove file, then: cvs commit file
21:01:49 <calamari> what about existing files? to update your file to the latest, do cvs update filename. Always a good idea
21:02:08 <calamari> you can also leave off the filename and it will update recursively: cvs update
21:03:06 <calamari> 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 <calamari> if you get "C", then there was a conflict
21:04:21 <calamari> 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 <calamari> 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 <calamari> then remove the << || >> and re-update
21:06:35 <calamari> 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 <calamari> cvs log filename (see the log entries)
21:07:28 <calamari> cvs update doesn't give you new files.. use cvs checkout for that.. it won't mess up existing files
21:07:41 <calamari> 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:29:37 <{^Raven^}> changed that one, must remember who has the caret
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:50:21 <calamari> raven: testing out the new variable optimizer now
22:53:05 <calamari> been running about 5 minutes now, I have it printing updates as it finds a better combo
22:54:31 <calamari> I'll know when it's done.. the T's should be close to the front
23:01:27 <calamari> started at 625774 arrows, currently at 340884
23:01:45 <calamari> definitely down to the spare change now
23:08:15 <calamari> 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 <calamari> I'm going to let this finish, because I'm pretty sure it will give me the rock bottom answer
23:09:57 <calamari> then I can experiment with ways of speeding it up
23:11:00 <calamari> it's basically a bubble sort right now, where you swap the two items that improve things the most
23:11:24 <calamari> so for all that searching, only one change takes place
23:15:27 <calamari> whoa, that was a big drop.. might be a while yet
23:15:57 <calamari> it was piddling along 2 at a time, then dropped about 75
23:16:28 <calamari> just happened to move the right thing I guess :)
23:21:42 <calamari> yep, t0 t1, are right at the start
23:21:59 <{^Raven^}> are cmd and room very close to the start?
23:22:13 <calamari> {_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:59 <calamari> 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: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:30:07 <calamari> bah, something is wrong with it
23:39:10 <calamari> hopefully that's fixed.. trying it again with a few speed changes
23:40:04 <calamari> {_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:58:26 -!- calamari_ has joined.