←2008-11-30 2008-12-01 2008-12-02→ ↑2008 ↑all
00:00:51 <oklopol> well, now it at least works on the empty screen.
00:00:55 <oklopol> now let's try a glider....
00:01:19 <oklopol> well there's a glider, but it takes ages to reach it, not the fastest impl there it :)
00:01:36 <oklopol> it's quite visually pleasing imo
00:01:42 <ehird> happy december
00:01:53 <ehird> oklopol: use http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck.php it has fat animation
00:01:53 <ehird> set ms = 0
00:01:54 <oklopol> old news
00:01:56 <ehird> and origin top left
00:02:23 <ehird> oklopol: failing that ill try it in the java interp
00:05:40 <oklopol> flumrgh, it didn't wurk :)
00:06:01 <ehird> oklopol: :{ y not
00:06:18 <oklopol> because i suck
00:06:25 <ehird> tru
00:12:12 <pgimeno> HUGE performance improvement: http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck-canvas.php
00:12:32 <pgimeno> Asztal: thanks :)
00:13:44 <ehird> woo
00:13:52 <ehird> oh jesus lord
00:13:55 <ehird> that is INSANELY FAST
00:13:58 <ehird> for ms=0
00:14:01 <ehird> pgimeno: you are a god
00:14:29 <ehird> pgimeno: my god, blink and its finished execution
00:14:29 <pgimeno> well, the merit is yours and Asztal's :)
00:14:36 <ehird> but seriously
00:14:37 <ehird> that is insane
00:14:50 <pgimeno> it does 200 steps per animation frame
00:15:01 <ehird> oh
00:15:01 <ehird> pgimeno: well
00:15:06 <ehird> the problem with that is that you miss out on the juicy bits
00:15:10 <ehird> maybe make that configuratble?
00:15:13 <ehird> should just be a few lines
00:15:23 <pgimeno> I was thinking of that, but wanted to show you :)
00:15:30 <ehird> :)
00:16:04 <pgimeno> Langton's ant now takes just a few seconds to escape at 128x128
00:16:49 <ehird> pgimeno: also, you should default to black = background
00:16:49 <ehird> :P
00:16:52 <ehird> like everyone else
00:17:49 <ehird> oklopol:
00:17:52 <ehird> try your gol on this!!
00:17:53 <ehird> really fast
00:18:11 <oklopol> if it works now
00:18:38 <ehird> oklopol: set dimensions = 1000,1000, origin=topleft, animation step=0, put it in and animate
00:18:41 <ehird> = best interp yet
00:18:54 <pgimeno> ehird: the web is white! :P
00:19:08 <ehird> pgimeno: so is the flash interp, but the GRID is black background
00:19:08 <ehird> :P
00:19:12 <ehird> and everyone says white/black
00:19:14 <oklopol> okay i think it works now
00:19:15 <ehird> so it's just confusing
00:19:35 <oklopol> but i can't test a glider in the exe
00:20:02 <ehird> pgimeno: haha, try whee!
00:20:05 <ehird> its still slow
00:20:10 <ehird> (http://forums.tigsource.com/index.php?topic=3710.msg110154#msg110154)
00:21:19 <ehird> pgimeno: the main problem with your 200-per is that t he display is jerky
00:21:19 <ehird> and
00:21:27 <ehird> you can't see the head if it's a bouncing-ball type thing
00:21:33 <ehird> so i think that configurable that would be good
00:24:33 <ehird> pgimeno: heh, your interp is quite unusable now: you can't see programs running
00:24:35 <ehird> since it's so fast
00:24:41 <ehird> needs some of that configuring ;)
00:24:44 <jayCampbell> JJusutst a anonotthheerr brbraiainnffuucckk hahcackkeerr
00:24:50 <jayCampbell> weave does brainfork
00:24:50 <ehird> lol
00:26:52 <pgimeno> okay, reload
00:27:24 <oklopol> okay it may work now.
00:27:30 <ehird> yay
00:27:33 <oklopol> i have no idea because it shows two generations :)
00:27:45 <oklopol> i made a glider, and it's not dying, not sure if it's working though.
00:27:52 <ehird> pgimeno: does it totally redraw each time?
00:27:57 <ehird> if so that's silly just redraw what needs redrawing
00:28:01 <ehird> oklopol: using pgimeno's?
00:28:08 <oklopol> yeah the php
00:28:34 <pgimeno> ehird: well, that's on the browser, it draws on every pixel change
00:28:43 <ehird> oklopol: set ms = 0, iterations = 500
00:28:45 <ehird> and animate
00:28:48 <ehird> should go really fast
00:29:42 <pgimeno> oklopol: this one: http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck-canvas.php
00:29:51 <pgimeno> the -canvas one
00:29:57 <ehird> *[[en*w]*s[nw*s]*e[ws*e]*n[se*n]*w] <- someone on the forums posted this. BOXWORLD!
00:32:42 <oklopol> hmm... it might be working, but it's definitely not pretty.
00:32:51 <ehird> oklopol: :{
00:32:54 <ehird> pastie.org the code
00:32:55 <oklopol> should've done it like oerjan suggested
00:33:29 <oklopol> i can http://www.vjn.fi/pb/p244563523.txt the code, don't know about pastieing
00:33:31 <oklopol> *pastying
00:34:15 <oklopol> the problem is showing two iterations at once, it simply doesn't look good.
00:34:24 <oklopol> and makes it quite hard to tell whether that's even working.
00:34:37 <ehird> oklopol: also it's dog slow
00:34:38 <ehird> :D
00:34:52 <oklopol> yes, that's true
00:35:42 <ehird> reaaaaaaaaaally slow
00:35:42 <ehird> oklopol:
00:35:47 <ehird> you should make it migrate an entire region at a time
00:35:48 <ehird> XD
00:36:00 <oklopol> whaddya mean
00:36:18 <ehird> like
00:36:24 <ehird> a glider goes straight to the next glider step
00:36:28 <ehird> then it goes on to the rest of the grid
00:39:06 <oklopol> okay there's a bug.
00:39:08 <oklopol> err
00:39:21 <oklopol> i have no idea what you mean, unless you mean what you said, which you cannot have meant
00:39:32 <ehird> oklopol: as in
00:39:34 <ehird> if there's a glider there
00:39:37 <ehird> make the glider go on to the next glider iteration
00:39:40 <oklopol> anyway if you change the first four lines to
00:39:41 <ehird> then calculate all the rest of the grid
00:39:41 <oklopol> *[ss*]*
00:39:41 <oklopol> eeeeeeeeeeessssssssss
00:39:41 <oklopol> *ee*ee*wwww
00:39:41 <oklopol> wwwwwwwwwwwnnnnnnnnnn
00:39:51 <oklopol> a row of three
00:39:59 <oklopol> you can clearly see it do one correct iteration
00:40:04 <oklopol> then fail on the next iteration
00:40:04 <ehird> yeah but
00:40:06 <ehird> it takes 5 years.
00:40:06 <ehird> :D
00:40:29 <oklopol> yeah that canvas thing is much too slow for this
00:40:50 <ehird> oklopol: hard to get much faster
00:40:53 <ehird> thats the fastest interp so far
00:40:54 <ehird> but oklopol
00:40:58 <ehird> put up the iterations per animation
00:40:59 <ehird> to like 2000
00:41:01 <ehird> and delay=0
00:41:27 <oklopol> does that do some kind of optimization?
00:43:44 <ehird> oklopol: it makes it do 2000 iterations per animation
00:43:48 <ehird> and not wait per animation
00:43:56 <oklopol> i mean
00:44:00 <oklopol> does that interpreter do
00:44:31 <pgimeno> oklopol: wow, even if it does not seem to be working properly I'm impressed (and no, the interpreter doesn't optimize, except it has a jumps table)
00:45:27 <oklopol> i'm pretty sure it works now, had just a minor bug
00:45:46 <pgimeno> clicky?
00:45:54 <oklopol> (forgot i need to forget the old values at some point, and an error naturally occurs due to this only on the second iteration)
00:46:03 <Sgeo> Is it safe to say that the sort of person in this channel is the sort who has no need to cheat on exams/
00:46:17 <ehird> Sgeo: why?
00:46:30 <pgimeno> I had to cheat on history exams :P
00:46:45 <Sgeo> On my economics exam, the professor left the room for a few minutes, and I hear everyone asking things like "For 5, what did you get?", things like that
00:47:11 <oklopol> heh
00:47:55 <oklopol> i was recently the only one to score a 5/5 in one exam, i think it'd be a bit counterproductive to ask people what they answer :P
00:48:08 <Sgeo> oklopol, lol, same here
00:48:25 <Sgeo> There were two questions I was clueless about
00:48:31 <Sgeo> But I would NEVER consider cheating
00:48:43 <oklopol> we usually have 4 questions, if you don't know the answer to 2, you fail.
00:48:56 <Sgeo> 50 question exam
00:49:03 <oklopol> :D
00:49:04 <oklopol> okily
00:49:39 <oklopol> i have nothing against cheating.
00:49:42 <pgimeno> oklopol: can I see the fixed version?
00:49:44 <oklopol> cheating is pretty cool.
00:49:54 <oklopol> pgimeno: yes, not that i'm sure it still works ;)
00:50:34 <oklopol> http://www.vjn.fi/pb/p533314231.txt
00:50:38 <oklopol> that seems to work
00:50:45 <oklopol> it's a row of 3 blobs
00:50:59 <oklopol> goes vertical - horizontal - vertical ...
00:51:36 <oklopol> (the last cycle's value is in the bottom-left of a 2x2 square, current is in top-right.)
00:51:53 <oklopol> would probably be clearer if they were like next to each other or if the squares were bigger or something
00:52:08 <oklopol> but, it'd take me quite a while to do even a trivial change, because that's all manually done.
00:52:15 <oklopol> (thought it'd be a lot shorter)
00:52:53 <pgimeno> great!
00:52:54 <oklopol> if you want to know what the flicker is all about, the top-left thingie is the current cell being modified
00:53:07 <oklopol> the one on bottom-right is where the counrer ends
00:53:09 <oklopol> *counter
00:53:23 <oklopol> the four flickering lights are the negations of the counter's cells
00:53:36 <oklopol> (makes the logic to check what happens to current cell clearer)
00:54:24 <pgimeno> what about the glider?
00:55:01 <oklopol> that gets very confusing, i didn't check whether it works :D
00:55:10 <oklopol> but i can try, after this other test i'm doing now
00:56:48 -!- adimit has left (?).
00:57:03 <oklopol> okay
00:57:05 <oklopol> glider works
00:57:28 <oklopol> bye adimit
00:57:38 <pgimeno> whoa
00:58:40 <oklopol> whoa at gol?
00:59:12 <pgimeno> yeah
00:59:42 <pgimeno> if you cleared the cells done it would be great too
00:59:57 <oklopol> what do you mean
01:00:09 <oklopol> err, the last values?
01:00:12 <oklopol> yeah hmm err indeed
01:00:20 <oklopol> i could do that, i just need the last row
01:00:31 <oklopol> lol i never even thought of that:D
01:00:40 <oklopol> *that :D
01:00:51 <pgimeno> heh
01:01:05 <oklopol> let's see... this should be trivial
01:02:09 <oklopol> done
01:02:12 <oklopol> so
01:02:16 <oklopol> i code for 4 hours
01:02:41 <oklopol> and you fix everything in a second
01:03:41 <oklopol> http://www.vjn.fi/pb/p422562455.txt <<< because of the change, there's now a piece of code there that doesn't do anything.
01:03:46 <oklopol> just in case someone wants a challenge
01:03:49 <pgimeno> you who?
01:03:51 <oklopol> wait
01:04:03 <oklopol> damn, it's trivial to find it, i've commented that code.
01:04:06 <oklopol> pgimeno: you
01:04:23 <oklopol> anyway
01:04:26 <oklopol> look, it's pretty now.
01:04:57 <oklopol> hmm...
01:04:59 <jayCampbell> > Weave and brainfork conventions can be used together. That is, multiple initial threads can be started using semicolons, and embedded Y's can cause further forking.
01:05:05 <oklopol> wonder what happens when it hits the border...
01:05:09 <jayCampbell> pew-pew-pew
01:05:22 <jayCampbell> http://esolangs.org/wiki/User:JayCampbell/weave.rb
01:05:30 <pgimeno> for the record, the second version of langton's ant took me about 3 hours
01:06:39 <oklopol> hmm. wonder how long it took me to do 110
01:07:18 <pgimeno> yay, so cool now :)
01:07:25 <oklopol> btw that crashes completely when the glider hits the border :P
01:07:37 <oklopol> what's langton's and again
01:07:49 <oklopol> the ant is somewhere, and it turns right or left depending on current cell
01:07:55 <oklopol> and flips it if something.
01:08:05 <oklopol> *langton's ant
01:08:47 <pgimeno> there's a current direction, turn left and if 0, turn right if 1, flip and advance
01:08:55 <pgimeno> s/and//
01:09:46 <oklopol> always flip?
01:09:50 <pgimeno> yes
01:09:56 <oklopol> that's pretty neat
01:10:15 <oklopol> now i almost feel like making that in pf... :D
01:10:19 <pgimeno> the second version fills the whole 2x2 square
01:10:23 <oklopol> how long was yours again? ;)
01:10:30 <oklopol> (the code)
01:10:31 <pgimeno> which is what makes it notable
01:10:43 <oklopol> hmm, what do you mean?
01:10:44 <pgimeno> err, remarkable
01:11:14 <pgimeno> try and see: http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck-langton-nonhollow.pfk
01:11:21 <pgimeno> grr
01:11:32 <pgimeno> try and see: http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck-langton-nothollow.pfk
01:12:07 <oklopol> so
01:12:12 <oklopol> err
01:12:15 <oklopol> the current cell
01:12:24 <oklopol> stores the direction, it's not completely black, right
01:12:30 <oklopol> ohh
01:12:35 <oklopol> wait..
01:12:41 <oklopol> yeah i think you need that.
01:12:51 <oklopol> i'll step-by-step, don't answer!
01:13:16 <oklopol> wait
01:13:20 <oklopol> now i closed the interp :D
01:13:20 <oklopol> ...
01:14:09 <oklopol> so yeah okay, that's pretty good, although i'm pretty sure you could get that compressed quite a lot
01:14:25 <pgimeno> maybe, I didn't figure how
01:14:42 * pgimeno is seeing the r demon in life
01:15:08 <oklopol> can you tell me what that code does? i don't feel like reading
01:15:24 <oklopol> like, the gist of how you do it
01:16:11 <pgimeno> http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck-langton-nothollow-commented.pfk
01:17:06 <pgimeno> wherever it says "we came from x" it should say "our last move was x"
01:18:11 <oklopol> i have to go sleep now, i'll read that tomorrow
01:18:11 <oklopol> cya
01:18:14 <oklopol> ->
01:19:20 <pgimeno> k, nite
01:50:11 <jayCampbell> paintfuck is not "borderline-esoteric"
01:53:07 <pgimeno> mmm... define that?
01:54:27 <pgimeno> never mind, gtg
01:55:01 <jayCampbell> warrie has there ever been an Easy interpreter?
01:58:24 <pgimeno> there is another Easy
01:59:35 <pgimeno> http://p-nand-q.com/humor/programming_languages/gplz/gplz_easy.html
02:00:07 <pgimeno> and bye :)
02:00:30 <jayCampbell> moo
04:02:52 -!- Corun has quit ("This computer has gone to sleep").
04:58:44 -!- Slereah has quit (Read error: 145 (Connection timed out)).
05:13:22 <jayCampbell> You are standing inside your ramshackle wooden hut.
05:13:35 <jayCampbell> weave plays Lost Kingdom
05:13:55 <jayCampbell> i'm going to ask jon ripley to make it multiplayer
05:13:57 <jayCampbell> lol
05:29:34 <decipher> ehird: i checked your copier, it's sweet :)
05:30:07 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)).
06:06:13 <jayCampbell> $ ./weave.rb 99.bf 99.bf 99.bf
06:06:13 <jayCampbell> 999999 bbbooottttttllleeesss ooofff bbbeeeeeerrr ooonnn ttthhheee wwwaaallllll,,,
06:06:13 <jayCampbell> 999999 bbbooottttttllleeesss ooofff bbbeeeeeerrr,,,
06:06:13 <jayCampbell> $ ./weave.rb sange-archive/hello*
06:06:13 <jayCampbell> HHHELLOWelloheallo t HelloW WORWoLrlDd!
06:06:14 <jayCampbell> orld!!
06:06:16 <jayCampbell> worldis!
06:06:18 <jayCampbell> your name?
06:22:34 -!- bsmntbombdood_ has joined.
06:27:39 -!- bsmntbombdood has quit (Read error: 60 (Operation timed out)).
06:31:56 -!- Slereah_ has joined.
06:47:34 -!- bsmntbombdood_ has changed nick to bsmntbombdood.
07:38:38 -!- oerjan has joined.
07:39:10 -!- oerjan has set topic: http://tunes.org/~nef/logs/esoteric | Y RLY.
07:59:59 -!- clog has quit (ended).
08:00:00 -!- clog has joined.
08:05:54 <jayCampbell> so now i'm gluing pbrain into weave too
08:07:07 <jayCampbell> it will soon be .. an irc bot with persistent threaded cross-communicating subroutine-calling brainfucks
08:07:18 <jayCampbell> because, you know, that's exactly what the world needs
08:12:29 <oerjan> the world is _so_ fucked
08:20:05 -!- oerjan has quit ("leaving").
08:47:38 -!- Slereah_ has quit (Read error: 60 (Operation timed out)).
09:02:19 -!- GreaseMonkey has quit ("I'm a thaasophobic.").
11:27:09 <MizardX> Heh. I tried to calculate the number of ways I could generate all the permutations of a given cycle by just shifting subsequences one step at the time. For zero-, one- and two-length cycles I got the answer 1. For a three-length cycle I got 40 within a second. But trying to calculate it for a four-length cycle, it almost froze up the whole computer :S
11:27:10 <MizardX> My guess is that the number is around 2*n!!/(n!^2) :)
11:38:28 -!- Slereah_ has joined.
12:18:14 -!- Sgeo has joined.
12:32:09 -!- Corun has joined.
12:38:22 <ehird> decipher: thanks
12:38:24 <ehird> but it only handles one-rows
12:50:12 <decipher> but i am sure you can generalize
12:50:32 <decipher> also, on my obfuscated interpreter the copying was quite fast
13:12:53 <ehird> decipher: well, it's hard to generalize to arbitrary depth because if you just sweep through it, you eat up the walls
13:28:22 <ehird> decipher: if you have any ideas, though?
13:41:14 <oklopol> what copyer
13:42:12 -!- Corun has quit ("This computer has gone to sleep").
13:42:48 <ehird> oklopol: paintfuck
13:42:55 <ehird> it copies a line leftwards constantly
13:43:04 <ehird> i.e. you can put any one line and it scrolls it
13:43:04 <ehird> sloooooowly
13:43:09 <ehird> i want to generalize it to any depth
13:43:11 <ehird> somehow
13:43:21 <oklopol> mm'kay, isn't that like 10 characters of code?
13:43:28 <ehird> no
13:43:33 <ehird> you have to detect the ceiling/floor
13:43:35 <ehird> to go right one
13:43:39 <ehird> otherwise you eat the walls up
13:43:43 <ehird> and never go on to the next column
13:43:54 <ehird> the one-line copier is trivial ofc
13:45:40 <decipher> ehird: your routine was more like a move than copy :)
13:46:07 <decipher> although i am not sure if it might be possible to dynamically calculate the offset and move the head accordingly at all
13:46:18 <decipher> as in, i am not sure if a true copy algorithm can be possible
13:46:27 <ehird> decipher: oh, true
13:46:34 <ehird> well it was a scroll
13:46:34 <ehird> really
13:46:38 <ehird> but
13:46:43 <ehird> i dont' think you can do a generic scroll
13:46:48 <ehird> its impossible to tell walls from blocks
13:46:49 <ehird> UNLESS
13:46:54 <ehird> you make the wall a special pattern
13:47:00 <ehird> that your program detects
13:47:07 <ehird> then you can't copy that pattern, but if it's weird enough it won't happen
13:47:12 <decipher> true, but that's not "general" then :)
13:47:19 <ehird> as general as matters :P
13:47:24 <decipher> haha
13:59:44 <pgimeno> my binary counter (may assume infinite grid): sse*ww*[e*[*nn[*s*e*wn]se[*wn*se]s*]*w*[*s[*]nw*]*en[*e]*s[*e*w]*[*e*]s*n*[*w*]s[*]*]
13:59:45 -!- Slereah_ has quit (Read error: 113 (No route to host)).
14:00:05 <ehird> pgimeno: niiiiiiiice
14:00:09 <ehird> hmm
14:00:13 <ehird> someone make a decimal conuter
14:00:14 <ehird> counter
14:00:19 -!- lostgeek has joined.
14:00:20 <ehird> that OCRs the digits it outputs to add :)
14:00:30 <lostgeek> hi
14:00:36 <ehird> hi
14:00:51 <pgimeno> hi lostgeek
14:11:34 <ehird> lostgeek: context for what i was saying -
14:11:45 <ehird> a decimal counter would be cool, i.e. it draws the digits and OCRs them to increment :)
14:15:58 <AnMaster> my bday today
14:15:59 <AnMaster> :)
14:18:01 <lostgeek> grats AnMaster :)
14:18:08 <AnMaster> thanks
14:18:12 <AnMaster> :)
14:18:25 <ehird> AnMaster said something?
14:18:27 <ehird> (He's on /ignore.)
14:18:36 <AnMaster> lostgeek, hm I can't remember seeing you here before?
14:18:40 <AnMaster> at least not under that nick
14:19:04 <lostgeek> AnMaster: I joined yesterday ;)
14:19:16 <AnMaster> ah
14:19:24 <ehird> (Context for a person who I cannot see: He's a paintfuck person.)
14:22:10 <lostgeek> ehird: would be cool, but I think a bit hard to realize
14:22:21 <ehird> lostgeek: i don't think -that- hard
14:22:35 <lostgeek> dunno...
14:22:45 <ehird> i mean, write code to output a certain digit for 0-9, then one to look at its pixels (just make them monospaced) to detect it into the head
14:22:49 <ehird> then just do regular adding stuff
14:22:53 <ehird> not easy, but not really hard
14:26:51 <pgimeno> last, shorter, faster version of binary cnt: sse*ww*[e*[*nn[*s*e*wn]se[*wn*se]s*]s[*]*nw*[*s[*]nw*]*en[*e]*ss[*e*w]n*[*w*]s*]
14:30:55 <AnMaster> pgimeno, language?
14:31:20 <lostgeek> AnMaster: PaintFuck
14:31:26 <AnMaster> ah
14:33:14 <AnMaster> hm
14:35:49 <ehird> pgimeno: that's not shorter...
14:39:08 <oklopol> binary cunt?
14:39:17 <ehird> i know oklopol would say that.
14:39:25 <ehird> we could just replace him with a bot and never notice.
14:39:25 <ehird> probably.
14:39:29 -!- Sgeo has quit (Remote closed the connection).
14:39:30 <ehird> apart from the coding skills part.
14:40:26 <AnMaster> heh
14:41:20 <oklopol> to inc a binary counter, when you're on a constant 1-bit to the right of it, w[*]*w*[*e*]*, you go left, then null all ones, make the zero into a one, then go right, skip all the zeroes to land on the constant bit to the right of the counter
14:41:30 <oklopol> to do this constantly, add a while to that
14:41:37 <oklopol> what are you guys doing then?
14:42:41 <oklopol> wait that doesn't work
14:42:44 <oklopol> LOL
14:42:52 <ehird> hi ais523
14:44:49 <ais523> hi ehird
14:45:05 <AnMaster> hello ais523
14:45:09 <AnMaster> my bday today :)
14:46:44 <ais523> AnMaster: I say the appropriate response, but such that ehird doesn't have a clue what I mean due to lack of context
14:47:12 <ehird> I do actions by saying them to IRC.
14:48:26 <oklopol> [w[*w]*e*[*e*]*] <<< binary coutner
14:48:28 <oklopol> *counter
14:48:32 <oklopol> sorry, i just woke up
14:49:07 <oklopol> also the police calls, i couln't really tell them what the pizza attackers looked like, so they're gonna go photograph the whole staff and show me the pics :D
14:49:16 <ais523> oklopol: pizza attackers?
14:49:25 <oklopol> yeah
14:49:40 <oklopol> about a week ago, i ordered pizza, and got beat up by the delivery guys
14:49:53 <ais523> what sort of delivery guy does that?
14:50:02 <ehird> oklopol: hahaha
14:50:12 <ehird> maybe you called up the Punch 'n Pizza place instead
14:50:25 <oklopol> ais523: i would tell you what i think the answer is, but that would be racist.
14:50:26 <ehird> [w[*w]*e*[*e*]*] <-- oklopol how can this work it will never run
14:50:38 <oklopol> ehird: you have to be on a constant 1 bit
14:50:42 <ehird> oklopol: they were blobs of mauve goo?
14:50:50 <oklopol> ehird: they were FINNISH
14:51:03 <ehird> !!!!!!!!!!!!
14:51:09 <ehird> goddamn finns
14:51:17 <ehird> scum the lot of them
14:51:38 <ehird> oklopol: your binary counter is pretty awesome
14:51:46 <ehird> w*[w[*w]*e*[*e*]*]
14:51:50 <oklopol> were you doing that same thing?
14:51:50 <ehird> the full experience
14:51:58 <ehird> ?
14:52:08 <ais523> hmm... it seems the Door was broken again last Sunday, good thing I didn't try it
14:52:16 <oklopol> ehird: i mean
14:52:28 <oklopol> that long code there, about a binary cunt, was it that same thing
14:52:41 <ehird> well no
14:52:45 <ehird> it kept the previous results
14:52:46 <ehird> and um
14:52:49 <ehird> didn't look like yours
14:52:54 <ehird> oklopol: you should make yours actually output in binary
14:52:57 <ehird> instead of a soldi line
14:53:40 <oklopol> not sure what you mean
14:53:54 <oklopol> maybe i could run yours..........
14:54:24 <oklopol> so okay, like that
14:54:27 <oklopol> i can do that....
14:54:47 <ehird> um oklopol
14:54:50 <ehird> i didnt write one
14:54:50 <ehird> :|
14:55:06 <oklopol> ehird: i mean the set {ehird, pgimeno}
14:55:09 <oklopol> OBVIOUSLY
14:55:11 <oklopol> :P
14:56:02 <oklopol> anyway i don't think i'll actually do it, why the fuck would i
14:57:24 <ehird> oklopol:
14:57:24 <ehird> *w*[[*w*]*e*e*[*e*]*w*]
14:57:30 <ehird> i just made your counter simpler
14:57:30 <ehird> :P
14:57:41 <oklopol> you made it longer
14:57:50 <ehird> yes but it runs simpler
14:57:52 <oklopol> ohh
14:57:54 <ehird> it doesn't use binary
14:57:54 <ehird> a all
14:57:55 <oklopol> and it's not a binary counter
14:57:56 <ehird> at all :P
14:58:03 <ehird> oklopol: a binary counter would OUTPUT IN BINARY
14:58:06 <oklopol> *[w*]
14:58:10 <oklopol> that's faster
14:58:17 <ehird> exactly
14:58:22 <ehird> oklopol: so make it output in binary! :P
14:58:27 <oklopol> ehird: it outputs in binary, just doesn't store the values
14:58:29 <ehird> 0 = space, 1 = dot naturally
14:58:55 <oklopol> that's a binary counter, pgimeno's is one that outputs binary numbers
14:59:10 <oklopol> which isn't really useful, unlike a counter
14:59:28 <ehird> ais523: we're talking about paintfuck
14:59:40 <ehird> which is the first interesting bf dialect in ages
14:59:40 <ehird> http://forums.tigsource.com/index.php?topic=3710.0
14:59:47 <ehird> the thing is, the memory is actually the screen
14:59:54 <ehird> so your program has to think in its output drawing format
15:00:03 <ehird> langton's ant, game of life, rule 110, etc have been done
15:00:20 <oklopol> i'm not saying paintfuck isn't interesting, i'm just saying it's not a new idea
15:00:31 <ehird> oklopol: yeah ok w/e :P
15:00:35 <ehird> but ais523 hasn't seen it
15:00:35 <ehird> so
15:00:42 <ehird> ais523: http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck-canvas.php javascript interp, it's fast
15:00:50 <oklopol> but what is new is someone having linked an implementation so i can play with it :P
15:01:27 * ehird makes his counter go forever
15:02:52 <oklopol> argh
15:02:57 <oklopol> i'm still here
15:03:00 <oklopol> doing absolutely nothing
15:04:31 <ehird> *w*[[[*w*]*e*e*[*e*]*w*]*s*e*w]
15:04:34 <ehird> infinite count
15:05:03 <ehird> aka slowest screen fillder ever
15:05:06 <ehird> *filler
15:05:56 <oklopol> not really, that's O(n^2) filling tiem
15:06:02 <oklopol> wait...
15:06:19 <oklopol> n*sqrt(n) is more like it
15:06:38 <ehird> oklopol: after it fills the screen it then mangles the topleft and topright pixels
15:06:40 <oklopol> point is doing it in binary is O(2^n)
15:06:43 <ehird> so it's the slowest screen filler ever
15:06:48 <ehird> as it takes more than infinite time to fill the screen
15:06:51 <oklopol> what do you mean?
15:07:00 <ehird> oklopol: it makes the topleft and topright pixels blac
15:07:01 <ehird> k
15:07:04 <ehird> at the end
15:07:07 <oklopol> infinity = -1, as we all know
15:07:15 <oklopol> so it's as fast as you can get
15:10:25 <oklopol> err..... what the fuck, still here......
15:10:30 <oklopol> i'm such a slacker
15:10:34 <oklopol> soon i will go
15:10:39 <oklopol> maybe... now
15:10:41 <oklopol> ->
15:39:02 <pgimeno> http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/langtonsant.php - Langton's ant (unrelated to PFK)
15:39:20 <pgimeno> not programmable though
15:39:29 <lostgeek> AnMaster: PaintFuck
15:39:34 <lostgeek> arrrrrrrrgh
15:39:43 <ehird> gee how many times have we said "AnMaster: PaintFuck" today
15:39:53 <lostgeek> well this time it was my fault
15:40:12 <lostgeek> i thought i was in the other terminal window and pressed up and enter
15:45:48 <AnMaster> hm?
15:45:59 <AnMaster> lostgeek, did you want it?
15:46:05 <AnMaster> err
15:46:08 <AnMaster> did you want something
15:46:09 <AnMaster> I meant
15:46:12 <lostgeek> nope
15:46:15 <AnMaster> ok
15:58:21 <AnMaster> back
15:58:24 <AnMaster> huh
15:58:31 <AnMaster> forgot to say afk heh
15:58:42 <AnMaster> ais523, and thanks btw
15:58:45 <AnMaster> didn't see it abvoie
15:58:46 <AnMaster> above*
16:13:33 <AnMaster> AnMaster, hm... *poke*
16:13:40 <AnMaster> anything interesting?
16:13:44 <AnMaster> or busy with "rl2
16:13:45 <AnMaster> err
16:13:47 <AnMaster> or busy with "rl"*
16:20:45 -!- puzzlet_ has quit (Remote closed the connection).
16:20:53 -!- puzzlet has joined.
16:20:54 -!- KingOfKarlsruhe has joined.
16:26:20 <lostgeek> mh. I got a problem with my code window...
16:26:46 <lostgeek> lets say I have a loop like *[w*] or something
16:26:51 <ais523> AnMaster: busy with things including RL
16:27:03 <ais523> and some non-RL but non-eso programming
16:27:05 <lostgeek> and my pointer is on the second *
16:27:17 <ais523> and trying to recover an email that Outlook Web Access deleted yesterday
16:27:23 <ais523> I spent over an hour writing it
16:27:24 <lostgeek> now I call nextStep() and move to ']'
16:27:31 <ais523> then accidentally hit back on my mouse, and couldn't get back to it
16:27:33 <ais523> so I'm rewriting it
16:27:43 <lostgeek> where I jump back to '['
16:28:04 <lostgeek> how I was solving it was to jump back to the left of '['
16:28:49 <lostgeek> but in that case my pointer is on the first * which is confusing, since I don't execute it
16:29:01 <AnMaster> ais523, ah
16:29:12 <lostgeek> any ideas how to solve that?
16:29:18 <AnMaster> ais523, ouch
16:30:06 <AnMaster> lostgeek, you move before you execute or execute before you move?
16:30:18 <lostgeek> move before I execute
16:30:34 <lostgeek> which solves other problems I would have when executing before moving
16:30:52 <AnMaster> lostgeek, now I don't 1) know how similar it is to plain bf, 2) what language you are writing it in
16:30:59 <AnMaster> but if it was C and plain bf
16:31:02 <ehird> http://www.iq0.com/notes/deep.nesting.html
16:31:11 <ehird> (AnMaster will hate that article)
16:31:11 <AnMaster> I would just connect the ] node's next pointer to the matching [
16:31:14 <AnMaster> while I'm parsing
16:31:27 <AnMaster> the up pointer to the instruction after
16:31:51 <AnMaster> and the ['s down pointer to the first instruction in the loop
16:31:54 <AnMaster> or something like that
16:32:27 <AnMaster> lostgeek, and move before execute is sane
16:32:43 <lostgeek> I'm working with strings (on java)
16:32:51 <ehird> lostgeek: prepaer
16:32:53 <ehird> *preparse
16:32:55 <ehird> the code before execution
16:33:07 <AnMaster> no idea about java
16:33:21 <AnMaster> but I would represent the source of plain bf as a 2D linked list
16:33:37 <AnMaster> actually to save some space I wouldn't have separate up and down pointers in the structs
16:33:43 <AnMaster> I would have a single "aux" pointer
16:33:54 <AnMaster> since I wouldn't need up and down in the same struct
16:34:03 <AnMaster> need both*
16:34:39 <lostgeek> mh ok. I added a TODO :)
16:34:42 <lostgeek> thanke
16:34:46 <lostgeek> thanks
16:34:52 <AnMaster> lostgeek, but this may be totally crazy to do in java
16:34:54 <AnMaster> I got no idea
16:35:13 <lostgeek> AnMaster: I think there are LinkedLists in Java. But working with strings was easier
16:35:29 <ehird> lostgeek:
16:35:48 <ehird> public class BFNode { public char type; public BFNode stuff; public BFNode next; }
16:36:18 <ehird> lostgeek: {type='[', stuff={type='w', stuff=null, next=null}, next={type='*', stuff=null, next=null}}
16:36:23 <ehird> lostgeek: then just recurse to loop
16:36:27 <ehird> or keep a manual stack
16:37:29 <lostgeek> yeah. may be a good way to solve it.
16:37:31 <AnMaster> lostgeek, well I did it like this: mmap() source bf file, write a recursive parser to build the tree, pass the tree to the optimizer (replaces ++- with +, reorganize >-<+>-< into >--<+ and such as well as replace ---- with -4)
16:37:37 <AnMaster> then I pass it to the emitter
16:37:40 <ehird> its the only way to solve it sanely
16:37:42 <AnMaster> that emitted it as C code
16:37:42 <ehird> :P
16:37:48 <ehird> of course, insane is good too
16:37:50 <AnMaster> then I used system() to call the compiler
16:37:59 <ais523> AnMaster: do you replace >>>> with >4?
16:37:59 <AnMaster> since it was a compiler, not an interpreter
16:38:05 <ais523> gcc-bf really, really needs that optimisation
16:38:08 <AnMaster> ais523, yes of course
16:38:16 <ais523> in fact, I'm considering just getting it to output run-length-encoded BF
16:38:23 <AnMaster> ais523, however it was the one with huge duff's device due to being Def-BF
16:38:25 <ais523> easy enough to postprocess that into normal BF
16:38:25 <AnMaster> but since that is dead
16:38:30 <AnMaster> code reuse should be good
16:38:39 <AnMaster> I have considered several other optimizing techniques
16:38:54 <AnMaster> such as in a balanced loop try to pre-compute certain parts
16:38:56 <AnMaster> like
16:39:07 <AnMaster> [>++>+<<-]
16:39:10 <AnMaster> then you could do
16:39:41 <AnMaster> while (*ptr != 0) { *(ptr+1)+=2; *(ptr+2)++; }
16:39:42 <AnMaster> basically
16:39:47 <AnMaster> well not exactly
16:39:50 <AnMaster> but something like that
16:39:54 <AnMaster> instead of moving ptr
16:40:08 <AnMaster> oh and decrement too
16:40:13 <AnMaster> don't forget that heh
16:40:35 <AnMaster> ais523, see what I mean?
16:40:51 <AnMaster> and if number of iterations can be pre-computed...
16:40:56 <AnMaster> well you could gain a lot
16:41:05 <AnMaster> so it should try to track possible states
16:41:07 <AnMaster> of all cells
16:41:21 <AnMaster> you can *know* the state after a [-] (turned into a set zero by the optimizer)
16:41:33 <AnMaster> then if you can compute the value it has a bit later
16:41:38 <AnMaster> you can turn it into a set 3
16:41:40 <AnMaster> or whatever
16:41:50 <AnMaster> and if you know that at the start of a balanced loop...
16:41:59 <AnMaster> well you could either turn it into a for loop or unroll it
16:42:08 -!- puzzlet_ has joined.
16:42:11 <AnMaster> at least gcc compile for loops quite a bit faster than while loops
16:42:18 <AnMaster> ais523, :)
16:42:27 <AnMaster> what do you think of these ideas?
16:42:32 <AnMaster> I assume they aren't new
16:42:46 <ais523> AnMaster: I've considered similar things myself
16:43:01 <AnMaster> however I'm unsure if I could manage to implement this
16:43:19 <AnMaster> I mean even writing the basic optimizer was quite painful in C
16:43:27 -!- whtspc has joined.
16:43:33 <AnMaster> some sort of tree rewriting language, hmm
16:43:36 <whtspc> hi
16:43:36 <AnMaster> ais523, oil?
16:43:41 <AnMaster> isn't that for that
16:43:44 <ehird> yo
16:43:46 <ais523> AnMaster: yes
16:43:49 <AnMaster> would need a different variant though
16:43:51 <ehird> whtspc: oklopol wrote a Game of Life
16:43:51 <ehird> it's slow
16:43:55 <AnMaster> something that isn't as intercal specific
16:44:00 <AnMaster> and that is possible to actually read
16:44:01 <ais523> although OIL was defined specifically for INTERCAL, it would be possible to do similar langs for other langs
16:44:06 <ais523> and OIL is readable
16:44:13 <AnMaster> ais523, do you know of any existing one?
16:44:14 <ais523> at least compared to INTERCAL
16:44:20 <whtspc> I saw something, is there a definite version?
16:44:27 <whtspc> ehird?
16:44:27 <ais523> AnMaster: no, or possibly I'd have used them rather than writing OIL from scratch
16:44:38 <ehird> whtspc: conway's game of life
16:44:39 <AnMaster> ais523, ah
16:44:53 <AnMaster> ais523, still oil couldn't easily do variable tracking
16:45:02 <AnMaster> or could it?
16:45:09 <AnMaster> what computational class is oil btw?
16:45:28 <whtspc> i saw the one with the three block, amazing!
16:45:29 <ais523> AnMaster: PDA, I think
16:45:32 <ehird> whtspc: http://www.vjn.fi/pb/p422562455.txt
16:45:36 <ehird> also
16:45:37 <ehird> which on
16:45:37 <ehird> e
16:46:01 <whtspc> cool
16:46:09 <AnMaster> ais523, PDA?
16:46:16 <AnMaster> you mean like a PDA computer?
16:46:17 <AnMaster> err
16:46:19 <ais523> push-down automaton
16:46:21 <AnMaster> ah
16:46:23 <AnMaster> hah
16:47:08 <AnMaster> ais523, still variable tracing/tracking hm, I don't know how I would even do that
16:47:23 <AnMaster> I mean I could try to trace the entire program but that would be insane
16:47:38 <AnMaster> I would need to give up at unbalanced loops and so on
16:47:39 <AnMaster> hrrm
16:47:59 <ais523> I've been having insane ideas as to how to optimise unbalanced loops, etc
16:48:05 <AnMaster> and what about new simplification possible after the first pass?
16:48:19 <AnMaster> should you try to run it again?
16:48:19 <AnMaster> ais523, how?
16:48:20 <whtspc> I like to be able to easily save programs in sort of database, do you guys use something special for that?
16:48:39 <AnMaster> I can see how if you just reorganize a bit but leave the pointer the same at the end and the start
16:48:39 <AnMaster> say
16:48:41 <whtspc> should I just open a blog to quickly paste things in
16:48:48 <AnMaster> [>++<->+>>]
16:48:51 <AnMaster> that could be moved
16:48:52 <AnMaster> to
16:49:00 <AnMaster> [>+++<->>>]
16:49:07 <ehird> whtspc: umm
16:49:09 <AnMaster> and that could be moved to
16:49:09 <ehird> a filesystem
16:49:11 <ehird> heard of 'em
16:49:17 <AnMaster> [->+++>>]
16:49:22 <ehird> if you wanna share it, pastie.org
16:49:27 <AnMaster> but that is about all you can do for them
16:49:36 <ehird> if you want to get a list of them, insertsomerandomwordshereandbookmarkit.pastebin.com
16:49:40 <AnMaster> sure you could try to generate effective code
16:50:01 <AnMaster> such as substract, add 3 to next, add 3 to pointer
16:50:11 <AnMaster> but that is still about it
16:50:12 <whtspc> yeah thought about pastebin
16:50:19 <AnMaster> ais523, so what is your idea then?
16:50:44 <ais523> AnMaster: work out what's being used for what
16:51:05 <AnMaster> ais523, it would be very hard to track what the state is at the end of the loop compared to the start
16:51:10 <AnMaster> what cells are affected
16:51:11 <AnMaster> and such
16:51:33 <AnMaster> ais523, probably possible and extremely hard for a few cases
16:51:40 <AnMaster> and impossible for the majority
16:51:44 <AnMaster> that is my *feeling*
16:51:45 <ais523> so for instance you might deduce that there's a location that's always reached by [>>>] from a particular point
16:51:46 <ais523> that moves around
16:51:54 <AnMaster> ais523, hm
16:52:06 <AnMaster> ais523, example?
16:52:48 <whtspc> wow, game of life :)
16:52:55 <ais523> AnMaster: not easily
16:53:21 <AnMaster> ais523, hm ok... The worst thing is if you can't figure out, for example say it is based on user input, then figure out where you can resume
16:53:23 <ehird> whtspc: also
16:53:28 <ehird> http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/paintfuck-canvas.php
16:53:31 <ehird> new pgimeno interpr
16:53:33 <ehird> really fast
16:53:45 <AnMaster> if it wasn't for unbalanced loops it would be very very easy to find out
16:53:45 <whtspc> yeah using it right now for life
16:53:50 <AnMaster> and it would also be non-tc
16:54:00 <whtspc> it's the best for easy use too
16:54:29 <AnMaster> ais523, so how hm...
16:54:42 <whtspc> really looking forward to lostgeek things too
16:54:51 <ais523> AnMaster: basically in the style of Proud, but saner
16:54:58 -!- puzzlet has quit (Read error: 110 (Connection timed out)).
16:55:02 <ais523> have a huge set of plausible assumptions to start off with
16:55:11 <ais523> then given the current set of assumptions, see which are contradicted by the program
16:55:18 <AnMaster> ais523, Proud, hm was that the uncomputable one?
16:55:23 <ais523> continue iterating until you have a consistent set of assumptions
16:55:24 <ais523> AnMaster: yes
16:55:36 <ais523> Proud's like I suggested but with an uncountably infinite set of assumptions
16:55:42 <ais523> whereas I was planning just a finite number
16:56:13 <AnMaster> ais523, well, finite would be uh 255 * number of cells! or something like that?
16:56:25 -!- Corun has joined.
16:56:30 <AnMaster> also
16:56:35 <AnMaster> +[>+]
16:56:39 <AnMaster> ais523, :P
16:56:47 <AnMaster> ^bf +[>+]
16:56:52 <AnMaster> fungot, ?
16:56:52 <fungot> AnMaster: same core language that the rest of the arguments
16:56:56 <AnMaster> ^help
16:56:56 <fungot> ^<lang> <code>; ^def <command> <lang> <code>; ^show [command]; lang=bf/ul, code=text/str:N; ^str 0-9 get/set/add [text]; ^style [style]; ^bool
16:57:09 <AnMaster> why didn't it say "out of time"?
16:57:17 <AnMaster> ^bf +[>+]
16:57:29 <AnMaster> ^bf +++++++++++++++++++++.
16:57:30 <fungot>
16:57:32 <AnMaster> hm
16:57:39 <AnMaster> ^bf +++[>++.]
16:57:39 <fungot> ...
16:57:47 <AnMaster> fizzie, is it broken?
16:58:35 <AnMaster> ^bf ----.[>+.]
16:58:35 <fungot> <CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP><CTCP> ...
16:58:37 <ais523> ^bf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
16:58:38 <fungot> B
16:58:41 <AnMaster> ^bf ----.[>+]
16:58:42 <fungot>
16:58:51 <AnMaster> now that doesn't look right at all
16:58:58 <ais523> the out of stuff thing seems broken
16:59:04 <ais523> ^bf +[]
16:59:05 <AnMaster> ais523, yes
16:59:09 <fungot> ...out of time!
16:59:14 <ais523> ...
16:59:18 <AnMaster> huh
16:59:25 <AnMaster> ^bf ----.[]
16:59:30 <fungot> ...out of time!
16:59:49 <AnMaster> ais523, seems it fails for "out of cells"
16:59:58 <AnMaster> or out of tape
16:59:58 <ais523> ^bf <
17:00:19 <AnMaster> that shouldn't even be legal
17:00:28 <AnMaster> ^hi
17:00:30 <ais523> AnMaster: that's out of tape too, just off the other end
17:00:37 <ais523> ^ul (test)S
17:00:37 <AnMaster> ^show
17:00:37 <fungot> test
17:00:37 <fungot> echo reverb rev rot13 rev2 fib wc ul cho choo pow2 source help
17:00:47 <AnMaster> ais523, hm
17:01:20 <oklopol> o
17:01:21 <oklopol> o
17:01:27 <ehird> oklopol: o
17:01:33 <oklopol> yes
17:01:35 <ais523> o o oko
17:01:40 <oklopol> okoko
17:01:44 <oklopol> okokokoko
17:01:46 <AnMaster> ais523, so how would you implement this optimizer?
17:01:47 <oklopol> okokokokokokoko
17:01:48 <AnMaster> I don't know
17:01:55 <AnMaster> I couldn't do it I guess
17:02:13 <AnMaster> ais523, also what would the assumptions be?
17:02:15 <ais523> AnMaster: I have too many toher things to think about, but I've thought about it before
17:02:26 <AnMaster> ais523, "any cell can have any value"?
17:02:30 <ais523> assumptions like "if the pointer points to this cell, it's location is always known"
17:02:39 <ais523> "every third cell is 0 when this point in the code is reached"
17:02:58 <AnMaster> ais523, yes true, but how do you find out a sane and/or initial set of these assumptions
17:02:58 <ais523> "when the pointer's at cell 3n, n>100, then [<<<] always goes to cell 99"
17:03:01 <ais523> that sort of thing
17:03:10 <ais523> and the initial set is just full of all the assumptions we can think of
17:03:15 <ais523> optimised somehow to save time
17:03:24 <ais523> then it iteratively works out which ones are false
17:03:27 <ais523> until it has a consistent set
17:04:23 <AnMaster> I would do it like tracing the code flow as far as I could then make that constant initial state. For the rest of the code I would have to use another way
17:04:40 <AnMaster> like trying to trace what variables are known at what points
17:05:02 <AnMaster> like as soon as I have a [-] I can know that cell's state until the next bad section
17:05:11 <AnMaster> like unbalanced loop, or input into said cell
17:05:37 -!- KingOfKarlsruhe has quit (Remote closed the connection).
17:05:45 <AnMaster> ais523, that could work very well for gcc-bf output, but would perform rather poorly in the general case
17:05:46 <AnMaster> or such
17:06:11 <ais523> AnMaster: yes, probably
17:06:30 <ais523> we'd have to test it on lots of programs to see how real BF programs were generally written
17:06:33 <AnMaster> you would have to create an additional ruleset for the bfbasic or whatever it was called
17:06:43 <ais523> and it would be nice to have it working well on BFBASIC and on gcc-bf
17:06:46 <AnMaster> but for handwritten programs, wouldn't work well
17:07:01 <ais523> AnMaster: why not? handwritten programs mostly use the same sorts of idioms as each other
17:07:07 <AnMaster> hm
17:07:16 <AnMaster> ais523, you should be able to add new assumptions
17:07:23 <ais523> ofc
17:07:24 <AnMaster> I mean [-] is too good to miss out on
17:07:29 <AnMaster> "wow this cell is 0"
17:07:36 <ais523> AnMaster: that's not exactly adding a new assumption
17:07:40 <ais523> the assumption would be "pointer is 0 here"
17:07:46 <ais523> and it would never be contradicted
17:07:55 <ais523> so that one would stay in existence throughout the whole analysis
17:07:56 <AnMaster> ais523, indeed but then
17:07:58 <ais523> not added; just never taken away
17:08:03 <AnMaster> [-]>++<+++++
17:08:12 <AnMaster> that can be turned into
17:08:17 <ais523> AnMaster: after the > you have "left of pointer is 0 here"
17:08:25 <AnMaster> set cell to 5, >, add 2
17:08:28 <ais523> this only works if you have a huge stock of possible assumptions
17:08:49 <AnMaster> ais523, my point is you should be able to trace cell dependencies
17:08:58 <AnMaster> to work out you can turn that into a set to 5
17:08:59 <ais523> it does trace cell dependencies!
17:09:02 <AnMaster> ah
17:09:07 <ais523> once you have all the assumptions, then you optimise
17:09:14 <ais523> in this case, you get "pointer is 5 here" at the end
17:09:15 -!- Slereah_ has joined.
17:09:21 <ais523> which is very easy to optimise
17:09:25 <ais523> *pointer = 5;
17:09:27 <AnMaster> ais523, yes and you need to find where that 5 is used
17:09:30 <AnMaster> for example
17:09:36 <ais523> yep, that would have been tracked already too
17:09:47 <AnMaster> [-]>++<+++++[>+<-]
17:09:51 <AnMaster> what about that?
17:09:58 <jayCampbell> i gave Weave pbrain-style functions last night, haven't uploaded
17:10:10 <AnMaster> you could turn that into, set 0, >, add 7
17:10:15 <jayCampbell> so now it's weave threads + brainfork runtime threads + bprain functions
17:10:22 <AnMaster> ais523, not sure you could make the program do that however easily
17:10:27 <AnMaster> the compiler I mean
17:10:53 <AnMaster> ais523, or?
17:10:58 <ais523> let's see, I'm thinking
17:11:14 <ais523> before the second [, we have "pointer is 5"
17:11:37 <AnMaster> yep and right of pointer is two more than at the start of the section
17:11:43 <ais523> yes
17:11:48 <ais523> we can calculate that the loop runs *pointer times
17:12:01 <AnMaster> yes and then we can unroll it,
17:12:02 <ais523> so we can replace it with >+<->+<->+<->+<->+<-
17:12:12 <ais523> and then it's easy from there
17:12:14 <AnMaster> and reorder that
17:12:26 <ais523> it would be more interesting if it was >++<+++++[>+<-] without the [-] at the start
17:12:32 <AnMaster> ais523, well the issue with that is, how far ahead should you try to look for merging addition substraction
17:12:43 <AnMaster> think of a 1 MB huge section without any loops
17:12:52 <AnMaster> but where each cell affected is touched several times
17:12:57 <AnMaster> that should be reordered
17:13:12 <ais523> I think we should probably work at the level of linearisable sections
17:13:12 <AnMaster> but it would be rather expensive for such a long section
17:13:19 <ais523> i.e. sections with balanced <>
17:13:28 <AnMaster> ais523, hm? yes the 1 MB section would have that
17:13:29 <ais523> optimising a 1MB long section without loops is no slower than running it
17:13:32 <ais523> and you only have to optimise it once
17:13:42 <AnMaster> or with loops but balanced ones
17:13:55 <AnMaster> <ais523> it would be more interesting if it was >++<+++++[>+<-] without the [-] at the start <-- how then?
17:14:34 <ais523> AnMaster: well, that becomes pointer[1]+=2; pointer[0]+=1; (pointer[1]+=pointer[0], pointer[0]=0);
17:14:44 <AnMaster> ais523, still I'm not sure this is the smartest way always
17:14:45 <ais523> because it's linearisable, we can track variables separately
17:14:48 <ais523> s/1/5/
17:14:59 <AnMaster> for some balanced loops you might be better off by not unrolling it
17:15:04 <AnMaster> but turning it into
17:15:25 <ais523> AnMaster: you can't unroll if you don't know the number of iteratinos
17:15:27 <ais523> *iterations
17:15:51 <AnMaster> while (mem[ptr] != 0) { mem[ptr+2]+=4, mem[ptr]--; }
17:15:52 <AnMaster> or such
17:15:56 <AnMaster> if you see what I mean
17:16:01 <AnMaster> or even into a for loop
17:16:08 <AnMaster> that could be vectorized by gcc
17:16:13 <AnMaster> with -fvectorize-tree
17:16:13 <ais523> but unrolling is always going to help the optimiser do more optimisations, you can reroll again afterwards
17:16:15 <AnMaster> :D
17:16:33 <AnMaster> ais523, how would you re-roll then? not trivial or?
17:17:07 <ais523> rerolling is just run length compression
17:17:19 <ais523> that's what gzip effectively is doing, rerolling loops in text
17:17:47 <AnMaster> for (unsigned char i = mem[ptr]; i != 0; i--); do { mem[ptr+1] += 1; mem[ptr+2] += 1; mem[ptr+3] += 1; }
17:18:00 <AnMaster> that I believe gcc would vectorize probably
17:18:06 <AnMaster> wait
17:18:10 <AnMaster> that would be stupid still
17:18:16 <AnMaster> you would be able to do
17:18:20 <ais523> mem[ptr+1]+=mem[ptr];
17:18:21 <AnMaster> mem[ptr+1] -= i;
17:18:22 <AnMaster> yeah
17:18:26 <AnMaster> err
17:18:27 <AnMaster> +=
17:18:28 <AnMaster> right
17:18:45 <AnMaster> ais523, still I believe there are cases you can gain in by using for
17:19:24 <ais523> well, you can't completely compile a program with loops into a program without in all cases
17:19:28 <AnMaster> say:
17:19:34 <AnMaster> [[-]>]
17:19:40 <AnMaster> would be memset(0)
17:19:43 <ais523> hmm... balanced loops always compile into polynomials, don't they?
17:19:46 <AnMaster> until you hit a 0
17:19:53 <ehird> ais523: bf4 compiles them to polynomials
17:19:54 <AnMaster> ais523, oh? interesting
17:19:57 <ehird> i believe
17:20:22 <ais523> I reckon the best way to make an optimiser would be to always compile the polynomials first
17:20:27 <AnMaster> ais523, true
17:20:29 <ais523> then deal with unbalanced loops and assumptions on /that/ level
17:20:44 <AnMaster> ais523, what about turning [[-]>] into a *call* to memset?
17:20:45 <ais523> the assumptions could then mostly be about which cells held zero/nonzero, and where the pointer was
17:20:57 <AnMaster> that should be very fast
17:21:14 <AnMaster> ais523, yes true
17:21:14 <ais523> AnMaster: you're thinking at a completely different level to me here
17:21:23 <AnMaster> ais523, oh? yes I am
17:21:27 <ais523> I'm trying to optimise O(n^2) down to O(n)
17:21:30 -!- whtspc has quit ("ChatZilla 0.9.84 [Firefox 3.0.4/2008102920]").
17:21:33 <ais523> you're optimising O(n) into a slightly faster O(n)
17:21:36 <AnMaster> ah
17:22:02 <AnMaster> well turning balanced loops into polynomials first is indeed a good idea
17:22:18 <AnMaster> ais523, but I'm not happy with that
17:22:23 <AnMaster> so I want to go further
17:22:25 <AnMaster> ;P
17:22:37 <ais523> AnMaster: well, the usual trick is to let the C compiler do the microoptimisations
17:22:48 <ais523> after the BF compiler has done the computational class optimisations
17:23:00 <AnMaster> ais523, hah, but that requires it to understand what the program tries to do
17:23:06 <AnMaster> which might be far from clear at times
17:23:17 <AnMaster> considering the generated C wouldn't be very typical C code
17:23:32 <ais523> AnMaster: no, it would be the sort of C code that compilers are particularly good at micro-optimising
17:23:43 <ais523> something like [[-]>] into memset is trivial for a compiler like gcc
17:23:50 <ais523> which sees stuff being set to 0 in a loop
17:23:57 <AnMaster> ais523, in a while loop
17:24:03 <ais523> although, that would only work if the end was known
17:24:09 <AnMaster> so it would turn it into a strlen + a memset?
17:24:11 <AnMaster> or what?
17:24:17 <ais523> strlen + memset is slower than just looping
17:24:19 <AnMaster> since memset is faster than setting each byte
17:24:31 <AnMaster> ais523, depends, consider that memset can set 32 or 64 bits at a time
17:24:36 <ais523> the fastest way would be to do it wordwise
17:24:37 <AnMaster> while looping would just set 8 at a time
17:24:44 <ais523> using rep movdi
17:24:47 <AnMaster> ais523, indeed, which is what memset does iirc
17:24:53 <AnMaster> wordwise
17:24:56 <ais523> *rep movdb
17:25:03 <ais523> AnMaster: aha, no
17:25:05 <AnMaster> well I don't know what asm it uses
17:25:12 <ais523> memset doesn't terminate at end of string
17:25:13 <ais523> this does
17:25:17 <AnMaster> ais523, ah
17:25:25 <ais523> you want a string-set instruction, not a memory-set instruction
17:25:28 <AnMaster> that is crazy x86 string instruction things?
17:25:31 <ais523> yes
17:25:34 -!- Judofyr has joined.
17:25:39 <ais523> I'm pretty sure there's one that does exactly [[-]>]
17:25:44 <AnMaster> ais523, I wouldn't know, I'm writing portable code
17:25:51 <ais523> AnMaster: well, exactly
17:25:56 <ais523> this is why you let the compiler worry about the details
17:26:01 <AnMaster> ais523, hm true
17:26:02 <ais523> the C compiler
17:26:20 <AnMaster> ais523, about that rep stuff, can those be interrupted and resumed in the middle?
17:26:24 <AnMaster> I always wondered
17:26:29 <AnMaster> how it works with context switches
17:26:29 <ehird> an insane BF optimizer would compile down to machine code
17:26:44 <ais523> AnMaster: yes, but you need to keep track of the registers
17:26:56 <ais523> IIRC, they put their internal state in CX or something like that
17:27:00 <AnMaster> ais523, well the OS dumps them right
17:27:09 <ais523> SI, DI, and CX, or something
17:27:16 <ais523> so if the OS dumps them, it can resume the instruction
17:27:19 <ais523> by issuing it again
17:27:20 <AnMaster> ais523, only 16 bit registers?
17:27:30 <AnMaster> that sounds like it could be an issue
17:27:34 <ais523> AnMaster: I learnt x86 asm on DOS
17:27:41 <ais523> it works with bigger registers almost certainly
17:27:45 <AnMaster> ais523, ah right
17:27:59 <AnMaster> x86 is a mess heh
17:28:01 <ais523> but I have trouble thinking about anything bigger than 16 bits as I never learnt x86 asm in protected-mode
17:28:11 <ais523> just good old-fashioned real-mode programming
17:28:17 * AnMaster adds a REX prefix
17:28:28 <AnMaster> makes it operate on 64-bit operands
17:28:40 <AnMaster> on x86_64
17:28:41 <AnMaster> that is
17:29:22 <AnMaster> ais523, anyway, what about constant folding too?
17:29:34 <ais523> constant folding would happen automatically
17:29:38 <AnMaster> could be done for parts inside loops
17:29:40 <ais523> it's really the basis behind the whole thing
17:29:42 <AnMaster> even unbalanced ones
17:29:47 <AnMaster> or the start of the program
17:29:52 <AnMaster> that I think would be a good idea
17:30:16 <AnMaster> if the program starts with filing in lots of cells with initial values, you could constant fold that and put it in a static array
17:30:20 <AnMaster> in the generated program
17:30:38 <AnMaster> probably even use the static array for the first section of memory
17:30:42 <AnMaster> or such
17:30:46 <AnMaster> hm that is an issue
17:30:57 <AnMaster> we can't know the memory we get allocated are in one block
17:31:04 <AnMaster> the OS could allocate with holes
17:31:07 <ais523> wow, I just realised why UK keyboards have ¬ and that weird broken-vertical-bar char on them
17:31:21 <ais523> it's because they're the printable characters in EBCDIC that aren't in ASCII
17:31:22 <AnMaster> ais523, and to handle holes you need a more complex pointer
17:31:39 <ais523> that way, UK keyboards can type all the printable chars in ASCII, and all the printable chars in EBCDIC
17:31:58 <AnMaster> ais523, well anyway, what about the issue I mentioned?
17:32:22 <AnMaster> I would try to mmap() pages probably, but what if they are not in one single block
17:32:27 <AnMaster> what if I do get holes
17:32:27 <ais523> AnMaster: gcc-bf spends the whole first part of the program going >>>>>>>>>>>+++++++++++++>>>>>>>+++++>>>>>>>>>>>>>>>>>>>+++++++++++++
17:32:38 <ais523> and memory doesn't have holes if you don't ask for it with holes
17:32:40 <AnMaster> ais523, indeed that could be constant folded
17:32:48 <ais523> AnMaster: it's intended to be
17:32:48 <AnMaster> ais523, how do you mean? realloc()?
17:32:54 <AnMaster> but what if it needs to be moved
17:32:59 <AnMaster> then you have issues
17:33:02 <AnMaster> for huge data sets
17:33:02 <ais523> AnMaster: there is no problem with realloc moving stuff
17:33:15 <AnMaster> ais523, yes it would be for something with a large data set
17:33:18 <ais523> AnMaster: well, if you're really crazy, use sbrk
17:33:27 <ais523> it's perfect for allocating data for Brainfuck
17:33:39 <ais523> although almost useless for most langs
17:33:43 <AnMaster> ais523, hm that depends on knowing nothing else is malloced there
17:33:47 <ais523> yep
17:33:52 <ais523> but avoiding malloc is easy enough, surely?
17:33:55 <AnMaster> say if I call putchar() how can I know it didn't just malloc() something
17:33:57 <AnMaster> internallt
17:34:00 <AnMaster> internally*
17:34:03 <AnMaster> in libc
17:34:06 <ais523> AnMaster: isn't there a guarantee somewhere about that?
17:34:14 <ais523> it wouldn't surprise me if there was
17:34:22 <AnMaster> ais523, don't think so, glibc allocs a lot of internal stuff I'm pretty sure
17:34:27 <AnMaster> like input buffers
17:34:40 <ais523> so does libbf
17:34:59 <AnMaster> ais523, yes indeed, so suddenly sbrk may mean it isn't at the top any more!
17:35:18 <ais523> well, you could do brk(NULL) to see if the break value had unexpectedly changed
17:35:24 <ais523> and just realloc the whole lot if it had
17:35:38 <ais523> if something's going to insist on making memory discontiguous, you're going to have to move things around to recontiguise it
17:35:40 <AnMaster> that could leave a huge unused area below
17:35:44 <AnMaster> that nothing can fill
17:36:05 <ais523> AnMaster: you're still thinking on entirely the wrong level here
17:36:17 <ais523> if you really really want massively optimised code, just refrain from syscalls
17:36:20 <AnMaster> ais523, also I'm not sure libc isn't allowed to see there is something free below sbrk and alloc stuff there
17:36:21 <AnMaster> or?
17:36:30 <ais523> that way you know that nothing's brking behind your back
17:36:34 <AnMaster> ais523, you need syscalls for input and output
17:36:39 <AnMaster> bf has that
17:36:47 <ais523> AnMaster: no you don't!
17:36:51 <AnMaster> ais523, oh?
17:36:52 <ais523> the operating system has to manage it somehow
17:36:57 <AnMaster> yes it does
17:37:20 <AnMaster> ais523, ah I got an idea, elf hack, and no idea if it works for stuff in libc
17:37:23 <AnMaster> do like valgrind
17:37:25 <AnMaster> redirect malloc
17:37:31 <AnMaster> to something that allocs from mmaped areas
17:37:41 <AnMaster> well valgrind doesn't do that bit
17:37:54 <AnMaster> anyway it probably won't work for internall malloc() calls in the libc
17:37:58 <ais523> AnMaster: it does work for stuff in libc
17:38:03 <AnMaster> ais523, oh?
17:38:13 <ais523> valgrind errors on some stuff on libc, or would do if it wasn't careful not to
17:38:19 <ais523> besides, just link libc statically
17:38:22 <AnMaster> ais523, wouldn't it use a direct call instead of going through the symbol table?
17:38:26 <ais523> then it definitely works
17:39:13 <AnMaster> ais523, and this would probably only work on a few *nix like linux
17:39:21 <AnMaster> and freebsd at least
17:39:26 <ais523> AnMaster: you are thinking on utterly utterly the wrong level, OK
17:39:32 <AnMaster> ais523, really?
17:39:40 <AnMaster> well I agree high level optimizations is best
17:39:44 <AnMaster> I completely agree
17:39:54 <AnMaster> but once that is done you want more speed
17:40:19 <AnMaster> ais523, it isn't enough to be fast, you will want to be fastest
17:40:24 <AnMaster> and even faster
17:40:36 <AnMaster> just to make sure no one can sneak up easily on your speed
17:41:15 <AnMaster> ais523, no?
17:41:47 <ais523> AnMaster: but any number of low-level optimisations will fail to a big optimisation at the top that improves computational order
17:41:53 <ais523> also, low-level optimisations often slow things down
17:42:12 <AnMaster> ais523, indeed you should do the big optimisations first
17:42:22 <AnMaster> and once that is done, continue with lower and lower levels
17:42:37 <AnMaster> lim speed -> perfection
17:42:46 <ais523> but things like ensuring that all the memory in a BF interp is contiguous are completely independent of other optimisations
17:42:50 <ais523> and I don't really care about them right now
17:43:01 <ais523> besides, all the BF interps in existence have never really had problems with that
17:43:17 <ais523> if you want contiguous memory, allocate a few MB worth of cells in a static array
17:43:34 <ais523> as in practice people never go off the end of that anyway, if they do, don't care about the time delay on realloc
17:43:38 <AnMaster> ais523, got a link to bf4?
17:43:44 <ais523> AnMaster: no I don't, ask ehird
17:43:49 <AnMaster> ais523, ignores...
17:43:52 <ehird> ais523: how, I have him on ignore
17:43:59 <ais523> ehird: AnMaster wants a link to bf4
17:44:07 <AnMaster> I did google yes
17:44:13 <ehird> ais523: ouch. it must suck being in an alternate universe without google for him.
17:44:19 <ehird> or the esolang wiki
17:44:25 <ais523> [17:44] <AnMaster> I did google yes
17:44:27 <ais523> [17:44] <ehird> ais523: ouch. it must suck being in an alternate universe without google for him.
17:44:28 <ais523> classic
17:44:44 <ehird> <ehird> or the esolang wiki
17:44:48 <ais523> perfect timing on that, AnMaster answering ehird's complaint before ehird complained it...
17:44:49 <ehird> today on the ais523 show we snip context
17:44:56 <ais523> ehird: it was just two lines in a row
17:45:00 <AnMaster> ais523, thanks
17:45:02 <ais523> that was post-context I snipped
17:45:12 <ehird> no, it was a sentence over two lines
17:45:30 <AnMaster> wow it isn't on the brainfuck page
17:45:33 <ais523> ehird: besides, AnMaster clearly doesn't live in a world without Google or Esolang, as he lives at least in a world with Google
17:46:05 <AnMaster> ais523, (bf|brainfuck) ?4
17:46:08 <ais523> also, according to AnMaster it isn't on http://esolangs.org/wiki/brainfuck either
17:46:13 <AnMaster> can not be found on the brainfuck esolang page
17:46:14 <ehird> it is.
17:46:44 <AnMaster> no. not with that name then
17:46:57 <AnMaster> if it got another name it would he hard to find...
17:47:05 -!- jix_ has joined.
17:47:12 -!- jix_ has quit (Remote closed the connection).
17:47:13 <ais523> ehird: there are no instances of the digit 4 anywhere on http://esolangs.org/wiki/brainfuck
17:47:21 <ais523> wait, messed up my browser
17:47:22 <ehird> ais523: and?
17:47:26 -!- jix_ has joined.
17:47:27 <AnMaster> ais523, well there is, "This page has been accessed 47,617 times."
17:47:30 <AnMaster> and 1024
17:47:32 <ehird> it isn't named in the link
17:47:32 <ehird> just like bff
17:47:36 <AnMaster> and Brainfuck interpreter for the HP48gII calculator. May also work with other HP calculators.
17:47:46 <ais523> ehird: well, then why did you expect AnMaster to find it by searching Esolang
17:47:55 <AnMaster> ok then how the heck should you find it... if it badly named
17:48:00 <ehird> He could look at the link text and click ones that look relevant?
17:48:01 <ais523> you're arguing against yourself here
17:48:02 <ehird> That's how I found it.
17:48:11 <AnMaster> there isn't a "bff" either
17:48:13 <AnMaster> with that spelling
17:48:27 <ais523> ehird: that's much less reasonable than asking someone who knows the link to tell where it is
17:48:40 <ehird> Well, yes, but you could go for someone who wants to tell you,.
17:48:46 <ais523> you're coming up with a rather beware of the leopard response
17:50:24 <AnMaster> it is a lot more fun to optimize brainfuck than it is to code in it, IMO
17:52:10 -!- puzzlet_ has quit (Remote closed the connection).
17:52:15 -!- puzzlet has joined.
17:53:00 <AnMaster> ok with some googling I found this http://mozaika.com.au/oleg/brainf/
17:53:08 <AnMaster> after:
17:53:18 <AnMaster> bff4 brainfuck
17:53:28 <AnMaster> well that wasn't the name ehird told us initially
17:53:33 <AnMaster> ais523, ^
17:53:46 <AnMaster> now if he had said that it would have been simpler
17:53:50 <ais523> ehird: AnMaster says that the interp in question is actually called bff4
17:53:56 <ais523> so you even got the name you told em wrong
17:54:01 <ehird> bf4, bff4
17:54:04 <ehird> not exactly hard to make the leap?
17:54:09 <ais523> ehird: well, yes it is
17:54:14 <ehird> k
17:54:16 <AnMaster> yes, why would I try to look for an extra f?
17:54:20 <ais523> would you claim that bf and bff are the same interp?
17:54:24 <AnMaster> I mean, brain ffuck?
17:54:26 <AnMaster> or what?
17:54:28 <ehird> no, but the 4 is the main thing
17:54:55 <ais523> ehird: that's a version number... naming programs including the version number is fine, naming programs after /just/ the version number is stupid
17:55:05 <ehird> ais523: It is not a version number.
17:55:07 <ais523> unless the version number itself is something stupid like XP or Vista
17:55:22 <AnMaster> ais523, someone else made bff it says on that page
17:55:26 <ais523> ah, yes
17:55:27 <AnMaster> so it is a separate program
17:55:29 <AnMaster> but still
17:55:31 <ais523> but still
17:55:36 <AnMaster> how could I guess there was an extra f?
17:55:46 <AnMaster> I mean, it isn't in the name "brainfuck
17:55:48 <AnMaster> "
17:55:51 <AnMaster> there is one f there
17:55:53 <AnMaster> not two
17:56:11 <AnMaster> so how on earth would it be possible to guess that one should add the extra f
17:56:45 <AnMaster> why not add an extra b?
17:56:47 <AnMaster> instead
17:56:49 <ais523> ehird: <http://www.google.co.uk/search?q=brainfuck+4&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a>, Google disagrees with you on the 4 being the main thing
17:56:50 <AnMaster> or an extra 4
17:56:59 <ehird> ais523: bf{f}4
17:57:03 <ais523> if it was, a Google search for "brainfuck 4" would find what you were talking about
17:57:04 <ehird> seriously, stop bugging me.
17:57:12 <AnMaster> sure ehird, but you didn't say it at the start
17:57:16 <ehird> it's very obvious i don't feel like helping AnMaster.
17:57:20 <ais523> ehfird: why on earth would you assume people would randomly add an extra 4 to things?
17:57:33 <AnMaster> ais523, or an extra f...
17:57:38 <ehird> that wasn't a regexp.
17:57:38 <ais523> AnMaster: yes
17:57:40 <ais523> sorry
17:57:41 <AnMaster> and also just admitting the mistake would be easier
17:57:55 <ais523> ehird: well, clearly, it's a syntax error as a regexp
17:58:06 <AnMaster> also he didn't say that initially
17:58:09 <ais523> it's legal but pointless as a wildmat
17:58:26 <AnMaster> {,f}
17:58:26 <ais523> AnMaster: don't be too hard on ehird, his keyboard obviously has an invisible f key button that he pressed by mistake
17:58:31 <ais523> being invisible, he didn't realise
17:58:38 <AnMaster> ais523, oh?
17:58:39 <ais523> those Apple keyboards are strange...
17:58:42 <AnMaster> ah true
17:58:53 <ehird> k, call me back when you're talking about esolangs instead of lolling with AnMaster about me, i kind of have better things to do than being highlighted every 2 seconds
17:58:55 -!- ehird has left (?).
17:59:00 <AnMaster> ais523, so you mean he got one normal and one invisible f?
17:59:04 <ais523> presumably
17:59:11 <AnMaster> also he can't simply admit he did a mistake
17:59:11 <ais523> as he's obviously capable of typing visible fs
17:59:25 <ais523> AnMaster: actually, he seems to have admitted he was being deliberately obstructive to try to annoy you
17:59:27 * AnMaster sighs
17:59:34 <AnMaster> ais523, well true, but...
17:59:39 <ais523> which makes complaining about the resulting revenge a bit rich
18:00:18 <AnMaster> ais523, haah
18:00:20 <AnMaster> hah*
18:00:39 <AnMaster> ok the bff4 code isn't very well commented
18:00:47 <AnMaster> http://mazonka.com/brainf/bff4.c
18:01:14 <AnMaster> one helpfull thing is that -DLNR is supposed to be what makes it optimize linear loops
18:01:35 <AnMaster> so hopefully not to hard to find the relevant code that way
18:02:01 <AnMaster> if( z->linear )
18:02:01 <AnMaster> {
18:02:01 <AnMaster> int del = m[mp]/z->linear;
18:02:01 <AnMaster> for( i=0; i<z->sz; i++ ) m[mp+z->off+i]+=del*z->d[i];
18:02:01 <AnMaster> }
18:02:04 <AnMaster> that seems to be it
18:02:14 <AnMaster> it calculates if it is linear a bit before
18:02:19 <AnMaster> now wtf does that code do
18:02:20 <ais523> AnMaster: I'm too busy with other things to attempt to parse that code, I think
18:02:32 <AnMaster> ais523, a bit obfuscated isn't it
18:02:42 <ais523> meaningless variable names, not enough spaces
18:02:54 <ais523> it's slightly worse than what I write on average, which means it must be /really/ bad
18:03:13 <AnMaster> ais523, the whole file is like that
18:03:21 -!- psygnisfive has joined.
18:03:29 <AnMaster> ais523, after the includes there is *NO* comment
18:03:51 <ais523> I comment my code quite a bit normally
18:03:54 <ais523> especially the obfuscated code
18:04:03 <ais523> even the IOCCC stuff is commented, although the comments are just there to confuse people
18:04:05 <ais523> such as /\
18:04:07 <ais523> with the * on the next line
18:04:30 <AnMaster> heh
18:04:33 <AnMaster> well this is the reverse
18:04:55 <AnMaster> ais523, also bff4 seems to be an interpreter not a compiler
18:05:15 <ais523> it's basically a bytecode compiler + interpreter, I think
18:05:26 <AnMaster> ah
18:09:41 <AnMaster> ais523, hm would it be possible to optimize > or < into a constant goto cell after an unbalanced loop?
18:09:46 <AnMaster> what would be needed to be able to
18:09:48 <AnMaster> I mean like
18:09:56 <AnMaster> setting pointer to a fixed value
18:10:08 <AnMaster> not like adding or subtracting a specific value
18:10:33 <AnMaster> another thing
18:10:40 <psygnisfive> guys
18:10:41 <AnMaster> what about loops like:
18:10:44 <psygnisfive> sambuca = delicious
18:10:47 <ais523> <AnMaster> ais523, hm would it be possible to optimize > or < into a constant goto cell after an unbalanced loop? <--- that's the main thing I want to focus on
18:10:56 <AnMaster> [>.<-]
18:11:01 <AnMaster> that is balanced
18:11:06 <AnMaster> but not easily translated
18:11:09 <AnMaster> hm wait
18:11:15 <AnMaster> you could make a balanced one too
18:11:29 <AnMaster> [>+<.]
18:11:34 <AnMaster> err
18:11:35 <AnMaster> waiut
18:11:36 <ais523> [>.<-] is trivially translated
18:11:36 <AnMaster> wait*
18:11:38 <AnMaster> ,
18:11:41 <AnMaster> not .
18:11:44 <AnMaster> I typoed that
18:11:44 <ais523> it just prints a character lots of times
18:11:49 <ais523> , is more interesting
18:11:50 <AnMaster> ais523, I typoed, I meant ,
18:11:52 <AnMaster> yeah
18:12:04 <ais523> that just reads characters forever, doesn't it?
18:12:04 <AnMaster> or , that ends up affecting loop count
18:12:11 <AnMaster> but where you can still know the cell
18:12:29 <AnMaster> ais523, hm ok, so what about one where it substracts 78 from the value it read?
18:12:33 <ais523> AnMaster: things like ,[.,] probably can't be optimised any furthre
18:12:37 <ais523> *further
18:12:40 <AnMaster> that could be easily input and hit 0
18:12:42 <AnMaster> or not
18:12:46 <AnMaster> see what I mean?
18:13:20 <AnMaster> like: [, -78 ]
18:13:26 <AnMaster> in pesudo code
18:13:33 <AnMaster> then if I enter N the loop will ned
18:13:38 <AnMaster> but anything else it will continue
18:13:41 <AnMaster> yet it is balanced
18:13:50 <AnMaster> sure that is hard to optimize more
18:13:56 <AnMaster> but you could have other code
18:13:57 <AnMaster> in it
18:13:59 -!- oerjan has joined.
18:14:10 <AnMaster> that would be easy to optimize with known iteration count
18:14:20 <AnMaster> but you can no longer do anything but a while loop
18:14:31 <AnMaster> ais523, right?
18:14:35 <ais523> AnMaster: there is nothing intrinsically bad about while loops
18:14:44 <ais523> it's the number of nested loops you want to be able to keep down in a program
18:14:55 <AnMaster> ais523, true
18:15:10 <AnMaster> but still user input affecting the loop counter might be hard to handle
18:15:15 <ais523> AnMaster: no it isn't, just do a while loop
18:15:15 <AnMaster> it blocks a lot of optimizing
18:15:20 <ais523> that's what it /is/, after all
18:15:32 <ais523> it doesn't block the sort of high-level optimisations I care about, just your low-level parallelised megafors
18:15:43 <AnMaster> ais523, true, but you know what I saw recently, with gcc, a while loop used for comping CRC, was slow
18:15:46 <AnMaster> changed to a for loop
18:15:49 <AnMaster> a lot faster
18:16:08 <AnMaster> and yes object size was known at compile time in both cases
18:16:11 <ais523> AnMaster: is "a lot" a factor of 10000 or more?
18:16:15 <ais523> or more like 1.2?
18:16:26 <AnMaster> ais523, a lot being like a factor or 4 times as fast or so
18:16:27 <ais523> it's the factor-of-10000 changes I'm going for
18:16:39 <AnMaster> between 4 and 8
18:16:40 <AnMaster> or so
18:16:43 <AnMaster> iirc
18:17:16 <AnMaster> ais523, since it was run several hundred of thousands of times during a single execution however
18:17:21 <AnMaster> it did help
18:17:36 <AnMaster> it was at the top of "time spent in function" in gprof output
18:17:46 <AnMaster> before
18:17:51 <AnMaster> far from the top after
18:17:56 <AnMaster> so for that case it mattered
18:18:01 <ais523> anyway, I'd like to end this conversation, so I can concentrate on something else
18:18:05 <AnMaster> ais523, ok :)
18:18:07 <ais523> I have a massively long email to reconstruct
18:18:11 -!- Deewiant has quit (Read error: 60 (Operation timed out)).
18:18:21 <AnMaster> ais523, meanwhile I will try to work on some ideas I got from this convo
18:18:28 -!- oerjan has quit (Client Quit).
18:18:44 <oklopol> and i will go to el shoppo
18:18:48 <AnMaster> oklopol, cya
18:19:05 <oklopol> optimizing bf again i see, i gutta read the context when i returnn
18:26:34 <AnMaster> oklopol, we had some new ideas
18:27:38 -!- Deewiant has joined.
18:27:50 -!- ineiros has quit (Read error: 101 (Network is unreachable)).
18:39:01 <AnMaster> Deewiant, ais523: good name for the project?
18:39:05 <AnMaster> I can't think of one
18:39:13 <AnMaster> bf2c seems to be used already
18:39:17 <ais523> AnMaster: bf4
18:39:22 <AnMaster> haha
18:39:25 <ais523> with one f
18:39:36 <AnMaster> Results 1 - 10 of about 704,000 for bf4. (0.17 seconds)
18:39:41 <AnMaster> not good
18:39:45 <AnMaster> want a googlable name
18:41:41 -!- Slereah_ has quit (Read error: 113 (No route to host)).
18:42:02 <AnMaster> Results 1 - 8 of 8 for bf4 brainfuck. (0.05 seconds)
18:42:05 <AnMaster> hm much better
18:42:16 <AnMaster> and the interpreter with the same name is crap it seems
18:42:19 <AnMaster> but still
18:43:04 <AnMaster> bfff3.14
18:43:06 <AnMaster> what about that?
18:43:36 <ais523> call it "before"
18:44:19 <AnMaster> ais523, not googlable
18:45:26 <ais523> I don't really put much stock in Google
18:46:20 <AnMaster> hm
18:48:54 <oklopol> AnMaster: tell ideas
18:49:40 <AnMaster> oklopol, read above?
18:49:48 <AnMaster> I'm busy coding now
18:49:59 <oklopol> ic
18:57:32 -!- oerjan has joined.
19:05:57 <AnMaster> ais523, right, before it is
19:06:24 * oerjan wonders what went into that
19:06:52 <oerjan> and will the successor be called befyve?
19:08:00 <oerjan> is this an interpreter for ordinary bf, or is there something extra?
19:08:08 <psygnisfive> oklopol
19:08:25 <oerjan> psygnisfive
19:08:28 <psygnisfive> hey
19:09:19 <oklopol> psygnisfive: glio
19:09:24 <oerjan> you broke the chain :(
19:10:02 <psygnisfive> glio?
19:10:09 <AnMaster> oerjan, not an interpreter
19:10:10 <oklopol> a bitta glio never hurt anyone
19:10:11 <psygnisfive> miz glio?
19:10:12 <AnMaster> it is a compiler
19:10:14 <AnMaster> to C
19:10:19 <AnMaster> optimizing one
19:10:24 <oklopol> i don't know who miz is
19:10:30 <ais523> oerjan: it was a very short chain...
19:10:34 <AnMaster> it will implement some new ideas that ais523 and me discussed above
19:10:42 <oerjan> ais523: killed in its infancy :(
19:10:52 <oklopol> ais523: i think oerjan extrapolated it'd be a long conversation.
19:11:04 <oklopol> but then i had to come and steal focus
19:11:15 <AnMaster> ais523, hahah at function name: before_postprocess
19:11:16 <AnMaster> :D
19:11:33 <AnMaster> or:
19:11:35 <oklopol> prepostprocess
19:11:36 <AnMaster> before_init()
19:11:41 <AnMaster> that is actually emitted
19:11:46 <oerjan> oklopol: that's preposterous
19:11:49 <AnMaster> and before_cleanup()
19:11:50 <oklopol> it's emitted now?
19:12:04 <AnMaster> "static inline void before_init(void) {",
19:12:04 <AnMaster> " cells = malloc(CHUNKSIZE * sizeof(beforecell));",
19:12:04 <AnMaster> " cellcnt = CHUNKSIZE;",
19:12:04 <AnMaster> " memset(cells, 0, cellcnt * sizeof(beforecell));",
19:12:04 <AnMaster> "}",
19:12:19 <AnMaster> I based this on the def-bf compiler I was working on
19:12:29 <AnMaster> except pikhq never finished his high level part
19:12:35 <AnMaster> so I consider the def-bf stuff dead
19:12:39 <oklopol> no one ever finishes anything
19:12:45 <oerjan> oklopol: actually the second google hit on glio is on someone who died from it :/
19:12:51 <oklopol> :D
19:13:01 <AnMaster> "static inline void before_cleanup(void) {",
19:13:01 <AnMaster> " free(cells);",
19:13:01 <AnMaster> "}"
19:13:07 <psygnisfive> anyone ever done any machine learning stuff? :T
19:14:30 <oklopol> oerjan: most hilarious death of the day, even more fun than your chain.
19:14:47 <AnMaster> wtf is glio?
19:15:01 <oerjan> apparently it was an abbreviation of glioblastoma
19:15:28 <oklopol> yeah that's what i meant
19:15:31 <AnMaster> ah
19:15:34 <AnMaster> cancer
19:15:50 <oklopol> yes, who doesn't like cancer
19:15:56 <oklopol> !! ->
19:16:08 <AnMaster> I don't
19:16:25 <oerjan> now i still wonder what oklopol meant by glio
19:17:05 <oklopol> oerjan: stop getting my sarcasm, you're ruining all the AnMaster from me.
19:17:31 <AnMaster> huh
19:17:34 <oerjan> oh i didn't see your "yeah that's what i meant"
19:19:28 <oerjan> lessee, there's a User:Glio on wikimedia
19:19:54 <AnMaster> ^bf >>,[[-<++>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[<[-]+>->+<[<-]]]]]]]]]]>]<<[>++++++[<++++++++>-]<-.[-]<]++++++++++.[-]>>,]!test
19:19:55 <fungot> 116.101.115.116.
19:19:57 <oerjan> a chinese
19:20:06 <AnMaster> ^bf >>,[[-<++>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[<[-]+>->+<[<-]]]]]]]]]]>]<<[>++++++[<++++++++>-]<-.[-]<]++++++++++.[-]>>,]!hm nice very nice
19:20:07 <fungot> 104.109.32.110.105.99.101.32.118.101.114.121.32.110.105.99.101.
19:20:14 <AnMaster> ^bf >>,[[-<++>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[-<+>[<[-]+>->+<[<-]]]]]]]]]]>]<<[>++++++[<++++++++>-]<-.[-]<]++++++++++.[-]>>,]!9
19:20:14 <fungot> 57.
19:20:38 <oerjan> oklopol: of course i was hoping you were fluent in the Glio-Oubi language
19:27:10 <AnMaster> heh
19:27:24 <AnMaster> already the not very much optimizing compiler is twice as fast as bff4
19:27:28 <AnMaster> ais523, ^
19:27:37 <AnMaster> I guess the fact that it is compiled is the cause
19:27:45 <ais523> AnMaster: wow, that's pretty good
19:27:47 <ais523> is it linearising?
19:27:49 <AnMaster> ais523, no
19:27:55 <AnMaster> just merging >>> <<< and such
19:28:05 <AnMaster> ais523, was testing on mandelbrot.b
19:28:08 <ais523> ok, probably it depends on the program you run it on then
19:28:10 <AnMaster> can pastebin it if you want
19:29:00 <AnMaster> ais523, was using gcc -march=k8 -msse3 -O3 -ftree-vectorize for both bff4 and the source my compiler generated
19:29:18 <fizzie> +[>+] should terminate when the first cell wrap-arounds; that's just some 3*256000 instructions. Well, I guess it should time-out before that, actually.
19:29:21 <AnMaster> $ gcc -Wall -Wextra -march=k8 -msse3 -O3 -ftree-vectorize -DLNR -o bff4 bff4.c
19:29:22 <AnMaster> that one
19:29:24 <ais523> AnMaster: I'd argue that your compiler is not at all faster than bff4
19:29:31 <ais523> just you're using better compiler options
19:29:35 <ais523> and a better implementatino
19:29:38 <ais523> *implementation
19:29:46 <AnMaster> ais523, I'm using the same options for both
19:30:03 <AnMaster> $ gcc -Wall -Wextra -march=k8 -msse3 -O3 -ftree-vectorize -o mandelbrot mandelbrot.c
19:30:04 <ais523> well a compiler's always going to beat the interpreter unless the interpreter manages to optimise stuff a lot
19:30:14 <AnMaster> ais523, indeed
19:30:27 <AnMaster> ais523, but this makes it very very hard to compare
19:30:33 <AnMaster> if not impossible
19:30:54 <ais523> AnMaster: how do they compare on Lost Kingdoms startup?
19:31:05 <AnMaster> ais523, hm hard to measure
19:31:09 <AnMaster> I used this:
19:31:18 <AnMaster> time ./mandelbrot
19:31:19 <AnMaster> real 0m10.572s
19:31:19 <AnMaster> user 0m9.879s
19:31:19 <AnMaster> sys 0m0.059s
19:31:23 <AnMaster> well output cut
19:31:23 <AnMaster> and
19:31:30 <fizzie> ^bf +[>+]++++++++++.
19:31:32 <AnMaster> time ./bff4 < mandelbrot.b
19:31:33 <AnMaster> real 0m20.173s
19:31:33 <AnMaster> user 0m18.722s
19:31:33 <AnMaster> sys 0m0.143s
19:31:34 <fungot> .
19:31:39 <fizzie> Seems that my timeout limits are not very strict.
19:31:57 <ais523> ^bf +[>+]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.
19:32:01 <fungot> <
19:32:13 <ais523> fizzie: how do you explain that?
19:32:19 <ais523> it's executing the code after +[>+]
19:32:19 <AnMaster> ais523, waiting for gcc to compile lostkingdom
19:32:20 <AnMaster> argh
19:32:22 <ais523> which is really strange
19:32:26 <AnMaster> had to abort
19:32:28 <AnMaster> swap trashing
19:32:29 <AnMaster> hehe
19:32:33 <ais523> AnMaster: ah, I forgot about that...
19:32:36 <fizzie> ais523: Why not? +[>+] terminates when one cell wrap-arounds.
19:32:47 <AnMaster> ais523, well I removed the case stuff
19:32:49 <ais523> fizzie: no it doesn't
19:32:51 <AnMaster> since it is no longer needed
19:32:56 <ais523> it sets each cell to 1 on the entire atpe
19:32:58 <AnMaster> but it still manages to be very slow
19:32:58 <ais523> *tape
19:32:58 <fizzie> I have a 1000-cell tape which wraps, and one-byte cells.
19:33:02 <AnMaster> and swap trash
19:33:06 <ais523> fizzie: oh, the tape wraos?
19:33:08 <ais523> *wraps?
19:33:13 <AnMaster> $ wc -l LostKng.c
19:33:13 <AnMaster> 168337 LostKng.c
19:33:14 <AnMaster> ais523, ^
19:33:17 <ais523> no wonder we couldn't get it to display an out-of-tape message
19:33:18 <AnMaster> with LOTS of macros too
19:33:26 <AnMaster> so that expands quite a bit
19:34:00 <AnMaster> $ gcc -std=c99 -E -o tmp.c LostKng.c
19:34:06 <AnMaster> $ wc -l tmp.c
19:34:07 <AnMaster> 169855 tmp.c
19:34:10 <AnMaster> not as much as I feared
19:34:24 <AnMaster> just a 5.7 MB file :P
19:34:38 <fizzie> Yes, there's no infinite tape in fungot's brainfuck. Isn't a fixed-size memory quite common for brainfuck?
19:34:38 <fungot> fizzie: get. out.
19:34:44 <fizzie> fungot: Well excuse me!
19:34:45 <fungot> fizzie: let's just pretend that it's necessary :) at least i have. :) ( and i'm not sure what
19:34:50 <AnMaster> hm
19:34:57 <AnMaster> ais523, bff4 exists on lostkingdom
19:35:05 <ais523> *exits?
19:35:10 <AnMaster> ah yes
19:35:38 <AnMaster> read(0, "#!/usr/bin/bf\n\n# Name : Lost"..., 2048) = 2048
19:35:38 <AnMaster> brk(0) = 0x2263000
19:35:38 <AnMaster> brk(0x2284000) = 0x2284000
19:35:38 <AnMaster> exit_group(0) = ?
19:35:41 <AnMaster> how strange
19:36:27 <ais523> AnMaster: why did you just paste that?
19:36:32 <ais523> also, what is exit_group?
19:36:35 <AnMaster> I was stracing it
19:36:41 <AnMaster> why bff4 exits
19:36:42 <ais523> and brk seems to be acting entirely sanely there to me
19:37:02 <AnMaster> ais523: since I don't know how to feed input to a program running under gdb from a pipe
19:37:07 <AnMaster> since that is what bff4 wants
19:37:10 <AnMaster> you do like;
19:37:14 <AnMaster> ./bff4 < foo.b
19:37:19 <AnMaster> it seems
19:37:29 <ais523> AnMaster: gdb has a command-line arg for that, IIRC
19:37:37 <AnMaster> and I don't remember what
19:38:17 <ais523> I don't remember what it is either
19:39:10 <AnMaster> hm now it works
19:39:16 <AnMaster> since I removed the headers
19:39:19 <AnMaster> like #!
19:39:22 <AnMaster> oh wait
19:39:30 <AnMaster> it treats ! special right
19:39:37 <ais523> yes
19:39:42 <ais523> ! means end of program, start of input
19:39:42 <AnMaster> hm
19:39:47 <ais523> in BF programs which take them in the same stream
19:40:09 <AnMaster> well
19:40:22 <AnMaster> this means I have to paste all of lostkingdom on it's stdin
19:40:24 <AnMaster> fuck that
19:40:51 <AnMaster> I have better things to do
20:11:26 -!- oklopol has quit (Connection reset by peer).
20:11:48 <AnMaster> damn I need an integer that can also be unset
20:11:56 <AnMaster> and I can't reverse any special value
20:11:59 <AnMaster> what to do
20:12:09 <ais523> AnMaster: define a Maybe Integer
20:12:15 <AnMaster> ais523, C....
20:12:23 <ais523> although this requires you to use a programming language, like Perl with Moose or Haskell, in which they exist
20:12:27 <AnMaster> ais523, and the size is important
20:12:34 <ais523> can't you use the next size up?
20:12:34 <AnMaster> like struct size
20:12:49 <AnMaster> ais523, well no this is for tracking offset of cells within loop
20:12:53 <ais523> AnMaster: well you can't fit 32 and a fraction bits into a 32-bit variable
20:12:56 <AnMaster> like size_t offset;
20:12:59 <ais523> physically impossible
20:13:03 <AnMaster> ais523, yes :(
20:13:07 <AnMaster> err
20:13:09 <AnMaster> not size_t
20:13:11 <AnMaster> ssize_t
20:13:11 <ais523> you could have a separate one-bit variable which tracks whether it's set or not
20:13:27 <ais523> and if it's ssize_t, why not use the minimum possible value as exceptional?
20:13:32 <AnMaster> ah yes let me look at padding in struct
20:13:49 <AnMaster> ais523, but what if someone adds that many > on a 32-bit platform?
20:14:01 <ais523> AnMaster: you can only compare them one way round is the point
20:14:03 <AnMaster> and use off64_t for files
20:14:18 <ais523> ssize_t can only cover half the memory space as it is
20:14:29 <AnMaster> ais523, ah hm true
20:14:41 <AnMaster> well I guess the situation should never
20:14:42 <AnMaster> happen
20:14:47 <AnMaster> and I could document the issue
20:14:58 <ais523> sounds like you really want a 33-and-a-fraction-bit variable
20:15:15 <AnMaster> ais523, I also yes and an union to not waste spaec
20:15:16 <ais523> but the minimum value wouldn't even exist except on a 2's complement machine
20:15:16 <AnMaster> space
20:15:27 <ais523> it's equal to 0-itself, anyway, so doesn't act sanely with arithmetic
20:15:28 <AnMaster> ais523, huh?
20:15:32 <ais523> that's why it makes a good exceptional value
20:15:37 <ais523> AnMaster: the value with bit pattern 100000000000000000000000000000000
20:15:42 <AnMaster> ah yes
20:16:16 <AnMaster> that is negative 0 basically
20:16:21 <ais523> no, it isn't
20:16:25 <ais523> it's the opposite of -0
20:16:26 <AnMaster> well no true
20:16:31 <ais523> it's as far from 0 as you can get
20:16:32 <AnMaster> positive 0?
20:16:35 <ais523> in both directions
20:16:35 <AnMaster> ah
20:16:36 <AnMaster> ok
20:16:47 <ais523> rather than -0 which arithmetically works the same way as 0
20:16:52 <AnMaster> ais523, that would be FOO_MIN right?
20:16:56 <ais523> yes
20:16:57 <AnMaster> assuming there is one for ssize_t
20:17:01 * AnMaster looks
20:17:27 <AnMaster> hm there is not
20:17:28 <AnMaster> SSIZE_MAX
20:17:32 <AnMaster> but no MIN
20:17:35 <AnMaster> very strange
20:17:37 <ais523> it's -SSIZE_MAX-1
20:17:44 <ais523> it has to be defined like that
20:17:55 <AnMaster> on 2 complement
20:17:56 <ais523> say, SHORT_MIN can't actually be -32768
20:18:01 <ais523> it has to be -32767-1
20:18:27 <ais523> because - is an operator, and 32768 needn't neccessarily fit in an int
20:18:29 <AnMaster> ais523, a grep shows SHORT_MIN isn't defined either
20:18:32 <AnMaster> in any system header
20:18:37 <ais523> SHRT_MIN
20:18:39 <ais523> probably
20:18:44 <ais523> some stupid abbreviation from decades ago
20:18:46 <AnMaster> ah yes
20:18:51 <AnMaster> ais523, well it is short
20:18:53 <AnMaster> so I like it
20:19:00 <AnMaster> :P
20:19:03 <ais523> is that an attempt at a joke?
20:19:06 <AnMaster> also SSIZE_MIN doesn't exist
20:19:14 <AnMaster> ais523, yes a *short* form of *short*
20:19:26 <AnMaster> was the joke that bad?
20:19:41 <ais523> /usr/include/limits.h:# define LONG_MIN(-LONG_MAX - 1L)
20:19:43 <ais523> AnMaster: yes
20:20:04 <ais523> although my headers define SHORT_MIN as -32768 directly, because they know they're for a 32-bit system
20:20:18 <ais523> the same thing applies to all integer sizes, just I can't remember the relevant power of 2
20:20:41 <oerjan> AnMaster: it was a reasonably good joke until you explained it :D
20:20:50 <AnMaster> oerjan, well I had to for ais523
20:20:57 <ais523> AnMaster: actually, I got it
20:21:06 <ais523> just wasn't sure if you were joking deliberately or not
20:21:26 <AnMaster> now I am normally THAT bad at jokes really?
20:21:27 <AnMaster> :(
20:21:33 <AnMaster> anyway
20:21:37 <oerjan> so, why isn't it LONG_MAXIMUM?
20:21:44 <AnMaster> SSIZE_MIN isn't defined
20:21:46 <AnMaster> oerjan, :)
20:21:53 <ais523> AnMaster: it's -SSIZE_MAX-1
20:21:57 <ais523> if SSIZE_MAX is defined
20:22:01 <AnMaster> ais523, on 2 complement at least
20:22:01 <ais523> and you're on a two's complement system
20:22:06 <ais523> which given your stupid optimisation you are
20:22:17 <AnMaster> ais523, but how would i know I am?
20:22:17 <AnMaster> ais523, err, what?
20:22:21 <AnMaster> I'm just trying to count index
20:22:24 <ais523> hmm... why not detect the representation at compile-time
20:22:33 <ais523> and use SSIZE_MIN as your exceptional value on 2's complement
20:22:35 <AnMaster> ais523, as in "this is offset two from start of loop"
20:22:38 <ais523> and -0 on 1's complement
20:22:47 <ais523> AnMaster: why not use unsigned size_t, the?
20:22:49 <ais523> *then?
20:23:02 <AnMaster> ais523, [>-<+]
20:23:02 <AnMaster> or
20:23:03 <ais523> also, rely on the fact that the loop can't possibly take up all of memory due to the final ]
20:23:05 <AnMaster> ais523, [<->+]
20:23:07 <AnMaster> well
20:23:10 <AnMaster> it can go either way
20:23:11 <ais523> thus you can safely use SIZE_MAX as your exceptional value
20:23:23 <ais523> AnMaster: measure offset from the start of the program instead, then
20:23:24 <AnMaster> haha ok
20:23:25 <ais523> and do a subtraction
20:23:41 <ais523> (there's also the fact that the compiler itself has to be in memory somewhere, but that isn't as funny)
20:23:43 <AnMaster> err? what?
20:23:50 <AnMaster> anyway: not easy if there is an unbalanced loop
20:23:54 <ais523> AnMaster: instead of taking the offset from one place to another
20:23:57 <AnMaster> then I can't know tape offset
20:24:03 <ais523> oh, tape offset
20:24:06 <AnMaster> yes
20:24:10 <AnMaster> that was what I was doing
20:24:11 <ais523> I thought you meant offset in program
20:24:21 <AnMaster> the stuff have already been mangled a bit by this point
20:24:26 <AnMaster> however I'm unsure about order
20:24:48 <AnMaster> that is the order that I should do various reductions
20:25:19 <AnMaster> should I try to handle >><< first, then the tape offset, then [-]
20:25:22 <AnMaster> or some other order?
20:25:35 <AnMaster> it doesn't seem trivial to combine them
20:25:57 <AnMaster> but I guess it could work
20:26:03 <AnMaster> except [-] shouldn't be done first
20:26:08 <AnMaster> since that wouldn't catch
20:26:15 <AnMaster> [>+<->-<]
20:26:18 -!- puzzlet has quit (Read error: 60 (Operation timed out)).
20:26:28 <AnMaster> which the tape offset would manage to turn into [-]
20:26:35 <AnMaster> which then could be turned into set 0
20:26:44 <AnMaster> or should I do multiple passes with each optimizer?
20:26:51 <AnMaster> ais523, :)
20:27:04 <ais523> AnMaster: C-INTERCAL does multiple passes
20:27:04 <AnMaster> I want to catch all cases I can catch
20:27:07 <ais523> until nothing more is optimised
20:27:09 <ais523> that's probably the best way
20:27:12 <AnMaster> ais523, ah
20:27:28 <AnMaster> ais523, I already avoid multiple passes with >><< reduction
20:27:35 <AnMaster> by stepping one step backwards
20:27:43 <AnMaster> so I can catch:
20:27:45 <AnMaster> --<>+
20:27:48 <AnMaster> to turn it into -
20:28:05 <AnMaster> without that I would get: 2- 1+
20:28:17 <AnMaster> also brb making some food
20:28:41 -!- puzzlet has joined.
20:38:37 -!- warrie has joined.
20:38:47 <warrie> Hi, #math.
20:39:28 <oerjan> BZZT, WRONG
20:39:37 <warrie> How dare you disturb my hallucinations.
20:39:48 <warrie> Let's try this again.
20:39:50 <warrie> Hi, #math.
20:40:12 <ais523> warrie: we're now debating whether or not 3=4
20:40:16 -!- Deewiant has quit ("Viivan loppu.").
20:40:16 <ais523> ehird seems to think it is, for some reason
20:40:20 <oerjan> hi warrie, did you know your nick is a prime in base 256?
20:40:24 <warrie> No we're not.
20:40:29 <ais523> also, we're debating whether 4 increased by 1 is 5
20:40:30 <warrie> Nope. That's cool.
20:40:37 * oerjan might be lying
20:40:43 -!- Deewiant has joined.
20:40:43 <oerjan> haven't checked yet :D
20:40:57 <ais523> oerjan: "warrie" is even in base 256
20:41:04 <oerjan> no way
20:41:06 <ais523> unless you use ASCII
20:41:12 <oerjan> 96+5 is odd
20:41:15 <ais523> going by the hex 0-9a-f thing but extended
20:41:20 <ais523> then you get a, c, e as even
20:41:23 <oerjan> of course i'm using ascii
20:41:28 <ais523> ah, ok
20:42:19 <warrie> The derivative of |x| with respect to x is |x| divided by x, right?
20:42:42 <ais523> yes, that's one way to put it
20:42:52 <ais523> it's undefined at 0, though, rather than infinite
20:42:54 <warrie> Still true in the complex numbers and all?
20:43:00 <ais523> although whether this makes a difference depends on how pedantic you are
20:43:04 <warrie> |0|/0 is not very infinite.
20:43:15 <ais523> warrie: well, it's a NaN
20:43:34 <ais523> arguably that's decent for an undefined derivative
20:43:35 <oerjan> darn it's divisible by 5
20:43:41 <AnMaster> back
20:44:04 <warrie> I'll do the Chain Rule Test.
20:44:57 <oerjan> warrie: |x| is surely not analytic so complexes are not nice
20:45:20 <AnMaster> ais523, ah I worked it out
20:45:26 <AnMaster> I need to track offset from what anyway
20:45:38 <AnMaster> so that one is NULL or a node pointer
20:45:45 <AnMaster> I'm not sure how sane this is...
20:47:16 <warrie> -i = |i|/i = d|ix|/dx = d|ix|/d(ix)*d(ix)/x = |ix|/(ix) * i = |x|/x... yeah, I forgot that you can't differentiate |x| over the complex numbers.
20:47:45 <oerjan> warrie: you might check it in the x direction
20:48:21 * warrie shrugs
20:48:24 <oerjan> sqrt(x^2+y^2)
20:48:38 <warrie> I'll just use "undefined".
20:49:58 <AnMaster> oerjan, what about my nick?
20:52:08 <ais523> gah, this is annoying: I found an interesting obfuscated quine on a webpage, but it doesn't give the program, just an example of its output
20:53:06 <warrie> I hate it when you know a quine's output but not its source code.
20:53:10 <ais523> yep
20:53:27 <AnMaster> hm
20:53:28 <AnMaster> in
20:53:31 <AnMaster> in C*
20:53:49 <AnMaster> is using memset(foo, 0, sizeof(foo_t));
20:53:51 -!- Deewiant has quit ("Viivan loppu.").
20:53:58 <AnMaster> where foo foo_t *foo;
20:54:03 <AnMaster> and foo_t is a struct
20:54:11 -!- Deewiant has joined.
20:54:13 <AnMaster> a safe way to ensure are pointers in said struct are all NULL?
20:54:16 <warrie> What is an obfuscated quine, by the way?
20:54:22 <AnMaster> ais523, ^
20:54:27 <fizzie> Of course not, since all-bits-zero is not necessarily NULL.
20:54:46 <fizzie> Not that people wouldn't do that sort of stuff anyway.
20:54:52 <ais523> warrie: something which isn't obviously a quine
20:54:57 <ais523> although this one's just a meaning-quine
20:55:05 <ais523> in that it outputs a program that does the same thing as it
20:55:09 <ais523> but isn't necessarily the same
20:55:12 <ais523> several programs, in fact
20:55:40 <AnMaster> yes
20:55:41 <oerjan> AnMaster: 4714790940847662450
20:55:50 <AnMaster> oerjan, is that my nick?
20:55:54 <AnMaster> well it is even so...
20:55:56 <oerjan> yes
20:56:07 <oerjan> and divisible by 5 that too
20:56:11 <AnMaster> oerjan, and 10
20:56:17 <AnMaster> also how do you calculate it?
20:56:31 <AnMaster> like befunge fingerprints?
20:56:37 <AnMaster> as in 0xabcdef
20:56:41 <AnMaster> so each
20:56:43 <AnMaster> ab cd ef
20:56:46 <AnMaster> maps to a char
20:56:47 <AnMaster> or
20:56:50 <AnMaster> some other way?
20:56:56 <oerjan> i used haskell: readInt 256 (const True) (fromEnum) "AnMaster"
20:57:10 <AnMaster> oerjan, well that doesn't answer the question
20:57:12 <oerjan> (requires Numeric module)
20:57:24 <AnMaster> oerjan, what is the mathematical mapping?
20:57:36 <AnMaster> how do you parse it
20:57:47 <AnMaster> you just pointed at a black box
20:57:50 <AnMaster> and said "I use that"
20:57:51 <oerjan> i guess that befunge thing is the same
20:57:56 <AnMaster> it didn't answer the *how*
20:58:10 <AnMaster> oerjan, that is:
20:58:18 <AnMaster> while read char {
20:58:26 <AnMaster> bitshift result up by 8;
20:58:34 <AnMaster> add ascii value of char;
20:58:34 <AnMaster> }
20:58:39 <AnMaster> in pseudo code
20:58:48 <AnMaster> oerjan, is that how you do it?
20:58:58 <oerjan> that should be equivalent yes
20:59:11 <AnMaster> oerjan, so CFUN is?
20:59:13 <oerjan> except readInt uses an actual multiplication by 256
20:59:31 <oerjan> (since it is not restricted to powers of 2)
20:59:35 <AnMaster> oerjan, it should be 0x4346554e
20:59:36 <AnMaster> btw
20:59:37 <AnMaster> CFUN
20:59:41 <AnMaster> if it is the same way
20:59:42 <fizzie> "fizzie" is 112603212441957 = 3*1747*20897*1028141. I'm "almost prime", for some values of "almost".
21:00:06 <AnMaster> $ factor 112603212441957
21:00:06 <AnMaster> 112603212441957: 3 1747 20897 1028141
21:00:09 <AnMaster> well ok
21:00:12 <AnMaster> almost I guess
21:00:19 <AnMaster> <oerjan> except readInt uses an actual multiplication by 256
21:00:19 <AnMaster> <oerjan> (since it is not restricted to powers of 2)
21:00:26 <AnMaster> that is odd, doesn't ghc optimize?
21:00:34 <ais523> fizzie: so what is the value of "almost"?
21:00:45 <ais523> AnMaster: Int and Integer are different types in Haskell
21:00:50 <fizzie> ais523: In this case, "not really, but sorta".
21:00:54 <oerjan> AnMaster: it's 0x416e4d6173746572
21:01:02 <AnMaster> oerjan, CFUN?
21:01:10 <AnMaster> no then you use some totally different way
21:01:11 <oerjan> "AnMaster"
21:01:15 <AnMaster> ah
21:01:22 <AnMaster> oerjan, and what is CFUN in your system
21:01:24 <AnMaster> that string
21:01:30 <AnMaster> <AnMaster> oerjan, so CFUN is?
21:01:32 <AnMaster> <AnMaster> oerjan, it should be 0x4346554e
21:01:40 <AnMaster> [cut]
21:01:43 <AnMaster> <oerjan> AnMaster: it's 0x416e4d6173746572
21:01:53 <AnMaster> oerjan, doesn't make sense does it?
21:02:20 <oerjan> that's correct
21:02:22 <ais523> AnMaster: that string oerjan pasted is "AnMaster", I think
21:02:27 <ais523> wait, no
21:02:43 <ais523> that 72 at the end looks wrong
21:02:44 <AnMaster> I do have a convert the other way for 32-bit routine somewhere around here
21:02:49 <ais523> oh, ofc, there are more than 16 letters in the alphabet
21:02:53 <ais523> so yes, probably AnMaster
21:02:57 <AnMaster> ah
21:03:00 <AnMaster> well
21:03:17 <AnMaster> fungeCell fprint = ImplementedFingerprints[i].fprint;
21:03:17 <AnMaster> char fprintname[5] = { (char)(fprint >> 24), (char)(fprint >> 16),
21:03:17 <AnMaster> (char)(fprint >> 8), (char)fprint, '\0'};
21:03:18 <AnMaster> :P
21:03:28 <AnMaster> that very much depends on it being max 32-bit
21:03:32 <AnMaster> and all printable chars
21:04:00 <oerjan> AnMaster: i thought by CFUN you meant some technical abbreviation meaning "fingerprint notation"
21:04:14 <AnMaster> oerjan, no it is the handprint of cfunge
21:04:20 <AnMaster> that is: interpreter ID
21:04:23 <fizzie> perl -e 'use bignum; $x = 256*$x + ord($_) foreach split //, "fizzie"; print $x, "\n";'
21:04:31 <AnMaster> with some type punning it should be faster
21:04:31 <fizzie> The perly thing is less pretty than Haskell. Surprise!
21:04:36 <AnMaster> to just store it as an integer
21:04:41 <AnMaster> and read it as chars
21:04:42 <AnMaster> however
21:04:46 <AnMaster> that isn't very safe
21:04:53 <AnMaster> from a C standard perspective
21:04:59 <AnMaster> I try to avoid such cases
21:05:02 <ais523> also, I've been writing a lot of Prolog recently
21:05:04 <AnMaster> I assume strict aliasing rules
21:05:09 <ais523> and decided that Prolog is really pretty
21:05:17 <ais523> and at least as reflective as Smalltalk
21:05:20 <AnMaster> except in 3 places: FPDP, FPSP and 3DSP
21:05:39 <AnMaster> ais523, heh I should probably try to learn prolog
21:05:45 <AnMaster> got a link for any good online resource?
21:05:57 <ais523> AnMaster: I learnt it from paper books originally
21:06:02 <ais523> so no, unfortunately
21:06:14 <AnMaster> oh well
21:06:22 <ais523> there probably are some
21:06:26 <ais523> but Prolog is... different
21:06:28 <AnMaster> yeah
21:06:32 <AnMaster> hm yes?
21:06:35 <ais523> and many sources for it start by trying to compare it to something
21:06:44 <AnMaster> ais523, I have seen backtracking done in scheme
21:06:46 <AnMaster> it wasn't pretty
21:06:49 <ais523> which I think is a bad way to learn it, but how else could you start?
21:06:49 <AnMaster> or easy to follow
21:07:04 <AnMaster> and it abused both macros and call/cc
21:07:16 <ais523> abusing call/cc is an obvious way to do backtracking
21:07:23 <AnMaster> ais523, well yes
21:07:42 <AnMaster> In fact I find call/cc abusive for anything, yes I see how it is useful
21:07:46 <AnMaster> but it is mindbending
21:08:09 <AnMaster> and I can write perfectly fine and working scheme programs without either macros or call/cc
21:08:12 -!- Deewiant has quit ("Viivan loppu.").
21:08:19 <AnMaster> a lot more typing though
21:08:37 -!- Deewiant has joined.
21:10:14 <oerjan> backtracking is a monad, and all monads can be implemented with call/cc, i hear
21:10:46 <ais523> oerjan: I had a discussion with a really theoretical computer scientist once
21:10:49 <oerjan> (+ some state)
21:11:02 <ais523> I asked whether backtracking was a monad, and he said it couldn't be because that obviously would fail on infinitely large data sets
21:11:09 <ais523> but I was too confused to ask him to elaborate on that
21:11:10 <fizzie> I think SICP has one chapter about their amb-eval thing, which implements Scheme with a "(amb x y z)" special form, which will evaluate to the "correct" value, backtracking whenever it fails (hits (amb) with no choices).
21:12:47 <fizzie> Well, subchapter, anyway. It's there where they start with the metacircular evaluator, then try lazy evaluation with it, then the nondeterministic amb thing, and finally some logic programmingsies.
21:16:57 <oerjan> ais523: maybe he was confused about something like that amb which only takes a finite number of arguments...
21:17:11 <oerjan> but you can obviously get around that with recursion
21:18:57 <oerjan> and backtracking _does_ fail on infinitely large data sets, if by fail you mean "never gets to the end"
21:20:18 <jayCampbell> i have a brainfuck question
21:20:23 <ais523> yes?
21:20:27 <jayCampbell> elsif command == '[' and tape[thread[pointer]] == 0
21:20:43 <ais523> that isn't exactly a question...
21:21:02 <jayCampbell> does the matching ] brace do a test as well?
21:21:09 -!- Deewiant has quit ("Viivan loppu.").
21:21:19 <jayCampbell> brainfuck spec on esowiki says no, but one of the derivatives did
21:21:20 -!- Deewiant has joined.
21:21:29 <jayCampbell> lost kingdom runs without a check on ]
21:21:30 <ais523> jayCampbell: it doesn't matter normally
21:21:39 <ais523> because either ] jumps back to [, which does the test
21:21:43 <ais523> or ] does the test itself
21:21:53 <ais523> thus specs generally say either
21:22:02 <jayCampbell> awesome
21:22:17 <ais523> one big advantage of testing at both ends is it then doesn't matter which side of the [] you jump back to, but that's an implementation detail that rarely comes up
21:22:31 <ais523> basically, it doesn't matter unless you're implementing, in which case you can choose either
21:22:48 <ais523> implementations in most programming languages test just at the [ because that fits the semantics of while loops
21:23:01 <ais523> but if you're implementing BF in an esolang, that's often slower if you have no while-loop-equivalent
21:23:06 <jayCampbell> so i built a weave interpreter (prefork, individual and shared tapes) that does brainfork runtime threading and pbrain subroutines
21:23:39 <AnMaster> ais523, actually I remember testing once at entry and after that I tested if I should jump back at the end
21:23:48 <AnMaster> and then jumped to the instruction after the matching [
21:23:52 <AnMaster> that was in bashfuck
21:23:53 <AnMaster> iirc
21:24:08 <ais523> AnMaster: there are a huge number of ways to do it, I think
21:24:33 <AnMaster> ais523, in before I just emit a while loop currently
21:24:46 <AnMaster> in the future I will emit for loops for balanced pure loops
21:24:50 <AnMaster> where pure == no IO
21:25:00 <AnMaster> yes it doesn't match pure as in pure functional
21:25:10 <AnMaster> but it was the best word I managed to come up with
21:25:22 <AnMaster> ais523, of course I plan to optimize it even more later on
21:25:38 <AnMaster> but currently I haven't managed to understand exactly how that would be done
21:25:52 <AnMaster> also it will to for when io isn't on iteration counter cell
21:25:54 <AnMaster> and balanced
21:26:20 -!- psygnisfive has quit (Remote closed the connection).
21:29:32 <AnMaster> ais523,
21:29:38 <AnMaster> currently I have these flags
21:29:56 <AnMaster> balanced, noinput, noputput, iter_noinput
21:30:02 <fizzie> fungot's brainfuck turns [ into bytecode "jump if zero" and ] into "jump if nonzero", with jump targets being one past matching pair.
21:30:03 <fungot> fizzie: xpdf really should allow searching with regexps, ' fnord
21:30:43 <AnMaster> bool balanced, noinput, nooutput, iter_noinput;
21:30:43 <AnMaster> balanced = noinput = nooutput = iter_noinput = false;
21:30:47 <AnMaster> is that bad coding style? :D
21:31:46 <ais523> AnMaster: not IMO
21:31:57 <AnMaster> ais523, hehe
21:32:00 <AnMaster> well I guess not
21:32:05 <ais523> although on an embedded system, you could save 3 bytes of memory by making them bitfields in a struct
21:32:26 <ais523> and it'll be faster that way on most such systems as they have bit-test instructions, they can handle bits faster than entire ints
21:32:32 <ais523> OTOH, most RL processors will prefer ints
21:34:31 <AnMaster> ais523, they are in a struct
21:34:46 <AnMaster> just I need to track them in the function
21:34:52 <AnMaster> where I work on loops
21:34:58 <AnMaster> later I put it in the struct
21:35:00 <AnMaster> also I typoed
21:35:03 <AnMaster> it should have been:
21:35:11 <AnMaster> ssize_t balance = 0;
21:35:11 <AnMaster> bool noinput, nooutput, iter_noinput;
21:35:11 <AnMaster> noinput = nooutput = iter_noinput = true;
21:52:33 -!- ehird has joined.
21:53:06 <ehird> http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/decimal-counter-uncommented.pfk
21:53:08 <ehird> pgimeno is WIN
21:53:17 <pgimeno> hehe
21:53:50 <pgimeno> I liked the idea of "OCRing"
21:54:06 <AnMaster> pgimeno, hm?
21:54:24 <ehird> how does it OCR so quickly?
21:54:44 <pgimeno> I found a bit pattern that worked for all numbers
21:54:48 <pgimeno> see the commented version
21:54:56 <pgimeno> http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/decimal-counter.pfk
21:55:03 <ehird> haha, that's great
21:55:14 <pgimeno> chained IFs except for distinguishing 0 from blank
21:55:16 <ehird> i really like the logistical constraints paintfuck givse
21:55:21 <ehird> your output IS your memory, it's just such a nice idea
21:55:49 <ais523> someone should make a version of PaintFuck where the source code is stored on the 2D tape, too
21:55:55 <ais523> and is self-modifying
21:55:55 <ehird> ais523: heh
21:56:40 <pgimeno> it's nice as it is
21:56:52 <ehird> pgimeno: wht happens when it reaches its own start?
21:56:53 <pgimeno> fixed a repeated comment in the commented version, reload
21:56:55 <ehird> does it just implode?
21:57:02 <jayCampbell> weave.rb reflective via braintwist's X swapper now
21:57:06 <ehird> it'd be infeasable to wait that long ofc :P
21:57:11 <pgimeno> ehird: dunno, try a smaller grid, it's designed for infinite grid
21:58:51 <ehird> yep
21:58:53 <ehird> ti messes up
21:59:04 <ehird> well
21:59:09 <pgimeno> it doesn't wrap
21:59:11 <ehird> it starts counting the wrong digit
21:59:16 <ehird> while making up its own digits :P
21:59:18 <pgimeno> so it works on infinite grid
21:59:22 <ehird> yes
21:59:45 <pgimeno> yes, it increments by knowing which bits to change, if the number is not the expected it breaks
21:59:53 <ehird> yeah
21:59:56 <pgimeno> gtg
22:00:00 <ehird> bye
22:00:01 -!- ehird has left (?).
22:00:04 -!- ehird has joined.
22:02:21 -!- ehird has left (?).
22:02:24 -!- ehird has joined.
22:02:29 <ehird> hey ok
22:02:31 <ehird> ok
22:02:33 <ehird> where is oklopol
22:02:37 -!- ehird has left (?).
22:02:40 -!- ehird has joined.
22:02:43 -!- ehird has left (?).
22:02:46 -!- ehird has joined.
22:02:57 -!- ehird has left (?).
22:06:07 <AnMaster> * oklopol has quit (Connection reset by peer)
22:06:13 <AnMaster> not that you will see it anyway
22:09:13 <AnMaster> ais523, there?
22:09:18 <ais523> no
22:09:19 <AnMaster> see /msg
22:09:23 <ais523> well, maybe
22:09:27 <ais523> I didn't get a /msg from you
22:09:39 <ais523> oh, you warn me about /msg /before/ you say it?
22:16:17 -!- oerjan has quit ("Good night").
22:19:20 <AnMaster> ais523, yes I do
22:19:50 <ais523> why?
22:20:04 <ais523> just interested
22:24:22 -!- oklopol has joined.
22:24:54 <AnMaster> ais523, why not?
22:25:11 <ais523> because it spams the rest of the channel for no obvious reason
22:25:17 <AnMaster> hm ok
22:25:18 <AnMaster> good reason
22:25:25 <ais523> if something's the sort of private thing that goes in /msg, why tell everyone else about it?
22:26:03 <AnMaster> true
22:26:06 <AnMaster> it was just spamming
22:26:09 <AnMaster> spammy*
22:26:14 <AnMaster> and didn't want to open pastebin
22:26:20 <oklopol> why refer to the past just as i join.
22:26:29 <oklopol> now i have to open logz
22:26:52 <ais523> oklopol: we were discussing why AnMaster warns people they're about to get a /msg before e /msgs them
22:26:52 <AnMaster> ais523, oh also how would you transfer a balanced loop to a polynom?
22:27:03 <ais523> AnMaster: using algebra
22:27:09 <ais523> the balanced loop runs the number of times of the first arg
22:27:21 -!- lostgeek has quit ("leaving").
22:27:25 <ais523> so you take the first arg, and multiply it by all increments inside the loop
22:27:43 <ais523> so [->+<] is tape[0] times tape[1]++ or tape[1]+=tape[0]
22:27:45 <AnMaster> polynoms, isn't that 4 + 2a + 1b^2 + 3c^3 = 0
22:27:46 -!- ehird has joined.
22:27:48 <ais523> AnMaster: yes
22:27:51 <AnMaster> ais523, right
22:28:08 <ais523> so it goes from +1 to +x, effectively
22:28:14 <ais523> with another nested loop, it can be +x^2
22:28:16 <AnMaster> ais523, that require balanced "no-io" loops
22:28:20 <ais523> yes
22:28:26 <AnMaster> right
22:28:57 <oklopol> he probably warns you so you can say no if you're naked and don't want to see or something, kinda like a doorbell.
22:29:04 <oklopol> *want him to
22:29:12 <oklopol> dunno, just a guess
22:29:16 -!- Corun has quit ("Leaving").
22:29:32 <ais523> oklopol: /msg doesn't work like that, though, does it?
22:29:32 <AnMaster> oklopol, err, irc is text only
22:29:40 <ais523> more to the point, it's the other way round
22:29:49 <AnMaster> also /msg is just the same as channel messages
22:30:04 <AnMaster> PRIVMSG #channel
22:30:06 <AnMaster> PRIVMSG nick
22:30:07 <ais523> I suppose that if AnMaster warned me that he was about to send me an ASCII art goatse, a warning would give me time to ignore him
22:30:08 -!- GreaseMonkey has joined.
22:30:09 <AnMaster> no difference
22:30:09 <oklopol> ais523: good point
22:30:12 <ais523> but why would he do that?
22:30:14 <oklopol> AnMaster: bad point
22:30:21 <AnMaster> oklopol, ?
22:30:31 <AnMaster> they are both the same on protocol level
22:30:32 <oklopol> AnMaster: as opposed to ais523's
22:30:52 <ais523> AnMaster: correct but not very relevant point, I think oklopol meant
22:30:57 <AnMaster> >> :ais523!n=ais523@eso-std.org PRIVMSG #esoteric :+AnMaster: correct but not very relevant point, I think oklopol meant
22:31:00 <oklopol> what i meant is
22:31:06 <AnMaster> freenode adds the +
22:31:21 <oklopol> what ais523 said i didn't think about, what AnMaster said was a trivial fact i didn't consider worth mentioning
22:31:41 <AnMaster> oklopol, ah
22:32:07 -!- Corun has joined.
22:32:09 <oklopol> oooooooooooooooooooooooooooooooooo
22:32:16 <oklopol> hi Corun
22:32:24 <Corun> MOOOEEEEEEEEP
22:32:28 <oklopol> :DDD
22:32:35 <oklopol> yes i see you're in a goody moody!
22:33:29 <oklopol> actually... really had nothing to do with triviality, it's just what AnMaster said escaped the analogy, making it kinda pointless as what i said was just a joke
22:33:49 <oklopol> while ais523 attacked the analogy, which is relevant even if it's a joke
22:33:52 <AnMaster> well true
22:34:29 * AnMaster ponders referring to the future just as oklopol will part
22:34:39 <ais523> AnMaster: that's deep
22:34:43 <oklopol> hehe
22:34:48 <AnMaster> that is the opposite of talking about the past forcing you to read logs
22:34:48 <oklopol> wait
22:35:00 <oklopol> just as i part or just before it
22:35:06 <oklopol> i'm really slow today...
22:35:14 <oklopol> ah
22:35:15 <oklopol> ofc
22:35:20 <oklopol> just as i'm about to leave
22:35:21 <oklopol> you say
22:35:42 <oklopol> "ais523, so wanna talk about this interesting thing?", and ais523 responds, umm, "yes"
22:35:47 <oklopol> that's it raelly
22:35:57 <AnMaster> oklopol, just before
22:35:58 <oklopol> *ruylla
22:36:05 <oklopol> yes i raelized
22:36:07 <oklopol> ...
22:36:14 <AnMaster> oklopol, yes or maybe about what we will say
22:36:17 <oklopol> *roalezud
22:36:17 <AnMaster> in some detail
22:36:26 <AnMaster> like. "will you mean that a == b"?
22:36:30 <AnMaster> err
22:36:31 <AnMaster> whatever
22:36:38 <oklopol> well actually you'd have to refer to it, that'd be more complicated
22:36:50 <oklopol> yeah
22:36:53 <oklopol> in detail, that's the point
22:37:06 <oklopol> fascinating issues, these
22:37:33 <ais523> oklopol: what's with your typo corrections?
22:37:41 <AnMaster> <AnMaster> ais523, why not?
22:37:41 <AnMaster> <ais523> because it spams the rest of the channel for no obvious reason
22:37:41 <AnMaster> <AnMaster> hm ok
22:37:41 <AnMaster> <AnMaster> good reason
22:37:47 <AnMaster> make that future tense
22:37:50 <AnMaster> or whatever the word is
22:38:10 <ais523> AnMaster: that would somehow connect oklopol around into a loop, though, wouldn't it?
22:38:21 <AnMaster> ais523, well just as an example
22:38:47 <AnMaster> <AnMaster> ais523, why will you not?
22:39:00 <ais523> ?
22:39:04 <AnMaster> <ais523> because it will spam the rest of the channel for no (currently) obvious reason
22:39:08 <AnMaster> <AnMaster> hm ok
22:39:14 <AnMaster> <AnMaster> will be good reason
22:39:17 <ais523> ah
22:39:19 <ais523> um...
22:39:20 <AnMaster> ais523, just tried to make it future
22:39:22 <ais523> that's ridiculous
22:39:23 <AnMaster> didn't work
22:39:25 <AnMaster> ais523, yeah
22:39:30 <AnMaster> that doesn't work for that example
22:39:37 -!- psygnisfive has joined.
22:39:43 <oklopol> ais523: my typo corrections got tired of having to exist so often.
22:39:49 <oklopol> so they committed suicide.
22:39:55 <ais523> in that case, probably using the present would be more idiomatic even if you're talking about the future
22:40:23 <ais523> "why won't you?" "because it will spam the rest of the channel" "hmm... ok; that's a good reason"
22:40:28 <ais523> but the last there is true present
22:40:33 <GreaseMonkey> why correct when you can type with your eyes ckised?
22:40:50 -!- Corun has quit ("Leaving").
22:40:51 <ais523> let me try that
22:41:02 <oklopol> i never look at my fingers
22:41:11 <ais523> why cprrecy wjem ypi cam type with your ues c;psed?
22:41:16 <GreaseMonkey> it's a fun thing to try but not with a lump in your eye >_> <-- did it
22:41:23 <ais523> wow, the result of that actually came out readable
22:41:36 <ais523> I even got 3 words in a row right
22:41:51 <ais523> took me a few seconds to find home row, then I typed it all quite quickly
22:41:51 <GreaseMonkey> occasionally it goes completely awol
22:42:19 <GreaseMonkey> enjoy coca cola. but enjot brainfuck even more.
22:42:23 <oklopol> if you use a sensible system, there's no difference whether they're open or not
22:42:29 <GreaseMonkey> anyways...
22:42:38 <AnMaster> hah
22:42:47 <AnMaster> ais523, ok
22:46:25 <AnMaster> ais523, exactly how were you typing?
22:46:29 <AnMaster> to be or not to be
22:46:35 <AnMaster> if it was closed eyes
22:46:37 <ais523> AnMaster: with my eyes shut
22:46:38 <AnMaster> that worked perfectly
22:46:44 <AnMaster> thisworks ok
22:46:47 <AnMaster> well almost
22:46:49 <AnMaster> heh
22:46:53 * AnMaster tries again, ok?
22:46:58 <ais523> even using the bumps on f and j to find the home row
22:46:59 <AnMaster> ais523, that wasn't hard
22:47:30 <ais523> one of the garbles was because I forgot the bump was on j not h, normally I hover my fingers over f and h because I rarely type ;
22:49:34 <oklopol> i don't make any more mistakes with my eyes closed, i would never click enter before checking i typed it right though
22:49:54 <AnMaster> ais523, err
22:49:59 <AnMaster> I don't need that
22:50:23 <AnMaster> I know the keyboard well enough
22:54:28 <AnMaster> as soon as I find space, shit or enter
22:55:16 * AnMaster could probably use "das keyboard" if only it had Swedish keyboard layout
22:55:19 <AnMaster> that is same size of enter
22:55:54 <oklopol> oh
22:55:57 <oklopol> "shift"
22:56:16 <oklopol> "shit" doesn't sound very AnMastery.
22:56:38 <oklopol> i, on the other hand, can find shit pretty well on my keyboard
22:57:24 -!- psygnisfive has quit (Remote closed the connection).
22:57:33 <AnMaster> oklopol, ah typoed
22:58:07 -!- psygnisfive has joined.
22:58:09 <AnMaster> well the keyboard does in cleaning
22:59:34 <oklopol> i recently found a keyboard on teh nets that had the keys in straight columns instead of diagonally randomized
22:59:45 <oklopol> but that was costy, and i have a laptop
22:59:55 <oklopol> but that might be pretty awesome
23:01:59 <MizardX> http://www.vjn.fi/pb/p333662665.txt Paintfuck decimal counter :)
23:02:33 <AnMaster> oklopol, hm
23:03:02 <AnMaster> MizardX, didn't someone else here also make one
23:03:06 <AnMaster> pgimeno, iirc?
23:03:13 <MizardX> Just saw
23:03:26 <AnMaster> MizardX, why did you want to make a decimal counter?
23:04:10 <MizardX> I saw a few hours ago that someone mentioned it. Thought it could be fun for a first paintfuck program. :)
23:04:59 <fizzie> That reminds me of a telemarketer that called my wife and tried to sell some magazine. When she said "no", the telemarketer said she needs to justify why she didn't want to order it. The implication was that if the reasons aren't good enough, she doesn't get to not order it.
23:05:23 <AnMaster> fizzie, err that wouldn't be legal
23:07:52 -!- psygnisfive has quit (Remote closed the connection).
23:08:14 -!- psygnisfive has joined.
23:08:43 -!- decipher has quit (Read error: 54 (Connection reset by peer)).
23:10:43 <oklopol> fizzie: well what happened, were the reasons good enough?
23:11:30 <oklopol> MizardX: haha that's pretty great
23:12:34 <AnMaster> ais523, err an issue
23:12:41 <AnMaster> about that "until no changes"
23:12:44 <AnMaster> when optimising
23:12:54 <AnMaster> I change in place so I can't compare tree after
23:12:57 <AnMaster> hm wait
23:12:58 <AnMaster> right
23:12:59 <AnMaster> duh
23:13:08 <AnMaster> I could pass a flag if anything was changed
23:14:06 -!- decipher has joined.
23:28:31 <oklopol> MizardX: when the counter overflows, does it output "counter overflow, try increasing screen width", and you've hidden that in the code so that an average human brain cannot find that in teh code?
23:28:55 <MizardX> no
23:29:05 <oklopol> what does it output then?
23:31:08 <oklopol> WHAT, it just spouts random garble!
23:31:09 <MizardX> If the screen width is a multiple of four, the (w/4+1)'th digit would increase the ones, and it would continue counting. If the screen width is not a multiple of four, the result is undefined.
23:31:15 * oklopol is very disappointed!
23:34:16 -!- Corun has joined.
23:34:26 <pgimeno> MizardX: great! seems that yours is more homogeneous than mine timing-wise
23:35:33 <ehird> oklopol:
23:35:36 <ehird> a
23:35:36 <ehird> b
23:35:37 <ehird> c
23:35:42 <oklopol> ehird: d
23:35:44 <ehird> also
23:35:51 <ehird> mizardx
23:35:52 <pgimeno> which should be no surprise given the nested ifs I use
23:35:53 <ehird> you were beaten
23:36:04 <ehird> MizardX:
23:36:05 <ehird> http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/decimal-counter-uncommented.pfk
23:36:06 <ehird> http://www.formauri.es/personal/pgimeno/temp/esoteric/paintfuck/decimal-counter.pfk
23:36:17 <pgimeno> ehird: I think he knows
23:36:20 <ehird> oh
23:36:24 <ehird> well pgimeno's digits are more readable
23:36:25 <ehird> :P
23:36:57 <MizardX> It's just a design issue
23:36:59 <pgimeno> but slower on average
23:37:06 <ehird> umm
23:37:09 <ehird> pgimeno's seems to be faster
23:37:09 <ehird> to me
23:37:13 <ehird> well
23:37:14 <ehird> maybe not
23:37:15 -!- psygnisfive has quit (Remote closed the connection).
23:38:22 -!- psygnisfive has joined.
23:38:46 <pgimeno> it may depend on the interpreter, if a certain kind of instructions are not the same speed
23:39:54 <oklopol> now someone make a library for simplifying equations expressed as drawn digits & operators
23:40:03 <oklopol> & vars
23:40:12 <oklopol> simplifying equations?
23:40:18 <oklopol> well anyway, something sensible ;)
23:40:31 -!- Judofyr has quit.
23:47:18 -!- psygnisfive has quit (Remote closed the connection).
23:47:41 -!- psygnisfive has joined.
23:54:17 -!- jix_ has quit ("...").
←2008-11-30 2008-12-01 2008-12-02→ ↑2008 ↑all