00:00:21 Slereah: Aww come on 00:00:23 :< 00:00:41 Fine. 00:07:18 -!- timotiis has quit (Read error: 110 (Connection timed out)). 00:13:29 -!- Corun has joined. 00:40:33 -!- Slereah has changed nick to Amiral_Ackbar. 00:40:40 -!- Amiral_Ackbar has changed nick to Slereah. 00:41:17 ehird : You don't know what you want! 00:54:34 -!- ehird has quit (Remote closed the connection). 00:54:43 -!- Corun has quit ("This computer has gone to sleep"). 01:37:01 -!- sebbu has quit ("@+"). 01:45:25 -!- lifthrasiir has quit (Read error: 104 (Connection reset by peer)). 01:45:49 -!- lifthrasiir has joined. 04:57:43 -!- pikhq has quit (Read error: 110 (Connection timed out)). 05:21:16 -!- Judofyr has quit (Read error: 110 (Connection timed out)). 05:35:17 G'night all 05:36:59 -!- Sgeo has quit ("Ex-Chat"). 06:33:27 -!- olsner has joined. 07:34:30 -!- olsner has quit ("Leaving"). 07:39:20 off to database normalization demonstration situation menstruation -> 07:39:22 -!- oklopol has quit ("( www.nnscript.com :: NoNameScript 4.2 :: www.regroup-esports.com )"). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:00:53 -!- Deformati has quit (SendQ exceeded). 08:30:46 -!- Slereah has quit (Read error: 110 (Connection timed out)). 08:30:55 -!- oklopol has joined. 08:45:35 -!- Iskr has joined. 09:43:58 -!- oklofok has joined. 09:47:30 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 09:47:54 -!- oklopol has joined. 09:48:25 -!- oklofok has quit (Read error: 104 (Connection reset by peer)). 09:50:32 -!- oklofok has joined. 09:51:03 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 10:54:05 -!- oklofok has quit (Read error: 104 (Connection reset by peer)). 10:54:23 -!- oklopol has joined. 11:17:43 -!- oklopol has quit (Connection timed out). 11:35:55 -!- oklopol has joined. 11:48:42 -!- Corun has joined. 12:48:26 -!- Corun has quit ("This computer has gone to sleep"). 12:49:11 -!- Corun has joined. 13:37:08 -!- pikhq has joined. 13:55:29 -!- Corun has quit ("This computer has gone to sleep"). 14:29:27 -!- oklopol has quit (Read error: 110 (Connection timed out)). 14:53:31 -!- ehird has joined. 14:58:18 -!- Corun has joined. 15:09:44 -!- Judofyr has joined. 15:13:30 -!- timotiis has joined. 15:17:15 -!- Epic_Fail_Guy has joined. 15:17:16 -!- Epic_Fail_Guy has changed nick to Slereah. 15:19:12 Slereah: I think you just caused a paradox 15:21:31 D: 15:21:38 I'm innocent 15:54:45 -!- ais523 has joined. 15:55:35 hello ehird 15:55:49 hello! 15:55:57 * ais523 is busy upgrading Ubuntu 15:56:11 ais523: what fun 15:56:25 it worked fine last time 15:56:29 the problem is it takes about 4 hours 15:57:09 ais523: http://gitorious.org/projects/cyclexa/repos/mainline there's something distinctly arty about that "No Data" 15:57:21 and stops every now and then to ask questions 15:57:33 ais523: 'do you still love me?' 15:57:36 'are you sure?' 15:57:40 'okay, continuing installation' 15:58:01 ehird: it's more 'these are all the changes that will be made, are you sure about them' 15:58:23 ais523: that's so pointless. what if you're far enough in the upgrade that there's no other option anyway?? 15:58:27 I suspect Firefox and Konversation will randomly stop working at some point, as bits of them are uninstalled and they weren't open 15:58:33 and those questions happen before there's no option 15:58:49 once you've said yes, like I just did, it restricts itself to asking about configuration clashes 15:59:03 i.e. when you've customised something, and they've customised the same thing a different way 15:59:06 ais523: i have an idea -- what would levenshtein distance look like in cyclexa? 15:59:11 i assume cyclexa has multiple inputs. 15:59:11 if not, that sucks 15:59:32 ehird: I haven't implemented multiple inputs 15:59:44 ais523: you haven't implemented any of it, as far as i know 15:59:44 but I have syntax for multiple outputs, and a multiple input syntax would work the same way 15:59:49 that's good 15:59:52 ehird: I mean I haven't specced them 15:59:55 also, i assume the output and input are lazy? 16:00:01 that is, if you run a cyclexa program output=stdout and input=stdin 16:00:07 you can use it like e.g. an interactive BF program 16:00:11 ehird: output is lazy 16:00:20 ais523: but input isn't? that is a shame 16:00:29 input of the original program isn't lazy, but could be 16:00:29 ais523: that means you can't e.g. do a proper brainfuck in cyclexa 16:00:32 runtime input is lazy 16:00:38 there's a lazy input command 16:00:41 we can always fix this later, anyway 16:00:53 that is, Cyclexa inputs from an input string nonlazily 16:00:58 and also optionally from the user lazily 16:01:11 in a Cyclexa program, as opposed to Cyclexa used as a regex engine, the input string is the null string 16:01:21 ais523: also, I am so going to use cyclexa in any perl program i make from now on :-) 16:01:47 ehird: half the time I was using the lexer I was wishing I could use Cyclexa, because it would have been easier 16:02:03 my $c = Cyclexa->new("..."); my $out = ""; $c->run("hello", \$out) 16:02:06 \$out passes a reference to $out right? 16:02:07 or is that &$out 16:02:11 well, whatever it is :-) 16:02:26 though there'll probaly be a Cyclexa->run("...", "hello") -> out 16:02:56 \$out passes a reference to $out 16:03:04 sub run { my ($cls, $expr, $in) = @_; my $self = $cls->new($expr); my $out = ""; $self->run($in, \$out); $out; } # I believe 16:03:07 &$out passes a procedure whose name is given by $out 16:03:18 symbolic references, you have to love them 16:03:32 alternatively, if $out happens to be a reference to a procedure, then &$out is that procedure 16:03:54 of course, with prototypes, you can avoid the need for the \ 16:03:59 but that just confuses the user 16:04:10 ais523: perl's variable sins are odd, but php's odder 16:04:14 why, you ask? 16:04:17 variable variables 16:04:18 like the $ sigil? 16:04:25 $foo = "hello"; $bar = "foo"; $$bar -> "hello" 16:04:31 ehird: you can do that in Perl too 16:04:33 they can nest to an infinite depth 16:04:37 yep 16:04:38 ais523: but can perl do this: 16:04:51 $obj = ...; $foo = "obj"; $bar = "meth"; $$foo->$bar(...); 16:04:58 that's $obj->meth(...) 16:05:05 I think so 16:05:11 you may need braces in there somewhere for disambiguation 16:05:26 I think nowadays you're meant to write ${$foo} if you really want $foo to be the name of the variable 16:05:28 ais523: okay, then, perl is just crazy 16:05:30 :D 16:05:40 ais523: but php's use of $ is just ridiculous 16:05:46 it's .... just ... i mean.. 16:05:46 ehird: agreed 16:05:49 it doesn't mark anything. 16:05:51 it's just there. 16:05:54 for no damn reason. 16:06:05 ehird: in Perl, a symbol table entry is a data tyep 16:06:08 s/tyep/type/ 16:06:19 and I think you can assign to them to do operand overloading INTERCAL-style 16:06:22 -!- timotiis has quit (Read error: 110 (Connection timed out)). 16:06:23 ais523: you can get to perl's call stack, can't you? 16:06:31 ehird: yes, but I don't know how 16:06:43 that's how Carp works, for instance, I think 16:06:43 ais523: i guess you can't do real continuations though 16:07:56 ah, I've looked up how symbol table overloading works 16:08:01 *foo = *bar; 16:08:07 causes $foo to actually refer to $bar 16:08:16 and likewise @foo to actually refer to @bar 16:08:17 and so on 16:08:29 this was once useful 16:08:34 nowadays there are saner alternatives 16:08:35 I've written one piece of perl in continuation-passing-style, which gives you real-enough continuations. 16:08:51 fizzie: Continuation-passing style is awkward. Why would I want to code liek that? 16:09:03 Plus, since EVERYONE ELSE's code isn't in CPS, your continuations only span a little bit 16:09:34 the main benefit of CPS is that you don't need to maintain a call stack 16:09:38 It was a very stand-alone piece of code; but I'm not saying anyone would _want_ to write like that. 16:11:05 Tragicomically Perl doesn't realize it's CPS, and even throws a "deep recursion in foo" error at one point. 16:11:20 s/error/warning/ 16:11:45 fizzie: NEWSFLASH! Perl does not do TCO! 16:11:52 Also, Perl cannot magically realise how your program is written! 16:11:54 Amazing. 16:12:04 (was that assish enough) 16:12:12 I think it was quite assy, yes. 16:12:32 :) 16:13:23 but seriously, how is that tragicomical? 16:13:32 perl can't see what you're program is about 16:14:03 ais523: hm, don't you need to fix a lexer bug before writing hte cyclexa parser? 16:14:12 ah yes, that one 16:14:18 that particular bit confuses me 16:14:24 and it can be fixed at any time later 16:14:35 because the output the lexer produces is still valid 16:14:42 just doesn't correspond to the input 16:14:51 it's not like \ca is a major language feature anyway 16:15:18 ais523: but ... what is the actual bug and how do we fix it :) 16:15:36 the bug is that \ca is escaped incorrectly by {} 16:15:44 okayy 16:15:45 I think because preceding backslashes aren't being detected properly 16:15:55 (can you tell i don't understand your lexer?) 16:16:22 ehird: the problem is that Cyclexa has lots of escaping mechanisms 16:16:39 \+ means a literal +, and the same with any punctuation mark 16:17:18 Maybe it's only tragic; but at least that's what it is. Think of the poor interpreter, ceaselessly toiling on the call stack, all in vain. 16:19:54 {stuff containing no braces and with a non-digit non-comma character} escapes everything between the braces 16:19:54 and {{identifier{stuff}identifier}} escapes stuff 16:19:54 -!- ais523 has quit (Remote closed the connection). 16:20:09 -!- ais523 has joined. 16:20:09 -!- ais523 has quit (Remote closed the connection). 16:20:25 -!- ais523 has joined. 16:20:38 upgraded, mr ais523? 16:20:51 ehird: lost wireless 16:20:56 what's the last thing I said you saw 16:21:15 and I'll have to start the upgrade again now because it happened during the download 16:21:36 near the start, luckily 16:22:39 they should have a proper download manager... 16:23:01 once the download phase is done (which happens first and is cancelable), then it does all the installation 16:24:38 ais523: so is the lexer trivially fixable, or. 16:24:56 ehird: not trivially, in fact I found another bug 16:25:04 \\\ wasn't tokenised correctly as \\@\ 16:25:06 but as \\\ 16:25:24 it's good enough to start work on the rest of the compiler, though 16:25:41 maybe we should rewrite the lexer from scratch to give a token list rather than a flat-string 16:25:41 ais523: okay 16:25:45 hmm 16:25:46 that seems good 16:26:03 ais523: maybe even make token tags OBJECTS!!2121 ... Nah, I'm not THAT evil. 16:26:10 But a rewrite seems nice. The current one is just crazy. 16:26:22 ehird: if you make them objects, pick a language that isn't Perl 16:26:30 Perl's OO model is awful 16:26:44 ais523: I agree. But for a *parse tree*, I expect that objects will be the best way. 16:26:47 (Not a lex list) 16:26:59 ehird: OK 16:27:01 However, Perl is tempting because it has turing-complete regexps already 16:27:02 :-) 16:27:11 ehird: not really, you have to embed inline Perl in them 16:27:19 Yeah, I guess so. 16:27:30 ais523: But I can't think of any language that would really be good at this. 16:27:42 nether can I 16:28:47 ais523: Ruby would work but in this case I think it'd just function as a Perl with less powerful regexps and nice OOP. 16:28:49 ah, this connection's a lot better, I'm 1/3 of the way through the download already. (I just went round the corner to a different part of the library.) 16:28:51 Also it'd be dog-slow. 16:29:05 Well, Perl is dog-slow already. But ruby is one of the slowest languages out there. 16:29:06 ehird: no, not Ruby for something like this that's likely to be inefficient anyway 16:29:19 ais523: Well, if we're compiling that isn't a problem 16:29:28 ehird: we're still going to need a hefty runtime 16:29:40 besides, if we're compiling, what are we compiling into? 16:29:45 ais523: True -- but we don't have to compile *to Ruby* if we use Ruby. 16:29:50 I'm not convinced, though. 16:30:03 I mean, the classes rock, but I can't see many advantages on the others. 16:30:14 I mean, it is golfable so it's better than many other languages, but even so 16:30:23 And I have no idea regarding what to compile into. 16:30:31 Perl's about as golfable as Ruby 16:30:32 A lot of regexp engines compile to a DFA. 16:30:36 But we'd need a Turing machine. 16:30:38 and if we're compiling into something, I'd like it to have an eval() 16:30:39 That's pretty pointless. 16:30:59 ais523: yes, it is more golfable -- but Ruby's OOP is not horrific, is what i'm saying 16:31:02 compiling into something with backtracking capabilities built-in may be a good idea 16:31:03 still not convinced though 16:31:06 hmm 16:31:08 prolog? 16:31:09 ;) 16:31:10 no eval though 16:31:14 but that limits the field to Prolog and INTERCAL 16:31:17 neither of which has an eval 16:32:05 ais523: why is eval so important 16:32:16 it's not all that important 16:32:27 but it would be nice to be able to call Cyclexa regexps at runtime 16:32:41 i.e. just write cyclexa("regex","input") in a program, and call it 16:32:54 that either requires an interpreter or a compiler into something interpretable/evalable 16:33:52 ais523: oh, yes, i want that too 16:33:52 anyway, here's a plan for an improved lexer: 16:34:11 hmm ... it really seems like Perl is the best route for this 16:34:14 start with a data structure containing the entire program marked as unlexed 16:34:15 HOWEVER! 16:34:19 and change bits into token lists marked as lexed 16:34:23 the parser will either have to be very ugly for Perl's OOP 16:34:26 or unpleasant to work with 16:34:41 ais523: wouldn't a regular lex-esque approach work? 16:34:51 ehird: lex can't handle Cyclexa lexing 16:35:11 ais523: why not? Is it TC? 16:35:14 operator tokenisation preferences are something only Cyclexa has AFAIK 16:35:23 and also the escaping methods require infinite lookahead 16:35:36 ais523: do they? yiieeeeks 16:35:56 {123456123456123456,123456123456123457} is a repetition count 16:36:09 {123456123456123456,12345612345612345a} is an escaped string 16:36:21 ais523: >_< 16:36:24 the rule is it's a repetition count if there's nothing but commas and digits inside the bracse 16:36:28 and an escaped string otherwise 16:36:41 {} escaping is really convenient, though 16:37:08 ais523: can't you pick another character 16:37:13 {string} is more readable than \s\t\r\i\n\g (assuming the string's actually made of punctuation marks) 16:37:17 like <...> 16:37:22 ehird: most punctuation characters are strongly overloaded already 16:37:34 and I wanted to leave a few for use by the user 16:37:44 the language isn't designed to be easy to lex, but to be easy to use 16:37:55 the lexing isn't ambiguous and doesn't require TCness 16:37:57 ais523: that isn't easy to use though, really 16:38:00 it just needs to be done in several stages 16:38:09 ehird: why not? 16:38:29 although, I suppose that using <> for quoting would make quotations nestable 16:38:36 like they are in Underload 16:38:45 not sure how useful that is in Cyclexa, but there's probably some use for it 16:38:58 I'm a bit dubious about {{a{}a}} quoting too 16:39:04 ais523: it seems kinda hacky 16:39:15 stands out 16:39:19 the idea was that you can pick appropriate identifiers so you can put anything there without worrying about injection attacks 16:39:19 you could always leave ascii behind 16:39:37 but quotemeta does that just as well 16:40:47 so, we're settled on and \q\u\o\t\e for the time being? 16:41:01 ais523: seems good 16:41:01 i mean 16:41:01 what would you want < and > for anyway? 16:41:05 a lot of normal regexp engines utilize < and > iirc 16:41:37 ehird: I was imagining using them as nestable chars for working in a sort of Thutu/Cyclexa mix 16:41:49 but \CAPITALLLETTER works just as well 16:41:51 ais523: hmm 16:41:54 they all become nonexistent characters that can't be in the input string 16:41:56 nesting quotes doesn't sound too good 16:42:00 <<<<> might be useful 16:42:01 you never know 16:42:18 ehird: actually, nesting quotes would mix strangely with backslashes 16:42:23 because <\a> should be \\\a 16:42:29 but what should <\>> be? 16:42:39 that's a problem even without nesting quotes 16:42:46 for the {} I banned {} inside a {} 16:42:58 ais523: <\>> should be \> 16:43:05 \\\>, you mean 16:43:16 s/$/?/ 16:43:17 ais523: no 16:43:19 it shouldn't 16:43:23 because then that's ambigious 16:43:36 you need to special case \> so that <...> quoets can contain any string 16:43:36 wait 16:43:38 what should it mean? Is it a syntax error due to the unmatched >? 16:43:41 <\>> is 'literal >' 16:43:49 <\\>> is a syntax error, unmatched > 16:43:54 so \ escapes < and > even inside <>, but nothing else? 16:44:00 <\\\>> is 'literal \', 'literal >' 16:44:02 well, < > and \, but nothing else 16:44:52 if we do that, \ should be taken literally if followed by any character not in \ < > 16:45:19 ais523: no, that's ambigious.. 16:45:19 i think 16:45:21 maybe 16:45:23 hmm 16:45:23 no 16:45:23 that's good 16:45:24 i think 16:45:31 <\a\\\>> 16:45:41 is 'literal \', 'literal a', 'literal \', 'literal >' 16:45:42 is a literal \a\> 16:46:15 oh, I remember what I was planning to use <> for, but this is a crazy idea that should probably never be done 16:46:28 the idea was you could match against a and it would match a red a in your document 16:46:32 rich-text regexps 16:46:52 ais523: err, i think not 16:47:00 yes, that's probably best avoided 16:47:16 [ and ] aren't being used at the moment except for backwards compatibility with ordinary regexps 16:47:24 they're depreciated in favour of ' 16:47:44 so if rich-text matching is really a requested feature, we can use bbcode rather than HTML 16:48:00 but let's stick to plaintext for now 16:48:18 ais523: backwards compatibility? bah 16:48:42 * ais523 thinks about what a Levenstein difference function would be 16:49:03 that's +1 for each insertion, deletion, or change, isn't it? 16:49:24 ais523: http://en.wikipedia.org/wiki/Levenshtein_distance yes 16:49:48 ais523: beware the algorithm on that page 16:49:53 it mixes 0..X and 1..X arrays 16:49:55 it's awful 16:49:55 Kitten. 16:52:09 ais523: so should we nuke Lexer.pm? 16:52:14 or move it out of impl/ i guess 16:52:20 ehird: yes, move it to some old/ directory 16:52:33 mkdir ../../scraps; mv Lexer.pm ../../scraps 16:52:36 ais523: so, in impl/ but not src/ 16:52:40 impl/scraps 16:52:48 scraps isn't a good name but i have never foudn a better name for it 16:52:52 i often have it in projects 16:52:55 i put * in it 16:53:09 ais523: hokay, let's see how git likes moves 16:53:23 'git mv' is what i need i believe 16:54:12 ais523: pushing now 16:54:14 that was very easy 16:54:42 compare with CVS, which doesn't like files moving :-) 16:54:44 (in case you've never tried to use CVS: it has no renaming/moving operation) 16:54:47 (you have to either lose all your revision history, or manually hack the RCS files to point to the new name) 16:54:54 ais523: 'git pull' 16:55:46 okay, i will now start on a new lexer 16:56:01 (x*)^+(.|(+??.)|(+??.)|)\D(.|(+??.)||(+??.)):2(|x|x|x)^:2(?0\1)$ 16:56:02 ais523: as far as your data structure idea goes: Cyclexa::Lexer can be a class 16:56:10 I think 16:56:11 that's not that ugl 16:56:12 y 16:56:28 Lexer->new("my cyclexa program")->lex; 16:56:31 that's Levenshtein distance in unary 16:56:42 ais523: nice 16:56:49 actually, you know what bothers me about languages 16:56:57 there's no way in most of them to unify strings & files & stuff 16:57:03 that is, a generic 'Sink' 16:57:10 or rather... Tap, I guess. 16:57:22 but, a lexer could make use of it, so you could pass it just about anything 16:57:27 ehird: that's very inefficient, though, the way I wrote it 16:57:29 it's O(4^n) 16:57:36 Levenshtein is inefficient, period 16:57:39 I think it could be made more efficient, but it wouldn't be as simple 16:57:50 ehird: what I wrote isn't even P-time 16:58:09 oh, there was an error 16:58:09 ais523: you know what's funny? 16:58:11 (x*?)^+(.|(+??.)|(+??.)|)\D(.|(+??.)||(+??.)):2(|x|x|x)^:2(?0\1)$ 16:58:12 a CMS site that doesn't run on that cms 16:58:21 that fixes it 16:58:24 ehird: do you have one in mind? 16:58:44 ais523: Yes. I just found one randomly: 16:58:44 http://www.hippocms.org/ 16:59:41 some version control systems are designed for some purposes 16:59:57 in such cases using a different version control system for the system's source itself could be beneficial 17:00:18 ais523: I just like bootstrapping. :) 17:02:01 ais523: Cyclexa should be written in Cyclxea 17:02:05 *Cyclexa 17:02:10 ehird: I thought that too 17:02:17 but we need to get the cycle started somehow 17:02:32 ais523: No we don't. Ninjacode was going to be written in ninjacode. 17:02:42 ehird: but you still need something to bootstrap it 17:02:48 ais523: oh no 17:02:50 To git@gitorious.org:cyclexa/mainline.git 17:02:50 ! [rejected] master -> master (non-fast forward) 17:02:50 error: failed to push some refs to 'git@gitorious.org:cyclexa/mainline.git' 17:02:53 even if it's a minimal Ninjacode interp in C, for instance 17:03:01 i think that means i forgot to pull your changes 17:03:02 :) 17:03:09 yep 17:03:27 git pull, git merge, git push. 17:03:43 I still have the newest commit according to gitorious.org 17:03:47 and why is git merge needed? 17:03:48 ais523: yes, my push failed 17:03:58 and because you changed lex.pl and i changed without updating 17:03:59 not merge really 17:04:03 it just needs to sync them 17:08:35 ais523: oh, that was easy 17:08:53 you still haven't committed... 17:08:54 it was actually me not understanding git that made me take so long 17:09:10 ais523: ah, i have *committed* 17:09:12 just not pushed 17:09:12 :) 17:09:17 OK 17:09:41 ais523: http://gitorious.org/projects/cyclexa/repos/mainline 17:09:42 tada 17:09:49 also note that it generated another revision to merge 17:09:52 really it looks like this 17:09:58 merge blah blah 17:10:00 / \ 17:10:06 ditch old lexer add a newline 17:10:12 but the display there is linear 17:10:14 so it looks odd :) 17:10:28 ais523: Try 'gitk' once you pull. 17:10:28 merging is the thing that git's really good at 17:10:34 It shows a graphy thingy on the side of the revision list 17:10:52 You can see how the same revision splits for our two changes, and then it gets unified again. 17:11:20 ais523: P.S. you need to set your email in git 17:11:23 I've got the change 17:11:24 http://gitorious.org/projects/cyclexa/repos/mainline 17:11:25 err 17:11:26 ehird: how? 17:11:27 17:11:30 is the current one 17:11:31 and mine is 17:11:33 ehird@debian.(none) 17:11:40 ais523: man git-config 17:12:05 -!- olsner has joined. 17:12:12 'git config user.email foo' 17:12:13 i believe 17:13:07 ais523: it occurs to me that that merge was pointless 17:13:09 lex.pl is now uselses 17:13:14 d'oh! 17:13:32 i'll just remove it, because it's trivial and not useful for having around reall 17:13:33 y 17:13:46 it wasn't quite pointless, it let me learn how to push 17:13:53 -!- Sgeo[College] has joined. 17:13:54 haha :-) 17:13:58 ais523: no, my merge was 17:14:04 my merging of your lex.pl change and my Lexer.pm move 17:14:11 Hi all 17:14:14 whereas, lex.pl is now useless, so it can be just deleted 17:14:17 which i'm doing now 17:14:19 Sgeo[College]: hello! 17:15:00 ais523: pushed the removal 17:15:46 "13 deletions?" 17:15:55 did it mark one for each line in the file, or something? 17:16:04 ais523: Yes. 17:16:12 Also, my name is now showing as ehird, instead of elliott hird. 17:16:15 And is linked. Wtffff 17:16:19 ehird: to where? 17:16:24 ais523: Okay, set your email to whatever it was in your gitorious profile 17:16:30 that's how gitorious knows you're the user ais523 17:16:32 see: http://gitorious.org/projects/cyclexa/repos/mainline 17:16:37 it only just now got that i'm ehird 17:16:57 ais523: because, if you clone a git repository onto gitorious 17:17:02 it'll show users as their name, unlinked 17:17:06 if it doesn't recognize them by email 17:17:10 it thought i was some random person 17:17:16 but now my email is correct it knows i'm the user ehird 17:17:32 hmm, I wonder if cia.vc supports git. I've always wanted to test that 17:17:43 ehird: what's that? 17:17:49 http://cia.vc/ 17:17:54 ais523: it is a project stats tracker 17:17:56 but most commonly, 17:17:59 it's a bot on freenode 17:18:06 that sends out messages to a channel on commits and similar 17:18:59 http://cia.vc/doc/ 17:19:11 ais523: it makes us show up in a central channel too 17:19:11 #commits 17:19:38 ehird: are you testing it now? 17:19:46 ais523: might as well 17:19:53 #cyclexa, because anywhere else would be out-of-place 17:19:57 don't want to flood #esoteric obviously 17:29:55 ais523: fun fact -- git used to pollute the global namespace 17:29:56 that is 17:30:02 'merge-base', 'write-tree', 'commit-tree' 17:30:03 were the commands 17:30:58 OK, pushed 17:31:14 ehird: you mean /usr/bin namespace? 17:31:18 MySQL is worse 17:31:23 it installs a command called perror 17:31:32 ais523: yeah, /usr/bin 17:31:33 and heh 17:31:47 ais523: okay, so let's get this new lexer started 17:31:56 Cyclexa::Lexer is a class which stores the neccessary data 17:32:00 that seems like an elegant base to me 17:32:08 the class stores data? 17:32:09 also, the lex tree is a list of tokens of some sort... Cyclexa::Token? 17:32:12 or an object based on the clas? 17:32:12 ais523: err, the instance 17:32:14 or an object based on the class? 17:32:30 the object based on, yeah 17:32:43 ais523: I mean, two classes won't be too bad will they? 17:32:47 just having a generic Token type 17:32:52 ehird: this is Perl's OO model we're talking about 17:32:55 yes 17:32:58 I don't understand it at all, really 17:33:02 ais523: i kind of understand it. 17:33:06 It's not too hard: 17:33:22 a->b(...) is classofa::b(a, ...) 17:33:28 and 17:33:34 bless X, classname is magic 17:33:40 basically, you give it a hash (most likely) 17:33:44 and it turns it into an object 17:33:45 so that 17:33:48 blass a, classname 17:33:50 I sort of get that much 17:33:51 means that in the above 17:33:53 classofa is classname 17:34:02 ais523: now, classes are kind of their own class 17:34:03 so 17:34:04 but you need to give lots of stuff telling it how to bless 17:34:07 X->new is X::new(X, ...) 17:34:14 so you do 17:34:16 my $cls = shift; 17:34:17 then 17:34:21 bless {}, $cls; 17:34:31 ais523: and no, you don't really 17:34:52 ais523: however, 'new' isn't a special name 17:35:12 is worth mentioning 17:35:12 http://search.cpan.org/~rgarcia/perl-5.10.0/pod/perlobj.pod seems to make sense 17:35:17 I can just type perldoc perlobj over here to get that 17:35:30 just like perldoc spec.pod gives me the Cyclexa spec when I'm in the right directory 17:35:46 ais523: i like the web 17:35:47 :) 17:36:09 ehird: you're normally connected to it :) 17:36:44 ais523: :)) 17:36:45 http://rafb.net/p/qqYkbQ67.html 17:36:51 basic perl class skeleton as i see it 17:37:00 kinda ugly, but not too complex 17:37:12 ais523: maybe we should use Moose 17:37:21 http://search.cpan.org/~stevan/Moose-0.40/lib/Moose.pm 17:37:39 ais523: it's a perl object system thingy, but has aspects and stuffs. 17:37:41 maybe too much. 17:37:42 ehird: I want to avoid using modules as much as possible, or you end up with dependency hell 17:37:43 but it looks nice 17:37:55 ais523: Perl, with its CPAN, having depdenency hell is so hilarious 17:37:56 I prefer to stick with the ones which come with Perl, like Carp 17:38:00 i hate CPAN so much, it's horrible to use 17:38:07 sure it has a lot of packages 17:38:09 but good luck using them 17:38:12 ehird: I can't open links to CPAN in Konqueror for some reason 17:38:19 Firefox works fine 17:38:25 but Konqueror can't resolve the DNS 17:38:29 yes, I know that's a contradiction 17:38:34 maybe it has a bad cached value, or something 17:38:49 has 'src' => (is => 'r', isa => 'Str') # this is nice though, admit it 17:38:56 as well as "extends 'Foo';" 17:39:16 also, a sane 'super' 17:39:27 does it support multiple inheritance? 17:39:33 ais523: i think so 17:39:34 extends 'Foo'; 17:39:36 extensd 'Bar'; 17:39:44 however i rarely see the need for MI 17:41:20 ais523: also, use Moose; means use warnings; use strict; 17:41:21 automatically 17:41:22 :) 17:41:36 ehird: wow, that's bad practice 17:41:39 I like warnings and strict 17:41:45 but I should specify them myself 17:41:51 ais523: in #perl Moose is *very* highly regarded 17:41:51 they shouldn't be specified in another module 17:42:10 #perl seems dedicated to preventing new users cutting themselves 17:42:16 that's a worthy goal, but I'm used to C... 17:42:42 #perl has always been quite unfriendly to me as a newbie 17:42:44 so i doubt that 17:44:02 anyway, our token class... 17:44:21 ais523: yes, that hting 17:44:24 there's the default command, which needs a token for every character in existence and a few extra 17:44:33 ais523: trivial 17:44:37 yes, trivial 17:44:44 $tok->type = Token::LITERAL; $tok->char = 'a'; 17:44:46 or similar 17:44:47 then there are other commands, which have tokens of their own 17:44:53 although, really, we should have Literal subclassing Token 17:44:58 and we run into perl's object system again... /sigh 17:45:02 maybe we SHOULD use moose. :-) 17:45:04 ehird: no, don't do it like that 17:45:13 because you have to create a new file for each class you create 17:45:20 ais523: I know! That's what sucks. 17:45:30 ehird: agreed 17:45:41 I think type and data is a better way to do it 17:45:47 ais523: But also totally silly. 17:45:58 ehird: maybe if you're an extreme OO programmer 17:46:04 but there's extreme ORK/Java OO 17:46:09 and there's sane C++/Python OO... 17:46:16 oh heck no, i'm not an extreme OO programmer 17:46:19 but a Literal is-a Token 17:46:22 and it makes sense 17:46:26 just not to perl :-) 17:46:55 * ais523 is capable of extreme OO 17:46:58 but doesn't like doing it 17:47:06 except in university OO projects 17:47:14 to show the ridiculousness of the whole thing 17:47:20 (that is, the project) 17:47:35 the problem with object-orientation is that it's useful up to a point, and then you get diminishing returns 17:47:49 once you get down to the very low details OOness become more of a pain then an aid 17:48:04 "There is a scribe called Writer." 17:48:37 ais523: yeah 17:48:49 it's funny how i keep running into Perl trying to express my thoughts into code here, though 17:48:55 -!- timotiis has joined. 17:51:00 ehird: how are we going to handle literal \D and other special characters? 17:51:06 ais523: no idea. 17:51:10 i'm still yelling at perl 17:51:13 but it's a good point 17:51:14 i am not sure 17:51:30 we need to keep a flag on characters in the input string anyway 17:51:43 to allow for some being positive text, some being antitext, and some being antitext-in-progress 17:54:22 ais523: hmm 17:54:30 i think i'll just push a basic skeleton of Lexer 17:54:35 and let you start it off, because i'm not sure what structure you want 17:54:37 Token too 17:55:05 ais523: hmm 17:55:10 ATM I'm wondering how to tokenise group options 17:55:13 if I have 'use Cyclexa::Token' in Lexer.pm, 17:55:20 like the ?? that says a group shouldn't be numbered 17:55:21 how can I make it imported as just 'Token'? 17:55:30 ehird: use Haskell 17:55:32 ais523: maybe a seperate class for those 17:55:33 and heh 17:55:37 we should do that! 17:55:42 we could even use plain strings 17:55:45 because getContents etc 17:55:45 :) 17:56:01 Haskell may be a better lang than Perl for this 17:56:06 especially if we want complex data structures 17:56:54 ais523: indeed, but since we are doing significant text wrangling in the interp itself.. 17:57:04 haskell no likely regexps 17:57:17 ais523: I think we should use C. Then we can just interface it to whatever language we want. ;) 17:57:29 I was thinking about C too 17:57:38 although if you're doing it OO you'll want C++ for its OO features 17:57:46 you can write the rest of it C-style 17:57:57 (/me is used to writing C/C++ mixes) 17:58:11 (/me just did that (/me thing in another channel) 17:58:26 ais523: C++ would buy us std::string & a load of hell. 17:58:28 at the same time too 17:58:39 ehird: std::string may be useful 17:58:45 Sgeo[College]: SYNTAX ERROR: unmatched parentheses at line 1. Abort. 17:58:48 -!- oklopol has joined. 17:58:51 the thing that people don't get about C++ is: you don't have to use all its features! 17:58:51 ais523: of course, you can;t interface C++ to many languages 17:58:53 e.g. Haskell 17:59:02 ehird: you can, you just interface via C 17:59:07 C can be linked to C++ 17:59:18 ais523: Yes, but now I want to decapitate myself ;) 17:59:18 if you have appropriate wrappers in the C++ 18:00:12 ais523: Let's write it in Ninjacode. 18:00:22 Then we can just make ninjacode whatever we need to code cyclexa. 18:00:27 ehird: only if it compiles into INTERCAL 18:00:48 ais523: bah 18:01:24 ais523: you do have to learn the features 18:01:34 lament: of C++? 18:01:41 -!- Judofyr has quit (Read error: 104 (Connection reset by peer)). 18:01:41 right 18:01:42 but you don't have to use them 18:01:49 and you don't pay the runtime cost if you don't 18:01:49 using stuff is easy 18:02:01 learning stuff is hard :) 18:02:02 -!- Judofyr has joined. 18:02:27 ais523: you know, maybe we should prototype it in 50 languages at once 18:02:28 and pick the best 18:02:38 which 50? 18:02:42 * Sgeo[College] should learn C(\+\+)? someday 18:03:42 Sgeo[College]: you suck at regexp 18:03:45 Sgeo[College]: they are two completely different languages 18:03:47 learn both of them separately 18:03:49 err, wait 18:03:50 hmm 18:03:53 and then you'll realise you can program in either of them 18:03:54 how CAN you shorten that.. 18:03:57 or any intermediate mix 18:04:03 ais523: actually, don't learn both 18:04:07 because you will fail at one of them. 18:04:19 ehird: learn both in case the one that you fail at is the one you learn 18:04:45 just don't think of them as being the same language 18:04:57 ais523: well, no -- once you've learned one the other is about five million times harder to learn :) 18:05:13 and as for the 50 languages.. 18:05:16 ehird: not if you have a well-adjusted mind 18:05:20 let's list the ones we've suggested in chronological order 18:05:29 ruby, c, c++ i think so far 18:05:35 we can ignore the joke ones :p 18:05:39 we mentioned Perl and Haskell 18:05:56 ais523: we're already doing perl 18:06:00 ruby, haskell, c, c++ then 18:06:07 ehird: how do I fail at regex? 18:06:16 ais523: maybe we should do smalltalk, classes would be totally lightweight :P 18:06:50 Sgeo[College]: ehird assumed that the regex could be shorter, but there isn't an obvious shorter way to write it 18:06:52 ehird: so if I can only learn one, which should I learn? 18:07:00 * ais523 would say C 18:07:26 me too 18:07:26 C is reasonably unique among languages, in that it's one of the only truly portable languages that runs on absolutely anything and can even be used for embedded systems 18:07:32 C++ is basicallly an awful language 18:07:36 whereas C++ is nice, but there are other languages that do the same thing 18:07:44 and about 50% of programmers hate it 18:08:10 Heh. 18:08:16 ais523: just a warning - never, ever try and read just one everything2 article 18:08:19 it *does not work* 18:08:33 ehird: you end up reading other articles as well? 18:08:39 ais523: yes 18:12:32 ais523: hmm, Sam Hughes just added a comment system 18:12:32 he 18:12:35 's so selling out 18:12:40 with all this dynamic moo-harkey 18:15:45 -!- pikhq has quit (Remote closed the connection). 18:15:59 -!- pikhq has joined. 18:16:09 ehird: what we really need is a metalanguage 18:16:18 which is clear and easy to use 18:16:20 ais523: alpaca 18:16:23 multi-paradigm 18:16:37 and compiles into all commonly-used languages which support the same paradigms you use 18:16:49 so we just start off by writing the objects and some of the code 18:16:53 ais523: ehis523talk 18:17:03 then we can compile into Perl's OO model, or Haskell's, or C++'s, at will 18:17:37 haskell doesn't have objects 18:17:38 although I do kind of like your idea of using Smalltalk, I'd have to learn it first 18:17:44 ehird: not in the OO sense 18:17:48 it has data structures 18:17:51 and first-class functions 18:17:54 therefore you can write OO in it 18:18:01 ais523: doesn't help with inheritance 18:18:06 or duck typing 18:18:08 -!- sebbu has joined. 18:18:16 duck duck duck duck duck duck duck... 18:18:17 ehird: you can do inheritance by assignment 18:18:19 GOOSE! 18:18:32 duck typing is harder but can be done using hashes 18:19:28 in fact I was planning to use that method to do OO in Overload 18:19:33 ais523: We are ridiculous 18:19:36 -!- jix has quit ("This computer has gone to sleep"). 18:19:46 ehird: we're in #esoteric, what do you expect? 18:21:28 ais523: Writing it in C would be fun. 18:21:45 ehird: how do you want to store the parse tree? 18:21:47 *this->mrx_stkp[-7] = ++x.ptrr; 18:21:53 hand optimized! 18:21:55 structs, like C-INTERCAL does? 18:22:04 ais523: Beats me. 18:22:20 ehird: negative array indexes are always fun in C 18:22:32 ais523: holy crap, ubuntu 8.04 looks nice 18:22:45 ehird: I'm downloading it at the moment 18:22:54 I may create a new user afterwards just to see what it looks like by default 18:23:04 because it keeps all settings across a distribution upgrade 18:23:22 only 300 or so downloads out of about 2000 to go 18:23:32 ais523: i've always hated that about upgrade 18:23:48 i wish i could say 'I want to see this in shiny newness! I totally fscked up this system! Revert EVERYTHING!' 18:23:52 'But please keep my precious data.' 18:24:00 ehird: then you delete the dot files in your home directory 18:24:04 and you get that 18:24:17 ais523: but that's Dangerous 18:24:26 ehird: yes, you probably don't want to revert all your settings 18:24:31 so decide which ones you do want to revert 18:24:43 I was just telling you how to do a revert EVERYTHING like you said 18:25:09 and OFC, you can always just create a new username and have all those settings restored 18:25:29 if you messed up the system settings, you just keep /home and reinstall everything else 18:26:32 ais523: So... on the subject of X)80f.sroiuoI|. 18:26:48 ehird: I can't acctually make sense of that 18:26:52 what lang is it in? 18:26:57 -!- Corun has quit ("This computer has gone to sleep"). 18:27:07 ais523: keyboard 18:34:34 ais523: So hmm. I don't think Cyclexa WANTS to be implemented. 18:34:45 better Cyclexa than Magenta 18:34:55 define 18:35:17 http://esolangs.org/wiki/Magenta 18:35:27 it's cursed, never try to implement it, you'll fail 18:35:49 Is it yours 18:36:05 hm 18:36:07 seems not 18:36:19 ais523: has anyone attempted? 18:36:26 ehird: yes 18:36:31 ais523: how many? 18:36:41 I can't remember 18:36:50 the value 2 is at the back of my mind, but probably for a different reason 18:36:51 'I got to be in charge of something without bollixing it up or giving it up too early' <-- Well, it'd be nice to be able to do this ;) 18:36:58 ais523: anyone recently? 18:37:04 no 18:37:09 I think 1999 was the last try 18:37:32 wanna try? :) 18:38:31 ehird: no, it's cursed 18:38:32 Bye for now al 18:38:33 all 18:38:38 bye Sgeo[College] 18:38:39 ais523: exactly! 18:38:42 Sgeo[College]: bye 18:39:30 ais523: :) 18:40:04 -!- Sgeo[College] has quit ("http://www.mibbit.com ajax IRC Client"). 18:40:36 ais523: it doesn't look hard.. 18:41:47 ais523: does it? 18:41:59 ehird: ever tried to implement INTERCAL? 18:42:07 Implementing Magenta reminds me of that a bit 18:42:11 ais523: no, i haven't 18:42:13 but i want to, sometime 18:42:32 ehird: the problem is that interactions between flow control statements can get out of hand 18:42:36 and Magenta has loads of them 18:42:45 although it really needs the but-first statement too 18:43:27 ais523: I'm trying to come up with a unique idea for an esolang 18:43:29 It's hard! 18:43:48 ehird: we don't have enough declarative esolangs at the moment 18:44:08 ais523: i was just thinking of a prolog-alike 18:44:08 heh 18:44:09 except, 18:44:12 without the truthnese 18:44:19 that is, there's no actual 'return value' 18:44:24 prolog has a pseudoreturn of true/false 18:44:31 you mean pass/fail 18:44:35 true(X) would result in true being put in X though 18:44:37 ais523: well, yeah 18:45:34 OK, downloading Ubuntu H has finished 18:45:44 so all sorts of breakage may happen at my end from now onwards 18:46:04 due to mixes between old and new bits of programs 18:46:18 I'll just have to be careful to not close anything open, so the old FDs stay in existence 18:46:55 ais523: any other esolang ideas? 18:47:10 there was my graph-rewrite idea I mentioned a while ago 18:47:15 -!- Hiato has joined. 18:47:18 I didn't tell anyone the spec, though, just that I had the idea 18:47:26 I can explain the spec reasonably simply over IRC 18:47:34 if people here are interested 18:47:36 :| 18:48:00 implementing it will be hard, though, I can't think of a marginally efficient way to do it, but am sure that one exists 18:49:02 ais523: any others? :-P 18:49:17 probably, but I'll have to think harder 18:49:22 I want to do an update to BackFlip 18:49:31 which is TC despite still keeping the BackFlip style 18:49:42 it's a very simple change: 18:49:52 the program is wrapped into a cylinder 18:50:06 the left and right sides are identified, so if you go off the right you end up back at the left, like in Befunge 18:50:25 the program is copied upwards and downwards, so if you go off the top or bottom you end up in a different copy of the original program 18:50:28 that's enough for TCness 18:50:33 (I also have some I/O ideas) 18:50:44 -!- Corun has joined. 18:50:45 oh, and you only need flipping mirrors for that, the arrows are unnecessary 18:50:51 meh 18:50:51 :P 18:51:39 ehird: oh, also my hyper-Prolog, but it's uncomputable and so can't be implemented 18:52:27 unhelpful 18:52:53 ehird: you seem really picky at the moment 18:53:11 kyevan seems to have a decent idea for a new lang in #ircnomic, though... 18:54:59 ais523: i am always picky 18:54:59 :D 19:00:08 -!- Hiato has quit ("Leaving."). 19:02:27 So! 20:09:50 -!- 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""). 20:26:22 -!- oklofok has joined. 20:27:39 -!- oklopol has quit (Connection timed out). 20:30:14 oklofok: oko 20:35:20 heh, right now, i had to use IE because firefox just couldn't open webpages :) 20:35:26 firefox is my default 20:35:31 when it crashes 20:35:32 i open IE 20:35:36 and everything works again <3 20:35:40 :)))))) 20:35:50 ehird: okofolorance 20:36:02 oklofok: aodoaogk 20:37:26 -!- oklofok has changed nick to oklopol. 20:38:07 oklopol: came up with any AWESOME ESOLANG IDEAS yet???? 20:38:49 We need one oklopol! 20:39:02 Because everyone is tired of Brainfuck! 20:40:57 nopol was my esoest idea in a while 20:41:13 i keep coming up with *usable* languages :< 20:41:26 oklopol: usable languages .. cool! 20:41:27 tell me one 20:41:35 i mean, the fixed point idea, plus my best-effort prolog were quite nice, but neither is all that eso 20:42:00 Just make it eso! 20:42:21 Like replace all logical operator with | in your prolog thingy or something 20:42:30 Ef i'm actually gonna implement, best-effort prolog is my impossible extension to prolog, perhaps i should integrate it with ais's 20:43:34 what i'd like to invent after Ef is a whole new model of computation 20:43:42 i just have to come up with one 20:43:48 i mean 20:43:58 not in the paradigm sense, the CA sense 20:44:18 hmm 20:44:19 not CA 20:44:23 someone gimme the term 20:44:32 oklopol: i want to implement ef 20:44:33 can i? 20:44:38 :P 20:44:52 perhaps, once i specify it a bit more 20:45:05 atm, i just have a vague idea about the evaluation model, and the two examples 20:45:47 Ef? 20:45:56 Ef is for Fixed point 20:46:29 the idea is, function calls are executed infinite times 20:46:41 yet the language is mostly imperative 20:46:52 i mean 20:46:53 hmm 20:47:13 functions are first-class 20:47:15 oklopol: examples plz 20:47:20 just the two exist 20:47:21 you've seen them 20:47:35 sort = {x:_;y:_;?xy=>(x,y)=(y,x)}; 20:47:35 pical = (.acc denom sign):{(acc + sign/denom) (denom + 2) (-sign)}; 20:47:35 pi = (pical 1 3 -1) * 4; 20:47:56 pi is calculated in the last to lines 20:48:03 the first one is a slow sort function 20:48:22 kinda like an imperative selection sort 20:48:26 oklopol: show factorial 20:48:28 :DDDDDDDDD 20:48:42 lessee 20:50:05 fac = (n .acc):{n > 0 => n-1 acc*n} 20:50:14 implicit recursion, and i'm using the whitespace separation thing 20:50:23 so it's a bit eso :) 20:50:33 oklopol: whut's acc 20:50:38 result 20:50:46 oh, that's incorrect 20:50:52 fac = (.n acc):{n > 0 => n-1 acc*n} 20:51:01 we are finding the fixed point of n 20:51:14 this is an imperative factorial 20:51:17 i dun get it 20:51:20 :) 20:51:21 good, good 20:51:30 it's a *bit* different from what you see usually 20:51:32 basically 20:51:36 i'll step-through 20:51:58 fac = (...):{...} <<< just make the function, (...) is for args, {...} is the body 20:52:07 (.n acc) means we take two arrgs 20:52:09 *args 20:52:14 n and acc 20:52:21 . means we are taking the fixed point of n 20:52:27 meaning we continue until n doesn't change anymore 20:52:33 now for the body 20:52:51 {a => b} means if a, then do b 20:53:06 a is n>0, so we do b until not a 20:53:15 because there's implicit recursion when we return 20:53:15 oklopol: this handles infinite recursion doesn't it 20:53:38 func = (.n):{n+func(n/2)} 20:53:40 using explicit recursion 20:53:41 but 20:53:43 well yeah you pretty much have to shortcut infinite recursion because you cannot escape it from within the language. 20:53:44 func(1) => 2 20:53:46 or something 20:53:47 right? 20:53:53 umm 20:53:59 wha 20:54:02 :) 20:54:08 aaa 20:54:12 yeah, that should work. 20:54:40 it should be able to do something that simple perfectly, but usually you just get an abstraction 20:54:48 it's actually designed to be pretty *fast* 20:54:55 being imperative and all 20:55:15 my confusion was cuz i though that tried to be factorial 20:55:19 but indeed, you aren't a retard 20:56:04 umm 20:56:12 ehird: it's not correct though 20:56:16 :) 20:56:22 oklopol: :((( 20:56:36 it's used a bit differently, you have to do it tail-recursively 20:56:41 you *can* do it like that 20:56:47 but that part of the language isn't done yet 20:56:57 and it's not supposed to be used that way 20:57:09 i'll try to fix it 20:57:24 oklopol: yay 20:58:40 double = (n add):{n+add add/2} 20:58:40 double 7 3.5 20:58:45 this is how you should do it atm 20:59:14 don't worry, it will get better, it's just i want to keep it pure until i have the basics. 20:59:34 oklopol: i don 20:59:37 't get why two params 21:00:09 well 21:00:43 (7 3.5) => (7+3.5 3.5/2) => (7+7/2+7/4 7/4) etc 21:00:44 and 21:00:45 actually 21:00:53 double = (n .add):{n+add add/2} 21:00:58 so we get the fixed point of add 21:01:08 wait for it to reach zero, that is 21:02:05 i'll try to explain why yours would recurse infinitely 21:02:21 func = (.n):{n+func(n/2)} 21:02:22 hmm 21:02:23 actually 21:02:26 quite trivial: 21:02:32 err... 21:02:38 okay 21:02:53 it's not that trivial to explain, it seems, but let's expand it 21:02:59 see what it evaluates to 21:03:16 first of all 21:03:39 f(n) means f(f(f(...f(n)...))) in Ef 21:03:41 so 21:04:06 f(f(f(...f(n + f(f(...f(n/2)...)))...))) 21:04:33 f(f(f(...f(n + f(f(...f(n/2 + f(f(...f(n/4)...)))...)))...))) 21:04:44 is this what you want? 21:05:18 you are thinking functional, you should be thinking fixed-point :) 21:06:12 recursion should not be used just like that, unless you're using "boring functions", which i'll prolly call functions that don't take fixed point automaticall :) 21:06:13 y 21:06:45 but, you can do non-deterministic stuff, which pays up a bit for the fact you cannot easily do recursive stuff 21:07:52 -!- olsner has quit ("Leaving"). 21:08:08 -!- Iskr has quit ("Leaving"). 21:08:33 -!- oerjan has joined. 21:08:53 ehird: couldn't handle the fact you made an error and died? 21:09:04 oklopol: nope 21:09:53 typical darwin award candidate? 21:10:04 i guess boring functions aren't needed actually, it will just be a bit harder to do non tail-recursive stuff 21:10:07 i'm fine with that 21:10:31 it doesn't have to be a good paradigm, i just want it to be different! 21:11:40 oklopol: invent a language based on oko. 21:11:44 not the 3 characters 21:11:47 but the zen of oko 21:11:49 the oko of zen 21:11:50 oko 21:11:57 :) 21:12:04 yes, that must be done 21:12:26 -!- ais523 has joined. 21:12:31 ais523: upgrade works? 21:12:48 ehird: no 21:12:50 but I fixed it 21:12:54 there was a file in /usr/local interfering with things 21:12:56 after the upgrade, I could only boot to command-line 21:13:01 and that file caused loads of things to fail 21:13:04 even man and netcat 21:13:16 so I renamed it 21:13:21 and then everything started working 21:13:35 and it was just a case of using synaptic to fix dependencies 21:13:35 ais523: /usr/local/iwillkillyou? 21:13:40 a common issue. 21:13:44 I stuck xx at the start of the filename 21:13:46 atm, i'm thinking for my next language i'll make something so complicated it can only be understood after 20 years of meditation in tibet, yet so beautiful after understanding it there is no need to continue living, the gist has been seen. 21:14:51 that's all i've decided sofar 21:15:00 oklopol: is that the oko language 21:15:30 yes! It finally managed to update Linux itself 21:15:36 that's failed twice before 21:15:39 ehird: most likely 21:16:00 oklopol: i submit this as a code snippit 21:16:05 %< > 21:16:14 understanding what it does is one of the core tenents of oko 21:16:24 i was thinking programs would sound like poems in an alien language 21:16:33 but perhaps that too. 21:17:06 put _ for space in case there were others than the one between < and > 21:17:33 i wanna get that right, because fulfilling random wishes is important to me. 21:17:54 -!- ais523 has quit ("rebooting, will hopefully be back soon"). 21:21:56 oklopol: watch... 21:22:07 %< o: { 1+ }> 21:22:13 the art of where to put spaces is part of oko 21:22:19 but isn't that code beautiful 21:23:04 grcalc = (a b .ratio):{a+b a a/b} 21:23:04 goldenratio = grcalc 1 1 ! ratio 21:23:08 this is quite neat, imo 21:23:44 calculating golden ratio from the fact it's the limit of the ratio of two adjacent fibs 21:23:51 ^> ,3 (a []) < 21:23:55 oklopol: isnt this oko lovely 21:23:55 ehird: it is pretty pretty 21:24:01 even my latest symbol? 21:24:02 it's ambigious 21:24:07 but in a very pretty way 21:24:07 are there spaces? 21:24:11 yes 21:24:14 i mean 21:24:14 the spaces give deep meaning to the code 21:24:21 use _ for them, i can't see them. 21:24:23 i mean 21:24:24 -!- ais523 has joined. 21:24:30 if there are two adjacent ones 21:24:31 oklopol: not more than one in a row 21:24:34 okay. 21:24:35 but: 21:24:47 a~__a$ \~ 21:24:52 oklopol: looks nicer with just spaces though 21:24:56 a~ a$ \~ 21:24:57 ehird: I think the system's still OK, but it's running a scheduled fsck 21:25:00 truly okoick 21:25:16 so I'm on IRC via telnet, from a UNIX box 21:25:18 i really cannot see spaces 21:25:33 %< o: { 1+ }> 21:25:33 ^> ,3 (a []) < 21:25:33 a~__a$ \~ 21:25:40 are these the deep, meaningful examples? 21:25:56 presumably they have no obvious meaning 21:26:03 that can easily be explained over IRC 21:26:43 well 21:26:46 presumably 21:26:54 these examples don't actually do anything meaningful 21:26:59 but they are crucial to understand 21:27:08 because they capture some of the key ideas of oko. 21:27:20 ehird: oh, right 21:27:29 i failed. 21:27:31 and they key ideas can't easily be explained either, presumably 21:27:53 well, they haven't yet been invented 21:27:59 `-` a .. b `-` 21:28:00 but no, they couldn't be explained easily. 21:28:06 oklopol: between the `-`s and the middle bit is 2 spaces 21:28:37 but .. you've got to admit that these are mirrors ontowhich the oko may be viewed; nay, merely reflected - as such a viewing must be realised via contemplation of oko. 21:29:03 a true oko would be foolish, or even impossible - as it is such that it must be realised independently and not given; 21:29:09 okay. now do you want any of this to mean what one might expect from normal languages? i'm thinking it isn't really parsed, or just executed from source like brainfuck... but something weird in-between 21:29:16 understanding oko code may be part of a path to which realisation may be achived. 21:29:26 well said. 21:29:28 :) 21:29:29 oklopol: it's .. hard to explain. like the rest of oko! 21:29:38 indeed! 21:29:54 we don't have enough mystery in the esolang world. 21:30:07 \=-_ "Ao" .<-> 21:30:09 oklopol: some more oko 21:30:12 ehird: comment @ golden ratio! 21:30:15 tell me it's awesome! 21:30:16 and it's awesome 21:30:28 hmm 21:30:31 i'm thinking 21:30:39 in oko, there are *entities* 21:30:49 entities are *aware* of everything happening around them 21:30:53 oklopol: yes 21:31:07 everything depends on everything, somehow... in deep, meaningful ways 21:31:07 _-&29 [<] 21:31:11 some more oko, but that's BAD OKO 21:31:13 you shouldn't use it 21:31:20 it does not have the pseudo-symmetrical oko nature 21:31:30 i'll put that on the BAD list 21:31:34 you can just look at it and feel the hard crash it makes upon the oko psyche 21:31:35 can't you? 21:31:48 it does not blend and fold like most oko; nay, it fights against them, to remove the enlightenment 21:32:00 a major part of oko is learning to ward off such anti-oko with real, pure oko. 21:32:05 the oko that can be realized is not the true oko 21:32:30 oerjan: but you can realise it in seperate peices, and you must combine them only as the oko nature within describes; 21:32:47 therefore you can utilize the true oko but not all at once, if realised all at once, it is not powerful, nay it is harmful 21:32:53 and this is why true oko cannot be given 21:33:36 also, how do you know when a programmer is lying about oko? his fingers are typing. 21:33:54 oerjan: hehe 21:34:25 hmm... about the language, it must be the opposite of languages trying to hide details and allow programmers to create new abstract levels on which to code... 21:34:26 in oko 21:34:35 oerjan: we're discussing Agora over in #ircnomic at the moment 21:34:36 you have to understand the program as a whole 21:34:51 oklopol: it's kind of... 21:34:55 you can understand the peices of oko contained within 21:34:58 and the program reveals itself 21:35:31 xD 21:35:34 yes! 21:35:37 exactly! 21:36:37 the spec begins with 50 pages of meta-explanation about the true nature of oko 21:36:57 and it ends with the realization the language cannot actually be conceived via a spec. 21:37:56 oklopol: you can conceive the language via a spec. it can be fully and totally formally defined and implemented. 21:38:04 think about that. then, you will know oko more. 21:38:27 it can be defined and implemented, yes 21:38:31 but not actually understood. 21:39:32 oklopol: wrong 21:39:34 perhaps the spec need not say that 21:39:37 is it? 21:39:38 it can be understood. 21:39:40 think about that. 21:39:42 it is very deep 21:39:47 just think.. 21:39:49 oh, is it now? 21:39:51 i shall. 21:40:48 oklopol: STOP THINKING IMMEDIATELY 21:40:54 Now you understand oko more. 21:40:59 Am I right? 21:43:13 oklopol: 21:43:26 yes. 21:44:24 <-- *& >-- < 21:44:30 oklopol: that is 'mediaanre oko' 21:44:35 it controls the flow of bad and good oko 21:44:41 it is itself bad oko, but controlled 21:45:08 oko? 21:45:12 sounds good 21:45:16 lament: Read logs. 21:45:52 oklopol: oko also has the concept of 'recursive metaphors' 21:46:28 -!- ais523_ has joined. 21:46:35 can you elaborate on them? 21:46:51 perhaps show me an example of that concept syntactified 21:46:53 -!- ais523 has quit ("my laptop is up again, yay!"). 21:46:59 -!- Slereah_ has joined. 21:47:06 -!- ais523_ has changed nick to ais523. 21:48:07 -!- Slereah has quit (Read error: 110 (Connection timed out)). 21:50:42 i'm thinking oko needs a parse *graph* 21:55:45 clearly its grammar is not context-free. i think it is not even context-sensitive, and possibly not even general recursive, but proving so would probably violate Godel's incompleteness theorem. 21:56:28 oklopol: recursive parse graph 21:56:29 hi ais523 21:56:37 recursive? 21:56:39 hi ehird 21:56:41 what does that mean? :) 21:56:55 oklopol: self-containing parse trees 21:57:23 a graph can "contain itself" by having internal links 21:57:32 graphs = sex 21:58:17 heh 22:00:23 oklopol: 1 22:00:29 1? 22:00:43 recursive metaphor example? 22:01:58 hmm, a syntax with a separate letter part (with somewhat sensible CV-structure) and character part might be nice 22:02:16 oklopol: rec metaphor: 22:02:26 = ~*a<#*~ 22:04:48 http://www.vjn.fi/pb/p415442436.txt <<< what do you think? 22:06:14 oklopol: No load 22:06:20 ah 22:06:23 hmmm 22:06:40 no, that's bad oko - it has no pseudosymmetrical nature 22:06:49 and is badense 22:07:14 i was more referring to the letter - character separation :) 22:07:25 ah 22:07:30 unsure 22:07:38 i kinda likes it. 22:07:39 it needs more blend 22:07:50 blend? 22:08:38 yes 22:08:58 i'm not entirely sure what that means... should i... think about it? 22:09:06 the answer is already within me? 22:09:25 or do you mean actual syntacic blending? :) 22:09:28 t 22:09:50 oklopol: both 22:13:11 oko needs to be a very high-level language with the same "awkwardness" of adding stuff that something like thue has 22:13:21 no 22:13:23 both lack of modularity and high-levelness 22:13:27 no? 22:14:22 i love the idea of every program being something of a work of art that's basically impossible to comprehend, and even the slightest attempt to modify renders it useless 22:14:48 but, with complex high-level concepts 22:16:30 something like intercal, but more insane. 22:16:45 much much more, i hear people can actually use it without going insane 22:19:30 they can? *cackle* *cough* *chirp* 22:21:29 well, people can't keep entirely sane using it, but they can usually fake a fairly good sane person afterwards. i'm talking poo out your mouth walk on your nose crazy 22:28:50 -!- Corun has quit ("This computer has gone to sleep"). 22:29:07 poo out your mouth, walk on your nose? can insanity make you able to do that? 22:29:17 i must have got a defect version. 22:30:12 Only rhinogrades can walk on their noses! 22:30:51 O_O 22:33:09 "Thus perished all traces of the snouters, their unique ecosystem, and all the world's specialists on that intriguing subject . who happened to be holding their congress there at the time" :D 22:34:15 I wonder, was there ever a gigantic hoax in computer science? 22:34:20 apart from Malbolge, that is! 22:37:30 wow, python is stupid 22:37:40 or rather, lazy 22:37:49 lament: Haskell is lazy, not sure about Python 22:37:50 print foo(), bar(), baz() 22:37:53 * oerjan assumes the Museum of Hoaxes link in that wikipedia article could lead you to something compsci 22:38:05 if baz() raises an exception, foo() and bar() are still printed 22:39:49 lament: seriously? 22:39:49 wow 22:39:52 well, fixed in py2k 22:39:56 print will be a function 22:40:32 * oerjan hypothesises a genus of snouters that had returned to the sea, and remain to be rediscovered 22:42:59 py3k 22:43:05 but yes 22:53:52 -!- 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""). 22:59:55 woohoo, esperanto dictionary lookup 23:00:02 lament@zayin ~/eo $ eo surtere 23:00:02 surtera : terrestrial 23:00:21 (python is SO much easier to write this in than haskell would be :( ) 23:04:29 lament: source? 23:05:35 http://z3.ca/~lament/eo.py 23:06:13 it's really simple, but in haskell it would take me probably... five times longer to write? 23:06:32 with the same number of lines of code in the result... 23:10:16 -!- timotiis has quit (Read error: 104 (Connection reset by peer)). 23:18:21 lament: am i allowed to make stylistic suggestions? 23:18:32 ok, first, 'file' is deprecated and going away in py3k. use 'open' 23:18:36 secondly, you never close that file 23:18:44 if you are on 2.5 use this: 23:18:50 with open(DICT_FILE) as dict: 23:18:53 for line in dict: ... 23:18:59 if you're not, heres your ugly solution: 23:19:05 dict = open(DICT_FILE) 23:19:05 try: 23:19:07 .... 23:19:09 finally: 23:19:11 er... why? 23:19:11 dict.close() 23:19:17 lament: because that closes the file 23:19:18 why should i close it? 23:19:30 um, you should always close files you open. 23:19:36 why? 23:19:43 it's fun 23:19:43 /sigh 23:19:46 the program itself closes immediately 23:19:57 lament: the os keeps hold of file references 23:19:59 even after program exist 23:20:05 linux refcounts files and everything -- it can get sticky 23:20:07 best to close them all 23:20:13 eh 23:20:22 sounds magical 23:20:35 next you'll be telling me i should free() all memory before exiting 23:20:55 well the truth is that's pretty fun too. 23:20:57 are you saying the python runtime does not do this for me? 23:21:02 lament: no, it does not 23:30:21 well, tough luck 23:30:33 i didn't realize both python and linux sucked so badly 23:30:45 i still don't believe it, though :) 23:30:57 what can happen if i open a file and don't close it? 23:31:20 why would linux fail to notice that a program that opened the file died? 23:31:58 lament: don't ask me 23:32:06 but linux does refcount files and files aren't magically closed 23:32:31 it's rather hard to believe 23:32:51 files are so retro 23:33:19 lament: i guess linux does it for speed 23:33:22 besides, suppose my program crashes 23:33:36 for example i shut down the computer 23:33:42 the file clearly doesn't get closed 23:33:49 obviously linux should be able to deal with situations like that 23:34:09 -!- oerjan has quit ("To crash, perchance"). 23:35:50 nice, added an irssi alias 23:37:19 -!- kwertii has joined. 23:39:11 ehird: Do you have a reference for that, btw? Or example code? 23:39:25 I'm quite surprised by that too, and my simple tests haven't been able to reproduce what you were saying yet 23:40:18 sekhmet: i don't know, but just about every programming language i've used has had the majority strongly advocate it, and i'm sure i read something about it somewhere 23:40:32 i'd love to know if it's cargo cult programming -- doing it is really annoying 23:40:51 Well right, it's Good Practice to close things you open in code 23:41:09 I just find it really hard to believe that Linux would keep filehandles open after the owning process has died 23:41:14 ehird: i bet it is 23:41:35 lament: if it is then it's cargo cult programming that ~90% of intelligent programmers reccomend 23:41:37 which would seem odd. 23:41:38 (closing files before exiting) 23:41:49 ehird: oddly i have never seen that recommendation. 23:42:01 like, never 23:43:01 I've seen the recommendation quite often, and it certainly makes sense if you're writing long-running processes (daemons, other things that run in servers, etc) 23:43:08 lament: maybe you should write your program in like every single language 23:43:09 and pick the best 23:43:24 you should do erlang next. parallel dictionary crunching! 23:43:37 sekhmet: there's a big difference between releasing resources in general, and releasing resources before exiting 23:44:17 ehird: i just wanted an esperanto dictionary lookup program. I don't need to write it again. :) 23:45:06 lament: but you can decide the best language that you will love and never whine to #haskell about it again ;) 23:45:07 on the plus side, i can write "/eo foje" or something and find out what the hell foje is 23:50:37 lament: what is /eo eo 23:51:31 eo is esperanto 23:52:31 "eo" is not an esperanto word, so /eo eo is "eo : Not found" 23:52:38 -!- Corun has joined. 23:53:17 lament: :)