00:00:02 oklohot, but C++ template's type system (metatypes, basically) can't even handle SKSK 00:00:05 but i'm not sure about that, just assuming because of what recursion does 00:00:07 because it has no polymorphism, afaik 00:00:21 and ski of course depends on recursion for tcness 00:00:28 strongly typed ski is strongly normalizing 00:00:41 oerjan, yes, but Haskell's can do some basic things like SKSK 00:00:53 C++'s can't, because the arguments are VERY strong.. 00:00:55 e.g. 00:00:59 the first argument of K must be a type 00:01:02 not a template 00:01:08 so SKSK is invalid 00:01:19 ic 00:01:51 ```SKSK ? 00:02:26 oklohot, yes 00:02:46 oerjan, yeah, it's "typename a->typename b->typename a" 00:02:48 not "a->b->a" 00:04:16 Omg 00:04:19 no template typedefs in gcc 00:04:26 anyone know of a compiler that isn't a toy? ;) 00:06:20 ghc ;) 00:08:21 oerjan, C++->haskell makes me weep ;) 00:08:40 especially since it's possible - haskell's type system is TC with ghc extensions 00:09:45 C++ templates automatically translated into haskell <3 00:09:53 it would be so ugly it would be beautiful 00:10:25 olsner, in to haskell type-system metaprogramming actually 00:10:28 but thats more practical 00:10:31 the languages are similar 00:14:26 oklohot, doing C++ template cons 00:16:16 hehe 00:16:50 i would like seeing an automatic tm -> c++-template 00:17:09 i've just seen that one paper which says "it can be seen it can be done for any tm" 00:17:26 but doesn't actually prove it, or show an automatization 00:19:57 automatic tm -> c++-template? 00:20:04 An interpreter? 00:21:01 add parens around (tm -> c++ template) 00:21:19 anyway, i mean, just an automatic translation 00:21:31 Oh. 00:21:38 oklohot, http://www.blogblog.com/no897/corner_main.gif 00:21:39 err 00:21:44 http://osl.iu.edu/~tveldhui/papers/2003/turing.pdf 00:22:23 well yeah, that's what i meant 00:22:45 that's just making one translation, and saying one can see it's trivial to do for any tm 00:23:04 it's not an automatic translator 00:24:43 The original Love Machine 9000 was supposed to just be a big program that converted the input into a C program 00:24:58 But C being the scourge of the earth, I dropped the idea and went to Python. 00:25:45 THE C-MAN MACHINE 9000 00:26:21 do it 00:26:21 now 00:29:36 D: 00:30:07 Well, since my main problem was extending the memory when it was full, I suppose I could just drop that idea and just add 36000 cells or something. 00:30:38 And I could just do a Post machine. 00:31:00 you could just double the size if you run out of mem or something 00:31:10 and in any case, that's a trivial prob 00:31:28 of course, the trivial ones are the ones one doesn't really want to have to solve 00:31:34 Yes, probably. But then again, that would require me to know how to use those memory commands 00:31:55 Remember that I'm a terrible programmer D:. 00:32:22 there's like 3 of them, and everyone here can help you 00:32:53 Well, let's get that Dev C++ thingy back. 00:33:04 thazz the spirit! 00:33:21 And write a Post machine - C translator :o 00:33:32 Slereah, malloc(size) - maek something 'size' bytes, return it 00:33:41 I know of this. 00:33:43 free(x) - im done with this (always do after you malloc) 00:33:49 I could never make it work in class. 00:33:56 realloc(x, size) - i dont have enough xness, give me size isntead 00:33:59 Slereah, classes are c++ 00:34:00 not c 00:34:10 oh 00:34:10 class 00:34:11 i see 00:34:13 *rimshot* 00:34:15 Slereah, well, basically 00:34:17 malloc(X) 00:34:20 is of type T * 00:34:21 wow @ Tree 00:34:25 where T can be anything 00:34:28 wonderful idea 00:34:36 malloc(sizeof(T)*N) 00:34:37 And with realloc, it's important to remember that x can move; I think that's quite a common problem. 00:34:39 gives you space for N Ts 00:34:53 Slereah: btw, if you do C++, you don't even have to understand the memory stuff, necessarily 00:35:11 Yes, I know there's the self-resizing array vector thing. 00:35:22 But that's when I read about it that I gave up on C. 00:35:38 So it's just going to be an array limited in size right now. 00:35:45 -!- oerjan has quit ("Good night"). 00:36:01 well, just put all array operations behind procedure calls, and you can just add this later. 00:36:17 or behind a class interface, in the case of C++ 00:37:02 My idea was along the line of writing up something simple, since it's almost 2AM. 00:37:21 Possibly not even use a folding function :o 00:37:35 whuzzat? 00:37:42 oklohot, fold=reduce 00:38:16 I don't know. But in math, the folding function is a N -> Z function. 00:38:37 That way, it's infinite instead of half 00:38:48 But if I use a limited array, I'm not gonna bother. 00:41:29 When they say C++ template, what are they refering to exactly? 00:41:36 C++ without the libraries? 00:49:05 ehird: i assumed he meant something else cuz it was c++ 00:49:16 Slereah, No 00:49:27 Slereah, C++ templates are kind of parametized types 00:49:31 But turing-complete 00:49:31 Slereah: teh typal systemization 00:49:38 Basically it's a kind-of macro language 00:49:41 but turing complete 00:49:44 and operates on types 00:49:45 This doesn't look good for me. 00:49:48 so instead of being a macro language over text 00:49:50 its a macro language over types 00:49:52 well yeah parametrisized typides 00:49:52 Slereah, Yeah, no kidding 00:49:55 You won't need it 00:50:02 Apart from STL 00:50:05 Slereah, std::vector 00:50:11 that's an instance of std::vector with the parameter 'int' 00:50:15 it means a vector of ints. 00:50:19 std::vector is a template. 00:50:28 that's all you'll need o know 00:50:30 *to 00:50:30 but 00:50:32 i suggest C 00:50:39 It would be nice if they gave us an actual class on C. 00:51:30 Slereah, It's not easy to teach! 00:51:34 I suggest buying the K&R book 00:51:37 The C Programming Language 00:51:45 After all, they made the language. They're pretty good with it. 00:52:00 that's not necessarily true 00:52:06 i'm not any good at languages i made up 00:52:07 Heh. 00:52:18 i usually pwn at my own languages :) 00:52:22 I have it somewhere. 00:52:22 south park time! 00:52:23 -> 00:52:36 oklohot, bye bye :) 00:52:38 But from what I've read so far, it's what I already know. 00:52:38 lament, hehe 00:52:43 Slereah, Hardly! 00:52:45 -!- timotiis has joined. 00:52:46 It teaches almost all of C. 00:52:48 Wait, we're already tuesday? 00:52:51 Holy dick. 00:53:01 I mean. 00:53:03 Wait 00:53:08 What's the word. 00:53:13 Damn English. 00:53:22 Thursday. 00:53:45 I'd better get on the leeching chan, to DOWNLOAD IT ILLEGALY. 00:53:51 I mean, download it legally. 00:54:41 -!- GregorR-L has joined. 00:55:03 According to Mr Twig, the episode's not for two hours. 00:55:12 What are you really doing, OkloLIAR 00:55:55 -!- timotiis_ has joined. 00:55:58 wtf is Esco? 00:56:04 lament, an injoke 00:56:18 -!- timotiis_ has quit (Client Quit). 00:56:32 it looks vaguely serious 00:57:30 wow, it's written in C++ too 00:58:13 lament, its vaguely serious but crap 00:58:20 Esco is an esoteric interpreter for a variety of languages! 00:58:25 Slereah, win 00:58:28 Such as Brainfuck, Ook, Spoon... 00:58:39 HAHA 00:59:36 seems pretty misguided 01:00:09 I'm all for it if he writes the interpreter for my Andrei Machine 9000. 01:00:53 Now I have to remember how file handling works on C. 01:18:07 -!- ehird has quit (Read error: 113 (No route to host)). 01:23:41 * pikhq mutters about that being fucking insane. 01:24:16 wot? 02:02:11 -!- timotiis has quit (Read error: 110 (Connection timed out)). 02:12:58 -!- GregorR-L has quit ("Leaving"). 02:25:06 Slereah: i have all sp episodes on my hd 02:26:02 Same here. 02:26:24 Plus, they're all available on mr twig and the south park official website :o 02:26:37 oh 02:26:44 didn't know 02:27:02 They recently put all of them on south park studios 02:27:03 i've seen them, all like 5 times though, so i think i'm okay 02:27:15 good use of comma there 02:27:18 nice work 02:37:36 -!- oklohot has quit (Read error: 104 (Connection reset by peer)). 02:37:54 -!- oklopol has joined. 04:14:05 -!- Slereah_ has joined. 04:32:22 -!- Slereah has quit (Read error: 110 (Connection timed out)). 04:38:58 G'night all 04:42:13 -!- Sgeo has quit ("G'night"). 06:16:37 -!- calamari has joined. 06:17:29 hi 06:20:32 irc'ing from telnet :P 06:22:32 I guess I'd better join another chan.. dunno if anyone seme or not 06:23:23 -!- calamari_ has joined. 06:23:35 test 06:23:42 ahh ok it is working :) 06:36:03 -!- calamari has quit. 06:40:04 -!- calamari_ has changed nick to calamari. 07:12:54 -!- calamari has quit ("Leaving"). 07:53:18 -!- oklohot has joined. 07:59:01 -!- oklopol has quit (Read error: 113 (No route to host)). 07:59:59 -!- clog has quit (ended). 08:00:00 -!- clog has joined. 08:06:30 -!- oklopol has joined. 08:06:50 <: <<:> <<:> <:>>> <<> <> <>> > 08:06:52 --- 08:06:54 <: <<:> <<:> <:>>> ><<> <> <>>< > 08:06:56 ==> <: <<:> <<:> <:>>> <> <> <> > 08:06:58 --- 08:07:03 <: <<:> <<:> <:>>> >><<> <> <>><< > 08:07:04 ==> <: <<:> <<:> <:>>> ><> <> <>< > 08:07:06 ==> <<: <<:> <<:> <:>>> <> > <: <<:> <<:> <:>>> <> > <: <<:> <<:> <:>>> <> >> 08:07:08 using negative lists to do *map* 08:07:10 in nopol 08:07:14 actual syntax 08:07:39 if someone can deduce the semantics of negative lists from that, i shall bow deep enough to blow myself 08:09:11 -!- Iskr has joined. 08:09:28 nopol is based on explicit tree rewriting, computationally 08:09:48 basically, that you have to provide the rewrites as you go 08:10:00 as normal lists of two elements, 08:10:16 <:[.:]* denotes a variable> 08:10:21 hi Iskr, you new? 08:10:27 quite 08:12:00 -!- oklohot has quit (Read error: 110 (Connection timed out)). 08:13:19 Iskr: some nopol for you too http://www.vjn.fi/pb/p334263666.txt 08:13:52 ehm thanks 08:13:58 very ermeti 08:13:59 c 08:14:00 =) 08:14:09 look at the list <<> <> <>>, and pay attention to the following two expressions 08:14:22 it is first subtracted a layer of depth 08:14:31 rendering it in the upper scope 08:15:12 in the last part, you can see it uppified twice, and it jumps toplevel, spreading its elements one by one in the place where it used to be 08:15:34 so we can implement a generic map just like that 08:19:44 -!- GreaseMonkey has joined. 08:21:44 mh ok 08:21:58 :) 08:22:19 i smell overwhelming interest 08:22:55 GreaseMonkey: you interested in negative lists? 08:23:16 'lo 08:23:22 erm... what would that be? 08:23:55 oklopol, i must say i'm curious about esoteric languages but i'm quite not able to understand them 08:23:59 it's not your fault =) 08:25:17 negating the list containing a, b and c inside "<<> < > <>>": <<> >>< ><< <>> ===> <<<> <>> <<> <>> <<> <>>> 08:25:29 we kinda flip it inside out 08:26:19 >...< means unnest the list ..., <...> means nest it one level 08:27:04 so if a contains < >, < >a< > would be < > 08:27:25 because it's lifted into the upper scope 08:27:32 now double-lift 08:27:55 if a contains < >, < >>a<< > would be << > < > < >> 08:29:00 >>>a<<< would lift up from an even deeper list, but it cannot be done here, because we don't see the surrounding program 08:29:08 nopol has a fun way of escaping contexts 08:29:28 where's that ehird when you need him 09:17:21 -!- oklohot has joined. 09:18:24 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 09:26:26 -!- oklohot has changed nick to oklopol. 10:02:49 -!- jix has joined. 10:27:55 -!- GreaseMonkey has quit ("Unisex."). 10:59:09 -!- oklopol has quit ("( www.nnscript.com :: NoNameScript 4.2 :: www.regroup-esports.com )"). 12:05:46 -!- oklopol has joined. 13:28:33 -!- Sgeo has joined. 14:07:35 -!- timotiis has joined. 14:13:33 Bye all. 14:13:47 I'll be back barring any tragic accidents. 14:14:54 -!- Sgeo has quit ("Bye all."). 14:44:24 -!- ehird has joined. 14:44:36 oklopol, i haev totally pwned j00 14:44:41 i used the dis module to get oklotalk bytecode 14:44:42 MWAHAHAHA 14:44:44 er. 14:44:44 yes. 14:46:26 oklopol, btw i cant 'import parsing' 14:46:28 AttributeError: 'module' object has no attribute 'set_functions' 14:46:38 or even run it with -i 14:46:52 seems that objects.pyc is the problem 14:50:46 oklopol, okloping 14:54:37 Wow. I just generated the hugerest error ever from a c++ compiler. 15:06:48 -!- Slereah_ has quit (Read error: 104 (Connection reset by peer)). 15:13:54 -!- jix has quit (Read error: 113 (No route to host)). 15:15:29 ehird: good for ya 15:17:40 oklopol, well, fix it 15:17:43 i want to use the modules 15:17:54 wut 15:18:20 well in case for some reason you cannot get the bytecode, why should i care? :o 15:18:44 oklopol, because i want to use the modules 15:18:47 but 'objects' won't import 15:18:50 it gives an error 15:18:55 so everything importing objects fails too 15:18:59 the cli works though 15:19:14 well how the fuck is that possible 15:20:29 can you use Runner? 15:20:35 that's all you need to be able to use 15:21:02 yes, oklopol 15:21:04 but i want to use the parser 15:21:09 i mean 15:21:13 i can get the runne 15:21:17 then grab its copy of parsing 15:21:19 but that's weird 15:21:33 haha 15:21:37 :P 15:21:45 well, i have no idea how that could be possible 15:22:28 import oklotalk ; p = oklotalk.parsing 15:22:28 :D 15:22:40 whut's lbd, btw 15:22:44 that works, but import parsing doesn't? 15:23:13 oklopol, bingo 15:23:17 Wait no 15:23:19 import parsing WORKS now 15:23:20 WTF 15:23:22 xD 15:23:23 okay 15:23:27 oklopol, 'import parsing; ...' doesn't work 15:23:31 'import oklotalk; import parsing; ...' DOES 15:23:43 oklopol, do you use 'set_functions' anywhere in yoru code? 15:24:02 hmm 15:24:10 what does import parsing say? 15:24:18 File "C:\Users\oklopol\Documents\pythonal\oklotalk\objects.py", line 548, in 15:24:18 AttributeError: 'module' object has no attribute 'set_functions' 15:24:48 oh 15:24:49 hmm 15:25:34 i have functions.set_functions(dyn_vrs) 15:25:40 in objects 15:25:49 this is quite fun 15:25:55 >>> import functions 15:25:55 Traceback (most recent call last): 15:25:55 File "", line 1, in 15:25:55 File "C:\Users\oklopol\Documents\pythonal\oklotalk\functions.py", line 4, in 15:25:55 File "C:\Users\oklopol\Documents\pythonal\oklotalk\objects.py", line 548, in 15:25:56 AttributeError: 'module' object has no attribute 'set_functions' 15:25:58 have no idea why this happens 15:26:00 oklopol, oh lawd, is 'dat sum circular dependency? 15:26:06 functions uses objects 15:26:09 but objects uses functions 15:27:13 a lot of circular dependsncy 15:27:15 *dependency 15:27:25 in oklotalk.py, i do a reload an all modules 15:27:27 is that is? 15:27:34 oklopol, probably 15:27:43 have you submitted it yet? gimme the source and let me fix it :P 15:27:48 oh no 15:28:07 and i could fix it myself if i care even the teensiest bit 15:28:08 :D 15:28:13 *cared 15:28:51 there is no reason why i'd want people importing parsing 15:28:59 oklopol, yeah -- I want to write an oklotalk compiler 15:29:02 maybe even oklotalk->c 15:29:08 surely that would be a good use 15:29:26 sounds like fun 15:29:35 but, well, the parsing is trivial :o 15:29:43 oklopol, yeah but mine is broken 15:29:53 hmmhmm 15:30:09 well i say have fun fixing, is that okay? :P 15:30:17 oklopol, no :P 15:30:19 damn 15:30:24 oklopol, oh and should i add compile-time stuff 15:30:25 like 15:30:38 (~ (+ 2 2)) 15:30:40 is evaluated at compile time 15:30:44 and then '4' is put in its place 15:30:58 go for it 15:31:40 oklopol, untuplify=?? 15:31:44 :) 15:32:01 what about untuplification? :) 15:32:17 whut does it do 15:32:25 :DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD 15:32:30 good enough answer? 15:32:35 so 15:32:39 oklopol, you're an unhelpful bastard 15:32:42 :D 15:32:50 oh, well, i'll retry 15:32:54 basically 15:33:04 for some reason, i have no idea why, i first parse into tuples 15:33:11 something like sexps, but python lists 15:33:15 then 15:33:33 i have a separate untuplification phase to put stuff in Apl's and Lst's etc 15:34:42 my ways to implement stuff are usually completely random, it was only after i'd made it i realized there is no use for the intermediary step 15:34:55 it's more verbose, more error prone and... well fucking ugly 15:36:56 oklopol, ok but to write a compiler i want the tuple form 15:36:58 don't i 15:37:03 well 15:37:05 perhaps 15:37:06 :D 15:37:29 it's pretty simple too 15:37:38 btw. what was wrong with your parsing? 15:38:08 or was it simply too awesome and imploded 15:38:09 :o 15:38:25 or was it just the comments, i mean 15:38:44 because you can always just have a separate comment-removal stage 15:42:19 oklopol, it was a few things 15:42:31 but my oko->c is gonna be so awesome 15:42:41 oklopol, real oklotalk will be so awesome won't it 15:42:49 i mean it'll come with an interpreter and a compiler and all sorts of things 15:42:51 right? <__< 15:43:27 oklopol, btw, is there actually a complete okoprogram written? 15:43:51 a program in oklotalk? 15:44:06 the only "program" is the one quicksorting rational 15:44:06 s 15:44:55 there's a few (trivial) additions i need in order to actually make the imperative part a bit more rational (also a few less trivial ones) 15:45:12 but after that i'll prolly make something to test it 15:46:39 oh, right! 15:46:43 i almost forgot 15:46:52 oklopol, i mean one that does outn and stuff 15:46:53 ehird: did you read the logs? i invented negative lists! 15:47:09 oklopol, i was there 15:47:11 but answer me :P 15:47:17 (i had only actually invented uplevel lists, or "zero depth lists" before) 15:47:22 you were there? 15:47:23 oh 15:47:50 oh 15:47:50 like, interaction with the user etc? 15:47:51 i don't have anything for that 15:48:07 i've usually had all my interaction in the program source :) 15:48:24 mainly, ofc, because i usually write programs for myself exclusively :D 15:48:30 anyway 15:48:55 oklopol, i think i'll just try (outn "hello world") 15:49:00 hehe 15:49:06 hmm, oklotalk cli might be fun 15:49:17 i mean, in oklotalk naturally 15:49:30 ehird: did you understand how i did map with a negative list? 15:49:51 it's really the only useful thing i can think of yet :D 15:50:00 but it's kinda neat, anyway 15:50:25 No I wasn't there for all of it oklopol 15:50:37 oh 15:50:39 also, oklotalk doesnt have eval does it? 15:50:44 no. 15:50:48 but trivial addition ofc 15:51:04 perhaps an interface to both run() and Runner() 15:51:26 oklopol, right, don't add it just yet 15:51:31 i want to be able to generate small executablse 15:51:32 :D 15:51:33 okay, why? 15:51:36 feel free to write oko-in-oko though 15:51:39 haha 15:51:41 'cause if you do that 15:51:44 then you have oko-in-c 15:51:45 well 15:51:49 that would be fucking awesome 15:51:52 oklopol, and oko-in-oko is much nicer than oko-in-c amirite ;) 15:52:04 yeah. 15:52:34 so you calling oklotalk oko? 15:52:59 wonder if i should change the official suffix to that 15:53:04 i've been using ot 15:54:31 oklopol, .ot is a good extension 15:54:37 but oko is a good name for referring to oklotalk 15:54:41 sure 15:55:31 oklopol, so, my thing is really tupletree->C 15:55:36 or should it be untuplified->c 15:56:24 dunno, dunno... 15:56:50 how compilatious a compilation are you going to make? 15:57:01 the semantics aren't exactly compilation-friendly 15:57:20 oklopol, pretty much totally 15:57:24 oklopol, and how aren't they? 15:57:29 it's a pretty regular message-sending language 15:58:59 i guess 15:59:15 oklopol, but yeah which form 15:59:40 you cannot access the code or the ast at runtime atm, so i guess it's not that bad yet 15:59:48 which form? 15:59:49 oklopol, also, is 'outn' special cased or do strings respond to outn 15:59:55 and, tuplified or untuplified 16:00:07 outn is a function on strings 16:00:14 err 16:00:18 oklopol, there are no functions 16:00:19 just a function 16:00:23 :) 16:00:28 well it's not an atom 16:00:30 it's a thing 16:00:33 oklopol, outn IS an atom 16:00:35 i just tested 16:00:47 well 16:00:49 in fact 16:00:52 it is not. 16:00:53 so shoudln't (outn "abc") send $outn to "abc"? 16:01:01 it does not 16:01:04 it is not an atom 16:01:07 -!- jix has joined. 16:01:35 oklopol, :| 16:01:40 currently, there is no $str for standard string representations, but primitive funcs do it. 16:01:54 well 16:01:55 oklopol, why not make outn a message? 16:02:01 then things can define how they should be printed 16:02:04 and $str is just a stringio-thingy 16:02:05 having that would basically just mean to add a line of code to outn :D 16:02:28 hmm... i prefer outn to ask for $str 16:02:41 oklopol, ah, but that fails on infinite lists 16:02:44 and similar 16:02:47 and is also slower 16:03:45 fails on infinite lists in oklotalk-- 16:03:47 not oklotalk 16:04:10 where's that ehird when you need him 16:04:13 we have a special bond <3 16:04:15 xD 16:04:17 hehe :P 16:04:23 BUT YEAH 16:04:26 untuplified or ... tuplified 16:04:46 well i figured you might be willing to take the minute to see how negative lists worked.รถ 16:04:58 yeah i don't get them 16:05:00 thinking about it tho 16:05:15 i explain it a few times, try reading 16:05:22 it's basically 16:05:46 hmm 16:05:51 not that trivial to explain.. 16:06:35 oklopol, also, name my intermediate compilation stage 16:06:46 the point is, that a negative list L is converted to a list of its context (surrounding lists) multiplied into lists that are like the original ones, but where L was, one element of it is 16:06:47 I'm thinking OKINTERMEDIATE 16:06:47 hmm 16:07:14 especially with that capitalization, i'd say that's perfect 16:07:19 yes 16:08:39 < ((< >)) > ==> < ( ) > ==> << > < > < >> 16:08:42 oklopol, my ide ais that: 16:08:46 where () is the negative list syntax 16:08:51 {(-> a a)} 16:08:54 -!- timotiis has quit (Read error: 110 (Connection timed out)). 16:08:54 in OKINTERMEDIATE 16:08:56 it something like 16:08:58 *is 16:09:02 it's actually >...<, but that's just to make it more confusing, ofc :) 16:09:09 hmm 16:09:30 [('thing',('match',('atom',0),('atom',0)), ('name','a')] 16:09:31 or something 16:09:45 i don't know, it just tries to make it something more malleable to C 16:10:14 'atom',0 ? 16:10:18 the zeroth atom? 16:10:21 oklopol, yeah 16:10:24 and the rest of the list is the atoms 16:10:28 oklopol, because, there is only one $a 16:10:33 otherwise you'd do loads of allocatering 16:10:41 yeah, there's just one 16:11:12 oklopol, okotypes: 16:11:22 atom, thing, int, string 16:11:25 missed any? 16:11:47 well if you wanna separate built-in types, list..? 16:11:54 ah yes 16:11:59 oklopol, atom,thing,int,string,list 16:12:11 your rtf says thats right 16:12:24 yarr 16:12:34 oklopol, so i need 3 bits on a pointer 16:12:34 Read That, Fucker! 16:13:12 000=integer, 001=string, 010=list, 011=atom, 100=thing 16:13:45 oklopol, the base data type is 'OKO' 16:13:46 :DD 16:14:19 0x0C0 16:14:38 haha, oklopol 16:15:02 oklopol, I love tags in pointers 16:15:03 #define TAG_OF(x) ((x)&4) 16:15:15 #define VAL_OF(x) ((x)>>3) 16:15:26 also my tagging macro is ENTAG 16:15:46 #define ENTAG(x,t) (((x)<<3)+(t)) 16:16:01 why 4 16:16:28 oklopol, 4 types 16:16:31 000...100 16:16:34 so 4 = 111 16:16:36 so 16:16:37 so not 7? 16:16:39 4 = 00000000000000111 16:16:46 so, 4 will extract the tag 16:16:50 4 = 0b100, actually. 16:16:56 fizzie, yeah yeah 16:17:01 oklopol, the tag is stored in the lowest 3 bits of the poitner 16:17:07 so perhaps 7? 16:17:12 why 7? 16:17:15 well 16:17:16 umm 16:17:24 Because 7 = 0b111? 16:17:27 dunno, just don't see.. why 4 16:17:37 why not 111 so you get them three lowest thingularities 16:17:38 oklopol, int,string,list,atom,thing 16:17:43 0=int 16:17:44 1=string 16:17:44 well 16:17:45 2=list 16:17:47 3=atom 16:17:48 4=thing 16:17:59 TAG_OF returns either 4 or 0 16:18:04 oklopol, no it doesn't 16:18:04 so you have two kinds of tags. 16:18:07 okay 16:18:08 you are wrong 16:18:10 x&4 extracts one bit: the third-lowest. It's not physically possible for x&4 to have more than two values. 16:18:12 oklopol, & is bitwise 16:18:17 then the universe has changed since yesterday 16:18:21 fizzie, Err, you're right 16:18:21 i'm pretty sure 16:18:22 &7 16:18:24 :D sorry 16:18:28 but oklopol is still wrong 16:18:29 so perhaps 7? 16:18:37 yes 16:18:40 okay 16:18:42 good 16:18:46 was jsut wondering about the 4 16:18:48 *just 16:18:58 ((("foo")<<3)+(3)) /* this is how an atom "foo" is initialized in the header - expanded from ENTAG("foo",tag_atm) :DDDDD */ 16:19:04 how was i wrong? 16:19:22 oklopol, acknowledge that <<3 on a literal string is awesome 16:19:43 i agree 16:19:49 but how was i wrong? 16:20:09 dunno 16:20:21 template.c:17: error: invalid operands to binary << 16:20:23 stupid fucker 16:20:25 need a cast 16:20:27 so i was right, but you want to feed my paranoia? 16:20:54 #define ENTAG(x,t) ((OKO)((((int)x)<<3)+(t))) 16:20:56 Uh.. you're also shifting out the topmost three bits of the pointer; if they happen to be nonzero, VAL_OF will not recover it. 16:20:59 :DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDd 16:21:11 fizzie, Yes, there's nothing you can do about that with type tags in the pointer. 16:21:37 apparently, 16:21:38 Typically you just align all pointers to a multiple of 8 or so, and use x&~7 to extract the value. 16:21:38 OKO atm_0 = ((OKO)((((int)"foo")<<3)+(tag_atm))); 16:21:41 Not shifts. 16:21:43 is not valid because it's not constant :(( 16:21:49 fizzie, Haven't seen that done. 16:21:56 Example for ENTAG,TAG_OF,VAL_OF? 16:22:16 I WAS NOT WRONG 16:22:19 ENTAG being x|tag, TAG_OF being x&7 and VAL_OF being x&~7. 16:22:28 * oklopol starts tearing stuff apart and turns green 16:22:31 fizzie, Do I need to do anything special or will that Just Work? 16:23:41 Well, you need to have all your x's aligned so that the three lowest bits are always zero. And those were for types where the value is a pointer. 16:24:13 If you want to stick an "immediate" (n-3)-bit value in there, you'll of course want to use shifts. 16:25:04 fizzie, WELL, I do believe I need to think of a better stratergy. 16:25:21 oh you low-level geeks 16:25:30 fizzie, http://www.accesscom.com/~darius/hacks/ichbins.tar.gz This compiler is what I stole the tagging from! 16:25:37 just open python 16:25:40 and forget about it 16:26:02 static Tag get_tag (obj x) { return 3 & x; } 16:26:03 static obj entag (Tag tag, unsigned value) 16:26:03 { return tag | (value << 2); } 16:26:10 and untag is an assert then x>>2 16:28:35 Well, there it works, since the "pointers" are indices to that 512*1024-sized 'heap' array, so they have lots of zero high bits. 16:28:40 binary stuff is so sexy 16:29:02 fizzie, Would you consider that a practical implementation strategy? 16:29:05 Doesn't seem like it to me. 16:29:08 i need to leave now, have fun 16:29:11 But I do need a heap if I want to gc.. 16:29:13 -> 16:29:13 oklopol, bye :) 16:29:17 bies! 16:29:32 fizzie, Any reccomendations? 16:29:42 Ah wait a second! 16:33:11 fizzie, Hmm, no. need suggestions 16:37:57 fizzie, OK 16:37:59 I have an idea 16:38:05 We only use the very lowest bit 16:38:08 1 - immediate 16:38:09 0 - pointer 16:38:16 no wait 16:38:17 ok 16:38:21 every odd number is immediate 16:38:24 every even one pointer 16:38:30 If pointer, the rest of the thing is a pointer to the tag. 16:38:34 Then +1 is the data. 16:38:38 Otherwise, the tag is the tag. 16:39:11 -!- Sgeo[College] has joined. 16:40:49 Hi all 16:40:50 Well, yes; from what I've seen, it's quite "traditional" to do tagged pointers so that one of the tag values is reserved to pointers to structures that contain first the type, then the value. 16:41:04 fizzie, Yeah. I can't figure out a good way to do all this, though. 16:41:21 like, tagging a literal "string" 16:43:18 -!- oklohot has joined. 16:43:44 OKO test = &(struct STRING){TAG_STR, 0, 0, "hello"}; 16:43:47 getting there 16:43:52 oklohot, hello 16:44:32 Well, I've seen it done with a two-member struct, where the first member is the type label, and the second one is an union of values of all possible types. 16:45:09 fizzie, Yes, but that sucks for immediates. 16:45:55 If you're not C99-averse, given enum type { type_string, type_blob, type_foo }; struct obj { enum type t; union { char *v_string; blob *v_blob; foo *v_foo; } v; } you can have literals like (struct obj){ .t = type_string, .v.v_string = "foo" } 16:46:33 Or maybe it has to be { .t = type_string, .v = { .v_string = "foo" }}. Not quite sure, haven't used the syntax much. 16:47:32 fizzie, I'm pretty C99-averse. 16:47:33 However 16:47:36 union BASE_CAST {OKO o; struct BASE b;}; 16:47:46 int main() {return ((((union BASE_CAST)(test)).b).t);} 16:47:48 that actually works 16:47:49 :D 16:47:52 I love union casts 16:48:02 Err wait 16:48:03 it doesn't work 16:48:05 Dmanit. 16:48:18 OH 16:48:18 of course 16:50:04 Well, structure/union literals are pretty C99-only. Of course it's a GCC extension too. 16:50:13 fizzie, Can't find a simple solution to tag both structures, strings and integers. 16:50:14 Sigh. 16:52:57 -!- oklopol has quit (Connection timed out). 16:54:08 fizzie, Beh 16:58:44 I'm not sure if it's really much of a problem not being able to have literals of other types than the ints. So one could go with the simple way of doing (v<<1)|1 to construct an integer, x&1 to test if it's an integer or a pointer-to-a-labeled-struct, x>>1 to extract an integer and a simple cast to get a usable pointer for the other types. 16:59:22 fizzie, Well, atoms are constant things. 16:59:31 There's only a string because it's nice to be able to print 'em. 17:02:28 fizzie, :| 17:07:48 -!- oklohot has quit (No route to host). 17:23:16 fizzie, I'm concentrating on more interesting things 17:23:20 like oklotalk->OKINTERMEDIATE 17:23:23 which is the step before ->C 17:23:30 it basically removes all nested structure from the code 17:23:37 dividing it into code, atoms and functions 17:23:41 so it is essentially stack based 17:23:55 its the most work of the compiler 17:28:11 Be back soon all 17:28:15 -!- Sgeo[College] has quit ("http://www.mibbit.com ajax IRC Client"). 17:32:19 -!- Sgeo[College] has joined. 17:32:25 back 17:35:29 :)test 17:35:32 -!- oklopol has joined. 17:35:36 Hiok 17:37:21 oklopol, you're back! 17:37:24 $hello is equiv. to "hello" 17:37:28 is that intentional 17:37:37 hello is ('var','hello') 17:37:42 $hello and "hello" are ('str','hello') 17:39:31 what do you mean they are equivalent 17:39:35 oklopol, same parse tree 17:39:41 $hello is ('atm',"hello") 17:39:51 no its not 17:39:54 >>> parsing.parse("$asd") 17:39:54 ('lbd', [('atm', 'asd')]) 17:39:54 >>> parsing.parse("\"asd\"") 17:39:54 ('lbd', [('str', 'asd')]) 17:40:00 o wait 17:40:02 ur rite. 17:40:04 :p 17:40:07 okay 17:40:07 oklopol, okay, are strings immutable? 17:40:13 yeah 17:40:18 oklopol, will they always be 17:40:24 hmm 17:40:25 no 17:40:36 hmm 17:40:37 oklopol, okay 17:40:40 they will be in oklotalk-- 17:40:44 oklopol, i can't cache them anyway 17:40:45 oklopol, but 17:40:46 but... it's not that simple in oklotalk 17:40:53 oklopol, you can't create atoms at runtime right? 17:40:57 no 17:41:01 you cannot 17:41:01 (but obviously you can strings) 17:41:05 oklopol, good. i hope it stays like that 17:41:06 yeah 17:41:12 it will stay like that 17:41:15 i hope too 17:41:16 'cause i statically allocate all atoms right now 17:41:20 oklopol, okintermediate is going quite well 17:41:22 yeah, yeah 17:42:44 oklopol, 17:42:44 ({(outn "hello") (-> $hello 2) (-> x x)} $hello) 17:42:49 it can compile that save for the (-> ...) 17:43:11 to what? 17:44:38 oklopol, to OKINTERMEDIATE 17:45:31 oklopol, hmm, dunno how to handle matches 17:45:31 because 17:45:34 (-> X ...) 17:45:35 the X there 17:45:38 requires AST at runtime 17:45:43 oklopol, because it's not oklotalk, the X, it's a DSL 17:45:45 right? 17:45:53 -!- timotiis has joined. 17:46:37 dsl? 17:46:43 oklopol, domain specific language 17:46:45 it's a mini-language 17:46:47 embedded in oklotalk 17:46:49 ah 17:46:50 for pattern matching 17:46:50 well kinda. 17:46:51 yes 17:47:03 oklopol, (: (: a b) (: c d)) 17:47:04 i think 17:47:06 i can compile that to 17:47:18 a b : c d : : 17:47:20 (in stack form) 17:47:29 where all the calls are.. 17:47:30 hmm 17:47:32 this needs thinking 17:47:42 oklopol, right now 17:47:43 in 17:47:44 (a b c) 17:47:45 i compile to 17:47:48 b c a 17:47:49 well 17:47:52 b c a CALL 17:48:00 oklopol, but i should just do 'a b c CALL' shouldn't i 17:48:05 i was just thinking, since a is what I dispatch on.. 17:48:05 prolly 17:48:37 currently, the dispatching rules are very stupid, and i could just do (func arg arg) 17:48:59 which is why i'm not very interested in another oklotalk-- implementation :P 17:49:07 but i guess that one can be extended just as well. 17:49:39 oklopol, why aren't you very interested? 17:49:40 i mean 17:49:42 i made a cons cell 17:49:43 but what about 17:49:50 'ehird liked it so much he made a compiler to C' 17:49:50 :D 17:49:54 :D 17:50:01 oklopol, also, you have to admit that oklotalk-- IS okolicious 17:50:06 :) 17:50:17 it's nice, but i want the oklotakl dispatch rules... 17:50:20 *oklotalk 17:50:48 oklopol, well, we can dothat 17:50:52 ONCE MY COMPILER IS DONE 17:50:52 but i'm just too lazy to implement myself (prolly like half an hour of coding), and too stubborn to tell you what they are before i've made them 17:50:53 :DDD 17:50:55 :) 17:51:02 hey, MY compiler will be open source 17:51:02 ;)) 17:51:18 oklopol, pattern matches only appear in -> right 17:51:59 oklopol, hmm wait, 2-argument calls to listification, but you don't know which arguments to list until you find out which one 'wants' to do it, right? 17:54:12 yes 17:54:30 oklopol, soo 17:54:31 in (a b) 17:54:33 i compile to 17:54:36 b a CALL1 17:54:39 in (a b c) 17:54:40 i compile to 17:54:50 b c a CALL2 17:54:55 oklopol, does that look right to you? 17:55:04 sure 17:55:08 i do 17:55:17 yeah, that's fine 17:55:18 oklopol, because the first thing you try to dispatch on is the first arg right? 17:55:30 hmm wait, the first thing you try in (a b c) is tell 'a' to 'b' 17:55:34 err no 17:55:36 (a b c): 17:55:37 yeah you can do rpn conversion with oklotalk-- 17:55:39 tell 'a' to [b c] 17:55:41 in oklotalk, it's impossible 17:55:43 tell 'b' to [a c] 17:55:46 tell 'c' to [a b] 17:55:49 oklopol, is that right? 17:55:58 the language is basically designed so that no one can compile it :) 17:56:00 hmm 17:56:12 umm 17:56:19 you don't do that last one at all, yet 17:56:26 there was a reason... don't remember what 17:56:47 oklopol, so 17:56:48 (a b c) 17:56:50 tell 'a' to [b c] 17:56:53 tell 'b' to [a c] 17:56:55 return $f 17:56:57 but the dispatch rules are really retarded. 17:57:01 yes 17:57:02 oklopol, is that the right rules? 17:57:03 okay 17:57:04 umm 17:57:06 actually 17:57:09 oh wait 17:57:15 in case both are atoms 17:57:16 oklopol, return $f is just return the last telling 17:57:17 return a 17:57:18 which 17:57:19 oh 17:57:19 okay 17:57:21 oklopol, so 17:57:27 what is both 17:57:28 a b and c 17:57:30 or a and b 17:57:31 or .. 17:57:33 c is not checked 17:57:36 just a and b 17:57:55 oklopol, okay 17:57:56 SO 17:58:00 oh wait 17:58:07 oklopol, so (a b c) is just (a [b c]) 17:58:08 although what you described there will be done once the rules are made a bit cleverer 17:58:08 wait no 17:58:09 that's wrong 17:58:13 okay 17:58:14 right 17:58:16 think i've got it 17:58:18 oklopol, verify these two: 17:58:38 (a b) => if 'a' and 'b' are atoms, return a. Otherwise, tell 'a' to 'b'. If that fails, return $f. 17:58:59 (a b c) => if 'a' and 'b' are atoms, return a. Oherwise, tell 'a' to [b c]. If that fails, tell 'b' to [a c]. If that fails, return $f. 17:59:07 oklopol, What about ({2} $foo) 17:59:11 instead of $f that should be 2 right? 17:59:20 So... the $f behaviour is just (->) returning $f on fail. 17:59:27 almost, except you try both (a b) and (b a) 17:59:38 as in lisp application 17:59:58 err 17:59:59 i mean 18:00:08 the notation was lisp, call a with b, then b with a 18:00:11 oklopol, okay 18:00:21 oklopol, am i right abut the {2} thing 18:00:25 yes 18:00:28 it should be 2 18:00:42 oklopol, so no expressions, as in {}, is $f 18:00:47 and (-> a ...), when failing, returns $f 18:00:52 no! 18:00:58 okay whut 18:01:01 last evaluated expression is returned 18:01:05 oklopol, yes 18:01:11 and (->a ...) returns $f on failure 18:01:12 (->) just changed the path of evaluation 18:01:13 so if it's the last expr 18:01:17 it returns $f 18:01:29 nope! $f is just the expected return value 18:01:41 so if ->'s fail, the function does nothing, and thus return$f 18:01:45 *returns $f 18:01:45 :: ({(-> $foo 2) 3} $a) 18:01:45 3 18:01:45 :: ({(-> $foo 2) 3} $foo) 18:01:45 2 18:01:49 oklopol, you are sooo wrong 18:01:50 see? :D 18:02:01 ..? 18:02:05 where did it return $f 18:02:26 oklopol, nowhere, see? 18:02:26 wait 18:02:26 here's what i'm saying 18:02:27 hmmhmm 18:02:32 i'm prolly misunderstanding you bad. 18:02:39 (-> a ...) means 'if a matches, break through evaluation and force a return of ... - if it fails, evaluate to $f' 18:02:49 {...} means 'return the value of the last expr evaluated' 18:03:02 so if your match is the last expr and fails, that results in $f being returned 18:03:11 and that's why $f is the call failure 18:03:19 asadasdad 18:03:23 wait 18:04:03 -!- oktabot has joined. 18:04:21 oklopol, i tested this in the cli 18:04:38 :: ({_ (-> [] 0)} 5) 18:04:38 5 18:04:41 . 18:04:58 if i understood what you mean, $f should've been returned 18:05:23 *meant 18:05:51 also the cli may be a bit outdated, although no crucial features have been changed (i think) 18:06:18 i think i'll get on nopol now :o 18:07:20 oklopol, ok, (->) is confusing 18:07:25 well 18:07:26 no. 18:07:38 you just think of it as an uplevel expression 18:07:48 where in fact you should be thinking about it as something that redirects program flow 18:08:10 oklopol, let me rephrase, -> is hard to compile 18:08:10 :-) 18:08:19 :=) 18:08:22 that may be 18:09:22 oklopol, okay, i can think of it in a kind of rewriting sense 18:09:29 okay, nopol parsing, god it's sick 18:09:38 perhaps even sicker than the negative lists themselves 18:09:41 if the match succeeds, -> does act as an uplevel expression, and forces the uplevel to return its blah blah blah 18:09:42 i mean... 18:09:48 it the match FAILS, -> *disappears* 18:09:52 < ><> <>< ><> <>< > 18:09:53 i.e. like it was never in the source code 18:09:56 right, oklopol? 18:09:58 hmm 18:10:09 yes 18:10:12 oklopol, it means that your example reducse to ({_} 5) 18:10:17 yes 18:10:20 and if the match succeeded, then the 'last expr is returned' kicks in 18:10:25 anyway, yes, nopol 18:10:28 is nopol compileable? 18:10:34 hmm :\ 18:10:42 have no idea... it's basically tree rewriting 18:10:42 but 18:10:57 oklopol, 18:11:01 tree rewriting can be used for lc quite easily 18:11:06 Opening test.ot... 18:11:06 Parsing code... 18:11:06 ('lbd', [[('lbd', [('var', '_'), [('var', '->'), ('lst', []), ('int', 0)]]), ('int', 5)]]) 18:11:06 Compiling to OKINTERMEDIATE... 18:11:06 koed: [('lbd', 0)] 18:11:07 atoms: ['_'] 18:11:09 funcs: [[('int', 5), ('lbd', 1), ('call1',)], [('var', 0), ('lbd', 2), ('PLACEHOLDERFORMATCHINGEXPR',), ('match', None)], [('int', 0)]] 18:11:13 oklopol, that's what it does for ({_ (-> [] 0)} 5) 18:11:22 as soon as i get that placeholder fixed, should work well 18:11:23 :))0 18:11:29 oklopol, can you see how it 'flattens' it out? 18:11:34 ('lbd',x) refers to the xth element in funcs 18:11:35 but i was wondering if one would be able to do *continuations* with tree rewriting + negative lists :o 18:11:37 hmm 18:11:45 'var'/'atm' like that for the atoms list 18:12:02 oklopol, oh 18:12:07 and the reason there's an extra func 18:12:10 is that (-> a b c d) 18:12:11 turns into 18:12:17 -!- RedDak has joined. 18:12:17 {b c d} a -> 18:12:26 sure 18:12:42 oklopol, that probably messes up bare (->) :-)))) 18:12:53 but -> anywhere but in the root of {} is invalid, right oklopol ? 18:12:54 hmmm 18:13:03 oh no :) 18:13:13 :DSDSDSDDD 18:13:44 oklopol, damnit 18:13:45 ->'s expression args are evaluated as normal uplevel statements. 18:13:45 why not 18:13:46 :((( 18:14:20 it's not just pattern matching, it's s unification of pattern matching and imperative program flow 18:14:26 it contains "blocks" 18:14:45 oklopol, yes but what's wrong with (->) being invalid anywhere but in {} 18:14:47 this will all be so much clearer when oklotalk appears in all its glory. 18:14:50 umm 18:14:54 just (->) ? 18:14:58 or a ->-expression 18:15:26 oklopol, ->-expression 18:15:49 _ can be reset for explicit pattern matching, and it's not bad practise to do that 18:15:56 (look at cise for elegant uses of that!) 18:16:02 oklopol, hmm can you use oklotalk-- in patterns 18:16:03 like 18:16:12 (-> (: a {(-> $foo $bar)}) ...) 18:16:17 or similar obscenities 18:16:31 oklopol, and doesn't that mean you need to be able to find out whether an expr is a pattern matcher or a regular expr?? 18:16:41 if a pattern match on an application should fail, the application is evaluated. 18:17:06 pattern match on application == [$pb $stuff]... 18:17:22 oklopol, :(((((( that means i can't compile it easily 18:17:29 well 18:17:31 i have to compile everything in a patmatch as both a pattern and an expr 18:17:38 as i said, it's not a very compilable language 18:17:53 and it's exactly the pattern matching that made me quit 18:18:33 well, tbh i wasn't really trying, i more realized it might be better first to make a stupid implementation using just python 18:18:46 oklopol, got any ideas for compiling it properly? 18:18:48 current idea: 18:18:54 PATMACH(foo) || (compiled) 18:18:56 but that's dumb 18:18:56 :P 18:20:19 ummum, i think i'll compile it properly in my own implementation whenever i feel like doing that :) 18:20:23 but no... i can't help you 18:20:28 hmmhmm 18:20:42 the prob is 18:21:13 it's decided at runtime whether an application is evaluated, and checked for equality, or whether it's used to split the obj 18:21:55 oklopol, yus... 18:22:06 oklopol, also, what about 18:22:13 (: a (... some function call...)) 18:22:19 is the funcall evaluated if it isn't a pattern amtch? 18:22:22 if so, very hard 18:23:29 normal recursive matching 18:23:40 oklopol, hm explain 18:23:45 the object matched is split on :, left part matched on a, right part on that function ll 18:23:46 call 18:23:54 the function call can be, for instance, another split 18:24:12 we are basically doing reverse function calls here 18:25:13 oklopol, crappity -- i could compile this apart from the pattern 18:25:21 well I could compile it but it'd be ugly 18:26:15 well yeah, pmatching is the hard part 18:26:31 wel 18:26:32 well 18:26:42 was trivial done the way i did it, ofc 18:27:04 but it is hard to do if you want to do it, well, compiled-like 18:27:46 oklopol, ok, give me something more interesting to do than compile oklotalk 18:28:13 is it my responsibility to come up with stuff to do for ya? ;) 18:28:55 whhhell, you can compile nopol... because programs do absolutely nothing, the least we can do is make them fast!! 18:28:55 -!- lament has quit ("Ducks!"). 18:29:03 ducks. 18:29:32 oklopol, hmm, nopol.. 18:29:34 introduce me 18:30:19 semantics aren't ready yet 18:30:24 but i have some stuff 18:30:31 for instance, the negative list thingie 18:30:33 that's for nopol 18:30:55 oklopol, I don't get negative lists. 18:30:58 there's still some semantics unclear on cartesian products when you have multiple negative lists on the same level and suchamathing.... 18:30:59 hmmhmm 18:31:02 Explain it in words of four letters or less. 18:31:07 :) 18:31:10 let's try 18:31:25 so you take the list that is neg 18:31:28 and call it L 18:31:46 negd lsts have a dpth 18:31:52 hmm 18:31:53 oklopol, you are so cheating 18:31:53 :D 18:31:56 but 18:31:56 ;) 18:31:57 whats a depth 18:31:59 okay 18:32:00 how does it relate to this 18:32:02 well 18:32:08 18:32:13 a is 1 deep 18:32:18 so the list's depth is 1 18:32:23 oklopol, so .. it's a list of length 1 18:32:23 :| 18:32:26 a is 0 deep in "a", on the other hand 18:32:38 ok 18:32:42 and it's 2 deep in <> 18:32:45 -!- RedDak has quit ("Killed (NickServ (Comando GHOST usato da DIO))"). 18:33:02 what this means is we have kinda taken the whole it lives in, and deepened it 18:33:04 oklopol, OK continue 18:33:04 now 18:33:09 if we have the list 18:33:20 and we put it in the middle of 18:33:26 we get y> 18:33:37 yes, yes we do 18:33:40 now, unnesting the list, or lifting it 18:33:42 we get 18:33:45 18:33:50 this would be a list of depth 0 18:33:53 oklopol, yes 18:33:58 it can jump out of the slot given 18:34:01 and expand in the same list 18:34:13 now, let's see how negative depth lists behave 18:34:15 -!- timotiis has quit (Read error: 110 (Connection timed out)). 18:34:21 we start with y> 18:34:28 lift abc up once 18:34:34 to get 18:34:57 -!- Sgeo[College] has quit ("http://www.mibbit.com ajax IRC Client"). 18:35:05 now, when we further lift it up (we would have lost context at this point, so we have to do both lifts simultaneously ofc, but this is just demonstration) 18:35:27 we get 18:35:40 < > 18:36:05 oklopol, weird 18:36:09 kind of like a hybrid zip 18:36:12 the idea is, the if certain elements are atop others surrounding them, they need to somehow surround those elements without jumping out of the list 18:36:23 so i imagined the correct thing to do would be to me something like this 18:36:28 also 18:36:38 turned out there's at least one thing it can do 18:36:42 the map function 18:36:44 quite neatly 18:37:00 oklopol, ok, now what about negative length lists 18:37:01 :DDD 18:37:06 :D 18:37:13 well, i've thought about adding those too 18:37:27 but... well, i haven't have an epiphany about those :P 18:37:39 perhaps my next walk to the uni will tell me how they work. 18:37:46 currently, my problem is parsing 18:37:54 oklopol, i will help tlel you how they work 18:37:55 because 18:37:57 it's unhard! 18:38:03 so, we first need a notation 18:38:09 i'll just go with it 18:38:09 i want >...< to be the neglist syntax :))))) 18:38:17 oklopol, ok, watch this: 18:38:21 and... well... you see how that becomes a problem 18:38:23 (a b c) is a list of length 3 18:38:34 () is a list of length 0 18:38:48 {} is a list of length 0 too because there's no -0 18:38:49 but 18:38:52 {a} is a list of length -1 18:38:54 {a b c} -3 18:38:58 oklopol, with me so far? 18:39:00 sure 18:39:05 ok 18:39:06 now 18:39:14 (a b c) + (d e f) = (a b c d e f) 18:39:25 {a b c} + (d e f) = () 18:39:36 {a b c} + {d e f} = {a b c d e f} 18:39:37 hm... 18:39:44 i disagree. 18:39:48 {a b c} + (d e f g h) = (a b c) 18:39:55 oklopol, think of them as their lengths 18:39:59 -3+5=2 18:40:16 explain last one 18:40:26 i mean 18:40:27 correct 18:40:51 oklopol, yeah 18:40:56 -!- lament has joined. 18:40:57 -3 + 5 = 2 18:40:59 i interpret that as 18:41:03 'we bring 2 things from the -3' 18:41:05 err 18:41:07 so that shoudl be 18:41:08 (a b) 18:41:12 {a b c} + (d e f g h) = (a b) 18:41:33 the problem is substraction without the possibility of failure for ordered tuples isn't all that intuitive. 18:41:39 oklopol, (d e f g h) + {a b c} = (d e) 18:41:45 i don't think this is the optimal way 18:41:46 because concatenation isn't concatenative 18:41:51 that's how i interpret the length arithmetic 18:41:55 oklopol, ok, come up with a better way 18:42:34 perhaps at some point 18:42:34 but 18:42:44 right now i'm going to concentrate on negative depth 18:42:47 hmmhmm 18:43:02 i need two types of lists, evaluated ones, and non-evaluated onees 18:43:03 *ones 18:43:18 so, perhaps <:...> could be negative 18:43:27 oklopol, i seriously can't figure out negative-length lists 18:43:30 <>:. is the nopol charset 18:43:30 i need halp :D 18:43:47 (my favorite characters in ascii) 18:44:02 :< 18:44:10 oklopol: lbd,var,str,int,atm, and lists which are calls 18:44:17 oklopol, that is the oklotalk-- tag-set 18:44:18 right? 18:44:21 (in your parsetree) 18:44:25 i'd say so 18:44:40 lst 18:44:42 also 18:46:42 -- >...< = <-...>, clearer neglist syntax 18:46:43 <> <> <> == <> <> <> 18:46:43 < >< >< > == < <-> <-> > 18:47:09 i have no idea what whitespace semantics are 18:47:19 they're just kinda intuitive 18:47:20 well 18:47:29 i have some idea, but i don't know exactly 18:49:26 oklopol, does oklotalk-- have runtime errors? 18:49:37 i.e. non-syntax 18:49:40 my implementation has some 18:49:50 but they are implementation defects 18:49:52 it shouldn't have 18:50:02 before continuations that is 18:50:27 oklopol, which ones 18:50:37 hmmhmm 18:50:43 :: (* "asd" "asd") 18:50:44 f 18:50:50 i'll check src 18:51:18 else: 18:51:18 raise "This should've been caught at parsing, IMO." 18:51:20 xD 18:51:33 if len(ptrn.val)>0 and ptrn.val[0]==Atm("any"): 18:51:33 if not isinstance(ptrn.val[1],Lst): 18:51:33 raise "$any should always have a list as the second expression." 18:51:38 so 18:51:52 :: (-> [$any $thing]) 18:51:53 -!- oktabot has quit (Remote closed the connection). 18:51:59 :D 18:52:01 eh 18:52:08 don't i catch anymore 18:52:12 oklopol, ok, since i'm using your parser, i will prepare for runtime errors 18:52:17 won't trigger them right now though 18:52:38 ERROR ot(int p, OKO *r) {...} 18:52:38 or 18:52:45 OKO ot(int p, ERROR *e) {...} 18:52:47 oklopol, which? :P 18:52:51 usage of both: 18:53:09 OKO r; if (ot(0, &r) != OK) { error } else { use value in r } 18:53:09 OR 18:53:12 -!- oktabot has joined. 18:53:14 :: (-> [$any $thing]) 18:53:25 ERROR e; OKO r = ot(0, &e); if (e.. 18:53:25 okay 18:53:29 i prefer the latter 18:53:46 hmm 18:53:51 yeah 18:53:52 letter 18:53:54 i think 18:53:55 lutter 18:54:47 lol. 18:54:58 i'm raising strings as exceptions, even though it's deprecated 18:55:04 and i'm catching exceptions. 18:57:35 okay, should work now, but the ghost will never die. 19:00:15 oktabot, question 19:00:23 should i convert oklotalk functions to c functions 19:00:27 or put them in one big function 19:00:36 ot(funcid, ref-to-result) 19:00:37 dunno... 19:00:39 instead of 19:00:42 ot_funcid(ref-to-result) 19:00:47 yarr 19:00:50 well 19:00:53 hmm 19:00:56 dunno :D 19:05:30 oklopol, :D 19:05:49 oklopol, wanna see it so far? 19:06:23 oklopol, http://rafb.net/p/NnBcX448.html a lot of the stuff there is just WRONG or placeholder, but still 19:07:18 looks like fun 19:07:38 oklopol, you can see the okint there 19:07:43 give it a try on some code 19:07:50 you should see it mostly 'flatten out' 19:08:14 NEVER! 19:08:20 perhaps after going to the shop 19:08:25 i need something to eat 19:08:41 -!- jix has quit (Nick collision from services.). 19:08:51 -!- jix has joined. 19:18:21 hehe, i have a fun brain 19:18:33 thought about nopol for like an hour here 19:18:37 no idea how to do the parsing 19:18:45 then i go to the shop 19:18:50 and it's all clear :D 19:19:59 if a bracket *can* close the last opened bracket, then it will, if it is not separated by whitespace from the last token 19:20:04 otherwise it will open 19:20:26 this is like 10 lines of code with : and . 19:20:29 yay 19:20:43 i think i've deserved my south park time 19:21:59 oklopol, hmm, 19:22:04 do i need to have a var of the last evaluated expr? 19:22:04 i think yes 19:22:18 for e.g. matching 19:22:20 whuddyamean? 19:23:11 oklopol, like 19:23:13 a b c 19:23:15 at 'a' 19:23:17 last = $f 19:23:17 at 'b' 19:23:18 last = a 19:23:20 at 'c' 19:23:21 last = b 19:23:35 oklopol, so like matches, at the end of their compiled stuff, do 'return last;' 19:24:07 oh wait cool 19:24:09 its stack based 19:24:11 so i don't haev to 19:25:13 oklopol, http://rafb.net/p/VLqSCG93.html 19:25:16 prototype of compiler output 19:25:21 oklopol, i think my matching sematnics are ok 19:25:28 ignore the fact that i don't push the match-expr there 19:26:13 oklopol, obviously MATCHES pops the matching expr 19:26:17 so if it fails, it's like it wasn't there 19:26:46 looks about right 19:27:12 oklopol, need to handle no-expr = $f though 19:27:19 oklopol, anyway are you interested in this? if not i might stop 19:27:20 :-) 19:27:34 sure i am 19:27:42 oklopol, you said you weren't that interested in another ot-- 19:27:47 well 19:27:57 dunno :D 19:28:09 different kind of not interested x 19:28:10 xD 19:28:51 i'm gonna make a compiler later anyway, never hurts to have competition 19:28:56 oklopol, okay 19:29:05 oklopol, show me my cons/nil plz? 19:29:07 want a bigger thing to test on 19:29:17 also turned out my nopol parsing semantics WERE NOT PERFECT :|| 19:29:22 okay. 19:29:28 wait-o 19:29:56 http://www.vjn.fi/pb/p244334413.txt 19:29:59 extract 19:34:17 oklopol, i wish you could force strings to prettyprint with "doublequotes" 19:34:18 in python 19:39:26 oklopol, bah, this is boring right now 19:42:17 oklopol, negative length lists 19:43:21 mmhmm? 19:44:19 oklopol, explain them 19:44:19 :P 19:44:31 i don't know anything about negative length :D 19:44:48 all i can think of is negative *sets* 19:45:22 hmm 19:45:39 actually multisets where objects can be stored negative times. 19:45:50 basically, a mapping from objects to their amounts 19:45:59 oklopol, negative length! think about it :P 19:46:05 :) 19:48:40 oklopol, :( 19:50:51 oklopol, i'll be back in like. an hour 19:50:56 okily 19:59:05 <>< <> <> <> ><> <>< ><> === <<-> <> <> <> <- <> <>> <->> 19:59:23 the parsing system simply didn't do what i wanted 19:59:28 i need to rethink :< 19:59:31 asasdasda 20:01:35 ah 20:01:49 another source of ambiguity, that was the reason 20:01:56 well, wasn't really a surprise 20:38:56 < >< <> <> <> ><> < >< ><> 20:38:56 (+ (-) (+) (+) (+) (-)) (+ (-) (-)) 20:39:21 works, but making the syntax less ambiguous also made it less intuitive 20:39:29 but, i think that's a good thing. 20:39:37 less ambiguous? i mean unambiguous 20:49:58 -!- RedDak has joined. 21:04:55 -!- Iskr has quit ("Leaving"). 21:10:45 -!- Tritonio_ has joined. 21:49:10 back oklopol 21:49:35 oklopol, make it depend on whitespace 21:51:37 so 21:51:38 < >< <> <> <> ><> < >< ><> 21:51:43 is 21:52:20 (+ (-) (+) (+) (+) (-)) (+ (-) .. something) 21:52:29 hmm 21:52:31 oklopol, that is intuitive. 21:53:39 oklopol, well 21:53:42 it should be 21:53:53 (+ (-) (+) (+) (+) (-)) (+ (-)) (+) 21:53:55 oklopol, so almost 21:58:24 oklopol, :D 22:00:56 -!- oklohot has joined. 22:02:08 oklohot, hi 22:02:12 -!- oklopol has quit (Read error: 104 (Connection reset by peer)). 22:03:59 oklohot, hi 22:12:05 oklohot, 22:16:41 oklohot, okoping 22:29:24 oklohot, ok 22:39:06 ping 22:45:12 -!- kwertii has joined. 22:47:28 -!- RedDak has quit (Read error: 104 (Connection reset by peer)). 22:48:12 -!- timotiis has joined. 23:05:09 oklohot, 23:16:20 -!- timotiis has quit (Connection reset by peer). 23:16:35 oklohot, 23:18:06 DOOD MY NEW TSHIRT RULES 23:18:10 IT RAWX UR HAUS 23:18:33 DONT U WISH U HAD IT?! U SO DO SO BUY IT http://www.cafepress.com/bizarregeek.250445859 23:18:34 :P 23:21:40 http://content.cafepress.com/products/additional_photos/152_c6_1.jpg 23:21:41 http://content.cafepress.com/products/additional_photos/152_c6_1.jpg 23:21:41 http://content.cafepress.com/products/additional_photos/152_c6_1.jpg 23:21:41 http://content.cafepress.com/products/additional_photos/152_c6_1.jpg 23:21:42 http://content.cafepress.com/products/additional_photos/152_c6_1.jpg 23:21:42 http://content.cafepress.com/products/additional_photos/152_c6_1.jpg 23:21:43 http://content.cafepress.com/products/additional_photos/152_c6_1.jpg 23:22:11 wtf 23:22:22 * GregorR agrees. 23:22:30 -!- jix has quit ("CommandQ"). 23:23:46 shrug 23:24:57 Was that your way of declaring that you bought seven? 23:33:46 -!- timotiis has joined. 23:38:01 GregorR, Haha 23:47:27 GregorR, I just found it funny 23:47:36 It would have ben better if I could have actually included the image into my message. 23:47:44 But alas I don't think IRC allows that ;) 23:48:18 That ... doesn't really explain the 7x post. 23:51:05 GregorR, Just imagine a page full of that image. 23:51:09 Well, I find it funny. 23:51:39 ... wow. 23:55:53 GregorR, My sense of humour is ... unique.