• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A fast implementation of the Nix expression language


RSS
Rev. Hora Autor
d8750e8 main 2024-06-15 01:35:35 Corbin

Update README.

41cf845 2024-06-14 11:59:00 Corbin

parser: Use some sugar.

4765220 2024-06-14 11:29:28 Corbin

parser: Make string QLs left-recursive.

And, with this, there's no longer any good explanation for why we cannot
match formals and binds at the same top-level.

5046295 2024-06-14 11:11:02 Corbin

Get 2 + 2 working again.

The supercombinator preparation will be the hard part. Not tricky, just
a lot of work.

322ce08 2024-06-13 13:01:55 Corbin

gmachine: Flesh out actual operations.

This is going to be a supercombinator machine, so I need to rethink the
current compilation scheme.

ae25b72 2024-06-13 08:03:52 Corbin

Break ground on a G-machine implementation.

I think that we have all the pieces in place. I'm not totally sure,
though; we might need to rearrange more.

376831c master 2024-06-10 07:57:27 Corbin

parser: Add weird let-expression and rec-expression.

f77ed08 2024-06-10 07:30:47 Corbin

Fuck with the parser some more.

The `formals` productions weren't all left-recursive, and sadly that's
not the reason why `formals` is overriding `binds` during parses.

27ebd78 2024-06-10 06:06:05 Corbin

parser: Recognize let-expressions.

eab14a7 2024-06-09 03:25:28 Corbin

Set up a standalone repo.

I'm tightening up the license because I have had *zero* code
contributions from others. This wasn't supposed to be a solitary
mountain climb, but a hiking group. That didn't happen, so I'm removing
any possibility that any corporation can exploit this code.

b90c3ac 2024-06-08 10:38:44 Corbin

regiux: Parse and compile quasiliteral strings.

Requires a RPLY fork, so currently broken.

eeb0bbe 2024-06-07 06:22:38 Corbin

regiux: Resolve ops during parsing.

8fbb8d4 2024-06-06 13:57:37 Corbin

regiux: Stub out binary ops.

The provided addition op works fine, first try. But I'm not going to be
worried about that. Why wouldn't it work? The curry is so very natural.
I was expecting an RPython error but the translator is generous today.

aaaea30 2024-06-06 13:24:06 Corbin

regiux: Add string literals.

There's some future work to be done here with quasiliterals.

4127f06 2024-05-25 11:28:14 Corbin

regiux: Implement Booleans and if-expressions.

58d3b42 2024-05-15 11:09:37 Corbin

reguix: Wire up basic inherits.

3c3cf1f 2024-05-15 09:47:55 Corbin

reguix: Implement builtin attrset and application.

I had to figure out a fair amount of structure. We now compile on top of
a live scope, directly embedding our objects into the heap and
incorporating live references.

c9b9bf0 2024-05-01 14:11:55 Corbin

regiux: Sketch a loop-detecting heap.

The basic idea is borrowed from GHC, which does something similar.

2db054e 2024-05-01 11:35:52 Corbin

regiux: Sketch out the construction of attrsets.

An attrset's names are statically known! So, we should probably compile
it to some sort of key-thunk structure.

06b76aa 2024-04-30 16:26:47 Corbin

regiux: Set up a basic division of responsibility.

The idea is that we need two workflows:

* REPL: given a top-level expr, repeatedly stir the heap
* Recursive Nix: From within a heap action, invoke the parser and
possibly the builder

We're punting on building for as long as possible, but even without
builders we may still have a situation where we import code from the Nix
store while mid-evaluation. To handle this, we want to slowly pivot
towards a single unified workflow:

* Given a heap object, reduce it to WHNF or NF (two methods)
* REPL: Compile to a heap object, reduce it to WHNF, print it
* Recursive Nix: While reducing a heap object, invoke the parser

Now, the *real* complexity will be in invoking the *builder* while
reducing the heap; that would require some sort of scheduler and
reactor, possibly using CPS techniques to add continuations as
callbacks. Mother of monads, event loops, etc. This is already
well-known to be a monadic structure, so we'll have to tackle it
eventually, but not today.

d7f7eba 2024-04-30 15:44:34 Corbin

regiux: Split parser.

867a9f5 2024-04-28 14:35:39 Corbin

reguix: More of the parser.

The remaining parts have to do with lexing and parsing of quasiliteral
strings. Parsing these is always...involved. It seems rply doesn't
support the CppNix approach of stateful lexing, so instead we'll have
to carefully lex quasiliterals into pieces and parse the pieces.

fb40d31 2024-04-28 08:07:07 Corbin

regiux: Disentangle bad refs.

Now lambdas pretty-print. Let's figure out attrsets next!

f7edd9a 2024-04-27 19:24:04 Corbin

regiux: More parsing.

1099994 2024-04-27 16:58:10 Corbin

regiux: Hack out about half of Nix's grammar.

Okay, maybe more like a third. There's a bunch of gnarly regexes that
probably can be ported directly for the lexer, a bunch of implicit
characters that have to be explicitly catalogued and named, and a lot of
boxes to be written for the parser.

I've used as much metaprogramming as I can here, but historically
RPython doesn't like autogeneration of box classes, so they are
handwritten. Yuck.

4df8902 2024-04-27 12:08:12 Corbin

Set up scaffolding for a Nix parser.

The name is based on a suggestion from
https://fosstodon.org/@IslandUsurper/112322426945766066 and is a pun on
*Python regius*, or "royal python", the Latin name for ball pythons.