00:03:46 Ahah! 00:03:48 Gato works. 00:03:56 Maybe I can write the Andrei Machine 9000! 00:04:10 Slereah: zgoshmgz 00:05:49 I am full of hope. 00:06:01 I really don't want to write it in Python. 00:06:13 Slereah: whuts gato 00:06:46 http://gato.sourceforge.net/http://gato.sourceforge.net/? 00:06:49 It's a program to write algorithms on graphs. 00:06:55 Yes, that one. 00:06:59 Slereah: im sorry but that code is python 00:07:01 they just embed it 00:07:05 and add their own functions 00:07:25 Yes. 00:07:37 But what I mean is, I don't want to build everything 00:07:57 I am terrible at coding, so I really don't want to write the whole graph gestion myself 00:08:27 Plus, all my interpreters have some way of seeing what happens to the machine, and I don't want to make an exception. 00:09:19 Slereah: Cool. 00:14:17 -!- timotiis has quit ("rebloodybooting! They said I wouldn't have to do this on linux!"). 00:14:27 hah 00:16:41 -!- timotiis has joined. 00:18:20 timotiis: sorry 00:18:45 hehe 00:39:46 http://rafb.net/p/dUgDuS45.html 00:39:53 looks like ccbi is broken Deewiant ^ 00:50:03 -!- Sgeo has joined. 00:53:14 -!- timotiis has quit (Connection timed out). 01:01:58 -!- Sgeo has quit (Read error: 104 (Connection reset by peer)). 01:05:20 -!- Sgeo has joined. 01:17:05 On Fark: 01:17:06 "There are actually people named null, and yes, I've actually seen this cause problems in production database code. 'Null' was the last name where I saw it however." 01:26:31 hmm 01:27:10 public class Closure { public Closure(Object... vars); public U apply(T arg); } 01:27:15 e.g. 01:27:45 new Closure(a, b, c) { public Integer apply(Integer n) { return n + (Integer)this.vars[0]; } } 01:27:51 this.vars={a,b,c} 01:28:01 maybe nice if you are compiling a language to jvm 01:55:14 hah! ehird: i was not there! 01:55:25 *here 01:55:29 oklofok: heh 01:57:13 oklofok: but ... yeah 01:57:22 that's also why you shouldnt compile oklotalk-- to the jvm, btw 01:57:25 it doesn't like closures 02:00:10 i would probably make the compilation at a bit lower level 02:00:29 but python bytecode might be nicer 02:00:47 also, as i don't really like java, i don't really wanna use it's bytecode 02:00:48 :o 02:00:55 anyway, /me goes back 02:01:04 before you start asking again :-) 02:01:06 -> 02:27:05 -!- Quendus has quit (Read error: 113 (No route to host)). 02:27:42 -!- Quendus has joined. 02:30:10 quendus 02:30:12 haven't seen that name 02:30:13 hi 04:06:47 -!- ehird has quit (Read error: 104 (Connection reset by peer)). 04:25:02 The Security Manager is vetoing my using Firebug in Fx3.. 04:25:26 >>> 2+2 04:25:26 commandLine.evaluate FAILS: [Exception... "Security Manager vetoed action" nsresult: "0x80570027 (NS_ERROR_XPC_SECURITY_MANAGER_VETO)" location: "JS frame :: chrome://firebug/content/commandLine.js :: :: line 100" data: no] 04:26:35 -!- fizzie has quit (Remote closed the connection). 04:26:39 -!- fizzie has joined. 04:38:56 -!- adu has joined. 05:00:34 lol at http://youtube.com/watch?v=g3KufmUlF5M 05:00:39 (I'm commented SJGster) 05:38:45 -!- calamari has joined. 05:38:50 hi 05:39:36 Hi calamari 05:39:41 http://youtube.com/watch?v=g3KufmUlF5M == fail 05:44:37 hi 06:20:58 -!- calamari has quit ("Leaving"). 06:38:41 AnMaster: cheers, I'll take a look tonight 06:45:44 -!- olsner has joined. 06:47:42 -!- Sgeo has quit ("Ex-Chat"). 07:14:01 -!- GregorR-L has joined. 07:14:03 http://www.cafepress.com/bizarregeek.255291006 07:14:55 (For those who like CAs :P ) 07:42:46 Deewiant, not that mine works perfectly either so far 07:43:08 Deewiant, it fails when using garbage collector for unknown reason 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:10:35 -!- adu has quit ("Bye"). 08:34:12 -!- olsner has quit ("Leaving"). 08:36:00 -!- Iskr has joined. 09:02:45 Deewiant, actually the issue seems to depend on how you interpret the PERL fingerprint docs... hm... 09:03:29 "-e print 'A',eval(%s)" or "-e print 'A';eval(%s)" 09:03:34 where %s is the popped string 10:16:42 -!- GregorR-L has quit (Read error: 110 (Connection timed out)). 10:20:48 okokoko 10:20:51 -> 11:06:50 -!- timotiis has joined. 11:28:09 AnMaster: okay, so we want the Perl program to be able to use the std streams as normal, but how do we get the eval result out then? 11:28:36 I'm confused as to how that would be possible 11:32:35 would just "$x = eval(%s); print 'A',$x" work? can the %s mess with a variable called $x in some way? (I'm unaware of the limitations of eval in Perl) 11:43:23 -!- dbc has joined. 11:56:57 and hmm, even that wouldn't work, since %s might print A and $x might contain A 12:02:17 hm ok 12:02:37 Deewiant, I'm no perl expert either 12:02:40 far from 12:03:24 bbl 12:03:27 I'd say the simplest solution here is to say that accessing stdout is undefined 12:03:37 alternatively make it stderr for more convenience 12:07:49 -!- Sgeo has joined. 12:36:13 -!- jix has joined. 12:59:32 Deewiant, I capture both stdout and stderr 12:59:34 that isn't hard 13:00:28 AnMaster: yes, but how do you get the eval result 13:01:42 Deewiant, just int fds[2]; pipe(fds); pid = fork() if (pid == 0) { /* in child */ dup2(fds[1], 1); dup2(fds[1], 2); .... execvp("perl", arguments); } else { ... read(fds[0], ...) ... } 13:01:54 yes, capturing stderr is trivial 13:01:55 I know this 13:01:56 Deewiant, well a good question 13:02:16 the specs are unclear on what to exactly capture I think? 13:02:21 what exactly to* 13:02:24 no, I think it's clear 13:02:28 hm 13:02:33 it's the value of the expression evaled 13:02:41 hm 13:02:52 e.g. eval 2+2 and get 4. 13:02:54 what about loading libperl.so, I think you can do something like tht 13:02:56 that* 13:03:40 possibly... but it shouldn't be necessary 13:03:51 true 13:03:54 based on what the docs say, as well 13:04:05 anyway then S would get a lot more complex 13:04:09 "It pushes a 1 on the stack otherwise, indicating that the Perl language will be shelled when needed. 13:04:11 say "isn't loaded yet" 13:04:25 hm true 13:04:40 that speaks explicitly of shelling, so libperl.so is a no-go ;-) 13:04:58 I haven't read the whole discussion, but based on what I've seen: no-one says you need to limit yourself to STDOUT and STDERR, why not just open a pipe for file descriptor 3, and in Perl do open FD3, ">&3"; print FD3 eval(...); 13:05:11 anyway, now I really understand why ppl don't use read() but use fread() instead 13:05:27 it a lot easier to work with 13:05:54 fizzie, interesting 13:06:08 fizzie: isn't it possible for the perl code to always be using FD3 itself, though 13:06:26 fizzie, that would print both the result of the eval as well as any print statements inside the eval? 13:06:29 not very likely, but possible? 13:07:16 and hmm, I wonder if that's possible on windows 13:07:32 Well, you'd get stdout, stderr and that eval result via three different pipes. But sure, the Perl code could use file descriptor 3 for something. 13:07:46 hm 13:10:33 also I wonder why I get a segfault with boehm-gc if I use execlp after fork(), execvp works 13:10:49 it makes no sense to me 13:14:59 even more interesting is using valgrind (GC disabled then) 13:15:16 using --trace-children=yes cause things to fail if I use execvp, but they work with execlp 13:15:22 only under valgrind that is 13:17:36 Deewiant, btw, does windows have vfork()? 13:17:43 windows doesn't have fork 13:17:44 of any kind 13:18:08 so how do you start another process without replacing the current one 13:18:22 CreateProcessA/CreateProcessW 13:18:27 don't ask me about the details 13:18:35 I just use what Tango provides 13:19:07 as far as I can see you need to fork() then { in child: dup2 and exec } { in parent: waitpid and read } 13:19:14 hm 13:19:22 windows doesn't use the fork/exec model 13:19:30 I see 13:19:53 hm actually I spend most code at doing read and trying to handle all the error conditions/results from it 13:20:05 yep, same here 13:20:06 ie, "do we need to realloc and read some more or are we done yet" 13:20:09 just running the program is 2 lines :-P 13:20:24 well a bit more for building arguments and such here 13:20:36 but the read code is really a mess 13:22:13 I think doing read into same buffer and keeping extending it may be the wrong way, read and then append the buffer to another buffer would be way easier, and, due to \0 termination, faster 13:22:17 I think it'd be fair to just disallow stderr for PERL 13:22:26 there's no way to write to stderr in Befunge otherwise either 13:22:29 hm? well capturing it isn't an issue 13:22:38 no 13:22:43 but then you can reserve it for the eval result 13:22:51 anyway I use a perror() after forking 13:22:52 i.e. print stderr eval(%s) 13:23:08 in case of exec fails 13:23:22 and then you can pass the perl script's stdout through to the interpreter's stdout 13:23:31 whilst capturing the stderr and reading the eval result from it 13:23:52 Deewiant, hm and what about print stderr eval(print stdout "foo")? 13:23:58 hm 13:24:01 2008-04-16 15:23:21 ( Deewiant) and then you can pass the perl script's stdout through to the interpreter's stdout 13:24:09 Deewiant, not sure if that is a good thing or not 13:24:19 I think it's the least error prone option 13:24:26 + simple to implement :-P 13:25:43 because it allows the PERL script to do output if it so wishes 13:25:58 Deewiant, btw where do you close the fd in eval in perl.d 13:26:06 or is D handling that for you? 13:26:12 Tango does it 13:26:26 in p.execute(); I would guess 13:26:50 read = p.stdout.input.read(buf); 13:26:52 hm 13:26:57 stdout.input? 13:27:13 the input stream of the process's stdout 13:27:32 err, stdout is just output, it isn't bi-directional 13:27:50 but if another program is writing to it what are you going to do 13:27:54 you are going to read from it, no? 13:27:55 so it's input 13:28:08 similarly stdin is an output stream 13:28:09 hm... yeah 13:28:19 Deewiant, but then is stdout.output invalid? 13:28:28 when done on another process 13:28:32 yes, I think so 13:29:02 You could also in Perl do something like: open(REALERR, ">&STDERR); open(STDERR, ">&STDOUT); print REALERR eval(...); if you wanted to have all the eval'd piece outputs (both stdout and stderr) mixed in the stdout of the executed process, leaving the real stderr for the eval result. Of course the eval'd code could still get to the real stderr if it really wanted to. 13:29:10 Deewiant, what is the print A bit about really btw 13:29:25 AnMaster: it took me a while to figure out, too ;-) 13:29:40 Deewiant, well you do it, I don't see why thoug 13:29:41 AnMaster: the idea being that if %s prints to stdout, we take only the eval result. 13:29:41 though 13:29:46 I think. 13:29:49 ah I see 13:29:59 fizzie, heh 13:30:00 but of course that doesn't work if the eval result contains A so it's crap. :-P 13:30:26 fizzie, I know about 0 perl, I do know hello world in perl and I do know PCRE (by libpcre) 13:30:29 but that's about it 13:30:33 fizzie: hm, that might be a good idea actually. 13:30:59 fizzie, so forgive me if I'm ignorant, but the quotes seem mismatched? 13:31:12 open(REALERR, ">&STDERR); <-- as in that 13:31:24 Yes, there's two "s missing. I was about to metion it, but then didn't bother. Should be ">&STDERR". 13:31:30 thanks 13:31:51 fizzie: and then just tell the eval'd code not to mess with a stream called REALERR? Or is there another way it can subvert the whole thing? 13:32:28 Well, the eval'd code could use open(WHATEVER, ">&2"); and use WHATEVER to print to the real stderr file descriptor. 13:32:57 Darn. There's no way to hide the real stderr completely? 13:33:20 I don't think there is, except of course closing it, but that kind-of defeats the purpose. 13:34:04 Alright. Hmh. 13:34:58 Perl might have some sandbox-y functions (probably as CPAN modules) for limiting the things the eval'd code can do. And it might be possible to hook into Perl's "open" call behaviour somehow, but that would mean even more Perl-guts. 13:35:41 ugh. 13:36:59 hm 13:37:05 killall perl? ;) 13:38:02 fizzie, would calling it say, CFUNGE_REALERR work 13:38:17 then I could just say "your own fault, cfunge is my namespace" 13:38:19 AnMaster: unless the code uses something called CFUNGE_REALERR. 13:38:26 AnMaster: or opens ">&2". 13:38:53 point is, is _ valid or not 13:39:04 sure 13:39:17 well considering it's perl, it is bound to have some special meaning 13:39:18 if not, call it CFUNGEISMYNAMESPACEYOUDORKREALERR 13:39:18 :-P 13:39:28 it's a lot like C lexically. 13:39:56 well iirc it does have packages, ie use foo; not #include 13:40:08 thought they provided kind of C++ namespaces 13:40:14 I may totally wrong 13:40:38 yes, not 'the same as C', just 'like C'. 13:40:52 Actually you could open(my $realerr, ">&STDERR); open(...); eval(...); which I _think_ would mean that the eval'd code wouldn't be able to access the filehandle directly, since there's no symbol table entry for it, just the reference in $realerr. (Can't remember details about lexically scoped "my" vars and eval, but at least with some minor changes.) 13:41:11 Still won't help with the open(FOO, ">&2"); problem. 13:41:36 hm. 13:41:40 (With open my $realerr you'd then do print $realerr eval(...);) 13:42:14 wait a second, is $ same as in bash or something else? 13:42:30 $ is just the prefix for a scalar variable. 13:42:44 mhm same as in bash more or less then 13:42:56 fizzie: perl -e 'my $x = 2; print eval($x+$x);' prints 4, at least. 13:43:23 is that evaluated lexically like a pre-processor first? 13:43:49 -!- atsampson has quit (Read error: 113 (No route to host)). 13:43:54 in bash you would need to escape the \$x in an eval statement 13:44:08 because of order of expanding 13:44:41 (however I will not write a perl escaper in C or something like that) 13:47:20 Well, if nothing else works, you can always use print $realerr eval {$realerr = undef; %s}; but that's butt-ugly. I'm pretty sure there is a better way for making a variable that doesn't leak into eval; lexically scoped vars evidently do. 13:48:34 fizzie, there probably is indeed, it's perl after all 13:48:41 Actually more like eval { local $realerr = undef; %s } to avoid gobbling the real $realerr, but then it can't be a "my" variable. 13:48:59 it is probably something like z having a special meaning in a special context *runs* 13:49:09 remember, perl DOES have a entry on the esolang wiki 13:49:58 I think someone said that instead of "foo" you could do q/foo/ in perl. 13:50:02 or something like that 13:50:08 you can do that in D 2.0 as well. :-) 13:50:25 Deewiant, s/)/(/ 13:50:45 :-P 13:50:55 and that was sed not perl! 13:51:17 I have no problems using sed or awk 13:51:19 it's also perl. 13:51:29 Deewiant, yeah I thought so 13:51:31 Actually, if you're really doing string-substitution in the Perl code itself, you don't need eval, and this should work: my $code = sub { %s }; open my $realerr, ">&STDERR"; open STDERR, ">&STDOUT"; print $realerr $code->(); 13:51:45 fizzie, eh? 13:51:56 fizzie: unfortunately the specs say that it should be an eval(). :-) 13:51:57 "E ('Eval') pops a 0gnirts string and performs a Perl eval() on it, possibly (or not) shelling Perl as indicated by S above. The result of the call is pushed as a 0gnirts string back onto the stack." 13:52:07 fizzie, from http://catseye.tc/projects/funge98/library/PERL.html 13:53:11 Oh. Well, my $code = sub { return eval('%s'); } ... then. 13:53:44 in fact, isn't eval(%s) equivalent to %s always? 13:54:10 where %s isn't wrapped in "" or '' or whatever of course 13:54:13 Deewiant, hm... couldn't you pass a string to eval, read from say stdin? 13:54:50 yes, but I'm just pondering. 13:55:06 I don't think eval(%s) really does much, since the %s is evaluated normally, and the result is then passed to the 'eval' function. 13:55:26 eval(my $x = 1; print $x) versus my $x = 1; print $x 13:55:53 ah 13:55:55 "Alternatively, if given a block of code - that is, the code is known at compile time - eval traps run-time exceptions." 13:56:08 what does that mean Deewiant ? 13:56:14 Actually "eval(my $x = 1; print $x)" shouldn't be syntactically right at all. 13:56:16 divide by zero or? 13:56:18 I don't know 13:56:23 something like that probably 13:56:30 fizzie, it shouldn't? 13:56:31 fizzie: only expressions? 13:56:35 Eval takes either a string or a block of code and evaluates it. 13:56:45 hm 13:56:50 perl -e 'eval(my $x = 1; print $x);' gives syntax error at -e line 1, near "1;" 13:57:08 fizzie, perl -e 'eval(print "bar");' works though, hm 13:57:12 alright 13:57:27 AnMaster: that's an expression. you can pass the result of printf to a function in C just fine as well. 13:57:34 hm 13:57:39 right 13:58:10 Since the spec speaks of strings, I think it means one should do something like eval('%s'); but that would need escaping the 's in the string. 13:58:16 (Or reading it from stdin or some-such.) 13:58:31 um 13:58:34 perl -e 'print eval(4 + 5)' 13:58:42 is not same as perl -e '4 + 5' 13:58:53 and with multistatement just adding a print doesn't work 13:59:43 you said something about code block? 14:00:34 and then there is the question of non-matching ( and ) in the input hm... 14:00:41 perl -e 'print eval("my $x = 1;")' prints nothing 14:00:49 but it doesn't error out either 14:01:12 "print eval(%s)", "10); something here(blah" 14:01:18 yay perl injection? 14:01:22 perl -e 'print eval("my \$x = 1;")' however prints "1". 14:01:49 argh, the shell goes inside "" inside '' 14:02:06 stupid bash, just do what I mean 14:02:08 Deewiant, err? bash doesn't at least 14:02:17 well evidently it does 14:02:19 perl -e 'print eval("my \$x = 1;")' works here 14:02:25 I think it's actually the Perl that does mess the $x inside a ""-string. 14:02:27 or no, is that perl mucking it up 14:02:34 Deewiant, indeed it is perl 14:02:35 ayeh 14:02:39 makes sense 14:02:54 fizzie, so given the specs, how would you do it? 14:03:09 I think sub { return eval('%s'); } is the best idea so far 14:03:22 need to do escaping in %s though 14:03:26 which is tricky 14:03:31 yeah something I don't want to mess with 14:03:45 considering the syntax of perl probably could escape escaping 14:03:48 so, instead, return eval(%s); 14:03:58 and statements are disallowed thus. 14:04:08 hm doesn't that break the specs? 14:04:17 But eval(%s) makes really no sense. The '%s' part is evaluated before even passing the result to 'eval'. 14:04:17 how? 14:04:37 fizzie, hm ok 14:04:47 then the specs are confused or PERL is practically impossible to implement without writing the interpreter in perl. 14:05:06 fizzie, could you read the stuff for eval from stdin? 14:05:18 because then perl would escape it itself kind of 14:05:33 Well, you could. Then you'd just use eval($s); after reading into $s. 14:05:42 ie, $variable = read(); eval($variable) 14:05:49 I don't know the needed syntax 14:06:03 fizzie, and how would you read that? 14:06:10 AnMaster: and if the perl script wants to read stdin? 14:06:17 Deewiant, hm true 14:06:25 Well, you'd probably need to have some sort of length-prefix before the code, so that you can keep the stdin open for further reads. 14:06:38 aye. 14:06:56 also it need to be blocking read 14:07:15 so if it get to read before the parent got to write, it would wait 14:08:24 fizzie, well if you can write the needed perl code to read like that, I could do the C bit 14:08:33 I wouldn't be able to do the perl bit sadly :/ 14:08:39 perl is trivial to learn 14:08:47 for short stuff like that I mean 14:08:49 If you don't want to use a prefix, you could use that file descriptor 3, read the code-to-evaluate and then close it. 14:08:57 fizzie, prefix could work 14:09:03 prefix is fine 14:09:10 I guess just write(fd, strlen(perlcode))? 14:09:20 however you choose to implement it 14:09:28 I guess that'd work the easiest 14:09:30 or if you want as a string 14:09:43 Well, it's easier to "read until eof" in one line of Perl than it is to "read at least this many bytes". 14:09:50 ie snprintf("%d", strlen...") 14:10:07 hm EOF isn't a special char is it 14:10:09 it's easier in most languages without scanf. 14:10:15 EOF isn't a char. 14:10:25 or even with scanf, I guess. 14:10:55 fizzie, well, input would be a pipe created with pipe() in C in my case 14:10:55 my $code = ''; open FD3, "<&3"; $code .= $_ while ; close FD3; might do it. 14:11:12 using just stdin makes that a bit easier. 14:11:16 not sure how I would send a EOF that way 14:11:23 my $code = ''; $code .= $_ while <>; 14:11:29 or what 14:11:37 AnMaster: you send EOF by closing the pipe. 14:11:42 or file descriptor, or whatever. 14:11:45 hm ok 14:11:57 Deewiant, well a pipe is a set of two connected fd's in this case 14:12:14 If you close the write end, the read end should get an eof. 14:12:17 well you close the input stream. 14:16:32 fizzie, then print eval($code) or? 14:16:39 or "$code"? 14:17:25 no difference in perl, just like in bash :-) 14:17:32 Yep. 14:17:43 Deewiant, there is a difference in bash 14:17:49 foo="bar quux" 14:17:53 echo $foo 14:17:55 nope, no difference. 14:17:55 echo "$foo" 14:18:01 ? 14:18:03 the difference is that $foo will expand to two parameters 14:18:09 yes 14:18:10 while "$foo" won't 14:18:21 for echo it doesn't matter 14:18:23 but the string itself is the same, it's just the way it's passed to another program that differs 14:18:28 for say grep on a filename it would 14:18:33 -!- timotiis has quit (Connection timed out). 14:18:33 if the filename contains spaces 14:18:38 since eval() is a builtin function, not another program, it makes no difference. 14:18:49 I would assume that it's the same for any builtin function of bash. 14:18:51 Deewiant, for bash it matters for builtins too 14:18:59 example? O_o 14:19:35 echo will do the same, but say: foo="echo bar" 14:19:36 then 14:19:40 $foo 14:19:43 and "$foo" 14:19:47 would be different 14:19:50 the first would echo bar 14:19:51 -!- timotiis has joined. 14:20:06 the second would likely say "echo bar" not such command or something like that 14:20:36 Deewiant, and say test -f $file and test -f "$file" would differ when $file contains spaces 14:20:53 test is a builtin yes 14:21:33 Deewiant, oh and: foo="bar quux"; for i in $foo; do echo "$i"; done 14:21:43 is different from: foo="bar quux"; for i in "$foo"; do echo "$i"; done 14:21:50 Bash is indeed prone to splitting things at spaces; but in Perl I think there's a difference only if $foo doesn't happen to be a string. 14:22:16 fizzie, well there are exceptions: 14:22:23 foo="abc def" 14:22:26 bar=$foo 14:22:33 would be the same as: 14:22:35 bar="$foo" 14:22:37 in that case 14:22:40 however... 14:22:50 foo="abc def" is not the same as foo=abc def 14:23:05 the latter would try to run def with foo=abc in the environment 14:23:15 Deewiant, enough examples? 14:23:17 ;P 14:24:33 fizzie, would this mean something like: 14:24:45 my $code = ''; $code .= $_ while <>; open(CFUNGE_REALERR, ">&STDERR"); open(STDERR, ">&STDOUT"); print CFUNGE_REALERR eval($code) 14:24:45 ? 14:25:39 Yes, if you don't mind losing the use of STDIN in the Perl code. (And of course you can avoid the CFUNGE_REALERR "problem" with a bit more trickery.) 14:26:26 well how would I then save and restore the stdin? 14:26:38 or actually I could just use fd3 I guess 14:26:46 or just pass the length first. 14:26:54 and then read only bytes to $code. 14:27:09 Yes, but with the length-prefix the reading is more complicated. (Of course with fd3 the writing is a bit more complicated.) 14:27:20 "my $code = ''; $code .= $_ while ; close FD3; open(CFUNGE_REALERR, \">&STDERR\"); open(STDERR, \">&STDOUT\"); print CFUNGE_REALERR eval($code)" 14:27:33 assuming the \ is due to the whole thing is inside a C string 14:27:43 and I'm being too lazy to remove it this time ;) 14:27:47 fizzie: with fd3 I'm screwed on Windows, so I prefer the length-prefix method. ;-) 14:28:24 oh wait 14:28:26 no open 14:28:32 "my $code = ''; open FD3, \"<&3\"; $code .= $_ while ; close FD3; open(CFUNGE_REALERR, \">&STDERR\"); open(STDERR, \">&STDOUT\"); print CFUNGE_REALERR eval($code)" 14:28:34 hm? 14:29:22 Well, it looks correct, assuming the Perl code won't try opening &2, or using CFUNGE_REALERR. 14:30:00 fizzie: wouldn't heredoc be the easiest way of making $code directly? 14:30:04 just came to mind 14:30:35 because you can always pick a heredoc string not contained within the program script 14:30:50 Deewiant, finding such a string may not be that simple? 14:30:57 Hmm, yes; that's possible. 14:31:31 AnMaster: start with "THIS_IS_MY_FOOBAR_HEREDOC_STRING" and append that to itself until the prog no longer contains it or it exceeds the prog's length, whichever comes first. :-P 14:31:55 Deewiant, you need to search over the prog, linear search 14:32:02 for a long program that could be an issue 14:33:30 hm, closing the fd doesn't flush it it seems 14:33:40 at least not if it is a file, may be different with pipe 14:33:43 AnMaster: you need to write it to the file descriptor as well, which takes linear time? 14:34:16 Deewiant, hm what about vectored io? oh wait that won't work for a pipe 14:34:51 but I think you're right, in-memory fd writing is probably faster overall 14:34:55 Deewiant, anyway that just means O(n), while searching to see if the program contains a string means at least searching it twice if you hit it 14:35:11 AnMaster: which is still O(n), no matter how many times you do it. ;-) 14:35:29 hm true 14:35:38 If you feel like doing the heredoc thing, it probably makes sense to keep in mind that Perl does variable interpolation in my $code = < Even better than heredoc would be to use Perl's magic 'DATA' filehandle, but I'm not sure how well that works when passing the program as a command line argument. 14:36:40 I'm not going to do it, just wondered how well it would work. Good to know that, though. 14:39:19 Doesn't seem to me that reading from returns anything after the '__END__' marker when the script is passed with the -e argument. Otherwise it could've been much like the heredoc thing but without the suitable-string-finding issues. 14:42:30 seems it works with FD3 14:42:31 :) 14:43:36 Deewiant, so what will you do then? 14:44:02 stdin with the length passed first 14:45:39 A normal person would've just used print eval { %s }; which might not match the letter of the spec, but does match the spirit: takes the string and gives it to the 'eval' function. Of course it's not _exactly_ the same, the code is parsed at a different time and there might be other differences. 14:45:50 that's what I originally did 14:45:58 and then AnMaster came complaining :-P 14:46:07 Deewiant, err? you didn't use { 14:46:09 you used ) 14:46:10 err 14:46:10 ( 14:46:18 auto p = new Process("perl", "-e print 'A',eval(" ~ s ~ ")"); 14:46:25 and I didn't complain before about it 14:46:32 only difference is that one accepts only expressions, I think 14:46:45 if I had used {} you'd still have complained about the same issue ;-) 14:47:13 fizzie, if I passed this in stdin then, should it work?: $x = "Hello world"; print $x 14:47:13 Well, it really isn't the same thing at all: the expression isn't evaluated by "eval", it's evaluated just like the outer code, and then the result is passed to eval. 14:48:07 For example, perl -e 'eval(die "foo");' will die, while perl -e 'eval { die "foo" };' won't. 14:48:57 File descriptor 3, not stdin, I guess. But yes, it looks like valid Perl code to me, although traditionally there's a newline after the string. 14:49:01 I know I pass it on right FD 14:49:08 yeah 3 was what I did 14:49:13 because other stuff work 14:49:18 say 4+5 14:49:21 "my $code = ''; open FD3, \"<&3\"; $code .= $_ while ; close FD3; open(CFUNGE_REALERR, \">&STDERR\"); open(STDERR, \">&STDOUT\"); print CFUNGE_REALERR eval($code)" 14:49:29 that is escaped for C 14:50:29 Oh, I just figured out an embarrassingly easy way to pass the code to the Perl interpreter. 14:50:37 fizzie, oh? 14:50:53 Just do print eval($ARGV[0]); and append the code to the argument list of your "perl -e" call. 14:51:13 $ARGV[0] == "perl" probably? 14:51:20 No, $0 == "perl". 14:51:25 $ARGV[0] is the first "real" argument. 14:51:30 Perl Does It Differently(TM). 14:51:32 the first one after the program after -e? 14:51:33 as in argument for script? 14:51:57 perl -e 'print $ARGV[0], "\n";' foo prints "foo". 14:52:06 yays. 14:52:28 that makes things somewhat simpler. 14:52:40 although I wonder if there's a maximum limit on the length of an argument. 14:53:25 Well, the code was already being passed in the '-e' at some point, it's not a new problem. 14:53:42 true. 14:54:01 Of course the code itself can't "use" the @ARGV array, but looking at the spec it doesn't seem to say anything what @ARGV should look like. 14:55:01 Besides, it's then especially easy to write a Perl quine; print $ARGV[0]; will do it, if you start it in that environment. 14:56:37 -!- RedDak has joined. 14:57:38 AnMaster: alright, now your little test proggy prints 'hi 161'. :-P 14:58:03 well I don't have the same version around any longer 14:58:05 I extended it 14:58:19 http://rafb.net/p/VFZ2St69.html 14:58:21 is what I use now 14:58:52 alright, win. 14:59:04 and it works here too 14:59:10 just checking valgrind and such 14:59:27 fizzie, want to put you in a thanks to comment, what name should I use? 15:00:24 Uh, what sort of names have other people used? :p 15:00:52 ...er, that sounds wrong. 15:01:33 I'm not trying to pick a name, I just was curious about the type of names traditionally used for this sort of thing. IRC-nicks, realnames, something-else. 15:02:01 fizzie, I just want to know if you want some real name, or just "fizzie on #esoteric on freenode" 15:02:01 up to you. do you want your real name in the source code of befunge interpreters? :-P 15:02:15 Deewiant, hahah 15:02:29 I'd think deep and hard on that if I were you. ;-) 15:02:53 Deewiant, well you got your one all over the source of ccbi 15:03:00 I think I already have my real name in the sadly defunct GLfunge98, which didn't really get up the ground. (I think googling for my realname finds, thankfully way down in the list, HP-UX packages for that Befunge interpreter.) 15:03:36 AnMaster: I know, I've plunged off the deep end. :-) 15:03:46 aye, GLfunge98 looked promising. 15:04:02 There were lots of good intentions but lack of real motivation. 15:04:04 Deewiant, I'm not familiar with that proverb 15:04:16 So since I'm already quite a lost cause, feel free to use the real name, 'Heikki Kallasjoki'. Although I don't object to 'fizzie' either. 15:04:38 well believe it or not, but some want their real names 15:05:21 fizzie, you got to choose though 15:05:34 AnMaster: "take the plunge, to enter with sudden decision upon an unfamiliar course of action, as after hesitation or deliberation: She took the plunge and invested her entire savings in the plan." 15:05:45 hm 15:05:53 Er, well, just use the realname, then. 15:05:54 anyway why would it matter? 15:06:31 There it is, on the third results page, the HP-UX packages for a Befunge interpreter. Hopefully no prospective employers will bother reading that far. 15:06:33 fizzie: oh, you're the /author/ of GLfunge98? Didn't expect to find you alive with the program dead ;-) 15:07:14 fizzie, well how old were you? they can hardly think something you did while you were at university would matter for example 15:07:29 or that you did in your free time 15:07:36 I proudly display CCBI on my CV :-) 15:07:52 hm fizzie, you are from Finland? 15:07:53 I still from time to time get occasional pangs of regret over not continuing to play with GLfunge98, but not oftener than once every couple of months. 15:07:56 and even got a summer job in the building fizzie works in, if I read google correctly. 15:08:30 Deewiant, uhu? 15:08:31 If you mean the CIS lab at HUT, you've read correctly. 15:09:02 yeah, I'm just wondering if the building is in fact the same, or not. 15:09:23 I guess it's all in the same CS building so yes, I do believe so. 15:10:31 Actually I did have to give a 15 minute explanation about Befunge in a job interview for Nokia Research Centre (since I had "esoteric programming languages" in the CV) for a summer job in 2006, too, and got the place. Seems like it might even not be a negative thing. 15:10:44 (Although they were more interested in any Perl experience.) 15:10:53 Yeah, ditto. I wonder whether it was positive or negative. ;-) 15:11:11 fizzie, it shows a keen interest in programming on your free time? 15:11:15 probably a good thing then 15:11:22 I talked about Befunge, D, and Haskell whilst interviewing for a job which is probably mostly going to involve shell scripting, heh. :-) 15:11:33 And C, I suppose. 15:11:46 Deewiant, well you need to learn quotes in bash a bit then ;P 15:12:05 AnMaster: rather, I need to learn how they interact with builtin functions. 15:12:13 AnMaster: I'd just use them just in case anyhow, so it doesn't matter. ;-P 15:12:35 Deewiant, apart from in [[ ]], where quotes can sometimes be harmful 15:12:47 in [ ] they work as in normal context though 15:13:02 I don't use such esoteric syntax. ;-) 15:13:04 [ ] is same as test 15:13:10 Deewiant, hm? 15:13:20 [[ -f foo ]] 15:13:22 &c. 15:13:25 you use them in if [ "$foo" = bar ] say 15:13:36 -!- atsampson has joined. 15:13:41 -!- Sgeo has quit ("Ex-Chat"). 15:13:43 of course if grep foo works too 15:13:53 if ; then foo... 15:13:58 it is just about exit code 15:14:05 -!- Sgeo has joined. 15:14:16 -!- Sgeo has quit (Client Quit). 15:14:21 Deewiant, and [ ] as well as [[ ]] is just a test command 15:14:33 -!- Sgeo has joined. 15:14:33 but, [[ ]] got special quoting rules sometimes 15:14:41 and is extended from [ ] in other ways 15:15:01 What I think funny is that there's a /usr/bin/[ -- in a file name it looks ugley. 15:15:19 for example: both [ -z "$foo" ] and [[ -z "$foo" ]] test if $foo is" empty or unset" 15:15:33 [[ -z $foo ]] works too 15:16:03 [ -z $foo ] does NOT work, will be a syntax error if $foo is unset, or if it contains several words 15:16:25 oh and then there is the special issue of the regex =~ match that only exists in [[ ]] 15:16:46 bash 3.1 and 3.2 handles quoting differently in it 15:17:09 the 3.1 behaviour was buggy 15:17:14 but more logical IMO 15:17:21 And yet you think Perl's not-so-clear. :p 15:17:31 in 3.2 it forces a literal match if the regex is quoted 15:18:00 fizzie, well at least bash doesn't make every single ASCII char be an operator 15:18:08 perl is close to that 15:18:29 and befunge much closer. :-) 15:18:37 Actually Perl 6 goes and makes some Unicode chars operators, too. :p 15:18:49 Deewiant, indeed 15:18:53 Like the single-character versions of the '<<' and '>>' quotes. 15:19:00 eww 15:19:19 eww? I think it's rather nice actually 15:19:22 fizzie, UTF-8, or UTF-16 or what? 15:19:24 get some decent looking code 15:19:32 AnMaster: Unicode. UTF-* is just the encoding. 15:19:35 Deewiant, well my keyboard lacks such keys 15:19:44 Deewiant, yes I know, but what one does perl read source as 15:19:53 probably any. 15:20:00 I would guess Perl 6 defaults to Unicode. 15:20:02 well how could it know what one 15:20:02 AnMaster: then you can type '<<' if you don't have the key. 15:20:09 byte order markers exist 15:20:16 hm 15:20:17 you can always tell UTF-* apart 15:20:28 the only problem is UTF-8 versus legacy encodings like ISO-8859-* 15:21:19 Recent versions of Perl 5 have a "use utf8;" pragma for writing identifiers-that-have-Unicode-chars, and also 'use encoding "foo"' for any supported encoding. 15:21:30 well that's the point of UTF8, old programs being able to read the same file 15:21:49 a point, yes. 15:21:57 Deewiant, one important one 15:22:01 yes. 15:22:35 on unix you could make, say, /etc/fstab utf8 in comments, and it would not break old apps reading the file 15:23:33 or /etc/passwd GECOS field could be able to contain names with åäö in them 15:24:06 or as long as I don't use non-ascii here on irc, anyone that can read ASCII can read what I say, even though my client sends utf8 15:25:13 but if you send UTF-8 and the receiving end assumes it's ISO-8859-1 it gets garbage. 15:25:27 that's a tradeoff. 15:25:28 Perl 6 operators grepped from my irclogs, might be outdated: there's ^_= and »+^« and ^..^ 15:25:36 :-) 15:26:38 ^..^ is the current ".." range operator but excluding the endpoints; (5 ^..^ 9) is (6 .. 8). 15:28:11 But these were back in 2004. Haven't been following the Perl 6 saga since then, they might have sensiblized it. 15:28:23 -!- timotiis has quit (Connection timed out). 15:28:48 Deewiant, it gets even more garbage, with, say, UTF-16 15:29:19 AnMaster: but, with UTF-16, you can tell from the BOM that it is, in fact, UTF-16. 15:29:42 also utf-16 got more overhead when the data is mainly in ASCII range 15:29:46 as is common on irc 15:29:51 or config files for *nix 15:30:59 true that 15:49:56 -!- RedDak has quit ("Killed (NickServ (Comando GHOST usato da DIO))"). 16:29:33 -!- ehird` has joined. 16:29:46 oklofok: ANOTHER DAY, ONE TO WORK ON OKOHIRD-- 16:56:16 ehird`, "okohird--"? 16:56:19 what is that 16:56:51 AnMaster: my implementation of oklotalk-- 16:56:57 ah 16:57:06 what differs between the normal one and --? 16:57:33 -- has not muh syntax 16:57:34 and sucks 16:57:40 he has not made oklotalk yes 16:57:41 just oklotalk-- 16:57:42 *yet 17:01:32 k 17:01:44 ehird`, is the syntax that hard to parse? 17:02:18 AnMaster: Yes, there are no syntax errors 17:02:30 ({{{]) is valid 17:03:47 ehird`, and what would it do? 17:04:24 anyway befunge technically got no syntax errors either, it is perfectly valid to use an non-implemented instruction to reflect 17:04:31 AnMaster: I *think* ({{{[]}}}) 17:04:48 oklofok: am I right? 17:07:31 whuaa 17:09:00 { has a lower precedence than (, it would actually be ({{{([])}}}) 17:09:23 okay then oklofok 17:09:34 the rationale is to be able to do { ptrn -> ( expr expr expr } 17:11:02 oklofok: surely { ptrn -> expr expr expr } should be valid! 17:11:14 { x -> func x $hello } 17:11:25 { outn "wooty"; x -> func x $hello; outn "wotty" } 17:11:33 ambigious 17:11:34 but.. 17:12:28 it should know whether you mean (x -> func x $hello) outn "wotty"; or x -> (func x $hello; outn "wotty";) based on which is better. 17:14:21 oklofok: well, i am thinking 17:14:27 that you can introduce another seperator comma , 17:14:31 which has a lower precedence 17:14:32 so 17:14:43 { outn "wooty"; x -> func x $hello; outn "wotty" } 17:14:43 is 17:14:52 { outn "wooty"; x -> (func x $hello); outn "wotty" } 17:14:52 but 17:15:02 { outn "wooty"; x -> func x $hello, outn "wotty" } 17:15:02 is 17:15:07 { outn "wooty"; x -> (func x $hello; outn "wotty") } 17:15:16 oklofok: seems natural to me, and fits with english puncutation 17:15:18 well, comma exists already. 17:15:45 it works exactly like that for side-effects, but is in fact a third way to make a list 17:16:18 oklofok: oh. well i think you should drop commas for lists 17:16:19 because 17:16:20 a, b 17:16:21 [a b] 17:16:27 it's not that much different 17:16:28 and 17:16:30 a, b, c, d 17:16:31 [a b c d] 17:16:33 is shorter 17:16:38 a,b,c,d 17:16:40 is shorter 17:16:42 oklofok: and my way means stuff can be shorter 17:16:46 ok 17:16:46 but 17:16:47 anyway, true, it's not much use 17:16:49 which do you do more often 17:16:50 make a list 17:16:52 and i haven't used it much. 17:16:55 or have multiple exprs in a function 17:17:01 yeah, yeah, i know your point 17:17:05 i'll think about it 17:17:12 and [...] is nicer because with , 17:17:17 its hard to pick out where hte list starts and ends 17:17:21 hmm 17:17:29 there are elaborate rules for it 17:17:34 anyway, south park time :) 17:17:36 -> 17:18:11 oklofok: ok :) 17:31:12 * ehird` is sticking linux on this old crusty machine 17:31:29 I poked the distro chooser for a laugh. It's telling me Arch Linux, Slackware, OpenSuSE, Gentoo, edora 17:31:46 Arch and Gentoo seem the most likely ones I'd consider installing. 17:31:56 AnMaster: If you want to hype Gentoo, now would be the time. 17:32:06 Especially if you can convince me I'll have an installed system in hours rather than days. 17:35:00 depends on your processor speed. :-) 17:35:19 Deewiant: Slow. This is not my main machine. 17:35:24 * ehird` checks 17:35:44 Deewiant: 1.8ghz. 17:35:48 Some kind of AMD Smepron shit. 17:36:00 Windows says I have 480mb of ram, but that doesn't sound right. 17:37:26 might be a day then, but not day_s_. :-) 17:37:41 if you can leave it to compile the base system overnight it shouldn't be that bad. 17:38:28 Deewiant: Isn't there a fancy type of install that's precompiled? 17:38:30 Stage 3 or something. 17:38:42 I mean, ideally I'd like to be using it before the day's up. I know that's not particularly realistic, but 17:38:44 possibly, I'm not sure. 17:39:40 in 6 hours with that processor, certainly not from stage 1, I don't think. 17:39:45 depends on how big a base you want I suppose. 17:39:54 Deewiant: I would probably go for stage 3. That's the most compiled, isn't it? 17:40:06 I am not '-funroll-loops man', so :) 17:40:07 I'm not sure about how the later stages work. 17:40:13 :-) 17:41:26 Deewiant: Well, I don't see what other distro would work well. 17:41:31 Ubuntu sucks on here. 17:41:45 And the rest are either dead, related to Ubuntu or extremely minimalist. 17:42:10 Slackware is fine. 17:42:41 Deewiant: never really liked the feel of Slackware. 17:42:52 I like things such as, say, *dependency management* 17:43:13 :-) 17:45:21 AnMaster: If you want to hype Gentoo, now would be the time. 17:45:22 what? 17:45:24 I guess I could just do Debian. 17:45:27 AnMaster: you use gentoo. 17:45:33 ehird`, gentoo and arch are both good 17:45:35 I prefer gentoo 17:45:52 AnMaster: Right, right, just convince me that I can coerce gentoo into giving me a system _today_ 17:45:54 but well, gentoo, freebsd top the list, followed by arch 17:46:02 ehird`, well what is your CPU? 17:46:05 cpu[1 x AMD Sempron(tm) Processor 3300+ (AuthenticAMD) @ 2.00GHz w/ 128 KB L2 Cache] 17:46:08 is what I got here 17:46:59 ehird`, from first boot to KDE (base system, I never install games and such) installed about 5 hours iirc 17:47:02 AnMaster: amd sempron 1.8ghz. This is not my main computer, before you scream in horror 17:47:05 actually less maybe 17:47:11 ehird`, amd64 or? 17:47:18 AnMaster: No way! This is a lame 32-bit machiine. 17:47:24 And none of the hardware agrees with the ohter hardware. 17:47:26 hm ok 17:47:34 ehird`, oh? how do you mean? 17:48:10 AnMaster: its all incompatible in subtle ways that make it crash and creak 17:48:18 anyway about system today, depends on several things: local time, (if you start just before midnight, of course not), how much time you spend chatting on irc and so on 17:48:26 it was upgraded in a very cobbled-together fashion 17:48:29 ehird`, what components got issues with what ones? 17:48:33 AnMaster: and: time is 17:48 17:48:41 AnMaster: and, just about all of them 17:49:21 well I would start in the morning 17:49:37 ehird`, also I would do a stage3 17:49:45 first time you will need to read the manual 17:49:47 AnMaster: I need a system today, so unless you can convince me I'll install debian today and consider gentoo tomorrow 17:49:51 Yeah, i was thinking stage3. 17:49:58 ehird`, then go for arch 17:50:07 arch is good for being binary 17:50:17 AnMaster: Hmm. How does it differ from, say, debian unstable 17:50:29 ehird`, being sane 17:50:38 AnMaster: Debian's pretty sane 17:50:57 well last I checked they used *old* pre-release compilers in stable for example 17:51:17 AnMaster: Nobody uses stable. 17:51:46 ehird`, anyway arch is quite fast too on x86 17:51:58 and last I checked rather easy to install 17:52:09 AnMaster: I can install Debian in under an hour. 17:52:11 What about arch? 17:52:28 ehird`, it was quite some time ago I tried it, but I think less than half an hour 17:52:46 ehird`, however this may have been about 1-1.5 years ago 17:52:52 but shouldn't be worse I guess 17:52:54 AnMaster: that was a modern system presumably 17:53:08 ehird`, it was a p4 at 1.something GHz 17:53:12 512 MB RAM 17:53:18 IDE 80 GB drive 17:53:37 AnMaster: but the hardware was all compatible, I assume. 17:53:53 ehird`, can't check exactly as I no longer have the system in question, the power supply went for a smoke and I salvaged the bits that worked 17:54:12 ehird`, well I still don't see how they would be incompatible 17:54:19 you haven't given any example 17:54:21 I don't know. This machine is a demon. 17:54:27 It is pure evil itself 17:54:33 you got no examples then? 17:55:02 Not really except that it crashes for no reason and drops data because it feelsl ike it 17:55:20 -!- timotiis has joined. 17:55:27 ehird`, tried memtest? 17:55:50 apart from that I'd recommend trying to disable acpi 17:56:03 AnMaster: I should leave memtest running at one point. 17:56:14 Not sure what ACPI is, though. heard the term, but I don't know what it is. I'm silly, 17:56:32 ehird`, it is something for power managment, as well as "find out what the computer can do" 17:56:35 and a few other things 17:56:49 http://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface 17:56:56 ehird`, however it can cause issues sometimes 17:57:56 interesting 17:58:16 AnMaster: I think I will go for Debian, I don't really care about this system, I just can't bear Windows any more 17:58:31 ehird`, well windows probably cause the lockups then... 17:58:36 ehird`, give arch a try 17:58:39 AnMaster: Nah, I've used Linux on here before. 17:58:43 It's actually less stable. 17:58:50 ehird`, what distro did you use on it? 17:58:51 debian? 17:58:55 various 17:58:59 ehird`, list? 17:59:06 AnMaster: lesse... 17:59:09 and was debian included in it? 17:59:17 FreeBSD, debian, ubuntu, fedora, slackware, and others 17:59:36 then maybe time to try arch 17:59:41 and see if it is more stable 18:00:33 Maybe. 18:00:36 ehird`, anyway my system is quite stable, even though I got quite a mix of components 18:01:50 ie, a sound card with midi from 2003 or so, a new geforce card from last year, and so on 18:01:56 I did try suse, it was quite unstable under it, same for debian, but gentoo did turn out to be stable 18:02:05 only tried arch later, on another computer 18:02:44 ehird`, but since gentoo does need some patience at first install, it is probably best to try arch 18:03:34 ehird`, oh and download time for cd was not included in the "half hour" for arch 18:03:40 I don't know how long it took to download 18:03:50 but I had a bad connection back then 512 kbps down 18:03:55 so quite long I suspect 18:10:40 AnMaster: woot, 600kB/sec 18:10:43 i love my internet connection 18:10:50 it is made of love 18:10:53 and hugs 18:10:57 ^^ TRUTH 18:11:43 well I got 8 mbit down, that means about 450-550 kilobyte / sec here 18:12:51 And this university student village 100Mbps connection means around 9 megabytes / sec from many places. 18:14:19 AnMaster: ditto 18:17:51 ehird`, well arch it is then? :) 18:18:25 AnMaster: No, Debian. I will probably try Gentoo tomorrow. 18:18:28 But for today, this is fastset. 18:18:32 I've already downloaded it. 18:18:41 ehird`, arch is good if you want binary 18:18:56 Too late. 18:19:01 It's burning now 18:19:36 gentoo need a bit more patience, but things are easy to fix if they break, and they don't break often 18:19:38 much easier to fix than when say debian breaks 18:20:44 Ohw Ell. 18:20:46 It's burned. 18:20:50 See you in $TIME 18:22:05 -!- ehird` has quit (Read error: 104 (Connection reset by peer)). 18:26:01 Personally my experiences wrt. the fixability of Debian and Gentoo have been exactly the opposite, but on the other hand I haven't touched Gentoo since 2003 or so. 18:28:19 -!- ehird` has joined. 18:28:58 eh 18:29:01 need to get a bigger one 18:29:23 AnMaster: did I mention that the 600kB/sec speed was on wireless 18:29:31 The people who send me spam can probably help. 18:30:01 ehird`, hm? 18:30:08 bigger what? 18:30:12 ehird`, cd? arch then 18:30:17 -!- ehird has joined. 18:30:24 but yeah. 18:30:26 that was just wireless 18:32:20 -!- ehird has quit (Read error: 104 (Connection reset by peer)). 18:42:46 -!- timotiis has quit (Connection timed out). 18:45:35 -!- olsner has joined. 18:49:13 -!- ehird` has quit (Read error: 113 (No route to host)). 18:55:10 -!- jix has quit (Nick collision from services.). 18:55:20 -!- jix has joined. 19:00:11 -!- jix has quit (Nick collision from services.). 19:00:15 -!- jix has joined. 19:10:06 -!- ehird has joined. 19:10:09 hello from a new debian system 19:10:20 it works, basically. 19:10:27 is debian's gnome meant to feel non-smooth? 19:10:30 oh wait, maybe i need gfx drivers 19:44:37 ehird, KDE may work better 19:44:50 * AnMaster runs 19:44:54 AnMaster, Don't feel like KDe today. 19:44:55 oklofok, Hi. 19:52:35 oklofok, Ping 19:53:05 ölonmg 19:54:23 yay 19:54:39 oklofok, ehird@debian:~/src/oklotalk$ python okofficial/cli.pyc 19:54:39 RuntimeError: Bad magic number in .pyc file 19:54:39 ehird@debian:~/src/oklotalk$ python -V 19:54:39 Python 2.4.4 19:54:52 * ehird installs 2.5 19:57:36 oklofok, btw you got the pyc files for me? I don't have python 2.5 19:57:39 only 2.4 20:02:05 AnMaster, just install 2.5 20:02:43 class DisregardThat(object): # I considered appending 'ISuckCocks' to the name of this lass 20:02:45 *class 20:05:05 :-D 20:05:45 bah 20:05:49 my parser is broken 20:05:53 it can't handle comments nicely 20:06:27 oklofok, can you show me your parser src :( 20:13:24 oklofok, haha, my interp's thing->string shows the actual code 20:13:25 :D 20:16:28 ehird, can't you disassemble the pyc 20:16:52 AnMaster, yes but only to the bytecode instructions 20:16:54 which are stack-based 20:17:00 and thus very unhelpful for reading 20:17:19 ah I see 20:17:33 oklofok, why not open source 20:19:03 AnMaster, its for a school project 20:19:08 so he doesn't want to release it until the 20:19:20 incidentally this is the 3rd time you've bugged him about it being closed source 20:19:34 can you simply not accept the fact that closed source software exists? 20:19:56 :( 20:20:28 some of it is even *good* 20:20:59 oklofok, scoping question 20:21:03 if i have a var A in another scope 20:21:08 then we have a nested scope inside that 20:21:09 and set A 20:21:12 is the outer scope's A mutated, 20:21:19 or is it just created in the inner one 20:21:22 and shadowed 20:34:01 oklofok, qutie important 20:37:58 ehird: comments are trivial to do 20:38:08 just keep the sum of open comments or soemthing 20:38:10 oklofok, yeah 20:38:14 oklofok, oh crap 20:38:15 i don't do nesting 20:38:16 heh 20:38:17 inc on <--, dec on --> 20:38:18 oh 20:38:24 well then ofc even more trivial :P 20:38:24 oklofok, and yeah, its just that i have a method 20:38:26 .parse_one() 20:38:31 okay 20:38:31 which is expected to return a value 20:38:34 and is called in a loop 20:38:34 BUT 20:38:40 i can't just recurse after a comment, .parse_one() 20:38:42 and comments return nothing so boom? 20:38:44 because if the comment is at the end.. 20:38:49 i have to pretend i was never called 20:39:04 whhhell, i'm sure you can fix that on your own :P 20:39:08 so my hack is: .parse_many() gives a special param, after a comment, if the src is over and it is set, we return none 20:39:10 otherwise, unexpected EOF 20:39:14 and parse_many() checks for None 20:39:18 "parsing is trivial", a guy once told me 20:39:24 you know who taht was? 20:39:26 *that 20:39:31 :))) 20:39:38 indeed! 20:40:06 okay, back to watching! 20:40:10 oklofok, but 20:40:10 i'm leaving you 20:40:11 -> 20:40:12 what about scoping 20:40:15 ...but? :| 20:40:16 i asked a question about it 20:40:16 :( 20:40:19 oh 20:40:22 oklofok, scoping question 20:40:22 aaand hmm 20:40:22 if i have a var A in another scope 20:40:22 then we have a nested scope inside that 20:40:22 and set A 20:40:22 is the outer scope's A mutated, 20:40:23 or is it just created in the inner one 20:40:25 and shadowed 20:40:25 lessee 20:40:27 oklofok, qutie important 20:40:38 only created in inner one 20:40:52 oklofok, so how do i mutate outer variables 20:41:08 there will be other ways to set vars, but i'm not gonna tell you what they are, because you'd implement them, and i'd then have to do that too. 20:41:11 you don't. 20:41:15 or make setters 20:41:25 oklofok, actually, could you give me a basic scoping stress-test 20:41:28 so i can verify i get it right 20:41:33 asd 20:41:48 you know the chick i was talking about 20:41:53 she's threatening me 20:41:59 i have to watch an episode now 20:42:01 hahaha 20:42:02 perhaps after taht :| 20:42:04 *that 20:42:08 goodbye 20:42:12 bye 20:55:30 -!- Slereah has quit (brown.freenode.net irc.freenode.net). 20:56:05 -!- Slereah has joined. 21:01:10 Slereah, hello 21:02:57 Hai. 21:03:39 -!- Iskr has quit ("Leaving"). 21:08:08 AnMaster, look at me! I just installed non-free software! 21:08:17 ehird, oh? 21:08:19 good to know debian is no longer run by idealist idiots 21:08:22 ;) 21:08:48 AnMaster, Yeah, enabled the etch non-free repo and installed the Sun Java JDK. It is the only one that supports the newest stuff. 21:08:54 Most of the compilers don't even get 1.5 right. 21:08:58 So the apps I use in java won't work 21:14:54 cute: 21:14:56 enum TinyHelloWorld{T;System s;{s.out.println("Hello, world!");s.exit(0);}} 21:15:04 that, as far as I can tell, is the shortest java hello world you can get 21:15:07 vs: 21:15:33 public class HelloWorld{public static void main(String[]a){System.out.println("Hello, world!");}} 21:24:54 -!- jix has quit ("CommandQ"). 21:33:46 -!- ais523 has joined. 21:34:20 hello ais523 21:34:31 hello ehird 21:35:52 wow, there was actually more discussion about BackFlip 21:36:01 I've been thinking about it a bit recently 21:36:34 I think it would be TC if you repeated the program as a cylinder, so that the left and right sides of the program were identified, and the program was repeated vertically an infinite number of times 21:38:02 ais523, I think I am going to implement one of your rewriting languages in somethiing silly. 21:38:13 like Underlambda in m4? 21:38:27 No, that's for you :P 21:38:54 ais523, Maybe Forte in Thutu. 21:39:05 ehird: I already did that, more or less 21:39:16 the only Forte interp I know of was written in wimpmode Thutu 21:39:29 (where I extended it to allow easy arithmetic) 21:39:47 OK, then 1cnis 21:39:55 Though it looks complex. 21:40:07 Actually. 21:40:11 Underload in Thue. 21:40:28 Underload in Thue sounds good 21:41:00 ais523, I don't think I can do output though 21:41:03 1cnis would probably be harder due to the need to synchronize things so that they happen effectively simultaneously 21:41:18 Well, I mean literal output 21:41:18 ah, this means you can soon have underload in mod_rewrite using my thue-to-mod_rewrite compiler 21:41:22 I could probably REWRITE output. 21:41:30 olsner, I need to see that! 21:41:32 and although it isn't mine, a Xigxag in Thue would be interesting too 21:41:34 Though it's pretty trivial 21:41:54 ehird: you could use Underlambda-style output, where S outputs a function not a string 21:41:58 yeah, four lines of sed and a few bootstrap rewriting rules in an apache config 21:42:24 ais523, No, I mean, Thue can't output text from the initial rule. 21:42:26 Just hardcoded 21:42:34 olsner: why noy use cat as the CGI script that shows the final output 21:43:01 Beh. Thue is too primitive for this. 21:43:01 ehird: with Underlambda-style output you only need to be able to output the command characters, not all characters 21:43:11 hmm, the final results is in the query string, and I don't think that comes on standard input 21:43:17 ais523, Have you tried Oklotalk-- by the way? 21:43:24 olsner, redirect on PATH_INFO 21:43:29 /rewrite.cgi/FOO 21:43:34 rewrite.cgi: 21:43:36 olsner: you're right, it comes in an environment variable for GET, and on stdin for POST 21:43:38 #!/usr/bin/env perl 21:43:44 otoh, maybe you can rewrite things into post variables 21:43:45 print $ENV["PATH_INFO"]; 21:43:47 i think. 21:43:59 ais523, But yeah -- oklotalk-- 21:44:02 ehird: your Perl is atrocious 21:44:07 ehird: I've seen bits of it but not used it 21:44:07 And yes! 21:44:07 It is! 21:44:10 it looked interesting 21:44:16 my Perl is totally atrocious 21:44:19 and that Perl statement should have used curly brackets 21:44:20 Because I don't know Perl 21:44:23 ehird: in this case, I have a php script that does echo $_SERVER['QUERY_STRING'] or whatever the actual names are 21:44:25 Oh yes, that. 21:44:26 $ENV{"PATH_INFO"} 21:44:36 Make it a MODERN reference! 21:44:45 $self->env->{"PATH_INFO"} 21:44:59 ehird: I think that can be done with blessed objects 21:45:11 ais523, yes it can 21:47:22 ais523, Hmm. I want to make a Lambda Calculus macro system 21:47:24 Might be interesting 21:47:57 or write a lambda-calculus-to-Underload-compiler in Thue or some similar language 21:48:05 lambda calculus to underload 21:48:07 hmmm 21:48:14 not for thue 21:48:20 ais523, thue can only deal with very restricted formats 21:48:20 I tried to do one as rewrite rules as a way to specify how lambdas worked in Underlambda 21:48:34 ehird: well, I limited variable names to x, y, and z 21:48:45 possibly w as well, I forget 21:49:16 ais523, But with placeholders, I bet. 21:49:20 Thue is just string->string. 21:49:35 well, I've been designing a new rewriting language that I haven't told anyone about yet 21:49:44 it's interesting, but likely to be very hard to implement efficiently 21:50:01 i'd be interested in having a go 21:50:24 the rewriting is done on graphs rather than on strings 21:51:24 making it a sort of 2D Thue 21:51:57 I was going to call it Eodermdrome, and it looks like someone may have to ask me what it means because neither Google nor Wikipedia seems to know 21:52:13 ais523, sounds like graphica 21:52:15 I'll have to track down the book I learnt the word from, so I can use it as a source to write about it 21:52:27 ehird: quite possibly it's been done before 21:52:29 hmm, graph rewriting = haskell (in some abstract sense... according to what I hear) 21:52:36 the lang looks more like Haifu, though 21:52:44 except mostly using nonsense words, or nonsense sentences 21:52:47 ais523, graphica is oklofok 21:52:48 if you're talking nodes+vertices graphs rather than x/y graphs 21:52:50 and I kept the comma=comment idea 21:53:30 i have always wanted to make a language which is JUST powerful enough to be non-trivial (very low barrier) and powerful enough to represent all of its own model in itself 21:53:37 so it can represent the interpreter, call stack, etc. 21:53:43 but there must not be one unexposed bit 21:53:50 call it Ouroboros 21:54:10 so it can self-interpret, but isn't TC? 21:54:19 ais523, not what i meant 21:54:20 not self-interpret 21:54:21 but 21:54:28 imagine a language where the call stack was a first-class object 21:54:31 smalltalks have them 21:54:34 it's called CallStack or similar 21:54:44 well, that's a bit of the interpreter 'eaten up' by the language it hosts 21:54:51 now, the idea is to have EVERY SINGLE PART eaten up 21:54:56 even the parts that do the eating up 21:56:04 some sort of massive reflection, then 21:57:47 ais523, except it's not reflection 21:57:49 it's THERE 21:57:52 you don't need a mirror 21:57:54 yes 22:00:30 ais523, wow, g++'s error messages just rock 22:00:32 XD 22:00:49 ehird: which one in particular did you like? gcc's are quite good, are g++'s even better? 22:01:05 it was a joke 22:01:23 you get used to seeing many>,abc>> 22:01:27 on even the most basic errors 22:02:08 ehird: I'd say that's being kind to the programmer by providing lots of information to help them track down the problem 22:02:23 ais523, No -- you can literally have one basic error in a 10-line program 22:02:31 and it will quote 15 STL templates 22:02:39 with an unhelpful error message 22:02:45 ehird: but they're part of your program too, they were just written by someone else 22:03:04 ais523, You don't understand: STL templates use each other to depths exceeding 100. 22:03:13 They are *never* helpful to know. 22:03:29 ehird: your last two statements contradict each other 22:03:37 ais523, try coding c++ some time. 22:03:44 actually don't 22:03:45 it's awful 22:03:49 templates using each other to depths exceeding 100 is a great sort of thing for esolangers to like 22:03:56 and I learnt C++ before I learnt C 22:04:02 but it was old-style C++ 22:04:10 before it had STL or even namespaces 22:04:16 the string class was nice, though 22:05:00 ais523, default arguments with the magic setter stuff is so much fun... 22:05:09 you never have to write a function body again! 22:05:13 yay default arguments 22:05:24 Actually, you never have to write values again, since C++ templates are turing complete 22:05:27 Not only that, 22:05:30 they're a lazy functional language. 22:05:38 About 10x nicer than C++ itself. 22:05:58 ehird: see, /that's/ what the error messages are for! 22:06:01 ais523, Not only are they a lazy, turing complete, functional language, they're a lazy, turing complete, strongly-typed functional language. 22:06:14 ehird: in other words, Haskell 22:06:23 ais523, Exactly! 22:06:36 But there's no meta-templates, so you can't use parametized types in the code. I don;'t think so at least. 22:07:07 ais523, http://reddit.com/info/6fasr/comments/c03p4mn Maybe monad in C++ templates 22:07:13 http://reddit.com/info/6fasr/comments/c03oswa Translation for LC->C++ templates 22:07:32 ais523, And finally, a translation of lambda calculus church numerals to C++: http://reddit.com/info/6fasr/comments/c03ongu 22:07:46 As for Peano numerals: 22:07:48 struct Zero {}; 22:07:48 template 22:07:48 struct Succ { T v; }; 22:10:24 ais523, A toy C++ program I just wrote to refresh my memory (It's easy to forget everything about C++ in a few months) 22:10:28 contains this wonderful constructor 22:10:28 Greeter(std::ostream &output = std::cout) : out (output) {} 22:10:38 note: no function body 22:10:40 that is actually (pseudo-code): 22:10:55 -!- oerjan has joined. 22:10:55 Greeter(std::ostream &output = std::cout) { this.out = output; } 22:11:00 ehird: that still looks strange to me, I learnt C++ before the typename keyword was invented (they used to use 'class' back then, which was confusing because the same keyword was used for two things, and it could refer to non-classes too) 22:11:04 wonderfully esoteric 22:14:07 ais523, Actually, it startles me how clean you can make lambda calculus stuff with templates. 22:14:11 It's not unpleasant, really. 22:14:20 ehird: templates are lambda calculus, more or less 22:14:36 ais523, Nicer actually - they have arithmetic and everything 22:14:57 If using them without C++ underneath wasn't considered esoteric, I'd be coding in them :p 22:15:06 boost is cool though 22:16:45 why do so many people hate C++? 22:16:58 it has lots of features that some people don't like, but nobody's forcing you to use them 22:17:10 I can write C++ which is just C + the string class if I like 22:17:23 ais523, C++ pretends C is something it's not. 22:17:27 I personally hate it, but it's fun. 22:17:58 C++ is a continuum of languages, from C to some sort of crazy OO template thing and everything in between 22:18:08 so it's a good language for writing things which are slightly object-oriented 22:18:25 lambda.cc:8: error: type/value mismatch at argument 1 in template parameter list for ‘template class > class > class T’ 22:18:32 ais523, error messages are fun 22:18:55 ehird: that looks like a really informative error message to me, and I'm not being sarcastic 22:19:21 in this case, it's an argument type mismatch, so it's saying you have to pick an argument which really does have that crazy type, not some other crazy type 22:19:24 ais523, yes 22:19:28 sidenote: 22:19:37 templates TOTALLY fuck up 'declaration-as-usage' :D 22:19:39 usage: 22:19:45 T -> typename T 22:19:53 T -> template class T 22:20:08 T> -> template