# introducing okram (Marko)

**URL:** <https://revolt.metaeducation.com/forum/t/introducing-okram-marko/1447>\
**Category:** Introductions\
**Created:** [December 31, 2020, 4:56pm UTC](https://revolt.metaeducation.com/forum/t/introducing-okram-marko/1447 "2020-12-31T16:56:01Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![hostilefork](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/hostilefork/32/421_2.png) [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Post date:** [March 6, 2021, 11:34pm UTC](https://revolt.metaeducation.com/forum/t/introducing-okram-marko/1447/5 "2021-03-06T23:34:01Z")

</div>

> [@okram](#):
>
> Switched to Haskell as my primary language in 1992 (but don't really like the complexity it has acquired over time).

@okram, since you have Haskell experience I'll assume you're familiar with Parsec... I'd like to draw your attention to a current interesting design point..

I'm trying to transition PARSE from its ad-hoc C implementation into something based on parser combinators. While some combinators could be natives backed by a C implementation, others could be plain user functions. [The effort is called UPARSE](https://revolt.metaeducation.com/forum/t/introducing-uparse-the-hackable-usermode-parse/1529).

As with most parser combinators, this makes each one process both how far it gets on the input (or a failure signal)...which is separate from a generated value. The concept is distinct because the combinator for a SET-WORD! (and others that are "value gathering") triggers a demand for a generated value to the combinator. If that demand is not there, the combinator can run in "skip mode" and be faster.

Having the combinators return higher-level constructed values than merely having "how much input was consumed" is a much-needed aspect. But I think there's something interesting about how it accomplishes the effect of implicitly passing the parser input through a driver that does FRAME! specialization. It strikes me as a much easier-to-grasp mechanical concept vs. the more strict monadic approach, which could be used by other dialects.

It will be slow for a while as it is uses many unoptimized features (e.g. multi-return, which is [prototyped as all usermode code](https://github.com/metaeducation/ren-c/blob/b929a1cd59265f44133061ff2262168a2b786f7e/src/core/evaluator/c-eval.c#L1155)... that's actually scanned and LOAD-ed on every SET-BLOCK! invocation right now!) and is all usermode. But it's just to hammer out the design.

I've been [raising points in the PARSE category](https://revolt.metaeducation.com/forum/c/domains/parsing/16) that could use informed opinions...!

---

_[View the full topic](https://revolt.metaeducation.com/forum/t/introducing-okram-marko/1447)._
