00:03:49 -!- Corun has quit ("Leaving"). 00:38:50 -!- Corun has joined. 00:48:50 -!- Corun has quit ("Leaving"). 01:03:59 -!- ihope has joined. 01:07:28 Last night, I wrote some notes for an AI thingy with a pencil on yellow wide-ruled paper. Today at school, I wrote some notes for that AI thingy with a pen on white college-ruled paper. 01:07:56 The notes on white paper have much more crossing out. I wonder if that's related to the color of the paper. 01:10:46 I'll scan thhem in case anyone wants to use them to best the human mind. 01:16:28 Darn. One of these is illegible and the other's cut off. 01:17:22 Bye for today! 01:17:29 Bye. 01:17:40 You're not going to stick around to see my revolutionary ideas? :-P 01:17:45 Nope. 01:17:50 See you. 01:18:06 -!- ehird has quit (Remote closed the connection). 01:22:47 Yellow page, huge edition: http://i29.tinypic.com/2wbvrqr.jpg 01:23:51 White page, non-huge edition: http://i32.tinypic.com/2vt7jid.jpg 01:32:32 And the yellow one mentions Tailsteak! 01:33:48 -!- Corun has joined. 02:47:38 -!- Slereah_ has joined. 02:47:38 -!- Slereah has quit (Read error: 104 (Connection reset by peer)). 04:16:23 -!- Corun has quit ("Ok, I'm ZZzzzing :-P"). 04:18:08 -!- calamari has joined. 05:11:07 -!- Slereah has joined. 05:11:07 -!- Slereah_ has quit (Read error: 104 (Connection reset by peer)). 05:47:06 ihope, tailsteak? Wherewhere? 05:47:10 * Sgeo opens Firefox 05:48:01 ihope, OCR much? 05:51:15 * Sgeo takes back any accidental implied insultiness 05:55:45 -!- GreaseMonkey has joined. 05:58:28 -!- Slereah_ has joined. 05:58:35 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)). 06:16:44 -!- Slereah has quit (Read error: 110 (Connection timed out)). 07:56:55 -!- Iskr has joined. 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:02:42 -!- Iskr has quit ("Leaving"). 08:03:19 -!- Iskr has joined. 08:25:13 -!- calamari has quit ("Leaving"). 08:39:02 -!- olsner has joined. 09:03:41 Deewiant: I can tell that's ROT13 from the letters, and from having seen a lot of ROT13 in my time. :-P <<< i can *read* it, pwnd ya bad, didn't i? 09:04:24 hmm 09:04:51 i actually cannot, now that i started reading. perhaps i memorized a crooked rot13 chart :) 09:05:15 EBG = VYT in mine. 09:05:32 right, perhaps it wasn't rot-13 09:07:07 That sounds more like Atbash. 09:08:07 -!- fizzie2 has changed nick to fizzie. 09:08:17 (hmm... now that i think about it i've memorized a complement alphabet :D) 09:08:39 Yes, that's what Atbash is: http://en.wikipedia.org/wiki/Atbash 09:10:16 cool, it has a name. 09:10:24 oh 09:10:41 i didn't notice your earlier comment there, not that it changes anything 09:10:53 (but had to explain the "oh") 09:11:23 hmph, now i need to use another 5 minutes for alphabet memorization :< 09:13:25 I think the first question of the first homework round of our introductionary-cryptography-thing-course was about Atbash. Completely pointless, of course. (And the second question had ROT-13. Later on the homework questions made a bit more sense.) 09:23:11 rot-13 your atbash for twice the strength 09:25:00 (it's nice to know that they commute!) 09:27:10 oh, rot13.atbash == atbash.rot13? 09:30:38 what's atbash? 09:32:49 See the Wikipedia link just a couple lines upwards. 09:33:03 Also rot_N.atbash = atbash.rot_{26-N}, for obvious reasons. 09:36:36 Too bad tr doesn't like "tr a-z z-a"; otherwise it'd be a nice Atbash utility. It's already good for rot-13ing with "tr a-z n-za-m". 09:36:47 tr: range-endpoints of `z-a' are in reverse collating sequence order 09:39:35 ghci -e 'runCommand $ "tr a-z " ++ reverse [ 09:39:40 'a'..'z']' 09:39:58 or something like that :P 09:54:12 Well, perl -pe '@a=("a".."z"); @b=reverse(@a); eval "tr{@a}{@b}";' also works, but can't say it's pretty. 10:23:36 -!- GreaseMonkey has quit ("Unisex."). 11:34:12 -!- ais523 has joined. 11:46:35 -!- ais523 has quit ("(1) DO COME FROM ".2~.2"~#1 WHILE :1 <- "'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1""). 12:16:42 err 12:17:16 -!- Tritonio has quit (Remote closed the connection). 12:41:02 -!- sebbu2 has joined. 13:01:30 -!- sebbu has quit (Connection timed out). 14:59:13 -!- ais523 has joined. 15:14:51 -!- ehird has joined. 15:22:30 -!- timotiis has joined. 15:35:05 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 15:35:15 -!- oklopol has joined. 15:35:50 -!- RedDak has joined. 15:42:37 -!- RedDak has quit (Remote closed the connection). 15:51:56 a couple of esoteric programs have turned up here: http://thedailywtf.com/Comments/Code-examples-and-interviews.aspx?pg=3 15:52:17 they were discussing stupid job interview questions that asked people to write programs under arbitrary restrictions 15:52:26 Heh. 15:52:34 Let's see that! 15:52:39 1 15:52:39 2 15:52:40 Fizz 15:52:43 and I submitted an INTERCAL program that fit most of the spec of one problem, while someone else wrote a Befunge program for the other (easier) problem 15:52:49 4 15:52:51 Buzz 15:52:53 Fizz 15:52:54 tee hee 15:52:54 7 15:53:00 I was doing the substring program 15:53:06 irp fizzbuzz!! 15:53:12 mine almost fits the spec, but it's case-sensitive and outputs in Roman numerals 15:53:19 hahahah 15:53:29 oh, someone came into #irp the other day and ran a few programs 15:53:37 ais523: the problem with the daily wtf will that everyone will say "that language is the real wtf!! LOL ENTERPRISEY!!" 15:53:51 it's a site filled with idiots who like to laugh at the people that they think are idiots :p 15:53:58 when they tried the beer thing, I linked them to the lyrics on 99-bottles-of-beer.net, and then they went away 15:54:05 ais523: heh 15:54:08 ais523: you're not standard! 15:54:10 ehird: not all of them are idiots, just some of them 15:54:12 the correct response is 'go to hell' 15:54:16 ehird: I know 15:54:22 but I was implementing an extension 15:54:23 irp++ 15:54:52 I can't wait for the next OMGWTF, by the way 15:55:06 I'm planning to submit code automatically translated from the INTERCAL 15:55:14 that's two WTFs pretty much guaranteed 15:55:21 What is this fizbuz business? 15:55:31 Slereah_: a silly interview question, also a children's game 15:55:49 see the page I linked for Fizzbuzz in Befunge, and an implementation of substr in INTERCAL that finds all matches 15:56:08 No one can read esoteric code, ais523. 15:56:10 the correct FizzBuzz output, as I remember it (although the spec they give isn't clear), is: 15:56:18 It's a thing you write, not that you read! 15:56:35 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz and so on 15:56:59 in the children's game, you continue until someone screws up the sequence, then they're out 15:57:08 the sequence showed up on anagolf a while ago, too 15:57:08 So fiz is for dividible by 5, butt for 3? 15:57:13 yep 15:57:15 a nice simple rule 15:57:15 and fizbutt for both 15:57:24 That doesn't seem too hard for a non-esoteric language. 15:57:25 err.... buzz, not butt 15:57:38 Slereah_: it isn't, it's really easy, but apparently lots of programmers are incapable of it anyway 15:57:43 ais523: fizz too 15:57:45 but fizbutt is amusing 15:57:48 and Slereah_ said it 15:57:57 What about my butt? 15:58:09 hahahah 15:58:09 it seems to be just fiz and buz in the US, though 15:58:20 and fizzie: what an appropriate nick for this conversation! 15:58:26 ... 15:58:26 ais523: i cant' resisit saying something about dumbing down :-) 15:58:28 *can't 15:58:30 *resist 15:58:31 (irony) 15:58:32 I did write butt, didn't I. 15:58:51 read the INTERCAL, anyway, it isn't too hard... 15:59:01 I can't read much INTERCAL 15:59:03 well, I didn't try to obfuscate it, but the algorithm is interesting 15:59:28 it's my standard technique of using stacks to store arrays, and backtracking to access them non-destructively 15:59:46 -!- Parma-Quendion has joined. 16:00:07 do you think anyone will take me up on my offer to explain my code? 16:00:14 I once had the idea of doing something like that. 16:00:29 Giving a programming assignment back in C and something esoteric 16:00:34 but I was too lazy to do it 16:00:46 -!- Quendus has quit (Nick collision from services.). 16:00:54 -!- Parma-Quendion has changed nick to Quendus. 16:01:25 well, I'm the sort of person who, when set an assignment that asks for a Windows binary among other things, hands in both the Windows binary and a Linux x86 binary that does the same thing, because the Linux version was the original 16:01:34 and likewise hands in the .odt with the requested .pdf 16:01:54 Hm. Maybe I can do a fizzbutt on the Love Machine 9000. 16:02:09 I have to go for a bit, but I'll be back later 16:02:11 -!- ais523 has quit ("brb"). 16:21:19 -!- ais523 has joined. 16:21:55 wb ais523 16:21:57 any relevant developments while I was gone? 16:22:25 [17:01] * ais523 (n=ais523@pw01-fap01.bham.ac.uk) Quit ("brb") 16:22:26 [17:21] * ais523 (n=ais523@pw01-fap01.bham.ac.uk) has joined #esoteric 16:22:31 Can you guess? 16:22:42 most likely not 16:22:57 but I never know; after all, there was a conversation going, and that increases the chance of something happenign 16:23:03 s/gn$/ng/ 16:23:39 Slereah_: that was a fulll log 16:23:41 *full 16:23:42 err 16:23:43 ais523: 16:23:48 ah 16:31:43 it's interesting, really, that so much more effort goes into writing esoprograms than reading them 16:32:01 generally speaking esoprograms are written and run, but not actually read except by their author 16:32:18 I don't think that's a good thing; there are all sorts of programming techniques that can be learnt from others' code 16:32:31 especially in esolangs 16:32:50 the advantage of common things being difficult is that uncommon things become just as easy as the common things in some cases 16:32:51 ais523: reading them is very hard 16:32:57 Well, it's usually better to ask them directly 16:33:00 well, it depends on the language 16:33:21 It's not like it's hard to find them. 16:33:28 Unlambda, for instance, is easy to write for an esolang (if you compile from lambda-calculus) but hard to write well, and hard to read 16:33:28 There's like 75% of them all right here! 16:34:23 well, there's time-zone issues 16:34:31 and it's always nice to figure something out for yourself 16:34:37 But then again, with Unlambda, you can use any function and copypaste it into your program 16:34:42 although I suppose writing programs is also part of the learning process 16:35:07 Just need some (^f.f(x)) program 16:35:11 for instance, the concept of storing code in the stack turned out to be central to Underload; both Keymaker and I wrote programs that did that in different ways 16:35:36 ais523: do you want my mkproposal.pl? 16:35:39 it should work 16:35:45 it doesn't diff, though. For editing, use the web interface. 16:35:47 yep, you may as well post the link again 16:35:54 But if you just want to splurge a directory in, and maybe edit a few files 16:35:57 then use my script and amend 16:35:59 I can find it in logs if necessary, though 16:36:09 but I'm lazy 16:36:09 ais523: I'm considering letting you define a sub - 'end' 16:36:13 which will run after it creates everything 16:36:18 kind of like a literate program 16:36:25 but .. nah 16:36:47 ais523: http://pastebin.ca/1009420 16:36:49 I'm actually amused that literate programming has caught on 16:36:54 comments on my perl style welcome :) 16:37:02 it's a good idea, but I'm not entirely sure why it needs a special syntax 16:37:19 ais523: because it's not just 'comments > code' 16:37:22 I've written several programs with more comments than code, where the code is inside the comments, which use comment markup for the comments as usual 16:37:29 and I know it isn't just comments > code 16:37:31 you have to be able to write the program in the order that it makes sense to explain it in 16:37:36 and subroutines just don't handle that 16:37:43 (you need finer control and more access to the enclosing context) 16:38:04 ehird: you didn't set the expiry on that to infinite 16:38:13 ais523: so? i haven't licensed it yet 16:38:18 it should be, really, for all esolang stuff, as I don't want it to vanish off the net 16:38:37 but if you haven't licensed it yet, and you plan to put it up elsewhere, then fine 16:39:04 ais523: pb.eso-std.org 16:39:05 ;))) 16:39:19 does that exist yet? 16:39:24 elliotthird.org was down last I checked 16:39:45 ais523: no httpd 16:39:47 remember? i wiped it. 16:39:51 I know 16:39:52 my irc network is up though. 16:39:56 I was wondering if you'd fixed it in the meantime 16:40:09 don't intend to until i get the stuff ready to put up 16:40:09 oh, and you don't set the executable/non-executable flag on the files you create 16:40:17 ais523: hm, that's a good point 16:41:42 interesting way you do marker selection, BTW 16:41:49 that's kind-of clever 16:41:59 ais523: how is it interesting? 16:42:00 reminds me slightly of Ethernet collision retries 16:42:10 ehird: increase the length and re-randomize each time 16:42:11 it is just guaranteed to also work for finite files :-) 16:42:25 normally people just re-randomize, or follow a pattern 16:42:26 ais523: really i don't even need to increase the length 16:42:36 ehird: yes, I know, that's what the comment was about 16:42:38 what kind of file includes all 3 uppercase letter combinations on a line of their own? 16:42:42 increasing the length is probably good, though 16:42:52 yeah, my program is provably correct 16:42:53 :-P 16:42:56 well .. not really 16:42:57 since it's perl 16:43:03 and I can imagine a list of all known assembler opcodes in a file 16:43:07 so just about anything relating to it is unprovable 16:43:13 that might contain all 3 uppercase letter combinations 16:43:20 ais523: UUU is an asm upcode? 16:43:29 if it doesn't, we'll have to invent an esoasm to do the remaining ones 16:43:42 and UUU is an RNA codon, not sure about asm 16:43:48 does RNA count as assembly language? 16:43:51 it's compiled into protein 16:43:59 by a simple assembly-like substitution 16:44:05 ais523: when you give me a 'hello world' in rna... 16:44:09 ... then two things will happen 16:44:09 . 16:44:14 1. i'll call it an asm language 16:44:21 2. fundie christians will kill you, in your sleep 16:44:31 ais523: hm, odd, my irc network doesn't show up on nmap 16:44:34 paranoid openssh :-) 16:44:39 security by obscurity! 16:45:05 heh, the entire genetic code of a human, when transcribed into RNA, is arguably a hello, world 16:45:13 ais523: ha! 16:45:16 a more literal hello, world than most programming languages, for that matter 16:45:32 What would be hello world in RNA? 16:45:37 but I don't think the genetic code by itself is enough to recreate a human 16:45:40 A form of life that says "Hello, world" and then dies? 16:45:49 I think Wikipedia had a DNA Hello, world 16:45:58 Slereah_: that would rock 16:46:06 when transcribed into protein and written out in the standard notation, you got HELLQWQRLD or something 16:46:08 '...pop Hello, world! AEURURURURARRRRRRRRRRRRRRR-' 16:46:08 let me try to find it 16:46:13 '*dead*' 16:46:23 ais523 : Metamath has a Hello, world theorem 16:47:46 -!- RedDak has joined. 16:48:07 http://us.metamath.org/mpegif/helloworld.html 16:48:10 ah, it's transwikied to Wikibooks now: http://en.wikibooks.org/wiki/Transwiki:List_of_hello_world_programs 16:48:19 but I couldn't find the DNA one on there 16:49:21 the worrying thing is that I have a vague memory that it was me who transwikied it 16:49:36 "It is not difficult to “write” a message in a plasmid using the one letter code for the amino acids by inserting a suitable string of three letter of DNA per amino acid with some adjustments O => Q. For instance Hello world is HELLQ WQRD or Histidine-Glutamic acid-Leucine-Leucine-Glutamine-Tryptophan-Glutamine-Arginine-Aspartic acid." 16:49:44 Slereah_: what does the hello world theorem actually mean? 16:49:46 translate into english 16:49:58 ehird : Nothing important. 16:50:07 Slereah_: that's missing a Leucine 16:50:43 It means that it is true that h does not belong to the set formed by the relation L over L and 0, and... 16:50:55 I'm not too sure about the second part. 16:53:26 it was transwikied, but it wasn't my fault this time 16:53:28 it seems 16:55:52 344563446523446523446524465234465234465234456234465234456 = 2 16:56:07 ...Wikibooks has hello worlds in 198 languages, plus 46 GUIs, 9 page description languages, 3 media-based scripting languages and 25 esolangs, including some esolangs I've never heard of 16:56:11 this bears investigation 16:56:34 ais523: any comments on my perl style? 16:56:46 ehird: it's not particularly idiomatic, it looks more like C 16:56:49 but that's probably a good thing 16:57:02 ais523: what would you change? It doens't look anything like C to me.. 16:57:10 In fact, my mind views it as 'deliciously obfuscated' :-) 16:57:33 if I were obfuscating it I wouldn't have single-use subroutines, and I wouldn't break print statements just to do some calculations 16:57:45 you can do the calculation inside an argument to the print, you know... 16:58:26 "The Del on the first line begins function definition for the program named HWΔPGM." -- the APL one 16:58:35 why would you name a program HWΔPGM 16:58:38 what's wrong with HELLO 16:58:44 I mean 'Hello World Program', okay, but still 16:58:54 HELLO isn't descriptive 16:58:57 also, all those variables grate on the functional programmer inside me, but they're probably the clearest way to write it 16:59:01 is it hello world, hello jack, hello bob, what? 16:59:13 HWΔPGM is explicit 16:59:23 Deewiant : Hello is hello for any variable 16:59:24 hell, HELLO doesn't even say if it's a program! 16:59:31 Deewiant: HWORLD 16:59:35 Hence, it can be used to salute the entire world 16:59:36 and since you're defining a program ... 16:59:57 ais523: I dont' see how breaking the print wuld do anything apart from give me a mammoth print with statements inside 17:00:00 would 17:00:16 ehird: what's not obfuscated about a mammoth print with statements inside? 17:00:29 I'm not saying your program is bad, just that it isn't particularly obfuscated for Perl 17:00:34 ais523: not talking about obfuscation, relaly 17:00:36 just idiomatic perl 17:00:41 oh, and here's an esolang I was unaware of: http://www.nishiohirokazu.org/blog/2006/09/kemuri_1.html 17:00:46 luckily, most of the page is in English 17:01:11 It seems awfully Japanese ^^ 17:01:11 no spec, but there's an interp so it could be deduced from that 17:01:42 "The only command to push constant values into the stack is the `. It pushes 13 values 33, 100, 108, 114, 111, 119, 32, 44, 111, 108, 108, 101, 72 in this order. " 17:01:47 That is so cheating. 17:01:59 Slereah_: 'awfully Japanese ^^' - the writer is obviously japanese 17:02:04 I know. 17:02:07 ah, there is a spec, I just missed it because it was so short 17:02:15 esolangs and golfing are more popular with those japs it seems 17:02:20 but golfing moreso 17:02:23 and golfing with ruby tops 17:02:40 Slereah_: the pushing of those values is cheating, but it's the only way to get constants 17:02:42 "Super NAND Time!!" 17:02:49 but ` is such a cheat 17:02:50 :-) 17:02:51 you have to do bitwise XORs and complements on those values to get to other values 17:02:55 ais523 : What about "1"? 17:03:04 It's also a constant! 17:03:07 "l"(small L) and "*"(asterisk) are reserved for possibility to use as a command "Execute the stack as Brainf*ck" in future. ha 17:03:21 Slereah_: you can only get a constant by XORing together characters of "Hello, world!" 17:03:28 you can't push a literal 1 onto the stack 17:03:37 so it's more interesting than it looks 17:03:47 only capable of outputting constant text strings, though, so it isn't Turing-complete 17:03:55 it's only barely cat-complete 17:04:03 and cat programs are a lot easier to write... 17:04:58 ais523: l and * would make it tc 17:05:18 yes, but allowing inline BF is a cheaty way to make something TC 17:05:31 ais523: by the way, i have an idea for a language 17:05:32 Those people and their cheating way. 17:05:34 just like calling Perl regexps TC is cheating 17:05:40 you can implement it by TAIL-FILE-RECURSION 17:05:42 basically 17:05:46 the only 'looping' in the language 17:05:55 is when the interp loads its all file 17:05:59 and then exits after running itself 17:06:23 so it reloads a different file when the currently running file ends? 17:06:28 I wonder, is there a form of Brainfuck without any restriction on the code? 17:06:34 ais523: no 17:06:35 like 17:06:37 in interp.pl 17:06:41 Like an unbalanced [ would just be a conditional 17:06:45 require "interp.pl"; exit 17:06:48 or something 17:06:52 and that's the only way the language can loop 17:06:53 by doing that 17:06:53 and unbalanced ] would just bring back to the beginning of the code. 17:06:54 Slereah_: FukYorBrane does that 17:07:08 at least, not exactly, IIRC it ignores unbalanced loops 17:07:11 It's hard to find new ideas! 17:07:23 all code has to be valid, because the program tends to get corrupted during use 17:07:32 and has to keep running unless it hits a bomb, or all threads quit 17:09:39 compare http://en.wikibooks.org/wiki/List_of_hello_world_programs#Ruby_with_GTK.2B to http://en.wikibooks.org/wiki/List_of_hello_world_programs#Windows_API_.28in_C.29 17:09:52 that's pretty much proof of ehird's and my complaints about how bad the Windows API is 17:10:07 of course, I picked the examples to make that statement look good, but still... 17:10:23 ais523: hee, you linked to ruby as a good example 17:10:31 i was expecting perl 17:10:31 :) 17:10:35 ehird: I wanted something clean and simple compared to that C stuff 17:10:39 99 should also do a hello world database. 17:10:42 Ruby is good at clean, simple, small programs 17:10:47 The hello world lists are too scattered 17:10:49 even graphical ones, apparently 17:10:55 ais523: ruby has some really weird bits :-) but it's nice 17:11:03 as for gui ones 17:11:06 wanna see a Shoes version of that? 17:11:16 I can write it *right here* 17:11:19 here goes: 17:11:19 [[ 17:11:22 Shoes.app do 17:11:31 button("Hello, world") { exit } 17:11:31 end 17:11:32 ]] 17:12:56 ais523: well, the window gets kinda big when you do that 17:13:00 you can trivially make it any size, though 17:13:09 Shoes.app :width => a, :height => b do # that's all 17:15:04 THE CHANNEL, IT DUN DIE 17:15:13 noes. 17:16:07 -!- ais523 has quit (Read error: 104 (Connection reset by peer)). 17:16:07 -!- ais523_ has joined. 17:16:30 sorry, did I miss anything? 17:16:35 -!- ais523_ has changed nick to ais523. 17:16:37 ais523_: last thing you heard? 17:16:38 [18:14] THE CHANNEL, IT DUN DIE 17:16:54 I can right it *right here* 17:16:59 *write 17:17:01 s/right/write/ 17:17:04 here goes: 17:17:04 [[ 17:17:04 Shoes.app do 17:17:04 button("Hello, world") { exit } 17:17:04 end 17:17:05 ]] 17:17:07 ais523: well, the window gets kinda big when you do that 17:17:09 you can trivially make it any size, though 17:17:11 Shoes.app :width => a, :height => b do # that's all 17:17:19 maybe I should write a hello, world in OpenGL 17:17:26 without using any text functions 17:17:29 ais523: the cool thing about shoes 17:17:35 * ais523 has just finished an OpenGL project 17:17:38 is that it contains animation and graphics functions ala Processing 17:17:43 and excellent mouse/keyboard handling 17:17:45 they wanted a Windows executable 17:17:49 as well as the standard, native gui fare 17:17:56 so I invented a programming language for expressing graphical scenes in 17:18:02 and wrote a cross-platform interpreter for it 17:18:21 and handed in the source, Windows and Linux executables, and the source code for the particular program they wanted 17:18:34 I doubt anyone else did it like that 17:20:21 ais523: you know what sucks? the lack of gui toolkits good for writing /real apps/ that aren't complex as hell 17:20:43 GTK is reasonably simple 17:20:54 and GLUT is very simple, but not good enough for large-scale applications 17:21:01 ais523: GTK is based on hell, though 17:21:07 GObject is the worst idea I've heard in years 17:21:10 It's a good esoteric idea, though. 17:21:13 Kind of like Malbolge. 17:21:16 well, Qt isn't that bad either 17:21:28 qt is nice, but not nice to program 17:21:46 oh, and the graphical version of intercalc (the CLC-INTERCAL calculator) is written in GTK 17:22:00 I'm not sure what argument that makes either way 17:27:40 ais523: i can't wait until everything's rewritten in c intercal 17:27:51 what do you mean by 'everything' 17:28:05 everything 17:28:22 ehird: that's never going to happen, what would C-INTERCAL itself be written in? 17:28:28 ais523: intercal 17:28:30 besides, I rather like a multitude of languages existing 17:28:39 ehird: what would it compile into? INTERCAL? 17:28:44 that would be kind of pointles 17:28:46 s/$/s/ 17:28:52 ais523: it would interpret it 17:29:00 and since everything is in INTERCAL 17:29:02 it would be fast 17:29:04 ehird: but the whole point of C-INTERCAL is that it's a compiler 17:29:15 ais523: then we'll stop using c-intercal ;) 17:29:35 the different design decisions of C-INTERCAL and CLC-INTERCAL stem mainly from the fact that one's a compiler and one's an interpreter, and from the different langs they're written in 17:31:17 however, I feel that a practical INTERCAL-based language is a reasonable idea 17:31:32 if it had the usual arithmetic operators and decent string handling, INTERCAL would be quite nice to program in 17:36:37 -!- ais523 has quit ("(1) DO COME FROM ".2~.2"~#1 WHILE :1 <- "'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1""). 17:36:53 -!- ais523 has joined. 17:37:15 sorry... did I miss anything? 17:37:19 the last I saw was if it had the usual arithmetic operators and decent string handling, INTERCAL would be quite nice to program in 17:38:07 noyhing missed. 17:38:17 and everything sent/ 17:38:22 s/\//?/ 17:38:31 ais523: yes 17:38:33 if it had the usual arithmetic operators and decent string handling, INTERCAL would be quite nice to program in 17:38:33 * ais523 has quit ("(1) DO COME FROM ".2~.2"~#1 WHILE :1 <- "'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1"") 17:38:33 * ais523 (n=ais523@pw01-fap01.bham.ac.uk) has joined #esoteric 17:38:49 hmm... that's nice, it even got my sig 17:39:07 You are standing in the main hall of what appears to be some sort of 17:39:11 castle. There is a door in each of the east and west walls; the one in 17:39:11 the west wall has a [ symbol marked on it, but there are no markings on 17:39:11 the door in the east wall. There is a large staircase, which goes upwards 17:39:11 to a balcony high on the north side of the room. The south of the room is a 17:39:11 large door, heavily barred with wooden bars that you would have no chance 17:39:12 of lifting. 17:39:27 (unfinished esoteric text adventure with several esolang puzzles in, so far three puzzles none of which leads anywhere) 17:39:58 although one of them is capable of leading to a secret area if you have a good knowledge of INTERCAL run-time error messages 17:39:58 What are the puzzles? 17:40:07 Slereah_: try moving through the game, and you'll find out 17:40:13 there's a SMETANA puzzle on the stairs 17:40:18 a Brainfuck puzzle to the west 17:40:23 and an INTERCAL puzzle to the east 17:40:58 SMETANA because the whole "Step 1. Step 2." blatantly implies a staircase 17:41:13 ais523 : GO STAIRCASE 17:41:23 ais523: shall I write a bot that will interface the game and irc? 17:41:25 You are standing on stair 0 of a flight of stairs. 17:41:29 The stairs are numbered from 0 at the bottom to 9 at the top; the numbers 17:41:32 so you don't have to do it manually. 17:41:33 are written on the banisters rather than the stairs themselves. The top 17:41:37 and bottom stairs are blank, but the others have writing on, as follows: 17:41:41 9. 17:41:46 8. Go to step 2. 17:41:49 7. Swap steps 3 and 5. 17:42:02 6. Swap steps 3 and 4. 17:42:05 5. Go to step 6. 17:42:09 4. Go to step 1. 17:42:13 3. Swap steps 2 and 4. 17:42:18 2. Swap steps 1 and 7. 17:42:22 1. Swap steps 5 and 8. 17:42:26 > 0. 17:42:34 ehird: you could do, but manually is simple and the parser's really rudimentary 17:42:34 so it's best for me to parse in my head rather than make people use the parser, which only accepts one-char commands, no args 17:42:35 each description ends with a menu of which command does what in that context 17:42:42 JUST CLIMN THE FUCKING STAIRS 17:42:44 oh, and your options are to walk up a step, down a step, or to slide down the banister 17:42:51 so you're going up, presumably? 17:42:57 Yes, yes I am. 17:43:02 Will I be teleported? 17:43:23 When you arrive on step 5, you are suddenly teleported to step 2! 17:43:23 When you arrive on step 2, you are suddenly teleported to step 1! 17:43:23 When you arrive on step 1, steps 5 and 8 swap places! 17:43:30 at this point, the staircase looks like this: 17:43:38 9. 17:43:42 8. Go to step 2. 17:43:46 7. Swap steps 3 and 5. 17:43:50 6. Swap steps 3 and 4. 17:43:59 Oh noes! 17:44:02 5. Go to step 6. 17:44:06 4. Swap steps 1 and 7. 17:44:10 3. Swap steps 2 and 4. 17:44:14 2. Go to step 1. 17:44:18 > 1. Swap steps 5 and 8. 17:44:22 0. 17:44:26 er what just happened 17:44:26 I kept going up until you were teleported 17:44:29 ah 17:44:34 Do I have Mario-like jumping abilities? 17:44:34 you have no choice now but to walk off the staircase; it resets when you do that 17:44:34 in general all the puzzles reset when you leave the room and they are unsolved 17:44:35 some reset even if solved, some don't 17:44:38 Slereah_: not in this game 17:45:01 presumably you'd gain them if you found a blue mushroom to eat, but there are none in the game at the moment 17:45:35 an ehird web interface would likely work better than pasting, though, just because the SMETANA problem produces so much output 17:45:40 the other two are less noisy 17:45:49 ais523: but that's less ircy 17:45:50 :P 17:45:53 But I can do a web interface, trivially. 17:45:55 Shall I? 17:45:58 may as well 17:46:08 I'll paste the source-code; it doesn't really give anything away 17:46:33 it's really lousy, though, I may rewrite it in an esolang at some stage 17:46:38 ais523: no point pasting the code 17:46:40 you can run it on your machine 17:46:44 once i've written the web interface 17:46:51 then how will the web interface access the code? 17:46:57 ais523: by using a subprocess. 17:47:05 ais523: it takes input on stdin, and spews stuff on stdout, right? Then I can make something meaningful out of it. 17:47:17 yes, but you'll need the code or an executable to be able to run the code 17:47:23 you can't interface to the code if you don't have it 17:47:25 ais523: So I give you my web interface. 17:47:26 And you run it. 17:47:38 ehird: I have no server that's externally accessible 17:47:44 ais523: Ah. 17:47:48 as it happens Apache's running on here, but I can't get round the firewall 17:47:49 ais523: You can just give me a linux binary, then. 17:47:53 because I don't control it 17:47:55 Smaller than source code :p 17:47:59 filebin.com 17:48:01 I have a linux x86 binary, though 17:48:05 that'll work fine 17:48:08 i am on linux x86 after all 17:48:16 oops 17:48:17 http://filebin.ca/ 17:48:23 esogame: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped 17:48:26 and I know it's .ca 17:48:46 ais523: that iwll work perfectly 17:48:50 *will 17:49:00 http://filebin.ca/shdmov 17:49:18 Okay./ 17:49:23 Web interface to the esogame coming up. 17:49:39 Hurm 17:49:42 ./esogame: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.4' not found (required by ./esogame) 17:49:45 Does the game have some sort of plot, or is it just a bunch of puzzles? 17:49:50 ais523: what kind of directory structure is THAT 17:49:50 Slereah_: no plot as of yet 17:49:53 that's coming later 17:50:04 and really, I don't know what kind of dir structure that is 17:50:19 ais523: oh well, paste the source code to filebin and /msg me the url i guess 17:50:19 ldd esogame 17:50:20 linux-gate.so.1 => (0xb7fc3000) 17:50:20 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e59000) 17:50:20 /lib/ld-linux.so.2 (0xb7fc4000) 17:50:28 (since pastebin.ca is public) 17:50:32 Will the victory imply some sort of pastry? 17:50:38 Perhaps a cake-like object 17:50:44 Slereah_: probably, but a victory is currently impossible 17:50:55 no doubt you'll have to make the cake-like object yourself, though, using a Chef program 17:51:03 :D 17:51:06 I like the idea. 17:51:21 I've /msg'd ehird the source code 17:51:30 but it doesn't spoil any of the puzzles 17:51:30 Will you need a Camouflage program to enter the building? 17:51:48 Slereah_: not sure, you start inside the building, but it's currently possible to leave but not to re-enter 17:51:58 that might be a decent way to manage re-entry 17:52:14 Heh. 17:52:20 I was planning to construct the building a bit like Television Center, with two floors, and make the whole thing a giant Whirl program 17:52:28 s/program/interpreter/ 17:52:55 that would require rooms to become harmless once their puzzles were solved 17:53:02 ais523: OK, I can make a web interface to this trivially. 17:53:04 Even with savegames! 17:53:11 (It just generates a unique game id when you go there, then saves to that filename.) 17:53:16 (Just go to the URL to load again.) 17:53:24 How do you load a saved game, though, ais523? 17:53:27 actually, I might move the INTERCAL room directly above the Brainfuck room, then restrict people to going clockwise round the puzzle 17:53:32 ehird: specify it on the command line at current 17:53:43 aha, ais523 17:53:44 I started that program years ago and haven't updated it much since 17:53:46 OK, this will be fun 17:53:58 maybe I'll update it more once my exams are finished 17:54:07 but I've already promised lots of things to different people 17:54:51 such as fixing the bug with C-INTERCAL that Debian's autobuilder found on Itanium, or the bugs I found with C-INTERCAL on Solaris 17:55:08 on the plus side, C-INTERCAL's going to be ridiculously extensively portability-tested, given its subject matter... 17:55:39 esco!!!! 17:55:47 haha i think me and Slereah_ are the only ones who find that funny 17:55:50 esco???? 17:56:00 ah, an esoteric OS? 17:56:22 Esoteric interpreter! 17:56:27 Well, compiler 17:56:32 compiles what into what? 17:56:36 and written in what? 17:56:39 Everything! 17:56:49 Such diverse languages as Brainfuck, ook, spoon... 17:56:57 I actually want a compile everything into everything suite 17:57:02 ais523: esco is a shitty pile of crap 17:57:03 EsoInterpreters is a good start 17:57:05 to put it bluntly 17:57:19 they support about 5 languages, half of which are brainfuck syntax-changes. 17:57:19 ideally, have some way to compile around a cycle of esolangs (with at least one 'real' language represented) 17:57:25 and the code is crappy c++. 17:57:29 then any lang in the cycle can be compiled into any other 17:57:30 and the dev linked to it all over the wiki 17:57:32 etc 17:58:00 It would be hard to compile BF into Unlambda. 17:58:06 Or vice versa. 17:58:07 e.g. it's currently possible to compile Unlambda -> Underlambda (I lost the source code for that, but I can remember how it was done) 17:58:11 and Underlambda -> Underload 17:58:18 not quite, no input 17:58:23 Underlambda -> C, definitely 17:58:24 http://esco.sourceforge.net/ 17:58:37 and I have a P'' interp in Unlambda 17:58:57 changing that to a BF->Unlambda compiler wouldn't be ridiculously difficult because I still have the Relambda source 17:59:31 Relambda? 17:59:38 Slereah_: Unlambda + lambda 17:59:48 it's a language I use privately to write Unlambda programs 18:00:04 Oh. 18:00:09 there's a Relambda to Unlambda compiler in my esolangs.el, though, which I've pasted at least twice 18:00:21 it's buggy, unfortunately 18:00:28 ais523: the esco guys are funny 18:00:34 "Byter is a language for training brains." 18:00:36 they warped that into 18:00:36 but unlambda + lambda is a pretty simple combination 18:00:40 "Byter is a language for training your brain." 18:00:50 Well, that was most of the idea for Lazy Bird. 18:01:03 Lazy Bird doesn't actually have a lambda, though, does it? 18:01:07 just lots of useful combinator 18:01:10 s/$/s/ 18:01:15 although the real idea was "I'm trying to write Unlambda on the love machine 9000 and it's terrible" 18:01:19 ais523: It has lambdas. 18:01:25 OK 18:01:30 Underlambda has lambdas too 18:01:40 and I had great fun trying to express them as rewrite rules into Underload 18:01:43 I think I succeeded, though 18:01:50 Here be a Fibonacci with lambdas : ``m^x^y````yk.1r``xx``v`y0```yk`sb`y0``v0i 18:02:15 that's basically the same syntax as Relambda, except that I use $x and $y to read the value of lambda bindings 18:02:32 ais523: by the way, a trivial way to do continuations in an esolang: 18:02:32 the ^ is the same 18:02:38 ({} is an array here) 18:02:44 \ is pretty ugly as a lambda. 18:03:03 X [Y] callcc Z -> {X Z} Y Z 18:03:04 I use ^ in Relambda, but \ in Underload 18:03:08 trivial 18:03:18 ais523: which leads me to a new idea -- 18:03:20 'forward parameters' 18:03:21 ehird: that's pretty much how the Underlambda rewrite rule works 18:03:29 in a concat lang, the 'back parameters' are the ones coming before the call 18:03:36 my idea is 'forward parameters': the ones in front! 18:04:02 that makes some sense if you have an amount of control over what they are 18:04:13 ais523: here's callcc using 'forward parameters' 18:04:13 \x y,z -> {x z} y z 18:04:16 but one issue is that back parameters can be manipulated in all the usual concatenative ways 18:04:17 that's in lambda + concat notation 18:04:22 you could probably come up with a better way to do it 18:04:23 forward parameters couldn't be, they'd have to be literals 18:04:27 ais523: nahhhh 18:04:29 ais523: they could be thunks 18:04:32 lazy concat 18:04:43 oh, I see 18:05:01 well, in that case it's just the sort of typical rewrite rule which is trivial in Perl, Thutu or Cyclexa 18:05:28 how's that web interface, by the way? 18:07:29 ais523: going quite well 18:07:34 i mean, the actual thing is trivial 18:07:39 the fun part is writing the server boilerplate! 18:07:40 <.< 18:08:04 heh, I could probably make it into a CGI script by adding a couple of lines and using a continuation library 18:08:20 ais523: Probably, but forking like hell would kill this kind of thing 18:08:32 ais523: besides, you need multiple users at one time 18:08:40 and you can't persist processes, anyway 18:08:40 OK, but why would a continuation library need forking? 18:08:42 so you couldn't use a cgi 18:08:48 ais523: cgi = fork each request 18:09:11 if you can persist continuations across runs of the program, then you can just exit in between calls 18:09:33 ais523: ah, i see what you're saying 18:09:36 i'm using subprocesses 18:09:44 Underlambda's actually got persistent continuations as part of the language, in the C, S and D commands 18:09:54 ais523: hm, should i make saving implicit? 18:09:58 like, each action saves 18:10:03 since i generate a unique name anyway 18:10:07 not sure, the save on it's pretty broken anyway 18:10:13 because it doesn't save the internal state of puzzles 18:10:18 ais523: does it not? dshdkf! 18:10:23 just a whole load of variables I don't actually use yet 18:10:25 i'm going to all this fuss partly for the saves 18:10:32 ais523: make it persist it pronto :< 18:10:44 OK, I'll look at the code for the first time in years... 18:11:07 the problem is keeping a consistent save-file format whilst adding extra puzzles... 18:11:36 aargh, it's basically impossible the way I've written it 18:11:45 it seems I've duplicated the parser inside the puzzle functions 18:11:53 and used auto variables to store the states of the puzzles 18:12:05 ais523: :( 18:12:13 I told you this thing needs a rewrite 18:12:26 oh well, i'll just do no save games for now 18:12:41 pokpokpopokpkopkopokpkopokpokpkopokpokpkopokpkopkopkopokpkopokpkoppokpkopokpokpkpokpokpokpkopko 18:13:27 at least the BF puzzle doesn't actually need a save, it's always either solved or reset 18:13:35 * ais523 just had a worryingly evil idea 18:13:41 this game's a text adventure 18:13:49 and I'm planning to add a text adventure system to PerlNomic 18:14:01 I wonder if the two could be combined in some way? 18:14:16 pokpokpopokpkopkopokpkopokpokpkopokpokpkopokpkopkopkopokpkopokpkoppokpkopokpokpkpokpokpokpkopko 18:14:17 WHAT is that 18:14:21 is that like oko v2 18:14:21 If you want to program some embryos : http://www.vivo.colostate.edu/molkit/rtranslate/index.html 18:14:27 sorry, I went all oklopol for a moment 18:14:41 I probably would have deleted it rather than posted it in most other channels 18:15:24 ais523: don't worry, we're all dirty okoers here, i meaokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok 18:15:46 @@valid = "a".."z" + "A".."Z" + "0".."9" # this is elegant in some weird way 18:16:13 what lang? It looks a bit like Perl, but isn't 18:16:30 ais523: Ruby! 18:16:50 hm, no Range#+ 18:17:06 oh, of course 18:17:09 i'll have to convert it to an array 18:17:15 otherwise representing that as a range makes no sense 18:17:51 why not just a regex 18:17:56 ais523: ruby's love of functional programming saves the day! 18:17:58 @@valid = ["a".."z", "A".."Z", "0".."9"].inject([]) {|a, b| a.to_a + b.to_a} 18:18:00 (inject is reduce/fold) 18:18:09 Deewiant: 'cause i want to generate it too 18:18:11 @@valid = /[a-zA-Z0-9]+/ 18:18:14 ah 18:18:47 using || as parens looks strange 18:18:55 ais523: it's the parameters 18:18:58 it's taken from smalltalk 18:19:00 smalltalk of that is: 18:19:03 [:a :b | ...] 18:19:16 ais523: and the extra one is so that you can do 0-adic ones easily 18:19:16 { ... } 18:19:27 also, { and } can be spelled 'do' and 'end' which is more elegant for multi-line blocks 18:19:30 .inject([]) do |a, b| 18:19:31 ... 18:19:32 end 18:19:53 ehird: they stole that feature from Magenta! 18:19:59 ais523: heheheheh 18:20:13 ais523: rule of thumb: {} for one-line blocks (only one expression) 18:20:16 do..end for multi-line 18:20:19 ais523: fun thing about ruby: no statements 18:20:22 everything is an expression 18:20:29 so you can give /anything/ as an argument to a function 18:20:32 even a class definition 18:21:11 "everything is an expression" is good 18:21:21 there is no reason for a statement/expression split nowadays 18:21:35 such splits also go against my sense of elegance in programming 18:21:36 ais523: quite. Ruby is a lot deeper than most people think 18:21:41 (those who learn of it from Rails, mostly) 18:21:50 that's why INTERCAL has separate expressions and statements 18:21:56 ais523: Ha! 18:22:01 oh, and some of the expressions have side effects# 18:22:07 s/.$// 18:22:10 well, ruby's expressions have side effects 18:22:14 because otherwise there'd be no side effects :P 18:22:20 that's fine if they serve the role of statements too 18:22:32 although arguably, Haskell managed to find a different solution to that particular problem 18:22:59 but in a lang with split expressions/statements, having side-effect expressions is just silly 18:23:44 I wonder what the historical reasons for langs having separate expression and statements are? 18:23:54 possible reasons: parsing before LR(1) was invented, line numbers 18:24:04 e.g. combining expressions and statements in Forte would be really difficult 18:24:11 probably other reasons I haven't thought of 18:24:59 the parsing is because people used to use top-down parsing for statements and bottom-up or operator-precedence parsing for expressions 18:25:08 ais523: it was just intuitive back in tha 'old dayz 18:25:11 'old, heh 18:25:26 not really, asm doesn't have separate expressions and statements 18:25:38 so why did the first higher-level languages separate them? 18:25:38 asm has only statements 18:25:42 so adding expressions was an obvious next step 18:26:10 exactly 18:26:13 ah 18:26:14 or it seems obvious to me, anyway. More so than changing all statements to expressions. :-P 18:26:21 -!- oerjan has joined. 18:26:22 yeah 18:26:23 it was like 18:26:27 'add a, b; mov b, x' 18:26:29 is silly 18:26:34 and esp. for large expressions 18:26:37 expressions would have originally been invented as a way to reduce temporary register usage 18:26:38 why not 'mov a+b, x'? 18:26:50 and then you get into function calls and stuff 18:26:54 'mov sqrt(a), x' 18:27:03 then you get a language leaving asm behind - like C 18:27:11 and ends up making IO stuff into functions 18:27:13 you see? 18:27:46 yes 18:27:49 that makes sense 18:28:21 ais523: another nice thing about ruby - it has good string interpolation built in 18:28:32 many langs have that nowadays 18:28:32 #{foo}, in a string literal, is an interpolation of the code foo, converted to a string 18:28:37 sometimes you can even leave out the {} 18:28:42 even Cyclexa does, or will do when I finish the spec 18:28:45 #foo and #@bar and #$xyz works, but they're obscure-looking 18:28:48 so nobody uses them :-) 18:28:53 ais523: you can nest quotes in these 18:29:01 "#{"#{"hello"}"}" 18:29:03 is "hello" 18:29:03 ehird: but you can have nested comments in email addresses 18:29:16 however, I tried it in my email client and it rejected the address 18:29:23 not even sure if it allows non-nested comments 18:29:26 ais523: gotta admit though, "#{"#{"hello"}"}" is amusnig 18:29:29 *amusing 18:29:38 but nested comments strike me as a good anti-spam measure 18:29:44 what spambot parses those nowadays? 18:30:00 what mail client supports them? 18:30:18 Deewiant: all the ones which follow the spec, so probably about 2 that nobody's ever heard of 18:30:21 yep 18:31:24 eh 18:31:25 *heh 18:31:54 ais523: 18:31:55 Thread.new { @buffer[id] += proc.gets until proc.closed? } 18:32:02 anyway, try sending a message to ais523(524\)(525)x)@bham.ac.uk and seeing what happens 18:32:08 'until' and 'x?' are cute idioms :-) 18:32:13 anyone who actually reaches me has a superior mailer 18:32:23 ehird: they'll be adding a please to it next 18:32:24 -!- helios24 has joined. 18:32:35 ais523: heh 18:32:47 oh, yes, email addresses even have an escape syntax for escaping comment markers in comments 18:33:01 Hello sir helios24. 18:33:09 Slereah_, hi ;) 18:33:37 ais523: i do believe I just emailed you 18:33:45 unix mail(1) :-) 18:33:48 it hasn't arrived yet 18:33:50 * oerjan notes that good old pine supports that address nicely (it strips out the comments as soon as i leave the To: line) 18:34:10 maybe it'll arrive later, or maybe a relay en-route will choke on the comments 18:34:36 oerjan: that's a really clever idea, allow all users and don't confuse the mailer 18:34:49 ais523: I have a class called PunkRock in my program. It is a pun on 'proc'. 18:35:35 maybe I'll publically display my email as a valid address with comments in, spambots would be unlikely to track it down and people with decent mailers could visit it without deobfuscating 18:37:39 ais523: eurgh, you can't do redirects right 18:37:41 if you use a 301 18:37:46 reloads go to the redirector 18:37:48 ais523: so what's the actual address supposed to be 18:37:49 instead of hte redirectee 18:37:52 if you use anything else 18:37:54 ais523: ais523x)@...? 18:37:55 then a browser caches the redirector 18:37:59 to go to the redirectee 18:38:05 Deewiant: look more closely, \ is an escape character 18:38:20 ais523: aye, so you escape the one after 524 18:38:30 ah, they nest? 18:38:54 i.e. (foo(bar)baz) is one comment, not baz) 18:38:59 yes, nested comments 18:39:02 thunderbird thinks it's baz) 18:39:07 remember this is email addresses we're talking about 18:39:32 but no regexp can handle arbitrarily nested comments 18:41:20 -!- RedDak has quit (Read error: 104 (Connection reset by peer)). 18:41:37 ais523: gosh, this bug is odd 18:41:43 looks like it's an open bug at mozilla since 2002 :-) 18:41:43 what does it do? 18:42:06 Deewiant: but it should be easy to fix, surely? 18:42:20 ais523: the proc buffer appears to be empty 18:42:21 possibly, I don't know 18:42:22 even though it is not 18:42:33 "proc buffer" = /proc? 18:43:38 ais523: no, the game subprocesses 18:44:48 I mean, it's there. Just. 18:44:53 OH 18:44:58 Setting the wrong instance variable :| 18:46:04 ais523: OK, I just need to add input. 18:53:25 ais523: 18:53:26 return if (proc = proc_for(name)).nil? 18:53:41 why did you paste that particular line of code to me? 18:55:16 ais523: OK, I think it's almost ready 18:55:18 and ... I just found it cute. 19:02:20 ais523: Hmm. Odd bugs. 19:02:51 ais523: Give me a good number for reading in chunks 19:02:54 1024? 4096? 19:03:02 CLC-INTERCAL uses 1024 19:03:06 I don't know if that makes it a good number, though 19:03:36 1 << rand_int(8, 16) 19:04:06 but I don't have the fingerprint 0 0 1 1 loaded 19:04:31 so I think it reflects, and as I don't have 1 1 1 1 loaded either that's an infinite loop 19:04:52 ais523: the problem is that we redirect back straight after a post 19:04:53 sorry, it would just be the fingerprint 1, I forgot the semantics for a moment 19:04:58 huh what now? 19:04:59 which means you get either no or only some of the game's response 19:05:07 Deewiant: I was trying to interpret your code as Funge-98 19:05:19 you'd never get to the ( 19:05:25 it's the ) I'm talking about 19:05:28 you do get to that 19:05:37 ais523: any ideas about my solution? 19:05:38 right, wrapping 19:05:41 apart from doing it ajaxy that is :-) 19:05:43 you'd hit my nick first though ;-) 19:05:49 ehird: what redirect code are you using? 19:05:54 there's more than one 19:05:57 ais523: nothing to do with that 19:06:09 just the timing of the seperate thread which does the reading 19:06:12 why do you have a redirect? 19:06:17 ais523: after the form post 19:06:20 i redirect to the game display 19:06:29 this can happer faster than I read in the game's response 19:06:30 and where does the information that then displays come from? 19:06:45 ais523: the buffer which i store to by reading continuously in a seperate thread 19:06:51 ais523: but what it would do is try to unload the fingerprint 0. the first param it pops is the length of the fingerprint's identifier 19:07:01 Deewiant: there are two 1s on the stack 19:07:07 hmm, /me has an idea 19:07:08 d'oh 19:07:13 right you are 19:07:17 ehird: use some sort of readbuffer-valid/readbuffer-invalid flag? 19:09:08 ios.closed? => true or false 19:09:08 Returns true if ios is completely closed (for duplex streams, both reader and writer), false otherwise. 19:09:15 ^^ but I only want to know about reading! 19:09:25 ehird: then use a non-duplex stream? 19:09:38 ais523: but I need both input and output, for one process 19:09:41 It's the game process :-) 19:09:46 aha 19:09:47 .eof? 19:09:48 of course 19:10:43 wow what happened 19:10:45 it's gone molasses slow 19:11:02 ehird: you might want to look up on how it checks for EOF 19:11:11 it may be something silly like test read + unget with timeout 19:11:13 ais523: my thoughts exactly 19:11:33 ais523: how DO I detect if your game exited 19:11:34 :-) 19:11:53 ehird: by looking at its process number? 19:11:58 that's the usual method 19:12:27 e.g. you can use kill to see if it's possible to send something a signal, if it isn't then it's probably exited 19:12:46 WTFFF 19:12:46 Tue May 06 19:13:41 +0100 2008: ERROR: Resource temporarily unavailable 19:13:03 :-) 19:13:23 your server has switched to Daylight Saving Time 19:13:34 mightn't that cause problems during the DST switch? 19:13:34 ais523: ha, that's not quite what i was talking about 19:13:46 no, it's just that my processes are only lasting one requset 19:14:22 languages other than UNIXy shells have insufficient ampersands 19:14:46 ais523: EAGAIN is the error, by the way 19:14:56 whut does that be meanin' 19:15:09 ehird: EAGAIN means that an application started a non-blocking read, but it would have blocked 19:15:18 so it returns instantly with an error, because the read is non-blocking 19:15:23 ais523: ah! 19:15:33 ais523: how do I do a non-blocking-read-but-blocking-if-it-needs-to-be 19:15:39 ? 19:15:44 just do a blocking read? :-P 19:15:46 a read is either blocking or not 19:15:54 that is: 'if the process dun wanna give me nuttin', just return the empty string. But if it has sum of dat nice output for me, block and gimme it' 19:15:55 it sounds like you've described a blocking read 19:16:13 ais523: but if I do a blocking read it'll wait until the process wants to output N characters 19:16:25 I do this every request, to get the output it's sent, y'see 19:16:25 ehird: you've just described a non-blocking read 19:16:29 (dropped the thread) 19:16:39 ais523: OK, but it's having that odd error, so it's obviously not doing what I asked. 19:16:39 presumably you're running it in a tight loop, and that's causing the slowness? 19:16:54 errr ... What 19:17:03 When did I say anything baout slowless 19:17:04 *slowness 19:17:16 it's gone molasses slow 19:17:22 ais523: that's not related in any way to this. 19:17:25 i fixed thatl 19:17:27 oh 19:17:28 anyway: 19:17:32 proc.buffer += proc.read_nonblock(4096) 19:17:36 i do that each time you view the game screen 19:17:42 to syphon anything the game wants to tell me 19:17:49 but this isn't working past the first request 19:17:51 what does read_nonblock return in a situation where it would block? 19:17:52 it fails with EAGAIN 19:17:56 null, all data available, or error? 19:18:00 ais523: EAGAIN, presumably? 19:18:02 That's what you said. 19:18:05 yes, it does in C 19:18:10 ais523: Yes, EAGAIN. 19:18:12 but I would have expected Ruby to wrapper around that 19:18:14 That's what t's giving me. 19:18:17 An IOError of EAGAIN 19:18:21 (raises an exception) 19:18:25 "read_nonblock just calls read(2). It causes all errors read(2) causes: EAGAIN, EINTR, etc. The caller should care such errors. " 19:18:26 even python just wraps around the errnos 19:18:29 that's ridiculous high-level language design 19:18:30 Deewiant: Yes. 19:18:38 ais523: No, it's common high-level language design 19:18:39 Very common 19:18:39 looks like you have to catch the EAGAIN yourself 19:18:43 Haven't seen one langugae not do it 19:18:48 ais523: OK, and if I get an EAGAIN whatd o I do? 19:18:50 *do 19:18:54 I'll look it up 19:19:03 I could do proc.read(4096), but then what if the game wants to give me, say, 512 characters? It'll hang. 19:19:18 ehird: according to the documentation of read(2), you only get EAGAIN if there's no data 19:19:21 and all the data available otherwise 19:19:40 ais523: OK 19:19:42 so just trap the exception and handle it with no action in the handler 19:19:51 proc.buffer += proc.read_nonblock(4096) rescue nil 19:19:53 yes, ruby even has post-rescue 19:20:31 ais523: OK, a bit better, except that when I type 'Go' now it gives me a screen with just my input. Then if I refresh it sees it 19:20:37 (because, obviously, the output isn't instanteneous) 19:20:42 sounds like a race condition 19:20:48 yes 19:20:57 but i don't see what i can do about it save for an artificial delay 19:21:54 normally, some sort of semaphore or spinlock, or other way to send data between multiple process 19:21:57 s/$/es/ 19:22:11 e.g. (1) COME FROM (1) AGAIN / ABSTAIN FROM (1) in C-INTERCAL 19:22:11 ais523: Even more worryingly, if I do 'Up' 19:22:18 then it doesn't display anything, no matter how many refreshes 19:22:20 until the next input 19:22:25 strange 19:22:35 are you flushing the pipe into my program? 19:22:49 ais523: oh. that might hlep 19:22:50 also, my program doesn't flush output pipes, you may need to add a few fflushes in there 19:22:51 XD 19:24:10 ais523: into your program? 19:24:13 i'm trying not to modify it 19:24:22 with luck it's line buffered 19:24:26 well, programs built to run in ttys don't always run properly in pipes 19:24:37 sometimes you need to change the buffering mode of the program 19:25:10 e.g. all C-INTERCAL 0.28 output programs support a command-line option to flush after every output character 19:25:21 so you can cause that to happen without modifying the output 19:25:56 ais523: if I paste my code will you think of something? :P 19:26:04 ehird: if it's written in Ruby, probably not 19:26:08 ais523: it's very readable 19:26:11 it's a good language for several things, but I don't know it 19:26:19 and understanding the code won't solve the problem 19:26:28 ais523: while reading it, this might help - http://www.ruby-doc.org/core/classes/IO.html 19:26:32 it's understanding what obscure language feature you need to solve it that's needed to solve the problem 19:26:45 http://pastebin.ca/1009573 19:26:51 i don't think it's obscure 19:26:52 really 19:28:46 ais523: nothing obvious? 19:29:02 I suggest modifying my program to flush and send some special character (there's probably a control char in ASCII for this purpose, it's got a lot of useful control chars like that) after every input, and blocking for that char 19:29:19 otherwise, how can you possibly tell when my program's finished its output? 19:29:43 failing that, get my program to flush (or switch stdout unbuffered), and put a time delay in before the reload 19:29:47 ais523: well, there's an online zork 19:29:47 :-P 19:30:05 anyway, ais523, your program just uses raw printf 19:30:06 changing would be hell 19:30:16 no, trivial 19:30:24 if it's just printf you can #define printf to flush 19:30:25 :| 19:30:33 ais523: yeah, but then I can't use "printf" 19:30:44 and you also use puts 19:30:51 or you can just use a single setbuf call on stdout 19:31:25 setvbuf(stdout, _IONBUF, 0, 0); 19:31:34 that command causes all stream I/O on stdout to flush instantly 19:31:40 just put it at the start of main() 19:32:01 esogame.c:176: error: ‘_IONBUF’ undeclared (first use in this function) 19:32:13 _IONBF, sorry 19:32:56 esogame.c:176: warning: passing argument 2 of ‘setvbuf’ makes pointer from integer without a cast 19:33:08 have I got the args in the wrong order? let me check again 19:33:23 setvbuf(stdout, 0, _IONBUF, 0); 19:33:24 stdout, NULL, _IONBF, 0 19:33:25 that's better 19:34:04 ais523: well, nothing mmuch happens 19:34:09 really looks like I'm gonna have to add a delay.. 19:34:10 but that sucks 19:34:15 you need a delay as well 19:34:21 that just prevents the stair lockup problem 19:34:22 ais523: but how much 19:34:25 it does, doesn't it 19:34:32 yes 19:34:33 it does 19:34:35 and the delay needs to only be a few hundred milliseconds 19:34:49 but there's no way you can do without a delay without further modifying the program you interface with 19:35:05 ais523: OK, seems to work apart from one thing 19:35:09 what one thing? 19:35:13 if you give it an empty line you have to give it some input before it'll say it doesn't understand 19:35:27 does my program do that? 19:35:33 ais523: oh wait 19:35:34 is it a bug with you or with me, in other words 19:35:36 you just hang on enter 19:35:38 it's a bug with me 19:35:41 if I remove the stripping of newlines 19:35:46 then it'll add a new line each time 19:35:46 so 19:35:47 obvious 19:38:40 all fixed now? 19:39:04 ais523: OK 19:39:08 ais523: It basically works. 19:39:17 I only need to add like 2 things: 19:39:26 - The ability to quit the game properly 19:39:39 - Disabling your saves, because they can access the FS and don't work anyway 19:41:14 ais523: so, you say I should try signalling 19:41:15 to see if it's dead 19:41:16 what signal? 19:41:23 this will be done on each refresh/entered line, etc 19:41:25 there's a no-op signal for that purpose 19:41:34 number 0, I think 19:42:39 yes, kill's documentation says it's 0 19:43:10 I'm not sure how that interacts with zombies, though 19:44:11 BRAINS... 19:44:16 sorry, reflex 19:44:29 zombie processes can be a pain to get rid of 19:44:39 in computer games you kill zombies with headshots 19:44:47 on UNIXes you kill zombies by killing their parents 19:44:56 hahaha 19:45:00 that would be a great fps 19:45:04 there's an invasion of zombies 19:45:08 SOLUTION: kill ancestors 19:45:13 and they immediately die 19:45:15 quite difficult due to the need to sort out the recursion 19:45:41 ehird: there was something on that on TvTropes (WARNING: addictive) 19:45:55 ais523: so it seems that I can still kill -0 your game after it's done, because it's still >open< 19:45:58 you've just stopped writing to it 19:45:59 (eof) 19:46:03 yes, that's the problem 19:46:07 can the EOF be detected? 19:46:11 ais523: yes -- .eof? 19:46:14 but as we've discussed 19:46:15 that's molasses-slow 19:46:16 or the SIGPIPE that you get for writing to a finished process? 19:46:18 and seems to be broken anyway 19:46:22 and it's not writing that helps 19:46:25 because just after writing Q 19:46:28 we go to the display screen 19:46:33 -> we need to detect it without writing 19:46:49 well, the command normally used for that is wait 19:46:52 but it waits... 19:47:01 I wonder if there's a non-blocking version? 19:47:16 dont_wait 19:47:19 sounds INTERCALly 19:47:41 ais523: I am tempted to write a language in which your adventure game will be both easy to write and will be portable across UIs ;) 19:47:44 that would be fun 19:47:46 it could even by esoy 19:47:58 in C it's waitpid(pid, &status, WNOHANG) 19:48:03 not sure what that translates to in Ruby 19:48:42 waitpid(pid, WNOHANG) 19:48:54 Deewiant: bingo 19:48:55 no clue what happened to the status 19:49:02 are you a rubyist or just good with google :-) 19:49:03 and 19:49:04 isn't it kind-of important in this case 19:49:05 the status is returned 19:49:08 good with google 19:49:09 because otherwise it's a no-op 19:49:13 and somewhat of a rubyist 19:49:21 Deewiant: anyway, it's Process.waitpid 19:49:21 but not nearly enough to remember this kind of stuff :-P 19:49:29 yep 19:49:41 and Process::WNOHANG if you want to be pedantic ;-P 19:50:19 ais523: okay, almost there 19:50:20 after a quit 19:50:21 pedantic = needed for program to work, or compiler setting? 19:50:22 if you refresh 19:50:23 it's done 19:50:26 looks like i need more delay 19:50:26 :D 19:50:28 ais523: and needed 19:50:33 ruby ain't a compiler anyway 19:50:38 sorry, interp setting 19:50:44 ais523: needed, although I think there may be some way of importing the module so that it's not 19:50:45 it's an interpreter of the slowest kind (YARV, aka Ruby 1.9 aka Ruby 2.0 is fixing this) 19:50:47 not sure 19:50:56 actually, I'm kind of surprised that you needed the delay at all 19:51:03 considering the relative speeds of Ruby and C 19:51:57 ais523: snarky 19:52:03 Mongrel, the server, has its core written in C 19:52:09 sorry 19:52:11 and since it's a long running process, really we're IO bound 19:52:16 but i agree 19:52:21 ruby is the slowest thing ever :-) 19:52:28 ehird: try HOMESPRING some time 19:52:30 but soon... 2.0.. 19:52:39 I'm pretty sure Ruby's faster than that 19:52:44 (ruby 1.9 is almost usable, and it will stablly become 2.0 soon) 19:52:50 ais523: did you know - ruby has continuations 19:52:53 plain jane callcc 19:52:54 -!- boily has joined. 19:53:04 I'd have been disappointed if it didn't 19:53:10 even reusable. a limitation, though: you can't switch to a continuation made in another thread 19:53:13 ais523: well, python doesn't 19:53:25 "It has continuations!" shouldn't be some sort of brilliant killer-app nowadays 19:53:27 that limitation kinda destroys them though 19:53:28 it should be a default 19:53:38 esp. since it copies the stack (since they're very c-integrated) 19:53:40 so it's slow too 19:53:40 the next step is getting all langs to have continuations that serialise to disk 19:53:41 even so 19:53:43 nice to know it's there 19:53:49 yeah they don't serialize either 19:54:08 I can't actually thing of any lang but Underlambda with serialisable continuations 19:54:10 ais523: ruby = lisp + perly syntax with some extra humaney stuff + smalltalk 19:54:24 sounds much like the much-fabled Perl5 19:54:27 + simplified + some complexity, but of a new kind (ruby's own kind) 19:54:27 only they got to it first 19:54:32 s/Perl5/Perl6/ 19:54:50 ais523: i've seen perl6 -- it's nothing like ruby 19:54:55 it SHOULD be, though :-) 19:54:55 no 19:55:00 the description fits both languages 19:55:02 but they are still different 19:55:04 ais523: one advantage of ruby is that you can actually compile it ;P 19:55:12 perl6 is actually more mallable than perl5 19:55:29 well, in perl6, every {} is actually an anonymous lambda, and context determines whether it runs or not 19:55:31 I like that idea 19:57:06 OK, I think I've got the game playable 19:57:59 website? 19:58:43 -!- boily has quit ("Schtroumpf!"). 19:59:13 ais523: about to 19:59:15 just disabling saves 20:00:23 ais523: http://91.105.74.139:8080/ 20:00:24 have fun 20:00:29 err wait 20:00:33 just gonna log when someone starts a new game 20:00:35 Could not connect to host 91.105.74.139 (port 8080). 20:00:38 -!- Slereah has joined. 20:01:04 ais523: yes 20:01:06 added the logging 20:01:07 should work now 20:01:08 http://91.105.74.139:8080/ 20:02:06 ais523: 'sit good? 20:02:10 I think so 20:02:27 'twould be nice to autoscroll to the bottom of the page, though 20:02:35 that's probably possible using anchors 20:02:48 ais523: does for me! 20:02:51 because it focuses the input field 20:02:57 not for me in Konqueror 20:03:01 ais523: use epiphany 20:03:02 nor for me in Firefox 20:03:16 it does it in a