1
Liebranca
18h

OK here's lang, very easy.

set lines, (split "\n", orc fname). ; ORC -- open, write, close
map lines, strip.
grep lines, filter blanks.

map lines, # lineproc:

- on line match, qr~^# \s* (?<name> [\a]+) \((?<type> [\a+])\) \s*:\s*~x.
· · * have type or default type.
· · * set dst, name or new type name.

- on line match, qr~^\- (?<name> .*)~x.
· · * dst->cur eq dst->[name] eq new list name.

- on line match qr~^\* (?<item> .*)~x.
· · * push dst->cur, item.

- else
· · * cat dst->cur, line or throw fuk.

I'm skipping over a couple edge cases (no dst/cur, I be throw fuk for brevity) but you get the gist of it maybe.

Anyway what's this for? Lists, like so:

```rol
# dst (type):
- attr:
· · * hi im item one in list
· · · still item one lmao.
· · * hi im item two in list.
```

That gives `dst { attr: [item_1, item_2] }`. There's another bit I'm omitting to make this recursive so as to allow for nested dicts, but nevermind that it's a tree you get it right.

So what it's lame. Yes. Let's smoke some crack now I can add preprocessor in subclass:
```
# dst (cracktype):
$:%fn args;>
(text)
$:/fn;>
```

That will call `fn text,args` to process text __before__ lineproc, `fn` is just callback from callback table in Nebraska maybe.

$:peso;> syntax is just so text can contain funstuff OK.
I like <fn args /> better, and $:this;> is just stuff no one ever writes so it's safe to use.

Want to reference object in text too, what? `{$obj [fn args]}` anywhere in text to make call, now can do database lookup so naming be important. Have import mechanism to fetch collections, can't bother showing.

Anyway what's the point I dunno, just copying and pasting from local library to pack entire app in single html file. Why? Can't remember; doesn't matter.

Also can convert to json but I prefer my own version of it.
Called jargon.
Same thing but no quotes just because so `obj {attr:[(value), (value)]}`.
Now eat baguettes.

Have a nice wallop.

Comments
  • 1
    tagged: "fuck the police but stewart copeland is actually clark kent".
Add Comment