01:09:28 -!- bsmntbombdood has quit (Remote closed the connection).
01:13:12 -!- bsmntbombdood has joined.
03:51:03 -!- coder_ has joined.
04:30:28 -!- Arrogant has joined.
04:51:25 -!- Sgeo has quit ("Ex-Chat").
05:09:00 -!- CXI has quit (Read error: 110 (Connection timed out)).
05:16:32 -!- coder_ has quit ("Leaving").
05:44:57 -!- bsmntbombdood_ has joined.
05:46:29 -!- bsmntbombdood_ has quit (Remote closed the connection).
05:46:38 -!- bsmntbombdood_ has joined.
05:56:11 -!- CXI has joined.
05:57:07 -!- bsmntbombdood has quit (Connection timed out).
06:32:51 -!- Arrogant has quit ("Leaving").
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
09:09:55 -!- CXI has quit (Read error: 104 (Connection reset by peer)).
09:10:21 -!- CXI has joined.
09:11:42 -!- bsmntbombdood_ has quit ("all your basment are belong to bsmntbombdood").
10:11:46 -!- sekhmet has quit (Read error: 110 (Connection timed out)).
10:17:40 -!- sekhmet has joined.
11:16:27 -!- Keymaker has joined.
12:45:32 -!- tgwizard has joined.
14:29:34 -!- CXI has quit ("If you're reading this, it's probably xchat's fault.").
14:53:45 -!- Keymaker has left (?).
16:29:51 -!- ihope has joined.
16:29:59 <ihope> Oh, what was that...
16:30:36 <ihope> Well, what's the shortest BF program that outputs "D"?
16:31:13 <ihope> The ASCII code is 68...
16:31:38 <ihope> That's 2*2*(1+2*2*2*2).
16:33:08 <ihope> It'd probably be more efficient to use 4*(1+4*4), so that'd be "++++[->++++<]>+[->++++<]>."
16:33:55 <ihope> Maybe it can get shorter, but this works.
16:38:07 -!- LoganCapaldo has left (?).
16:43:14 <_W_> can't it be brute forced?
16:45:53 <lindi-> _W_: only if you limit search to e.g. programs that halt after 10M steps
16:46:30 <_W_> but a program that outputs "D" is likely to...
16:47:48 <ihope> How long would it take to run a BF program for 10 million steps?
17:06:19 <_W_> lindi-, can't you just make a program to analyse it, and just skip over the programs that wouldn't halt in X steps? :p
17:06:50 <ihope> Just keep the loops from being weird.
17:07:02 <ihope> Or use BF-PDA. Everybody loves BF-PDA!
17:07:31 <ihope> And no, I'm still not talking about the British Fluid Power Distributors Association...
17:20:31 <lindi-> _W_: sure you can but then you might miss the program that halts in X+1 steps
17:20:54 <_W_> it was a joke...
17:21:26 <_W_> the most efficient way to analyse when an arbitrary brainfuck program halts seems to be to execute it
17:22:15 <ihope> So does this BF text generator thing have an extension thing, that tries to give you the shortest program beginning with some other program that outputs some string?
17:22:59 <ihope> Like the shortest beginning with "++++[->++++<]>+[->++++<]>" that outputs "o"?
17:30:56 <_W_> is a brainfuck "tape" infinite in both directions?
17:31:12 <_W_> ie can you start a program with <
17:31:55 <lament> _W_: there's no standard
17:32:05 <_W_> then you can
17:32:16 <lament> _W_: usually it is assumed that the tape is infinite to the right, but not to the left
17:32:22 <ihope> With some interpreters you can, and with some you can't.
17:32:46 <lament> _W_: and that no, you can't
17:32:53 <lament> at least that's the safest bet
17:33:02 <ihope> In my mind, the tape was always infinite in both directions.
17:39:04 <_W_> +>+>+>+>+>+[[[-<++>]<<]>]>+++++. aw, beaten by 7 symbols
17:39:16 <_W_> and here I thought my idea was good
17:40:05 <pgimeno> ihope: seen http://www.iwriteiam.nl/Ha_bf_numb.html ?
17:40:56 <_W_> +>+[[[-<++++++++>]<<]>]>++. aw, beaten by *two* symbols
17:41:19 <_W_> I'm guessing your version is the shortest ihope
17:41:55 <_W_> no wait, that's wrong
17:43:09 <ihope> Can you do betteR?
17:43:46 <lament> it's very easy to check if it's the shortest or not
17:43:58 <lament> the problem of checking can be easily discounted as trivial.
17:45:08 <ihope> So how do you know that mine's not the shortest?
17:45:33 <ihope> http://esoteric.voxelperfect.net/wiki/Brainfuck_constants? :-)
17:47:17 -!- CXI has joined.
17:47:38 <_W_> ihope, I meant my last program was wrong
17:47:45 <_W_> it calculates 11
17:49:34 <_W_> and in fact, your program is shorter than the listed one
17:50:14 <_W_> 24 symbols, not counting the output
17:51:45 <ihope> "++++[->++++<]>+[->++++<]>" has 25 symbols.
17:52:00 <_W_> I count 24
17:52:09 <_W_> missed that lone + in there
17:53:04 <pgimeno> oh, there seems to be an entry to be corrected there
17:53:14 <_W_> confirm that +>+>+>+>+>+>+>+[[[-<++>]<<]>]> yields 255?
17:53:39 <_W_> and is shorter than the 34 symbols listed as the shortest non-wrapping program for that
17:55:06 <ihope> What does "+>+>+>+>+>+>+>+>+[[[-<++>]<<]>]>" do?
17:55:50 <_W_> calculate ((((((1*2+1)*2+1)*2+1)*2+1)*2+1)*2+1)*2+1
17:56:30 <ihope> That would be 255.
17:56:46 <_W_> yes, assuming I didn't misstype or missthink somewhere, and that's not actually what it does
17:56:55 <_W_> I guess I should just download an interpreter
17:57:35 <ihope> Online Encyclopaedic Database of Integer ___ ___ Sequences
17:57:41 <ihope> Fill in the blanks :-P
18:00:44 <ihope> As is, that produces OEDI__S.
18:00:46 <pgimeno> what is the number after the number of instructions? is it the maximum nesting level or the like?
18:01:01 <ihope> I think it's the number of cells used.
18:02:21 <_W_> yeah program works
18:02:27 <_W_> guess I'll edit the wiki and add my program in
18:03:35 <pgimeno> I guess it is valid to generate the value in any cell, not just the first one, and to end up having nonzero cells, and to end up having the data pointer set to anything other than zero, right?
18:04:07 <pgimeno> having nonzero cells other than the generater number, that is
18:04:41 <ihope> Or something like that.
18:05:36 <_W_> I'll have to go through the list and see what programs on the form ...(((x+1)*x+1)*x+1... are shorter than the listed ones
18:11:10 <pgimeno> hum, a requirement seems to be that the data pointer points to the cell
18:11:41 <ihope> You mean /(\+>)*\+\[\[\[-<\+\+>\]<<\]>\]>/? :-)
18:15:01 <_W_> pgimeno, yes, you should be able to just add a . to have it printed
18:15:54 <_W_> ihope, no, that'll just calculate the 2^x-1 ones
18:16:19 <_W_> the middle <++> can be <+++> for 3 for instance
18:17:37 <ihope> /(\+>)*\+\[\[\[-<\+*>\]<<\]>\]>/, then?
18:23:17 <_W_> 121 for instance, is (((3+1)*3+1)*3+1)*3+1
18:24:29 <pgimeno> I'd say \++ instead of \+*
18:25:20 <ihope> Well, what's wrong with "+>+>+>+>+>+>+>+>+[[[-<>]<<]>]>"? :-P
18:26:53 <_W_> and 156 is ((5+1)*5+1)*5+1
18:27:36 * ihope decides to finally go back to that Wikibook
18:27:52 <_W_> and that's all that needed update
18:27:58 <_W_> 121, 156 and 255
18:28:05 <pgimeno> is there a generator of (e.g. randomly-chosen) expressions matched by a regexp?
18:28:24 <_W_> I'm sure someone have written one in prolog
18:28:43 <_W_> or if nothing else, a compiler from regexp to a prolog generator
18:29:13 <_W_> not sure it's easy to find on the web tho, seems very niche
18:29:28 <ihope> pgimeno: I've been wondering if there's one floating around.
18:30:56 -!- bsmntbombdood has joined.
18:32:22 <ihope> And the predicate says what Mr. Morton must do.
18:32:46 <ihope> Oh, hi, bsmntbombdood. We were just getting into a heated argument about Schoolhouse Rock...
18:34:27 <_W_> http://esoteric.voxelperfect.net/wiki/Brainfuck_constants#115 must surely be possible to improve
18:35:01 <_W_> ((10+1)*10+1)+4
18:35:54 <_W_> no, that's 34 symbols
18:36:00 <_W_> gotta come up with something simpler tho
18:38:06 <pgimeno> what is the point with listing >++++++++++[>+++++++++++<-]> (28, 3) in 110?
18:38:29 <_W_> same happens at the wrappable 255 as well
18:38:36 <_W_> - is listed, and so is >-
18:39:24 <ihope> And with lots of other things near 255.
18:40:37 <_W_> the talk page discusses them
18:49:47 <_W_> I assume negative values are never allowed?
18:49:59 <_W_> if one has non-wrapping cells I mean
18:50:05 <_W_> s/if/even if
18:51:07 <pgimeno> that might be a controversial point but I'd say no
18:52:18 <pgimeno> one of my readers sent this for 111: +++++++[>++++<-]->[<++++>-]
18:55:04 <pgimeno> I accepted it as a solution but I can imagine it failing for some interpreters with non-wrapping check
18:58:34 <pgimeno> (for context see <http://www.formauri.es/personal/pgimeno/compurec/Minesweeper.php#Solutions>)
19:05:43 <_W_> what's the shortest program that multiplies a number by itself? ie that does x^2
19:09:07 <_W_> [[[->+>+<<]>>-]<]>[-->+<][[->+<]>] is my first attempt
19:10:56 <_W_> it'll be wrong half the time actually, only working on even numbers
19:12:23 <_W_> actually, it won't work at all :(
19:18:55 -!- ihope_ has joined.
19:35:28 -!- ihope has quit (Read error: 110 (Connection timed out)).
19:36:35 -!- poiuy_qwert has quit (Read error: 110 (Connection timed out)).
19:37:46 <_W_> [[->+>+<<]>>-]<<<[>>[-<++>]<<<<]>>[->+<]>>[<<[->>+<<]>>>>]<<. fixed!
19:40:46 <ihope_> Well, to multiply A by B, you loop through moving B to C and D, then moving C to B...
19:41:05 <_W_> sure, that's /one/ way
19:41:29 <_W_> but when you program in BF, isn't the point to think outside the box?
19:42:04 <_W_> can you see how my program does it?
19:43:46 <_W_> nevermind, it doesn't pass my unit test :(
19:43:56 <_W_> I've got a > or < too much somewhere
19:44:58 <ihope_> [-<+<+>>]<[[->+>+<<]>[-<+>]<]>>[-<+>]<
19:45:55 <_W_> infinite loop
19:46:24 <_W_> dunno, tried running it
19:46:42 <_W_> on 10 (so it should output an ascii 'd')
19:46:58 <ihope_> It didn't run off the left side of the tape, did it?
19:47:17 <_W_> I started with >>>>++++++++++
19:47:22 <_W_> how much left spac edo you need?
19:47:33 <ihope_> That should be enough.
19:47:47 <_W_> yeah that's what I gathered
19:47:49 <ihope_> It needs 2 to the left and 1 to the right.
19:48:10 <ihope_> Well, we could run through it manually...
19:48:29 <_W_> let me try with 1 first; if that hangs that's easier to trace
19:49:30 -!- tgwizard has quit (Connection timed out).
19:50:48 <lament> ++++++++++++++++++++++++++++++++++++++
19:51:41 <_W_> 0,0,1*->1,1,0*->1,1*->1,0*,1,1->1,0,1*,1->1,1,0*,1->1,1*,0,1->2,0*,0,1->2*,0,0,1->run out of tape to the left, or continue moving the 2 to the left infinitely
19:52:36 <_W_> probably the later, in my implementation
19:56:24 <_W_> [->+>+<<]>[>[->+>+<<]>[-<+>]<<-]>>>
19:56:34 <_W_> that only moves to the right
19:56:44 <_W_> uses same space
19:58:20 <_W_> yeah passes test
19:59:44 -!- ihope has joined.
20:00:10 <ihope> How nice. My computer freezes up in the middle of a conversation, and it's still frozen when it's time to pack up and all that.
20:00:23 <ihope> We're going on a road trip...
20:00:45 <_W_> well, have fun
20:01:52 <ihope> Did you say that "[-<+<+>>]<[[->+>+<<]>[-<+>]<]>>[-<+>]<" went to the left forever?
20:02:16 <_W_> I think so
20:02:47 <_W_> naive trace of 1 as input at least
20:02:51 <ihope> How's that possible? Each of the inner loops has the same number of "<" as ">", so it should be balanced.
20:02:55 <_W_> that might be an edge case tho
20:03:10 <_W_> probably did something wrong somewhere then
20:03:29 <ihope> Well, it's time for me to disappear. Bye.
20:11:51 <_W_> it was one > too little
20:12:16 <_W_> [[->+>+<<]>>-]<<<[>>[-<++>]<<<<]>>[->+<]>>>[<<[->>+<<]>>>>]<< multiplies X with itself, using lots and lots of cells.
20:14:00 -!- ihope_ has quit (Read error: 110 (Connection timed out)).
20:24:38 -!- ihope has quit (Read error: 110 (Connection timed out)).
20:26:49 -!- calamari has joined.
23:34:48 -!- poiuy_qwert has joined.