00:00:03 but yeah 00:01:32 void ul_call(ul_obj o) { top: o->fp(); if (o->cdr) { o = o->cdr; goto top; } } 00:01:35 poor man's tail recursion 00:01:51 actually, i should make that pop 00:01:55 instead of take an arg 00:04:01 oerjan: this should actually be pretty fast shouldn't it? 00:04:11 oh...... one problem 00:04:12 Interesting. . . 00:04:13 (x)a 00:04:17 how do i represent that with my struct? 00:04:22 In Agora, I am Champion and Minister Without Portfolio. 00:04:23 pikhq: indeed :) 00:04:26 oh. 00:04:27 But, I never won the game. 00:04:29 :| 00:04:33 oh dear 00:04:39 i thought you meant my unlambda compilation efforts! 00:04:42 ehird`: That, too, is quite interesting. 00:04:42 revisionism, i say! 00:04:50 oerjan: i think i just need another entry in ul_obj 00:04:55 ul_obj *inner; 00:04:59 No, pure stupidity. 00:05:23 Champion was changed so that it was granted by the announcement of the Herald to someone who has won. 00:05:33 Minister Without Portfolio was changed similarly later. . . 00:05:41 But in that proposal, I was granted the patent title. 00:06:44 the obvious solution is to now request the patent title 00:07:01 Well, yes. 00:07:16 Champion Not Created By Winning 00:07:17 i think my compiler architechture is pretty unique :P 00:07:30 :D 00:09:23 ehird`: i don't see how your struct would deal well with (a)(b)*(c)*(d)* 00:10:33 assuming your (*fp)() always is first, that is still essentially a linked list, so needs linked list concatenation 00:11:28 * with stack=[a,b] is a->cdr = pop() 00:11:54 i see 00:11:58 a with stack=[x] is a push with ... wait, i need to rethink this 00:12:09 there's no fp i could reasonably assign a run on 'x' 00:12:21 ah, 00:12:26 not too hard: 00:12:26 then you have to do deep copying when duplicating things 00:12:29 in ul_call, 00:12:35 i just have to check for ->inner 00:12:42 if it's there, push that. 00:13:01 i.e. you are doing hideously mutation there, which _will_ trip you up 00:13:57 i.e. how would you do :*:*:* ? 00:14:29 uh, by duplicating. 00:14:31 then concatting. 00:14:43 oh wait 00:14:49 ehird`> * with stack=[a,b] is a->cdr = pop() 00:15:04 actually my point is, what do you do if a _already_ has a cdr? 00:15:38 (well one point. : may still make things even worse later) 00:16:07 oerjan: that's a good point... 00:16:15 oerjan: So! Suggest another way. 00:16:36 construct a new struct, with car a and cdr b 00:17:07 so typedef void ul_obj; 00:17:11 (so void *) 00:17:14 and have 00:17:17 ul_obj 00:17:19 and ul_pair 00:17:27 with a char tag at the front 0=ul_obj 1=ul_pair 00:17:32 and distinguish them both? 00:17:44 well 00:17:44 ul_atom 00:17:46 and ul_pair 00:18:12 oerjan: ul_atom still has a ul_obj *inner, right? 00:18:14 for a 00:19:19 of course i am really thinking functionally, so i envision all the structs as immutable 00:19:25 nope 00:19:30 well 00:19:34 car a, cdr b is immutable 00:19:43 but ul_atom is not. 00:19:47 inner may change. 00:19:52 but mostly, yeah, i just cons a lot 00:20:08 the point is, if you don't make things immutable then : will require deep copying sometimes 00:20:41 for example, consider ::*::*::* 00:21:04 or anything which leaves a copy of the old version on the stack 00:21:21 i'm doing your way 00:21:26 so it's ALWAYS one cons. 00:21:45 oerjan: it's worth noting you should have thought of the consequences: now ul_call must be recursive. 00:21:55 of course 00:21:56 so i have an arbitary restriction i didn't before. 00:22:06 remember: recursion in C barely ever works well 00:22:13 probably worse than the linked-list slowness. 00:22:13 i see... hm 00:22:20 -!- Jontte has quit ("Konversation terminated!"). 00:22:44 you can make your own execution stack 00:22:50 oerjan: yeah right 00:22:54 :) 00:23:06 push the cdr there before going to the car 00:23:20 you do know that all flow control involves lots of lots of ^ right? 00:23:28 normally with hundreds of appends 00:23:31 before my call was tail-recursive 00:23:36 but now i'm going to have Real Big Problems 00:23:43 even with a stack: it 00:23:49 hmph 00:23:49 's a pain and will probably run out soon 00:24:06 oerjan: do you accept now that my linnked list was better :P 00:24:33 i now accept that there are trade-offs 00:24:38 might be slower but 1. 34583475x faster than any of the interpreters out there anyway (most use O(n) concats anyway) 2. who will notice 00:24:53 mine will at least run all ul programs perfectly 00:24:57 also, that i shouldn't be considered as having the final word on anything involving C or similar low-level languages 00:25:53 so for now i'm going to use a linked list 00:26:27 but anyway, you should think carefully about what is immutable and what requires deep restructuring 00:26:49 the js interp and my scheme interp do the same O(n) concats. 00:27:05 mine is in /C/ fer gods sake, and the code itself is compiled 100%, it's gonna be blazing fast for underload 00:28:11 hm yeah 00:37:38 ok i have my whole prelude/postlude! :D 00:37:45 now for ul2c itself. 00:37:49 that's most of the work done, actually 00:38:22 i defined all of the operations 00:38:24 as functions. 00:38:50 oerjan: my compiler output will be weird :) 00:38:53 there'll be a lot of: 00:39:03 ul_push(ul_func_4, "...code for that..."); 00:39:06 in say ul_func_2 00:39:16 and it'll come out in ul_func_1,ul_func_2,... order 00:39:32 so you'll get a ref to the functions and the complete code of the following functions before they come :) 00:39:47 i have sort of assumed that compiler outputs _are_ weird. 00:39:50 if anything this proves you can probably compile unlambda ok 00:39:52 oerjan: heh 00:40:09 my ul2c function will be VERY imperative... 00:40:11 unless the languages compiled from/to are particularly close 00:40:25 mostly define/sets/etc 00:40:35 because i cba to do it another way because my compiler arch is crazy 00:43:13 oerjan: shit, compiling literal nested ()s will be a pain :) 00:44:20 ((abc)def(ghi)) -> ul_push(ul_func_1, "abc"); ul_wrap(); ul_push(ul_func_2, "def"); ul_concat(); ul_push(ul_func_3, "ghi"); ul_wrap(); ul_concat(); 00:44:50 to put it another way, ((abc)def(ghi)) -> (abc)a(def)*(ghi)a* 00:45:11 oerjan: but i don't think that will have a big effect on performance. 00:45:45 oerjan: i mean, your original source code isn't used much - mostly you're doing the operations themsevles :) 00:47:54 i don't recall, i guess you cannot declare struct constants involving function pointers? 00:48:04 i use pointers 00:49:04 oh wait 00:50:15 i mean you are not actually compiling the structures themselves, you are compiling how to build them 00:50:22 yeah 00:50:32 i can't compile the structures themselves 00:50:38 -!- calamari has joined. 00:50:45 i suppose C does not support it 00:50:54 it would if ul_push didn't push to a stack 00:50:58 it's just simpler this way anyway 00:51:45 hm no wait 00:52:03 couldn't you still do 00:52:54 ((abc)def(ghi)) -> ul_push(ul_func_0, "(abc)def(ghi)"); 00:53:03 no 00:53:10 because what if ul_func_0 wants to execute (abc) 00:53:16 no funcptr there 00:54:01 you would define ul_func_0 as what actually executes (abc)def(ghi) 00:54:22 no need for the ul_concats though 00:55:11 anyway with your ul_func_0 00:55:12 i can't mangle it 00:55:27 like if ul_func_0 did loadsa funky ~ stuff 00:55:47 i.e. ul_func_0 () { ul_push(ul_func_1, "abc"); ul_func_2(); ul_push(ul_func_3, "ghi"); } 00:56:01 more like 00:56:09 (ignoring some stuff) 00:56:16 ul_push(ul_func_1, "abc"); ul_push(ul_func_3, "ghi"); 00:56:21 err 00:56:22 1 and 2 00:56:25 where both 1 and 2 are {} 00:56:27 :) 00:56:28 but yeah 00:56:30 your idea is right 00:56:31 :) 00:57:10 ul_func_2() would be something which called a,b,c in order 00:57:18 uh 00:57:24 no 00:57:28 that would be inline, in ul_func_0 00:57:30 or perhaps just include those directly 00:57:34 right 00:57:34 and 00:57:36 they're NOPs 00:57:40 so: mine is right 00:58:00 um _if_ they're NOPs 00:58:07 they are 00:58:10 i assumed they stood in for something arbitrary 00:58:10 a b and c have no meaning in underload 00:58:12 :P 00:58:15 naw 00:58:16 :P 00:58:26 oh right 00:58:38 because you still want such things for printing 00:58:48 yep 00:59:02 but if they had been :*: instead you would just inline that 00:59:05 funny thought: 00:59:07 i could actually add a debugger to this 00:59:14 since i have the current program at every step of the way... 00:59:18 well, kind of 00:59:19 :D 01:00:12 debugger macros, that you could turn off/on with a flag 01:08:09 * Slereah 's back 01:09:22 if this works first time 01:09:24 i'll eat my hat 01:10:11 Do you have a hat? 01:10:24 ... no. 01:12:25 you'll have to borrow one from GregorR then. 01:14:05 Well, maybe a smaller hat 01:14:12 We don't want him choking. 01:16:36 Is there a Rube interpreter somewhere? 01:16:57 The Cat's eye page isn't even in archives.org 01:17:17 (Well, except the java interpreter) 01:17:54 Slereah: um catseye.webhop.something has been acting up, try catseye.tc i think it is 01:18:15 Ah yes, thanks. 01:19:23 * oerjan wonders if you can put templates in wiki urls 01:19:46 cpressey's webpage moves so often it could need one... :D 01:20:12 i have errorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrs, oerjan!!!!!!!!!!!!!!!!!!!!!!!!! 01:20:22 I use ul_func_N without predeclaring them 01:20:23 <333333333 C 01:20:34 good!!!! 01:20:46 so gcc HAYTZ MEY 01:20:50 as eating hats can be harmful to your health, i think 01:21:02 Well, depends if it's an edible hat 01:21:09 Like edible panties, but less erotic. 01:22:20 OH YEAH 01:22:21 % ./out 01:22:21 Hello, world! 01:23:22 yay! 01:23:38 damn 01:23:41 (:aSS):aSS doesn't work 01:23:45 % ./out 01:23:45 ERROR -- popped from empty stack 01:24:51 time to add debug code 01:26:15 oerjan: can you check my primitives to see if they have obvious errors? 01:26:24 i think i have a basic logical error in one but i just cant see it 01:26:44 here: 01:26:49 http://rafb.net/p/XEGp7F68.html 01:26:56 -!- sebbu has quit (Success). 01:28:28 oerjan: any ideas? 01:28:35 ohhh 01:28:39 ul_wrap doesn't actually push 01:28:40 ouch i cannot read this 01:28:41 :) 01:28:47 sorry for the lack of indentation, oerjan 01:28:51 whew 01:28:53 it's inlined as a string in my scheme program 01:28:55 and i was very lazy 01:29:02 um i'm not talking about formatting 01:29:02 it's object code, anyway 01:29:03 ;) 01:29:06 what then 01:29:10 the low-levelness of C ;) 01:29:15 yep 01:29:46 i was going to suggest some tests though 01:30:01 (test):SS for : for example 01:31:14 FUCK YEAH!!! 01:31:15 % ./out 01:31:15 (:aSS):aSS 01:31:21 I COMPILED FUCKING >UNDERLOAD< 01:32:04 oh dear 01:32:06 (()(*))(~:^:S*a~^a~!~*~:(/)S^):^ does not compile 01:32:27 Lolass 01:32:35 its an infiniloop :D 01:32:45 void (*ul_func_1)(); ul_push(ul_func_1, "()(*)"); void (*ul_func_2)(); ul_push(ul_func_2, "()(*)"); 01:32:47 etc 01:33:19 compile-time infinite loop? 01:33:31 appears so XD 01:33:46 it gets stuck on 01:33:48 "(~:^:S*a~^a~!~*~:(/)S^):^" 01:33:54 and continues outputting that ()(*) 01:33:58 why? no effing idea 01:34:05 oh 01:34:06 duh 01:34:09 i pass prog to find-matching-paren 01:34:10 not p 01:34:35 void ul_func_2(void) { 01:34:36 } 01:34:36 void ul_func_2(void) { 01:34:36 void (*ul_func_1)(); 01:34:36 ul_push(ul_func_1, "" 01:34:37 multiple 2s! 01:35:26 oh, duh 01:36:33 grrr 01:45:15 this makes me angry >:( 01:45:45 "You wouldn't like me when I'm angry!" 01:57:10 wtf 01:57:11 zsh: segmentation fault ./out 02:01:17 oerjan: 02:01:29 ((Hello, world!))(S)*^ ; equivilent to (Hello, world!)S 02:01:30 right? 02:02:09 would imagine so 02:10:13 blaahhhh 02:14:56 my fp is being set to NULL somewhere. 02:14:57 WTF. 02:15:35 = vs. == ? :) 02:15:46 nope 02:15:47 (just a guess :D) 02:17:27 -!- Slereah- has joined. 02:17:39 NEVER HAVE I BEEN MORE ANGRY OR ORANGE 02:17:53 ohhh DUHHH 02:17:58 BUT ARE YOU AGGRY? 02:18:05 -!- Slereah has quit (Nick collision from services.). 02:18:10 i am so dumb. 02:18:10 -!- Slereah- has changed nick to Slereah. 02:18:14 i do funcptr 02:18:15 s 02:18:20 BUT NEVER, EVER ASSIGN TO THEM 02:18:21 :D 02:18:25 retardhird! 02:18:33 Pointers are for squares dude. 02:30:25 my compiler output is slow or: it's broken 02:30:50 well 02:30:52 the bottles of beer works 02:31:02 ill post the source tomorrow 02:31:03 bye guys! 02:31:13 CU 02:32:42 -!- ehird` has changed nick to ehirdsleep. 02:47:22 -!- puzzlet has quit (Remote closed the connection). 02:47:25 -!- puzzlet has joined. 02:53:22 Hm. Wonder if I could make a RUBE-like, but based on Lemmings. 03:03:24 * Slereah slaps Slereah around a bit with a large trout 03:03:33 Oops. 03:03:42 I should play some Lemmings, for further reflexion. 03:04:13 * oerjan sidles carefully away from the lambdabot possessed one 03:04:34 or perhaps that quote is even older, hm 03:04:55 Wut? 03:05:02 * Slereah slaps Slereah around a bit with a large trout 03:05:23 Apparently, there's a button that will cause the action! 03:05:24 last i saw it was with lambdabot's @slap command 03:05:37 oh 03:05:46 Well, when used on a nick, that is. 03:08:36 -!- puzzlet has quit (Remote closed the connection). 03:08:47 -!- puzzlet has joined. 03:08:48 Hm. Lemmings 95 won't run. 03:09:00 I'd better find the original CD and use it on my old laptop 03:16:54 Ah, it's working finally. 04:11:21 Hm. Hello world! would be something like this : http://membres.lycos.fr/bewulf/Russell/Hello%20Lemming.txt 04:13:19 Although, the A should be on the floor. 04:13:38 (Incidentally, this is exactly the first level of the first Lemming game) 04:21:31 Would I be correct in assuming that you are going to design the spec so that that is true? 04:27:43 Well, the O is the gate that drops the little lemmings (waiting in the brackets), and the A is the exit (to the output) 04:28:47 Although the skills for the little buggers are going to be hard to implement. 04:31:53 I'll probably have to make some sort of command for a lemming to destroy or create a new instruction on the path. 05:29:24 -!- Slereah has quit (Read error: 110 (Connection timed out)). 05:41:14 -!- Slereah- has joined. 05:45:52 -!- Sgeo has quit (Read error: 110 (Connection timed out)). 05:51:30 -!- immibis has joined. 05:56:10 -!- oerjan has quit ("Cheap Freudian slips here"). 05:57:02 -!- immibis has quit (Read error: 104 (Connection reset by peer)). 06:53:21 -!- calamari has quit ("Leaving"). 07:06:52 -!- Jontte has joined. 07:07:35 hi! 07:07:40 just popping by to say nothing 07:07:41 -> 07:08:48 IT'S A QUINE! :o 07:56:34 -!- tesseracter has quit (Read error: 110 (Connection timed out)). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:15:04 -!- tesseracter has joined. 08:51:04 -!- helios24_ has quit (Read error: 101 (Network is unreachable)). 09:00:42 -!- helios24 has joined. 09:14:25 -!- helios24_ has joined. 09:15:18 -!- helios24 has quit (Read error: 104 (Connection reset by peer)). 09:25:03 -!- helios24_ has quit (Remote closed the connection). 09:28:46 -!- sebbu has joined. 09:33:17 -!- helios24 has joined. 10:01:24 -!- Slereah- has changed nick to Slereah. 10:53:42 -!- JontteG has joined. 10:55:13 -!- JontteG has quit (Remote closed the connection). 13:18:36 -!- jix has joined. 13:24:31 -!- puzzlet_ has joined. 13:24:36 -!- puzzlet has quit (Remote closed the connection). 15:13:02 -!- calamari has joined. 15:29:45 -!- jix has quit (Nick collision from services.). 15:29:56 -!- jix has joined. 15:30:49 -!- calamari has quit ("Leaving"). 15:34:28 -!- johnl has joined. 15:58:45 -!- tesseracter has quit (Remote closed the connection). 15:59:33 -!- ehirdsleep has changed nick to ehird`. 16:01:07 ais523 doesn't come here any more, after proving that the world is upside down and becoming filthy rich because of it :( 16:01:11 SO I CAN'T ASK HIM ABOUT UNDERLOAD. 16:02:37 ok i'll just ask people who know about underload. oklopol? maybe? pikhq? 16:02:39 whatever. 16:02:46 which is the most common operation: * or ^ 16:02:47 that is: 16:03:12 i can either have ^ potentially die if you use * a few hundred thousand times before using it, and have it relatively inefficient 16:03:17 OR, 16:03:25 i can have * O(n) 16:03:34 where n = the amount of times you've used * before 16:03:45 because it uses a linked list, so it has to follow ->cdr 16:03:48 -!- sebbu2 has joined. 16:11:22 oooh, I hsould write a malbolge compiler 16:11:23 Y/N 16:18:48 -!- sebbu has quit (Connection timed out). 16:25:37 is that even possible? 16:30:03 -!- timotiis has joined. 17:03:32 i don't think it is 17:09:26 unlambda terminaology question: 17:09:32 in `xy, what is 'x' called and what is 'y'? 17:09:38 applicator and applicant? 17:31:26 ehird`: are you just using the underload compiler for compiling unlambda->underload programs? 17:31:41 (unlambda->underload)->C 17:31:42 oklopol: hahaha XD 17:31:52 no haha, just a question :\ 17:32:00 that doesn't have c etc 17:32:01 just ski 17:32:05 ...? 17:32:06 != unlambda 17:32:10 i mean, your compiler 17:32:21 it's underload->C right 17:32:21 http://www.esolangs.org/wiki/Underload look at the translations 17:32:25 it isn't full unlambda 17:32:31 what... 17:32:35 oklopol: (unlambda->underload) is missing. 17:32:36 just answer my question :\ 17:32:42 i did. 17:33:32 i mean, if you're just doing unlambda->underload programs -> C, then optimizations will be very different from if you want to compile any underload program fast. 17:33:39 i mean, efficiently 17:33:44 i mean, into efficient code 17:34:50 i haven't coded much underload, but i don't think the best way to use it is to do unlambda->underload, and unlambda->underload programs converted using the instructions on the page probably are slower than programs written in 100% underload 17:35:28 .... 17:35:32 what are you talking about. 17:36:05 "which is the most common operation: * or ^" 17:37:47 in case you aren't using your compiler for underload programs as such, but instead translating unlambda to underload to be able to compile unlambda to C 17:37:52 that changes the answer. 17:38:07 i'm compiling underload to C. 17:38:10 very simple. 17:38:40 I can either make * very fast and ^ not guaranteed to always work if the program does an awful, awful lot, or i can make * very slow and ^ guaranteed to work 17:40:04 so unlambda wasn't involved at all? 17:40:14 i thought underload was just an intermediary step. 17:40:44 anyway, i'd say just use a tree structure and have both ^ and * be fast 17:42:02 unl->c and ul->c are two entirely different programs 17:42:11 ul->c, underload->c, is the only non-vaporware one right now 17:42:23 and, oklopol, that's the first option. but ^ then must be recursive. 17:42:34 and recursion in C = lawl, thus what i say about it in my first option 17:43:30 hmm... why would ^ die? 17:43:33 oh, recursion 17:43:42 i don't see why you'd need to use recursion. 17:43:57 you mean when flattening the tree? 17:48:41 um, because 17:48:49 if you have a cons-pair of the tree 17:48:54 where both the car and cdr were once cons'd 17:48:59 then you have to recurse to call them both. 17:50:39 oklopol: and in C, recursion is very shaky 17:50:42 vey very very shaky 17:51:27 i have no idea what you mean by shake, and i don't see why you'd need recursion. 17:52:05 i do know that's easiest to do via recursion, but it's not hard without it... 17:53:12 if i don't have recursion, then i need to manually keep a stack 17:53:16 which is inefficient 17:53:22 also, by shaky, i mean recursion in C /is a bad idea/ 17:53:26 you never know when it might fuck up 17:56:53 oklopol: question - does your filesystem support > in filenames 17:57:34 i don't see why it might fuck up, but... err... i guess it does? 17:57:45 what's "my filesystem"? 17:58:49 hmm, so basically what you are saying is you don't wanna use a tree-structure for efficiency because a tree-structure cannot be traversed efficiently? 17:59:09 and yes 17:59:16 but if ^ wasn't nearly as common as *, then ... 17:59:24 also, if i recurse in C then the call stack will run out *QUICKLY* 17:59:29 it's bizzare, really 17:59:35 which is why most people avoid recursion in c 17:59:46 really? in my experience you can recurse as much as you like 18:00:47 hmm... 18:00:55 pff 18:01:00 try writing a recursive factorial in C 18:01:03 then do fact(1000) 18:01:08 watch as you segfault 18:01:10 well, not 1000... 18:01:19 but you'll never get a tree that high 18:01:33 oh yes i will 18:01:39 all unlambda programs cons like crazy 18:02:18 OK, tell me more about these programs doing over 10^300 catenations :-) 18:02:40 (assuming perfect balancing, which of course isn't realistic.) 18:03:15 height grows logarithmically, recursiong depth will *not* be a problem, ever. 18:03:21 * oklopol prepares to eat a hat. 18:03:43 you bet: 18:03:45 http://esoteric.voxelperfect.net/wiki/Underload 18:03:49 (()(*))(~:^:S*a~^a~!~*~:(/)S^):^ 18:03:53 that one does infinite conses. 18:04:38 :) 18:04:45 i guess you pwned me bad 18:04:52 yes i did 18:05:15 technicality hats are the best ones 18:05:19 * oklopol takes a bite 18:07:30 mmmmmmm 18:08:58 oklopol: do you think i should have my fancy error messages? 18:09:01 that tell you what went wrong 18:09:09 i could remove all error checking and get super-fast-pwnage programs 18:09:55 error checking is for kids and women! 18:10:24 you could perhaps have both, and like a #define to switch it on/off 18:10:31 in case #define is still cool. 18:10:44 i'd make it a compile-time option 18:10:56 time to rewrite my compiler, I think 18:11:21 HEY, that isn't incremental coding!! 18:11:30 :D 18:11:45 * oklopol kills the heathen 18:12:52 my compiler arch is a bit broken 18:13:29 the problem is: inside a compile, we may need to save some code for later compilation and have the function generated match a name that we can get at the first compile 18:13:32 but they also may depend on others... 18:13:42 right now, it's written in an imperative, global-using type of scheme. :-) 18:16:10 oklopol: and i'm not sure what else i should do 18:18:43 well, currently you are more or less have a c interpreter for underload, and you are just injecting the code 18:18:49 oklopol: no 18:18:52 no i'm not 18:18:52 no? 18:18:54 you are totally wrong 18:18:56 i see 18:19:11 int main(void) { 18:19:11 ul_push(ul_func_0, "(:aSS):aSS"); 18:19:11 ul_call(); 18:19:11 printf("\n"); 18:19:11 return 0; 18:19:12 } 18:19:18 aha, but 18:19:21 ul_func_0 18:19:22 hmmmm 18:19:25 ah! 18:19:26 has that compiled 18:19:29 look 18:19:33 sorry, i didn't look carefully enough. 18:19:42 it's pretty clever :-) 18:19:43 (just looked at main.) 18:19:45 that's an old version of the output though 18:19:58 but yeah i most certainly do compile 18:20:23 oklopol: the thing is ul_func_0 may suddenly need to make a ul_func_1 18:20:27 i have an easy solution to this problem: 18:20:30 pre-parse the code 18:21:37 you indeed do compile it. 18:21:41 quite nice 18:21:44 yes, yes i do 18:21:44 :D 18:21:54 ul_concat is perhaps a little bit cheating, but not really 18:22:10 i still take all the instructions and compile them down to c code that performs those operations natively 18:27:29 -!- pikhq has quit (Read error: 104 (Connection reset by peer)). 18:27:55 my architechture is fucked :P 18:30:09 well, to do * properly, you'd basically need to be able to make machine code at runtime. 18:30:53 exactly :) 18:30:57 so i think mine is a nice trade-off 18:31:00 ooh, wait 18:31:05 i can make an O(1) *! 18:31:10 just add a pointer to 'end' 18:31:12 duuuuuuuh :) 18:31:49 oklopol: now my compiler is truly awesome 18:31:58 -!- pikhq has joined. 18:34:28 pikhq: MY COMPILER CAN HAVE O(1) *. 18:34:35 AS WELL AS TAIL-RECURSIVE ^. 18:34:44 = best underload implementation yet 18:34:49 not a bad idea 18:34:54 the JS one is O(n) *, iirc 18:35:01 dunno, but whatever 18:35:04 it's compiled, too, so yay 18:35:58 now i just have to make the code functional. 18:35:59 :P 18:36:04 functional = non-imperative fubnctional 18:49:48 an underload parser parsing to a list is actually pretty non-trivial 18:49:50 the idea is simple: 18:50:01 ((abc)def)ghi -> 18:50:19 ((1 ghi) (2 def) (abc)) 18:50:24 abc(def)ghi -> 18:50:33 ((abc 1 ghi) (def)) 18:53:00 -!- ais523 has joined. 18:53:11 I saw you were discussing Underload from the logs. How could I not join? 18:54:06 ais523 doesn't come here any more, after proving that the world is upside down and becoming filthy rich because of it :( 18:54:27 * ais523 doesn't come here any more, due to being busy from the fallout... 18:54:37 hahahaha 18:54:42 ais523: I wrote an underload compiler! 18:54:44 It compiles to C. 18:54:55 And it runs all underload programs, and doesn't embed an interpreter. 18:55:04 I'm now rewriting it so it isn't such a mess of hideous code! 18:55:05 Impressive. I just finished posting my bf (without input) to Underload compiler 18:55:14 :D 18:55:39 http://pastebin.ca/847012 18:56:10 * ais523 continues to read the logs 18:57:42 ais523: the main thing is that nested parens have to be unrolled 18:57:49 ((abc)def)ghi -> three functions 18:57:59 with the 'ghi' containing a push of the (abc)def 18:58:03 (abc)def pushing (abc) 18:58:10 and that's ugly in my current compiler 18:58:16 i'm writing a parser that does most of that for me, so. 18:58:18 to answer your question about ^ and *, * is more common, but ^ absolutely has to be tail-recursive so that infinite loops are possible 18:58:20 (it's written in Scheme) 18:58:36 ais523: yep, i KO'd oklopol with that beforehand 18:58:42 and i found a way to make * fast 18:58:46 just keep a ptr to 'end' 18:59:01 i know, ridiculously simple, why didn't i think of it before 18:59:31 How do you deal with memory allocation? 18:59:46 presumably by reallocing the original string if it's too small before copying onto it? 18:59:52 KO'd me? 18:59:54 hmm 19:00:13 and doesn't that leave * as O(n) anyway due to the need to copy each byte of the string that's being copied over 19:00:19 or are you representing strings as linked lists? 19:01:32 ais523: ul_print handles that 19:01:56 are you just referring to bits of the code I can't see or is the source online somewhere? 19:02:14 yes, i am 19:02:33 it cats them and wraps in parens at print-time 19:02:51 so are you using linked lists as strings? 19:03:06 I wrote an interpreter for some language that did that at one point. Can't remember which language, though 19:03:24 no... 19:03:41 when you concat it appends to the linked list 19:03:44 an object is a linked list. 19:03:52 each has a 'str' which is as big as possible at compile time 19:03:55 print prints these out sequentially 19:04:01 linked list of strings is the best of both worlds, I suppose 19:05:21 Underload really needs proper I/O extensions, I reckon, so that it's actually possible to do things like self-interpreters and to make it BF-complete 19:05:30 no no no ais523!!! 19:05:32 if you can do input then ^ 19:05:35 then my compiler can't work 19:05:39 :( 19:05:55 it relies on having all the code that can ever possibly be reached at compile-time 19:06:02 that's why it's so efficient 19:06:16 if you're inputting as Church numerals, then all you need is zero and Church-increment 19:06:17 if you can do input but that makes it un-^able though i guess that's ok :P 19:06:31 which are (!()) and (:)~*(*)* 19:06:38 "if you can do input but that makes it un-^able though i guess that's ok :P" 19:06:40 see that 19:06:45 I saw that 19:06:54 but how else could you determine what it was? 19:07:13 ??? 19:07:16 OTOH, if input is church numerals, then its behaviour on ^ing is defined; it just repeats the TOS the correct number of times 19:07:23 on input: 19:07:25 that's sort of the definition of Church numerals 19:07:27 .evalable=false; 19:07:32 then ^ on it -> BLEEEEP 19:07:52 what operations would be available on it other than cat, then? 19:08:12 none? 19:08:13 that's enough. 19:08:17 the problem with Underload is that everything has to be evaluated to be able to tell what it actually is... 19:08:21 i think... 19:08:23 ah 19:08:27 then ... no input 19:08:30 please! :-) 19:08:35 and there's no point allowing input to a program if all you could do is output it again 19:08:38 actually 19:08:40 do you mean like: 19:08:42 'abc' 19:08:44 is 19:08:47 church numeral for ascii of a 19:08:48 thenb 19:08:50 then c? 19:08:51 that's it 19:08:57 if so, that's good, i can do that without having an interpreter 19:09:06 that's what I'd just realised 19:09:15 But. Yeah. I want my new compiler done first :| 19:09:16 :P 19:09:18 because you can just have a church-numeral function in the code 19:09:20 goddamn parser 19:09:41 that's fine, any input extension would probably be a new language 19:09:52 because it would spoil the beautiful tarpitness 19:11:27 ais523! write my parser for me 19:11:43 I'd better get clear on the spec first, then 19:11:55 and you just know I'll write it in some completely unacceptable language 19:11:58 i understand the spec fine 19:11:59 :P 19:12:05 oh 19:12:05 but I don't... 19:12:07 heh 19:12:09 Write it in scheme! 19:12:12 because my compiler's in scheme! :P 19:12:13 haha 19:12:19 naw i'm sure i can figure it out ;) 19:12:21 I'm not sure if I have a scheme interpreter just here 19:12:35 maybe I should write it in elisp, that shouldn't be too hard to translate from... 19:13:20 now, as for implementing the rest of the Unlambda operations in Underload... 19:13:21 aieee :D 19:13:29 hahaha 19:13:31 `cx 19:13:39 -> simple translations,say bye bye 19:13:43 * ais523 has forgotten what x does 19:14:15 but as for c, all you need to write is something that can save and restore the current stack 19:14:17 er, it doesn't 19:14:22 i meant `cPLACEHOLDER 19:14:25 and yeah 19:14:55 so if you have some way to recognise the bottom of the stack, say by inserting a dummy entry between every stack entry, it shouldn't be too hard 19:15:09 ais523: re: scheme interpreter, I reccomend Chicken Scheme 19:15:14 d may be harder, though, as I find it a bit hard to get my head round 19:15:15 well, it's a compiler. But it includes an interpreter. 19:15:28 http://www.call-with-current-continuation.org/ There are windows binaries, too. 19:15:32 * ais523 is currently using a computer on which they can't install software 19:15:38 aww 19:15:42 why else do you think I'd be using this aeons-old IRC client? 19:15:42 ooh, that inspires me 19:15:47 I should write a scheme in javascript 19:16:27 but first. 19:16:32 make this damn parser 19:17:14 d is actually very hard to translate into reverse-Polish 19:17:27 because you have to know the second argument to ` before determining whether to evaluate the first one... 19:17:48 s/`/^/ 19:17:53 ais523: parse unlambda program, THEN do conversion 19:18:06 ignore everything I just said, I was confused 19:18:23 what you have to do is not to do evaluation while there's a d on top of the stack 19:18:23 :D 19:19:56 not just on top of the stack, what you have to do is not to do evaluating while there's a d anywhere in the stack 19:20:26 but a `promise' is fine to have in the stack, and evaluating it should lazily evaluate the original code 19:22:17 of course, v is easy, it's ((a(:^)*):^) 19:22:43 sorry, that needs a pop... (!(a(:^)*):^) 19:23:22 !ul (is this still working?)S 19:23:27 !ps d 19:23:46 oh, EgoBot isn't here 19:26:36 :D 19:27:20 * ais523 is trying to figure out what happens when a construct like ```kdi`.xi is run through an Unlambda interpreter 19:27:43 the ``kdi translates to d, thus preventing the `.xi being run 19:31:36 OK, when there's a d anywhere in the stack, ~^ should instead do *(~^)*a rather than what it normally does, to preserve the semantics of d 19:31:42 and d itself should be a no-op 19:31:57 correction: when there's a d anywhere in the stack below the top element 19:37:50 ais523: Maybe I should pre-parse some programs first. 19:38:46 the problem is to change subnodes into pointers, by the look of it 19:39:02 that would likely be pretty easy with a parser-generator like yacc 19:40:37 parser-generators are for wimps 19:41:26 ais523: yacc for... scheme. 19:41:28 i seeeeeeeeeeeeeeeeeeeeeeee. 19:41:41 there's probably some version knocking around somewhere 19:41:44 hey, fun idea 19:41:47 indeewd 19:41:51 so fun it must exist 19:42:08 no thanks ais523 19:42:09 :P 19:48:27 ais523: i should write a scheme->underload 19:48:42 possibly easier than unlambda->underload, I suppose... 19:48:57 and easier still than scheme->malbolge 19:55:22 ais523: I mean full scheme 19:55:25 100% R5RS scheme. 19:55:26 :D 19:55:29 well, sans IO 19:55:35 probably harder, in that case 19:55:41 that includes dynamic-wind 19:55:43 dynamic-effing-wind 20:01:29 * ais523 had better go 20:01:33 -!- ais523 has quit. 20:02:30 dmanit 20:02:49 :P 20:24:16 -!- timotiis_ has joined. 20:28:14 -!- bsmntbombdood_ has changed nick to bsmntbombdood. 20:38:56 -!- timotiis has quit (Read error: 110 (Connection timed out)). 20:42:57 -!- Jontte has quit (Remote closed the connection). 21:01:15 -!- Hiato has joined. 21:01:21 Gues who's back :P 21:01:29 you 21:01:37 how'd you know ;) 21:03:36 i've got a crystall ball that tells me everything! 21:04:02 can it solve the halting problem, I've got some code here... :P 21:04:21 at least some very obvious things.. well.. it actually doesn't work with buggy code very well :( 21:04:44 gee, thanks ;) 21:05:56 -!- timotiis_ has changed nick to timotiis. 21:08:38 I wonder if GregorR is even still alive.... 21:11:16 i bet he's been playing hydra for 2 weeks straight and is soon the world champuon 21:11:19 champion 21:11:33 what's Hydra? 21:11:46 depends 21:11:53 when did you first join this channel? 21:12:01 isn't it the IRC thingy 21:12:05 hrmm 21:12:13 november ish 21:12:14 I think 21:12:16 GregorR's card game 21:12:20 oh, I see 21:12:35 but i don't like telling people things they *should've* read from the logs! 21:12:36 it is also an IRC client (or was) 21:12:40 heh 21:12:43 ;) 21:13:01 it's not fair just me and oerjan waste our time doing that :) 21:13:21 or then oerjan just checks for highlights. 21:13:39 haha, no don't worry, I bothered reading yesterday and the day beofre's logs (kinda) beofre I came ;) 21:14:17 i kinda wish i was less addicted to irc 21:14:45 heh, join the club, or should I say IRC channel :P 21:15:27 * oklopol joins #club 21:15:41 roflol :D 21:18:59 I wish I could use Ogre3D ... :( 21:23:52 i joined here sometime in 2006 21:24:01 nov 06? 21:24:03 sounds about right 21:24:15 wow, have i really been here a year? 21:24:20 that can't be right... 21:25:54 -!- GreaseMonkey has joined. 21:26:33 http://it.youtube.com/watch?v=Jd3-eiid-Uw 21:26:44 this guy is a genius :D :D :D 21:26:58 can't wait till games turn like this :D 21:30:52 watch it, please 21:30:56 so that you also go wow 21:30:58 ;) 21:31:11 don't know why it's italian 21:31:17 but hey, who cares :D 21:31:26 (PS: It's in english) 21:32:36 Hiato: that's actually not that hard to do 21:33:02 Awesome, but anyway, it is COOL to do ;) 21:33:18 can't wait until Crytek incorporates this ) or valve or whoever :P 21:33:26 if you have a way to do 3d graphics, you will have a virtual camera direction vector and position anyway 21:33:48 so you basically just have to set the virtual cam to move as the real cam moves 21:33:52 yes, but the idea of tracking a players head makes it that much more interesting 21:34:02 yes, I understand how it works 21:34:11 I would just like to see it in commercial games 21:34:15 that's all ;) 21:34:29 yeah, it's awesome 21:34:48 i wouldn't like seeing it in commercial games, since it'd just suck like every other game. 21:35:07 i'd like to see it in a game i've made myself 21:35:11 say waa? I like my games :) 21:35:14 Yeah 21:35:15 have i mentioned my games are awesome 21:35:32 that would be nice, but the camera code in Irrlicht is so screwy, It would never work... 21:35:37 oh, really.. 21:35:39 :P 21:35:50 My game is pretty much grouned 21:36:07 shuuure 21:36:12 until I re-write the camera object, which will probably never happen... 21:37:17 you do games? 21:37:53 Yes, I do. Making 2D ones in delphi, I have done a lot. But 3D ones, with Irrlicht 21:37:57 is very difficult 21:38:03 because my C group sucks 21:38:15 and I also don't like the C group of languages 21:38:20 in terms of playing 21:38:28 I'm a serious gamer :D 21:56:44 -!- Hiato has left (?). 22:12:25 -!- jix has quit ("CommandQ"). 23:02:40 stack-based lambda calculus: 23:02:52 (:`)(:`)` 23:03:28 0 = (<) 23:03:54 1 = ((`)) 23:05:25 ehird`: Nice. 23:06:47 hm 23:06:50 with currying, it's hard 23:07:03 essentially the stack becomes useless. 23:08:02 pikhq: since you're alive: 23:08:08 can you name a few languages that people haven't compiled yet? 23:08:28 e.g. when i compiled underload, most people would give it a cursory glance and say that a compiler would be impossible 23:08:30 because of ^ and * and a 23:08:38 i want something like that so i can prove them wrong :D 23:09:58 Dimensifuck. 23:13:03 link 23:14:29 ooh i know what i should do 23:14:35 write a Brainhype interpreter in Scheme-omega! 23:15:43 -!- timotiis has quit ("leaving"). 23:22:59 pikhq: Dimensifuck= 23:23:14 ah 23:23:17 you made it 23:23:18 :) 23:23:41 hm pikhq that makes no sense 23:23:41 :) 23:26:39 :D 23:38:06 there should be an esolang X which has a 'wimpmode' X-1. X reads a program, constructs a number from how 'line-noise/random-typing' the program looks, then uses that as a godel number for an X-1 program, which is then run. 23:39:29 I like. 23:40:27 :D 23:40:28 pikhq: Comment, alive person! 23:40:47 Um, that's fuckin' *evil*? 23:40:49 Good, go write a spec. 23:41:08 Yes, I know it's evil that I'm making you do my labours. 23:41:19 But I didn't ask for your opinion, spec-writing slave! 23:42:24 pikhq: I am writing a Glass->C compiler. 23:42:36 Now Glass can run faster than ever! 23:42:54 Try a Glass->C++ compiler. Might be easier. 23:45:10 pikhq: But even better, of course, since it optimizes away the base classes. 23:45:10 pikhq: Think it'd be worth writing it in Glass? Might be a bit painful :P 23:45:43 Glass is actually not that painful. 23:45:53 It's *remarkably* terse, but fairly feature-filled. 23:46:13 C++ is evil 23:46:20 C is far cooler to compile to, also :D 23:46:28 pikhq: I guess, but for the parser... 23:47:07 pikhq: Are there any glass programs apart from beer/bf/fibonacci/hello_world/rand? 23:47:24 Ask Gregor. 23:47:34 GregorR: Ask. 23:47:55 There is an upside to writing the compiler in glass: metacircularness 23:49:26 pikhq: Even so, parsing Glass isn't like your typical trivial esolang... 23:49:42 Plus I'd have to write parsetree objects.. 23:50:27 pikhq: OK, you decide for me. :P Should I write the compiler in Glass or something else? 23:50:50 The term is "self-hosting". 23:51:47 Glass. 23:52:12 pikhq: Actually I object to the term 'self-hosting' 23:52:20 it implies that you 'stack up' compilers 23:52:22 whereas it's more like tail recursion. 23:52:30 Then you object to computer science. 23:52:31 pikhq: Got a glass-mode.el? :P 23:52:35 Nope. 23:52:40 If you have one, please let me know. 23:52:44 :p 23:53:04 Hell, a plof-mode.el would be damned spiffy. 23:53:07 pikhq: Yeah, so maybe I do. 23:53:22 pikhq: Oh, I still have to write Calculus/pebble.bfm don't I? 23:53:39 If you're insane, yes. 23:53:45 (you sure may. ;)) 23:54:14 pikhq: When I write pebble.bfm, should I write the C backend or the BF backend first? 23:54:47 Either one; your choice. 23:54:57 Although the BF backend is certainly amusing. 23:55:09 'amusing'? More like 'the main use' 23:55:18 True, true. 23:55:24 You can see it seeping through every part of PEBBLE, from the tempvars to everything else 23:55:43 The C backend is basically just a really fancy Brainfuck optimiser. ;) 23:57:17 exactly 23:57:25 you can use PFUCK for that if you desire 23:57:32 actually I might make an ultra-PFUCK sometime 23:57:47 that has many backends (i guess: C, machine code, and for laughs PEBBLE) and optimizes to hell :P 23:57:58 just for the novelty of having it be brainfuck 23:58:12 and also for compiling itself to brainfuck, then uncompiling that to PEBBLE with itself 23:58:13 :D 23:59:46 Oh by the way, pikhq, does the reference Glass interpreter gc?