00:00:30 nooga: so you are black all over now? 00:01:01 * oerjan likes making obvious conclusions 00:01:03 i'm making circuit boards for my modem and 8088 computer 00:01:28 My laptop's receiving power now! 00:01:32 Now, we just need to find interesting patterns in the results. 00:01:33 using chalk paper and laserjet 00:01:57 There's an obvious pattern in the lengths. 00:02:41 also, bifrocation; too good a coincidence 00:02:44 it splits bf into two parts? sorta? 00:03:10 Anyway, it's midnight and I have to revise tomorrow. Perhaps you could put the code on the wiki? 00:03:29 -!- Phantom_Hoover has quit (Quit: Phantom_Hoover). 00:03:59 * oerjan recalls a nice bitbased algorithm for [Integer] -> Integer 00:04:27 oerjan: the important thing was that all nats were covered 00:04:40 basically, convertFromBinary . intercalate "1" . map convertToFibonacciBase 00:04:40 $ echo ',[.,]' | ./bifro encode | ./bifro decode 00:04:41 ,[.,] 00:04:50 $ echo 123456789 | ./bifro decode | ./bifro encode 00:04:51 123456789 00:04:52 er [Nat] -> Nat 00:05:06 -!- ais523 has quit (Remote host closed the connection). 00:05:07 this covers all Nats, or nearly so 00:05:19 http://pastie.org/942869.txt?key=vvwlyvvpwhxulduzur3q 00:05:22 behold. 00:05:24 although i probably messed up the exact definition 00:05:34 alise__ why are you so horrible to me 00:05:42 fax: because you were a jerk to me. 00:05:47 alise__ what did I do? 00:06:07 alise__ is generally horrible 00:06:14 well we were just talking about a program and you started going all on about how it's trivial and pointless for no reason... also, you do your fair share of ignoring /me/ 00:06:17 other than like teach you everything I know about dependent types 00:06:48 * SgeoN1 should learn dependent types at some point. 00:06:52 01:05 < alise__> well we were just talking about a program and you started going all on about how it's trivial and pointless for no reason... also, you do your fair share of ignoring /me/ 00:06:53 maybe he's adapting your methods, alise__ ? :>> 00:07:24 WHY? just use binary for fucks sake lame and trivial alise__ lol okay maybe not for you alise__: fuck you alise__: You're a cunt lol @ alise getting all upset because he thought his trivial program was difficult to write 00:07:51 stop fabricating IRC logs 00:07:55 we all know that didn't happen 00:08:00 ... ... 00:08:04 ... 00:08:04 you just said it right now. 00:08:05 lol 00:08:10 no I did not 00:08:12 wow so fax has some /serious/ denial issues. 00:08:13 you're doing this again 00:08:18 fax: please, look it up on tunes.org 00:08:23 you did this just a min ago and now you are doing it /again/ 00:08:24 the lines are there plain as day i forged not a single one 00:08:37 seriously if you cannot believe that you wrote those lines -- which you DID -- 00:08:42 that's really funny alise good trick what are you trying to gett hough 00:08:46 well you have serious issues 00:08:56 fax: i am considering banning you now 00:09:06 guys I think fax might actually be legitimately insane... I don't think he's trolling he's acted weirdly like this before 00:09:53 * alise__ considers whether feeding mandelbrot.b to his program is a good idea 00:09:53 oerjan: I will be missing out on Phantom_hoover ignoring me and alise flipping out at me and telling me to fuck off because I said a program was trivla 00:10:07 I think fax is joking 00:10:14 SgeoN1: no, i wish he was though 00:10:26 I don't know why people are being so nasty to me 00:10:50 fax: well at the moment you are either joking or insane. 00:11:09 Fax: phantom_hoover left 00:11:16 even encoding http://esoteric.sange.fi/brainfuck/bf-source/prog/rot13.bf hangs my program 00:11:23 these are some /seriously/ large numbers 00:11:25 it's hard to tell, alise__ isn't exactly unbiased in her judgements 00:11:28 alise__, welcome to haskell programming 00:11:31 oerjan: i'm not sure your recursive-crushing was such a good idea 00:11:41 alise__: of course, 2^n isn't very effective 00:11:44 fax: you think it might be the unimaginably huge growth in numbers instead? 00:11:46 alise__: Glee. 00:12:06 eh, it's more fun for number -> program 00:12:22 alise__: I'd be very amused if your encoding method ended up being a Brainfuck compression program. :P 00:12:29 Actually. 00:12:33 $ echo 1234567891011121314151617181920 | ./bifro decode 00:12:33 ----->-->+++--+---[<][]++--<++----,-+[+]-++<--+++-. 00:12:37 it sure does produce useless programs 00:12:38 ... It kinda *is*. 00:12:53 yeah it compresses it into an integer many many times bigger than the program. 00:12:54 :P 00:12:56 It's only being asked to produce valid ones. Not useful ones. 00:13:11 it really shies away from loops, since the numbers are so big 00:13:14 gimme a big prime guys 00:13:14 "1234567891011121314151617181920" is smaller than "----->-->+++--+---[<][]++--<++----,-+[+]-++<--+++-.". 00:13:30 you know it is funny, because we are almost deserialising for num->prog 00:13:31 1234567891011121314151617181920 <-- base 10 00:13:34 pikhq: yeah but 00:13:36 [dfgdfg] 00:13:39 instantly EXPLODES your program 00:13:44 with multiple nested serialisations 00:13:46 er 00:13:46 ----->-->+++--+---[<][]++--<++----,-+[+]-++<--+++-. <-- base 7 (or something) 00:13:49 you know it is funny, because we are almost factorising for num->prog 00:13:57 fax: no because of balanced loops 00:14:01 that's the whole reason I did this 00:14:19 Oooh! Oooh! 00:14:20 34790! − 1 00:14:26 alise__: incidentally i think if the order of tuples were reversed, then even programs without loops would get enormous 00:14:27 jane@jane-desktop:~/code$ echo 1111111111111111111111111111111111111111111111 | ./bifro decode 00:14:27 >-->-->-->-->-->-->-->+.+--<---------+--+>-<.<<++<+<----<+,++--->>+-+>--< 00:14:27 jane@jane-desktop:~/code$ echo 1111111111111111111111111111111111111111111112 | ./bifro decode 00:14:27 ---+->-->-->-->-->-->-->+.+--<---------+--+>-<.<<++<+<----<+,++--->>+-+>--< 00:14:31 Hey, it... prepended to the start. 00:14:45 pikhq: no :P 00:15:03 $ echo '[[[[]]]]' | ./bifro encode 00:15:04 [hang] 00:15:08 http://en.wikipedia.org/wiki/Illegal_prime 00:15:09 maybe the parser is broken??? 00:15:11 it's only the head of a cons that is so enormously encoded 00:15:17 no wait lol 00:15:20 jane@jane-desktop:~/code$ echo '[]' | ./bifro encode 00:15:21 63 00:15:21 jane@jane-desktop:~/code$ echo '[[]]' | ./bifro encode 00:15:21 590295810358705651711 00:15:21 amazing 00:15:30 then one more breaks it 00:15:36 this is the most hideously inefficient numbering system ever 00:15:43 Glee. 00:15:52 oerjan: ah you are right. 00:15:55 grr 00:15:59 so the bijection is imperfect 00:16:05 -- and having nested crushed loops is imperfect too 00:16:07 but dammit, I did it 00:16:12 and whenever we talk about a brainfuck program 00:16:18 we can just say, instead of pastebinning 00:16:21 oh, it's #xkcd in the list 00:16:55 I wish people would be nicer to me 00:17:24 I wish you would be nicer to people. 00:17:36 okay 00:18:13 alise__: the triangular N x N <-> N encoding is much more balanced, i should think 00:18:21 oerjan: does it cover all nats? 00:18:25 it's very important we cover all nats :P 00:18:37 sure, if you get the off-by-one shifts right... 00:18:39 this is what i was talking about earlier 00:18:45 but phantom_hoover didn't want to hear it 00:19:02 well i'm all ears. 00:19:03 fax: it was mentioned (credited somewhat to you) even before you arrived 00:19:10 yes, i did credit it to you. 00:19:13 multiple times 00:19:22 but for some reason they didn't like it. hard to reverse was it? 00:19:23 it's not due to me 00:19:31 I just re-explained it in terms of finite-calculus 00:20:00 needs a square root approximation, is the problem... 00:20:02 oerjan: yeah 00:20:08 /but/ 00:20:15 i suspect that sqrt(n) may have been integer for all relevant ns 00:20:26 um no 00:20:50 you need a square root approximation to find one of the tuple coordinates 00:20:52 iirc 00:21:13 s/approximation/floor/ 00:21:30 well sqrt floor should always be right in haskell methinks. 00:21:46 except it's not bignum compatible 00:22:06 well without some hackage probably 00:22:50 ah 00:23:26 alise__: You have still created a compression scheme for Brainfuck. However, this compression scheme is not very *useful*, as it only appears to actually compress a large number of fairly stupid programs. 00:23:41 everyone in the world is horrible 00:23:46 Actually. Think you could try running it on a "Hello, world!" program without any loops? 00:23:59 alise__: try reversing the tuple order and see what programs you get _then_ :D 00:24:11 oerjan: hell no 00:24:15 pikhq: it'd not be too big 00:24:17 (i bet then loops would be _over_-represented 00:24:18 ) 00:24:37 Ssh, we're about to make a publication. 00:24:39 alise__: just to test for fun of course 00:24:56 whats a publication 00:25:22 oerjan: not even gonna THINK about it :D 00:25:27 fax: THOU SHALT SEE 00:25:49 alise__: i meant to run it in the Integer -> Program direction, fwiw 00:25:57 *slow pastie is slow* 00:26:09 ? 00:26:11 oerjan: ah. 00:26:11 wdat 00:26:13 ok then 00:26:15 what is going on 00:26:18 Your paste cannot be larger than 100 kb. Sorry. 00:26:19 oh well 00:26:22 The Bifro Society of the United Kingdom are pleased to announce their latest 00:26:22 research result: the first 10002 brainfuck programs, in order. 00:26:25 guess nobody will miss it 00:26:33 Bifro? 00:26:51 what is 'in order' about them 00:27:06 they're the decodings of 0,1,2,etc 00:27:07 :P 00:27:11 and bifro is the name of my program 00:27:15 :) 00:27:19 cool 00:27:28 oerjan: lol, with that modification 00:27:41 "1" becomes an infinite amount of -s 00:27:43 I shit you not 00:27:52 decrush :: Integer -> [Integer] 00:27:53 decrush 0 = [] 00:27:53 decrush n = let (xsn,x) = biFro n in x : decrush xsn 00:27:53 --decrush n = let (x,xsn) = biFro n in x : decrush xsn 00:27:54 um that's impossible 00:27:59 Precisely 00:28:06 2 becomes the rather more mundane + 00:28:28 oh wait maybe not 00:28:33 3 -+; 4 <; 5 +(infinite -s) 00:28:42 6 > 00:28:47 7 --+ 00:28:52 100 [[[+]]] 00:28:58 oh yes it must be 00:29:04 [[[[.-------------------------------------------------------------------------------------------... 00:29:06 ^ 1000 00:29:08 write a program that deletes everything on your computer 00:29:29 * SgeoN1 deletes fax 00:29:36 i'm all ears for the triangular thing 00:32:52 is biFro 1 == (0,1) ? 00:33:06 or (1,1) 00:33:15 Earbuds aren't supposed to hurt, are they? 00:33:23 erm i forget 00:33:28 or wait it cannot be (1,1) then it would have been infinite before 00:33:35 Because these hurt. 00:34:04 (1,0) 00:34:12 actually 00:34:12 YOU ARE EXTREMELY INCORRECT AT EVERYTHING 00:34:19 ic 00:34:23 biFro 0 = (0,0) 00:34:44 well in that case wtf do you get infinite -s? 00:34:46 then it just goes everywhere: 00:34:52 *Main> map biFro [0..20] 00:34:53 [(0,0),(1,0),(0,1),(2,0),(0,2),(1,1),(0,3),(3,0),(0,4),(1,2),(0,5),(2,1),(0,6),(1,3),(0,7),(4,0),(0,8),(1,4),(0,9),(2,2),(0,10)] 00:35:06 oerjan: obvious 00:35:08 decrush n = let (x,xsn) = biFro n in x : decrush xsn 00:35:11 here we don't decrease on x 00:35:17 the secret is that recursing biFro on x 00:35:21 doesn't smallify x 00:35:26 so the recursion never reaches a base case 00:35:31 i.e. biFro is biased towards latters 00:35:34 guess what I wrote today 00:35:35 this is just a hunch 00:35:46 like maybe biFro stays constant, or oscillates, or grows 00:35:46 A program that expresses any number as the sum of two squares mod p 00:35:49 um wait 00:36:05 Trolltastic insults? 00:36:06 biFro :: Integer -> (Integer,Integer) 00:36:07 biFro n = (m, (((n `div` (2^m)) - 1) `div` 2) + 1) 00:36:08 where n' = n + 1 00:36:08 m = toInteger . length . takeWhile (\n'' -> mod n'' 2 == 0) $ iterate (`div` 2) n' 00:36:10 "hope this helps" 00:36:25 SgeoN1 what did you just say 00:36:26 alise__: if you use 0 for nil, the bifro should be a bijection between [1..] and [0..] x [0..] 00:36:34 *then 00:36:45 oh you are right 00:36:53 crush :: [Integer] -> Integer 00:36:53 crush [] = 0 00:36:54 crush (x:xs) = biTo (x, crush xs) 00:36:57 this is how it works so umm 00:37:02 eventually we get to biTo (something, 0) 00:37:16 which can be a bit big. 00:37:17 *Main> biTo (1000, 0) 00:37:17 10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069375 00:37:41 *Main> map (\n -> biTo (n, 0)) [0..20] 00:37:42 [0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575] 00:37:49 every time you think you've figured out the sequence, it fucks with you 00:37:59 no wait 00:38:02 it's powers of two minus one 00:38:05 that's so stupid i love it 00:38:34 (0,n) is multiples of two 00:38:40 this thing contains the secrets of the universe 00:38:49 1,n is odd numbers 00:39:10 aha, then it keeps getting graduall more spaced apart, i think 00:39:56 Hahahah. 00:40:15 *gradually 00:40:35 *Main> map (\n -> biTo (n, 1)) [0..20] 00:40:36 [2,5,11,23,47,95,191,383,767,1535,3071,6143,12287,24575,49151,98303,196607,393215,786431,1572863,3145727] 00:40:38 the retarded theme continues 00:40:49 *Main> map (\n -> biTo (n, n)) [0..20] 00:40:49 [0,5,19,55,143,351,831,1919,4351,9727,21503,47103,102399,221183,475135,1015807,2162687,4587519,9699327,20447231,42991615] 00:40:52 what is this i don't even 00:41:04 -!- Sgeo has joined. 00:41:20 Would be fun if it was all and only primes 00:42:03 SgeoN1: and quite impossible to calculate efficiently. not that this 2^n thing helps... 00:42:20 hey biTo is constant time dude. 00:42:27 it's that biFro you wanna look out for 00:43:20 * Sgeo was thinking more of "incredibly impressive and an incredible discovery" 00:43:36 Sgeo you shouldn't just sit back and throw insults at people that's actually really not cool 00:43:54 so how's that triangular stuff oerjan 00:44:03 Sgeo: an impossible discovery 00:44:08 it's been proven that you can't do primes like that :P 00:44:23 it's been mentioned several times, i don't remember it any better... 00:44:24 * Sgeo isn't even sure what the algorithm is, so 00:44:26 can't do primes like what? 00:44:57 Or are you saying, can't do primes in polynomial time? 00:45:19 like there's no algebraic expression that generates primes and only primes. 00:45:34 there is one that gives primes for alj positive values 00:45:43 the negative values are garbage though 00:45:49 alise__: i don't think powers are included in that 00:46:00 it's polynomials i've heard about 00:46:05 oerjan: then consider it proven by plot 00:46:17 fax: all primes, though? 00:46:21 yes 00:46:26 whoa 00:46:42 it's not practical if you actually want to compute primes with it tohugh 00:46:43 so um how come we aren't discovering new primes in 0 time 00:46:59 because it is hyperdimension and there is a lot of garbage 00:47:05 (negative values) 00:47:36 presumably most random parameters give either tiny or negative numbers... 00:48:14 Oh, thought that by negatives you meant input, or something 00:48:32 oh me too lol 00:48:33 Sgeo you should learn 00:48:50 to hold you tongue sometimes, and to speak other times 00:49:17 fax 00:49:21 you should learn 00:49:24 that you are not a dispenser of zen koans 00:49:29 ready to enlighten the life of another 00:49:38 at their fine line'd wisdom 00:49:51 seriously that's very condescending. 00:49:53 oh hm! 00:50:07 alise__: we could use ternary! 00:50:16 oerjan: yowzers! uh, why? 00:50:34 for less explosive list encoding? 00:50:59 what about tertiary 00:51:09 or balanced becimal? 00:51:22 fromTernary . intercalate "2" . map toBinary 00:51:26 oh wait 00:51:29 becimal? 00:51:32 darn initial 0s 00:51:34 oerjan: howso 00:51:41 how about balanced binary coded negative phinary 00:51:49 i think that would be good 00:51:51 wth is that 00:51:56 oerjan: still need [[[nesting]]] 00:52:00 that sounds PHINE. 00:52:03 :3 00:52:24 alise__: status of finding the a brainfuck program called n which prints n 00:52:28 alise__: well duh but this wouldn't be that much enlargement per level 00:52:31 well 00:52:39 balanced ternary is with the -, 0, + thing i think 00:52:40 huh 00:52:47 binary coded decimal is just segregating bits of binary to work as decimal digits 00:52:56 is it possible no quine exists? 00:52:58 so it's just like segregating bits of binary to use as negative phinary digits 00:52:59 it seems possible to me 00:53:00 i wonder how to implement sets and set hashing in C 00:53:02 except there's negatives too 00:53:12 fax: ooh, interesting 00:53:16 of course it depends on the numbering... 00:53:18 alise__: I think I'm the one here with the most right to dispense zen koans. 00:53:27 but my intuition leads me to believe that there are usually quines 00:53:32 i mean when in doubt add tons of +-s :P 00:53:34 obviously the numbering should make a special accountance so that 666 is a quine - or something 00:53:42 pikhq: no 00:53:45 As I know how to write "zen". :P 00:53:46 no 42 00:54:30 Xen koan 00:54:34 YOUR SERVERS SHALL VIRTUAL SOMETHING SOMETHING 00:54:38 fax: a brainfuck program can obviously calculate the encoding. i should think the usual quine-construction theorems apply 00:54:51 fax: now consider a BF program #n, outputting m such that BF program #m outputs n 00:54:52 They do. 00:54:54 IS YOUR MIND BLOWN YET 00:55:08 oerjan - I don't see that working myself but that might be my problem 00:55:14 It'd be a major *pain* to implement, but yes, the usual quine-construction theorems apply. 00:55:40 fax: why not? 00:55:47 we have very strong, well-tested quiney wimey theorems 00:55:58 that let us construct any sort of ridiculous multi-polyglot-quine-chain 00:56:07 all this is is an additional function, plus more fluff in the code to get the number right 00:56:09 * Sgeo wants/needs to read about these 00:56:11 the number is just an encoding of the source basically 00:56:12 let us consider the contrapositive, 00:56:14 so instead of matching source 00:56:18 we match this transformation on the source 00:56:26 The claim is that there is no computable numbering of brainfuck programs that avoids quines 00:56:46 indeed, probably 00:56:59 Wouldn't the digits just make a programming language? 00:57:00 yes that seems very likely 00:57:09 *turing-complete programming language? 00:57:12 consider that all numberings are essentially a transformation on the source 00:57:21 and that the source can already be considered to be in some arbitrary encoding 00:57:27 and if it can be encoded/decoded 00:57:27 chrome is using 215% cpu :D 00:57:29 then we can quine it. 00:57:30 okay I see it now, quines do exist 00:57:32 fax: Yes, that is the fixed point theorem. 00:57:38 `addquote okay I see it now, quines do exist 00:57:40 156| okay I see it now, quines do exist 00:57:41 nice out of context :D 00:58:38 This is true for... Every TC language with sufficient IO capabilities to output the text of such a quine, I'm pretty sure. 00:59:33 is this theorem effective enough that you can actually calculate this quine 00:59:35 eeh 01:00:24 fax: well we can certainly construct it with ingenuity, we've handled harder tasks before 01:00:24 `addquote we all know that didn't happen 01:00:30 157| we all know that didn't happen 01:00:36 we all know that didn't happen, oerjan 01:00:41 * oerjan whistles innocently 01:00:48 `quote 01:00:49 29|IN AN ALTERNATE UNIVERSE: there is plenty of room to get head twice at once 01:00:51 `quote 01:00:52 46| Or the brutal rape of the English language! That wasn't rape. English is always willing. 01:00:56 `quote 01:00:57 23| Finally I have found some actually useful purpose for it. 01:01:00 `quote 01:01:01 14| So what you're saying is that I shouldn't lick my iPhone but instead I should rub it on my eyes first and then lick my eyeballs? 01:01:03 wait what 01:01:04 `quote 01:01:05 99| things are more awesome when written by someone in here 01:01:11 bsmntbombdood: note alternate universe qualifier 01:01:13 `quote 01:01:14 146| I don't know that I've ever heard apocalypi described in terms of depth ... 01:01:17 `quote 01:01:18 `quote 01:01:20 72| ignore me, i'm full of bullshit 01:01:22 lol 01:01:27 that was then THIS IS NOW 01:01:27 fax: No, but they're generally easy to write. 01:01:28 `quote 01:01:30 117| I'd imagine that it already has, and no one noticed 01:01:31 153|* Warrigal refuses to say goodbye to Quas NaArt, as he is coming closer, not going farther. 01:01:32 `quote 01:01:34 118| Actually, he still looks like he'd rather eat her than have sex with her. 01:01:39 `quote 01:01:40 103| i use dynamic indentation, i indent lines k times, if they are used O(n^k) times during a run of the program 01:01:45 `quote 01:01:46 104| I'm 100% of what sort of magic was involved in it 01:01:50 There is a thingy 01:01:52 `quote 01:01:53 54| I guess when you're immortal, mapping your fonts isn't necessary 01:01:56 Sgeo: yeah i know 01:01:57 `quote 01:01:58 98| ehird: every set can be well-ordered. corollary: every set s has the same diagram used from famous program talisman with fnord windows to cascade, someone i would never capitalize " i" 01:02:06 i like that corollary, a lot 01:02:19 You pretty much just need a way of computing the source code of your program and a way of mapping your source code into your preferred numbering. 01:02:21 `quote 01:02:23 78| ??? Are the cocks actually just implanted dildos? Or are there monster dildos and cocks? Or are both the dildos and cocks monster? 01:02:29 http://normish.nomictools.com/sgeo/quotes.txt 01:02:34 `quote 01:02:34 wow 01:02:35 13|* ehird has joined #lobby hmmm clean me 01:02:40 `quote 01:02:41 `quote fax 01:02:41 61| Seconds. 30 of them. Did I forget the word? 01:02:43 96| im the worst person in the world 140| oklopol geez what are you doing here ...i 01:02:50 it gets cut 01:02:52 grep http://normish.nomictools.com/sgeo/quotes.txt 01:02:59 140| oklopol geez what are you doing here ...i don't know :< i actually ate until now, although i guess i also did other things... 01:03:02 -!- oerjan has quit (Quit: Good night). 01:03:03 154| sekuoir: that's just gay sex I am learning though! 01:03:10 then the stuff we've seen 01:03:14 `quote 01:03:14 alise__, what's with the spamminess 01:03:15 151| I perceived it so hard I actually went away :O 01:03:21 Sgeo: boredom, going to bed soon, etc 01:03:22 `quote ehird 01:03:23 `quote 01:03:25 13|* ehird has joined #lobby hmmm clean me 24| ehird has gone insane, clearly. 30| In an alternate universe, ehird has taste 31|IN AN ALTERNATE UNIVERSE: In an alternate universe, I would say In an alternate universe, ehird has taste 32| so i can only conclude that it is flawed, or the 01:03:25 usual boring mess 01:03:32 `quote ehird 01:03:34 42| after all, what are DVD players for? 01:03:34 13|* ehird has joined #lobby hmmm clean me 24| ehird has gone insane, clearly. 30| In an alternate universe, ehird has taste 31|IN AN ALTERNATE UNIVERSE: In an alternate universe, I would say In an alternate universe, ehird has taste 32| so i can only conclude that it is flawed, or the 01:03:42 `quote Sgeo 01:03:42 `quote ais 01:03:44 60| 01:03:52 42| after all, what are DVD players for? 138| so a.b.c.d.e.f.g.h.i.j.k.com might be self-relative, but a.b.c.d.e.f.g.h.i.j.k.l.com always means a.b.c.d.e.f.g.h.i.j.k.l.com.? 139| 01:03:54 60| Mafia's addictin 01:03:58 `quote nooga 01:03:58 76| I had an idea for an AskReddit, but I forgot 01:03:59 No output. 01:04:02 :D 01:04:02 89| What else is there to vim besides editing commands? 01:04:05 117| I'd imagine that it already has, and no one noticed 01:04:06 what's a round square copula 01:04:09 120| Where's the link to the log? THERE'S NO LOG. YOUR REQUEST IS SUSPICIOUS AND HAS BEEN LOGGED. 01:04:16 130| Sgeo_: Gregorr: and someone could, by mistake, rewrite psox to be a weak erection if it is... A filename. 01:04:33 `quote virtu 01:04:34 130| Sgeo_: Gregorr: and someone could, by mistake, rewrite psox to be a weak erection if it is... A filename. 01:04:39 `quote 01:04:40 117| I'd imagine that it already has, and no one noticed 01:04:42 `quote 01:04:43 46| Or the brutal rape of the English language! That wasn't rape. English is always willing. 01:04:50 yawn 01:05:04 `quote 97 01:05:05 97| i am sad ( of course by analogy) :) smileys) 01:05:19 * Sgeo should rewrite PSOX to be a weak erection 01:05:20 alise 01:05:22 Sometimes I think that bot has developed cogence. 01:05:34 im listening a philosophy lecture about existentialism 01:05:43 i'm spamming bots 01:05:46 pleased to meet you 01:05:48 `quote 01:05:49 52| Apple = Windows. 01:05:51 I'm Sgeo. 01:05:52 `quote 01:05:53 84| Porn. There, see? 01:05:53 thank you 01:05:55 `quote 01:05:56 121| My mascot is a tree of broccoli. 01:05:59 `quote 01:06:00 44| I am not on the moon. 01:06:02 `quote 01:06:03 45| ah... the biggest problem with great Norwegian hip hop lyrics is that they're completely impossible to translate 01:06:06 `quote 01:06:07 42| after all, what are DVD players for? 01:06:09 `quote 01:06:10 1| I've always wanted to kill someone. >.> 01:06:12 `quote 01:06:14 70| Gregor is often a scandalous imposter. It's all the hats, I tell you. 01:06:16 `quote 01:06:18 i'm trying to invent even more hairy syntax for regular expressions 01:06:18 70| Gregor is often a scandalous imposter. It's all the hats, I tell you. 01:06:21 `quote 01:06:22 17| :d <(I can lick my nose!) 01:06:24 `quote 01:06:25 149| theory: some amused deity is making the laws of physics up as they go along 01:06:28 `quote 01:06:29 41| :D * Madelon has quit (Ping timeout: 121 seconds) 01:06:31 `quote 01:06:33 98| ehird: every set can be well-ordered. corollary: every set s has the same diagram used from famous program talisman with fnord windows to cascade, someone i would never capitalize " i" 01:06:35 `quote 01:06:36 42| after all, what are DVD players for? 01:06:38 `quote 01:06:39 76| I had an idea for an AskReddit, but I forgot 01:06:42 shitty rng 01:06:43 `quote 01:06:44 61| Seconds. 30 of them. Did I forget the word? 01:06:46 `quote 01:06:47 145| Why couldn't we have just kept STD? 01:06:58 `quote 77 01:06:58 77| no Deewiant No?! I've been living a lie yep. Excuse me while I jump out of the window -> 01:06:59 can you please stop? 01:07:07 `quote 91 92 01:07:08 No output. 01:07:08 no, never! 01:07:11 `quote 91 01:07:11 `quote 92 01:07:12 91| actually just ate some of the dog food because i didn't have any human food... after a while they start tasting like porridge 01:07:18 okay, continue 01:07:19 not unless something interesting happens 01:07:20 92| if a girl is that cute, i don't care how many penises she has 01:07:20 forever 01:07:22 `quote 92 01:07:23 92| if a girl is that cute, i don't care how many penises she has 01:07:33 `quote 80 01:07:34 80| I think hamsters cannot be inert. 01:07:44 oklopol is somewhat crazy apparently. 01:07:50 "somewhat" 01:07:51 `quote alise__ is actually getting on MY nerves now. 01:07:53 No output. 01:07:58 lol fail 01:08:04 `quote 94 01:08:05 94|* oerjan swats FireFly since he's easier to hit -----### Meh * FireFly dies 01:08:09 `quote 93 01:08:10 93| oohhh ha heh and what are your other characteristics? oh, many, madbrain but it's hardly worth it to go on with listing that list here 01:08:19 :( 01:08:23 alise__: ... By our standards. 01:08:28 lul 01:08:34 `quote 95 01:08:35 95| Oranjer: the taylor's series is also alternately fnord as follows ( i'm using the latex notation here): david ben gurion signed the compensation agreement with germany when there was considerable division over these issues, because these are speculations without " any historical basis". 01:08:36 this neiztche thing is like a fucking self help 01:08:38 LOL 01:08:40 worst say of fnording a taylor series 01:08:42 `run echo -e "alise__, stop\nalise__, stop\nalise__, stop" 01:08:43 alise__, stop \ alise__, stop \ alise__, stop 01:08:44 I didn't expect that 01:08:45 EVAR 01:08:50 Dammit 01:08:50 *way 01:08:55 alise 01:09:05 do you know about NARWHALISM? 01:09:09 lol wut 01:09:14 `run yes alise__ stop 01:09:15 alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop \ alise__ stop 01:09:19 Sgeo: no 01:09:20 43| pikhq: A lunar nation is totally pointless. ehird: consider low-gravity porn fungebob: OK. Now I'm convinced. 01:09:25 Classic. 01:10:01 126| Ah, vulva. What is that, anyway? 01:10:17 128| I can do everything a Turing machine can do, except love 01:10:21 I would like to go to the moon 01:10:43 135| and an AMICED literal would presumably /add/ info to the source whatever info gets added, that's the value that the AMICED doesn't contain it's all falling into place 01:10:54 !show sadbf 01:10:54 sadol :M$0 :d:i,45000@>i-01(2]M0:i-i1:S$0:C;3:l#C-01:p:m0@:m%+m1d?=#Cp"1<:m?<-m10-s1-m1?=#Cp"1.!'2#Mm?=#Cp"1,:#Mm'1;0?=#Cp"1[]S-p1?=#Cp"1]?=#Mm00:p[S0:p+p1 01:10:57 wow 01:11:01 it's still here 01:11:59 18| GregorR-L: i bet only you can prevent forest fires. basically, you know. 01:11:59 alise__: sounds similar to what you're doing 01:12:00 Basically. 01:12:07 Really? I'm flattered. 01:12:49 sleep time now bye 01:13:11 hello 01:13:14 alise don't go 01:13:22 alise__: You sleep? 01:13:30 Only... Midnight there. 01:13:33 -!- alise__ has quit (Remote host closed the connection). 01:16:37 -!- nooga has quit (Ping timeout: 264 seconds). 01:46:28 pikhq: off by one. it was 1am 01:47:00 Oh, alise is still.. I think I forgot that I already saw that conversation 01:55:35 MOO 01:56:46 moo 02:08:01 Lambda? 02:08:43 Lamb-baa. 02:29:19 -!- adu has joined. 02:40:46 -!- Axtens has joined. 02:55:14 -!- fax has quit (Quit: Lost terminal). 03:47:38 -!- Sgeo_ has joined. 03:48:50 -!- Sgeo has quit (Ping timeout: 245 seconds). 04:26:20 -!- Oranjer has left (?). 04:30:22 -!- Alex3012_ has joined. 04:33:10 -!- Alex3012 has quit (Ping timeout: 265 seconds). 04:33:12 -!- Alex3012_ has changed nick to Alex3012. 04:46:40 -!- adu has left (?). 04:47:59 -!- Oranjer has joined. 05:04:29 -!- bsmntbombdood_ has joined. 05:06:26 -!- bsmntbombdood has quit (Ping timeout: 240 seconds). 05:26:27 -!- jcp has joined. 05:39:15 -!- SgeoN1 has quit (Ping timeout: 245 seconds). 06:06:35 -!- Oranjer has left (?). 06:17:13 -!- jcp has quit (Read error: Connection reset by peer). 06:22:55 -!- MizardX has joined. 06:34:57 -!- FireFly has joined. 06:44:18 右翼 and 左翼 in Japanese are, literally, "right wing" and "left wing". And figuratively... "right wing" and "left wing". 06:44:26 Who's responsible for that calque and can I please punch them? 06:45:44 (I should note that 翼 means "wing" as in the body part on various flying animals, not as in a wing of a building) 07:03:56 it's probably a transliteration of the phrases from english 07:04:13 doubt they had equivalent words so it's just a literal translation that depends on understanding the figurative meaning 07:05:01 also lol @ moo/lambda, am i the only one who got it? :P 07:07:06 myndzi: Yes, that's what a calque *is*. 07:10:40 -!- bsmntbombdood__ has joined. 07:11:06 -!- bsmntbombdood__ has changed nick to bsmntbombdood. 07:14:34 -!- bsmntbombdood_ has quit (Ping timeout: 264 seconds). 07:37:29 -!- adu has joined. 07:50:38 http://www.theonion.com/articles/geologists-we-may-be-slowly-running-out-of-rocks,17341/ 07:51:01 pikhq: I assume that the figurative meaning is in relation to politics? 07:51:13 coppro: Yes. 07:51:19 ouch 07:57:11 -!- FireFly has quit (Quit: null). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:18:34 -!- bsmntbombdood has quit (Remote host closed the connection). 08:41:31 -!- Axtens has quit (Read error: Connection reset by peer). 08:56:04 -!- adam_d has joined. 09:10:32 -!- coppro has quit (Quit: I am leaving. You are about to explode.). 09:18:34 -!- Tritonio_GR has joined. 09:19:01 -!- Phantom_Hoover has joined. 09:19:10 Grrr... 09:19:43 I tried alise's bijector and now it seems to have taken all of the hard disc space. 09:20:01 For "[[[]]]"! 09:20:15 You've been... bijected! 09:20:52 Aah! 09:21:30 I assume that this happened because there was a massive bignum in virtual memory. 09:21:51 But OS X seems to have resolved not to reclaim it. 09:27:18 ",[.,]" is 42860344287450692837937001962400072422456192468221344297750015534814042044997444899727935152627834325103786916702125873007485811427692561743938310298794299215738271099296923941684298420249484567511816728612185899934327765069595070236662175784308251658284785910746168670641719326610497547348822672277487 09:27:39 Perhaps I shouldhave pastebinned that. Oops. 09:28:20 -!- Phantom_Hoover has quit (Quit: Page closed). 09:40:05 What is 1? 09:45:52 -!- adu has quit (Quit: adu). 09:57:54 -!- Phantom_Hoover has joined. 09:58:12 alise's program isn't a proper bijection. 09:58:21 It encodes ++- and ++ the same. 09:58:34 Don't know if that came up last night. 10:01:03 I'm not sure that it can be fixed. 10:02:54 Well, that sucks. 10:04:07 It also means that there is no number for which it decodes ++-. 10:07:04 And it was so elegant... 10:07:18 -!- Phantom_Hoover has left (?). 10:08:30 The NxN -> N part is still good, though; I guess you just need some sort of fixup for non-loopy strings? Admittedly I didn't follow to what the final result ended up as. 10:23:32 -!- Tritonio_GR1 has joined. 10:24:10 -!- Tritonio_GR has quit (Ping timeout: 264 seconds). 10:29:27 -!- Tritonio_GR has joined. 10:32:45 -!- Tritonio_GR1 has quit (Ping timeout: 276 seconds). 10:39:56 -!- oerjan has joined. 10:40:05 -!- Phantom_Hoover has joined. 10:40:23 I *think* that the BF-Nat bijection can be salvaged 10:40:36 um what was wrong with it? 10:40:39 It depends on the properties of the NxN->N bijection. 10:40:48 wait i was just thinking about that 10:40:54 oerjan: It encodes ++- and ++ the same. 10:40:57 oh 10:41:10 Looking at the code I don't think it handles - at all. 10:41:23 Basically, I have two ideas. 10:41:55 The first is to include the length of the tuple in the outer NxN. 10:42:07 This obviously works, but it isn't a bijection. 10:42:18 i cannot help, someone is doing carpentry work outside the window, which is enough to turn my brain off instantly 10:42:18 And it has some horrible problems. 10:42:50 -!- adam_d has quit (Ping timeout: 240 seconds). 10:42:53 Because f(0, v) = 2v, so all of the even numbers are the null tuple. 10:43:27 Alternately, you could make it f(, ) 10:43:35 i don't see how it can be wrong in that way you describe 10:43:44 Which only gives null for 2^k-1. 10:43:58 _What_? 10:44:25 I'm not explaining this well, am I? 10:45:15 no. i don't recall that the code i saw previously had that problem, assuming you fixed the lack of a 1+ in the list encoding 10:45:17 OK, so we're injecting a tuple {1, 2, 3, 4} as {1, {2, {3, {}}}} 10:45:26 you are missing a 4 10:45:29 Then flattening that, taking {} as 0. 10:45:34 Forget it± 10:45:37 no! 10:45:49 s/{1, 2, 3, 4}/{1, 2, 3}/ 10:45:52 ok 10:45:52 There? 10:46:12 OK, so then we have f(1, f(2, f(3, 0))) 10:46:13 yes. the thing is, you must add 1 to each tuple 10:46:22 i thought that had been corrected 10:46:40 because tuple bijection is between [0..] x [0..] <-> [0..] 10:46:41 And use 0 as the terminator? 10:47:09 the point is you must not let {} have the same representation as a cons cell, duh 10:47:20 Yeah, OK. 10:47:25 That was my second idea. 10:47:45 But that relies on the way f behaves if you use it over and over. 10:48:06 f^-1, rather. 10:48:18 um no that's a different problem 10:48:40 But we want all nats to map to a BF program, fight? 10:48:45 s/fight/right/ 10:48:45 yes. 10:48:58 now look. it's a list, an algebraic data type 10:49:01 OK, but this encoding uses 0 as the end of the list? 10:49:30 data [a] = [] | a:[a], in haskell 10:49:41 OK. 10:49:43 (incorrect but enlightening) 10:50:01 -!- cheater2 has quit (Ping timeout: 246 seconds). 10:50:05 that has _two_ branches, one for [] and one for : 10:50:19 they must be mapped to _disjoint_ sets 10:50:39 if [] is mapped to 0, then _no_ cons cell must be mapped to 0 10:50:42 But we need to demonstrate that if x_n+1 = cdr(f^-1(x_n)), the sequence hits 0 for all x_0. 10:50:49 Yeah, I get that. 10:51:18 right. but your problem at the moment was that you couldn't represent all lists. this fixed that. 10:51:28 But we need to prove that every nat decrushes into a valid list. 10:51:29 incidentally it also fixes the other thing, though 10:51:36 i.e. one that has 0 in it. 10:51:57 yes. i have a proof, which is what i was thinking about before i came here now 10:52:02 Yay! 10:52:05 -!- cheater2 has joined. 10:52:13 first, note that f(x,y) >= x and y 10:52:33 (i assume. it is easy to make an f with that property if you don't) 10:52:39 Obviously. 10:52:48 You remember what f is? 10:52:57 the tuple encoding, i presume 10:53:10 Yeah, but its value. 10:53:24 f(u, v) = 2^u(2v+1)-1 10:53:28 2^x * (2*y+1), or possibly that triangle thing - both are fine for this 10:53:34 oh -1 10:53:41 Yeah, so it works for 0. 10:54:11 I think that what you said is correct; f(u, v) >= u and v. 10:54:37 in which case, 1 + f(u,v) > u and v, right? 10:55:11 ... I think so. 10:55:50 well it is. 10:55:58 OK. 10:56:00 -!- Rugxulo has joined. 10:56:05 Yes, obviously! 10:56:20 now then, when you recurse, you get a strictly smaller number at each step. thus the recursion must terminate. QED: 10:56:23 *QED. 10:56:43 x264 is amazing 10:56:47 they can encode Blu-Ray now 10:57:15 and didn't you see the big whining about how Jobs claims even Theora is going to be attacked over patents? 10:57:22 * Rugxulo is sorry, logreading 10:57:39 oerjan: Hang on , why 1+f? 10:58:25 i said that, you need to assign [] and u:v as _disjoint_ sets. 10:58:31 Oh, yeah. 10:58:50 * Rugxulo wonders why alise was messing with QBasic 10:58:52 the easiest way to do that and still use all Nats is to do [] -> 0 and shift (u,v) by 1 10:59:33 Rugxulo: It's a habit of his; we had one.. well, maybe not channel-wide, but multiple-people QBasic evening one day a while ago. 10:59:34 Well, I don't think you'd get 0, using alise's encoding... 10:59:42 Rugxulo: The HTMLized QBasic manual is from that time. 10:59:46 If you set the instructions correctly. 11:00:06 dumb question, but why not use FreeBASIC instead? 11:00:34 Rugxulo: For me, it was the semi-nostalgick aspect. Though possibly GW-Basic would have been even more so. 11:00:42 Rugxulo: Who knows why alise does anything? 11:00:46 you cannot get 0 from a finite list, naturally. you have (0,0) -> 0, after all, so it obviously gets infinite if you don't do the 1+ thing 11:00:56 ever heard of Jeff Vavasour? 11:00:57 It is an enigma wrapped in old newspapers, and smells of fish. 11:01:02 www.vavasour.ca (I think) 11:01:07 oh wait 11:01:17 Digital Eclipse, etc. 11:01:22 um no 11:01:38 he wrote a (partial?) Breakout emulator in BASICA/GWBASIC/QBASIC 11:01:40 So, map '-'..'.' to 1..6, then if it's a loop flatten it and add either 7 or 6? 11:01:51 IDK which. 11:02:12 Breakout (arcade game, which I think Steve Wozniak and Steve Jobs worked on for Atari [!]) 11:02:18 Phantom_Hoover: no, map '-' .. '.' to 0..6, and add 6 11:02:35 But if - is 0...? 11:02:55 Or is the whole thing in an implicit loop? 11:03:05 QB is okay, kinda old, but some impressive stuff was written in it 11:03:18 it's actually on MS' FTP site in OLDDOS.EXE, I think 11:03:21 well the encoding of the whole program is the same as the encoding of a single loop, minus the 6 11:03:39 OK, but if - is mapped to 0 we get alise's problem. 11:03:43 * Rugxulo finds it odd that they *still* ship DEBUG.EXE, EDIT.EXE, EDLIN.EXE, but no QBasic 11:03:54 oh, hm 11:04:07 Phantom_Hoover: ok right. that is a problem. 11:04:45 probably in the future, storage will be voluminous and fast enough that people won't bother compressing at all 11:04:49 highly doubt it 11:05:18 - is equivalent to the empty program. 11:05:33 oh wait! 11:06:03 What? 11:06:12 Phantom_Hoover: no it's not. the empty program is 0. - is 1, because we _still_ do the 1+ thing 11:06:42 OK, so what tuple is ",+.", say? 11:06:42 Even the digital movies they distribute to real theaters aren't lossless; according to one article, they encode each frame as a separate JPEG2000 file 11:06:45 JPEG can do lossless 11:07:11 {5, 2, 6, 0}? 11:07:40 Rugxulo: Yes, and JPEG2000 can do lossless too; I just don't think they use it like that. 11:07:43 And ",-." is {5, 1, 6, 0}? 11:07:49 1+f(5,1+f(2,1+f(6,1+f(0,0)))) 11:07:50 12 I think, that's 640x480 (highest QBasic res, probably due to BIOS limit, but VESA can do higher) 11:08:34 oerjan: So if we decons n and the cdr is one then we stop? 11:08:34 Rugxulo: I guess they might. "Motion JPEG 2000 (often referenced as MJ2 or MJP2) is the leading digital cinema standard currently supported by Digital Cinema Initiatives (a consortium of most major studios and vendors) for the storage, distribution and exhibition of motion pictures. -- each frame is an independent entity encoded by either a lossy or lossless variant of JPEG 2000." 11:08:45 no if the cdr is 0 11:09:05 and yet my (low-end) digital cam only uses .JPG format (not lossless, either, variable compression) 11:09:06 f(0, 0) = 0. 11:09:20 So 1+f(0, 0) is 1. 11:09:26 ais523, know of any easy way to disassemble a file that is isn't an object file, just raw x86 instructions 11:09:28 ndisasm 11:09:38 yes. 1 <-> - as a program 11:09:42 We don't need to decons 0. 11:09:52 Rugxulo: You're a bit late, since I suggested ndisasm there. :p 11:09:56 or distorm or BIEW (now called BEYE), IDA Free, etc. etc. 11:10:10 it is the command 1, followed by the program 0 which is empty 11:10:19 AnMaster: The Windows program DEBUG.COM could do it 11:10:20 Rugxulo: He's partial to the AT&T syntax anyway. 11:10:30 first of all, not Windows, pure DOS, secondly it's 8086 only 11:10:33 objdump, then 11:10:41 OK, I'll modify the code alise posted on the wiki. 11:10:48 Rugxulo: Yes, but it needed some flags. Say, shouldn't you read to the end before commenting?-) 11:10:55 objdump -d 11:10:56 In a while, though. 11:11:13 perhaps need objcopy to binary first ("-Obinary"? I forget) 11:11:20 shouldn't I read to end? nah ;-) 11:11:25 Rugxulo: It needs objdump -b binary -m i386:x86-64 -d; that's not completely trivial. 11:11:54 well, he *could* run DOSEMU and any DOS-based tool there (including ndisasm) 11:12:34 I don't see why he'd run ndisasm in DOSEMU/dosbox, when it's available packaged in most Linux distributions. Anyway, it produces the wrong syntax. 11:12:46 right, forgot 11:12:59 oerjan: Why is the +1 even necessary? 11:13:01 although shame on him for not understanding / preferring Intel syntax 11:13:17 As for JPEG 2000, I don't think I've heard of any other real uses for it than digital cinema; it's very much different from plain JPEG, you know, being a wavelet-based thing. 11:13:19 Phantom_Hoover: so that the representation of an empty list is different from a nonempty one 11:13:53 a nonempty list is essentially a tuple of car and cdr, but the tuple encoding has no extra room for the [] a list can have 11:13:55 Make the empty list 0. 11:14:12 didn't have nasm around on that computer (so get it, pre-built even, at http://www.nasm.us) 11:14:44 Phantom_Hoover: the _tuple_ encoding is [0..] x [0..]. if you don't add 1, there _is_ a tuple which encodes to 0. 11:14:53 I suppose. 11:16:55 So, to make sure: 11:16:56 * Rugxulo wonders why such a violently DOS-hating crowd would use QBASIC 11:18:00 Rugxulo: Where did you get the "violently DOS-hating" part from? 11:18:13 1. Swap the instructions '-'..'.' in BF with the numbers 0..6, and put any loops into their own tuples. 11:18:22 from experience ;-) 11:18:49 Phantom_Hoover: an _empty_ loop is not a tuple 11:19:04 Is it just null? 11:19:39 Phantom_Hoover: the thing is, the encoding for single commands is different from the encoding for sequences of commands 11:19:43 Motion JPEG2000? Might not yield the smallest files for given quality... 11:20:00 So, wait, when we're uncrushing n, do we stop on 0-as-cdr? 11:20:02 Rugxulo: You must be talking about some other people than us, then. Admittedly a lot of us couldn't consider using DOS for usual day-to-day computing, but that's pretty far from doing "DOS-hating". 11:20:08 as a single command, a loop is just 6+whatever the sequence inside is 11:20:12 Yes. 11:20:49 if that sequence is not empty, then it is 1+whatever its car,cdr tuple is 11:21:02 OK. 11:21:04 Ilari: It might be good for the particular quality level they're interested in. Or alternatively it could be just an accident of history that they settled on that format. 11:21:12 the car is encoded as a single command, but the cdr is encoded as a command sequence 11:21:52 the whole program is encoded as a command sequence 11:21:53 So for "++" you would take {1, 1}, then add one to get {2, 2}, then stick a 0 on the end to get {2, 2, 0}, then cons it? 11:21:58 fizzie: I get a fair bit of flack for ever mentioning (Free)DOS to some people 11:22:19 + is 1 as a command iirc 11:22:33 And if its lossless, the files are going to be very large... And as resolutions are high, the movies would be huge... 11:22:55 oerjan: Is that correct? 11:23:01 and no. adding 1 to the car before consing is not the same as adding 1 to the cons afterwards, which is what you should do 11:23:17 Ooh. 11:23:28 note that there is _no_ empty single command, so you _don't_ need to add 1 for those 11:23:40 instead you add 6 for embedded loops 11:23:41 Ilari: I seem to recall the article mentioning file sizes of around 200-500 gigabytes; I presume that was for the common 2K resolution (2048×1080), so you can guesstimate whether it's lossless or not from that. Probably not. 11:23:44 Trying to make mapping of bf programs to integers without gaps? 11:23:56 So we take {1, 1, 0}, then take {1, f(1, 0)}? 11:24:04 Plus one. 11:24:26 i don't recommend confusing the notation like that :D 11:24:38 {1, 1+f(1, 0)}, then 1+f(1, f(1, 0))? 11:24:44 {1,0} (the list) is 1+f(1,0) 11:24:45 yes 11:24:47 Ilari: Yes. 11:25:11 It started yesterday evening. 11:26:31 fizzie: 200 gigs for sightly less than 2 hour movie would yield ~270Mbps. Which would be near-lossless with good codec. 11:26:33 Ilari: "Briefly, the specification calls for picture encoding using the ISO/IEC 15444-1 "JPEG2000" (.jp2) standard and use of the CIE XYZ color space at 12 bits per component encoded with a 2.6 gamma applied at projection, and audio using the "Broadcast Wave" (.wav) format at 24 bits and 48 kHz or 96 kHz sampling, controlled by an XML-format Composition Playlist, into an MXF-compliant file at a maximum data rate of 250 Mbit/s." 250 Mbps doesn't sound quite loss 11:26:33 less; that's only around 1.3 megabytes per frame. 11:26:54 I don't believe there's such a thing as "near-lossless". 11:26:57 And ",[.,]" -> {5, {4, 5}}, then work the {4, 5} out as if it was a standalone program, then add 6? 11:27:21 presumably the part that the human eye can't detect very well (which is JPEG's strong suit, right?) 11:27:27 yeah 11:27:45 this is all very elegant if you think of it as algebraic data types 11:28:06 Rugxulo: It's still JPEG 2000, not JPEG. But yes, that's the idea. 11:28:43 oerjan: I find the whole thing to be the most elegant. 11:28:56 Sometimes one sees compression @ 270Mbps in order to pack HD video data for sending over SDI link. And that's with low latency requirements -> not as good compression. 11:29:05 I've never seen any bijections between structured text and the nats before. 11:30:07 mhm 11:30:20 I wonder if we can generalise it... 11:30:58 certainly, any algebraic data type should work, although the (0,0) <-> 0 infinite recursion problem _might_ crop up again if you're not careful 11:31:50 basically, whenever you have a type that consists of alternatives, you encode each alternative and then do something to the resulting numbers to make the results disjoint 11:32:03 The behaviour of f is fairly interesting by itself. 11:32:07 Well, 250Mbps with Motion JPEG2000 is probably better quality than 270Mbps VC-2, since one doesn't have to lose quality for less latency. And 270Mbps is used for studio streams that must be of extremely high quality. 11:32:25 if one alternative is finite, put it first and the (0,0) problem disappears for that choice 11:32:29 Ilari: I don't know if they specify higher data rates for resolutions like 4K (4096x2160 or around that), though. That's a lot of pixels per frame. 11:32:39 f(0, x) = 2x, and f(x, 0) = 2^x-1 11:33:17 Which leads to the interesting if undesirable quality that all of the even numbers are in one column of the table. 11:33:37 heh 11:34:15 I have a nice little table of the first few conses. 11:35:07 as we noted before, that f encoding is really biased to blow up cars 11:35:15 Yes. 11:35:35 -!- tombom has joined. 11:35:47 But unless someone can think of an elegant deconsing of the triangular one, it's the best we've got. 11:35:54 yeah 11:36:27 Ilari: Now look what you did: you made me go peek at the DCI spec. 11:36:43 The rows are all that other type of sequence where u_n+1=ru_n+a 11:36:49 Algebraic? 11:37:07 Ilari: "However in the exclusive case to accommodate a 2K, 48 FPS, 12 bit DCDM to use [SMPTE 372M Dual Link HD-SDI] as an interface, it is acceptable, but not recommended, to allow 10 bit color sub-sampling to create the DCDM* at the output of the Image Media Block decoder. This bit depth reduction and color subsampling is only allowed in the single combination of a DCDM at 2K, 48 FPS being transported over a link encrypted SMPTE 372M connection." 11:37:07 um what? 11:37:20 I can't remember what it's called. 11:37:35 linear recursive? 11:37:35 oerjan: Sounds like a riotous function there. 11:37:50 "The data size of two hours movie amounts to 8TB." 11:37:53 fizzie: i _may_ have slightly punnified that sentence 11:38:02 Oh, that's just "may"? 11:38:02 Actually, it seems that all of the rows have the same r and a. 11:38:18 i admit nothing. NOTHING. ok, maybe a little. 11:39:00 Phantom_Hoover: is this still the 2^u*(2*v+1)-1 encoding? 11:39:04 Yes. 11:39:16 But it still blows up incredibly quickly. 11:39:32 [[[]]] took up the entire hard drive with VM. 11:39:39 If someone wants to worry about the triangular version, you could start with one of the formulas at http://www.research.att.com/~njas/sequences/A000217 -- that's the "first row" of the table of the triangular thing, so if you can easily map n into the largest one of those numbers, it's trivial to then get the actual coordinates. 11:39:52 Admittedly there was only ~500M left on the HD, but still. 11:40:04 (After the references there's a big list of ways to compute them numbers.) 11:40:21 fizzie: it's the reversal that is the problem 11:40:37 oerjan: Yes, but it gives many different things to attempt to reverse. 11:40:43 fizzie: What about the classic n(n+1)/2? 11:40:46 -!- hiato has joined. 11:40:48 it needs a square root, essentially 11:40:57 And oerjan's right. 11:40:58 Phantom_Hoover: that's the one we're talking about 11:41:43 i suppose we could do newton's method approximated with bignum ints 11:42:09 It's a trade-off between elegance and practicality. 11:43:37 An exponential generating function for the inverse of this sequence is given by ... and then something horrible 11:44:49 Yes, it's always a bad sign when functions start to get names of people. 11:45:09 Bleugh. 11:45:46 this sequence by Triangle (and a bit Robert) 11:46:38 There's a book about generating functions with the title "generatingfunctionology" (all lowercase); I liked it because of the name already. 11:46:40 http://www.amazon.com/reader/1568812795?_encoding=UTF8&ref_=sib_dp_pt#reader-link 11:46:53 I guess the official name is maybe not lowercased, but that's the way the cover's printed. 11:47:20 (It was course literature on a discrete maths thing.) 11:47:54 Funny product description there. "One of the most important and relevant recent applications of combinatorics lies in the development of Internet search engines whose incredible capabilities dazzle even the mathematically trained user." 11:48:08 some concatenatingwordology there 11:48:19 It's like the numerical matrix course where the instructor started by talking about the Google matrix. Everyone wants to get on the Internet wagon. 11:48:22 Even mathists. 11:48:35 Or is it "mathologists"? 11:49:11 Is "mathematicians" too inaccurate? 11:49:23 Pathological mathologists. 11:49:25 mathophysics 11:49:33 Mathocalypsists. 11:50:00 the mathocalypse will not be nice. it will be very pretty, though. 11:51:19 hm if you want an f encoding that is balanced between x and y, you essentially get approximately square root demanded automatically 11:51:44 because [1..x] x [1..x] has size x^2 11:52:14 on the other hand, hm 11:52:14 sqrt is at this point a lesser evil. 11:52:26 if you don't need it _that_ balanced... 11:53:45 The current cons causes us to get a 38218-digit number for the cat program. 11:53:50 -!- cheater3 has joined. 11:54:33 A 7-char program. 11:55:37 That's FOUR ORDERS OF MAGNITUDE. 11:55:56 What cat program? Presumably something more complicated than ',[.,]'... 11:56:11 ,[.[-],] 11:56:27 The no-change-on-EoF version. 11:56:38 -!- cheater2 has quit (Ping timeout: 240 seconds). 11:57:04 compatible with 0 on eof 11:57:23 ,[.,] still gives a number two orders of magnitude greater. 11:57:32 Hmm... Structure [[]], 5 segments... 11:58:08 A 22 digit num,ber. 11:58:13 each loop nesting blows up things with 2^... essentially 11:59:29 It's particularly irksome because I can't tell what could be in the lower numbers. It's basically all junk, I think. 11:59:36 Valid junk, though. 11:59:39 -!- cheater2 has joined. 12:03:15 -!- cheater3 has quit (Ping timeout: 276 seconds). 12:04:00 Is it that hard to reverse the function? We've already *got* a mathematically elegant one, so can we just live with using sqrt? 12:04:32 well we can, it's just that sqrt on bigints isn't a common builtin function afaik 12:04:51 Oh. 12:05:11 oerjan: GMP at least does square roots. 12:05:18 Haskell? 12:05:29 there's probably a haskell package for it 12:05:52 but basic sqrt in haskell is for floating point types only 12:06:06 Appalling! 12:06:57 http://www.haskell.org/haskellwiki/Generic_number_type says "The most efficient way is to call the native implementation of the square root of GNU's multiprecision library. (How to do that?) The most portable way is to implement a square root algorithm from scratch." and implements something iterative. 12:07:06 The "How to do that?" isn't especially helpful. 12:10:11 well i guess stealing that code may be an option :D 12:12:19 right that is newton's method 12:12:38 -!- Phantom_Hoover has quit (Ping timeout: 252 seconds). 12:14:01 There's also http://gmplib.org/manual/Square-Root-Algorithm.html but that's a bit specific to their particular representation of integers. 12:14:11 -!- Phantom_Hoover has joined. 12:14:46 oerjan: So how do we represent null lists, again? 12:14:53 0 12:15:32 Oh, yeah. 12:16:03 http://www.haskell.org/haskellwiki/Generic_number_type#squareRoot but i wonder why the heck they recurse on squareRoot itself... 12:16:14 And do we add 1 to the f(0, 0) at the end? 12:16:28 I'm sorry, I'm just forgetful. 12:17:02 there is no f(0,0) at the end unless you actually have a car that is 0 there 12:17:30 (that - from before i presume) 12:17:31 OK, so at the end you decons and find that the car is the last element and the cdr is 0? 12:17:41 yep 12:18:03 you _do_ subtract 1 before that decons, naturally 12:18:06 I think I figured out a way to reduce enumerating brainfuck programs to enumerating non-empty (ordered) trees... But how to enumerate ordered trees... 12:18:39 This method works fine *in theory*. 12:18:49 The numbers are enormous in practice. 12:18:50 Ilari: why non-empty? the empty bf program is perfectly legal 12:20:00 i suspect that recursive squareRoot in there was added by someone who didn't know what they were doing 12:22:02 Actually, reducing problem of... 12:22:05 Recursion seems appropriate in this context. 12:22:24 oerjan: Encoding empty brainfuck program would need encoding of tree containing just one node... 12:24:01 Phantom_Hoover: no, because the lowerRoot is supposed to be the initial estimate for the newton's method. if you use squareRoot to refine that estimate you never actually _finish_ afaict. not that i have run it. 12:24:31 but i am arrogant enough to edit that page, now 12:24:45 Well, if empty tree is included in enumeration, then one would need to know enumeration of it so one can skip it. 12:25:01 or wait it may hit squareRoot 1 12:25:07 let me check that again 12:25:46 oh! 12:25:52 now i understand it. scratch that. 12:26:04 * oerjan whistles innocently. 12:26:05 Ilari: Don't we basically use trees? 12:26:31 With the nested tuples? 12:26:59 Not that I would know. 12:27:45 it doesn't immediately divide by the highest 2^n, it divides by the highest 2^2^n, so it makes perfect sense to recurse to find lower powers of 2 that still divide it 12:28:52 Wait, what are the algorithms for the triangular bijection? 12:29:26 * Phantom_Hoover will have to say that to a layman. 12:29:46 Ordered trees meaning that 'x <- {x <- x, x}' and 'x <- {x, x <- x}' are different. 12:29:46 triang(u+v)+u where triang n = n*(n+1)`div`2; plus or minus any off-by-one errors 12:29:50 Phantom_Hoover: ^ 12:30:39 OK, and do we have an inverse? 12:30:47 supposedly yes 12:30:55 What is it? 12:31:07 finding u+v is approximately a square root 12:31:40 multiply by 2 then take square root, except there might be some adjusting for that +1 in the product 12:32:27 lessee 12:33:12 all those quotes (recent log), too bad my B93 proggie only randomly prints 4 :-P 12:33:17 1 -> 1, 2 -> 2, 3 -> 2, 4 -> 2, 5 -> 3, 6 -> 3, there has to be an off-by-something error in there 12:33:54 1 3 6 10 15 21 ... are the triangular numbers 12:33:56 How many ordered trees of n nodes are there anyway? 12:34:41 -!- Rugxulo has quit (Quit: math no fun). 12:34:50 0 1 3 6 10 15 21 ... are the triangular numbers 12:35:05 Ilari: How do you represent ",[.[-],]"? 12:35:50 0:(0,0), 1:(0,1), 2:(1,0), 3:(0,2), 4:(1,1), 5:(2,0), 6:(0,3) 12:35:51 For our method it seems to be {4, {5, {0}, 4}}. 12:36:09 Sans terminators. 12:36:53 Phantom_Hoover: The tree part of it would be 'x <- x <- x'. 12:36:56 ok that direction looks correct 12:37:43 Ilari: What is x? 12:37:53 Phantom_Hoover: Depicts node. 12:38:08 And what are the contents of the nodes? 12:39:55 Ah, number of ordered trees with n nodes is C(n-1) (Catalan numbers)... 12:40:02 ! 12:40:12 That's what got me started on this± 12:40:28 wait, what 12:40:40 Phantom_Hoover: you're not secretly clive gifford are you? 12:40:47 Stephen Morley used the Catalan numbers to work out the no. of bits needed for a BF program of length n. 12:41:04 Which set me thinking whether it would be possible to use that. 12:41:06 * oerjan sent a message involving catalan numbers to him last week 12:41:46 Clive Gifford the journalist? 12:42:27 i know nothing about him being a journalist, it's the guy with eigenratios of self-interpreters 12:43:33 and i did a very crude estimate of such a ratio which ended up being the catalan numbers in one column 12:43:50 * Phantom_Hoover has no idea what an eigenratio is 12:44:18 There are no contents in these nodes. It is representation of structure of the program. 12:44:35 i'm still waiting to hear back about my next refined estimate, i'm afraid it ruins one of his hypotheses so i hope he's not angry at me 12:45:02 Phantom_Hoover: basically if you have a self-interpreter for a programming language 12:45:28 and then you give it itself as argument, so it runs itself 12:45:43 and you give _that_ the self-interpreter as argument, etc. 12:46:06 OK... 12:46:29 then for some self-interpreters as you nest this, the running time gets slower in the limit by a constant factor each step 12:46:51 growing approximately like r^n 12:47:47 then r is the eigenratio. clive gifford has a blog about this: http://eigenratios.blogspot.com/ 12:48:00 OK/ 12:48:13 Maths is never as cool once you learn it. 12:48:29 Well, for a given value of "cool" 12:48:42 he's used matrices to calculate this ratio for some interpreters, the "eigen-" is because the ratio turns out to be an eigenvalue of that matrix 12:50:22 Phantom_Hoover: back to the bijection; i think multiplying by 2 and then taking square root gives either the floor of u+v or 1 more than it - i don't see a way to get either directly so there needs to be a postcheck for which one is right 12:50:50 And how do we derive u and v from u+v? 12:51:15 well we start with n = triang(u+v)+u 12:51:25 Yep. 12:51:30 so once we have u+v, u = n-triang(u+v) 12:51:40 Oh. 12:51:40 and then v = (u+v)-u 12:52:20 Any progress on the sqrt? 12:52:35 that haskell link should work fine enough? 12:52:53 (i was wrong about that recursion being a problem btw) 12:53:31 http://www.haskell.org/haskellwiki/Generic_number_type#squareRoot 12:55:06 -!- FireFly has joined. 12:55:16 Oh, OK. 12:56:44 Ilari: http://safalra.com/programming/esoteric-languages/bf/program-density/ is safalra's page on the lowest number of bits needed to represent a BF program. The use of the Catalan numbers in both can't be a coincidence. 12:57:20 probably not 12:57:51 Probably not a coincidence or probably not not a coincidence? 12:58:18 xkcd is picking up these past couple of times... 12:58:28 probably not *ducks* 12:59:33 That one was pretty good. 13:06:02 -!- oerjan has quit (Quit: Later). 13:07:38 -!- Phantom_Hoover has left (?). 13:09:46 -!- lereah_ has joined. 13:26:54 Assuming x <- x <- x encodes to 2 (and choosing operation enumeration order to be '+-<>,.'), i get that enumeration of ",[.[-],]" is 144 877 580... 13:47:22 -!- nooga has joined. 13:47:52 hey 14:03:41 who was norwegian? 14:04:16 oerjan, at least. 14:04:20 He just left an hour ago. 14:04:28 Or maybe "an hour" is not "just". 14:05:21 heh 14:05:31 maybe he's sleeping 14:06:38 I'm sure you can find some Norwegians in a shop or something. 14:11:12 right 14:15:39 Norwegians in Poland, in a shop 14:15:46 -,- 14:17:39 Well, maybe a local people-store can order them in? 14:18:56 I think they don't have those 14:20:54 i am reminded why Java is a horrible programming language 14:22:42 Deewiant: Slave markets or some-such. 14:22:43 -!- hiato has quit (Quit: underflow). 14:24:37 augur, amen 14:24:56 javanauts are a bunch of douches, basically. 14:25:05 JAVANAUTS OMFG\ 14:25:25 o\ 14:25:46 Nautical Java, for ship automation. 14:26:02 What did Java do now that was so awful? 14:27:04 0 -> '', 1 -> '[]', 2 -> '+', 3 -> '+[]', 4 -> '- 14:27:06 ' 14:30:16 Ilari: I think you're going to have to give us a bit more detail on how exactly that goes. 14:31:48 I still need to figure out a way to enumerate non-empty ordered trees (so far the numbers are based on assumptions on that enumeration)... 14:32:28 Yes, but as a sneak-preview you could let us know how it goes, assuming you can enumerate those gaplessly and efficiently. 14:35:52 -!- alise has joined. 14:36:03 alise__: You sleep? 14:36:03 Only... Midnight there. 14:36:03 14:36:04 didn't sleep night past 14:36:15 s/all that colour junk (if you got it) and the blank line//g 14:36:55 -!- augur has quit (Remote host closed the connection). 14:37:08 -!- augur has joined. 14:41:14 well, he *could* run DOSEMU and any DOS-based tool there (including ndisasm) <-- there is an issue here, why DOS at all. Also it seems likely that most DOS based tools are older than x86_64 with SSE4.1 (this code turned out to contain such instructions) 14:42:10 btw, I wonder if it would be feasible to make an x86 program that were valid even when you remove the first byte, (and not making the first byte a nop or other such trivial variants) 14:42:49 basically it would mean that both the program and a not-whole-instruction offset should be valid 14:43:38 presumably would be easy for small programs, but preferably this should be some non-trivial thing that does something that isn't complete nonsense 14:44:33 DOS for QBasic. 14:44:42 (and preferably it shouldn't just branch to different, unshared, parts of the code right away) 14:44:44 alise, hm? 14:44:50 I was using DOS for QBasic. 14:44:56 Or was that another DOS conversation? 14:46:00 01:19:10 Grrr... 14:46:01 01:19:43 I tried alise's bijector and now it seems to have taken all of the hard disc space. 14:46:01 01:20:01 For "[[[]]]"! 14:46:03 Yes. 14:46:06 alise, the thing rugxulo said? It was right in the context of quoting me on disassembling a file that wasn't in ELF or any other format (just "raw" instructions) 14:46:08 01:27:39 Perhaps I shouldhave pastebinned that. Oops. 14:46:09 it probably got cut off 14:46:19 01:58:12 alise's program isn't a proper bijection. 14:46:19 01:58:21 It encodes ++- and ++ the same. 14:46:24 I saw that, yes. 14:46:28 I will fix it, I think. 14:46:33 I am going to change the bijection. 14:46:36 alise, bijection to what? 14:46:45 Bifro. 14:46:51 doesn't ring a bell at all 14:47:47 google indicates it is a hair style(?), which seems quite improbably in this context 14:48:03 jane@jane-desktop:~/code$ echo '++' | ./bifro encode 14:48:04 10 14:48:04 jane@jane-desktop:~/code$ echo '++-' | ./bifro encode 14:48:04 26 14:48:05 fix'd 14:48:16 AnMaster: A program I wrote last night; it well-orders the set of valid brainfuck programs. 14:48:19 ah 14:48:24 Which also means every valid BF program has a corresponding number. 14:48:28 It can give you the number, and decode any number. 14:48:30 alise, are they sparse? 14:48:41 Sparse howso? 14:48:53 The encoding is somewhat suboptimal: 14:48:55 jane@jane-desktop:~/code$ echo '[]' | ./bifro encode 14:48:56 alise, as in, not all numbers are mapped 14:48:56 64 14:48:56 jane@jane-desktop:~/code$ echo '[[]]' | ./bifro encode 14:48:56 1180591620717411303424 14:49:01 right 14:49:02 and [[[]]] I don't think is calculable in this universe 14:49:04 AnMaster: all numbers are mapped 14:49:07 that's basically the entire point 14:49:11 otherwise it's "quite easy" 14:49:18 alise, yep, ascii code 14:49:22 as a bignum 14:49:23 well, no 14:49:24 that doesn't handle [] 14:49:31 which is the other "difficult" part 14:49:34 as in 14:49:35 you can have [ 14:49:36 and ] 14:49:37 unmatched 14:49:44 all I have to do is fix my NxN -> N bijection, anyway, and the numbers will be more reasonable 14:49:49 alise, true, but those are not in the domain the function is defined in 14:49:54 but, I don't think oerjan has given me the inverse algorithm either :-) 14:49:57 (problem solved in a cheating kind of way) 14:49:59 AnMaster: Well, yes, true. 14:50:08 jane@jane-desktop:~/code$ echo ',[.,]' | ./bifro encode 14:50:09 1581267603963364205878869896241541461324661326282360299663291859589299527874963647593440497667477535118649045814975093057732880760826511538023542187037019608761854877160674698159897716735103252665935684988068320848140683464255411707953932466009059033912578566502802887127604801681488301032705683661296923932091466727292944 14:50:21 This mess is caused because 14:50:22 biTo :: (Integer, Integer) -> Integer 14:50:22 biTo (u,v) = ((2^u) * ((2*v) + 1)) - 1 14:50:26 so obviously u gets very big 14:50:26 and 14:50:36 alise, it isn't like it is a continuous function anyway, it is only defined for the integers 14:50:40 we encode loops with 6 + their crushing (6 is the number of non-loop instructions) 14:50:47 (right?9 14:50:48 so we have some 2^ magic in every element of the loop 14:50:49 and get a huge number 14:50:50 THEN 14:50:54 s/9/)/ 14:50:57 we do 2^huge 14:50:58 "ouch" 14:51:03 AnMaster: naturals :P 14:51:07 alise, right 14:51:13 alise, what is the bf program 195722? 14:51:29 With the new fixed encoding that nobody else has seen before? 14:51:35 well, either 14:51:46 Well, the previous one is broken because it encodes ++ and ++- the same. 14:51:50 right 14:51:53 and the with the new one? 14:51:57 This one is broken because it's too huge but I need oerjan or someone to give me the inverse function first :P 14:52:01 $ echo 195722 | ./bifro decode 14:52:02 ++><-----+ 14:52:07 heh nice 14:52:11 Loops are very rare; to understand why, consider that they take the form of 2^huge. 14:52:22 And even adding one instruction to a loop makes it unimaginably bigger. 14:52:36 ah 14:52:51 alise, so [-] is? 14:52:53 To wit, consider the two progams ,[.,] and ,[.,,] 14:53:03 * alise pasties 14:53:09 ouch that bad... 14:53:12 [-] is 128, nicely enough 14:53:17 AnMaster: http://pastie.org/943535.txt?key=wyaxhf87u5uvgzblwuxa 14:53:28 alise, tell me what lostking is in this. I mean, number of digits in it 14:53:32 rather than the whole thing 14:53:44 AnMaster: Calculating the log would be very hard, the expression would be very big 14:53:53 alise, true 14:54:01 Considering even very small programs probably cannot fit into the universe and I run out of 2GB on even very very trivial programs, 14:54:06 I doubt it is feasible. 14:54:16 Anyway, with the triangular NxN -> N bijection it should be okay. 14:54:25 But I need to figure out (a) a canonical formula for it; and (b) its inverse. 14:54:26 alise, what sort of programs use more than 2GB? 14:54:30 I mean, how trivial 14:54:58 Let's see. 14:55:10 $ echo ',[>>>>>.]+[<<<<<<<<<<]' | ./bifro encode 14:55:13 I am pretty sure this will run out of memory. 14:55:15 Not certain, though. 14:55:22 I know that a <1kb rot13 did it. 14:55:26 alise: There in the logs is one oerjan-guess for how you can derive the inverse, assuming you can do sqrt on your bignums. 14:55:29 Oh, you want an EASY one? 14:55:34 alise, what about nested loops? lets take something trivial [[-]-] or such 14:55:39 Certainly. Second. 14:55:43 AnMaster: yes, that's what i'm saying 14:55:45 it grows very quickly 14:56:13 alise, yes, but what order of size is something like [[-]-]. ,I would guess it is still pastebinable 14:56:14 $ echo '[[-]-]' | ./bifro encode 14:56:15 2521728396569246669585858566409191283525103313309788586748690777871726193375821479130513040312634601011624191379636224 14:56:15 Disadvantage; - is the lowest. 14:56:18 ah 14:56:23 Not much more at all than that. 14:56:27 right, still quite large 14:56:29 echo '[[[-]-]-]' | ./bifro encode 14:56:29 hands 14:56:31 *hangs 14:56:33 ouch 14:56:34 AnMaster: Do you want the code? 14:56:42 It has a proper CLI to use it and everything 14:56:46 Well, I don't know that it hangs forever 14:56:48 alise, not really, it isn't a very useful bijection ;) 14:56:57 Hey, as long as you avoid nested loops... 14:57:03 http://pastie.org/942869.txt?key=vvwlyvvpwhxulduzur3q, anyway, one patch to make: 14:57:09 alise, well, ',[>>>>>.]+[<<<<<<<<<<]' isn't nested 14:57:10 crush (x:xs) = biTo (x, crush xs) 14:57:11 becomes 14:57:14 crush (x:xs) = biTo (x, crush xs) + 1 14:57:15 and 14:57:17 decrush n = let (x,xsn) = biFro n in x : decrush xsn 14:57:17 becomes 14:57:18 two loops sure, but not nested 14:57:20 decrush n = let (x,xsn) = biFro (n-1) in x : decrush xsn 14:57:36 ,[>>>>>.]+[<<<<<<<<<<] -- running now 14:58:12 Amusingly, decoding is very quick and encoding is very slow, even though the decoding iterates /2 on a number until it does not divide two any more, and the encoder is O(1) for a single instruction! 14:58:44 hah 14:58:58 alise, aren't most things O(1) for a single input operand 14:59:09 biTo :: (Integer, Integer) -> Integer 14:59:10 biTo (u,v) = ((2^u) * ((2*v) + 1)) - 1 14:59:10 but 14:59:10 well, assuming you measure in the right way 14:59:14 biFro :: Integer -> (Integer,Integer) 14:59:15 biFro n = (m, (((n `div` (2^m)) - 1) `div` 2) + 1) 14:59:15 where n' = n + 1 14:59:15 m = toInteger . length . takeWhile (\n'' -> mod n'' 2 == 0) $ iterate (`div` 2) n' 14:59:15 you decide 14:59:17 the m is basically 14:59:48 m = 0; while n' % 2 == 0 { m += 1; n' = n' div 2 } 15:00:05 alise, I might be more interested when you come up with a mapping that gives "usable" results. With that I mean that lostkng should be possible to encode on something in this universe. Preferably something that isn't a super computer too ;) 15:00:39 02:57:15 and didn't you see the big whining about how Jobs claims even Theora is going to be attacked over patents? 15:00:46 no, he claimed apple themselves are going after theora, iirc 15:00:56 AnMaster: LostKng - forget it, I imagine. 15:01:03 rot13? quines? sure. 15:01:15 AnMaster: One very interesting thing to do is to come up with an encoding-quine. 15:01:39 alise, hm? 15:01:45 Make a program P such that P calculates (and preferably outputs) N, and number(P) = N. 15:01:51 ah 15:01:56 Like a name tag! 15:01:58 A name tag for itself. 15:02:11 alise, does such a program even exist? 15:02:22 By the fixed-point theorem, yes. 15:02:27 (The same theorem that guarantees that quines exist.) 15:02:42 Proof that such a program exists: 15:02:45 number(P) is certainly a computable function; therefore Brainfuck can compute it. 15:02:51 Fixed-point theorem; Q.E.D. 15:03:31 03:00:06 dumb question, but why not use FreeBASIC instead? 15:03:38 No peeking 'n poking madness; no nostalgia; no good-ole-days-feeling. 15:03:56 03:00:42 Rugxulo: Who knows why alise does anything? 15:03:57 03:00:57 It is an enigma wrapped in old newspapers, and smells of fish. 15:03:59 The answer is "fish and chips" 15:04:02 "Old fish and chips" 15:06:29 hm 15:06:33 03:16:56 * Rugxulo wonders why such a violently DOS-hating crowd would use QBASIC 15:06:38 DOS is an interesting toy. 15:06:50 It is well-architecture for running programs in a simple language with full hardware access. 15:06:56 And compiling them (with QuickBasic). 15:06:58 No more, however. 15:07:05 no more? 15:07:47 Yes; for things like basic office applications it works but it badly architectured. 15:07:49 I guess games, it's good for, too. 15:07:52 But that's it. 15:07:56 *but is badly 15:08:02 -!- BeholdMyGlory has joined. 15:08:11 alise, idea: DOS C compiler + some asm routines, called peek and poke 15:08:21 lol. 15:08:23 basic ftw 15:08:40 sure, but you have to admit that basic has it's downsides (so do C but meh) 15:08:41 it's even an advanced editor, factors procedures out into a menu and doesn't show them in the main program source (imagine it is called "main" and it all makes sense!) 15:08:55 QuickBasic doesn't have all that many disadvantages for DOS. 15:09:09 It's fast, it compiles proper programs, and it's a fucking awesome language for peeking and poking and whatnot. 15:09:14 alise, and 640 kB is enough for everyone? 15:09:24 Hey, I'm explicitly meaning FOR TINKERING here. 15:09:37 right, but sometimes you want to tinker with hundred of MB 15:09:44 or is that no longer tinkering then? 15:10:36 alise: '[[[[[[[[]]]]]]]]' is totally out of reach, right? 15:10:50 AnMaster: On x86-32, the bytes "05 00 00 00 00" are "addl 0, %eax", while "66 05 00 00 00 00" are "addw 0, %ax; addb %al, (%eax)". If you can make sure %eax points to something sensible and the lowest byte is nonzero, you can determine which variant was executed based on whether the byte at %eax was changed or not. 15:10:52 AnMaster: Since the only thing that can possibly be different is that first instruction, I don't think you can get much more of an effect than that; then it's up to you how to make the code do different stuff, by branching or by some less-cheaty means. 15:10:53 beh 15:11:12 Ilari: Yes. It blows up loops and it blows up instructions even more. 15:11:20 Ilari: No fear; it'll be triangularised soon. 15:11:35 fizzie, couldn't you get instructions that end in different places too 15:12:22 03:40:48 it needs a square root, essentially 15:12:27 Won't floor(sqrt(n)) do? 15:12:34 fizzie, of course, once they end in the same place they will be merged, no way around it 15:13:34 (at least unless there is some strange flag you can set which might cause it to work out as different things) 15:13:37 AnMaster: I have a feeling that sort of stuff tends to get synchronized sooner or later. At least in my experience, even if you start a disassembly at a random spot, they tend to converge pretty fast. But yes, maybe if you're really really careful about selecting the instructions. 15:14:01 hm 15:14:06 Any flag will cause the corresponding conditional branch/set/such do different things, but maybe that doesn't again count. :p 15:14:34 fizzie, indeed doesn't. I was more thinking about x86 vs. x86_64, where iirc INC → REX prefix and such things 15:15:06 I think they either threw away or reused some of the BCD instructions too 15:15:21 Program starting with 'EB EB EA'. Jumps to offset 0xED from start even with first byte removed... 15:15:46 Ilari, EB? 15:16:00 I don't have a reverse lookup table handy 15:16:03 JMP SHORT imm8 15:16:07 ah 15:16:21 Ilari, and with first byte removed? 15:16:38 Oops 'EB EB EB'. 15:16:42 http://ref.x86asm.net/coder.html is sorted by opcode if you need it. 15:16:45 ah thought so 15:16:57 And anyway, it was supposed to do a different thing when the first byte removed, not the same. :p 15:17:16 indeed what fizzie said 15:17:28 also it doesn't need to be exactly 1 byte 15:17:50 but some small whole-byte offset (less than the size of the first instruction) 15:17:54 05:26:54 Assuming x <- x <- x encodes to 2 (and choosing operation enumeration order to be '+-<>,.'), i get that enumeration of ",[.[-],]" is 144 877 580... 15:17:59 but does it have a program for each nat? 15:19:12 That 144 877 580 is likely wrong... And each nat is guarenteed to map to some program. And I don't think any two map to same program. I don't have finalized ordered tree to nat mapping. 15:19:38 ya'll crazy bitches 15:20:29 Ilari: You also haven't told us how you map to ordered trees, so we can't look for bugs in that. :p 15:23:09 Recomputed, and got 144 744 582 this time... 15:23:15 It's nondeterministic! 15:23:20 Ilari, and if you recompute again? 15:23:23 I can see how the structure gives the shape of the tree, but it's not immediately clear how you deal with what instructions are where. 15:23:25 alise, damn, beat me to it 15:23:33 AWESOME 15:23:41 Does it actually depend on the phase of the moon's minute changes? 15:24:13 The moon-men's minutes are a lot shorter than our human minutes. 15:24:21 Oh, Milner died! Sad. 15:25:25 data Nested a = Nil | Cons a (Nested a) | Nest (Nested a) (Nested a) 15:25:26 data Ref a = Val a | Ref Int 15:25:26 deblimp :: Nested a -> [[Ref a]] 15:25:35 I'mma finally getting down to the theory of deblimpification 15:28:47 -!- fax has joined. 15:28:51 hey alise how come you are here 15:29:05 what 15:29:39 "Who told you you can be here, huh?!" 15:29:42 heh I hate deblimping it's basically all one big corner case. 15:29:42 monday 15:29:47 day off 15:29:49 bank holiday 15:29:51 \m/ 15:30:12 You Britons and your made-up holidays. 15:30:18 banks need holidays too!! 15:31:40 actually grr this is irritating. 15:31:40 We've got May 1st as a holiday, but this year it was on Saturday. 15:31:48 like seriously. 15:32:25 fizzie: whenever that happens to us we end up with a ridiculously-titled "holiday in place of [what we missed]" day 15:32:30 or whatever it is called. 15:32:46 How uncommonly fair of you. 15:32:49 I get that 144 877 580 decodes to '.[++[-].]'. I computed segment nats for ',' and '.' wrong. 15:33:08 fizzie: yes we brits are wonderful people. 15:34:14 Around here, whenever we miss a holiday because it lands on a weekend, we get a "sucks to be you" day, which is otherwise just like a regular workday, only worse in that you're annoyed because you've just missed a holiday earlier. 15:34:16 we've got may 1st and 3rd 15:35:14 fizzie: how finnish 15:35:15 alise: then explain 2 taps 15:35:25 and windows that open TO THE OUTSIDE 15:35:33 Wait, you guys DON'T have 2 taps? 15:35:37 ...Why not? 15:35:45 And why on earth would you want a window opening INTO your room? 15:35:54 alise, your data type can be expressed as the fixed point, X[a] = a + X[a] + X[a]*X[a] ? 15:36:04 yes it can 15:36:05 you can clean the window 15:36:13 nooga: from the inside? 15:36:14 why 15:36:16 without leaving the room 15:36:26 this gives you a way to subdivide the isomorphism problem 15:36:28 windows don't exactly get all that dirty to need urgent cleaning so often that going outside is a pain. 15:36:41 how about 2 taps 15:36:48 fax: wut :P 15:36:58 basically I'm trying to theoreticise my underload compiler's main bit 15:37:00 how am i supposed to wash a plate in boiling OR icy water 15:37:06 Underload has functions like (a(b(c))) 15:37:11 and we need to make these into cross-referencing functions 15:37:13 so this becomes 15:37:21 [ (a1) (b2) (c) ] 15:37:29 ((a)(bc)(d(e)f))g becomes 15:37:49 [ (1g) (234) (a) (bc) (d5f) (e) ] 15:38:34 for a long time we weren't really sure an underload compiler was possible - 15:38:42 this trick, + the "function data structure" made it possible 15:39:18 (function data structure = if you did (a)(b)* i.e. append b to a, then this got stored with the function pointers to a and b's code, as a cons list of sorts) 15:39:26 (same for (x)a -> ((x)), etc) 15:39:37 fax: so now I'm trying to writ out that blimp algorithm 15:39:40 which flattens the list 15:39:46 each number-pointer is a "blimp" 15:39:53 which means my function should be called blimp 15:39:55 not deblimp... 15:40:11 or, wait, no 15:40:17 each little () is a blimp 15:40:18 w/e 15:40:20 fax: you get the idea 15:41:55 what 15:42:08 sorry I totally don't know anything probably best just leave me 15:42:26 fax: wut 15:42:30 what didn't you get :( 15:43:31 -!- Phantom_Hoover has joined. 15:43:59 alise: Did you fix your Haskell program? 15:44:07 Phantom_Hoover: yes; but did not triangularise it. 15:44:16 it is easy to fix 15:44:18 Can I see the fixed version? 15:44:18 s/ $// 15:44:26 will a patch do? only two changes 15:44:48 Change the two lines almost identical to these to the ones shown here: 15:44:49 crush (x:xs) = biTo (x, crush xs) + 1 15:44:51 decrush n = let (x,xsn) = biFro (n-1) in x : decrush xsn 15:45:02 Then recompile (ghc -O2 --make bifro.hs -o bifro) 15:45:15 Wait, did you fix the problem in the algorithm that caused it to return the same number for ++- and ++? 15:45:22 Yes; that is that fix. 15:45:44 Of course, since this ends up doing 2^(1+stuff) in for loops instead of just 2^stuff, everything is even more ginormous. :-) 15:46:23 1, 3, 7, 15, 31, 63, 127 -- result of - | -- | --- | etc 15:46:25 For heaven's sake, does no-one have an algorithm for the inverse of the triangular bijection? 15:46:31 looks like odd numbers at first :-) 15:46:39 Phantom_Hoover: yes, almost 15:46:54 04:50:22 Phantom_Hoover: back to the bijection; i think multiplying by 2 and then taking square root gives either the floor of u+v or 1 more than it - i don't see a way to get either directly so there needs to be a postcheck for which one is right 15:46:56 04:50:50 And how do we derive u and v from u+v? 15:46:56 04:51:15 well we start with n = triang(u+v)+u 15:46:56 04:51:25 Yep. 15:46:56 04:51:30 so once we have u+v, u = n-triang(u+v) 15:46:57 04:51:40 Oh. 15:46:58 04:51:40 and then v = (u+v)-u 15:47:04 just a matter of coding this up 15:47:10 now the question is, how do we do the post-check accurately? 15:47:17 By hand! 15:47:59 what, for every single program :) 15:48:05 oh, I know 15:48:07 it is easy to check 15:48:10 x^2 == right 15:48:12 (x+1)^2 == right 15:48:18 but this is wrong 15:48:25 because x^2 won't be precisely the answer we need, will it 15:48:31 like, we can't check that way 15:48:34 we really need oerjan to help us here 15:49:02 Wait, so f(u, v) = (u+v)(u+v+1)/2+u? 15:49:54 triang(u+v)+u where triang n = n*(n+1)`div`2 15:50:03 Yes. 15:50:14 so ((u+v)*(u+v+1) `div` 2) + u 15:50:19 so (((u+v)*(u+v+1)) `div` 2) + u 15:50:26 We /will/ use precise parenthesisation! 15:50:37 "plus or minus any off-by-one errors"; says oerjan 15:51:30 How can the numbers get so big for simple programs?! Every number maps to a valid program! 15:51:42 loops 15:51:48 [0,1,3,6,10,15,21,28,36,45,55] 15:51:49 [2,4,7,11,16,22,29,37,46,56,67] 15:51:49 [5,8,12,17,23,30,38,47,57,68,80] 15:51:49 [9,13,18,24,31,39,48,58,69,81,94] 15:51:49 [14,19,25,32,40,49,59,70,82,95,109] 15:51:50 [20,26,33,41,50,60,71,83,96,110,125] 15:51:51 [27,34,42,51,61,72,84,97,111,126,142] 15:51:53 [35,43,52,62,73,85,98,112,127,143,160] 15:51:55 [44,53,63,74,86,99,113,128,144,161,179] 15:51:57 [54,64,75,87,100,114,129,145,162,180,199] 15:51:59 [65,76,88,101,115,130,146,163,181,200,220] 15:52:00 Yes... 15:52:01 here horizontal = increase second argument 15:52:03 vertical = increase first argument 15:52:05 that's the triangular 15:52:09 which exhibits quite good growth I think 15:52:12 I will plug it into my program 15:52:15 without fixing the other way around 15:53:10 *Main> crush (fst (parse ",[.,]")) 15:53:11 312012695 15:53:12 much better 15:53:26 Reversibility! 15:53:30 *Main> crush (fst (parse "[[[[[]]]]]")) 15:53:30 213154541901809831953 15:53:35 Phantom_Hoover: It can't be reversed /yet/. 15:53:42 I need to ask oerjan about the sqrt stuff first. 15:53:45 But wow, those are good results! 15:53:51 Wait. 15:54:27 UNFORTUNATELY 15:54:30 hello world is still huge 15:54:34 [3,1,1,1,1,1,1,1,1,1,5354164073076684878196228396564020578803679189102849778525663731938902525444515224420427138133134637920836890782453088665839948145820092076713415549434307727405966835227032540083505526997209611299464854680212856949448028235011323804396384569956482164446390459797750748251474085517169113816957984439650500125963237364050624907522513416960323815412898338127406868607518044494986367473299784801918842103825814040773826020133025992246889415795 15:54:35 35777677808436141814,2,5,3,1,1,1,1,1,1,1,89693062033816922605205825944,2,1,5,1,1,1,1,1,1,1,5,5,1,1,1,5,3,3,3,1,1,1,1,1,1,1,1,89693062033816922605205825944,2,5,3,3,3,1,1,1,1,1,1,1,1,1,1,14333536460712558084283567410257460820133224763596344172314303799578193610093108205094456521650228199838472126415141884581995334932340129379148477559707459959545576999778527755763656033545930008690570401539469908519542923093293866773152151477794528497181690063188383395045995 15:54:35 1557447373818212334868702619287904919346690680502733198242627295679574194061355035703752923594385067469018029706561653941015792877680406733587246784406411632470943569135223195170725555329691921703375500895996752850629092483314008449940432238690371512189308188659696451544516606747397349661314807321205718172628988242893865139529255491147596410168400964451760816675236538504914109773983094253795888709666794010571089587049752395012003064486642816360910937797056 15:54:41 693740451617167478378383875365441979920592376562008886469597656791896708701802207527665390314320715361945598862239045424492744590207542409271756177422324294118894451516811455159755859,2,0,0,0,5,2,2,2,2,5,1,1,1,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,3,3,1,5] 15:54:44 and that's just the list 15:54:47 we need to crush it after that 15:54:51 :O 15:54:58 SO I PROPOSE that one, or both, of these things are true: 15:55:10 (1) Our list-crushing is crappy, and could be made better. 15:55:17 Unlikely. 15:55:21 (b) Our representing-loops-as-crushed-lists-at-the-start is crappy, and could be made better. 15:55:28 Yes, 1 and b. 15:55:33 I think (b) is more likely than (1). 15:55:48 Phantom_Hoover: I dunno man 15:55:50 But then we need to imply an encoding in the list... 15:55:52 crush (x:xs) = biTo (x, crush xs) + 1 15:55:52 3 15:55:53 er 15:55:55 drop that 3 15:55:58 I think maybe cons-cell is wrong here 15:56:02 Maybe we could get it more efficient 15:56:05 One issue is 15:56:08 the +1s add up 15:56:12 the crush xs in the second biTo 15:56:14 is +1+1+1+1 a lot 15:56:17 depending on nesting 15:56:20 How can the numbers get so big for simple programs?! Every number maps to a valid program! <-- a) lots of possible programs b) define "simple" c) maybe some complex programs have a really simple number? 15:56:20 Phantom_Hoover: that's the issue :( 15:56:30 (c) is very false 15:56:30 and yes loops 15:56:32 trivially can be checked 15:56:47 alise, well, depends on how you define complex. 15:57:02 Non-retardedly. 15:57:03 in number of bytes? in terms of loops? 15:57:06 alise, true 15:57:53 alise, a nice bijection would be if you ended up with unpredictable number. 15:57:54 alise: What about the idea you had before crushing loops? 15:58:06 crush [-5] == crush 2; interesting to see the behaviour for (not-meant-to-work) negative arguments. 15:58:07 not sure how feasible it is 15:58:21 Phantom_Hoover: You mean put a nop instruction to signify []? 15:58:28 Yes, that would mean that all loops are additions, rather than crazies. 15:58:32 ][, actually, but yeah. 15:58:34 The translation would be harder, though :-) 15:58:36 Yeah, ][. 15:58:45 [] would be nop+N 15:58:50 [][] would be nop+N, nop, nop+N 15:59:18 * alise loads bifroexp.hs, and experiments 15:59:59 Phantom_Hoover: Of course this means I need my own nested list structure, bleh. 16:00:00 But okay. 16:00:19 Just keep adding 6? 16:00:29 Oh wait I do not require that 16:00:30 I am happy now 16:00:36 Happy like a bee 16:00:50 Wait, what does ++++++ correspond to? 16:01:05 If noop is an instruction, it ruins the bijection. 16:01:11 sup 16:01:12 ugh; you are correct. 16:01:22 Unless it is kept only inside loops. 16:01:24 Phantom_Hoover: we could map it to +++X+++, because X is technically a "valid" bf instruction 16:01:26 (but that is cheating) 16:01:29 I think that's possible. 16:01:34 and it would always be just after a loop, or just at the start/end of a loop 16:01:36 like [x]nop 16:01:37 or [nop] 16:01:44 or even [nop]nop[nop] 16:01:47 for [][] 16:01:50 Make the instruction set only include nop when we're in a loop? 16:01:54 whats the point in turning programs into numbers? 16:02:18 fax: If you need to ask the point, you haven't gotten it. 16:02:27 There *is* no point. 16:02:28 Phantom_Hoover: go listen to jazz 16:02:29 We have nops outside of loops 16:02:34 [] -> nop 16:02:37 aha 16:02:38 !! 16:02:39 no wait 16:02:40 [] -> nop+N 16:02:47 -!- Tritonio_GR has quit (Read error: Connection reset by peer). 16:02:49 [][] -> nop+N, nop, nop+N 16:02:50 N being the nesting? 16:02:54 [x][y] -> x+N, nop, y+N 16:02:57 yeah 16:03:14 And nop+N, nop+N? 16:03:45 [nopnop] 16:03:51 which is, basically, the issue. 16:03:56 nop+N, nop+N = [] 16:04:08 we /could/ have tons of restrictions, but writing the bijection would be /very hard/ 16:06:10 nop+N, nop+N = [][]? 16:06:27 Ugh, this is horrible. 16:06:30 no 16:06:33 nop+N, nop+N = [] 16:06:36 nop+N, nop, nop+N = [][] 16:06:41 it is 16:08:16 How about changing the instruction set once we're in a loop, so that it's '-'..'.' in the base level and '-'..'.'+nop once N is greater than 0, then changing the increment of N accordingly. 16:08:22 It's ugly, admittedly. 16:09:06 because 16:09:09 like I have told you a million times 16:09:11 nop is valid outside 16:09:16 [x][y] = x+N, nop, y+N 16:09:23 Why does it have to be? 16:09:24 nop also works as an adjacent loop separator 16:09:31 because [x][y] = x+N, y+N = [xy] 16:09:33 does not work 16:09:37 That's what it always was. 16:09:50 then how the fuck do you encode [x][y] and [xy] differently what's why introduced nop in the first place 16:09:51 duh 16:09:53 hi 16:10:00 that's the whole issue 16:10:14 But make [x][y] x+N, nop+N, y! 16:10:21 s/y/y+N/ 16:10:24 what?! 16:10:28 that makes no sense whatsoever! 16:10:28 Ugh. 16:10:31 like, at all 16:10:35 I suck at explaining... 16:10:36 it's semantic junk 16:10:57 I'll try to explain it to myself, first. 16:10:59 i mean i get it 16:11:04 i just think it's a really silly idea 16:11:06 and doesn't help at all 16:11:11 because allowing nop in a loop anywhere 16:11:25 then nop+N,nop+N,nop+N = [] or [][] 16:12:46 alise be my friend 16:12:51 ok 16:13:19 hey oerjan log-reading 16:13:21 istriangular:=proc(n) local t1; t1:=floor(sqrt(2*n)); if n = t1*(t1+1)/2 then RETURN(true) else RETURN(false); fi; end; (N. J. A. Sloane, May 25 2008) 16:13:25 we need a bijectin to all nats yo 16:13:29 *bijection 16:13:30 s/ $// 16:13:32 or does the +u fix that 16:13:36 or w/e 16:13:50 -!- augur has quit (Remote host closed the connection). 16:14:56 T(n) = nC2 16:15:29 http://upload.wikimedia.org/wikipedia/commons/f/f6/Pascal%27s_triangle_5.svg 16:15:30 coo. 16:15:45 so T(u+v)+u = (u+v)C2 + u :P. 16:16:39 do you know an efficient way to invert that 16:16:42 (I don't) 16:16:52 http://upload.wikimedia.org/math/f/d/8/fd8253a78f5f19c216b74278cd847bfc.png 16:17:01 04:50:22 Phantom_Hoover: back to the bijection; i think multiplying by 2 and then taking square root gives either the floor of u+v or 1 more than it - i don't see a way to get either directly so there needs to be a postcheck for which one is right 16:17:01 04:50:50 And how do we derive u and v from u+v? 16:17:01 04:51:15 well we start with n = triang(u+v)+u 16:17:01 04:51:25 Yep. 16:17:02 04:51:30 so once we have u+v, u = n-triang(u+v) 16:17:02 that n^_k_ is from finite calucus 16:17:03 04:51:40 Oh. 16:17:07 04:51:40 and then v = (u+v)-u 16:17:11 requires square root; so computing it requires checking the root is right and stuff 16:17:19 but, it's pretty computable 16:17:24 what about isqrt 16:17:30 I think oerjan planned on that 16:17:31 not sure though 16:17:38 04:52:20 Any progress on the sqrt? 16:17:38 04:52:35 that haskell link should work fine enough? 16:17:39 04:52:53 (i was wrong about that recursion being a problem btw) 16:17:39 04:53:31 http://www.haskell.org/haskellwiki/Generic_number_type#squareRoot 16:17:42 it's a matter of checking; 16:17:51 is this floor(sqrt(x)) or sqrt(x)+1 16:17:57 we need an algorithm to precisely do that 16:19:25 alise: http://www.reddit.com/r/programming/comments/bzfwz/fellow_programmers_even_if_your_vision_is_solid/ 16:20:24 lol 16:20:32 i have like 20/300000000000000000000000000000004 :| 16:20:36 8) 16:20:58 -!- augur has joined. 16:21:15 hi augur 8D 16:22:21 augur 8D; that's some versioning scheme 16:22:40 oh a good day augur can exceed 8D 16:22:46 on* 16:22:47 fax: anyway admire oerjan's lovely inversion 16:22:58 me too, i jut want to invert oerjan all day 16:23:01 it's totally elegant if you have an accurate floor(sqrt(x)) :P 16:23:03 O_O 16:23:12 okay :P 16:23:23 alise - the bijection that uses unique factorization is much more clever though 16:24:50 no wait 16:24:52 of course it is quite useless computationally because 2^k grows so fast 16:24:53 i think multiplying by 2 and then taking square root gives either the floor of u+v or 1 more than it - i don't see a way to get either directly so there needs to be a postcheck for which one is right 16:24:59 so how do we know whether it's u+v is the question 16:25:47 OK, have you solved the noop problem? 16:25:58 -!- augur has quit (Ping timeout: 264 seconds). 16:27:40 Phantom_Hoover: no. 16:28:33 BtW, I don't like the name noop. 16:28:37 It doesn't noop. 16:28:54 It separates lists, or is the empty list. 16:29:02 s/list/loop/ 16:29:14 but it does nothing :P 16:29:53 []? Of course it does something! 16:30:08 so what's the story 16:30:43 Incidentally, how often is the phrase "You need a (life|girlfriend)" uttered here? 16:33:56 not often, because nobody here has one 16:33:59 [] does something 16:34:00 +[] hangs 16:34:05 but nopt itself 16:34:06 doesn't 16:34:07 *nop itself 16:34:12 it's the loop "around" it that does 16:34:23 It's not an instruction. It's just a syntactic marker. 16:34:54 * alise uploads a pdf explaining our triangular dilemma 16:34:57 http://filebin.ca/ogtqw/bij.pdf 16:34:57 Why can't we have [][] as nop, nop? 16:35:07 Phantom_Hoover: what's [x][y] 16:35:11 hmm 16:35:19 I guess we could encode that as [x][][y] because it's equiv 16:35:20 but that's not 1:1. 16:35:25 anyway, read the pdf guyz. 16:35:33 x+N, nop+N, y+N? 16:36:12 that's [x][][y] 16:36:16 you fail at bijecting 16:36:17 try again 16:36:20 Umm... 16:36:22 because [x][][y] is a valid program too 16:36:29 and it's not the same~ (semantically yes, but syntactically no) 16:36:37 Phantom_Hoover: wait, no 16:36:40 that's [x[]y] 16:36:42 Wait, why can't nop mean different things? 16:36:43 because you said nop = [] 16:36:53 Based on context? 16:36:58 because you have to KNOW WHAT IT MEANS IN EACH CONTEXT; and be able to CONTROL which meaning it has at any time 16:37:05 because we have to /do all programs/, even equivalent ones, separately. 16:37:50 im listening to hungry eyes 16:38:31 How about one for ][ and one for []? 16:38:47 let's think about the more interesting bijection! :P 16:38:51 and less frustrating 16:38:55 http://filebin.ca/ogtqw/bij.pdf 16:39:02 I saw it! 16:39:11 alise: If you didn't get the triangular one in functions correctly yet, here's one version courtesy of computers; it's a bit unsimplified, but you can rectify that: http://pastebin.com/8zH1iNS9 16:39:27 fizzie: Oh, so it figured out which will work? 16:39:40 (Mathematica does the table in a bit mirrored way, but other than that it seems to be working.) 16:39:40 √ 16:39:40 √ 16:39:40 Either ⌊ 2n ⌋ = u + v or ⌊ 2n − 1⌋ = u + v. So to implement ι(n), we need an accurate 16:39:40 algorithm to decide which to use, and calculate it, given only integers, rationals (without sqrt, I 16:39:40 think), and a pre-implemented sqrt for floating-point numbers. 16:39:43 urgh 16:39:46 either floor(sqrt(2n)) = u+v 16:39:49 or floor(sqrt(2n)-1) = u+v 16:40:06 fizzie: oh, you did not work out the inverse. 16:40:17 or, wait 16:40:19 is d the inverse? 16:40:23 alise: How so? u[x] and v[x] give the inverse for x = f[u, v]. 16:40:28 omg, it worked it out! 16:40:32 fizzie: I love you. 16:40:58 d[x] gives the index for how many'th diagonal x is from; that's what I asked it to Solve[] for me. u[x] and v[x] were written manually based on d[x]; those are simple when that is known. 16:41:02 d is crazy 16:41:05 ⌊ 2n − 1⌋ 16:41:07 I like these brackets 16:41:11 so floor(sqrt(2n)) is not even close! 16:41:16 OK, so now we have the sane bijection we can work on the BF<->tuple of natural 16:41:21 fizzie: Wait wait 16:41:25 Ugh, didn't mean to press enter. 16:41:26 Does that work with integer sqrt? 16:41:31 i.e. normal integer sqrt 16:41:43 alise: Yes, I think so. I tried it with another Floor[] around the Sqrt[] itself. 16:42:00 and it gave the same results? 16:42:24 Yes, unless I screw up something. 16:42:29 In[7]:= d[x_] := Floor[(Floor[Sqrt[8*x+1]]-1)/2] 16:42:29 In[8]:= {u[#], v[#]}& /@ {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} 16:42:29 Out[8]= {{0, 0}, {1, 0}, {0, 1}, {2, 0}, {1, 1}, {0, 2}, {3, 0}, {2, 1}, 16:42:29 16:42:29 > {1, 2}, {0, 3}, {4, 0}, {3, 1}, {2, 2}, {1, 3}, {0, 4}, {5, 0}} 16:42:34 lol mathematica 16:42:55 from(n) = (u, v) 16:42:57 where m = (floor(sqrt(8*x+1)) - 1) `div` 2 16:42:57 u = m - (n - to(n, 0)) 16:42:57 v = n - to(m, 0) 16:43:04 fax: Hey, mathematica worked out d for him. 16:43:06 So it's coo in my book. 16:43:24 to(m, 0) also in u. 16:43:48 # 16:43:49 u[x_] := d[x] - (x-f[d[x], 0]) 16:43:52 To I, beg differ. 16:43:58 d[x] is m, isn't it? 16:44:02 Oh, right. 16:44:02 Sorry. 16:44:48 will Double work better for the sqrts? 16:44:50 more predictable... 16:45:59 hello 16:46:01 what should I do 16:46:10 dance 16:46:17 \o\ \o/ /o/ 16:46:18 | | | 16:46:18 /`\ /< /< 16:46:24 WOW!!!!!! 16:46:38 \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ \o/ 16:46:48 myndzi 16:46:50 do it 16:47:01 `fungot style 16:47:01 fax: indeed. the ability to hack stuff like " fnord setup -l compiler" should work. 16:47:02 You're not a good enough dancer; it won't do it for you 16:47:03 fizzie: hey you broke ified it 16:47:08 No output. 16:47:11 biFro :: Integer -> (Integer,Integer) 16:47:13 biFro n = (m - (n - biTo (m,0)), n - biTo (m,0)) 16:47:13 where m = (floor (sqrt (8 * fromInteger n + 1) :: Double) - 1) `div` 2 16:47:14 NO WORKY. 16:47:19 For one, 16:47:20 *Main> biFro 1 16:47:21 (2,-1) 16:47:58 floor (sqrt (8*1+1)) = 3; 16:48:00 -1 = 2; 16:48:04 `div` 2 = 1; 16:48:06 No output. 16:48:12 then we get ridiculous things involving 1 - 16:48:20 fizzie: I bet floor around the sqrt doesn't really work. 16:48:39 alise: It does work. I assume your biTo isn't exactly my f[u, v] there. 16:48:50 biTo :: (Integer, Integer) -> Integer 16:48:51 biTo (u,v) = triang (u+v) + u 16:48:51 where triang n = n * (n+1) `div` 2 16:48:57 Or is it. 16:49:02 You have +v 16:49:03 silly wabbit 16:49:09 make it +u and ask mathematica again? 16:49:23 When I am in charge spammers will be hunted and slowly tortured. 16:49:28 Why don't you just make it +v there? I'm making food right now. :p 16:49:49 Alternatively, swap u/v; it shouldn't affect u+v, after all. 16:50:05 That is, ask for biTo(0, m) there. 16:50:08 (In biFro.) 16:50:19 Anyway, I *think* I've got a coding that doesn't increase exponentially. 16:50:39 fizzie: >_> 16:50:43 fizzie: Set up a mathematica bot, dammit. 16:50:51 WolframAlpha 16:51:09 hello 16:51:24 alise: I can type it into Mathematica if you tell me what to type :-P 16:51:39 Wolfram Alpha fails at life 16:51:43 Um I think we need to be solving like a function 16:52:01 -!- nooga has quit (Ping timeout: 264 seconds). 16:52:51 Yay, it works now. 16:53:41 $ echo ',[.,]' | ./bifroexp encode | ./bifroexp decode 16:53:41 [[][++]+-]< 16:53:48 Interesting! Interesting but incorrect! 16:54:04 what'sup 16:54:05 What encoding are you using? 16:54:05 Deewiant: Solve[f[((u+v) * (u+v+1))/2 + u] = u+v, f] or something, I guess. 16:54:07 er 16:54:10 Deewiant: Solve[f[((u+v) * (u+v+1))/2 + u] == u+v, f] or something, I guess. 16:54:13 hey alise you're doing it wrong 16:54:27 type Bijection a b = (a -> b, b -> a) 16:54:37 fax: yeah yeah shut up. 16:54:40 :P 16:54:48 alise: There's an infinite number of solutions to that, you can't solve for a function :-P 16:54:49 :/ 16:55:04 Deewiant: Solve[x == u+v, x] or something, I guess. 16:55:08 fax: that just makse the code more cluttered 16:55:08 *makes 16:55:10 in my case 16:55:15 alise: Solution: x = u+v 16:55:19 Er yes :P 16:55:21 alise: How are you encoding the program into tuples of naturals? 16:55:26 Deewiant: I am sure it can solve functions. 16:55:27 The old method? 16:55:31 alise you don'tknow anything about code clutter 16:55:32 Phantom_Hoover: yes 16:55:42 fax: see, this is why i don't like you ^ 16:55:53 alise: Fine, I humoured you: it gives "{{}}" i.e. there are infinite solutions. 16:55:56 alise - I was trying to thelp you and you just tell me shut up 16:55:58 alise: As expected. 16:56:03 Deewiant: MEH :P 16:56:08 I know there is some sort of function solver. 16:56:13 -!- augur has joined. 16:56:14 -!- augur has quit (Remote host closed the connection). 16:56:19 Well, http://reference.wolfram.com/mathematica/ref/RSolve.html... 16:56:32 f[((u+v) * (u+v+1))/2 + u] - (u+v) == 0 16:56:33 :-) 16:56:33 -!- augur has joined. 16:56:44 why is everyone such a dick 16:56:50 because 16:56:56 "" "that doesn't help in this case" 16:57:02 "you don't know anything about !" 16:57:13 that doesn't help in this case??? 16:57:35 hey fax 16:57:38 hi 16:58:01 Deewiant: Fine then, 16:58:07 -!- lereah_ has quit (Quit: Leaving). 16:58:14 f[u_,v_] := ((u+v) * (u+v+1))/2 + u; 16:58:20 InverseFunction[f] 16:58:20 why do I even come here everyone hates me or ignores me 16:58:32 alise: f^(-1) 16:58:36 fax: God dammit shut the fuck up; you were a jerk to me. Simple as. 16:58:57 grr, inversefunction only works on 1-adic functions 16:59:07 * InverseFunction is generated by Solve when the option InverseFunctions is set to Automatic or True. 16:59:10 you think you are so smart because you didn't grow up around people of the same age that were smarter than you 17:00:10 dear fax; you are batshit insane, insult people when they reject your useless advice, deny irc lines that clearly did happen, whine when people talk to you, ignore people then whine when people ignore you, and insult people's intelligence just because they did some random thing that annoys you. 17:00:15 just stop it. FFS. 17:01:12 sorry but I have written highly non-trivial haskell programs and I have been programing for years. I think if you took my advice you could learn something. Is that arrogant? To think I have actually learned something from years of experience? 17:01:45 So one day you claim "Haskell sucks it is too hard I don't know how to structure programs properly in it" 17:01:51 the next is "I AM EXPERT HASKELL PROGRAMMER". 17:01:57 Anyway, of course I have used that bijection structure before. 17:02:06 biTo :: (Integer, Integer) -> Integer 17:02:07 biTo (u,v) = triang (u+v) + u 17:02:07 where triang n = n * (n+1) `div` 2 17:02:07 biFro :: Integer -> (Integer,Integer) 17:02:07 biFro n = (m - (n - biTo (0, m)), n - biTo (0, m)) 17:02:08 where m = floor (((sqrt (8 * fromInteger n + 1) - 1) / 2) :: Double) 17:02:09 How the ROYAL FUCK does it help here? 17:02:14 It would just be (to, fro) 17:02:17 because from references to, anyway 17:02:18 are you aware that it is an open research problem I was talking about when I said I didn't know how to structure that program? 17:02:19 so it needs to be bound 17:02:25 not that one 17:02:28 you said it about a general case 17:02:28 fax: We're working on the *algorithm*, not the code? 17:02:53 oh suddenly I exist, isn't that convenient 17:03:07 Oh, for heaven's sake. 17:03:10 lets just stop arguing about this 17:03:13 I think we're getting pretty solid evidence that fax is actually mentally ill here. 17:03:29 alise: Not really helping. 17:03:36 I never help :) 17:04:11 fax: Considering my program has only one bijection in it, and one half of the bijection references the other, it would have to look like 17:04:18 bij = (to, ...) 17:04:20 where to = ... 17:04:32 Since in fact they both have extra bound definitions, the things they use would be tangled together 17:04:34 the whole thing would be uglier 17:04:35 harder to call 17:04:37 and for no reason whatsoever. 17:04:40 That is all. 17:04:55 alise: okay alise if you think you are doing the right thing by all means - don't let me get in the way. You don't have to be nasty about it thoug, I was trying to be constructive 17:05:05 I wasn't nasty! 17:05:11 alise is always nasty 17:05:15 type Bijection a b = (a -> b, b -> a) fax: that just makse the code more cluttered 17:05:35 Yes, I said "yeah yeah shut up :P" before it, which was quite clearly in jest (I thought you were mentioning the fact that 17:05:40 I used that structure once before and you inquired as to its point.) 17:06:05 Deewiant: Not always. 17:06:18 Close enough 17:06:29 -!- MizardX- has joined. 17:07:09 Well, fuck you too :) 17:07:18 come on 17:07:35 Hey, you've admitted in the past :-P 17:07:39 +it 17:08:08 -!- MizardX has quit (Ping timeout: 240 seconds). 17:08:18 Oh, for heaven's sake! 17:08:27 -!- MizardX- has changed nick to MizardX. 17:08:34 Deewiant: I'm an asshole, in general; but not nasty, in almost-all specific cases. 17:08:40 I'm just nasty often. 17:08:42 Meh, semantics 17:08:54 I don't really care though, fax has done his fair share of nastiness to me yesterday and today, so 17:09:12 We still need a) a saner bijection and b) a coding that doesn't go mad on loops. 17:09:18 alise, in retaliation 17:09:22 We have that bijection, Phantom_Hoover. 17:09:24 fax: no. 17:09:30 alise: Oh/ 17:09:41 I must have missed it in between the flame war. 17:10:12 Yep, just implemented it now. 17:10:15 Just change +u to +v. 17:10:27 But they're equivalent! 17:10:27 I just want everyone to be nice to me 17:10:36 unconditionally 17:10:46 $ echo ',[.,]' | ./bifro encode | ./bifro decode 17:10:47 ,[.,] 17:10:52 fax: See, that is the problem. 17:11:00 You cannot be nasty to someone else then expect them to be lovely to you. 17:11:04 People are not Jesus. 17:11:10 I wasn't being nasty to anyone 17:11:14 alise: How does it deal with, say, '[[[]]]'? 17:11:23 I beg to differ, so I'm not even going to bother responding any more. 17:11:27 Phantom_Hoover: 85492 17:11:29 It gives 2^70 with the old bijection. 17:11:37 *Much* better. 17:11:44 I've got a better bijection than you guys 17:11:46 ,[.[-],]? 17:11:57 $ echo ',[,[-[++]].]-[[[++]+]+]' | ./bifro encode 17:11:57 56046302675444742920145996600032729174513643271562716998685181 17:12:09 it still croaks on hello world iirc 17:12:12 not sure 17:12:23 program n = (filter balanced . generate $ ",.+-<>[]") !! n 17:12:24 Can I have the bijection code? 17:12:28 the inverse is trivial 17:12:35 just a lookup table 17:12:37 fax: *VALID* 17:12:42 yeah hello world hangs it for no reason 17:12:42 durppp 17:12:49 learn to read code 17:12:57 fax: doesn't work 17:13:00 yes it does 17:13:04 my word against yours 17:13:07 no, because you might end up with 17:13:10 [-] 17:13:13 that's valid 17:13:15 [...every program...] 17:13:19 [[-]...] 17:13:22 [[...etc...]...] 17:13:22 and never get to 17:13:27 +[...]-[.[etc]] 17:13:30 wrong it generates every program in finite time 17:13:37 generate is just n-ary counting 17:13:40 fax is right, I think. 17:13:41 that's nice; anyway btw you're being a jerk now 17:13:46 16:13 < alise> that's nice; anyway btw you're being a jerk now 17:13:55 ^ just admitted that he god pwnd 17:14:03 Count up in base 8, then discard the invalid ones. 17:14:05 no, I just don't think it is nearly a good a bijection 17:14:09 Yes. 17:14:11 I agree. 17:14:15 *as good 17:14:23 alise: YOU ARE THE ONE BEING A JERK 17:14:26 anyway, fax is talking right now solely for the purpose of trying to annoy me right now, so 17:14:28 It works, but it's as elegant as a pig with wheels. 17:14:32 time to figure out how you ignore in xchat. 17:14:40 there we go 17:14:50 Phantom_Hoover: hello world still hangs it 17:15:06 * alise considers running dbfi through it! 17:15:11 You are the kind of low tier human that has to tell other people what they are so that you believe it yourself 17:15:14 BAD IDEA NO 17:15:23 Phantom_Hoover: So, what is your nested encoding? 17:15:24 you are calling me a jerk over and over because you don't want to admit that you are the one being horrible 17:15:37 alise: It doesn't work. 17:15:44 thought so :P 17:15:53 Some programs are representable by two sequences. 17:16:10 * alise logreads to find out what fax's response to his ignoring her was; decides not to logread for such purposes any more 17:16:24 Now on to things that aren't about crazy people. 17:16:29 Phantom_Hoover: yeah 17:16:31 that's the basic issue 17:16:32 You guys are stupid, I can't beleive you've spent 2 days on this and I wrote it in one line of code 17:16:43 fax: Inelegantly. 17:17:00 and the only way you can justify your termoil and excessive fail is by pretending it's not elegant 17:17:00 * Phantom_Hoover shouldn't feed the troll... 17:17:03 Your one line includes two undefined identifiers 17:17:12 Phantom_Hoover: Fuck you. You're a fucking wanke 17:17:18 Phantom_Hoover: what the fuck would you know 17:17:22 And presumably runs a fair bit slower than the one the others've got 17:17:40 Phantom_Hoover: I hope you have a heart attack, fuck you 17:18:22 fucking pathetic simple minded idiots 17:18:33 alise: So, better encoding now? 17:18:35 alise calls me a jerk and ignores me, therefore I must be a troll 17:18:43 Ahahaha. 17:18:57 seriously this is like reddit 17:19:01 this channel 17:20:30 * Phantom_Hoover pokes head above battlements 17:21:08 Hmm. LostKng has 20963 loops... 17:21:30 Forget it. 17:21:41 It's probably somewhere in the region of xkcd. 17:22:55 Ilari: How far does it nest? 17:24:17 pikhq: Too far 17:24:21 Especially considering it was compiled 17:25:03 From what? 17:25:19 Just some hacked-together decision tree compiler? 17:26:37 BFBASIC 17:27:19 Have you tried just leaving HW to encode for a few hours? 17:27:22 hmm... now /I/ feel an urge to write a BASIC->BF compiler 17:27:43 Phantom_Hoover: No; considering that the translation just ends up being simple recursion plus a lot of lot of arithmetic, it is almost certainly memory allocation it hangs on. 17:27:49 By which token, it's either very, VERY big, or too big. 17:28:09 It's loops that do it. 17:28:27 I don't know why everyone is so nasty 17:28:40 I wonder what the state-of-the-art is in constant string -> BF to generate it. 17:28:44 Did you post the triangular bijection functions? 17:28:55 Want the code? 17:29:00 Yes. 17:29:01 I know you are struggling alise but I know you are strong enough not to have to take it out on me 17:29:17 And I think HW could be optimised for this by eliminating loops. 17:30:05 Of course. 17:30:07 http://pastie.org/943767.txt?key=qjqgkkxho8wjgybmhdww 17:30:32 I like how we rely on real arithmetic being at least SLIGHTLY accurate. 17:30:39 It's such an... amusingly inaccurate assumption. 17:30:46 Phantom_Hoover: A hacked-together decision tree compiler? Why, that's *my* effort at doing a text adventure game in Brainfuck! 17:31:12 Oh, and I should note: Yes, I wrote it. No, I do not have a game for it. Just the engine. :P 17:31:24 I estimate that with the enumeration I'm trying to figure out, enumeration of LostKng would be around 2^153 000 000 (assuming enumeration of structure encoding is low)... 17:32:28 "I do know that the halting problem is unsolvable in general, but I was not sure whether there did not exist special case exceptions. Like, maybe Matlab might function as a Super Turing machine able to determine the halting of the bf program." 17:32:36 "SECOND EDIT: I have written what I purport to be infinite loop detector. It probably misses some edge cases (or less probably, somehow escapes Mr. Turing's clutches), but seems to work for me as of now. In pseudocode form, here it goes:" 17:32:51 From where? 17:33:27 http://stackoverflow.com/questions/367571/detecting-infinite-loop-in-brainfuck-program 17:33:37 "I have created a truly marvelous program to do this, which this textbox is too narrow to contain." --comment 17:34:06 LAME 17:34:15 that joke is so old it makes me physically sick hearing it 17:35:15 alise: But it's clearly possible sometimes. 17:35:29 Hmmh, ++++++++++[>+++++++>++++] encodes to a 3.2 million digit number. 17:35:44 I estimate between 46 020 000 and 46 030 000 base-10 digits... 17:35:53 A word of advice: Avoid loops. 17:36:04 http://sprunge.us/SYFg 17:36:10 That was some fun code 3 years ago. 17:37:03 Pity I never made it into an actual game. 17:37:15 I wonder what move is... 17:37:28 (oh, yes, if you want the source I can tarball it up) 17:38:03 >>[-]<<[->>+<<] > 4*10^1185 17:38:27 pikhq: hey, you could implement basic with pebble 17:38:33 write the basic primitives as pebble macros 17:38:40 use tcl to read code from stdin, translate to pebble primitives 17:38:40 alise: It would be quite feasible. 17:39:00 PEBBLE is sufficiently high-level to make targetting it not a pain. 17:39:14 Pebble? 17:39:30 Practical Esoteric Brainfuck-Based Language, Eh? 17:39:46 It's a macro language for Brainfuck I wrote a few years back. 17:40:29 Hey, gosub/return is easy with computed gotos, which is easy with the standard method of BF labels. 17:41:00 Yup. 17:41:10 GOSUB x := Put (CURRENT LINE), which we know at compile-time, somewhere global; GOTO x 17:41:16 RETURN := GOTO (GLOBAL PLACE) 17:42:46 ("Line numbers" would just be labels, really, since you'd want to normalise them anyway.) 17:43:35 Gah, I might run out of memory on ++++++++++[>+++++++>++++++++++>] 17:45:46 Can we generalise this? 17:45:59 Generalise what? 17:46:08 This bijection. 17:46:10 the bijection? 17:46:11 yes 17:46:16 consider that for any nested data type 17:46:27 we can assign a constant C_n to all n non-nesters 17:46:40 For all languages in which the syntax is equivalent to a nested list of nats? 17:46:40 then, say the thing has one nester 17:46:43 with only one argument, the nester 17:46:52 represent this as {nested} 17:47:01 this produces an arbitrarily nested list of nats 17:47:04 apply the bijection; Q.E.D. 17:47:19 more than one nester: set the constants such that they are all, say, even 17:47:25 then make one nester have all its subterms odd, and the other even 17:47:28 or something 17:47:44 Lazy K seems like it would lend itself to bijection. 17:47:55 gee, what about jot! wait. 17:48:34 09:38:03 >>[-]<<[->>+<<] > 4*10^1185 17:48:35 wow :) 17:49:32 But you get something much smaller if you don't double the moves. 17:49:53 >10^71, admittedly, but still. 17:50:31 Are all strings of 0 and 1 valid in Jot? 17:50:51 Yay, ++++++++++[>+++++++>++++++++++>] finished 17:50:59 A 733741052-digit number 17:51:10 Save it, quickly! 17:51:22 Nah, I just piped it into wc :-P 17:52:14 Bifro should ideally have the capacity to write the number in base 256 with a string of bytes. 17:52:22 Much more compact. 17:52:36 Your decoder is broken, btw; probably the double-cast 17:52:49 what's the point of putting brainfuck programs in bijection with natural numbers? 17:52:52 Phantom_Hoover: Yes. 17:53:09 "What's the point" is rarely a sensible question on this channel 17:53:09 Every string of 0 and 1 is valid, including the empty string. 17:53:21 fax: Putting Brainfuck programs in a bijection with natural numbers. 17:53:27 pikhq: Then it's trivial. 17:53:35 Phantom_Hoover: Yes. 17:53:56 Just stick a 1 on the start and make it binary. 17:53:57 Jot is intended as a Goedel numbering. :) 17:54:12 Uh, what? 17:54:19 Wait, forget that. 17:54:26 No 1 is needed. 17:54:38 *Just use the freaking number*. 17:54:51 Your decoder is broken, btw; probably the double-cast 17:54:52 what double cast 17:55:06 alise: fromInteger 17:55:10 pikhq: no 17:55:12 consider 0001 17:55:19 Ooh, it is broken. 17:55:20 Deewiant: what would you propose then 17:55:30 :/ 17:55:33 alise: A custom sqrt that works on Integer. 17:55:34 echo ">[-]<[->+<]" | ./bifro encode | ./bifro decode 17:55:41 [[[[[[[[[[[[[[[[[[[[ 17:55:42 Deewiant: Bah, okay. 17:55:48 http://www.haskell.org/haskellwiki/Generic_number_type#squareRoot 17:55:51 Just blasts you with [[[[ 17:55:53 * alise writes it 17:56:25 (^!) :: Num a => a -> Int -> a 17:56:26 (^!) x n = x^n 17:56:28 * alise wonders why 17:56:31 oh, for type specification 17:56:33 (why) 17:56:40 Probably an optimization 17:56:43 right 17:57:27 Is biFro working? The function, not the program. 17:57:41 no 17:57:47 Deewiant: Can I use isqrt? There's a /2. 17:57:52 And I am not sure the result is always divisible by two. 17:58:01 ++++++++++[>+++++++] at least comes out correctly now. 17:58:18 alise: Wasn't it being floored? `div` 2 17:58:24 Ah, true. 17:58:25 alise: Mmm, yes. 17:58:25 alise: i can't beleive you are talking this long to solve a quadratic equation. lol 17:58:29 Deewiant: Now. 17:58:33 Deewiant: gimme a number that didn't work 17:58:49 alise: It works now, I already copied squareRoot into it myself. 17:58:51 Well, that was too optimistic estimate. But I estimate that Lost Kindom encodes to less than 10^(10^8)... 17:58:59 alise: But, e.g. '+++++++'. 17:59:10 *Kingdom 17:59:13 5695183504492614029263277. 17:59:28 Deewiant: Do you think that I should change how loops are encoded? 17:59:29 'K8'@*+'E28'@**+'%2'@f2+**+"I$@"*+"/KHQa"738*+345'@**+*****+**** 17:59:30 I'm just not sure how. 17:59:44 All other efforts have failed 17:59:45 Ilari: Reassuring to know 17:59:53 I think you should if you find a way to ;-) 17:59:54 It's less than a googolple, at least 18:00:15 This program has rekindled my love affair with Haskell. 18:00:21 (Is it a love affair if you don't have any other partners?) 18:00:36 ((This applies in both the programming and otherwise meanings.)) 18:00:54 Bah, Lazy K is trivial. How about Unlambda? 18:00:54 Come back up, pastie! 18:00:56 -!- adam_d has joined. 18:00:57 I need to deliver version 4! 18:00:57 yay 18:00:58 No 3. 18:01:04 Off by one there :D 18:01:16 Version three, guyz: http://pastie.org/943801.txt?key=uwdomh4k9krj16tc9ezw 18:01:19 Update your copies. 18:02:52 ++[+[+[+[+[++++]+]+]+]+]++ generates a 6264 digit number 18:03:19 * alise has an idea 18:03:21 How very short 18:03:25 Instead of 18:03:26 loop xs = crush xs + 6 18:03:27 how about 18:03:32 loop xs = crush (map (+ 6) xs) 18:03:32 ? 18:03:35 And it's 6263, not 6264 18:03:37 would this work, I wonder? 18:03:38 The newline isn't part of it 18:03:43 eh, [] would = [[]] :/ 18:03:50 Deewiant: Oh, I forgot echo -n 18:03:51 alise: That's even worse! 18:04:00 Phantom_Hoover: is it? 18:04:05 wait [] would not = [[]] 18:04:14 crush [] = 0; [0] = 1+biTo(0,0) 18:04:18 alise: That won't help unless you meant echo 'brainfuck' | echo -n $(foo encode) | wc -c 18:04:22 = 1 18:04:26 Surely increasing pre-crush means that the crushed list is much larger? 18:04:26 oh, darn 18:04:27 that doesn't work 18:04:31 Deewiant: that's what i meant 18:04:35 err... 18:04:36 what? 18:04:37 I did 18:04:42 $ echo butt | ./bifro encode 18:04:42 Which actually doesn't work, that's interesting 18:04:46 (actually via terminal but) 18:04:47 copy it 18:04:53 echo, paste, | wc -c 18:05:06 Oh, right, need to wrap the whole thing *duh* 18:05:14 Phantom_Hoover: Hmm... maybe, yeah. 18:05:36 alise: You know you can pipe the output of a program without having to copy-echo-paste :-P 18:05:47 Deewiant: I know, I just forgot the first time. 18:05:49 Wanted to see what it'd look like. 18:05:58 Huh, these numbers often repeat. 18:06:04 Lots and lots of 77s and 777s in that progam's number 18:06:07 Then again, lots of 88s too 18:06:08 And 444s 18:06:13 Maybe they just repeat naturally, or maybe it's just a coincidence. 18:09:31 Is there any limit to the languages this can represent? 18:11:17 -!- Phantom_Hoover_ has joined. 18:11:20 It cannot represent the language of love. 18:11:33 Is the language of love well-defined? 18:11:37 Apart from that, uh, the reals? But we can't construct the reals so it'd be pointless to apply such an algorithm to them. 18:11:50 But anything countable, which is... all programming languages?, yes, has a bijection to the naturals. By definition. 18:12:03 Ah, yes. 18:12:12 But using this system? 18:12:31 Well... I don't know. It would have to be changed in all cases; sometimes minorly, sometimes it might be completely unrecognisable. 18:12:35 So it's hard to answer. 18:12:47 The syntax needs to be representable using nested lists, I think. 18:12:54 Of naturals 18:13:02 With an upper bound. 18:14:07 Yes, the only problem is the multiple nesting case. 18:14:12 But I am sure you can do that as something. 18:14:17 Multiple nesting? 18:14:19 -!- Phantom_Hoover has quit (Ping timeout: 265 seconds). 18:14:29 like instead of just [] {} too 18:14:29 -!- Phantom_Hoover_ has quit (Client Quit). 18:14:42 -!- Phantom_Hoover_ has joined. 18:14:57 Ooh. 18:15:29 If they're properly nested, it shouldn't matter. 18:15:45 So long as {(}) isn't legal. 18:15:55 Yes, but it's just a question of "how do you represent it" because lists only have one type of nesting. 18:15:59 One way would be 18:16:03 say all instructions are even 18:16:09 then one type of loop would increase so that it's even 18:16:12 another would increase so it's odd 18:16:17 then you can identify which, I think 18:16:24 or something 18:16:30 Or you could just encode the information into the list. 18:16:33 i.e., 18:16:47 odd_naturals[crush(looptype1)] + N 18:16:51 even_naturals[crush(looptype2)] + N 18:16:58 (with some munging so that all naturals are covered by this) 18:17:17 repeat with similar spacings for all M types of loop 18:17:19 or, well, nesting in general 18:17:49 Incidentally, have we proven that, taking g(n) to be the triangular cdr, the recurrence relation u_n+1=g(u_n) ends up at 0 for all u_0? 18:18:47 * alise 's brain flags up "LOOKS LIKE COLLATZ BE SCARED" 18:18:50 * alise shuts up stupid heuristics 18:18:53 Triangular cdr? 18:19:02 As in "snd (biFro (n-1))"? 18:19:05 Yes. 18:19:07 Or "snd (biFro n)"? 18:19:22 Assuming the latter, 18:19:27 g(n) = snd(biFro n) 18:20:03 this simplifies to (n - biTo ((isqrt (8*n+1) - 1) `div` 2)) 18:20:04 Whatever, it just needs to be shown that we get a finite list from all n. 18:20:24 ehh, I'll just code it an test it empiraclly 18:20:26 *empirically 18:20:29 that's the best way to prove anything 18:20:37 is this to check that all numbers give a finite program? 18:20:39 yeah 18:21:05 alise: You can't test *all* nats! 18:21:20 I want your computer. 18:21:28 Of course, but I can be reasonably sure of something! 18:21:32 It's the lazy-fucktard's way of proving something. 18:22:02 Well, u_0 = 0 falsifies it. 18:22:14 But we special-case 0 in the recursion, so nyah. 18:22:15 But ignoring /that/, 18:22:22 -- uh, I really should make it stop on 0s 18:22:26 silly me 18:22:39 [1] 18:22:40 [2,1] 18:22:41 [3] 18:22:42 [4,1] 18:22:44 [5,2,1] 18:22:56 *Main> ulist 10000 18:22:57 [10000,130,10] 18:22:57 *Main> ulist 100000 18:22:57 [100000,319,19,4,1] 18:23:08 Ooh, I should use quickcheck! 18:23:19 And smallcheck! And lazy smallcheck! 18:23:33 Why! 18:23:36 Why instead of QuickCheck! 18:23:52 But it's not a *proof*! 18:23:55 I said "and" not "instead of"! 18:24:00 Yes but why! 18:24:04 Because! 18:24:11 Phantom_Hoover_: YOU JUST CAN'T HANDLE EMPIRICAL MATHEMATICS 18:24:14 Deewiant: You do it! 18:24:17 No! 18:24:28 alise: THERE'S NO SUCH THING! 18:24:55 Phantom_Hoover_: Uh, there is actually. 18:24:59 Verifya:P 18:25:01 *:P 18:25:10 Really? 18:25:13 You can get more confidence in a proposition forall n, P(n) by testing P(n) for many n. 18:25:28 lol confidence 18:25:34 *More* confidence, not certainty. 18:25:34 You can't outright *prove* it, but this is why people have computers searching for counterexamples to the Collatz conjecture. 18:25:39 sure is engineering in here 18:25:44 Mathematics isn't /all/ about proofs. 18:26:22 oerjan's proof seemed to use the fact that 1+f(u, v) > u and v. 18:26:50 It's somewhere in today's logs, and it should be adjustable for the triangular function. 18:27:12 Well, this is almost true. 18:27:23 No, wait, it is true. 18:27:25 Q.E.D. 18:27:47 So since 1+f(u,v) > u and v, 18:28:01 f^-1(n-1) < u and v 18:28:11 So, the result always gets smaller. 18:28:22 Since this is the naturals, the only value it can approach if it always gets smaller is 0. 18:28:29 0 always terminates, for it results in []. 18:28:35 Therefore, the function always terminates. Q.E.D. 18:28:42 Good. 18:29:01 Now we just need to write the wiki page. 18:29:06 Er, rather, I mean: 18:29:18 If (u,v) = f^-1(n-1), u and v < n 18:29:23 I think. Anyway, it's true. 18:29:36 Phantom_Hoover_: I'd like to think about making loops better first. And there isn't much to write. 18:29:49 Silly language: BF, but in Bifro syntax. 18:30:05 You can't run non-trivial programs, because they don't fit into the universe. 18:30:18 So it's very theoretically Turing complete only. :P 18:30:29 That still confuses me, BtW. 18:30:29 Unless you produced an interpreter with no, or not many at all, nested brackets... 18:30:33 Why? 18:30:44 How something can be TC but not possible in the universe like that? 18:30:59 alise unignore me 18:31:06 Because mathematics is larger than the universe; that's why we can say "for all" and it means "every natural", not "everything up to 10^80 or so" 18:31:18 No, I get that. 18:31:21 alise 18:35:06 fizzie: ping 18:35:40 Ping pong 18:35:49 Let's play ... NETWORK TABLE TENNIS! 18:35:59 Ping. Pong. Ping. Pong. Pingpongpingpongpingpong connection dropped. 18:42:57 pikhq: ping 18:43:36 Hmm... More random ideas for noop. 18:43:49 orly 18:44:00 I'm not sure if they'll work, though. 18:44:34 Incidentally, does hugeness come mainly from loops? 18:45:02 Yes. 18:45:34 It seems to have frozen on "+++++++++++++++++++++++++++++++" 18:46:10 alise: Pong 18:46:16 It *should* only be quadratic... 18:47:22 pikhq: I realised that my typesetting system can easily be used for literate programming too. 18:47:29 Phantom_Hoover_: Why not evaluate it manually? 18:49:06 pikhq: Some hypothetical usage: http://pastie.org/943852.txt?key=321l5gwchzzohrrzdehmzg 18:49:15 Using the evilly-named commands \, \\, and \\=. 18:56:03 http://www.literateprogramming.com/adventure.pdf ADVENTURE, the literate program. 18:57:00 Penned by Knuth himself. 18:57:10 Tried "++++++++++++++++++". It comes out as a 50085-digit number. 18:57:50 Hmm. 18:57:57 My problem is that I can't see what's in the lower numbers. There must be some *enormous* trivial ones. 18:59:19 Phantom_Hoover_: well it's not quadratic because biTo is nested tons, right? 18:59:27 so there's a ton of /nested/ multiplications 18:59:40 Oh, yeah 19:01:09 I advise everyone to read http://www.literateprogramming.com/adventure.pdf, by the way. 19:01:49 "If I were writing this program, I would allow the word woods, but Don apparently didnt want to." 19:01:54 Damn INTERCALator. 19:02:03 INTERCALator, n. one who uses INTERCAL. 19:03:05 I dislike how it has visible spaces in strings, but eh 19:04:24 mess wd ("fuck"); 19:04:25 new mess ("Watch it!"); 19:05:57 27. The instructions here keep you in the forest with probability 50%, otherwise they take you to the 19:05:57 woods . This gives the illusion that we maintain more state information about you than we really do. 19:07:32 You know, fax's method may have been mathematically inelegant, but at least it would have given sane numbers. 19:08:25 Would it have? I beg to differ. 19:08:36 I think it would enumerate all programs with loops of length N before getting onto a single one with N+1. 19:08:46 No, that's the thing. 19:09:53 If you count up in base 8, using the instructions as the digits, until you reach the program, then discard the invalid programs, the length of what's left is a bijection 19:10:13 Phantom_Hoover_: fuck off troll 19:10:15 It would take ages to compute, though. 19:10:16 "The twisty little passages of this maze are said to be all alike," 19:10:20 Phantom_Hoover_: I know. 19:10:24 I think it would enumerate all programs with loops of length N before getting onto a single one with N+1. 19:10:30 Which would mean the numbers would not be reasonable. 19:10:41 -!- impomatic has joined. 19:10:44 Hi :-) 19:10:45 -!- oerjan has joined. 19:10:57 alise: yeah the numbers relating to the size of the program.. that must be unreasonable 19:11:01 alise: No, it wouldn't. 19:11:38 hi, have you rewritten bi{Fro,To} to use triangular numbers yet? 19:11:42 oerjan: yes 19:11:43 and it works 19:11:48 oerjan: but we need a better loop nester 19:12:02 btw i realized after i logged out that there is a way to do the floor exactly 19:12:06 http://pastie.org/943801.txt?key=uwdomh4k9krj16tc9ezw 19:12:10 where m = (isqrt (8*n+1) - 1) `div` 2 19:12:17 oerjan: we did not use your algorithm 19:12:21 fizzie got a computer to invert it, hooray 19:12:23 biFro n = (m - (n - biTo (m,0)), n - biTo (m,0)) 19:12:24 ok you found that formula too 19:12:24 where m = (isqrt (8*n+1) - 1) `div` 2 19:12:28 this is for 19:12:28 biTo (u,v) = triang (u+v) + v 19:12:29 where triang n = n * (n+1) `div` 2 19:12:29 instead of +u 19:12:32 oerjan: lol 19:12:48 you're sad now :)) 19:12:57 well u,v, is the same thing 19:13:03 I think that the number for a program of length n with fax's method must be less than 8^n, but there may be an off-by-one in that. 19:13:31 alise: why sad? just because you found what i would have suggested? 19:13:43 what algorithm didn't you use? 19:13:55 the one you suggested with the floor of sqrt 2n 19:13:59 right 19:14:09 I dunno, I get sad when my discoveries aren't a prodigal genius one :-) 19:14:11 *ones 19:14:38 yeah i realized that the (x+y)(x-y) rule could be used to make it exact instead, with that 8*n+1 etc. thing 19:14:40 who are you to judge what is mathematically elegant? 19:15:16 anyway i'm not sad. today i forgot a ballpoint pen in my laundry, first time for me afair 19:15:42 so i expected complete disaster, but both the sweater and the pen appear to have survived :) 19:16:03 (it even wrote when i tested) 19:16:46 -!- adam_d has quit (Ping timeout: 245 seconds). 19:19:34 oerjan: this is the kind of thing all mathematicians get happy about, isn't it... 19:19:37 I can just tell from the way you say it :D 19:20:13 i don't know how much other mathematicians forget pens in their laundry, might be an occupational danger... 19:20:37 *hazard, is more idiomatic. 19:20:39 it's just i'm usually careful about it 19:20:41 ah. 19:21:07 what's wrong with the loop nesting? 19:21:25 Nothing, mathematically, 19:21:29 we do "crush xs" which makes a ruddy big number, then later on we crush that /again/ to flatten the whole program 19:21:31 I use pencils 19:21:33 now consider nested loops 19:21:35 It just generates bloody huge numbers. 19:21:37 feel the pain, FEEEEEL the pain 19:22:14 No-one's computed the number for a non-trivial program much longer than cat. 19:22:16 i _did_ think about it a bit when away, on long lists it would tend to blow the final parts up more than the beginning, wouldn't it? 19:22:46 but i didn't think the nesting of loops would be the problem... 19:22:51 also that, yes! 19:22:54 it blows up a lot more with that 19:22:56 maybe it IS that... 19:23:04 i thought of a way around it 19:23:08 Ooh, what? 19:23:17 oerjan: do tell 19:23:30 basically store a list as a tree instead, so tuples spread out more balancedly 19:23:57 this requires some care to make sure we don't miss numbers, i think 19:23:58 *Main Data.List> elemIndex ",[.,]" . filter balanced . kleene . map (:[]) $ "-+<>,.[]" 19:23:59 Just 9316 19:24:05 So... What would the structure for ",[.,]"? 19:24:09 I think my loop conjecture about fax's may be wrong :( 19:24:13 oerjan: hey hey 19:24:16 that was Ilari's idea 19:24:28 alise: oh well i guess :D 19:24:36 STEALING FILTH :p 19:24:37 *:P 19:24:38 I also mentioned this alise did not understand it 19:24:47 except i thought that it is necessary to give each list a _unique_ tree 19:24:59 *Main Data.List> elemIndex ",[.[-],]" . filter balanced . kleene . map (:[]) $ "-+<>,.[]" 19:25:00 [nothing] 19:25:03 This thing is biased against EOF on 0 19:25:14 Conclusion: Not a viable computational algorithm. 19:25:21 Yes. 19:25:33 It's even worse if you try to reverse it. 19:25:37 um what's kleene 19:25:42 v a 0 = [[]] 19:25:42 v a i = [s++t | s <- v a (i-1), t <- a] 19:25:42 kleene a = kleene' a 0 19:25:42 where kleene' a n = v a n ++ kleene' a (n+1) 19:25:44 kleene star 19:25:51 so kleene on that generates all valid and invalid bf progams 19:25:53 *programs 19:25:58 then we filter to get only balanced ones, and look up the prog 19:26:05 fax was yelling at us to use this instead because it's soooo trivial 19:26:12 but it seems it does not like being computed. maybe it'd be better with fusion 19:26:40 It's trivial in terms of the algorithm, but it's even worse than ours in terms of practicality. 19:27:00 that's because you don't know how to implement it efficently 19:27:23 look up stirling numbers if you are serious about this 19:28:18 fax: Your method requires that we enumerate *every* valid program up to x, a huge computation. 19:30:50 take a class on counting 19:31:01 you can do this efficently 19:31:19 OK, briefly describe the algorithm. 19:31:32 Phantom_Hoover_: take back what you said earlier 19:31:43 hey oerjan log-reading <-- hello 19:31:43 What? That it's inelegant? 19:31:50 Phantom_Hoover_: you called me a troll 19:32:00 You *were* trolling. 19:32:09 k bye 19:32:26 Fine. 19:32:52 oerjan: i said something to you :P 19:33:02 Anyone any idea what his magic algorithm is? 19:33:25 "plus or minus any off-by-one errors"; says oerjan 19:33:26 I pity those who have too much pride to admit they are wrong 19:33:44 Phantom_Hoover_: i'd tell you, but you're NASTY 19:33:47 there weren't any in that formula, amazingly 19:33:54 sometimes you've had a reply-latency of a FEW MINUTES! 19:33:59 alise: i noticed. the logs are just huge today. 19:34:02 oerjan: off-by-one errors are, like, the scourge of everything 19:34:06 -!- Gracenotes has joined. 19:34:13 oerjan: Bank holiday in the UK. 19:34:20 I assume. 19:34:21 off by one errors are something you learn to avoid when you are beginner 19:34:35 if you are still stuggling with them it's time to go over he basics again 19:34:56 Now you're insulting the channel op? 19:34:58 statement to nothing? 19:35:04 oh fax 19:35:08 im not insulting anyone 19:35:35 Well, I suppose you'll just accuse us of fabricating what you said two minutes ago. 19:36:24 oerjan: How do you encode the BF program into a tree? 19:36:39 And is it easily flattenable into a natural? 19:37:10 ::= \epsilon | | '[ ']' 19:37:21 ::= '+' | '-' | ... 19:37:36 -!- adam_d has joined. 19:37:56 BNF is a pretty basic technique from computing, dates back to ALGOL 19:38:07 Oh yeah. 19:38:25 fax: i said it might contain off-by-one errors because i didn't bother to check before writing it, i knew that was the essence apart from it. although it was also accidentally completely correct. 19:39:01 fax: i've been mentioning algebraic data types before, for this problem that's about equivalent 19:39:19 afk 19:40:06 anyway i though that if the length of the list is 2^n+1 <= l < 2^n, we use a tree of depth n 19:40:33 with all empty nodes at either the left end or the right one 19:40:38 Basically, how would you treeify "+++"? 19:41:02 however _some_ of the nodes are just tuples, others are variants (haskell Either) 19:41:15 Either tuple variants! 19:41:20 Either tuple Either 19:41:37 as ((Empty,+),(+,+)) but with some care there 19:42:04 lessee... 19:42:27 OK, I must leave for now. I'll look at the logs later. 19:42:35 -!- Phantom_Hoover_ has quit (Quit: Phantom_Hoover_). 19:43:11 data Tree a = Leaf a | Branch (Tree a) (CompleteTree a) 19:43:23 http://thedailywtf.com/Articles/A-Real-TriState.aspx <-- this is to tristate as filenotfound is to boolean 19:43:24 i'm not bothering to incorporate the depth 19:43:28 very wtf 19:44:20 3, 5, ... 19:44:23 or wait, maybe i'll do that with a "dependent n", not legal haskell but more descriptive 19:44:30 clearly, size_of_presumably(n) = odds[n] 19:45:40 -!- adam_d has quit (Ping timeout: 265 seconds). 19:45:56 the thing about the CompleteTree part is that we know the depth from the left part of the branch, so we can just use tuples without variants down to the bottom 19:46:28 actually we need an Empty | in that i think 19:47:16 -!- adam_d has joined. 19:47:41 it is possible that it needs another data type PossiblyEmptyTree a :D 19:48:36 oh wait of course we have the empty list too hm 19:48:46 EmptyTreeWithProbabilityOnePointSeventyFive 19:49:11 data EmptyTreeWithProbabilityOnePointSeventyFive = Empty1 | Empty2 | Empty3 | NotEmpty Tree 19:49:21 (the constructors are hidden and a function uses unsafePerformIO to return one of these randomly) 19:52:05 lessee to get this started 19:52:17 an empty list = 0 19:52:35 *tree, surely. 19:52:35 a single element list [x] = 1+2*x 19:53:39 well tree or list, it's about the number of elements 19:54:22 a larger list/tree than that is 2+2*f(left part, right part) 19:54:44 a single element list [x] = 1+2*x 19:54:50 what about [[x]]? 19:55:03 or do we not have that? 19:55:22 um the inner [x] is using the ordinary 6+crush [x] stuff 19:55:28 since it's a single element 19:55:43 right. 19:55:51 so this is to solve the problem that crush is horrible? 19:55:55 yeah 19:56:00 what is the algorithm for distributing the tree? 19:56:01 or try, at least 19:56:23 well i think the best is simply all elements as far to the left in the tree as possible 19:56:40 (since the opposite is harder to collect in haskell, i think) 19:57:23 isn't this actually bigger than the list encoding 19:57:27 ... we timesify the f 19:57:32 and if we go the left part, then... 19:57:47 um no because we have less depth of nesting of f's 19:57:54 or so i think 19:58:30 really? why? 19:58:45 you said distribute everything to the left. 19:58:56 oh that's not what i meant 19:59:03 the tree is perfectly balanced 19:59:26 it's just that the left over empty parts from 2^n-x should be put at the right end 20:00:16 the thing about is: see the 2+2*f(left part, right part) thing? 20:00:40 if we distribute like this, we know that "left part" is a _complete_ tree with 2^(n-1) leafs 20:01:02 which means we need no variants when encoding it 20:01:14 sure 20:01:22 i vote you write the code and i relax 20:01:25 let me try to show what +++ is, if my brain grasps it 20:04:18 2+2*f(f(+,+),1+2*f(2*(+),0)) 20:04:24 no i'm _not_ sure of that :D 20:04:32 okayyy 20:04:33 :Dd 20:04:35 *:D 20:05:05 the thing is to use variants (Either) splits only where we know there _can_ be a split 20:05:40 and this leads to a number of cases for how a subtree is encoded. 20:07:00 if it's a left branch of something with a nonempty right branch, then we know it is a full tree, like in that f(+,+) part, and we need not bother with possibility of leafs or empty nodes - we already know the depth from the right branch 20:07:31 oerjah, http://i.imgur.com/F0q6m.jpg 20:08:03 you don't say. 20:09:12 now for the right branch of the top, we know that it cannot be an empty tree (since then we'd just need one level less) and so it's 1+ rather than 2+ 20:09:37 it could still be a leaf though, thus the 1+2* to show it's not 20:10:10 (although that subtree contains just 1 leaf, we still make it depth 2 so all branches are the same depth) 20:10:28 now the right branch of the right branch is empty, thus 0 20:11:22 the left branch of the right branch is a leaf, so 2*leaf value (there is no possibility of this being empty, for the same reason as before, so no 1+) 20:11:58 oerjan* 20:12:02 and having looked at the right branch of the whole tree like this, we now know that the tree depth is 2, and can use f(+,+) for the tree's left branch 20:12:46 (as already mentioned) 20:13:03 note that we look at the right branch to find the information about the depth of the left branch 20:14:17 now that /is/ overcomplicated :D 20:14:49 yeah all that complication is to ensure no numbers encode a tree that cannot be gotten from a list 20:15:55 sheesh, ADVENT has really simple code 20:16:04 it doesn't even have proper conditionals, or even code, in the adventure part 20:16:09 btw i also thought of another possible list encoding, but that might be harder to invert 20:16:13 just a huge table of boolean things, and rules for directions/commands at each place 20:16:15 without even code! 20:16:34 basically l -> (length l, encoding of tuple l using _multiple_ binomial coefficients) 20:17:31 iirc (x1,x2,...,xn) -> binom (x1+x2+...+xn, n) + binom(x1+x2+...+x(n-1), n-1) + ... + x1 20:18:04 the generalization of the triangular method to N^n <-> N 20:18:24 oh so this is basically the bijection we have but to ^n? 20:18:29 yeah 20:18:35 I wonder if anyone else has written an N^n <-> N bijection 20:18:38 I didn't find one 20:18:42 sounds like something that could Come In Handy. 20:18:53 however it's going to be harder to invert, probably requires something with nth root 20:19:30 alise: i think we mentioned this one when fax discussed finite integrals at one time 20:19:42 so it's presumably well-known 20:19:46 yeah the C stuff 20:19:46 iirc 20:19:48 as in C() 20:19:49 and T() 20:19:51 there was a lot of that 20:19:54 binom aka C 20:19:58 yeah 20:20:01 of course, I know that :P 20:20:08 but i think the C involved had three arguments? 20:20:09 I guess not 20:20:31 i don't think so 20:22:01 "# (If you hit the bear after feeding it:) The bear is confused; he only wants to be your friend." 20:22:06 --[[Colossal Cave Adventure]] 20:23:22 oh and then there was the fibonacci idea i've mentioned before 20:23:39 for encoding a list 20:24:04 oh? 20:24:04 it requires converting to/from fibonacci base as well as binary though 20:24:35 basically in fibonacci base any number >= 1 starts with 1, then some series of 0,1 with _no_ instance of 11 20:25:38 which means if you concatenate numbers in fibonacci base with 1 intercalated between, you get a bitstring and this process is reversible 20:26:01 ah that 20:26:14 but we need the reversibility to apply to all nats 20:27:00 yes, i'm a bit fishy on what is missed this way 20:27:34 or well, _any_ bitstring starting with 1 can clearly be split up at points where you have 11 20:27:55 or wait 20:28:04 11 at beginning and end may be subtle 20:29:33 and several 11 in a row too 20:30:01 possibly 0 should be the empty string in fibonacci, or does that make things worse... 20:30:58 well, anywhere you get 110 you have a clear split, the first 1 must be the separator 20:31:47 -!- Gracenotes has quit (Quit: Leaving). 20:32:08 one nice thing about this is that loops would only blow up by about log_2 phi 20:32:16 (in bitsize) 20:32:38 well any list element, really 20:32:59 maybe a bit more for small elements 20:34:26 ok you cannot have 0 as empty string, 111 could mean either ,1, or ,0,0, in that case 20:34:47 dear oerjan, 20:34:48 you are crazy 20:34:49 -alise 20:34:52 thank you 20:35:33 oerjan: now finish figuring out the encoding, i'll even implement it :P 20:35:36 now if you have 111110 say, we know that's 111++[10..,...] 20:36:10 a 11 at the end can only be ,1 i think 20:36:33 and so if we have several 11 in a row we can nest them up from the back 20:37:02 little-endian is probably good for this stuff 20:37:29 or wait, big-endian for encoding _into_ fibonacci 20:38:32 11 alone, what does that mean 20:38:51 you cannot get that from concatenating stuff :( 20:39:37 there are some loose ends there :D 20:40:17 -!- adam_d has quit (Ping timeout: 265 seconds). 20:40:34 you cannot get a bitstring starting with 110 in this way either 20:42:04 -!- Phantom_Hoover_ has joined. 20:42:18 OK, so what have you got now? 20:42:34 trying to something with fibonacci base 20:42:41 Fibonacci! 20:42:49 alas it seems to miss some bitstrings 20:42:59 -!- nooga has joined. 20:44:13 i'm working on chaos based music 20:44:23 you cannot get bitstrings starting with an even number of 1's 20:44:35 nooga: ok merzbow 20:44:41 oerjan: well fix that 20:45:54 well it seems that adding 1 toggles between legal and illegal, so we can encode a Bool in addition to the list ;) 20:46:12 *prepending 20:47:45 yes but stop cheating :D 20:49:24 well i can cheat _more_ by merging that Bool with the first list element (2*x-b) 20:49:44 but why 20:50:21 erm to get a bijection with non-empty lists of integers >= 1. at least that may be what we get 20:50:43 then set 0 = [] 20:50:45 easy 20:50:58 ok now i'd like an actual algorithm :D 20:51:20 hm 20:51:32 ok so given a non-empty list of integers >= 1 20:51:51 divide the first one by 2 and take a bool for the remainder 20:52:25 hm lessee 20:52:34 oh integers >= 1 20:52:39 crush [] = 0 20:52:39 so basically 20:52:42 f [] = 0 20:52:48 f xs = g (map (+1) xs) 20:53:06 divide? 20:53:08 as in floor-divide? 20:55:55 crush (x:xs) = fromBinary $ (if b==1 then "1" else "") ++ intercalate "1" [toFibonacci (x+1) | x <- y:xs] where (b,y) = divMod x 2 20:56:07 _maybe_. 20:56:59 maybe using x for two things is a bit bad. 20:57:50 What about the old idea of alternating the bits? 20:57:57 er *(y, b) = divMod x 2 20:58:12 Phantom_Hoover_: what? 20:58:35 oerjan: decode numbers as bits 20:58:40 then ababababab 20:58:41 Then alternate. 20:58:49 Rinse, repeat. 20:59:11 there is no guarantee of numbers being the same length 20:59:18 Pad with 0. 20:59:40 yeah, pad with 0 would work fine 20:59:41 Note that quotRem is faster than divMod 20:59:42 It's just another NxN->N bijection, though. 20:59:43 since it'd turn into 0000x 20:59:48 If that's at all relevant 20:59:56 alise: merzbow's creations aren't in my style 21:00:01 hm... maybe that works 21:00:06 Does anyone remember the name of the language similar to Brainfuck from the 1960s? 21:00:12 p''? 21:00:15 P'' 21:00:22 nooga: they're not in /any/ style 21:00:26 oerjan: but it grows a lot, doesn't it 21:00:52 if log_2(x) = a and log_2(y) = b, then log_2(f(x,y)) = a+b 21:00:56 roughly, at least 21:00:59 hmm 21:01:07 so two 500 binary digit numbers -> 1000 21:01:07 alise: merzbow is distinguishable 21:01:08 digit 21:01:10 that's not bad actually 21:01:23 As fast as the triangular or factorising ones? 21:01:24 alise: um that's the minimum information theory allows, or so :D 21:01:46 yeah 21:01:51 oerjan: so it's actually very good, isn't it 21:02:07 what about combining this with my idea of (length l, tuple encoding) 21:02:17 Can it be done efficiently with bignums? 21:02:28 Phantom_Hoover_: It's just divmod 21:02:31 to extract bits 21:02:37 -!- Oranjer has joined. 21:02:40 then you can alternate the bits of _all_ the numbers 21:02:42 oerjan: Sure, although I've no idea what that encoding is 21:02:45 Is that efficient? 21:02:55 yes. 21:03:06 alise: um i meant to use this alternating for that tuple encoding 21:03:15 yes, what tuple encoding :D 21:03:24 * oerjan swats alise -----### 21:03:30 _as_ that tuple encoding 21:03:30 oh the fib thing? 21:03:33 oh 21:03:38 why encode it with length 21:03:39 I don't ge it 21:03:40 *get 21:03:47 anyway so let's see 21:03:51 biTo will be recursive, eek 21:03:53 that's not good is it 21:03:56 oh well 21:03:59 so you know how many numbers you've mingled 21:04:13 Interleaving the bits two by two is just as space-efficient as interleaving them all at once. 21:04:25 oh, hm, maybe 21:04:35 It's just another NxN->N bijection, so we can use our old encoding. 21:05:02 yeah but our problem was to avoid blowing up some parts 21:05:05 oerjan: what does theese mean: "man pleier å få som fortjent!" and "Disse statusoppdateringene som inneholder varmegrader kan du godt spare deg for." 21:05:08 ? 21:05:27 biTo :: (Integer, Integer) -> Integer 21:05:28 biTo (0,0) = 0 21:05:28 biTo (u,v) = 21:05:28 let 21:05:28 (u',a) = if u == 0 then (0,0) else u `divMod` 2 21:05:28 (v',b) = if u == 0 then (0,0) else v `divMod` 2 21:05:29 Phantom_Hoover_: using this for NxN-> N will be _bad_ for long lists with the old method 21:05:29 in 21:05:31 (((u' * 2) + v') * 2) + biTo (u',v') 21:05:34 right? 21:05:48 because alternating is only efficient when the numbers are approx. same size 21:05:51 no, then (0,1) = 0 21:05:52 ugh, why 21:06:05 oerjan: Hmm. 21:06:12 oh 21:06:14 wrong way around 21:06:15 lulz 21:06:18 should be a,u' 21:06:19 right? 21:06:24 ;\ 21:06:24 no wait 21:06:27 2 = 10 21:06:30 so 0,1 it should be read 21:06:34 er wait 21:06:35 1 = 1 21:06:37 so yeah, wrong way around 21:06:37 Yeah, we'll need to use a more balanced method for this. 21:06:47 oh no wait 21:06:48 lol 21:06:51 I'm thick 21:07:03 which is why i suggested alternating all the bits simultaneously 21:07:10 And lists? 21:07:13 oerjan: ah 21:07:13 so 21:07:19 [1,1,1] = 111 21:07:22 yeah 21:07:23 yeah? 21:07:27 so it's stored as (3,111) 21:07:29 oerjan: please ;3 21:07:34 oerjan: then we crush recursively? 21:07:44 [1,[1,1,1],1] = (3,1(3,111)1) 21:07:46 how do we do that 21:08:00 or does 3 go into the number somehow? 21:08:01 we might 21:08:03 Wait, interleaving at once is no better. 21:08:14 Phantom_Hoover_: it's information-theoretically optimal... 21:08:22 alise: crushing (3,111) gives something (2, x) and the 2 is redundant 21:08:50 Ooh, wait, you're right. 21:08:50 although that's not very efficient since 3 might be much smaller than the snd 21:08:58 oerjan: eh? 21:09:19 alise: if we crush (3,x) where x is large we get a _lot_ of zero padding on the 3 21:09:33 oh wait, 21:09:34 (((a * 2) + b) * 2) + biTo (u',v') 21:09:36 is totally broken 21:09:37 grr 21:09:43 this recursion is hairy i think it is iterative :( 21:09:54 oerjan: so, question 21:10:01 is the interleaving good 21:10:05 or is your fib thing good 21:10:31 oerjan 21:11:30 nooga: "one usually gets as one deserves!" "these status updates containing above zero (celsius) degrees you can just stop doing." 21:11:49 oh right, thank you 21:12:15 what 21:12:33 nooga had some Foreign to be translated. 21:12:34 :P 21:12:51 alise: the interleaving is much simpler but has that problem with size differences giving much padding 21:13:49 oerjan: what is wrong with cons-cell interleaving? 21:14:10 It exacerbates the padding problem hugely. 21:14:37 ah right 21:14:40 The accumulator gets much larger than the car, so it's padded. 21:14:42 no, does it? 21:14:48 alise: well if you do (a,(b,(c,(d,(e,0))))) then the bits of e will end up 32 bits apart, while the bits of a just end up 2 apart 21:14:49 Phantom_Hoover_: so do it the other way around! 21:14:51 oh wait 21:14:55 doesn't work like that lol 21:15:03 or thereabouts 21:15:07 oerjan: then we need some kind of synchronization 21:15:08 hmm 21:15:12 oerjan: does your fibonacci thing suffer this problem? 21:15:31 We could always re-use the unary one, too. 21:15:43 alise: and actually if you only do pairs then the triangle method is perfectly adequate, i should think 21:15:50 So that the sequence {1, 2, 3} would be 1010010001? 21:16:13 Phantom_Hoover_: eh 21:16:17 what about 00110 21:16:28 oh, i see 21:16:29 0 = 1 21:16:30 Ooh, fair point. 21:16:35 like 21:16:36 sa in 21:16:37 as in 21:16:43 ..00110.. 21:16:43 = 21:16:52 [...,3,0,2,...] 21:16:54 No, wait, code {1, 2, 3} as 101001000 21:16:55 erm 21:16:57 [...,2,0,1,...] 21:17:06 so 11 = 0 element 21:17:08 Then if it ends with one the final thing is 0. 21:17:13 i think the fibonacci method is quite lean, it only uses about log_2 phi * bitsize bits + 1 for each element regardless of size differences 21:17:14 11 at the start would be 0, too, because 1 is the starter 21:17:23 oerjan: no bitsize 21:17:48 alise: bits are intrinsic to the fibonacci method 21:18:05 and is a perfectly valid measure of number size 21:18:13 ah well true 21:18:16 a stream of bits controls a machine 21:18:18 is it actually log_2(n) 21:18:23 the machine is a type writer 21:18:32 no, log_2(phi) * element size 21:18:39 o_O 21:18:41 ok, i'm confused now 21:19:04 phi is the golden ratio, the limit of ratios of consecutive fibonacci numbers 21:19:07 That makes sense. 21:19:13 if | is the cursor: | +| +>| +>[|] +>[+|] this is the sort of typing you can do 21:19:20 so converting binary -> fibonacci base expands by about that much 21:19:23 log_2() gives the no. of bytes. 21:19:43 Of phi^n. 21:19:47 when you are inside a bracket, there is an extra key allowed which steps out - but this has some redundancy 21:19:47 Phantom_Hoover_: bits 21:19:59 log_256 otoh :D 21:20:14 because there is a difference between +>[+|] and +>[+]| for example.. but they are equal programs 21:20:20 how to reconsile this? 21:20:54 alise: oh i mean element size in bits, of course 21:21:03 maybe you always have to put down a symbol when you step out a bracket -- but that interferes with stepping out of multiple nested brackets 21:21:04 not the bitsize of machine words :D 21:21:13 yeah 21:21:18 i know what phi is 21:21:19 thx :P 21:21:45 log_2 is no. of bits, yeah 21:22:10 fax: An interesting idea, but it would seem that it would be difficult to get uniqueness. 21:22:37 is it possible to fix this idea? 21:23:23 I don't really know. Also, would it be easy to compute both ways? 21:23:48 sheesh i still haven't gotten to the logs... 21:23:58 i think i'm just going to search for my name 21:27:16 alise: i conclude that although you mentioned my nick several times, all the problems were solved before i arrived 21:27:41 oerjan: wut :P 21:27:48 So exactly how does the base-phi encoding work? Write the no.s in base phi, then use 11 to separate 21:27:52 ? 21:28:11 alise: well the parts of the problems you were mentioning my nick about, anyway 21:28:22 use 1 to separate 21:28:32 the second 1 is just the beginning of the next number 21:28:49 So how would {1, 2, 3} work? 21:28:59 also, there is some trickiness at the beginning, see my haskell code far above ;) 21:29:27 first to fix the trickiness, divide 1 by 2 giving 0, remainder 1 21:29:29 how is the 1 the beginning of the next? 21:29:45 alise: all numbers >= 1 begin with 1 in fibonacci base 21:29:47 Oh, god. Please tell me it's an easy-to-find URL. 21:30:22 alise: boundaries are marked with 11, where the first 1 is inserted and the second is just the begining of the next number 21:30:27 Phantom_Hoover_: nope 21:30:43 21:55 oerjan> crush (x:xs) = fromBinary $ (if b==1 then "1" else "") ++ intercalate "1" [toFibonacci (x+1) | x <- y:xs] where (b,y) = divMod x 2 21:30:59 also crush [] = 0 21:31:14 there may be off-by-one errors as usual ;) 21:31:24 What does intercalate do? 21:31:28 -!- alise_ has joined. 21:31:42 concatenates all the strings with "1" between 21:31:43 iirc 21:32:52 oerjan: so does that cover every string? 21:32:54 the divMod stuff is necessary because the intercalation always gives a string beginning with an _odd_ number of 1's 21:32:55 & does it compact well? 21:33:20 as i repeatedly said, it should expand by about log_2(phi) 21:33:56 !haskell logBase 2 ((sqrt 5 + 1)/2) 21:34:08 -!- alise has quit (Ping timeout: 252 seconds). 21:34:09 0.6942419136306174 21:34:12 Do all base phi nats end with 1? 21:34:20 -!- impomatic has quit (Quit: ChatZilla 0.9.86 [Firefox 3.5.9/20100315083431]). 21:34:25 no 21:34:31 e.g. 10 is 2 21:34:44 100 is 3, 1000 is 5 21:34:53 what, expand by the concatenation of all the bitstrings with no separator? 21:34:56 it'll only be log_2(phi) bigger? 21:35:08 Wait, is base fib base phi? 21:35:09 in _bitsize_ 21:35:16 Phantom_Hoover_: approximately 21:35:36 So 111 is 3+2+1? 21:35:40 you write your number as a sum of fibonacci numbers, never using consecutive ones 21:35:49 Oh. 21:35:54 nopt, 11 is illegal in a fibonacci representation 21:35:57 *nope 21:36:06 but 101 is 3+1 21:36:17 1001 is 5+1=6? 21:36:46 alise_: oh hm if phi is < 1 then it should be 1/phi, naturally 21:36:55 Phantom_Hoover_: yeah 21:37:03 oerjan: so 21:37:23 So to extract we: 21:37:31 bigness (yourEncoding [a,b,c]) ~= bigness (concatMap bitStrings [a,b,c]) + 1/phi 21:37:32 ?? 21:37:34 are you serious?! 21:37:50 ~+ 0.618 21:37:52 um no 21:37:52 surely not 21:38:44 if x has n bits, then fibonacci x is approximately n/log_2(phi) long 21:38:59 i just realized it needs division, not multiplication 21:39:08 because log_2(phi) < 1 21:40:21 ah 21:40:22 fib(n) ~= phi^n, so log_2(fib(n)) ~= n*logBase 2 phi 21:40:32 logBase 2? 21:40:36 you changed mid-thing :P 21:40:43 oerjan: what about the list encoding 21:40:44 i just changed to haskell 21:40:46 how much overhead? 21:40:57 but you changed language across the sing! 21:40:58 *sign! 21:41:37 the fibonacci representation, plus the 1 bit in between... 21:41:40 *1 bits 21:41:42 ah 21:41:49 does it cover every nat then?? 21:41:56 Yes, I think. 21:41:57 i think so 21:42:02 Wait, what's 111? 21:42:07 (in binary)? 21:42:08 with the divMod fix 21:42:15 Phantom_Hoover_: 7 :D 21:42:27 hey oerjan 21:42:29 "Everyone who applies for Norwegian citizenship after 1 September 2008 must be able to document that they have completed 300 hours of Norwegian language tuition or be able to document adequate knowledge of Norwegian or Sami. 21:42:31 How does it decode? 21:42:35 if this didn't apply to in-EU migration too, 21:42:37 I'd say fuck you 21:42:40 er 21:42:41 if this did 21:42:48 heh 21:43:00 i hope it doesn't 21:43:00 alise_: citizenship is not the same as moving 21:43:03 ah 21:43:08 cool 21:43:09 citizenship takes years of residence to get 21:43:19 what if you try and move in from outside the EU? 21:43:29 then you may have a hard time 21:43:30 is that just the regular visa thing? 21:43:31 just curious 21:43:35 i mean 21:43:37 move in as residence 21:44:04 you need to be an especially needed person to get a working permit if you're not from the EU/EEA 21:44:06 speaking of which, pikhq: ping 21:44:11 (he's my personal immigration law expert) 21:44:28 Pong! 21:44:30 Oerjan: what tuple does 111 decode to in your system? 21:44:33 oerjan: I only ask because I've been discussing, with a friend, utterly crazy ways to move 21:44:51 alise_: Positive-imaginary? 21:44:56 First one was "him and me should get married so that I can move to the US"; issues: I'm 14; his state is heavily Republican so no gay marriage 21:45:02 Phantom_Hoover_: wut 21:45:03 Phantom_Hoover_: [1,0] i think 21:45:10 -!- Phantom_Hoover_ has left (?). 21:45:23 oerjan: Alise is an EU citizen, and as such, is entitled to reside in Norway permanently. 21:45:34 I was talking about said friend 21:45:40 pikhq: she was specifically asking about non-EU 21:45:43 who, of course, is entirely joking 21:45:45 Mmm. 21:45:55 oerjan: I'm surprised you're actually keeping up the pronoun thing 21:46:08 alise_: when i remember 21:46:11 anyway pikhq 21:46:17 see /msg in a sec 21:46:45 -!- Sgeo_ has quit (Ping timeout: 245 seconds). 21:48:08 whee, i'm forgetting to eat 21:48:16 I do that too 21:48:19 other things are just so much more interesting 21:59:42 -!- hiato has joined. 22:02:02 -!- Mathnerd314 has joined. 22:26:16 -!- tombom has quit (Quit: Leaving). 22:32:02 i have an idea 22:32:10 yay 22:32:13 let's create [[Remarkable language list]] 22:32:22 which lists all the actually good languages on the wiki 22:32:23 but 22:32:25 we'll put at the start 22:32:30 languages known in the community for a while 22:32:36 that have shown good esoteric theoretical/practical qualities 22:32:37 etc 22:32:44 and telling people not to put new languages on the list 22:32:48 tada, a language list that is actually usable! 22:32:53 and nobody is offended 22:32:56 perhaps [[Languages of note]] 22:33:33 !haskell data Remarkable = Remarkable String String deriving Show; language = "Haskell"; list = "compendium"; main = print [[Remarkable language list]] 22:33:36 [[Remarkable "Haskell" "compendium"]] 22:34:44 lol 22:42:19 -!- gm|lap has joined. 22:45:27 alise_: what are your esolangs? 22:45:36 hmm 22:45:40 let's see 22:46:35 nooga: just finding them :P 22:47:58 nooga: here are all the ones I can find right now, mostly old: 22:48:00 http://esolangs.org/wiki/Qq 22:48:01 http://esolangs.org/wiki/Jumping_to_-1_is_exciting 22:48:03 http://esolangs.org/wiki/Yael 22:48:10 http://esolangs.org/wiki/UniCode (never specified) 22:48:12 http://esolangs.org/wiki/JumpFuck 22:48:19 http://esolangs.org/wiki/BF_machine (not really a language; part of a project) 22:49:11 JumpFuck was a project too, for a something->BF compiler iirc 22:49:19 a rather ugly extension too 22:49:27 -!- BeholdMyGlory has quit (Remote host closed the connection). 22:50:33 Qq was quite nice, took a while to be disproved TC 22:50:45 Jumping to -1 is exciting is confusing. 22:50:48 hm 22:51:27 the things after the instructions are the tape/stack/whatever 22:51:37 and # is incompletely specified 22:51:38 just examples 22:51:53 it's "cherry-pick from the stack" basically, iirc 22:51:57 ;] 22:52:01 and move it elsewhere 22:52:05 Qq looks nice 22:52:31 yeah; it's sub-TC due to the instructions not allowing arbitrary function calls or something 22:52:36 I forget 22:52:47 Yael is a nice little computotron, with very limited memory. 22:53:46 i could even implement yael in FPGA 22:54:48 0001 AAA BBB 22:54:49 Moves the data in register B to register A. 22:54:49 1000 AAA BBB 22:54:49 Store - in the memory whose address is in register B - the data in register A. 22:54:51 How inconsistent! Oh well. 22:55:20 nooga: You can implement it in practically anything. It only has 264 bytes of memory. 22:56:02 relays! 22:56:14 That actually wouldn't be too hard. 22:56:24 You could even do the memory in relays. 22:56:27 that's why i am saying that 22:56:48 It would also make some absolutely *wonderful* noises. 22:57:02 Relay computers are awesome. 22:57:15 http://www.youtube.com/watch?v=MM4IUxXiArY 22:57:20 this is awesome 22:58:24 Yeah. 22:58:39 Dammit, I loaded /prog/ again. Now I won't be able to stop myself calling Python FIOC. 22:59:31 YEAH BUT WHO DOESNT INDENT THER CODE? 23:01:43 -!- FireFly has quit (Quit: null). 23:06:52 I want to tell alise something 23:09:14 !haskell alise unignore me I have news to tell you 23:09:26 !haskell "alise unignore me I have news to tell you" 23:09:28 "alise unignore me I have news to tell you" 23:11:28 * oerjan chuckles 23:13:49 * pikhq wishes for a way to request someone's ignore list 23:14:15 pikhq only assholes and stalkers do this but you can /ping people to see if they have you on /ignore 23:14:17 * oerjan cannot hear you LALALALA 23:14:39 why the hell would you ping me 23:14:53 I clearly don't have you on ignore 23:14:56 Lawlz 23:15:13 ... 23:19:15 fax: I don't know how to unignore you o_O 23:19:24 fax: done; what is it? 23:19:33 alise you are listening now? 23:19:46 -!- coppro has joined. 23:19:52 .. 23:19:58 you are pretending to have unignored me 23:20:09 no 23:20:11 I'm not :P 23:20:15 -!- gm|lap has quit (Quit: ilua). 23:20:19 i'm not /that/ stupid 23:20:38 /unignore 23:21:07 yeah but you need the full mask 23:21:27 does [] ever come up in real brainfuck programs? 23:21:45 I mean it always finite loops.. or it's a noop - so we can ignore it yes? 23:21:53 well no. 23:21:57 you mean infinite loops? 23:21:58 because we're trying to translate every bf program :) 23:22:01 trivial to translate some subset 23:22:10 the edge-cases are what makes it hard -- but go on anyway 23:22:34 the hard part isn't "a bijection from BF prog <-> nat", anyway, it's "a feasibly computable bijection from BF prog <-> nat" :-P 23:22:58 if you need []'s in the programs then my idea is worth nothing 23:24:13 I am interested anyway 23:24:17 ideas are always worth something... sometimes it's negative though 23:24:29 but that's okay because you can find out some positive-worth idea to balance it out 23:24:38 so somehow -a + a > 0??? 23:24:40 lets say that +- -+ <> >< [] never occur in any program 23:24:47 fax: what about <<>> 23:25:02 that contains <> 23:25:07 ah true 23:25:14 I just realized this idea doesn't work anyway 23:25:55 it will only work for programs of even length 23:26:40 lol 23:26:42 go ahead anyway 23:26:44 what I noticed was that there's 6*6 two-symbol codes, 5 of them aren't used, 6*6-5 is 31 23:26:45 it sounds so bad it's interesting 23:26:48 then you add loops 32 23:27:32 the condition is a bit harsher than just even length programs actually, anyway this idea is broken so never mind 23:27:54 I thought I had solved it 23:30:03 Argh, I am sick of hot chocolate. I cannot be arsed to deal with the stupid skin that forms. 23:30:10 I should just drink tea or something. 23:30:27 the key thing is that 32 is a power of two 23:31:15 you don't say :P 23:33:08 -!- hiato has quit (Quit: underflow). 23:34:15 ][ too, since when exiting a loop, the current memory cell will be zero, and the next loop won't start. 23:34:27 but it still must be encoded. 23:34:57 filtercomments | bf encode | bf decode = filtercomments 23:35:09 er 23:35:11 bf encode | bf decode = filtercomments 23:35:17 If you don't encode it, then you are encoding a subset of the valid Brainfuck programs. 23:36:02 a-z + 0-9 = 36 symbols 23:38:42 a loop after ] is a comment :) 23:38:50 walk -> 23:39:53 oerjan: at this time? 23:39:59 in NORWAY? 23:40:03 you're hard as fuck. 23:43:07 ... 23:43:15 what 23:43:48 it's past midnight in norway. in trondheim, it is 0 degrees right now 23:43:53 and oerjan is going for a walk. 23:44:11 :P 23:44:33 oerjan's in trondheim? 23:46:20 he lives in trondheim. 23:46:27 bit more than "in" :P 23:46:57 heh 23:47:19 oerjan: why heh? :P 23:47:37 i actually turned around when i discovered the stairs were so slippery with sleet it was dangerous to walk on them :/ 23:47:43 :D 23:47:51 hardcore motherfucker 23:47:59 NOTHING CAN STOP ME -- EXCEPT SLEET, AND GUNS 23:48:02 I think I love Norway's weather now. :P 23:48:04 *NOTHING CAN STOP ME -- EXCEPT SLEET, AND WEAPONRY 23:48:11 pikhq: it's fucking amazing! 23:48:18 it isn't even freezing ALL the time 23:48:29 alise_: Also, 0 is not *that* cold. 23:48:31 i figured if i took a walk, came back and forgot about the sleet i'd probably fall and break my neck 23:48:34 Yes, but still. 23:48:45 0 degrees, can't see very well, ... 23:48:48 or something 23:48:51 now of course oerjan you realise that you are going to have to lodge me. 23:49:01 eek! 23:49:17 eek. 23:49:50 also, how come half of Trondheim's streets are water, I'm going to ignore the real explanation and substitute "you are all Jesus", or "you all have high-tech ice-making shoes" 23:50:10 wait since when 23:50:27 we _do_ have a river through the city center, but... 23:50:39 alise_: You... Might be confusing Trondheim with Venice. 23:50:43 :P 23:50:47 that could be. 23:50:56 Quite some confusion. 23:51:09 I was actually going to link to one of these pictures saying "the Venice of Norway": 23:51:13 http://www.trondheim.com/multimedia.ap?id=1114985653&width=138 23:51:14 http://www.trondheim.com/multimedia.ap?id=9652293 23:51:17 also it _shouldn't_ be this cold in the beginning of may. 23:51:22 and 23:51:36 http://upload.wikimedia.org/wikipedia/commons/d/d3/TrondheimNidelva-improved.jpg 23:51:38 and 23:51:39 oerjan: I have seen snowstorms in June. 23:51:42 http://upload.wikimedia.org/wikipedia/commons/1/13/Nidelva-Trondheim-foliage.JPG 23:51:48 I REST MY CASE 23:52:38 Colorado has fucking schizophrenic weather. 23:52:57 how sad that you don't have rivers in england. 23:53:04 oerjan: i know right :P 23:53:17 There was just a disproportionately large portion of pictures of buildings with water right behind them, so... 23:53:27 pikhq: Here. You. Let's move to Norway on the basis that broke+broke = not broke. 23:53:42 (It doesn't matter whether you're broke beforehand; move to Norway, become enbroken.) 23:53:53 alise_: Hahahah. 23:54:03 i have taken walks at -5 as well, this winter. -10 starts to get a bit grating. 23:54:05 Do they speak... Japanese there? 23:54:07 :P 23:54:14 pikhq: They don't speak Japanese in Colorado. 23:54:24 oerjan: I've walked to school in that. 23:54:27 ...and Japan itself has quite a few issues. Namely, being fucked up. 23:54:30 Thus, Norway. 23:54:39 I'd say Finland, but military at 18 makes alise sad. 23:54:52 pikhq: i mean taking walks just to stretch my legs. 23:55:02 でも日本語を話せるぜ〜 23:55:11 i've certainly walked to school in -15..-20 when i was younger 23:55:31 alise_: How's about we just move to the moon? 23:55:38 it's not _that_ common here though. temperature has a tendency to cling around 0. 23:56:01 pikhq: we did have the japanese emperor visiting a few years ago. 23:56:16 apparently he wrote a poem about us afterwards. 23:56:20 pikhq: it has huge ping to earth iirc 23:56:23 or was that mars 23:56:28 that was a really depressing conversation 23:56:41 when i found out that colonising even near planets in the solar system meant really slow internet, only e-mail and the like 23:56:58 oerjan: 23:57:02 cold cold cold cold, 23:57:04 cold cold fucking cold ow, 23:57:06 why did i visit 23:57:12 He does not like you. 23:57:19 nah :D 23:57:25 alise_: Mars has absurd ping to Earth. 23:57:39 alise_: The Moon is not much worse than my current link. 23:57:43 lol 23:57:51 mars is more likely to sustain life though :P 23:58:00 oerjan: Well, he's got to do something with his time. 23:58:12 It's not like he has *any power or responsibility*. 23:58:36 He's not even a nominal head of state. 23:59:16 He's only got his position because the Diet wouldn't think to remove it. 23:59:35 http://www.kunaicho.go.jp/e-culture/utakai-h18.html 23:59:48 * oerjan didn't expect to actually find it :)