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