00:01:12 -!- coppro has quit (Remote host closed the connection). 00:01:56 -!- Gracenotes has quit (Quit: Leaving). 00:10:09 actually [A] seems useful if you want to set an unknown S to empty - [r] would do that i think 00:11:50 and i cannot see any way to achieve that without [ ] 00:12:32 i believe all of those are correct 00:12:42 p was actually added after writing the program 00:12:54 or at least i implemented it after trying the program 00:13:02 mhm 00:13:55 and yes [] can basically just make S empty, unless it's the last loop 00:14:22 plus it can do io and other things not relevant to computational class 00:14:44 u(A{B}r seems like the way to do if-then 00:14:53 i thought i could change the semantics of [] to something like {} and {E} ending a loop 00:15:30 you're not specifying how E works with the rest of the commands, anyway 00:15:32 but changes can be made once someone makes some sense out of what currently exists 00:15:38 yeah i'm not 00:15:45 it's just useful for err 00:16:48 i mean it's just another set, so -(!-<>{B} will do B for exactly the set {{}} 00:17:05 not sure that's very useful 00:17:30 you can't currently remove it, so it's a bit special that way 00:17:46 oh, i assumed you could remove it explicitly... 00:17:47 but i could just add -E, -!E etc 00:17:55 well there isn't a command for that is there 00:18:10 hm i guess not, if E is not included in the <<<>>> syntax 00:18:22 it's not. i guess it should be 00:18:32 in fact i should definitely add it 00:18:51 -!- uorygl has quit (Ping timeout: 252 seconds). 00:19:27 otoh it's still interesting to see what can be achieved without E 00:20:23 -!- uorygl has joined. 00:20:24 the reason i didn't start fixing the language was i could only see it's nontrivial to show it's TC, but couldn't see any reason why it couldn't be 00:21:15 if that needs fixing 00:23:01 {^n }^n might be better numbers than ordinals btw 00:23:14 i haven't actually given that any thought either 00:23:38 well i suppose ordinals are nice because you can map over a number to do something that many times... sort of 00:25:28 there needs to be a way to do some other datastructures though 00:26:03 sure, but i have a hunch it'd be easier to encode them in integers... 00:26:23 i'm not sure you can actually do arithmetic, however 00:26:36 that's very possible 00:26:53 at least without a surrounding [ ] 00:27:06 i've been trying to find the parity of a number 00:27:17 but that seems impossible 00:27:27 basically without a [ ] there is no way to inspect arbitrarily deep within a set, i think 00:28:20 well ({} goes one deep, so you'll just get finitely deep if you use those nested 00:28:21 you can use [r] to "cut it off" at any level, however 00:29:33 i'm not sure i see what you mean 00:29:43 or maybe i do 00:29:51 replacing elements at some depth with empty sets 00:29:55 yeah 00:30:59 anyway [r-Er] would check parity if you had {} and {E} end a loop 00:31:13 ah 00:31:35 um no 00:31:45 oh it wouldn't? 00:31:47 err hmm 00:31:53 r never errors 00:31:59 oh err lol right 00:32:15 but assuming ordinals, we could do... 00:32:19 [r-!<>r] perhaps? 00:32:32 let's see 00:33:11 so umm 00:33:23 the r's will get the number to 0 anyways 00:33:32 the error set doesn't matter for that 00:33:40 hm 00:33:42 so you get it iff the first r gets you to 0 00:33:51 try [rr-!<>] 00:34:07 that's the same because {E}r = {E} 00:34:16 if you get my notation 00:34:29 that's also not specified :P 00:34:43 well i meant the last doesn't need specification 00:34:56 yes true 00:35:11 okay so yeah cool that'd work 00:35:47 but sort of a hack, i could just add a set called blerror set to get mod 3... 00:36:14 i mean 00:36:27 consider some (A{B} where [] occurs in B 00:37:24 hm that's the same as mapping all elements matching A to a constant, essentially 00:37:36 then the code after [] will have one of two sets, so the (A{B} can result in at most 2 different sets that replace the sets B is run on 00:37:53 er right with E stuff 00:37:54 yeah but two constants if you add the E thing 00:38:02 i'm just wondering if that changes anything 00:38:41 you basically filter with A, plus you can do something extra with some extra condition on the elems of A 00:38:44 you get one bit of information from a [ ] 00:38:55 yes 00:39:42 one thing that'd probably change things a lot is the following construct which i was thinking (once i'm convinced this thing doesn't have potential) 00:39:50 err and it goes 00:40:35 /A|B\ is like (A{B} but each B is run on the context S, in any random order 00:41:26 um you need the information of what element it is run for somehow... 00:41:35 *about 00:41:37 oh umm 00:41:49 actually i think i dropped that idea when i realized that 00:41:52 but forgot i dropped it 00:41:55 :P 00:41:56 ah 00:42:24 but anyway, something like that would be nice, because right now you just of a broken loop and map + filters. 00:42:34 then you'd have a reduce 00:43:22 hm what about just having a general loop with test 00:43:33 so /A|B\ is like while (A) B 00:43:34 oh umm 00:43:44 that's not a bad idea... 00:43:54 let's tell everyone it was mine 00:44:02 except B doesn't see the result of A, obviously 00:44:04 :D 00:44:14 hmm 00:44:52 S has some state, then A is run, and iff it results in nonempty, B is run on S... is there a problem with B not seeing the result? 00:44:55 or rather, the effect of A is always reverted apart from testing 00:45:36 no, that's what i mean, but B is run on the original S, not the one after A 00:45:41 i was thinking A runs with S, then if empty, S is returned, otherwise B is run on S, S is updated, and we repeat 00:45:44 yeah 00:45:53 right 00:46:22 so now you could return any amt of info 00:46:24 00:46:43 00:48:20 actually ([] could replace [] if there isn't a problem with that thing 00:48:45 you call this ([] ? 00:48:52 i could, then 00:49:00 i think empty A would be equivalent to [] 00:49:13 yes, so also literally ([A] could replace [A] 00:49:58 and maybe []) for do while ;P 00:50:14 except that syntax is ambiguous, because (..[]..{...} is already legal 00:50:34 well it's not ambiguous if you drop [] altogether 00:50:40 (or hard to parse) 00:50:47 true 00:51:41 so anyway let's see if parity is a piece of cake with that thing 00:51:42 ([] and []) still seems ambiguous together 00:52:29 (r[r]), isn't it? 00:52:35 er, (r[r] 00:52:55 umm 00:52:56 er 00:53:03 no not with those semantics 00:53:06 (r[rr] 00:53:08 because A's result is just ignored 00:53:51 or possibly (rr[rr], if there is a difference 00:53:51 so while(n>=2){n-=2} 00:54:03 * ais523 reads up on Toi on the wiki 00:54:09 looks correct to me 00:54:11 for some reason I find it easier to follow there than IRC 00:54:26 well the article is exceptionally well written 00:54:44 yes, I like it when esolang articles do that 00:54:51 and try to aspire to the same quality with mine 00:54:55 one is while(n>=2) the other is while(n>=3) 00:55:04 i was actually joking, but glad if you like it :P 00:55:09 or is that while(n>=1) 00:55:24 i just copypasted a page of keymaker's and changed everything to toi stuff :P 00:55:35 oerjan: who knows... 00:55:39 okay err 00:56:16 the loop ends if A gives you an empty set, so rr ends if n is of depth less than 3 00:56:30 because r decrements depth 00:56:38 by exactly one 00:56:40 3 -> r -> 2 -> r -> 1 -> 0 00:56:48 argh 00:56:51 3 -> r -> 2 -> r -> 1 -> r -> 0 00:57:23 (r[rr] will not halt on 2, while (rr[rr] will 00:57:39 'will not halt on 2'? 00:57:42 so (rr[rr] could give 2,1 or 0 as result 00:57:47 oih 00:57:48 oh 00:58:10 so (r[rr] seems "correct" 00:58:21 (rr[rr] ~ while(depth>2){depth-=2} 00:58:30 err 00:58:39 so yeah 00:58:44 -!- ais523 has quit (Remote host closed the connection). 00:58:55 0->0, and otherwise parity with 1/2 as output 00:59:14 hm, since there is only one set <<>> of depth 1, it will always return an ordinal even for non-ordinal input 00:59:29 a nice way to think about it is the loop ends iff S's depth is 0, and r will always decrement depth by exactly one 00:59:44 this will not hold for higher moduli 00:59:49 true 01:00:28 okay so how about addition 01:00:32 :P 01:00:36 argh 01:00:47 we need a tuple... 01:00:56 yes 01:01:36 there are probably standard ways to store this stuff in sets 01:01:48 'probably' 01:01:59 yes, (x,y) = {x,{x,y}} but i don't think that is useable here 01:02:10 um 01:02:25 or (x,y) = {{x},{x,y}} 01:02:27 yes, i just realized there are relatively well-known formalisms based on sets. 01:02:37 i think one of them requires foundation, the other not 01:03:04 foundation = set has finite depth or something? 01:03:16 err 01:03:38 but neither can be used for our purposes, because we cannot detect which is {x} and which is {x,y} easily 01:03:47 ordinal depth 01:04:00 no infinitely descending chains of elements 01:04:17 so... set has finite depth? 01:04:21 oh 01:04:21 of course we do have finite depth 01:04:38 um 01:04:47 that was not an answer to your question 01:04:51 yeah those aren't the same thing 01:04:53 i know 01:04:58 but a comment on toi specifically 01:05:02 yes 01:05:47 but what about {^n }^n, then we could do {<>^n, {<>^m, <>^(m+1)}} and use the size of the sets to see which one is m 01:06:00 <>^n = {^n }^n 01:06:13 we cannot detect the size of a set 01:06:15 *do something like 01:06:20 well... no 01:06:32 but i mean err 01:06:41 in A, we can check if <> is in S, i think 01:06:43 at least not directly enough, we might be able to _after_ we solve this problem 01:06:57 so we just need to decrement the set that has two elems, and increment the other 01:07:10 this would be done with foreach 01:07:19 OR NOT 01:07:29 i was hoping for a pair construction that could contain more than just numbers 01:07:36 so it could be repeated 01:07:58 that would be nice, sure. 01:08:37 my idea is something like (x,y) = {{a,{x}}, {b,{x}}} where a and b are sets chosen specifically so we _can_ test for them 01:08:47 er 01:09:05 {{a,{x}}, {b,{y}}} 01:09:11 before i go along, can we solve the problem of checking if <> is in S for fun 01:09:25 i mean i don't see how to 01:09:34 except we may need to put more {} around x and y to distinguish them from a and b easily 01:09:40 ok 01:09:56 -!<> gives us the error set iff it's there, but currently E has no special properties that actually make that helpful 01:10:10 yeah so try without E 01:10:24 first step: turn every element _other_ than <> into <<>> 01:10:32 i think we can do that 01:11:07 ([([r]<>] 01:11:19 for every element: change to <> 01:11:21 ? 01:11:31 um you want { not [ somewhere there 01:11:40 oh whoops 01:11:46 ({([r]<>} 01:11:57 i love the unnested parens <3 01:12:40 um i think you miss one [ 01:12:41 or umm am i confusing levels of depth there 01:12:54 also <> could be u instead 01:13:04 but i think both work 01:13:31 er wait 01:13:39 scratch that 01:13:51 if you run ([r] for some set, it will be emptied 01:13:58 ok i now official hate the unnested parend ;D 01:14:02 *ly 01:14:05 *parens 01:14:15 so ({ ([r] } gives you <<>> for all except <> 01:14:21 because it empties every element 01:14:23 of your set 01:14:38 hate is such a strong word 01:14:41 right 01:14:57 okay so now it should be trivial 01:15:01 we just remove <<>> first 01:15:03 -<<>> 01:15:08 and then we check for <> 01:15:13 with say -!<> 01:15:25 no, we don't want to use E :( 01:15:45 well that's what it's meant for, so ! makes sense 01:15:48 but hmm 01:16:02 i guess 01:16:03 there could be 01:16:05 <> 01:16:09 and -<> 01:16:12 and TOGGLE <> 01:16:17 that would serve the same purpose 01:16:19 maybe 01:16:30 i don't think we need that 01:16:36 ...which makes me realize we don't need to do *anything* 01:16:48 whether <> is there or not already makes A either say yes or no 01:17:12 so ({([r]}-<<>> should check for <> 01:17:15 i think you did miss one level of depth above, btw 01:17:53 it empties if <> is not in S, so we'd need to converse 01:17:55 i did? 01:18:02 in ({([r]}? 01:18:15 we are trying to check whether S _contains_ <>, not whether it _is_ <> 01:18:22 sure 01:18:43 ({([r]} maps ([r] over each element of S, so it turns every element of S to <> 01:18:43 that one changes every element of S to <> 01:18:55 which means if S is empty, then nothing happens, otherwise we get <<>> 01:18:56 oh 01:19:16 so what want to do is to apply that to every element of S 01:19:18 *we 01:19:43 ({({([r]}} 01:19:50 hehe 01:20:15 so ({({([r]}}-<<>> 01:20:19 yep 01:20:28 but... 01:20:31 and now we are left with either <> or <<>> as S itself 01:20:34 that's the negation of what we need 01:21:08 i mean i could add -([] tho, would fit the pattern 01:21:23 it shouldn't be hard to do a not though 01:21:51 okay so {<>} => {}, {} => {<>} 01:22:33 u({([r]}r 01:22:46 er wait 01:23:28 that's S => {S} => {<>} => {}, i think 01:23:49 u(-{([r]}r but not quite either 01:24:18 hm 01:24:21 (-{ is -({ ? 01:24:30 u(-{([r]u}rr maybe? 01:24:40 er right 01:24:47 u-({([r]u}rr 01:26:07 er 01:26:12 u-({([r]u}rr is... <> => <<>> => <<>> => <> => <> i think 01:26:27 u-({([r]uu}rr 01:26:30 -({} is for each nonempty 01:26:45 no, for each empty 01:26:49 argh yes 01:27:20 um wait 01:27:28 the [r] is redundant 01:27:28 <>, <<>>, <<<<>>>>, <<>> 01:27:32 yes 01:27:38 for each empty, and then you empty 01:27:42 *([r] 01:27:49 <<>>, <<<>>>, <> 01:27:54 nice 01:28:07 does this work now? :D 01:28:12 yes 01:28:14 i think so 01:28:18 u-({uu}rr 01:28:50 u-({uu}rr... inc depth, then if depth is exactly 2, inc depth by 2, dec depth by 2 01:29:07 so 1, 2, 4, 2 01:29:08 *exactly 1 01:29:09 -!- augur has joined. 01:29:17 2, 3, 1 01:29:33 right i meant <> having depth 1 01:29:49 0 is the usual i think 01:29:55 let's go with that 01:29:58 means ordinal has its own depth 01:30:03 right 01:30:33 so okay maybe back to the actual problem? 01:30:58 well if we append that not to what we had, we can test for element <> 01:30:59 or i'll collect the algo first 01:31:17 ({({([r]}} -<<>> u-({uu}rr 01:31:47 checks if <> is in S 01:31:55 although i have a hunch we might combine it more somehow 01:32:29 probably 01:34:06 so about this {{a,{x}}, {b,{y}}} you mentioned 01:34:19 ({([r]} is the equivalent of >0 in C it seems 01:34:28 umm 01:34:48 (as an anything -> 0,1 function) 01:35:12 -!- Tritonio_GR has joined. 01:35:24 -!- oklofok has joined. 01:35:52 02:33 oerjan> ({([r]} is the equivalent of >0 in C it seems 01:35:52 02:34 oklopol> umm 01:35:52 02:34 oerjan> (as an anything -> 0,1 function) 01:35:59 damn 01:36:06 you missed my yes before you explained it 01:36:16 what yes 01:36:20 i said 01:36:20 umm 01:36:21 ys 01:36:24 *yes 01:36:27 heh 01:36:55 but yeah anyway are you sure you need to optimize that thing before we have a use for it? 01:37:20 er i'm not optimizing, just pointing out what that subroutine is 01:37:26 rrrright okay 01:38:05 i meant " although i have a hunch we might combine it more somehow", see it's starting to look like there's something to this thing, so tuples would be cooool. 01:39:08 -!- oklopol has quit (Ping timeout: 258 seconds). 01:39:15 let's say we make a = <>, b = <<>>, and add an extra {} around x and y so they are clearly of greater depth than either 01:39:40 then i think we should have a fighting chance of extracting x and y from it 01:40:55 so let's see, first of all is the idea {{<>, {x}},{<<>>, {y}}} and then ( end if x is zero [ decrement x, increment y ] 01:41:15 an _extra_ {} to x and y 01:41:24 so 01:41:39 {{<>, {{x}}}, {<<>>, {{y}}}} 01:41:48 yeah 01:42:06 okay actually this doesn't look all that hard 01:42:16 but let's see if the details are hard... 01:42:59 or wait 01:43:08 to decrement x, ( "check if contains <>" { rr and then you have x here } 01:43:25 {{<>, {{x}}}, {{y}}} might be enough 01:43:53 we don't need that <<>>, we can just reverse the test 01:44:09 erm 01:44:16 {{<>, {x}}, {{y}}} might be enough 01:44:31 (without <<>> that extra depth is one more than we need) 01:44:38 so to decrement x, how about ( "contains <>" { rr <> u } 01:45:02 sounds reasonable 01:45:39 so only {<>, {{x}}} triggers it and then it goes => {{x}} => {x} => {<>, x} => {{<>, x}} 01:45:40 so almost' 01:45:59 err 01:46:58 {<>, {{x}}} => r => {{x}} => <> => {<>, {x}} 01:47:12 where every second is an instruction 01:47:20 yeah 01:47:26 so to decrement x, ( "contains <>" { r <> } 01:47:58 inc y = ( "ain't contains <>" { u }?? 01:48:01 can it be that easy 01:48:13 um 01:48:33 only if we use {{{{{...}}}} for numbers 01:48:40 oh right 01:48:44 but then yes 01:48:59 otherwise ua is succ, but you need to rr out the y first 01:49:09 yeah 01:49:38 anyway we are optimizing here using ur = nop 01:49:55 let's do an _arbitrary_ A on each 01:50:09 -!- augur has quit (Ping timeout: 252 seconds). 01:50:22 ah 01:50:53 for x, "contains <>" { rrr A uu <> } 01:51:14 the whole thing for this special case would be ( "remove sets not containing <>" "get x out" "check length" [ ( "contains <>" { r <> } ( "ain't contains <>" { u } ] 01:51:17 ? 01:51:35 erm what 01:51:51 well i just tried to get the addition algo out 01:52:15 the condition removes y, then gets x out of its tuple, and checks its length 01:52:24 all of which i believe we can do 01:52:57 what is that? 01:53:08 *out of its set 01:53:13 well it's sort of a tuple 01:53:21 you mean for calculating (x,y) -> x+y ? 01:53:24 yes 01:53:44 then we'd have the result in y 01:53:52 nooga: *Toi 01:54:43 hm sounds reasonable 01:56:41 "remove sets not containing <>" = say -( "contains <>" {([r]} -<<>> 01:56:53 if it doesn't contain <>, then we make all its elements <> 01:56:54 err 01:57:15 not perfect but anyway it's clearly possible, i'm currently convinced anything trivial can be done 01:57:48 maybe if you add -<> it works 01:57:55 food -> 01:58:55 i fear ([] is not a one line parser change because of ({}... :< 01:59:25 maybe )[]! 01:59:28 :D 01:59:47 (A {B} C) [D] 02:00:09 -!- Asztal has quit (Ping timeout: 264 seconds). 02:00:19 i actually originally considered -- behold -- <{} for for each :D 02:02:41 ( "contains <>" { rrr A uu <> } runs X on {x} to get {y}, then uu => {{{y}}} => <> => {<>, {{y}}} 02:02:59 my other computer just bluescreened 02:03:06 i should probably consider doing some backups soon 02:04:03 -!- olsner has quit (Ping timeout: 258 seconds). 02:11:05 i am thinking this is probably TC now, even without the ([] extension 02:11:21 (we didn't actually use it for manipulating the pairs afaict 02:11:27 ) 02:12:12 well it was used for the addition 02:12:19 without what extension? 02:12:35 (A[B] rather than just [B] 02:13:19 but we don't need addition for say a minsky machine, dec/inc is sufficient 02:13:29 and a minsky machine is just one large loop 02:14:05 so what's the rules exactly 02:14:36 finite amt of integers, and you have a finite amount of repeated rules like dec this inc this inc this if this is zero 02:15:20 it's a transition table of states like for a TM, technically 02:15:40 each transition a rule like you say 02:15:55 hmm alright 02:16:01 and two integers are enough, plus the state 02:16:17 the loop might be nice anyway 02:16:43 http://esoteric.voxelperfect.net/wiki/Minsky_machine 02:17:06 yeah if we want to do anything "practical" 02:17:21 and a loop would probably allow a more direct compilation of brainfuck into it 02:17:55 -!- olsner has joined. 02:17:58 yes 02:18:01 that'd be sweet 02:18:30 well ignoring IO as at present 02:18:49 i thought i'd add the optimization to the interp that every set ever used is actually cached, this will make ordinals usable 02:19:19 like you just have any given set in one place 02:19:25 ah 02:19:32 hash consing 02:20:50 i... think so 02:21:32 anyway for IO do you have better ideas? i don't really like p 02:22:36 bf-complete IO more or less requires byte representations 02:23:07 for binary IO 02:24:54 for hello world, you'd need 64 which requires a million universes to represent as an ordinal 02:25:19 errr 64? 02:25:53 anyway 02:26:02 O_o 02:26:50 hm without sharing you mean... 02:26:50 -!- augur has joined. 02:28:07 yes 02:28:26 redheads or brunettes 02:29:56 !haskell let sizes = scanl (+) 2 sizes in take 10 sizes 02:30:00 he 02:30:09 ? 02:30:24 now what 02:30:25 [2,4,8,16,32,64,128,256,512,1024] 02:30:29 i was looking for a good optical raytracer that wouldn't cost $$$$$$$$$$$$$$$$$$$$$ 02:30:35 ah just powers of 2 02:30:48 and i realised that my only option is to write one 02:30:58 nooga: i could whip you one up in toi 02:31:13 toi? 02:31:27 oklofok: 2^65 isn't _that_ big ;D 02:32:02 2^65! 02:32:05 *? 02:32:10 i thought it'd be more like factorial 02:32:13 hm well H is 64+8 so 73 02:32:29 nah it seems it's powers of 2 02:32:40 huh. 02:32:41 <> <<>> <<><<>>> etc. 02:32:51 what's toi? 02:32:59 nooga: the language 02:33:10 which? 02:33:21 the one called toi! 02:33:25 All of them. 02:33:56 -!- olsner has quit (Ping timeout: 276 seconds). 02:34:15 nooga: oklofok is just joking, or possibly insane 02:34:30 yea, i've noticed :D 02:34:34 (given what i've seen of toi so far) 02:34:49 but i'm just curious about that toi 02:35:42 http://esoteric.voxelperfect.net/wiki/Toi 02:36:07 except the [A] command seems destined to be replaced with a more flexible (A[B] command 02:36:37 basically it's a language with finite sets 02:37:55 lol 02:38:59 we suspect it is turing complete 02:43:25 (we can encode a pair of sets as <<<>><>>, giving basic data structures to work with) 02:44:29 just encode some other turing-complete language in it 02:45:00 we actually thought of that already 02:48:08 -!- olsner has joined. 02:48:55 okay so 02:49:31 oerjan: ([] and -([] or just ([]? 02:49:46 if we don't have -([] then -({} feels impure 02:49:59 hmm 02:50:01 -([] is probably convenient 02:50:54 and it fits with the rest 02:51:13 i'll add it, it's convenient and it's basically impossible it'd be TC with it and not TC without it. 02:51:25 yes 02:51:40 given that we already _know_ how to do a not, indeed 02:51:41 the interpreter change will have to wait till weekend because of my exam 02:51:47 well yes 02:53:33 -!- Mathnerd314 has set topic: #esoteric, the international hub for esoteric programming language design and deployment - #esoteric is not associated with the joke language Perl, please visit www.perl.org - logs: http://tunes.org/~nef/logs/esoteric/?C=M;O=D. 02:54:08 :) 02:54:39 should i just completely drop the error set? 02:54:46 doesn't really seem useful anymore 02:54:55 oklofok: actually we used -({} to construct not, so the same cannot be said for that one 02:55:15 yes, i did notice that 02:55:25 oklofok: well, you haven't defined anything special for how the error set behaves 02:55:37 indeed i haven't 02:55:50 it's sort of a wart 02:55:53 i was going for the toggle behavior. 02:56:13 that you could remove <> or add it depending on whether it's there 02:56:18 or any other set 02:56:36 because that made it easy to check for some specific set 02:56:40 well it may still be awkward to test for sets other than <> 02:57:08 we should probably look into that 02:57:15 but i'll remove the error set for now 02:57:25 err 02:57:30 *for good 02:57:31 <.p 02:57:34 :P 02:57:59 down with evil errors! 02:59:28 http://esoteric.voxelperfect.net/wiki/Toi 02:59:39 the error set has been removed... sort of 03:00:07 what happened to []? 03:00:17 it's been changed for convenience 03:00:22 your example is no longer valid... 03:00:25 because addition was implemented with the new version 03:00:28 ah, true, thanks 03:00:59 fixd 03:01:01 i think 03:01:16 subtle, oklofok 03:01:52 now I'm not following... ([ runs with the empty set? 03:02:06 okay i admit the explanation wasn't very good 03:02:07 Mathnerd314: basically the old [] could not be used to get much of any information _out_ of the loop 03:02:32 so it was hard to use it nested for anything other than clearing S 03:03:16 yes, so the conversation of ours invented a way to get something out of it 03:03:21 Mathnerd314: <> doesn't make S the empty set, it _adds_ the empty set as an element 03:03:35 (it is empty at the start) 03:03:42 oh was he confused about the example 03:03:55 then why does <<>> add the set {{}}? 03:04:05 as an element, yes 03:04:22 <<>> adds {{}} to S, <> adds {} to S 03:04:37 So, S={}, running <<>> gives S={{{}}}? 03:04:42 yeah 03:04:43 yes 03:04:49 and S={}, running <> gives S={{}} 03:04:53 yes 03:04:55 ok 03:05:19 oerjan: did we use all of rua up there btw? 03:05:25 are they all actually necessary 03:05:31 i don't think a is 03:05:35 i just took three random operations that seemed pretty 03:06:03 it's only necessary if you want to use von neumann ordinals 03:06:04 oklofok == oklopol? 03:06:12 i'm oklo 03:06:15 yes 03:06:23 hmm right 03:06:46 it was actually a coincidence rua was exactly the successor and the precursor or whateversor 03:07:02 because i hadn't even thought of von neumanns at that point 03:07:04 oh 03:07:16 they just really were pretty operations. 03:07:31 there's one thing about a though - it's the only thing which copies information 03:07:43 but i'm not sure it does so in a useful way 03:08:13 like say you have x 03:08:18 and you want the tuple (x, x) 03:08:23 is that possible 03:08:39 i'm not sure and actually doubt it 03:08:41 hmm 03:08:46 so, in Von Neumann, 0=<>, 1=<0>, 2=<0,1>, 3=<0,1,2>, etc.? 03:08:52 Mathnerd314: yes 03:09:22 you might, instead of e, just have 0 1 2 etc. 03:09:37 i considered that 03:09:37 -!- olsner has quit (Read error: Operation timed out). 03:09:52 or just remove e 03:10:07 (since by definition it's just <>) 03:10:12 it's just a shorthand that accompanied the error set for fun. 03:10:19 eEeEEe 03:10:21 anyway 03:10:23 i think we actually forgot we had e in the above discussion 03:10:25 yes, it's useless 03:10:28 yeah 03:11:09 maybe define error set = ? 03:11:18 heh 03:11:43 that would make ([r] an infinite loop, though 03:12:18 that's the point of turing-completeness :-) 03:12:27 although we could do ([-Er] instead 03:12:42 (assuming E was made set notation) 03:13:04 Mathnerd314: not particularly, it's a trivial loop 03:13:18 turing-completeness requires undetectable ones 03:13:28 ok, see you later 03:13:39 x >> u >> {x} >> <> >> {x} <> >> u >> {x <>} >> a >> {x <>} x <> >> -<> >> {x <>}, x >> u >> {{x <>} x} 03:13:59 bye Mathnerd314 03:14:17 so doesn't that get you from x to the tuple (x, x) 03:14:24 given some extra wrapping in the beginning 03:14:28 wait what 03:14:38 notation may be a bit confusing 03:14:41 at least 03:14:59 you mean wrong ;D 03:15:19 i don't think so, but do explain 03:15:27 x means S = {x} 03:15:37 every second is S, every second is an operation 03:15:47 oh well 03:16:16 i believe that works 03:16:36 -!- nooga has quit (Ping timeout: 264 seconds). 03:16:39 you should too 03:16:49 please believe :< 03:17:03 if i can wrap my head around that {x <>} >> a >> {x <>} x 03:17:08 oh and bye mathnerd 03:17:22 there's a <> in the end 03:17:28 {x <>} >> a >> {x <>} x <> 03:17:32 oh 03:17:53 >> is not the best notation maybe. 03:18:18 that's not the hard part 03:18:25 oh than what is 03:18:40 your weird set notation with contatenation 03:18:41 *then 03:18:49 let me untranslate it 03:18:55 i just drop <> around S... 03:19:37 {{x,{}}} >> a >> {{x,{}},x,{}} 03:19:43 yes 03:19:49 ok it seems correct there 03:19:50 -!- MizardX has quit (Ping timeout: 260 seconds). 03:20:00 my notation was prettier :) 03:20:40 heh 03:20:50 i just realized by accident that changing [] to ([] might actually make my parser *shorter* 03:20:58 i 03:21:06 i'm still not gonna do it now but anyway 03:21:44 ? 03:21:51 nevermind that 03:22:17 actually 03:22:41 having {} around S is nice because you can't confuse S with instructions 03:22:42 ok i believe you can get (x,x) that way 03:22:47 thanx 03:22:58 if you use {} for S and <> for instrs 03:22:59 although some wrapping care is needed 03:23:09 as you said 03:23:24 yeah! 03:23:27 we got chris barker! 03:25:20 -!- olsner has joined. 03:29:09 -!- coppro has joined. 03:31:40 augur: i'm happy for you people 03:31:59 you should be! 03:32:03 semanticist AND esolanger! 03:32:08 right here are our university! 03:32:48 a guy at uni is an esolanger as well 03:32:57 sort of 03:34:16 -!- Tritonio_GR has quit (Read error: Connection reset by peer). 03:37:10 yes well 03:37:13 barker invented Iota 03:37:15 and is a prof 03:37:16 so 03:37:41 he invented the combinator itself? 03:41:30 oklofok: idea: add variables/functions to the language with = 03:41:44 no! 03:41:52 like e=<> 03:41:54 the whole idea is that you can only do stuff to the global set S 03:42:10 well how exactly? 03:42:27 well, it's just textual substitution 03:43:23 the whole beauty is the you can't access any individual object directly, you can just do an operation on all objects individually 03:43:46 well if it's done in such a way that it's convenient but essentially useless, then i might consider it 03:44:02 like numbers would be 03:44:13 yeah; that's all I'm thinking of 03:44:31 if you can actually use letters as storage, sort of as another S, then noo 03:45:05 maybe it's more like program-abbreviation 03:45:43 but yeah, shouldn't change anything about turing-completeness or whatever 03:46:39 hmm umm i'm not convinced 03:46:50 I'm guessing you should be able to define some of r, a, or u in terms of the others 03:47:21 with or without loops? 03:47:45 with loops 03:47:51 then i believe oyu 03:47:53 *you 03:48:01 your language has no meaning for , right? 03:48:08 nnope 03:48:56 that - is weird, then 03:49:15 no real semantics 03:49:26 huh? 03:49:28 pay no attention to me ;-) 03:49:30 - what 03:49:57 well i'll pay no attention to that last suggestion 03:50:03 compromise 03:50:38 as an example: tuple=u<>ua-<>u 03:50:47 you can write <> tuple 03:51:00 -!- coppro has quit (Remote host closed the connection). 03:51:23 oh you meant subroutines 03:51:31 well, they aren't 03:51:57 well macros whatever, what i meant is oh not variables that contain sets 03:51:57 because you just run it as <> u<>ua-<>u 03:52:07 well, they do contain sets 03:52:14 but variables that contain programs 03:52:20 like foo=<<<<>>>> 03:52:30 they can contain sets if they can contain programs, yes 03:52:38 but yeah, it's not a real set, it's a program meaning "add this set to S" 03:53:09 that sounds like a better idea than having variables that contain sets. 03:53:10 but 03:53:43 this is always a bit of a subtle issue 03:53:50 macros make the language less pure 03:53:53 but programs nicer 03:54:14 the thing is you could easily just have the macros from some other preprocessor 03:54:51 but then you could only actually show the obfuscated substituted in programs as toi programs, because the macros aren't part of the lang 03:55:17 yeah, it's a definite choice 03:55:19 i'll probably not add macros, and someone can make a derivative with macros WHEN it becomes popular. 03:55:26 heh :-) 04:00:48 ! 04:01:21 i should put clue on the wiki too given all this ATTENTION. except there's no mystery in clue so at least oerjan won't be interested 04:01:52 indeed, completely obvious 04:02:52 u-<<>>r 04:03:02 not without -({} 04:03:22 oh wait 04:03:26 u-<<>> 04:04:26 what are you doing 04:04:41 writing not... 04:05:03 to show that -({} is actually redundant 04:05:49 now more generally 04:07:02 u({([r]<>}-<<>> 04:07:44 u({...} ~ ...u? 04:08:08 no 04:08:21 -!- Gracenotes has joined. 04:08:24 ({...} runs on non-empty elements 04:08:38 right, we did this already 04:08:44 i don't learn that fast. 04:09:42 it turns every non-empty element into <<>>, so they can be removed 04:09:45 but yeah i think that's a correct not 04:11:11 S => {S} => {{{}}} => {} if S was nonempty 04:17:26 your FACE is nonempty 04:17:40 xDSSA 04:18:24 that's one reverse-ass smiley 04:21:02 stop mooning bsmntbombdood, oklofok 04:21:52 -!- bsmntbombdood has quit (Ping timeout: 246 seconds). 04:27:40 -!- Oranjer has left (?). 04:47:22 -!- zzo38 has joined. 04:47:36 -!- Gracenotes has quit (Read error: Connection reset by peer). 04:48:50 I have idea more to add to GCC __builtin_ functions/commands, including: 04:49:04 (all starting with __builtin_ prefix (or a different prefix)) 04:49:25 _fastest { code } else { code } optimizer selects faster code. 04:49:36 _smallest same as _fastest but selects smallest code. 04:49:48 _assume(expr) makes optimizer assume expr is true even if it isn't. 04:49:56 Optimizer does not know what's fastest. 04:50:31 but maybe it could compile into a program that runs both and returns the result of the one that ran faster 04:50:53 pikhq: No, it would guess what's fastest 04:51:04 Yeah, that's feasible if it's possible to run the relevant snippets independently. 04:51:06 But either way, _smallest would still work 04:51:21 Yeah, _smallest is pretty easy. 04:51:26 Compile both, compare code size. 04:52:30 -!- coppro has joined. 04:52:35 And if you wrote, _assume(x==5); x+=1; then, it would compile x=6; instead if and only if x=6; is considered better in the current optimizer mode. 04:54:29 I don't know how well that would work, or if you would instead need multiple kind of _assume commands such as _assume_equal and so on. 04:54:45 _assume would work pretty well. 04:54:58 -!- Gracenotes has joined. 04:55:11 The optimisers already have a bunch of assumptions that they do that sort of thing with. 04:55:35 For instance, GCC assumes that a pointer cannot be NULL if it was previously dereferenced. 04:55:50 You can write: __builtin_assume(x==5); y=__builtin_constant_p(x); y will now be 1 if the optimizer is turned on. 04:59:03 Also a way to remove assumptions, with codes such as: __builtin_fake { p=__builtin_anything(); } 04:59:34 And now it will get rid of assumptions about "p" because it now assumes p could be anything. 05:01:19 pikhq, wasn't there a security hole related to that? 05:03:49 Sgeo: In Linux. 05:03:54 Where that assumption is false. 05:03:56 What security hole do you mean? Probably it might be possible that there is such security holes. But I would like to know what security hole 05:04:15 How did that assumption manage to be false? 05:04:35 Sgeo: In kernel-space, NULL might be a valid address. 05:04:42 Meaning that it is entirely valid to dereference it. 05:04:47 Ah 05:05:09 (this is actually true in user-space with mmap, but *you will be shot* for doing so.) 05:05:36 linux execution squad 05:05:57 Going to go eat now 05:06:56 Yes, of course it very well could be a valid address, but if that is the case you would probably not use functions such as strlen() with it, anyways. You might do *(char*)0=0xFE; 05:08:54 The exploit resulted from mmaping some space at NULL, then passing it to a system call that had a minor bug that *could* cause it to jump to arbitrary space. 05:09:37 mmap? 05:09:38 Also, how do you figure out what the numeric type of a same size as a pointer address is? 05:09:42 *Normally*, it could only cause a jump into other bits of kernel space, but because a NULL check was being ignored, it managed to instead jump into a bit of user space. 05:09:52 zzo38: uintptr_t 05:10:00 pikhq: OK 05:10:17 Sgeo: mmap is a slightly odd and very flexible system call. 05:10:38 It allows you to lazily allocate memory, map a file into memory, and do a few other oddball things. 05:10:47 pikhq: Perhaps that is why you need to have such a command as __builtin_fake { p=__builtin_anything(); } so that you can stop ignoring such checks even in optimizer mode 05:10:47 You can request an address for it to map to. 05:11:08 zzo38: Command line option, actually. 05:11:14 Linux now builds with it. 05:12:09 mmap is awesome 05:12:16 But what if you want to change all of the optimizer modes on each individual line of a code? 05:14:47 I beat you to death with a baseball bat. 05:15:29 My idea is that, the instruction __builtin_anything() the optimizer would assume that its return value could be anything, but it is an error for the __builtin_anything() instruction to actually be compiled into the executable (unless the optimizer can determine that the part of the code referencing __builtin_anything() can never actually get executed, such as: {return; __builtin_anything();} ) 05:22:49 If GCC assumes a pointer cannot be NULL if it was previously dereferenced, can you check that with the __builtin_constant_p function? 05:23:07 (such as: __builtin_constant_p(!ptr)) 05:25:19 I dunno. 05:26:01 Perhaps I can check what the compiler does (I do have GCC on this computer) 05:29:41 No, that doesn't seem to work. But this does work: x=1; __builtin_constant_p(x); 05:30:41 -!- sebbu2 has joined. 05:31:13 -!- sebbu has quit (Ping timeout: 260 seconds). 05:31:13 -!- sebbu2 has changed nick to sebbu. 05:34:41 Can this work: #define lengthof(_1) (sizeof(_1)/sizeof(typeof(*_1))) 05:34:50 And this: #define FORCE_CONSTANT(_1) __builtin_choose_expr((_1),(_1),(_1)) 05:35:06 Yes and WTF? 05:35:24 (that's two answers, BTW) 05:36:09 Also, (sizeof(_1)/(sizeof(*_1)) should work. 05:36:20 Also, only (obviously) works right for actual arrays. 05:36:26 No pointers to chunks of memory. 05:36:43 Well, yes, obviously. It is meant for arrays, of course. 05:36:49 zzo38: Is this C or C++? 05:36:54 C 05:37:01 And it is GNU C, to be specific 05:52:01 #define RANGE_X3(_1,_2,_3) (_1(_3 0)_2),(_1(_3 1)_2),(_1(_3 2)_2) 05:52:10 #define RANGE_X6(_1,_2,_3) RANGE_X3(_1,_2,_3),RANGE_X3(_1,_2,3+_3) 05:52:59 -!- augur has quit (Ping timeout: 245 seconds). 05:55:11 Is there a way to make pipes loop in Linux, so that the output of the last command in a pipeline sent to the input of the first command? 05:55:28 -!- augur has joined. 05:56:52 Yes, but it's a pain. 05:57:00 I suggest named pipes. 05:59:38 Does any shell support the following way of doing it like: |nc example.org 1323|tr A-Z a-z| 05:59:55 Perhaps if I get computer I can put Linux, I can write the shell like that 06:00:20 So if you put | at the beginning and another at the end of the command-line it will do loop like that 06:00:22 Could add it to zsh. 06:00:40 (it's the Emacs of shells already. Would fit nicely.) 06:02:19 I do know a few things about Zsh, it seems better for code-golf than bash is 06:03:02 I'd suggest Perl, but IO is actually a pain in Perl 06:03:08 one of the few things it's bad at 06:03:52 pikhq: hmm... couldn't you do it with while true; do 06:04:13 *while true; do foo=$(really <<<"$foo" | long | pipe | here); done 06:04:33 coppro: No, because shell is not lazy. 06:04:40 that's what I'm relying on 06:05:04 Well, you're relying on nonexistent semantics. 06:05:09 Stop doing it. 06:05:21 why are they nonexistent? 06:05:29 Because they are. 06:05:52 the variable is substituted into the command, then the command is executed, then the output from the command is assigned to the variable 06:06:00 if you are really afraid of that, you could always use two variables 06:06:33 And then you'd see how wrong you are about how this is working. 06:06:42 uh 06:06:49 why? 06:06:55 (namely, it isn't) 06:07:13 You set foo to the result of a command depending on foo. 06:07:24 yes. And I just said you could use two variables 06:07:26 In order to get the result of that command, you must know the value of foo. 06:07:44 In order to get the value of foo you must get the result of that command. 06:07:56 while true; do foo="$(<<<"$bar" pipe | line | goes | here)"; bar="$foo"; done 06:08:18 Technically works, but I hate you. 06:08:25 you're welcome 06:08:33 testing on dash 06:08:38 And has quite different semantics from a proper pipe. 06:08:48 that much is true 06:10:08 eh, dash can't handle the syntax 06:10:12 so no way to test 06:10:52 wait, got it. It works there too 06:11:07 In Anarchy Golf there is only one file in a current directory, which is the program itself, which means you can write a (cheating) quine 2-bytes in Zsh 06:14:33 -!- jcp has quit (Quit: I will do anything (almost) for a new router.). 06:15:21 -!- jcp1 has joined. 06:15:24 http://golf.shinh.org/reveal.rb?Quine/zzo38%28cheat%29_1269737774&zsh 06:15:51 :) 06:22:24 -!- jcp1 has changed nick to jcp. 06:32:37 -!- augur has quit (Ping timeout: 265 seconds). 06:39:10 -!- oerjan has quit (Quit: Good night). 06:43:49 Do you like to invent spells in D&D game? 06:44:15 what? 06:44:57 No, tend to come up with very inventive ways of using spells in D&D instead. 06:44:59 Like, invent new spells for use in D&D game. 06:45:14 (presuming you mean D20 system) 06:45:22 Here are some of the ones I have done, if you are interested: http://zzo38computer.cjb.net/dnd/options/ (I cannot figure out what name I should give the _1 spell) 06:45:32 (_1 is just a temporary name) 06:46:08 I especially like the Object_Mirrored.s spell that I invented. 06:46:09 ah, no, I do not 06:46:51 Do you know what name I should give to _1.p 06:46:56 zzo38: where are you from? 06:47:28 coppro: Is that relevant? Check my IP address 06:49:27 Also, which D&D characters have you played (race/class/spells/etc) 06:49:47 I have never really played :/ 06:49:50 only DMed 06:50:07 also kept a book collection far larger than it should be 06:50:24 Most recently I played a barbarian bard cleric druid fighter monk paladin wizard warlock gestalted with soulblade. 06:50:33 coppro: OK, what campaigns, then? And what players have been 06:50:38 It was a very, very silly run through Tomb of Horrors. 06:50:46 Oh. And level 9. 06:50:56 pikhq: OK, what race and what spells? 06:51:11 zzo38: Human, and I actually didn't bother with a spelllist. 06:51:33 pikhq: Then how do you know what spells if you don't spells? 06:51:33 zzo38: Is that relevant? Check my IP address 06:51:49 zzo38: Level 1 spells at level 9? 06:52:05 coppro: How am I supposed to figure out that from your IP address, and of course it is relevant, isn't it? 06:52:12 Screw that shit. Scrolls of level 9 spells. 06:52:13 well, it might be 06:52:13 pikhq: Any level spells, whatever level spells you have 06:52:16 (there went *all* his cash) 06:53:09 Uh. Magic missile? 06:53:27 That's a common one. I never selected that spell, however. 06:53:36 It' 06:53:43 s probably the best level 1 spell. 06:53:57 I note that it is very, very, *very* hard to avoid damage from it. 06:54:22 No save, no AC, and almost nothing has DR against force. 06:54:44 zzo38: use Swap Eye on itself 06:54:45 Maybe it is, but I don't like it much. I nearly always select spells that do not do any damage 06:55:03 You, sir, are probably playing very poor casters. 06:55:04 coppro: You can't, that's a feat and it can not be applied to feats 06:55:09 zzo38: OH 06:55:13 I get it now 06:55:15 c s f 06:55:17 If you get clever you can do 1-shot nukes. :P 06:55:21 hmm... the mirroring spell is a great way to kill someone 06:55:42 It gets... Much, much, *much* scarier with a good psion/wizard build. 06:56:14 pikhq: Actually I try never to do damage I try to win without damage or kill, whenever possible because I play good-aligned characters, that's why 06:56:40 zzo38: "Good-aligned" does not mean "cannot damage or kill" you know. 06:57:01 BTW, might I suggest looking into non-lethal damage? :P 06:57:17 pikhq: I know that, but that is one way to be good-aligned even if not the only way, and of course there are a few exceptions 06:57:23 And yes, I do understand non-lethal damage 06:57:50 zzo38: the _1 sounds like a confession? 06:58:26 But what I like to do is to trick the opponent in different ways sometimes 06:58:54 coppro: The _1 is almost likea confession, I guess. Not quite, but still, I don't know the name? 06:59:03 * pikhq is still proud of geasing the drow race. 06:59:20 zzo38: I think 'confession' or something similar should be in the name 06:59:30 coppro: OK, that's an idea 07:01:33 -!- augur has joined. 07:02:12 My character has no magic items except for harp (the magic gives it +2 Perform) (we are members of Harper, this is the campaign) 07:02:27 My brother's character doesn't have many either, but he has no harp 07:03:07 -!- Gracenotes has quit (Read error: Connection reset by peer). 07:04:49 -!- Gracenotes has joined. 07:06:40 -!- tombom has joined. 07:07:30 The kind of trick I do is, one of them is as follows: Metamorphosis into human of the size to wear the unform so we can disguised as the army, steal the scroll, hide behind the tent, dismiss metamorphosis, dark, web, wait for wizard to attempt to dispel darkness (my brother's character helped to tell when), just before was doing, teleport away, leaving a crystal and the clothes in the area. 07:08:43 This really confused everyone. Everyone now believes lies... Someone thought the wizard did it but the wizard said they did nothing. And the tent teleported into turned out to be the toilet tent and the people inside thought my character was a big cockroach. After they get out to tell someone, I hide and then they look and see there is nothing in there! 07:09:13 Someone thought the soldier must be crazy, someone thought they must be running around naked, someone thought they must have turned into a crystal... See, it works. 07:11:06 Ah, the *other* useful half of a wizard's spell list. 07:11:08 Being fucking Batman. 07:11:09 :P 07:12:23 (The soldier they were talking about was actually in jail by then, but the other soldiers did not know that.) 07:13:00 What does it have to do with Batman? (I don't know about Batman very well, actually) 07:14:27 Batman, much like a wizard, can quite reasonably defeat anyone given prep time. 07:15:38 Ready for *everything*. 07:16:04 Now we need to send a forged note to the army. However, I have a different idea: Write a forged note to the emperor of the army (the note I stole was to send to emperor), that will make the emperor send a note to the army of the way I want. (No magic needed here.) 07:18:42 In fact, about half the time we need no magic, just paper or speech or even just a wood box might just do 07:20:13 this doesn't sound like the world i know 07:20:16 i'm scared 07:22:48 If I actually *do* need to damage someone, I suppose I can just bite (and poison) them, but that is hardly ever needed. Usually we can win without harming anyone. In fact, at least one time we won by *healing* the opponents instead. 07:23:59 Mostly the bite is just used as a threat of eating them if they do not comply. 07:24:35 (I don't actually have a high enough attack bonus to effectively use it most of the time anyways.) 07:24:38 -!- jcp has quit (Quit: I will do anything (almost) for a new router.). 07:25:09 tombom: 魔法がある世界。なぜ知らないか。(も、人々は日本語で話す世界。) 07:25:11 (And I don't care; because I don't need a high attack bonus. It is OK if this misses 80% of the time) 07:29:06 Or, of course, my brother's character, he is a ninja and can use sudden strike. He prefers to fight a lot 07:29:55 GAH 07:30:03 MAGIC THE GATHERING HAS RACE CONDITIONs 07:30:21 pikhq: There are rules how to resolve them 07:30:48 zzo38: No, the Grand Melee variant introduces actual race conditions. 07:31:03 pikhq: OK. Sorry I thought you meant standard rules 07:31:07 What's relevant is the existence of multiple stacks. 07:31:13 Which function concurrently. 07:31:31 The Grand Melee variant does have actual race conditions 07:33:34 Fun fact: spell resolution is not atomic. 07:35:17 -!- zzo38 has quit (Remote host closed the connection). 07:50:21 -!- tombom has quit (Quit: Leaving). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:13:35 -!- Sgeo_ has joined. 08:15:29 -!- Sgeo has quit (Ping timeout: 245 seconds). 08:22:01 -!- augur has quit (Remote host closed the connection). 08:22:11 -!- augur has joined. 08:24:25 -!- Sgeo has joined. 08:26:41 -!- Sgeo_ has quit (Ping timeout: 265 seconds). 08:30:12 -!- lament has joined. 08:34:57 -!- Gracenotes has quit (Read error: Operation timed out). 08:35:52 -!- augur has quit (Remote host closed the connection). 08:35:57 -!- augur has joined. 08:35:58 -!- Slereah has quit (Ping timeout: 246 seconds). 08:41:35 -!- Slereah has joined. 08:53:45 -!- Gracenotes has joined. 08:54:08 -!- lament has quit (Quit: lament). 09:03:25 -!- Gracenotes has quit (Ping timeout: 258 seconds). 09:15:36 -!- Gracenotes has joined. 10:34:00 -!- FireFly has joined. 11:04:30 -!- Slereah has quit (*.net *.split). 11:04:31 -!- dbc has quit (*.net *.split). 11:04:31 -!- fizzie has quit (*.net *.split). 11:04:31 -!- AnMaster has quit (*.net *.split). 11:04:32 -!- augur has quit (*.net *.split). 11:04:32 -!- Mathnerd314 has quit (*.net *.split). 11:04:32 -!- pineapple has quit (*.net *.split). 11:04:32 -!- fungot has quit (*.net *.split). 11:04:33 -!- myndzi\ has quit (*.net *.split). 11:04:34 -!- oklofok has quit (*.net *.split). 11:04:34 -!- iamcal has quit (*.net *.split). 11:04:34 -!- comex has quit (*.net *.split). 11:04:34 -!- jix has quit (*.net *.split). 11:04:34 -!- Leonidas has quit (*.net *.split). 11:04:35 -!- coppro has quit (*.net *.split). 11:04:35 -!- uorygl has quit (*.net *.split). 11:04:35 -!- ineiros has quit (*.net *.split). 11:04:35 -!- Sgeo has quit (*.net *.split). 11:04:35 -!- Quadrescence has quit (*.net *.split). 11:04:35 -!- olsner has quit (*.net *.split). 11:04:36 -!- rodgort has quit (*.net *.split). 11:04:36 -!- SimonRC has quit (*.net *.split). 11:04:36 -!- mtve has quit (*.net *.split). 11:04:36 -!- lifthrasiir has quit (*.net *.split). 11:04:36 -!- cheater2 has quit (*.net *.split). 11:04:36 -!- mycroftiv has quit (*.net *.split). 11:04:36 -!- sshc has quit (*.net *.split). 11:04:36 -!- Gregor has quit (*.net *.split). 11:04:37 -!- yiyus has quit (*.net *.split). 11:04:38 -!- Deewiant has quit (*.net *.split). 11:04:38 -!- FireFly has quit (*.net *.split). 11:04:39 -!- HackEgo has quit (*.net *.split). 11:04:39 -!- EgoBot has quit (*.net *.split). 11:04:39 -!- Geekthras has quit (*.net *.split). 11:04:39 -!- wareya has quit (*.net *.split). 11:04:39 -!- chickenzilla has quit (*.net *.split). 11:04:40 -!- Ilari has quit (*.net *.split). 11:05:45 -!- Adrian^L has quit (Read error: Connection reset by peer). 11:06:42 -!- sebbu has changed nick to 94SAAF2AN. 11:06:42 -!- pikhq has changed nick to 94SAAEFTX. 11:06:46 -!- Adrian^L has joined. 11:06:46 -!- pikhq has joined. 11:06:46 -!- sebbu has joined. 11:06:46 -!- FireFly has joined. 11:06:46 -!- Slereah has joined. 11:06:46 -!- augur has joined. 11:06:46 -!- Sgeo has joined. 11:06:46 -!- coppro has joined. 11:06:46 -!- olsner has joined. 11:06:46 -!- oklofok has joined. 11:06:46 -!- uorygl has joined. 11:06:46 -!- Deewiant has joined. 11:06:46 -!- cheater2 has joined. 11:06:46 -!- Mathnerd314 has joined. 11:06:46 -!- Quadrescence has joined. 11:06:46 -!- myndzi\ has joined. 11:06:46 -!- HackEgo has joined. 11:06:46 -!- EgoBot has joined. 11:06:46 -!- iamcal has joined. 11:06:46 -!- comex has joined. 11:06:46 -!- dbc has joined. 11:06:46 -!- mycroftiv has joined. 11:06:46 -!- fizzie has joined. 11:06:46 -!- rodgort has joined. 11:06:46 -!- Geekthras has joined. 11:06:46 -!- sshc has joined. 11:06:46 -!- fungot has joined. 11:06:46 -!- pineapple has joined. 11:06:46 -!- AnMaster has joined. 11:06:46 -!- Leonidas has joined. 11:06:46 -!- lifthrasiir has joined. 11:06:46 -!- mtve has joined. 11:06:46 -!- ineiros has joined. 11:06:46 -!- SimonRC has joined. 11:06:46 -!- jix has joined. 11:06:46 -!- wareya has joined. 11:06:46 -!- chickenzilla has joined. 11:06:46 -!- Gregor has joined. 11:06:46 -!- Ilari has joined. 11:06:46 -!- yiyus has joined. 11:06:51 -!- 94SAAF2AN has quit (Ping timeout: 280 seconds). 11:06:51 -!- 94SAAEFTX has quit (Ping timeout: 241 seconds). 11:10:11 -!- augur has quit (Remote host closed the connection). 11:10:20 -!- augur has joined. 11:24:36 -!- BeholdMyGlory has joined. 12:57:34 -!- kar8nga has joined. 13:06:31 -!- ais523 has joined. 13:10:24 -!- lereah_ has joined. 13:45:32 -!- nooga has joined. 13:48:34 -!- ais523 has quit. 13:49:46 -!- ais523 has joined. 13:50:28 -!- aschueler has joined. 14:08:08 ll 14:20:49 fizzie, there? Which llvm version are you using for jitfunge? 14:21:15 AnMaster: Some 2.7 prerelease 14:21:18 reading 2.7 release notes (note: 2.7 is at beta2 or something like that atm iirc): "The JIT now supports generating debug information, which is compatible with the new GDB 7.0 (and later) interfaces for registering debug info for dynamically generated code." 14:21:47 Whatever's in lucid; currently it seems to be "2.7~svn20100418-0ubuntu1". 14:21:58 I'll have to read about that later. 14:22:10 fizzie, that dynamic debug info thing might help with that bug in generated code you mentioned 14:27:59 interesting line from that same release notes: 14:28:01 "# The ARM and Thumb code generators now using register scavenging for stack object address materialization.(FIXME: WHAT BENEFIT DOES THIS PROVIDE?)" 14:28:49 hm that # seems to be a bug in firefox copy and paste 14:29:51 "# The X86-64 backend does not yet support the LLVM IR instruction va_arg. Currently, front-ends support variadic argument constructs on X86-64 by lowering them manually." <-- that has been there since ages. I wonder when they will fix it finally 14:31:14 Doesn't it do that for
  • nodes deliberately? In which case it's a feature, not a bug. 14:31:25 a weird feature 14:31:41 mapping it to * or the middot char would make more sense 14:31:55 Why does * make more sense than # 14:32:18 Deewiant, for a dot list. It isn't a numbered list 14:32:26 Why does * make more sense than # 14:32:47 there is a dot on my screen for it. And * is closer to the same shape. Plus the usual way to render such lists in plain text files 14:33:11 * or - are amongst the more common ones. # I never seen in any README or such for this purpose 14:33:12 What the bullet is can be controlled by CSS anyway 14:33:30 Deewiant, yes, and? 14:33:42 Deewiant, now instead tell me why # makes more sense than * for this 14:33:51 So "there is a dot on my screen for it. And * is closer to the same shape." is not a sound argument 14:33:59 Because what is on the screen can vary. 14:34:03 Deewiant, so why # 14:34:06 Why not? 14:34:34 Deewiant, See above. * is more common in plain text for such lists 14:34:55 Maybe this dates to before * became common 14:34:58 ever heard of "principle of least surprise to the user"? 14:35:15 I am completely uninterested in the bullet 14:35:17 Deewiant, you mean back to netscape 0.0.1 or such? 14:35:24 It could be ~»÷—–, whatever 14:35:30 any of* 14:35:44 AnMaster: Probably not that far :-P 14:36:31 Deewiant, well I think I have seen * for bulleted lists in really old text files. Older than the web certainly. 14:36:59 (heirloom toolkit age kind of things) 14:37:05 I've seen # for bulleted lists in text files 14:37:14 Deewiant, and that I have never seen 14:37:35 I've also seen - and § and others 14:37:54 well § is "paragraph". And yes "-" is quite common too 14:42:42 actually, some quick googling indicates that § is closer to "section". However the Swedish word "paragraf" is closer to this meaning. en:paragraph = sv:stycke. iirc sv:paragraf is mostly used in the context of law texts and similar 14:48:24 -!- nooga has quit (Ping timeout: 252 seconds). 15:06:18 Deewiant, btw the GCC 4.5 miscompliation seems to be a gcc bug. Unless you tell me (size_t)(-count) is not allowed by the standards. Here count is a int64_t 15:06:41 just printing the value out makes it not miscompile it btw 15:07:32 AnMaster: can you cut it down to a minimal testcase? 15:07:41 ais523, yes during the weekend I will do so 15:07:45 don't have time today 15:08:04 Deewiant, basically it miscompiles it so that: size_t stack_size = 6; stack_size -= (size_t)(-5); makes stack_size == 2 15:08:15 wait 15:08:17 not -5 there 15:08:21 it is -(-5) 15:08:21 even 15:08:32 so 6-5 = 2 according to GCC :D 15:08:49 only at -O3 though 15:10:16 AnMaster: undefined behaivour 15:10:18 *behaviour 15:10:47 aren't you trying to subtract a very large number from a signed number? 15:10:54 that causes signed overflow, which is undefined 15:11:18 ais523, no 15:11:24 ais523, 15:11:25 } else if (count < 0) { 15:11:25 stack_discard(SOSS, (size_t)(-count)); 15:11:25 } 15:11:34 that will be a *positive* number 15:11:45 ok, what type's the second argument to stack_discard? 15:11:46 -(-x) = x 15:11:55 ais523, size_t 15:12:01 and count is a int64_t 15:12:24 and the values that produce the bug are in the range "would fit in a signed char" 15:12:34 why are you casting explicitly then? that's normally asking to suppress warnings 15:13:25 ais523, iirc icc gave a spurious warning there otherwise. 15:13:33 or maybe some older gcc version did 15:14:23 ais523, point is however that there seems to be nothing undefined in that. Oh and just storing it to a size_t variable first and then passing that as argument hide the bug. So does printf("%zu\n",(size_t)(-count)) inside that block... 15:14:53 (as in: on the line before or the line after the call to stack_discard()) 15:15:11 ok, that only seems to have undefined behaviour if count happens to be holding INT_MIN 15:15:13 which presumably it isn't 15:15:38 ais523, indeed it didn't. Also why would it be undefined at INT_MIN? Don't you mean SIZET_MIN or whatever it is called 15:15:49 um, INT64_T_MIN or whatever it's called 15:15:49 size_t is unsigned 64-bit after all 15:15:51 yeah 15:16:00 because the unary minus overflows before the cast happnes 15:16:01 *happens 15:16:48 anyway, it is hard to make a minimal test case. It seems to optimise differently with just trivial changes 15:23:33 ais523, for example -fno-inline removes this bug 15:24:06 hmm, it's a bug with the way stack_discard is inlined? 15:24:37 ais523, hm removing restrict on stack pointer to stack_discard "hides" the bug too 15:24:48 but I'm pretty sure restrict *is* valid there 15:25:03 hmm, messing with restrict you always have to be careful 15:25:25 ais523, so perhaps some combination of restrict and inlineing triggers a gcc bug 15:26:26 ais523, yes but restrict should be valid here. It can't alias anything else in the scope of that function. However in the caller it could, but those vars are not visible in stack_discard. 15:27:00 perhaps restrict is being inlined incorrectly? as in, it's inlining the restricts to refer to the wrong scope? 15:27:08 on the other hand I think restrict is fairly pointless there nowdays since there should be no other variable of that type visible at all nowdays 15:27:14 ais523, yes perhaps 15:27:19 but then that is the compiler bug 15:27:55 however I'm a bit unsure about how it can result in a one-off error like this... 15:28:25 off-by-one* 15:31:54 ais523, okay from checking the code it is doing 7-5 instead of 6-5 15:32:00 which is even stranger 15:32:42 have you at least got a test case minimal enough to dump the compiler internals to see what's going on? 15:32:45 err, code as in asm and dumping registers 15:32:47 say, a couple of functions or so 15:32:47 -!- coppro has quit (Remote host closed the connection). 15:33:31 ais523, well that is what I'm not able to produce, I tried doing it and I had to have all the ip and funge stack logic needed to reach that point for it to happen. Oh and if you want to test this you need gcc 4.5.0 15:34:06 also I don't know if it is x86_64 only or such, will test -m32 later 15:34:35 -!- Asztal has joined. 15:35:05 -!- Mathnerd314 has quit (Ping timeout: 260 seconds). 15:35:21 -!- MizardX has joined. 15:36:45 -!- samosa has joined. 15:44:25 * AnMaster diffs the asm for good/bad code 15:45:10 okay that is strange 15:46:26 it seems to load it from memory without restrict, with restrict it reuses it from a register 15:46:32 but I think it reuses the wrong value 15:48:09 ais523, http://sprunge.us/IhiB 15:48:14 -!- Mathnerd314 has joined. 15:49:01 basically %rsi is what it thinks contains the top of the stack value, but for some reason it doesn't contain that. 15:49:02 ah, ok; the restrict's saying that the value can't have changed in the meantime, which is fine 15:49:13 but the register itself has been clobbered without gcc noticing? 15:49:35 ais523, if so it did it. There is nothing else that could have clobbered it 15:49:39 yep 15:49:43 and there is no inline asm anywhere near here. 15:49:53 unless assert() or something like that has inline asm 15:50:01 -!- lereah_ has quit (Quit: Leaving). 15:50:30 what does that nopl statement do? it's an opcode I haven't seen before 15:50:36 ais523, I'm not sure either 15:50:41 * AnMaster looks for the docs 15:50:51 it almost implies a no-op operation with an unusually large bitwidth, but that surely doesn't make sense 15:51:27 ais523, how so? For code alignment purposes perhaps? 15:51:39 if you need more than 1 byte 15:51:42 brb phone 15:53:39 bacl 15:53:41 back* 15:54:21 ais523, anyway I don't know what it is named in intel syntax, which while a lot harder to read, have names matching the AMD and Intel docs 15:54:43 -!- samosa has quit (Quit: samosa). 15:55:17 -!- oerjan has joined. 15:55:45 ais523, anyway, considering that it seems to use different nopl variants there I do think it is a wide nop 15:56:03 that takes an argument that does nothing? 15:56:24 ais523, the classical xchg %eax,%eax nop is iirc 1 byte and it takes an argument 15:56:39 heck it takes 2 of them 15:56:45 fair enough 15:57:23 ais523, and iirc intel docs mentions special-casing that one as a nop in modern CPUs, so it doesn't block other things depending on that register 15:58:47 ais523, anyway, from what I can tell yeah the restrict should be allowed there. And I can't find any place at all in the code where %rsi actually held the value gcc think it held 15:59:02 I don't know what it is holding instead... 15:59:38 ais523, do you remember how lea worked? 16:00:03 it basically just uses the addressing system of the processor to do arithmetic 16:00:25 ais523, so what about: lea -0x1(%rcx),%rsi 16:01:14 -!- Gracenotes has quit (Ping timeout: 276 seconds). 16:01:19 that sets %rsi equal to %rcx minus 1 16:01:46 huh 16:01:50 also huh @ "test %rsi,%rsi" 16:05:41 oh it probably tests if it is zero. I forgot the rFLAGS register stuff 16:11:01 -!- cheater2 has quit (Read error: Connection reset by peer). 16:11:54 -!- cheater2 has joined. 16:19:04 actually... hm 16:20:43 wth, if I remove the restrict on the argument to stack_pop_vector it give me *yet* another result 16:20:56 I think restrict + inlining is completely broken in gcc 4.5 16:21:46 except, if I remove all restrict it also gives me the wrong result 16:26:22 ah wait there was still restrict on another called function. Well removing that too then it gives the right resylt 16:26:24 result* 16:26:33 but restrict *should* be valild there 16:26:35 valid* 16:34:35 -!- Gracenotes has joined. 16:36:45 -!- lament has joined. 16:39:55 ais523, possibly relevant from gcc 4.5 release notes: "The infrastructure for optimizing based on restrict qualified pointers has been rewritten and should result in code generation improvements. Optimizations based on restrict qualified pointers are now also available when using -fno-strict-aliasing." 16:43:56 -!- ais523 has quit (Remote host closed the connection). 16:52:03 -!- Gracenotes has quit (Read error: Connection reset by peer). 16:54:03 -!- Gracenotes has joined. 16:55:59 -!- lament has quit (Quit: lament). 17:15:59 -!- tombom has joined. 17:17:58 -!- Gracenotes has quit (Ping timeout: 260 seconds). 17:27:45 -!- oerjan has quit (Quit: leaving). 17:48:44 -!- jcp has joined. 17:52:59 -!- Mathnerd314 has quit (Ping timeout: 245 seconds). 17:54:35 -!- Mathnerd314 has joined. 18:10:52 -!- nooga has joined. 18:14:24 -!- augur has quit (Ping timeout: 265 seconds). 18:19:34 -!- Gracenotes has joined. 18:34:29 -!- pikhq has quit (Read error: Connection reset by peer). 18:50:00 -!- augur has joined. 18:54:05 -!- augur has quit (Remote host closed the connection). 18:56:42 -!- Slereah has quit. 18:56:56 -!- Slereah has joined. 19:01:38 -!- augur has joined. 19:02:04 -!- BeholdMyGlory has changed nick to BeholdMyGlory_. 19:02:22 -!- BeholdMyGlory_ has changed nick to BeholdMyGlory. 19:03:31 -!- nooga has quit (*.net *.split). 19:03:31 -!- MizardX has quit (*.net *.split). 19:03:31 -!- Deewiant has quit (*.net *.split). 19:09:13 -!- nooga has joined. 19:09:13 -!- MizardX has joined. 19:09:13 -!- Deewiant has joined. 20:04:07 -!- pikhq has joined. 20:04:18 -!- augur has quit (Remote host closed the connection). 20:04:30 -!- tombom_ has joined. 20:05:48 -!- tombom has quit (Ping timeout: 264 seconds). 20:24:35 -!- jcp has quit (Quit: I will do anything (almost) for a new router.). 20:36:53 -!- nooga has quit (Ping timeout: 276 seconds). 20:39:51 -!- oklofok has quit (Ping timeout: 252 seconds). 21:20:15 -!- nooga has joined. 21:49:19 -!- Mathnerd314 has quit (Ping timeout: 258 seconds). 21:54:21 -!- Mathnerd314 has joined. 22:15:03 fizzie, there? 22:15:07 -!- Phantom_Hoover has joined. 22:15:21 -!- BeholdMyGlory has quit (Read error: Connection reset by peer). 22:17:06 I had an idea for how to figure out FOV of my phone, since it doesn't export that info in EXIF. What you do is you find an outdoor landscape (so the parallax we will get is insignificant) then you take a panorama with a "known good" camera, and _from the same spot_ you then take photos using the unknown camera. Then you include both in the panorama and let hugin estimate the fov from that. 22:17:30 of other there are other ways, from a 360° pano it should be possible to estimate it as well 22:18:17 What is the fov? 22:20:06 field of view. Well, what you really want is angle of view but no one seems to use the term "aov" for it 22:20:54 Phantom_Hoover, don't know if you noticed it but both fizzie and me likes to make panorams and HDR images and such. 22:21:06 for panoramas, you need to know the angle of view really 22:22:19 I would think you'd get some sort of FOV estimate simply by taking a pile of shots, adding control points and letting the optimizer optimize one fov for all the images. Might not be quite as accurate, but still. 22:22:43 fizzie, how would that work? 22:23:22 is there a reason that you can't do it with some pins and a protractor? 22:24:23 Phantom_Hoover, huh? 22:25:09 Phantom_Hoover, I want to estimate that on my mobile phone camera. Which, unlike my rather large and bulky "real" camera, I have handy everywhere. 22:25:44 Well, if you're trying to work out the angle the pictures encompass, you could stick a couple of pins at the edge of the picture, keep the camera in a marked position, and then measure the angle. 22:25:56 Phantom_Hoover, I tried with a protractor before (had to google what it was, didn't know the English word) but how does pins come into it? 22:26:07 ah hm 22:26:11 For marking points 22:26:26 Phantom_Hoover, well I tried moving myself to use some fixed points in that case 22:26:47 but the measurement error was too large to give any usable results 22:26:51 when I tried to measure the angle 22:26:54 AnMaster: I would think the correct FOV should lead to best control-point fit, since it's a different sort of image transformation (basically the image "size") than the yaw/pitch/roll positioning; so if you optimize positions and view, I think you should end up with some sort of view estimate. 22:27:04 more than 20° variation commonly 22:27:21 fizzie, hm. 22:27:55 fizzie, and then suddenly it rushes off to way wrong values (that commonly happens) 22:28:13 like from around 40° it jumps to 230° or such 22:29:24 Yes, it can do that. But if you start with a reasonable guess and have good points, I'm thinking it should converge sensibly. Assuming the images are short with different enough directions. 22:29:43 Doing the whole 360 degrees would probably help in that too. 22:29:56 fizzie, well yes but that is tricky with no tripod and so on 22:30:10 I mean, not just tricky, near impossible 22:30:44 -!- kar8nga has quit (Remote host closed the connection). 22:31:42 I've done a couple of full-circle shots freehand, I wouldn't call it impossible. At least as long as there's nothing nearby so that parallax movement is minimized. 22:32:40 The Sun-Earth L4 Lagrange point would be one suitable place, for example. 22:34:33 I leave the conversation for like 5 minutes and you've gone from photography to Lagrange points? 22:40:05 GCC is refusing to accept __asm__("jmp %eax" 22:40:06 : 22:40:08 : "A" (bin)); as valid code. Any ideas? 22:40:32 -!- tombom_ has quit (Quit: Leaving). 22:40:44 Isn't that jmp *%eax (if you want an indirect jump) in the AT&T syntax? 22:40:45 I've done a couple of full-circle shots freehand, I wouldn't call it impossible. At least as long as there's nothing nearby so that parallax movement is minimized. <-- yes quite 22:40:50 Ah. 22:40:58 but I know no such huge open areas nearby 22:41:09 I don't know much about gas syntax in general. 22:41:24 The Sun-Earth L4 Lagrange point would be one suitable place, for example. <-- for what? 22:41:40 AnMaster: For a huge open area, with no parallax movement problems. 22:41:50 hah 22:41:50 Phantom_Hoover: goto **bin 22:41:57 Erm. 22:41:59 goto *bin 22:42:09 Thanks. 22:42:12 Right, it has that computed-goto extension too. 22:42:14 pikhq, depends on what he is doing 22:42:24 pikhq, it needs to be a label for that doesn't it? 22:42:28 well 22:42:32 a pointer to a label 22:42:47 AnMaster: No, it needs to be a void* that points to an address to jump to. 22:42:49 It's not. 22:43:05 pikhq, wrong, I read about this on the llvm blog today. 22:43:14 It's from some code I scrounged which is meant to jump to an address in memory that was mallocced. 22:43:18 *As documented* it needs to be a "pointer to a label", but it is treated as an indirect jump. 22:43:29 pikhq, older (pre-2.7) llvm versions used to handle it by turning it into a switch case 22:43:30 AnMaster: LLVM handles it differently from GCC. ;) 22:43:37 since that was the only way to represent it in the IR 22:43:43 2.7 can do a lot more 22:43:52 pikhq, and yes "as documented" 22:44:14 pikhq, please do not use undefined behaviour. It makes me said 22:44:15 sad* 22:44:34 It's documented with the typical sort of warnings; "You may not use this mechanism to jump to code in a different function. If you do that, totally unpredictable things will happen." 22:44:34 -!- BeholdMyGlory has joined. 22:44:45 Note: not "may happen", but "will happen". 22:45:22 Still, I don't think they've quite managed to make absolutely sure that something unpredictable happens. 22:45:22 fizzie, yes and also you may not do anything except jump to that label pointer 22:45:23 But if one reads some raw machine code straight into memory how would one then execute it. 22:45:26 ? 22:45:27 you may not try to covert the value to an int to print what it is with printf or such 22:45:38 Phantom_Hoover, by doing what you did 22:45:47 not by computed goto 22:45:50 goto *bin or the inline asm? 22:45:52 OK. 22:45:56 Phantom_Hoover, inline asm yeah 22:46:17 Alternatively, you could make the machine code correspond to the platform's calling conventions and then use a function pointer. 22:46:52 That would be the *cleanest* thing to do. 22:47:02 And work on any compiler, not just a particular version of GCC. 22:47:15 Difficult. 22:47:29 Need to go anyway. 22:47:32 Bye. 22:47:33 -!- Phantom_Hoover has quit (Quit: ChatZilla 0.9.86 [Firefox 3.5.9/20100401213457]). 22:47:47 fizzie, yeah 22:47:55 fizzie, how does jitfunge with llvm do it? 22:48:02 and how did the old backend do it? 22:48:12 AnMaster: Actually, the result of unary "&&" may be used whenever a constant void* would be valid. It's just the actual goto *foo that can break shit. 22:48:36 (erm. Constant of type void*, not a const void*.) 22:49:07 pikhq, not according to the same llvm blog post 22:49:22 which claimed llvm 2.6 was implementing this to the letter 22:49:31 (giving us a DS9K implementation) 22:49:37 AnMaster: I'm looking at the GCC documentation. 22:49:55 "This value is a constant and can be used wherever a constant of that type is valid." 22:50:01 On the result of unary &&. 22:50:20 for which gcc version? 22:50:23 try an older one 22:50:26 around 4.0 or so 22:50:28 Looking at 4.4 ATM. 22:50:39 AnMaster: LLVM mostly handles the ugly details; calling ExecutionEngine's getPointerToFunction(Function*) method -- where Function is LLVM's function type that has the LLVM IR body and whatnot -- gives you a "void *" that you have to (a bit messily) cast to a function pointer. 22:51:26 "The value has type void *. This value is a constant and can be used wherever a constant of that type is valid." 22:51:33 4.0.4 documentation. 22:51:58 "The value has type void *. This value is a constant and can be used wherever a constant of that type is valid." 22:52:04 3.4.6 documentation. 22:52:26 "The value has type void *. This value is a constant and can be used wherever a constant of that type is valid." 22:52:32 3.3.6 documentation. 22:52:55 hm 22:52:56 I'll let you know if I find a change in the documentation of that this side of the EGCS merge. 22:53:05 pikhq, strange then I guess I was wrong 22:53:10 (The old jitfunge code generator also made the necessary function bits so that it was callable via a function pointer.) 22:53:32 pikhq, but see http://blog.llvm.org/2010/01/address-of-label-and-indirect-branches.html 22:53:52 "An interesting aspect about this extension is that the only thing you are allowed to do with an address taken label is to jump to it. While it is widely misused for other things (e.g. the BUG macro in the linux kernel, which prints the address of a label on error), you are really really only allowed jump to it. You are not allowed to use it in an inline asm, inspect the value, or do anything else." 22:53:56 which is then wrong I guess 22:54:06 pikhq, you should contact the person who wrote it 22:54:15 AnMaster: I should. 22:54:37 Though LLVM's implementation was, in fact, entirely correct. 22:54:54 GCC makes no guarantee that the address in question is an *actual* address. 22:55:10 Just that when you dereference it for an indirect goto, it jumps to the correct address. 22:55:31 pikhq, yeah I guess llvm could do 1,2,3,4,... 22:55:35 (in 2.6) 22:55:42 Which is what it does. 22:55:51 pikhq, what? 1-indexed? ;P 22:56:00 it should do zero-indexed of course ;P 22:56:03 Yes. 22:56:09 I've looked at the resulting assembly. ;) 22:56:15 hah 22:56:24 1-indexed would be pretty strange though 22:57:15 fizzie, why did you do it as a function pointer btw? 22:57:31 surely using a custom calling convention would have had less overhead? 22:57:50 well I guess less messing with storing registers in other ways... 22:58:45 Though it'd be the cleanest way to interface with the C code. There might have been some calls inside the generated code that used a non-standard convention, though. 22:59:49 ah 23:00:36 AnMaster: C calling conventions have very low overhead. 23:00:52 Particularly in x86_64, where passing in the registers is the norm. 23:01:17 The Scheme compiler I wrote for a course recently didn't use the C calling conventions, but that's perhaps more reasonable. 23:02:07 x86 tends to handle all the stack-handling stuff quickly. ;) 23:02:07 heh 23:02:07 fizzie, oh, how comes? 23:02:15 fizzie, and did you implement call/cc? 23:02:26 AnMaster: C calling conventions clash with most Scheme implementation methods. 23:02:39 right 23:03:03 Yes, it did continuations; there's not much point otherwise. 23:03:40 Used the ridiculously trivial way of just putting the "stack" under garbage collection, I think. 23:03:51 hah 23:04:09 fizzie, own gc? 23:04:46 -!- jcp has joined. 23:06:59 Yes, a very simple one. I think it was a copying/compacting one. Didn't have much time to twiddle with that. 23:07:44 fizzie, why not reuse an existing one? 23:07:49 NIH NIH 23:08:10 call/cc implementation: http://pastebin.com/fsT5KaRn 23:08:23 That's not very many instructions. 23:09:39 heh 23:09:48 -!- oerjan has joined. 23:09:52 oerjan, hi 23:09:57 hi AnMaster 23:10:17 bah oklopol isn't here 23:11:01 i had another comment on defining tuples in toi 23:11:43 -!- augur has joined. 23:13:11 -!- Mathnerd314 has quit (Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.2.2/20100316074819]). 23:14:30 -!- BeholdMyGlory has quit (Remote host closed the connection). 23:18:13 It's documented with the typical sort of warnings; "You may not use this mechanism to jump to code in a different function. If you do that, totally unpredictable things will happen." 23:18:30 can you use it in a different invocation of the same function? 23:19:42 probably it will work, but imagine this is in a dlopen()ed library. then you unload and reload the library 23:19:48 using it then would be stupid 23:20:06 well i was really asking whether it was guaranteed to work 23:20:18 no idea 23:20:26 probably not 23:20:43 oerjan: It doesn't seem to say, explicitly, but the example there is: "One way of using these constants is in initializing a static array that will serve as a jump table: static void *array[] = { &&foo, &&bar, &&hack };" 23:21:00 fizzie, yes but that is quite different 23:21:15 since it would be re-initialised on dlopen() 23:21:30 as opposed to saving it in a variable outside the library 23:21:48 There's also the "alternate way": 23:22:03 "An alternate way to write the above example is 23:22:03 static const int array[] = { &&foo - &&foo, &&bar - &&foo, 23:22:03 &&hack - &&foo }; 23:22:03 goto *(&&foo + array[i]);" 23:22:22 "This is more friendly to code living in shared libraries, as it reduces the number of dynamic relocations that are needed, and by consequence, allows the data to be read-only." 23:22:46 ah 23:23:08 &&foo - &&foo would be 0? 23:23:22 this seems to imply you can use pointer arithmetic on labels in the same function, then 23:23:49 -!- FireFly has quit (Quit: Hey! Listen!). 23:26:01 hm 23:26:47 oerjan: Yes, it is in fact a valid void*. 23:27:23 The only thing that will break is going to a label in a different function. 23:27:23 http://www.google.com/search?rlz=1C1CHNR_enUS321US321&sourceid=chrome&ie=UTF-8&q=BF-RLE 23:27:32 would dlopen()ing libpthreads instead of linking to it result in mayhem do you think? 23:27:39 same question goes for libm and libc 23:27:43 :( at people pirating my bf-isomorphic esolang :( 23:27:45 lol 23:28:02 Also, the pointer in question is not necessarily an actual numerical address. But, this is never guaranteed by C *ever*. 23:28:03 Sgeo, ? 23:28:11 AnMaster, my link 23:28:15 Look at the first result 23:28:21 pikhq: well from the discussion so far it seems like saving a label outside the function is dubious if it can be reloaded 23:28:34 "Fmin.v ((Rle min r) /\ ((f:float) (Fbounded b f) -> (Rle f r) ->(Rle f min))). (* Min is a projector *) Theorem ProjectMin: (ProjectorP isMin). ... www-sop.inria.fr/lemme/AOC/coq/Fmin.html - Cached - Filter"? 23:28:37 Sgeo, that one? 23:28:42 -!- BeholdMyGlory has joined. 23:28:48 AnMaster, no 23:28:50 oerjan: Only dubious because you might be able to jump to the label from outside the function. 23:28:50 or do you mean the second one? which seems to fit better with what you said 23:28:57 Sgeo, the second one is kazaa 23:29:01 Which will *usually* break the stack frame. 23:29:01 which seems pretty strange 23:29:05 That's what I was referring to 23:29:08 In very unusual ways, no less. 23:29:14 For me, it's the top result *shrug* 23:29:18 Sgeo, yeah, do no assume the results are in the same order for everyone 23:29:21 -!- BeholdMyGlory has quit (Remote host closed the connection). 23:29:33 And of course, in pre-2.7 LLVM, it'll just have the compiler kick you in the balls. 23:29:36 pikhq: hm this means the label _cannot_ be implemented as the actual code address pointer 23:29:44 The Fmin one is the 7th down for me 23:29:46 Yes it can. 23:29:57 Sgeo, well I'm logged in for gmail 23:30:02 that would probably affect stuff 23:30:10 * Sgeo is also logged in 23:30:13 It's just undefined behavior if you jump to it when you're not in the function. 23:30:14 pikhq: if the function can be reloaded, that would break it 23:30:20 and that would also personalise the results 23:30:22 differently 23:30:23 "Can be reloaded" wha? 23:30:41 When I'm not logged in, Kazaa does NOT appear in the first page of results 23:30:46 You mean... Uh... Linked in at a different address? 23:30:46 pikhq: AnMaster was pointing out functions from shared libraries 23:30:48 Does Google think I'm a pirate? lol 23:30:50 yes 23:30:52 Oh, yes. 23:31:03 oerjan, that only applies if you reload the shared library 23:31:14 since most likely the library will end up elsewhere 23:31:25 Just logged back in, but it's not appearing anymore 23:31:27 the DS9K llvm-2.6 implementation *would* have worked there 23:31:33 mhm 23:31:49 Sgeo, see, it is unreliable to depend on the order 23:32:03 If you are reloading a shared library into the same program's address space, but a different address, you are doing nasty things with the shared linker and deserve all the breaking you get. 23:32:25 If you are reloading a shared library into the same program's address space, but a different address, you are doing nasty things with the shared linker and deserve all the breaking you get. <-- eh? 23:32:33 pikhq, I meant *unloading* and *reloading* 23:32:37 Was GrainFimple ever implemented? 23:32:39 Yes. 23:33:01 pikhq, due to ASLR it will most likely end up elsewhere 23:33:04 If you retain a pointer to *anything* in the shared library, you get to keep both pieces. 23:34:35 hm i guess it's unreasonable to consider a reloaded library function to _be_ the same function in all respects 23:35:22 oerjan: Any stored pointers to anything in a reloaded library will break, this is just fact. :) 23:35:29 -!- Asztal has quit (Ping timeout: 245 seconds). 23:35:53 indeed 23:35:55 It's not just the stored labels, it's any global or static variable. 23:36:12 pikhq: although fizzie's "alternative method" quote seems to imply it could be safe to save _differences_ of label pointers. or maybe that's just an implementation convenience. 23:36:12 (including function pointers) 23:36:13 or function pointer 23:36:24 oerjan: Yes, that is. 23:36:42 oerjan, only difference in the same function 23:36:50 Because then, you're just encoding the offset from a different label. 23:36:55 AnMaster: well duh 23:37:11 So long as the actual *data* isn't changing, you're good. 23:37:45 -!- Asztal has joined. 23:37:49 mhm 23:38:01 If the dynamic library has changed between loads, well, you still geet to keep both pieces. 23:38:05 -!- Mathnerd314 has joined. 23:39:00 I wonder if with PIE it would be possible to do a "user space kexec()" basically? 23:39:11 loading a new binary and jumping to it 23:39:22 -!- coppro has joined. 23:39:30 i don't think that's legal proto-indoeuropean 23:39:31 That's... What exec does. And you can actually do it in userspace. 23:39:40 oerjan, ? 23:39:53 You just need to implement the ELF loading manually. 23:39:55 pikhq, no exec() would free the old address space 23:39:57 * oerjan swats AnMaster's pun detector into place -----### 23:40:04 AnMaster: Ah, yes. 23:40:05 AnMaster: http://codu.org/projects/gelfload/ :P 23:40:05 I want to keep the values in static variables and such 23:40:11 and all malloc()ed data 23:40:14 Still. You can do it without PIE just fine. 23:40:19 Erm. 23:40:23 pikhq, well then you need to load it in the same place 23:40:30 with PIE you can load it anywhere you want 23:40:43 You actually can relocate ELF files without it being PIE. 23:40:46 Gregor, g for gnome or g for gnu? 23:40:59 AnMaster: No. 23:41:05 pikhq, yes but that is a PITA 23:41:09 Gregor, well what then? 23:41:22 AnMaster: Read that line again. 23:41:26 PIE is actually only used so the relocation can be done without modifying any memory. 23:41:27 AnMaster: Your own line that is. 23:41:33 Same for PIC. 23:41:51 "4 months Gregor Richards Initial import.default tip" <-- 1) didn't use vcs from the start? 2) no longer working on it? 23:42:09 Gregor, which one of them? 23:42:29 AnMaster: You're... Dense. 23:42:40 pikhq, I'm sleep deprived 23:42:40 AnMaster: EVERY SINGLE ONE in which you asked one _G_regor Richards what the GEE in gelfload stands for. 23:42:41 practically a black hole, there 23:42:50 Gregor, oh thanks 23:42:52 right 23:43:10 oerjan, I still don't get your pun 23:43:12 AnMaster: I developed it as part of a defunct project called crosslibc, then split it out a while ago. 23:43:13 -!- Oranjer has joined. 23:43:24 Gregor, I know what it does 23:43:31 AnMaster: PIE = proto-indoeuropean, common linguist abbreviation 23:43:32 you told us before 23:43:51 AnMaster: That was my answer to your question about VCS X_X 23:43:52 oerjan, oh, never heard that. to me PIE = position independent executable 23:44:09 oerjan, alternatively (but that is seldom all caps) it is something you can eat 23:44:19 -!- Asztal has quit (Ping timeout: 258 seconds). 23:44:20 Gregor, oh right thanks 23:44:50 AnMaster: still, all the pieces for the pun were right there in the channel 23:44:58 oerjan, mhm 23:46:10 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 23:46:12 AnMaster: with that and the gelfload i think we can conclude you are acronymically challenged :) 23:46:14 I MUST CODE 23:46:21 oerjan, okay 23:46:37 oerjan, OPASFF 23:46:48 (disclosure: i didn't get g = Gregor either) 23:46:53 oerjan, :D 23:46:55 Gregor, ^ 23:46:55 argh! 23:47:08 oerjan, why "argh"? 23:47:15 OPASFF 23:47:38 oerjan, oh but MPAAFFS, WALITC 23:48:00 AnMaster: can we just agree to forget this ever happened 23:48:10 oerjan, forget what happened? 23:48:16 i dunno 23:48:20 nooga: THOU SHALT CODE A FUNGE 23:48:42 0"EGNUF A EDOC TLAHS OUHT" 23:48:52 oerjan, anyway, I don't think I should explain what it was due to YWGMAMFMSABP 23:48:55 parallel, supercomputer funge 23:49:19 you realize i'm not even trying to decode you at this point? 23:49:24 oerjan, hah 23:49:50 oerjan, well it was "Oerjan's Puns Are Sometimes FarFetched" in the first one ;P 23:50:12 oh, but that was obvious 23:50:18 * oerjan ducks 23:50:21 :P 23:50:50 "my puns are also far-fetched sometimes" 23:51:08 oerjan, yes 23:51:36 oerjan, but when you say it you can remove the "also" 23:51:37 :P 23:51:51 since you *are* oerjan 23:52:01 the one and almost only 23:52:15 what? 23:52:19 TOAAOO 23:52:27 yes you said that 23:52:49 "the one and only" is a cliche phrase 23:52:57 ah 23:52:59 right 23:53:22 WALITC == "well, at least in this case" 23:53:50 I keep reading that as "waltic" 23:53:55 rather than "walitc" 23:57:40 " This specifies the alignment for an integer type of a given bit size. The value of size must be in the range [1,2^23)." 23:57:47 what a strange range 23:58:30 -!- coppro has quit (Ping timeout: 258 seconds). 23:59:01 -!- Asztal has joined.