00:03:02 -!- sebbu has quit ("@+"). 00:14:26 townsville is solidly blue 00:14:56 unfortunately there was only one vehicle to escort voters to the polls 00:15:18 heh 00:52:23 -!- Corun has joined. 00:52:28 -!- ab5tract_ has joined. 00:54:36 -!- ab5tract_ has quit (Client Quit). 01:13:42 -!- GregorR has set topic: 270 electoral votes to win. OBAMA 77 ----- MCCAIN 34. 01:13:49 -!- Asztal has quit ("@"). 01:29:26 -!- GregorR has set topic: 270 electoral votes to win. OBAMA 81 ----- MCCAIN 34. 01:38:28 -!- lament has set topic: 270 electoral votes to win. PALIN 81 ----- MCCAIN 34. 01:41:50 -!- GregorR has set topic: 270 electoral votes to win. OBAMA 102 ----- MCCAIN 34. 01:59:03 heh. hi GregorR /lament 02:01:21 -!- GregorR has set topic: 270 electoral votes to win. CNN says: OBAMA 102 ----- MCCAIN 43. 02:01:26 'lo 02:02:13 usa elections amirite 02:03:01 Yuh 02:03:12 Some of us are Americans :P 02:04:06 DID YOU VOTE 02:04:08 -!- GregorR has set topic: 270 electoral votes to win. CNN says: OBAMA 174 ----- MCCAIN 49. 02:04:12 FOR THE OBJECTIVIST PARTY 02:06:34 I didn't vote, but for one simple reason... 02:06:45 My absentee ballot came in just in time to mock me. 02:06:57 "Haha, you won't get me in on time!" 02:14:25 -!- GregorR has set topic: 270 electoral votes to win. CNN says: OBAMA 174 ----- MCCAIN 64. 02:22:06 hey bitches 02:22:18 pikhq: DID YOU VOTE FOR GregorR 02:22:20 YES YOU DID 02:22:35 I voted for Rick Astley 02:23:20 heh 02:23:40 And he won, too :D 02:23:46 Best act ever on MTV 02:23:54 It will be the 10th, IIRC 02:23:56 lost the game 02:23:58 AND LOST THE ELECTION :( (nah) 02:24:03 It's going to be so awesome 02:24:44 http://mfrost.typepad.com/cute_overload/images/2008/11/04/herrings_all_the_way.jpg 02:24:46 :D 02:26:14 -!- GregorR has set topic: 270 electoral votes to win. CNN says: OBAMA 174 ----- MCCAIN 69. 02:37:46 -!- GregorR has set topic: 270 electoral votes to win. CNN says: OBAMA 194 ----- MCCAIN 69. 02:41:24 -!- GregorR has set topic: 270 electoral votes to win. CNN/Google: OBAMA 194/175 ----- MCCAIN 69/61. 02:46:11 GregorR: um 02:46:16 http://news.bbc.co.uk/2/hi/americas/us_elections_2008/7697829.stm 02:46:18 use that 02:46:22 it's the bbc, the bbc are cool 02:46:23 :p 02:46:41 Bloody effing grall 02:46:55 The BBC is a pretty cool guy 02:49:44 c'mon obama, just win, kthx 02:49:48 -!- GregorR has set topic: 270 electoral votes to win. CNN/Google: OBAMA 199/195 ----- MCCAIN 78/70. 02:51:02 -!- Slereah has set topic: 270 electoral votes to win. CNN/Google: SHRIMP 199/195 ----- HERRING 78/70. 02:51:22 -!- Asztal has joined. 02:51:52 I love how the BBC has a color for 3rd parties 02:52:01 yeah 02:52:02 -!- lament has set topic: 270 erectoral votes to win. CNN/Google: SHRIMP 199/195 ----- HERRING 78/70. 02:52:03 so useless :D 02:52:03 Like a third party is ever going to have anything anywhere 02:52:19 -!- ehird has set topic: 270 erections required to win.. 02:53:02 -!- lament has set topic: 270 erections required to win. CNN 199/195 ----- GOOGLE 78/70. 02:58:20 huge erections going on? 02:58:53 yes, huge erections in america 02:59:02 seems like CNN is winning 02:59:27 Don't blame me, I voted for Rick Astley 03:07:04 http://fora.tv/2008/02/19/Neil_DeGrasse_Tyson_Death_by_Black_Hole 03:07:06 WATCH IT 03:07:09 -!- GregorR has set topic: 270 electoral votes to win. CNN/Google: OBAMA 207/202 ----- MCCAIN 89/75. 03:21:48 -!- GregorR has set topic: 270 electoral votes to win. Everyone agrees that Obama has at LEAST 200 (even FOX!), and there are 73 freebies for Obama on the west coast. In short: OBAMA WINS!. 03:22:18 -!- Corun has quit ("This computer has gone to sleep"). 04:01:16 OBAMA 04:01:19 WPMMMMMMMMM 04:01:23 WONNNNNN 04:02:28 GregorR: :D 04:03:01 ^^ 04:20:15 -!- ehird has set topic: Obama won.. 04:20:19 -!- ehird has set topic: Obama won. Fuck yeah.. 04:31:43 -!- pikhq has set topic: McCain's conceded, rather than recount. Fuck yeah. | Obama won. Fuck yeah.. 05:00:24 -!- Sgeo has quit (Connection timed out). 06:15:13 i refuse to know what all this commotion was about. 06:15:46 Good idea 06:16:36 mccain? well i know what a *cane* is. osama was the tower guy. these fuck yeahs are probably just science fiction 06:16:55 lol 06:17:48 lickture -> 07:01:17 http://www.conservapedia.com/Barack_Obama // Hahahaha, this is so over-the-top-libelous it's not so much offensive as surreal :P 07:17:08 hey kids 07:18:19 GregorR: what does this mean "which most Christians would not retain." 07:21:20 Most Christians would not keep that as their middle name 07:22:09 oh 07:22:49 that's some shitty english right there 07:23:07 hehe 07:29:22 its not shitty at all 07:29:26 its perfectly fine and understandable 07:30:25 -!- KingOfKarlsruhe has joined. 07:35:17 psygnisfive: no it's not 07:35:27 yes it is 07:35:53 its a relative clause 07:35:58 how is it not fine and understandable? 07:36:33 it sounds like most christians would not retain hussien 07:37:22 ah, yes i can see what you mean 07:37:26 yeah there is ambiguity this is true 07:37:33 but that sort of construction is quite common in english. 07:38:35 There's nothign grammatically wrong with the way it is written. 07:38:45 nothing, too. 07:41:37 -!- KingOfKarlsruhe has quit (Remote closed the connection). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 09:59:13 yay Obama! :) 10:11:22 -!- lifthrasiir has quit ("leaving"). 10:11:47 -!- lifthrasiir has joined. 11:54:45 -!- lifthrasiir has quit (Read error: 104 (Connection reset by peer)). 12:09:18 -!- Slereah has quit (Read error: 110 (Connection timed out)). 12:41:07 -!- lifthrasiir has joined. 12:58:32 -!- KingOfKarlsruhe has joined. 12:58:53 -!- KingOfKarlsruhe has quit (Client Quit). 12:58:59 -!- KingOfKarlsruhe has joined. 13:03:37 -!- Corun has joined. 13:28:00 -!- ais523_ has joined. 13:37:28 -!- KingOfKarlsruhe has quit (Remote closed the connection). 13:39:25 -!- psygnisfive has quit (kornbluth.freenode.net irc.freenode.net). 13:39:26 -!- Jiminy_Cricket has quit (kornbluth.freenode.net irc.freenode.net). 13:39:47 -!- psygnisfive has joined. 13:39:47 -!- Jiminy_Cricket has joined. 13:56:13 -!- ais523_ has quit ("http://www.mibbit.com ajax IRC Client"). 14:00:36 -!- Corun has quit ("This computer has gone to sleep"). 14:30:19 hi ais523_ 14:32:09 -!- Judofyr has joined. 14:32:15 lol that conservapedia article 14:32:18 is amazing 14:51:30 -!- ehird has set topic: Obama won. Fuck yeah. | But Prop 8 passed. lol@usa. 14:58:42 what's prop 8= 14:58:43 ? 14:58:51 -!- jix has joined. 14:59:18 gay marriage 14:59:44 i see, and passing would be which way exactly? 14:59:50 I don't know 15:00:43 oklopol: a while back (ages ago), california allowed gay marraige 15:00:49 prop 8 has passed, and it's reversing that 15:00:56 http://www.kcra.com/california-proposition-8/index.html 15:01:03 yeah okay. 15:01:38 lol@usa kinda gave away they removed gays and not the other way 15:02:01 but as i didn't remember they existed in the first place 15:02:05 but yeah californum 15:19:42 ITT: UK government surveillence reaches the internet http://www.telegraph.co.uk/news/uknews/3384743/Internet-black-boxes-to-record-every-email-and-website-visit.html 15:34:58 -!- Judofyr_ has joined. 15:46:21 hi ais523 15:47:13 hi ehird 15:51:27 -!- Judofyr has quit (Read error: 110 (Connection timed out)). 15:51:45 * ehird was awake at 5am yesterday x_x 15:52:16 yeah we know 15:52:31 so was I 15:52:59 my sleep cycle is pretty normal nowadays :< 15:58:49 -!- sebbu has joined. 16:39:09 so im wholesale ripping off jayCampbell 16:39:14 and writing a brainfuck-program-generator 16:39:15 ^.^ 16:39:17 hmm 16:39:24 think i could breed programs to hello world? 16:39:41 that was managed for Malbolge once, BF seems like it would be easier 16:40:23 i'll just generate random programs for now 16:40:24 hmm 16:40:28 I think I could rip the interpreter out of bff.c 16:40:34 although then I'd have to code t he generator in c 16:40:38 it'd be nice and fast but .. 16:50:54 -!- oerjan has joined. 16:52:12 -!- Judofyr_ has quit (Remote closed the connection). 16:52:49 -!- Judofyr has joined. 16:54:57 -!- KingOfKarlsruhe has joined. 17:11:18 Californians will burn in hell for passing Prop 8. This will be nicely ironic. 17:12:35 oerjan, using capitals? 17:12:37 unheard of! 17:12:43 ey? what? 17:12:53 psygnisfive: whaddya mean what 17:13:04 why will it burn in hell now? 17:13:13 'cause prop 8 is evil, presumably 17:13:27 well banning gay marriage is bad mkay 17:13:29 but 17:13:43 i dont see what oerjans talking about 17:13:54 i don't see how you can not see what he's talking about? 17:14:01 ehird: tongue too much in cheek, affects capitalization 17:14:01 it's plain, simple english... do you have troubles with it? 17:14:05 :p 17:14:10 oerjan: you might wanna get that checked out 17:14:12 sounds painful 17:14:26 psygnisfive: the irony is the theory that God vehemently disagrees with fundamentalist Christians 17:14:46 oh i see 17:14:46 but _still_ burns people in hell 17:30:01 http://www.flickr.com/photos/ajohnhart/sets/72157608561494488/ creepy 17:34:54 barack obama, now as grey goo 17:36:31 whole new meaning to the term obamabots 17:36:45 there was an old meaning? 17:37:00 yeah 17:37:07 people who mindlessly supported obama 17:38:59 http://colony14.net/id53.html 17:39:04 "November 4 is getting close, and unless something dramatic happens it looks like Barack Hussein (“I am not a Kenyan”) Obama, Jr. (alias Barry “I am not an Indonesian” Soetoro) will become the next President of the United States." 17:39:25 Soetoro is a cool name 17:39:26 is that any worse than being mindlessly american? 17:39:39 barack hussein i am not a kenyan obama, jr. 17:39:41 aka 17:39:44 barry i am not an indonesian soetoro 17:40:05 incidentally, anyone else here noticed that Obama seems to use British English not American English? 17:40:33 british english? since when? 17:40:34 ais523: Is that such a *bad* thing? 17:40:37 his accent was not british 17:40:38 I don't think so 17:40:44 ais523: he seems to give off more of a british vibe than american, for some reason 17:40:49 (The reason is that he's a communist terrorist.) 17:40:56 psygnisfive: he said "autumn" rather than "fall" referring to the season in his victory speech 17:41:09 autumn is acceptable parlance in america 17:41:19 less common, but not unheard of either. 17:41:30 well, I suppose so 17:41:35 while british english exclusively uses autumn, and fall isnt even acceptable 17:41:40 also he doesn't have much of an american accent 17:41:41 FALL IS UnACCEPTABLE 17:41:45 *UNACCEPTABLE 17:41:51 FASCIST BRITS :O 17:42:04 -!- Corun has joined. 17:45:39 http://www.irregularwebcomic.net/cgi-bin/poll.pl?a=7 17:46:09 hah 17:47:35 while i voted for Obama, i do agree the Allosaurus was probably the second best in that election 17:47:57 -!- ehird has set topic: Ron Paul won. Fuck yeah.. 17:48:03 s/agree/think/ 17:48:04 lol 17:48:21 see the internet is always right 17:48:48 ehird: is that a quote of something? 17:49:04 oerjan: what, ron paul? 17:49:10 yes 17:49:24 oerjan: ron paul was the official presidential candidate of the annoying internet for the longest time 17:49:32 especially reddit&digg 17:49:34 also the Fuck yeah 17:49:43 no, i put that there when obama won 17:49:43 :p 17:50:43 the annoying internet 17:50:50 yes 17:50:51 that needs to be an acronym 17:50:55 TAI 17:50:59 doesn't trip off the tounge 17:52:02 "Looking ahead to 2010, House and Senate Democrats will be jealously eyeing Obama’s e-mail lists and technology secrets" 17:52:14 obama apparently operates a high tech research facility 17:53:17 totally 17:53:19 i should imagine the republicans would be eyeing them even more jealously 17:53:55 you'd think 17:54:05 obama people dont have to be rational tho 17:54:18 http://daringfireball.net/2008/11/the_fantastic_monument 17:54:21 case in point 17:54:27 psygnisfive: yeah 'cause mccain supporters are way more rational 17:54:31 i'm sure they would love to use his funding method 17:54:45 ehird: oh, no, they're worse 17:54:47 but that's a given 17:54:59 so its hardly worth mentioning 17:55:04 republicans are by default nutjobs 17:55:11 psygnisfive: there's nothing that inherently makes obama/mccain supporters irrational, although mccain supporters have a better chance due to the candidate they support... 17:55:20 i think it's just a case of that most people are pretty stupid 17:55:30 true 17:55:48 im just tired of hearing people pour their hopes and dreams into this one person 17:55:56 as tho hes some sort of magical panacea 17:56:09 give them some slack, they've had bush for 8 years 17:56:42 true 17:56:46 but its like 17:56:50 my roommate was like 17:56:57 I VOTED FOR OBAMA BECAUSE OBAMA IS FOR CHANGE 17:56:58 OK 17:56:59 CHANGE 17:57:01 GRR 17:57:08 and when i asked him what sort of change he was like 17:57:14 CHANGEY CHANGE 17:57:14 well i dont actually KNOW ok 17:57:15 MORON 17:57:16 >:D 17:57:22 :D 17:57:25 and im not exaggerating either 17:57:29 i wish i was 17:57:31 but thats what he said 17:57:37 he didnt even know 17:57:42 i just ask python who to vote, it knows every time 17:57:52 oklopol: who did it say 17:58:04 -!- ehird has left (?). 17:58:14 i doubt you care much about the elections i've voted in 17:58:14 -!- ehird has joined. 17:58:14 bye 17:58:21 -!- ehird has left (?). 17:58:33 wabi! 17:58:37 oh 17:58:39 no wabi 17:58:47 -!- ehird has joined. 17:59:02 bye 17:59:03 i doubt you care much about the elections i've voted in 17:59:41 oklopol: run it on the us election 18:00:23 oklopol, has ais sussed the program yet? 18:01:00 psygnisfive: nope. 18:01:05 lame 18:01:09 we should add more stuff to the competition 18:01:12 its no fun otherwise 18:05:28 ehird: python says mccain 18:05:39 oklopol: what algorithm 18:05:47 random.choice. 18:05:54 oklopol: i was hoping you'd have an awesomely okoy algorithm to do it 18:06:04 i'm aiming for that @ next election 18:06:21 it's just i decided this is my way to vote like one day before the election i voted in. 18:09:13 random voting seems a little weak. what you want for true chaos is something like geohashing for politics. then many people will vote the same way, but randomly. 18:09:33 lolwut 18:09:43 hah 18:10:15 that will _really_ screw up the predictions 18:13:40 i are tired :( 18:13:54 berb 18:24:50 -!- olsner has joined. 18:31:33 ehird, are you ignoring me? 18:31:33 oerjan: i like that 18:31:40 if not I got a question 18:31:44 no, but i sould be 18:31:47 *should 18:31:47 and what 18:32:17 ehird, I have been trying to find out how to get length of an unicode string in python, in chars not bytes, for about half an hour without luck 18:32:24 and since I know you are good at python 18:32:27 len(s) 18:32:30 ah 18:32:44 len(x) = length of x, for any x where that makes sense 18:32:49 ah ok 18:32:51 calls "magic method" x.__len__() 18:33:40 ah yes I did look at the unicode and string class docs without luck. thanks a lot 18:33:41 :) 18:34:08 np. 18:35:52 -!- asiekierka has joined. 18:35:55 BOO! 18:36:18 LEAN! 18:36:32 Well, what can a Polish foreigner say about the US election. 18:36:46 preferably nothing 18:36:54 Someguy won, that's fine, Someotherguy lost, that's fine, BUT WHAT ISN'T FINE IS... 18:37:09 The US election was talked about more here than our Polish election! 18:37:11 Now that's weird 18:37:19 No-one cared about the polish election 18:37:25 And everyone cares about the US one! 18:37:35 thats because poland isnt the worlds largest supporter of international terrorism. 18:38:28 Also, how's Esolangs? 18:38:33 also because nobody cares about poland 18:38:39 wow, i just got an idea that is easy and could work and would be cool 18:38:41 that's rare. 18:38:45 hm 18:38:51 wh at is it 18:38:56 it is cool. 18:38:57 ehird tell tell :D 18:39:01 Tell or you'll die 18:39:11 psygnisfive: i want to quickly hack up a test of it first to maake sure it might work 18:39:12 but no fear 18:39:15 i shall tell imminently. 18:39:16 ok 18:39:19 10... 18:39:21 9... 18:39:22 8... 18:39:23 7... 18:39:24 6... 18:39:26 5... 18:39:27 4... 18:39:29 SPEE... 18:39:29 also asiekierka just dequalified himself 18:39:31 SPOO... 18:39:32 by spamming 18:39:35 *disqualified 18:39:36 SPONE! 18:39:37 * asiekierka got kicked 18:39:39 -!- asiekierka has left (?). 18:39:44 thank god. 18:39:45 .. 18:39:56 -!- asiekierka has joined. 18:40:05 No, just kidding *cough*sadly*COUGH* 18:40:16 ehird, what happened to optbot? 18:40:21 AnMaster: not here? huh. 18:40:35 thank god 18:40:36 stupid unstable POS 18:40:42 psygnisfive: why? 18:40:45 optbot is awesome. 18:40:48 everyone loves optbot. 18:40:53 optbot was annoying 18:41:00 not as annoying as SeppBot in #compling but 18:41:01 nobody else agrees with you. 18:41:08 Wait, now there's thutubot back! 18:41:08 so tough shit, i'm restarting it 18:41:08 MURDER! 18:41:15 THUTUBOT MURDERED OPTBOT! 18:41:21 thank you asiekierka. 18:41:27 -!- optbot has joined. 18:41:27 -!- optbot has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | I love you. 18:41:33 Uh-oh 18:41:47 optbot: test 18:41:48 ehird: it stars 'oko' and 'kok' this one does 18:41:53 hey guess what 18:41:56 michael crichton is dead 18:42:11 cool. 18:42:23 he was a horrible author 18:42:56 also topic, why Ron Paul of all the possible choices? 18:43:07 AnMaster: because ron paul is the Comedy Internet Option 18:43:17 * AnMaster googles 18:43:28 he was all over reddit/digg/whatever 18:44:06 ah ok, I usually don't read such sites, however I wonders, why did they focus on him? 18:44:16 'cuz everybody loved him. 18:44:23 'cuz he was all OH CONSTITUTION 18:44:40 Also he's a gold-standard-moron, and that's always funny :P 18:44:49 heh 18:53:44 ^bf +[] 18:53:44 -!- asiekierka has quit (Read error: 104 (Connection reset by peer)). 18:53:49 ...out of time! 18:53:58 haha, that's really funny 18:54:00 -!- asiekierka has joined. 18:54:24 asiekierka wrote an infiniloop in #IRP, I copied it to fungot over here to figure out what it did, and then asiekierka quit... 18:54:25 ais523: no one will ever have to consider it trivial to extract the information automatically declared) 13 lines. unfortunately, that foundation is often incomplete. 18:54:38 ais523: My IRC crashed 18:54:54 yes, because it was trying to run an infiniloop was the implication 18:55:09 quite a few of the bots in here used to /quit if you infinilooped them 18:55:14 although that doesn't happen nowadays 18:55:17 +ul (:^):^ 18:55:18 ha 18:55:19 ...out of time! 18:55:24 now i understand the joke 18:56:38 +ul (-)(-)((:S(|)S:(~)~a*^*)~a*^:^):^ 18:56:39 -|--|---|-----|--------|-------------|---------------------|----------------------------------|------------------------------------------------------- ...too much output! 18:56:53 ais523: awesome 18:57:07 ehird: I think there are shorter ways, that was just idiomatic 18:57:35 :) 18:57:47 asiekierka: Unlambda or Underload? 18:57:52 Unlambda. 18:57:56 ok 18:57:58 Unlambda this time 18:58:02 do you know lambda calculus? 18:58:05 Nno. 18:58:16 5th grade elementary 18:58:22 probably it's best to learn that first, or getting your head around Unlambda is basically impossible, so I'll teach you now 18:58:29 Okay 18:58:34 it's more an esolang basis than something you're taught at school 18:58:39 ok 18:58:50 {{if anyone wants to comment, feel free!}} 18:58:58 basically, in imperative langs like BF, you write down the commands you want in the order they happen, and you have things like loops and ifs to make them happen in a different order 18:59:05 and you have variables to store data 18:59:08 (the tape in BF) 18:59:14 In lambda calculus, you don't have variables...? 18:59:18 yes 18:59:29 the only variables you have in lambda calculus are the params to functions 18:59:30 And the result of the code itself is the output, right? 18:59:40 and in "pure" lambda calculus, yes 18:59:53 Unlambda includes an output function though 18:59:56 although some lambda-calculus-based langs like Unlambda have side-effect output functions 19:00:00 so they're "impure" 19:00:11 yes 19:00:19 Okay, now the lambda calculus basis 19:00:26 How does it work 19:00:31 it's based on the concept of functions, first of all 19:00:31 yes, only params to functions 19:00:36 +ul (-|)(~:S(-)~*~:^):^ 19:00:38 -|--|---|----|-----|------|-------|--------|---------|----------|-----------|------------|-------------|--------------|---------------| ...too much output! 19:00:39 yes 19:00:44 if you want to be able to store data, get another functoin and pass it as a param 19:00:51 oh wait that was fibonacci 19:00:52 and you can make functions at will 19:00:54 now, the tricky parts: 19:00:57 Yeah. 19:01:04 you can generate functions at runtime, from templates 19:01:09 and you can pass functions as arguments 19:01:13 yeah. 19:01:26 wait 19:01:34 what do you mean by "generate functions at runtime, from templates"? 19:01:38 yes, at runtime 19:01:40 let's do 99bob in a hypothetical high-level lambda calculus lang, to give you some idea of how it works 19:01:44 but what do you mean by templates 19:01:51 ok, ais523 19:01:54 asiekierka: basically, they're like functions but with things missing 19:02:04 numbers, functions, or other fill-in-the-gaps stuff 19:02:08 ok 19:02:14 So, what about the 99bob thing 19:02:18 Yes. 19:02:25 oh wait, ignore the Yes 19:02:39 well, to print one bottle of beer, you could do a function like this (hypothetical syntax) 19:03:13 lambda(a) {print a, " bottles of beer on the wall,\n", a, "bottles of beer,\ntake one down, pass it around,\n", a-1, "bottles of beer on the wall.\n"} 19:03:23 Yes 19:03:33 nice and simple, basically the same as in an imperative lang 19:03:36 the only difference is we have the lambda operator here that creates a function with no name 19:03:41 and we can pass it around like a variable 19:03:45 And {} is the function 19:03:51 in this syntax, yes 19:03:55 So we can repeat it 99 times, and here we go, it's the 99bob program 19:04:11 yes, 99 times with different arguments, but that's normally considered cheating when writing 99bob 19:04:16 Yes 19:04:19 you want to use some kind of loop, normally 19:04:28 But i mean, repeat at runtime 19:04:30 you do it recursively 19:04:36 there are no looping constructs; in an imperative lang, you'd use recursion 19:04:49 The code is some kind of thing which pastes the var 99 times, and executes it 19:04:52 something like function b(x) {lambda(a){...}(x); b(x-1);} 19:05:00 that doesn't work in lambda calculs because the functions don't have names 19:05:05 Ok 19:05:17 you can still do recursion, but it's a bit trickier 19:05:28 Hm. 19:05:35 recursion is possible in LC, just not conveniently 19:05:44 Okay, psygnisfive. 19:05:45 ehird, another quick python question: I looked more closely this time, I need to check if a string contain a #, I guess the __contains__ is what I want, (looked at help(unicode)). But I'm not sure, and what is the "special" way to call the __contains__ one then? 19:05:51 YC is recursive. 19:05:56 suppose I have lambda(f,x){f(f,x);}, which is a function I'll call sii for reasons which become clear later 19:06:09 AnMaster: '#' in string 19:06:11 infact, a recursive version would probably look very YC. 19:06:11 AnMaster: I think you should read a basic tutorial. 19:06:12 ish 19:06:14 now, if I apply that with a function and an arg as its first argumetn 19:06:23 ehird, you are probably right :) 19:06:25 *a function as its first arg, an arg as its second 19:06:29 AnMaster: try http://diveintopython.org/ 19:06:35 thank you 19:06:41 it'll give the function /itself/ as an /argument/ 19:06:50 Yes 19:06:56 hopefully I don't have to code too much in this, I can't say I like the language, but there was no alternative 19:07:19 So, it basically runs itself by carrying the params 19:07:27 one of them is a function 19:07:32 ais' version is basically it. if sii has a conditional recursion within it, e.g. if x = 0 ... else sii(sii,x-1) 19:07:35 so, lambda(f,x){f(f,x)}(lambda(b,a){lambda(x){...}(a); b(a-1)})(99) 19:07:39 and yes 19:07:47 all the information you need, you carry in params 19:07:50 AnMaster: What are you using it for? 19:07:54 if a function needs to loop, it needs to call itself 19:07:57 so it needs itself as a param 19:08:09 (and the ... prints out one line of bottle of beer) 19:08:16 ehird, there is the bot framework pywikipediabot, I needed to code a custom wikipedia bot to use on a wiki I edit 19:08:26 yes 19:08:29 AnMaster: There are bot frameworks for other langs 19:08:38 But Python is good, so. :p 19:08:41 I understand 19:08:55 ehird, ah but I already use several scripts for pywikipediabot, changing wouldn't be that easy. 19:09:04 ok, that's basically a high-level language using lambda calculus for control flow 19:09:09 Unlambda is very low-level, though 19:09:18 so there are several changes that need to be made 19:09:26 first, Unlambda doesn't allow functions with more than one arg 19:09:29 but there's a trick to get around that 19:09:33 ok guys 19:09:40 im off to my syntax seminar 19:09:41 see ya 19:09:42 Make the one arg two args combined? 19:09:43 consider this trivial function: lambda (a,b) {a+b} 19:09:46 and bye psygnisfive 19:09:53 asiekierka: that might work, but there's a cleverer way 19:10:03 remember you can generate functions from templates? 19:10:08 Huh... yes 19:10:18 I can change lambda (a,b) {a+b} to lambda(a) { lambda(b) {a+b} } 19:10:22 multiple arguments are abstract anyway you know. 19:10:33 lambda(a,b) is as good as what ais just said 19:10:33 say I call that function with the arg 2 19:10:45 psygnisfive: yes, I'm trying to explain why though 19:10:46 or as good as lambda(c) where c = 19:10:50 psygnisfive: shut up 19:10:54 ais523 is trying to explain the basics 19:10:54 to asiekierka 19:10:57 or any other shit like that. 19:10:59 then, I get lambda(b) {2+b} 19:11:00 you're just adding confusion on to that. 19:11:06 good :D 19:11:06 bye 19:11:18 and let's say b is five 19:11:23 so the result is 2+5=7 19:11:30 then if we give 5 to the resulting function, we get 7 19:11:45 Ok 19:11:54 instead of calling it as (lambda (a,b) {a+b})(2,5) with 2 args, it's called as (lambda(a) { lambda(b) {a+b} })(2)(5) 19:11:57 -!- asiekierka has quit (Read error: 104 (Connection reset by peer)). 19:12:15 * ais523 waits for asiekierka's connection to fix itself 19:13:08 -!- asiekierka has joined. 19:13:12 ..What did i miss 19:13:20 instead of calling it as (lambda (a,b) {a+b})(2,5) with 2 args, it's called as (lambda(a) { lambda(b) {a+b} })(2)(5) 19:13:21 I stopped on I see 19:13:31 I stopped once I noticed you leave 19:13:31 Ok 19:13:40 so what we have here is a function which returns a function 19:13:55 you give it the first arg, it returns a function that takes the second arg and gives you the result 19:14:06 :) 19:14:07 btw, Haskell is based on that principle, as well as a few others, it's called "currying" 19:14:38 asiekierka: note that this means that you can't have variable-argument functions 19:14:46 unless you can tell when you have the last arg 19:14:47 also, in Unlambda you don't have a semicolon operator or anything like that to combine statements 19:14:50 e.g. if you have to give it a DONE arg 19:14:55 then it can return the final func or itself 19:15:04 ehird: a bit advanced, but correct 19:15:04 mhm 19:15:13 this is just to make it more annoying I think 19:15:17 ais523: i tried to say it simply :p 19:15:22 in Unlambda, absolutely everything returns a result 19:15:31 and things won't run until their result is available 19:15:36 even ".a"? 19:15:44 yes 19:15:46 in Unlambda, everything takes one arg too 19:15:53 even things that would normally take zero 19:15:54 ehird: i've once been pondering using d as a special marker for variable-argument functions in unlambda 19:15:57 .a prints a, and returns its arg 19:16:02 oerjan: you are mad 19:16:09 so, a Hello World 19:16:11 oerjan: wow 19:16:13 xD 19:16:19 .h.e.l.l.o.w.o.r.l.dr? 19:16:33 asiekierka: needs ` 19:16:34 not quite, you need to apply the functions in the right order 19:16:37 you can't do funcarg 19:16:41 you have to do `funcarg 19:16:46 but yes, what ais523 said too 19:17:12 ``````````.h.e.l.l.o.w.o.r.l.dr? 19:17:23 ehird: in my interpreter i instead used an explicit argument count (since you need to count the right number of `s anyhow), but an ending d should have been possible 19:17:24 `r`.d`.l`.r`.o`.w`.o`.l`.l`.e`.hi 19:17:33 in order to run r, it has to calculate its argument first 19:17:44 The other way also works, but is utterly stupid 19:17:47 which is .d applied to something, it has to calculate /its/ argument first 19:17:48 and so on 19:17:53 until you end up with `.hi 19:17:56 which prints h and returns i 19:17:59 What's i? 19:18:07 identity 19:18:08 identity function, I could have put anything there 19:18:09 `ix = x 19:18:15 it's just a placeholder as I need to give the function some argument 19:18:38 whereas your program prints hlloworld\n 19:19:04 whoops, no it doesn't 19:19:07 Tested in the original unlambda interpreter 19:19:07 v2 19:19:09 helloworld\n 19:19:10 it prints helloworld without the final newline 19:19:19 it's a bit complicated how though 19:19:23 asiekierka: 19:19:24 it first prints h and returns .e 19:19:26 ``````````.h.e.l.l.o.w.o.r.l.d`ri 19:19:27 should work 19:19:28 i think 19:19:29 Or 19:19:35 then that .e prints e and returns .l 19:19:37 ```````````.h.e.l.l.o.w.o.r.l.dri 19:19:40 ah 19:19:41 yes 19:19:44 and so on 19:19:44 that works 19:19:44 :D 19:19:50 so yes, ```````````.h.e.l.l.o.w.o.r.l.dri should work 19:20:07 Okay 19:20:09 each letter prints itself then returns the next letter, which is then run with the letter after that as its arg and so on 19:20:09 i got this around 19:20:23 so it's more complicated than my version, but has the advantage of running forwards in the source 19:20:40 now, the major feature of Unlambda is that despite being based on lambda calculus, it doesn't actually have lambdas 19:20:41 sadly, brb 19:20:47 [[going off for a sec]] 19:20:50 -!- asiekierka has changed nick to asie[away]. 19:20:51 and ok, I'll wait for you to come back 19:23:13 ais523: variable argument functions in unlambda is not mad(der than the rest of the language), it's in fact the only way to get really compact lists 19:23:15 -!- asie[away] has changed nick to asiekierka. 19:23:16 back 19:23:18 that's cause it's based on combinatory logic, not lambda calculus 19:23:19 you may continue 19:23:40 oerjan: it makes sense in the context of Unlambda, just not on any other level 19:23:51 asiekierka: basically, you have three functions s k i 19:23:54 which are predefined 19:23:57 Yes 19:24:00 i is the placeholder 19:24:01 and which you can generate any lambda function out of 19:24:04 Now what's the k and the s? 19:24:08 i is very simple, it's lambda(x) {x} 19:24:29 and instead of just saying what k and s are, it's probably easier to explain where they come from 19:24:35 ok 19:24:53 suppose you have lambda(x) { lambda(y) { x(y) } } 19:25:04 and you want to get rid of the lambdas 19:25:09 yes 19:25:31 let me think a moment... 19:26:05 the x in the inside isn't affected by the value of y at all 19:26:18 so if we want to write it as a function of y, it would be lambda(y) {x} 19:26:33 the y is irrelevant here, and quite a lot of the time in Unlambda you need a way to get functions like that 19:26:38 that's where k comes in 19:26:49 k(x) returns a function which always returns x no matter what its argument 19:26:53 yes 19:26:55 so k(x) = lambda(y) {x} 19:27:11 now, y as a function of y is also very easy 19:27:18 it's lambda(y) {y} which is i 19:27:48 so, what's x(y) as a function of y? it's lambda(y) {x(y)} obviously, but Unlambda doesn't let you use lambdas 19:28:01 this is where s comes in 19:28:03 Oh 19:28:22 s(a)(b)(y) is (a(y))(b(y)) 19:28:37 in other words, suppose we need to calculate x(y) 19:28:52 and we have both x and y as functions of y, which we do 19:28:58 x as a function of y is k(x), y as a function of y is i 19:29:04 so I can do s(k(x))(i)(y) 19:29:18 So it'll do both x(y) and y(y) 19:29:24 And output their result as the final result 19:29:24 no 19:29:33 it'll do k(x)(y) and i(y), and apply one to the other 19:29:37 k(x)(y) is x 19:29:39 i(y) is y 19:29:43 xy? 19:29:43 so the output is x(y) 19:29:48 oh 19:30:05 so, anything else? 19:30:10 so if s(k(x))(i)(y) is x(y), then s(k(x))(i) must be lambda(y) {x(y)} 19:30:17 so that's got rid of one of our lambdas 19:30:21 Yes 19:30:36 in Unlambda notation, btw, this would be ``s`kxi 19:30:42 thanks 19:30:43 where x isn't unlambda at all 19:30:54 to get rid of the other one, we can follow the same rules again 19:31:01 which I haven't stated yet, but implied 19:31:06 there's a mechanical way you can change things... 19:31:11 ` changes to ``s 19:31:20 yes 19:31:33 f changes to `kf for any f which doesn't involve the thing we're lambdaing 19:31:38 and the thing we are lambdaing changes to i 19:31:59 mhm 19:31:59 so ``s`kxi changes to ``s``s`ks``s`kki`ki 19:32:19 which is how you write lambda(x) { lambda(y) { x(y) } } in Unlambda 19:32:29 ...oh GOD 19:32:37 this is actually enough information to be able to write Unlambda programs, most of them are just compiled directly like that 19:32:47 ...scary, but neat 19:32:59 generally speaking, Unlambda's described as not all that hard to write if you know what you're doing (due to that transformation), but basically impossible to read 19:33:19 yeah 19:33:27 Unlambda has a few other operators just to make things a lot harder 19:33:39 d and c in v1 19:33:43 And some other in v2 19:33:44 there's c, which gives imperative programmers nightmares, and d, which gives functional programmers nightmares 19:33:44 right? 19:33:51 and yes, but v2 is just to allow I/O 19:34:01 also v, but that's just shorthand and not particularly interesting 19:34:12 ais523: btw, do you want v2 original interpreter's EXE? 19:34:24 (by the way, i can be written as ``skk but that's more coincidence than anything particularly interesting IMO) 19:34:42 asiekierka: ais523 uses linux 19:34:43 asiekierka: I run Linux not Windows, I could run it but there wouldn't be much point 19:34:43 mostly 19:34:52 so do most people in here :p 19:34:52 (useful for obfuscation... if anyone would ever want to do it) 19:34:55 besides I think I have the V2 interpreter 19:35:05 the Linux version, though 19:35:09 not sure if it's the original 19:35:23 and i have the Windows version; compiled by Cygwin; with the garbage collector 19:35:28 and the ``skk trick mostly impresses people who like to get the number of commands down 19:35:39 ah, I can't run Cygwin executables here, it doesn't play well with Wine 19:35:45 oh 19:36:19 Which part of hell do you want: the d part or the c part? {{unlambda commands}} 19:36:19 i think ``skk is ugly 19:36:32 i is clearly more basic than s 19:36:37 lament: so do I 19:36:43 so i deserves to be a builtin 19:36:44 asiekierka: c is neat, elegant, and basically impossible to explain 19:36:45 d is not strictly necessary, while c is necessary for I/O 19:36:52 and therefore your builtins aren't orthogonal 19:36:55 ugly :( 19:36:57 Oh 19:37:00 oerjan: c is only necessary for I/O because the I/O model is stupid 19:37:13 So who wants to go to the c part of hell 19:37:32 not the I/O model per se, but the choice of booleans 19:37:32 asiekierka: I'll try to explain c in one line, then everyone who doesn't know what it does already can go wtf 19:37:41 and i think of it as evil, not stupid 19:38:02 so more like Obama than Bush 19:38:05 and one of the best decisions 19:38:29 if you call c with an argument, then it runs the argument but gives it an argument which is a magical construct called a continuation, and if the continuation ever gets run it goes back in time to when c was called and returns the argument given to the continuation from c, rather than running c's argument 19:38:51 ... I have this urge to go wtf 19:38:59 But i'll try to understand it 19:39:15 oerjan: ok, it's an esolang, deliberately choosing a choice of booleans that need something as crazy as c to work with is very eso 19:39:34 asiekierka: I'll help you along 19:39:47 ok 19:39:58 it helps slightly if you imagine c as Unlambda's version of goto, it completely messes up the control flow mechanism 19:40:20 basically, if you call a function, it can return normally 19:40:32 but in imperative languages, you normally have a return statement that lets you break out of the middle of a function 19:40:45 Unlambda doesn't have a return statement to break out of functions directly 19:40:48 I think `ci = `ci(`*i) = `i(`*i) = a deliberate pile of nothingness, huh? 19:40:51 but c lets you generate such statements 19:42:05 so in an awful mix of notations and paradigms, suppose I do `c lambda(r) {while(true){print "press q to quit\n"; if(getkey()=='q') r(0); }} 19:42:31 it's pretty clear here that c is being used to generate a return statement, r in this case 19:42:52 and the place you put the c allows you to choose which function to return from 19:42:59 ais523: Did i work with c right, in my example? 19:43:08 I'm not certain I understand your notation 19:43:26 ais523: its standard... 19:43:32 (`*i) is the Esolangs wiki's continuation notation 19:43:35 (...) = continuation with * = the thing pased to the continuationn 19:43:36 Unlambda's website uses 19:43:38 ah, ok 19:43:59 I never really tried to get my head around notations for imagining continuations, I find them much easier to imagine than to write down 19:44:49 I prefer analyzing how I think it does it, and then comparing it with how it works 19:45:12 makes sense 19:45:47 And fixing my thinking patterns 19:46:19 `ci returns a continuation which returns the continuation's argument instead of the continuation 19:46:42 ...pain 19:47:18 the main problematicness in continuation-related thinking processes is the go-back-in-time thing (btw, I'm planning to use them for Feather, they're the perfect choice for it) 19:54:26 No, i did some stuff wrong 19:54:40 ``cii - ``i(`*i)i - `(`*i)i - `ii - ` 19:54:45 ... - i 19:54:46 i mean 19:54:53 not ... - ` 19:54:55 but ... - 1 19:54:57 er 19:55:02 but ... - i 19:56:33 yes, that looks right 19:58:50 unlambda? 19:58:54 AnMaster: yes 19:58:55 mmhm 19:59:07 Now i'm trying to learn c 19:59:11 I think asiekierka's beginning to see why I said c was basically impossible to explain 20:01:48 ais523, eh? 20:01:58 what has C got to do with unlambda? 20:02:16 AnMaster: c the Unlambda command, not C the language 20:02:20 ah 20:02:32 is C "get current continuation"? 20:03:04 -!- ais523 has set topic: the entire backlog of #esoteric: http://tunes.org/~nef/logs/esoteric | there's c, which gives imperative programmers nightmares, and d, which gives functional programmers nightmares. 20:03:05 err 20:03:05 c 20:03:18 it's call with current continuation, almost the same 20:03:25 `ci would be get current continuation 20:03:27 ais523, ah just call/cc 20:03:41 well I don't understand call/cc but I'm beginning to 20:03:44 after several weeks 20:03:45 `ci = ii 20:03:48 with scheme 20:03:48 `cr = rr 20:03:57 ais523, also what is d in the topic 20:04:00 not the language I guess? 20:04:06 it's unlambda chars 20:04:09 AnMaster: nope, the Unlambda command 20:04:18 ais523, and what does that d do? 20:04:21 it means something along the lines of "don't evaluate this yet" 20:04:40 it causes something to be evaluated the next time its value becomes relevant, rather than immediately 20:04:58 requesting lazy evaluation on a specific bit? 20:05:29 ais523, or? 20:05:43 yes, it's like case-by-case lazy evaluatoino 20:05:46 *evaluation 20:06:01 but considering that d can be passed around as a function argument just like anything else in Unlambda, it causes absolute chaos 20:06:40 oh I can see that 20:06:41 -!- asiekierka has quit (Read error: 104 (Connection reset by peer)). 20:06:47 but it doesn't actually sound hard to understand 20:06:56 no, it's probably easier to understand than c 20:07:00 much harder to /use/, though 20:07:02 -!- asiekierka has joined. 20:07:23 ais523, yes... how would it be used? 20:07:42 normally to make side effects happen later rather than now, it shortens the program a lot 20:07:54 heh 20:08:15 asiekierka: actually `ci = `i(*) = (*) 20:08:17 otherwise you have to put in lots of ``s`kk stuff in order to cause the command that would cause the side effect to be constructed at the last moment rather than running earlier 20:08:36 Is there any other worthwhile esolang than befunge, brainf**k, piet, underload and unlambda? 20:08:46 lots 20:08:56 as in, really worthwhile and popular 20:08:59 not many 20:09:04 also, popular is irrelevant 20:09:05 Does DOBELA count? 20:09:41 brb 20:09:49 doebla isn't popular afaik? 20:10:03 yeah 20:10:04 it's not 20:10:09 but is it worthwhile 20:11:06 hm 20:11:07 hm? 20:11:09 boolfuck? 20:11:11 rube? 20:11:14 err 20:11:15 RUBE* 20:11:27 Yeah, ok 20:11:32 is DOBELA worthwhile? 20:11:41 ooooooooooooooooooooooooooooooooo 20:11:48 no clue 20:12:06 Check it out 20:12:43 HQ9+ 20:12:47 well not really 20:12:53 famous yes 20:12:55 HQ9+ is worthwhile 20:13:00 only it's worthwhile for 5 seconds 20:13:00 asiekierka, famous though 20:13:01 no more 20:13:01 most of the interesting ones are incredibly hard to program in. 20:13:12 And the 5 seconds is the time it takes from clicking the link to showing the page 20:13:27 asiekierka, Banana Scheme 20:13:37 Whoa. 20:13:38 fis@eris:~/src/jitfunge$ build/jitfunge test.b98 20:13:38 hello 20:13:48 fizzie, now that looks cool 20:13:50 got a link? 20:14:01 ^show 20:14:01 echo reverb rev rot13 rev2 fib wc ul cho choo pow2 source help 20:14:06 ^help 20:14:06 ^ ; ^def ; ^show [command]; lang=bf/ul, code=text/str:N; ^str 0-9 get/set/add [text]; ^bool 20:14:07 Not yet; it's very unportable code at-the-moment. When I get fungot running on it, I'll put it up. 20:14:07 fizzie: so to a point they are working on a distributed dialect of scheme :p ( and that ork interpreter written in qt 20:14:20 fizzie, JIT to native code? 20:14:26 Yes, ia32. 20:14:36 fizzie, why not use llvm to make it portable? 20:14:39 also how does it do it 20:14:43 mmap and mprotect? 20:14:53 iirc that is the only portable way to run code like that 20:15:01 PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE 20:15:02 PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE PORTABLE 20:15:03 Yes, mmap with PROT_READ|PROT_WRITE|PROT_EXEC. 20:15:08 fizzie, ah right 20:15:52 fizzie: is it based on any code? 20:15:54 or is it a new impl 20:16:02 ehird: Completely from scratch. 20:16:07 nice 20:16:07 Cool. 20:16:24 fizzie: I'd like to help but I dunno how I could. 20:16:30 Q: Is an infiniloop possible in Unlambda? 20:16:34 same I could probably not do it 20:16:41 fizzie: I assume it's not at the level of implementing fingerprints yet? 20:16:44 I'd be good at that. 20:16:50 The stack is done (well, will be done, if I can manage) by mmaping some memory for it, then catching the SIGSEGV, mangling some registers around, then restoring the context. 20:16:52 asiekierka, should be using continuations 20:17:22 fizzie, oh god gracious 20:17:39 AnMaster: it's "good" 20:17:44 Hey, no explicit underflow/overflow checks. 20:17:48 fizzie, how do you know you didn't catch the sigsegv from something else? 20:17:55 I mean like a real bug 20:17:56 From the address it gives me. 20:17:59 by setting a flag? 20:18:21 fizzie, what about pop on empty stack then? 20:18:25 and stackstack? 20:18:58 Well, that's just a read below the current stack; I just need to set a suitable register to zero, add +4 to the funge-stack pointer reg, and restore the faulting context from the next instruction. 20:19:19 fizzie, assuming that is you go for a full blown befunge-98 that is 20:19:21 Stackstack will probably involve some copying around, though. 20:19:35 There is an interface of sorts for fingerprints (all A..Z are mapped to distinct function calls) so that can be used for implementing fingerprints without having to touch the code-generation. 20:19:59 fizzie, if you did this on kernel level you could use memory mapping to implement stack stack 20:20:03 without copying around 20:20:04 ;) 20:20:12 just messing with tlb 20:20:20 I could probably use separate mmap ranges for the stack-stack substacks and simply swap some pointers. 20:20:44 ah no you would still need copy on write 20:20:45 :D 20:21:06 Currently I use eax/ebx/ecx/edx for the generated Funge-code, edi as a temporary for more complicated blocks (so far no branches yet! just conditional sets) and esi as the funge stack pointer. 20:21:25 fizzie, so how far are you going to take this? Full blown mycology passing? t support? 20:21:47 fizzie: why not ebp as the stack pointer? 20:21:48 I don't see how I could do 't' with correct timing without completely losing the point. 20:21:49 what does t do? 20:21:53 that would be more usual... 20:21:58 or even esp if you want to live dangerously 20:22:14 but that would play badly with the rest of the code, I guess 20:22:18 ehird: multithreads a Funge program 20:22:26 why would that be hard? 20:22:27 but the threading's synchronous, like in INTERCAL 20:22:40 thus fizzie's "with correct timing" mention 20:22:42 fizzie, also just an idea, wouldn't using something like llvm be useful here? 20:22:45 doing it with incorrect timing wouldn't be hard 20:22:56 or maybe it would abstract too much and prevent some of these hacks 20:23:47 I do quite a lot of function calls from inside the generated code, so I'm trying to mostly obey the calling conventions; I guess ebp is sort-of needed for stack frames to make sense. 20:24:07 fizzie, hm passing on stack or in registers? 20:24:21 The ultimate Unlambda contest: Make a program that decides whether obama should win or mccain 20:24:26 if you really want to go for speed then passing parameters in registers would be useful 20:24:40 asiekierka: nah, that's just printing a constant string 20:24:46 Well, on stack, the normal cdecl style. For now, anyway. It's not too difficult to change later, probably. 20:24:48 Nonono 20:24:52 but it must decide by itself 20:25:08 ais523, Obama already won... 20:25:11 err 20:25:11 asiekierka: yes 20:25:12 asiekierka, ^ 20:25:14 if True: 20:25:17 print 'Obama' 20:25:18 else: 20:25:20 print 'Ron Paul' 20:25:31 ^ works it out for itself 20:25:33 ... i hate you 20:25:34 fizzie, hm 20:25:36 using boolean logic. 20:25:39 But i mean 20:25:50 Oh, and I haven't done register-spilling at all yet, so it currently crashes badly if some piece of code needs more registers. That shouldn't be *too* hard, though. 20:25:57 if the election was meant to be calculated only with computers that can only run unlambda 20:26:01 asiekierka: ```sii``sii to your earlier question 20:26:14 oerjan: ha, you came up with the same answer as me 20:26:15 asiekierka: i don't think that the election is decided by AIs deciding who should be president 20:26:19 I'm sure llvm would have been an interesting idea, but since I started writing x86 code-generating code already... 20:26:36 ehird: the only params you get is the number of votes 20:26:41 in unary numbers 20:26:53 so, if 1 person voted on mccain and 3 on obama 20:26:54 you get 20:26:56 xxx|x 20:27:01 fizzie, hm... is the whole thing ASM? 20:27:07 AnMaster: unlambda 20:27:17 ehird, this jit I mean... 20:27:25 unlikely. 20:27:27 i'm betting c 20:27:27 It's C++ mostly, except that of course the code-generation uses assembly. 20:27:29 or c++ 20:27:35 hm 20:27:39 What I think is funky is that the "hello" thing I pasted was the absolute first time I tried to actually run the code I generated; it very very very much surprised me when it actually worked. 20:27:44 fizzie, how far does it get in mycology? 20:27:51 assuming it pass sanity at all 20:28:05 AnMaster: dude 20:28:07 he's evidently just started workinnnng on it 20:28:11 ehird, yes 20:28:16 i imagine it can't do anything more than hello world or maybe hq9+ 20:28:16 ehird, I'm still interested 20:28:29 Er, probably nowhere right now. Of course I could run it; but I expect a segfault or something. 20:28:41 fizzie, right 20:28:47 ais523: it came up as one of the main cases in the 0x29A functional subset 20:29:03 oerjan: what did? 20:29:10 fizzie, still you should publish your code IMO, {insert rant about the cathedral vs. the bazaar} 20:29:27 {insert rant about how AnMaster should shut up} 20:29:31 Segfault: ooh, I'm clairvoyant. 20:29:32 ais523: ```sii``sii, well in disguise 20:29:44 {insert rant about rants} 20:29:45 3200 lines of C++ already, heh. 20:29:54 fizzie, how much of that is ASM stuff? 20:30:03 I mean outputting asm 20:30:50 Welll... most of codegen.cc (1400 lines) is at least very closely related. 20:31:07 fizzie, how will it handle self modification? 20:31:21 it's jit 20:31:24 just modify the generated code 20:31:31 yes but how exactly 20:31:35 umm 20:31:37 by writing to it? 20:32:02 I mean, you need to store two versions 20:32:04 -!- asiekierka has quit (Read error: 104 (Connection reset by peer)). 20:32:05 in case g is used 20:32:13 no you don't 20:32:18 just convert the machine code back to real code 20:32:30 you generate it in a predefined pattern, not hard to do a quick check then extract the params 20:32:34 and then see what that means 20:32:47 as it is jitting you would probably generate optimised linear code 20:32:54 I don't think that will be very trivial, since it constant-folds things like 88*:* into a single constant. 20:33:06 fizzie: well, that'd be a problem 20:33:06 :P 20:33:08 just store the playfield somewhere separate for the purpose of g and p 20:33:11 ais523: yeah 20:33:16 then when p happens, recompile that bit 20:33:18 But I do keep a separate data-space, I just generate snippets of code hooked into (pos, delta) pairs. 20:33:22 "that bit" is fizzie's problem 20:33:23 :p 20:33:25 ehird, see that was what I said 20:33:31 AnMaster: and? 20:33:39 my point exactly 20:33:39 So p just needs to remove those snippets that happen to be there. 20:34:07 gee AnMaster said something vague and meaningless, he sure showed me 20:34:09 fizzie, nice 20:34:57 The interpreter main loop works so that if it doesn't find code to execute starting from the current (pos, delta), it traces up to next @, |, _, w, or a snippet of existing code (and constant-folds and optimizes a bit already there), then converts that code into a native code function and calls that. 20:35:12 gee ehird can't gets angry again because of his own blown up ego 20:35:21 s/can't / 20:35:53 -!- Judofyr has quit (Read error: 104 (Connection reset by peer)). 20:36:12 fizzie, hm interesting 20:36:30 -!- Judofyr has joined. 20:37:09 If it happens (fortuitously) hit the entry-point of an existing snippet, it adds a link there; otherwise it erases the old snippet and starts a new right there. I'm hoping that when I run this on some code, it'll basically end up finding the basic blocks and generating separate functions for those. 20:37:22 fizzie, I'd really like to play around with it a bit already, I realise it is very incomplete and so on, but still 20:38:19 fizzie, another idea, you could special case some common patterns such as >:#,_@ 20:39:54 * AnMaster imagines a book called "Befunge Design patterns" 20:39:56 Maybe. There's also a lot of optimization opportunities in the generated code. 20:40:12 fizzie, ah there llvm would really have helped 20:41:02 There's a tarball at http://zem.fi/~fis/jitfunge-export.tar.gz but don't expect anything actually working, or any support whatsoever, or even that it'd work on a non-Linux box; I think there's a mremap call in there, I'm not sure how well-supported that is. (Easy to eliminate, though.) 20:41:27 There are a couple of known memory leaks, too; the part which manages the mmap pages for the functions doesn't really do much memory management. 20:42:05 scons? hm 20:42:10 (The functions can't really be moved at will because of some PC-relative addressing in the call instructions; it would need some relocations for that.) 20:42:24 You can probably compile it with just a single g++ command, though. 20:43:07 fizzie, any special cflags needed? 20:43:09 apart from -m32 20:43:21 g++ -o build/parser.o -c -m32 -Wall -Werror -ggdb3 src/parser.cc 20:43:21 cc1plus: warnings being treated as errors 20:43:21 src/parser.cc: In constructor 'jitfunge::Trace_impl::opargs::opargs()': 20:43:21 src/parser.cc:18: warning: array subscript has type 'char' 20:43:22 oops? 20:43:31 gcc 4.1.2 btw 20:43:34 Hmm. 20:43:50 Curious warning; I don't get that one. 20:43:57 fizzie, maybe different gcc version 20:43:57 It's obviously correct, though. 20:44:05 4.3.2 here. 20:44:09 -!- Judofyr has quit (Remote closed the connection). 20:44:13 CFLAGS="-march=k8 -msse3 -m32 -O2 -pipe" CXXFLAGS="-march=k8 -msse3 -m32 -O2 -pipe" scons 20:44:16 was my command 20:44:23 seems it ignored the cflags 20:44:44 -!- Judofyr has joined. 20:45:33 Yes, I think there's some explicit scons command for picking up that stuff from the environment. 20:45:35 fizzie also: scons: *** Source `src/tool.cc' not found, needed by target `build/tool.o'. Stop. 20:45:50 Oh, I haven't added tool.cc in the svn, so svn export didn't catch it. 20:45:59 ok 20:46:17 tell me when you got an updated version that fixes the tool.cc and the char thing 20:46:35 fizzie, it also warned for line 19 20 21 22 23 and 24 in the same file 20:46:37 again for char 20:46:48 and multiple times for each line 20:47:34 I fixed that tarball there for the tool.cc thing, but not yet the char-array indexing. 20:48:15 hm svn needs server side support? 20:48:23 oh right it does 20:48:57 Yes. I do have a svn server here, though, but I think it's configured so that it only accepts HTTPS connections with client certificates. Haven't used it for anything public. 20:49:38 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 20:49:54 -!- oklopol has joined. 20:50:41 fizzie, hm what cpu do you generate for? 20:51:18 -!- kar8nga has joined. 20:51:28 fizzie, i386? i686? 20:51:31 Okay, the tarball now should have tool.cc and (int) casts for the array indices. 20:52:02 Something like i686, although the only "fancy" opcode there is the conditional SET, which I think appeared around Pentium Pro. 20:52:10 ok 20:52:38 jitfunge jittool 20:52:39 hm? 20:52:45 Incidentally, the scons script should generate both jitfunge and jittool; the 'jitfunge' part is the interpreter (such at it is) but the jittool is maybe more interesting. 20:52:46 what is the difference? 20:53:10 The jittool one takes file (plus optional four integers, x y dx dy) and generates + compiles a single trace, then dumps the generated code. 20:53:17 ah 20:53:29 Although the final stage of the dumping just calls "ndisasm -b 32 tmp.data" which you might not have in your path. 20:53:36 (It's part of NASM.) 20:53:39 91+"!dlrow olleH">:#,_@ 20:53:45 fizzie, any idea why that segfaults? 20:53:51 what did your hello look like? 20:53:55 Stack underflow, maybe? 20:54:04 fizzie, oh that segfaults? 20:54:06 right 20:54:11 Yes, because I haven't done the stack part yet. :p 20:54:27 fizzie, adding a 0 at the start didn't help 20:54:35 My hello looked like a"olleh",,,,,,0@ :p 20:54:49 Program received signal SIGSEGV, Segmentation fault. 20:54:49 0xf7f48012 in ?? () 20:54:49 (gdb) bt 20:54:49 #0 0xf7f48012 in ?? () 20:54:49 #1 0x49811ca0 in ?? () from /lib/ld-linux.so.2 20:54:50 #2 0xffa42b98 in ?? () 20:54:52 #3 0x08054749 in jitfunge::AsmFunction::operator() (this=0x841b058) at src/codegen.hh:274 20:54:56 doesn't tell me anything 20:55:03 also: Backtrace stopped: frame did not save the PC 20:55:13 Well, it's inside some generated code all right. 20:55:31 (The 0 there in my hello is because @ -- despite what the spec says -- also pops a single value to use as the exit code at the moment.) 20:55:46 I'll work on portability when I get it to work at all first. :p 20:56:16 fizzie, why is the 0 needed in front of that @ in your code? 20:56:21 @ doesn't take any arguments 20:56:23 q does 20:56:44 ah 20:56:54 My @ and q map to the same thing. Work-in-progress.... 20:57:00 * AnMaster wonders about current lag spike 20:57:08 I think I may need to restart router 20:57:42 Oh, anything using stack segfaults currently, since I haven't even initialized the stack pointer. :p 20:58:01 fizzie: what in Befunge doesn't use the stack? Not a lot, surely? 20:58:31 fizzie, how comes your hello worked then? 20:58:34 a"olleh",,,,,,0@ doesn't "use the stack" because it's all constants, so it gets turned into "set eax to character, push eax, call writechr". 20:58:41 ah 20:59:36 fizzie, that program must be seriously hard to debug 20:59:48 also what is your goal? 20:59:51 uttermost speed? 20:59:54 World domination. 20:59:59 hah 21:00:05 I'm not quite sure how that will follow, but I'm still working on it. 21:00:27 fizzie, well do you aim for speed with it? 21:00:33 Speed, I guess. And complete Funge-98 enough so that fungot runs on it. 21:00:33 fizzie: undefined variable ' f' called within it. how in the world who don't spend all time merging a custom xml format have less expertise. 21:00:44 fizzie, because I'm well aware this will beat anything, including cfunge 21:00:50 fizzie, hm not mycology? 21:01:06 Mycology within limits. I'm not sure what all it tests. 21:01:22 fizzie, it tests core, and optionally any fingerprints 21:01:26 The 't' thing is something I'm not going to do, and neither will I do trefunge probably. 21:01:32 of course it just tells you fingerprint foo couldn't be loaded 21:01:37 or "y says t isn't supported" 21:01:44 and mycology doesn't test trefunge 21:01:49 and nor does cfunge support trefunge 21:02:30 fizzie, does it compile with anything but gcc btw? 21:02:48 There's no obvious gcc-isms, at least. 21:03:21 fizzie, well scons seems to ignore both CC and CFLAGS 21:03:29 and CXX and CXXFLAGS 21:03:31 I will probably start testing with mycology when I get some real code to run. Although I think I'll take the rest of the evening as a break. 21:03:50 fizzie, :) 21:03:59 ...rest of the evening? 21:04:03 bak 21:04:08 oh, it's only 23 21:04:17 fizzie: scons: *** Do not know how to make target `clean'. Stop. 21:04:19 ?? 21:04:27 It's "scons -c". 21:04:33 gee ehird can't gets angry again because of his own blown up ego 21:04:43 i don't know where this imagined ego of mine comes from. 21:04:44 care to enlighten? 21:05:11 e-hird, e-go, nuff said 21:05:12 fizzie, anyway any idea how to get scons to read the env vars? 21:05:36 I'll fix the SConstruct file to do that. 21:06:21 fizzie, also it is CXXFLAGS I guess? 21:06:56 at least that is what autotools and everything else use 21:13:54 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 21:14:11 -!- oklopol has joined. 21:14:50 AnMaster: Well, the tarball in there now has a SConstruct file which lets you override CXXFLAGS and CXX (the C++ compiler used). 21:15:23 fizzie: gonna test on os x 21:15:33 Heh, good luck with that. :p 21:15:39 >:D 21:15:56 The mremap call won't be there, at least. I'll do a workaround for that at some point. 21:16:07 It isn't really needed, anyway. 21:18:32 My only OS X computer is a powerpc, so I probably won't really be testing with that. 21:21:12 -!- kar8nga has quit (Read error: 110 (Connection timed out)). 21:23:41 -!- oklokok has joined. 21:24:33 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 21:47:49 fis@eris:~/src/jitfunge$ cat test.b98 21:47:49 0a"!dlrow ,olleH">:#,_@ 21:47:49 fis@eris:~/src/jitfunge$ build/jitfunge test.b98 21:47:49 Hello, world! 21:48:10 Still doesn't handle stack underflow, but at least the stack is there. 21:48:22 Also chased around a couple of very mysterious bugs. 21:48:32 -!- jix has quit (Read error: 145 (Connection timed out)). 21:49:33 -!- jix has joined. 21:50:33 For reference, the >:#,_ loop is translated into something like: mov esi, [stack_top]; std; lodsd; push eax; call writechr; add esp, 4; mov eax, [esi]; test eax, eax; mov eax, 0; setnz al; mov [stack_top], esi; 21:51:29 fizzie: buildin' on os tenpoop 21:51:34 (After which control returns from the generated code back into the interpreter, which will use the eax value to decide whether to call the same piece of code again or to proceed to the left.) 21:51:34 olol 21:51:37 5 page c++ error 21:51:45 ... Funging JIT? 21:51:48 Oh yes, those are very pretty. 21:51:52 pikhq: yes, befunge-98 jit 21:51:53 Wow. That's gorgeous. 21:51:58 it's been done before, but only -93 21:52:17 It's not like jitfunge really does anything very -98y yet, though. 21:52:23 Although the space is larger. 21:52:32 fizzie: Here is a paste you can do absolutely ntohing with: 21:52:52 fizzie: http://rafb.net/p/8raqXi81.html 21:54:29 Well, there's the mremap error, that one's clear. I'm not sure I want to try reading that C++ one. 21:54:45 I'm not quite sure I'm using the C++ TR1 hash table right, anyway. 21:54:53 Away for a time now. 21:56:22 -!- jix has quit ("CommandQ"). 21:56:31 fizzie, iirc you can't return from sigsegv handler right? 21:57:03 yes you can 21:57:16 ehird, well it would terminate you 21:57:18 that is what I meant 21:57:21 fizzie, also an issue 21:57:23 AnMaster: considering SBCL does it 21:57:29 and presumably jitfunge 21:57:30 you are wrong 21:57:34 $ type llvm-g++ 21:57:34 llvm-g++ is hashed (/home/arvid/local/llvm/bin/llvm-g++) 21:57:41 scons: Building targets ... 21:57:41 llvm-g++ -o build/codegen.o -c -march=k8 -msse3 -m32 -O0 -ggdb3 -pipe src/codegen.cc 21:57:41 sh: llvm-g++: command not found 21:57:45 wtf :P 21:57:50 it is in PATH 21:57:59 AnMaster: iirc, scons doesn't inherit PATH 21:58:02 for an actual reason that i forget. 21:58:04 ehird, how silly 21:58:09 no, it is justified 21:58:09 ah there is a reason? 21:58:10 strange 21:58:10 i just forget how 21:58:11 well 21:58:12 :-P 21:58:16 s/how/why/ 21:58:18 well anyway 21:58:19 AnMaster: I think "scons 'PATH=$PATH'" 21:58:20 should do it 21:58:33 ehird, didn't help 21:58:33 AnMaster: no, "how it was justified" 21:58:43 AnMaster: found it 21:58:59 AnMaster: http://www.scons.org/faq.php#SS_4_3 21:59:01 The signal handler gets the ucontext_t struct as a third parameter when using the sigaction stuff, then I can (possibly, unportably) setcontext() back to it after manipulating it a bit. 21:59:18 fizzie, to be able to build here I would need to override LD too 21:59:30 and to be able to override the path 22:00:22 ehird, I see what it says but requiring end users to do that is just silly 22:00:27 Feel free to edit the SConstruct, then. 22:00:42 AnMaster: scons was designed in an environment for e.g. companies with a software project 22:00:53 ehird, ok then it makes sense I guess 22:00:54 if you were in one, presumably you would realise the advantage of fully repeatable builds anywhere 22:00:59 but yes, that sucks for end-users 22:01:14 ehird, yes for internally using it in a company it makes sense 22:01:56 AnMaster: it was used to compile doom3 22:02:04 "Doom3's Linux build system uses SCons. CC="ccache distcc g++-3.3" JOBS=8 rocks!" 22:02:12 heh 22:02:14 so there they have an internally-distributed, presumably automated build process 22:02:22 ehird, yes 22:02:37 it make sense for internally usage yes 22:02:40 I agreed 22:02:48 yeah. 22:02:49 but, not for end users 22:02:55 yse 22:02:56 *yes 22:03:26 * AnMaster solves it by setting CXX to the full path 22:03:39 but yes it breaks when it tries to use ld 22:03:41 makes sense 22:03:44 AnMaster: so set LD? 22:03:49 ehird, it ignores it :) 22:04:09 eat it 22:04:13 * AnMaster fixes the sconstruct file 22:04:20 hm nop 22:04:22 didn't help 22:04:52 I tried to extend the same way that was already used 22:04:55 but it doesn't work 22:05:12 /home/arvid/local/llvm/bin/llvm-g++ -o build/jitfunge -m32 -ggdb build/main.o build/codegen.o build/interp.o build/parser.o build/space.o 22:05:12 /usr/bin/ld: skipping incompatible /home/arvid/local/llvm/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/../../../../lib/libstdc++.a when searching for -lstdc++ 22:05:12 /usr/bin/ld: skipping incompatible /home/arvid/local/llvm/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/../../../libstdc++.a when searching for -lstdc++ 22:05:12 /usr/bin/ld: cannot find -lstdc++ 22:05:14 collect2: ld returned 1 exit status 22:05:23 it just works with both autotools and cmake 22:05:35 heck it usually just works with 99% of the plain makefiles too 22:05:52 but not with scons 22:06:18 i can't use this program therefore the shitty things it tries to replace are superior 22:06:25 autotools is not a total ugly hack, nope 22:06:32 ehird, it is an uggly hack 22:06:35 I never said I liked it 22:06:36 scons is a bit peculiar with its habits, but I sort-of like it when doing build systems for myself; my DS development environment is done with it. 22:06:39 but I said it works 22:06:44 AnMaster: What does uggly mean? Really ugly? 22:06:45 that was my point 22:06:49 also, no, it really doesn't 22:06:55 ehird, autotools sucks I fully agree 22:07:00 but at least it respects env variables 22:07:17 Anyway, scons's name for the linker is 'LINK', not 'LD'. 22:07:19 and I can't figure out how to make scons respect LD 22:07:24 fizzie, ok.... 22:07:29 that is again crazy 22:07:32 AnMaster: no 22:07:33 no it's not 22:07:39 ld is a certain linker 22:07:44 LD=foo 22:07:48 AnMaster: 22:07:50 that is incorrect 22:07:56 ld refers to a single linker product 22:08:02 there are others that are not lds but they are linkers 22:08:10 ld is not a generic term of linker 22:08:12 *for 22:08:18 LD=llvm-ld 22:08:20 in this case 22:08:25 AnMaster: in that case. 22:08:32 but what about LD=magic-corp-foobazing-linker? 22:08:32 and yes it is an LD 22:08:39 magic-corp-foobazing-linker is a linker, not an ld(1). 22:08:42 ehird, well that is how it is usually done 22:08:44 also 22:08:51 AnMaster: usually done != the better option 22:08:53 ln -s llvm-ld magic-corp-foobazing-linker 22:08:56 Windows is what is usually used. 22:09:01 So why don't you use it? 22:09:04 ehird, ok point taken 22:09:13 it might be a better name 22:09:34 llvm-ld: Unknown command line argument '-m32'. Try: '/home/arvid/local/llvm/bin/llvm-ld --help' 22:09:35 llvm-ld: Unknown command line argument '-ggdb'. Try: '/home/arvid/local/llvm/bin/llvm-ld --help' 22:09:36 heh 22:10:09 ... 22:10:15 I'm not sure ld needs those flags, actually. 22:10:18 on the other hand, LD is probably a better name for the env variable 22:10:24 since it seems to require ld :p 22:10:27 (It's LINKFLAGS where they come from.) 22:10:40 * oerjan writes down AnMaster's name for future stalking 22:10:51 oerjan: wut 22:10:53 why? 22:11:03 It's not really a build system, it's just something that manages to compile it here. As I've mentioned a couple of times, it's just a tarball, not a distribution. 22:11:05 because it's THERE 22:11:17 oerjan, what is? 22:11:34 "arvid", i presume 22:11:45 oerjan, yes what about it? 22:11:50 you could find it using google 22:11:53 or whatever 22:11:55 arvid norlander 22:11:58 see: cfunge source. 22:12:03 see? it is public 22:12:07 Hee, now it can run mycology without segfaulting. 22:12:08 bah 22:12:35 i should try and look up AnMaster's phone number just to be creepy. 22:12:37 http://zem.fi/~fis/mycout.txt 22:12:39 Not very far, though. 22:12:43 * oerjan tosses his list of things to blackmail AnMaster for 22:12:46 ehird, heh. sorry not listed 22:13:01 at least not under my name 22:13:29 fizzie, well 7! would be easy to fix 22:13:32 just implementing ! 22:13:40 and ! is kind of trivial 22:13:52 I have implemented !, but apparently not right. 22:14:00 ok I take that back 22:14:05 trivial when not done in ASM 22:14:11 fizzie, it is logical not 22:14:12 "7!. a, 0@" does print a 0 here, but that's not surprising, since it constant-folds that. 22:14:20 I know what it is. 22:14:41 fizzie, wait constant folding is computed in a different way? 22:14:41 -!- oklopol has joined. 22:14:53 Well, sure, since it's the parser which does it. 22:15:00 fizzie, hm maybe constant fold based on first run? 22:15:04 -!- oklokok has quit (Read error: 104 (Connection reset by peer)). 22:15:09 would make such stuff easier 22:15:45 I don't really think so. The generated code with/without constant-folding is completely different, after all. 22:16:33 fizzie, hm ok 22:16:45 constant folding is usually good, but not in poker programs 22:16:47 Curious, though. "700p00g!.a,0@" also prints out 0. It might be some other bug causing the mycology output, though. 22:17:07 oerjan, eh? pun detected but not understood 22:17:17 SO LOOK IT UP ALREADY :D 22:17:22 AnMaster: "fold" is something you can do in poker 22:17:30 oerjan, I don't plan to learn playing poker 22:17:35 ais523, ah 22:17:35 which causes you to lose the hand, but not lose any more money than you've already bet 22:17:39 i don't play it either 22:17:52 doing it constantly will cause you to lose eventually, although doing it sometimes is normally a good idae 22:17:53 *idea 22:17:59 but i know some basic rules 22:18:04 fizzie, tracing output dumping stack at each step? 22:18:08 or is that impossible? 22:19:00 ais523, how can you loose more money than you already bet? 22:19:06 ?! 22:19:11 AnMaster: normally you have the choice of folding or betting mroe 22:19:13 *more 22:19:24 ais523, ah, so there is no "pass"? 22:19:24 so if you don't fold, you have to bet more 22:19:28 odd 22:19:31 there is sometimes but not usually 22:19:42 such a strange game 22:19:50 that's the whole point of poker strategy, you force your opponents to bet more, or to bluff them into folding 22:21:58 fizzie: src/interp.cc:19: warning: unused parameter 'location' 22:22:06 and a lot more of those 22:22:14 src/parser.cc:63: warning: missing initializer for member 'jitfunge::StackChange::flush' 22:22:15 src/parser.cc:63: warning: missing initializer for member 'jitfunge::StackChange::in' 22:22:17 and a few more of those 22:22:27 Is this with what compiler? 22:22:35 fizzie, gcc 4.1.2 22:22:41 Ah. With some optimization flags? 22:22:41 -O2 -Wall 22:22:44 Right. 22:22:48 Without -O2 it won't catch all that. 22:22:54 Will fix at some point. 22:22:57 fizzie, I also tried this: 22:22:58 CXXFLAGS="-march=k8 -msse3 -m32 -O3 -Wall -Wextra -ftracer -fweb -frename-registers -ggdb3 -pipe" 22:22:59 :D 22:23:03 yes it is insane 22:24:12 but -ftracer is actually useful 22:25:32 -ftracer? 22:25:53 -ftracer 22:25:53 Perform tail duplication to enlarge superblock size. This transformation simplifies the control flow of the function allowing other optimizations to 22:25:53 do better job. 22:25:53 Well, the mycology bug was a bug in some of the trivial optimizations I do; forgot to set one value, so it skipped one instruction that was actually necessary. 22:25:55 ais523, 22:26:15 I tested it and for example it replaced something like: 22:26:28 movp %al,%edx 22:26:38 mov %edx,%eax 22:26:39 AnMaster: I know what tail duplication does 22:26:40 with a single one 22:26:53 I don't remember the details 22:26:55 it didn't just do that, it changed the target of a goto too 22:27:12 ais523, hm? 22:27:25 AnMaster: say you have an if near the end of a function 22:27:25 http://zem.fi/~fis/mycout.txt ... does that "p doesn't modify space" test putting an instruction on the playfield? 22:27:32 ais523, well yeah? 22:27:38 I think I did in my test 22:27:38 tail duplication makes two copies of the end of the function, one for each branch of the if 22:27:41 and optimises them separately 22:27:51 ais523, yes it helped a lot in the case I tried it 22:28:03 my guess is mov %edx, %eax was a goto target without -ftracer so it couldn't be optimised out 22:28:22 ais523, oddly enough nothing else in the function changed 22:28:38 strange, are you sure that was -ftracer? 22:28:49 yes 22:29:14 ais523, I also used -fweb in both cases 22:29:19 and -frename-register 22:29:24 but 22:29:29 the only change was -ftracer 22:30:00 ais523, also when I later added some calls to __builtin_expect() I got it down to even less jumps 22:30:22 mostly conditional stores iirc 22:30:30 or whatever they are called now again 22:30:42 (the function returned true or false 22:31:02 fizzie: probably 22:31:28 Well, then it's a "known issue". 22:32:23 fizzie, would it be hard to later port this program to another arch? 22:32:41 or is the low level code generation well enough abstracted? 22:32:58 Nontrivial, but maybe not terribly hard. 22:33:33 Abstraction, schmabstraction; at least almost all x86-specific code is in codegen.cc; too bad that one is almost half of the lines in the whole program. 22:36:38 -!- Judofyr has quit (Read error: 104 (Connection reset by peer)). 22:36:44 fizzie, heh 22:37:06 fizzie, how do you implement funge space? 22:37:14 -!- Judofyr has joined. 22:37:28 I mean, static array for some given size I guess 22:37:33 There's a static block of 64*64 cells (for coordinates 0..63) and a hashmap outside it. 22:37:43 fizzie, 64x64 hm, small 22:37:51 you will want a lot larger later on 22:37:56 Well, it's a single compile-time constant to change. 22:38:03 fizzie, righta 22:38:04 right* 22:38:07 and an offset 22:38:56 Also, when the get/put coordinate arguments are constants (i.e. 00g, 00p) that are inside the static range, the generated code will do simple mov's to/from there. 22:39:28 So those should be pretty much as fast as "variables". 22:39:37 heh 22:39:51 fizzie, you should probably be able to dynamically resize the static array 22:39:58 just re-generate the access code 22:40:11 if you notice a lot of access in some area 22:41:44 There's a single "mov edi, staticspacestart" involved, but after that 11g is just mov eax, [edi+0x104] 22:43:07 fizzie, how optimal is the generated machine code? 22:43:16 Very pessimal. 22:43:22 But not most pessimal. 22:43:23 a 22:43:25 ah* 22:43:42 fizzie, do you think it will beat a good interpreter compiled with a good compiler? 22:43:43 It does stupid things, but not completely brainlessly idiotic things, at least in most cases. 22:44:24 For some programs, certainly. No need to update position/delta, parse things like <>v^ at all, or even fetch instructions from the funge-space. 22:45:02 fizzie, true 22:45:03 I'll do benchmarking when I get something non-trivial to work. I think I'll test with that underload interp first. 22:45:13 fizzie, what about something like the game of life in it? 22:45:26 I think I'm going to have to add a bit more non-portability to the mix for the "catch stack underflow by intercepting the page-fault" feature, since if I just use the portable form of mmap(), the page it gives me ends up right next to other stuff in the virtual address space, and reading below it will not cause segfault but just return random-ish fluff. 22:45:34 fizzie, also I expect that you will do it on cfunge on an intel machine and using ICC 22:45:40 that is about as optimal as you can get 22:45:50 oh and x86_64 ;P 22:45:56 sure on x86 it may be slower 22:46:09 ah, i am reminded again why i ignored AnMaster 22:46:51 fizzie, hm so you need to map two pages after each other 22:47:04 fizzie, and make one nonaccess using mprotect 22:47:05 -!- Judofyr has quit. 22:47:16 that should work fairly portable for underflow 22:47:34 you would need fixed mappings I guess 22:48:03 That's the "trust your luck" scenario; there's nothing saying it should map things consecutively. I think I'll just use MMAP_FIXED, it's not *so* unportable. 22:48:22 fizzie, I said fixed mappings 22:48:23 Even though the man-pages complain about the discouragednessity of it. 22:48:43 Yes, well, with MMAP_FIXED I don't think I need anything below it. 22:48:54 Non-mapped address spage should generate segfaults just fine. 22:48:58 fizzie, what if some other mapping is created below 22:49:02 -!- KingOfKarlsruhe has quit (Remote closed the connection). 22:49:04 that sounds like trust your luck too 22:49:58 Okay, maybe I could stick a guard page there. But the whole "let's use this address for the stack, it's probably not used" thing is a bit iffy. I don't think I'll start randomly trying multiple addresses or anything like that. 22:50:19 fizzie, hm 22:50:28 fizzie, ok what do you prefer? 22:50:56 fizzie, oh my system uses ASLR 22:51:59 fizzie, I guess that explains why it complains about text relocations? 22:52:44 I think the ASLR implementations still have some specific ranges for the various types of memory areas. Don't know the details of those, though. 22:53:40 I think I'll just stick the funge stack into 0x40000000 or something and hope it works. The whole system is quite a "hope it works" thing. But at least enlarging the stack should be easy then, just add more pages. 22:53:53 Must sleeps now. 22:54:01 um 22:54:12 * oklopol sleeps first! 22:54:12 -> 22:54:22 fizzie, cya 22:54:27 fizzie, and really that is a bad idea 22:57:19 fizzie, fyi: 22:57:21 v >a"u",,0@ 22:57:21 >"a",0| 22:57:21 >a"d",,0@ 22:57:24 in the version I have 22:57:28 that prints aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 22:58:23 Prints "ad" here. 22:59:10 Updated the tarball, you can probably just copy your fixed SConstruct over it. 22:59:35 Still, probably won't make sense to do much bug-hunting just yet; there are a lot of 'em. 23:00:25 fizzie, yep 23:00:29 was just testing 23:01:05 fizzie, ad here too now 23:01:32 fizzie, question: 23:01:41 you said p would just clear out code paths 23:01:52 but how does that work if a constant path bypasses it? 23:02:17 "hello world"0_ p 23:02:22 and that p writes into hello world 23:02:25 or something such 23:02:30 then next time you enter that 23:02:53 fizzie, so my question is, how do you update in the middle of constant folded paths 23:02:59 without scanning everything 23:12:23 -!- Corun has left (?). 23:18:27 -!- mu has joined. 23:20:32 -!- Corun has joined. 23:22:24 The space-hashmap has (pos, delta) entries for all commands encountered when tracing the paths, so that can be used to notice when p is writing into something that has been visited when compiling. 23:23:14 When that happens, I just clear the whole compiled snippet, and it will get recompiled the next time (if ever) it is ran. 23:24:32 -!- omniscient_idiot has quit (Nick collision from services.). 23:24:37 -!- mu has changed nick to Omnisicient_Idio. 23:24:40 -!- olsner has quit ("Leaving"). 23:24:44 Anyhow, sleeping really now. 23:25:04 -!- omniscient_idiot has joined. 23:25:08 -!- Omnisicient_Idio has left (?). 23:25:23 -!- Jiminy_Cricket has quit (Nick collision from services.). 23:25:35 -!- Jiminy_Cricket has joined. 23:33:48 -!- oerjan has quit ("Good night"). 23:45:34 whoa I just got cfunge to compile using Open64