devyn changed the topic of #elliottcable to: a super duper cult :)
prophile has quit [Quit: The Game]
<vigs> ELLIOTTCABLE: yes?
<vigs> you pung? 17 hours ago? :P
Willox has joined #elliottcable
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
<devyn> vigs: pang?
<vigs> pynged?
<devyn> pongopponged?
<vigs> polongobolongadodongoliad
<joelteon> i finally fixed something
Willox has quit [Quit: Connection closed for inactivity]
alexgordon has quit [Quit: Textual IRC Client: www.textualapp.com]
oldskirt_ has quit [Quit: gone]
oldskirt has joined #elliottcable
eligrey has quit [Quit: because of elliottcable]
prophile has joined #elliottcable
gozala has quit [Quit: Connection closed for inactivity]
nuck has quit [Ping timeout: 250 seconds]
nuck has joined #elliottcable
prophile has quit [Quit: The Game]
prophile has joined #elliottcable
prophile has quit [Client Quit]
prophile has joined #elliottcable
prophile has quit [Client Quit]
prophile has joined #elliottcable
prophile has quit [Quit: The Game]
<ELLIOTTCABLE> hi
<purr> ELLIOTTCABLE: hi!
<ELLIOTTCABLE> vigs: hi
<ELLIOTTCABLE> ‘pung’
<ELLIOTTCABLE> excellent
<ELLIOTTCABLE> Cheery: huh?
<ELLIOTTCABLE> devyn: ye old pyng
<Cheery> ELLIOTTCABLE: well I can show you this:
<ELLIOTTCABLE> idk python.
<ELLIOTTCABLE> ruby guy here.
<ELLIOTTCABLE> also, you keep linking me comment-less, undocumented code, in a language I don't know, on a *subject* I don't understand, without any description of what you're telling me to look at :P
<ELLIOTTCABLE> you forget I'm dumb!
<Cheery> I keep doing that yeah, sorry.
<Cheery> lets start over.
oldskirt_ has joined #elliottcable
oldskirt_ has joined #elliottcable
<Cheery> I started doing an LR(1) parser before weekend.
<Cheery> canonical LR. People used to do LALR because canonical LR tables grow large.
<Cheery> I'll see how large they can get.
<Cheery> I wrote a new tokenizer for my language just small while ago
<Cheery> it's not space sensitive anymore, because that would increase amount of stupid rules
oldskirt has quit [Ping timeout: 250 seconds]
<Cheery> sums -> sums space plus space term
<Cheery> sums -> sums plus term
<Cheery> or even space_sums
<Cheery> I'll remove the form () ->
<Cheery> as well.
<Cheery> replacin it with: act arguments
<Cheery> and act arguments return value
<ELLIOTTCABLE> LR(1)?
<ELLIOTTCABLE> I'm sure I could google it, but just sayin', define your terms if you're not in a setting where everybody's guaranteed to know what you mean. (=
<Cheery> bottom up, left to right parsing with one lookahead t oken
<ELLIOTTCABLE> also, I think we covered this briefly a while back, but,
<ELLIOTTCABLE> do you have any interesting semantic goals, or are you purely investigating syntax / parser?
<Cheery> your turn. what is an interesting semantic goal?
<ELLIOTTCABLE> new paradigms, new thought-processes, new ways to ease developers' brain-loads for a specific kind of task;
<ELLIOTTCABLE> new target markets previously left unfulfilled, new niches of productivity,
<ELLIOTTCABLE> ‘semantics:’ anything that isn't syntax :P
<Cheery> by accident I may have hit something interesting like that, but I was merely investigating.
<Cheery> sometime week back then, I tried to write a transcompiler. I called it axbattler.
<Cheery> transcompiler from axbattler to C
<ELLIOTTCABLE> transpiler <from what> <to what>
<ELLIOTTCABLE> axbattler?
<Cheery> character in golden axe game
<ELLIOTTCABLE> no, I mean, still not sure what the <from what> is, in your transpiler :D
<Cheery> there is a sample of axbattler code taht I got running
<ELLIOTTCABLE> That's the compiled C?
<Cheery> sort of like C, without header files, with type inference.
<ELLIOTTCABLE> or, hm, `hello` is untyped, that's not legal, is it? so, if I understand, `axbattler` is your new syntax for C.
<ELLIOTTCABLE> gotcha
<Cheery> so I made a tokenizer for this language quite quickly. it's not very different to what I had.
<Cheery> but the parser itself. it consists of functions like: parse_expr()
<Cheery> takes a lookahead token and advances through until it has finished parsing.
<Cheery> parsing produces the actual structures with methods that I'm working from. Those end up directly transcompiled to C.
<Cheery> it made the compiling lot simpler, and I wouldn't have structures that do not parse but neither produce syntax errors.
<ELLIOTTCABLE> super-fucking-useful:
<Cheery> s/do not parse/do not interpret or compile/
<Cheery> bash magic ):
<Cheery> :)
<Cheery> I love bash for what it lets me do.
<Cheery> anyway I hit a problem with axbattler.
<Cheery> Would like to parse type casts like this:
<Cheery> int** <- malloc(stuff);
<Cheery> binding would be same as with =, so it would make a chain like: vals = int** <- malloc(stuff)
<Cheery> but with hand written parser, this is getting out of hand.
<Cheery> I realised what I had done with axbattler is great. cool stuff.
<Cheery> but couldn't do it for my second hand written parser in the language language.
<Cheery> the one I should name.
<ELLIOTTCABLE> "the language language"
<ELLIOTTCABLE> I lol'd
<purr> lol
<Cheery> so started studying parsers again, and parser generators.
<Cheery> LR parsers were some that I hadn't studied yet, so picked those and banged my head against them until I understood them.
<Cheery> turns out, it's damn cool way to parse things. Writing the parser was almost like writing very nice interpreter.
<Cheery> with reduce and shift instructions.
<ELLIOTTCABLE> what's LR stand for?
<Cheery> had to check it up. L means left to right and top to bottom across the full input file
<Cheery> R means reversed rightmost derivation, which means that the output comes reversed, rightmost.
<Cheery> LR parser is sort of like normal handwritten parser, but it jumps directly into deepest item in the grammar that matches, then starts reducing up from that.
<ELLIOTTCABLE> reversed, rightmost
<ELLIOTTCABLE> wat
<Cheery> it means the order in which it works.
<ELLIOTTCABLE> let me repeat, this is some excellent advice:
<Cheery> true.
<Cheery> I think I'll write up how the LR parsers work. trying to do it as clearly as I can.
<ELLIOTTCABLE> Cheery: I'd read that. (=
<ELLIOTTCABLE> or try to. >,>
<ELLIOTTCABLE> Cheery: CORRESPONDINGLY, YOU SHOULD WRITE A PAWS, IN CASE I HAVEN'T MENTIONED THAT <3
<ELLIOTTCABLE> or even better, because it seems to be your area of interest, build an interpretive-preprocessor for Paws. ;)
<Cheery> could probably consider now.
<Cheery> anyway why I'm interested on here is because it seems to be a feasible way to design a parser, which recognises only the stuff it can process, and which doesn't lug parse trees around.
<ELLIOTTCABLE> LR's ignore shit they don't recognize? that's very interesting.
<ELLIOTTCABLE> oh, on that note, devyn
<ELLIOTTCABLE> I've been thinking: paired tokens *really* restrict later dynamic-syntax shit.
<Cheery> rather doesn't ignore, they report syntax error
<ELLIOTTCABLE> basically, “you can do whatever you want before the statements that resolve to parsing instructions, *but*, all quotes and all brackets have to match in any syntax before that, no matter what crazy shit you want to do.”
<ELLIOTTCABLE> which leads me to want to minimize the set of paired brackets we squat on …
<ELLIOTTCABLE> … which, and you'll hate me for this, leads me to want to remove execution literals entirely.
<ELLIOTTCABLE> replacing them with a JavaScript-Function-constructor-ish solution: something that does the parsing at runtime.
<ELLIOTTCABLE> then the only paired tokens are quote-marks.
<ELLIOTTCABLE> `infrastructure execution[] “foo bar”`
<ELLIOTTCABLE> or idk.
<Cheery> but what I mean is this: http://pastebin.com/bKMn0yfn
<Cheery> having simple tokenizer looks like it makes the language easier to understand for anyone.
<Cheery> the tokenizer accepts specials -dictionary, which tells the tokenizer symbols and keywords it needs to recognise
<Cheery> the rule, and what happens to the matched item - neatly bound together in same place
alexgordon has joined #elliottcable
<Cheery> hmm
<Cheery> my grammar table would be about 1.5kB if it was a flat 2D table.
<Cheery> missing about 3/4 of the language.
<vigs> hi
<purr> vigs: hi!
eligrey has joined #elliottcable
<Cheery> hmm
<Cheery> takes already a second to build the grammar.
<Cheery> well..
<Cheery> :) it's easy to cache.
<Cheery> taking 2 seconds to build the tables already. heh
prophile has joined #elliottcable
alexgordon has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Cheery> for now, threw it into json
<Cheery> resulted in 71k json file and blasting fast parsing
<Cheery> before fully shifting into it, going to see how it handles assignment vs. keywords, and list vs. index in main clause.
<Cheery> command[5] 50
<Cheery> vs.
<Cheery> command [5], 2
<Cheery> one of the things that led to space sensitivity
<Cheery> though I could make exception here.
<Cheery> but I rather wouldn't.
<Cheery> I think I'll make it prefer the indexing interpretation over list.
<Cheery> another thing I could do, is to insist that the command ends into symbol form.
<Cheery> command.foo
<Cheery> command[5].
<Cheery> so the symbol would become limiting element.
<Cheery> causing no conflicts.
alexgordon has joined #elliottcable
<Cheery> hmm.. though the . -symbol would cause conflicts there..
<Cheery> command[5]_ 1, 2, 3
<Cheery> this would be valid though.
<Cheery> command[5]! 1, 2, 3 could work too.
<Cheery> command[5]; 1, 2, 3 could work too, as the ; isn't term here.
<vigs> anyone know why I can't handle error responses when my AJAX call's datatype is set to JSONP?
prophile has quit [Quit: The Game]
<Cheery> hmm.. this thing is giving me interesting insights.
<Cheery> lambda isn't a term.
<Cheery> a + act x, y return x + y
<Cheery> doesn't make sense, and causes a confusion if done other way around: act x, y return x + y + a
<Cheery> but who does binary operations on lambdas?
<Cheery> nobody
<Cheery> and if he does. he adds parentheses
<Cheery> (act x, y return x + y) + a
eligrey_ has joined #elliottcable
eligrey has quit [Ping timeout: 240 seconds]
<Cheery> 1 0.537 0.537 9.676 9.676 lr.py:159(build_canonical)
<Cheery> 634987/16008 1.760 0.000 6.260 0.000 lr.py:232(build_closure)
<Cheery> I thought the ineffiency would be in the itemset hashing and picking.
<Cheery> but it's in the closure building
<Cheery> it's regular patterns in teh closure, so I guess I can speed it up quite much.
eligrey_ is now known as eligrey
prophile has joined #elliottcable
oldskirt_ has quit [Read error: Connection reset by peer]
oldskirt has joined #elliottcable
prophile has quit [Quit: The Game]