Better HN
topnewbestaskshowjobs
Log inSign up

snyball

52 karma · joined Apr 7, 2021 (5y ago) · 11 submissions

Submissions

1.

Giving Perl a Chance(blog.moesys.no ↗)

3 points · by snyball · 3y ago · discuss

comment 3y ago · link · parent

Ya, the language itself is not very well documented. But it's mostly Common LISP like, though a LISP-1 like Scheme, which is the biggest deviation from Common LISP.

You can take a look at core.lisp and html.lisp in the lisp/ directory, as well as the test cases for example code in test/.

comment 3y ago · link · parent

You could in theory by standardizing a mapping from S-Expressions to Rust tokens of course, but no it's not a goal for the project.

comment 3y ago · link · parent

It does have call/cc yes

5.

Show HN: Spaik Lisp Version 0.3(github.com ↗)

48 points · by snyball · 3y ago · 7 comments

comment 4y ago · link · parent

Cool, didn't know about `rq`. Converting everything to json and using `jq` has been my goto for structural data-hacks on the command line, but yeah for my own usage of `tombl` the killer feature was getting a bash array out of the config.

7.

Show HN: Tombl – Easily query .toml files from bash(github.com ↗)

45 points · by snyball · 4y ago · 10 comments

comment 5y ago · link · parent

The GC may move allocated objects around, changing their pointers in the process. This is used in some garbage collectors (.NET and Haskell for example) to combat memory fragmentation, by compacting the memory to remove small gaps.

comment 5y ago · link · parent

I've considered emitting LLVM, or using C as a high-level assembly language, but not directly to native code. I've been wanting to write some simple arcade-like games using spaik, and it'd be a shame to either restrict it to a single architecture or needing separate implementations. (that, and being able to benefit from the 100s of lifetimes spent optimizing LLVM and gcc code generation.)

Spaik also doesn't have an AST-level interpreter for evaluating macros, it compiles and runs the bytecode on-the-fly for macro-expansions declared and used in the same compilation unit. And I figured it'd be even more of a hassle with native code.

comment 5y ago · link · parent

The first compiler, vm, and "large" (>=500loc) Rust program I've written. Worked on it as part of a compiler class at Uni. Some of the GC parts are written in C because of my initial unfamiliarity with unsafe Rust.

It'd be great to get some feedback on the design, use of Rust, etc. given the fact that this was such a fun learning experience.

11.

Show HN: Spaik, a Lisp compiler/VM with a moving GC written in Rust(github.com ↗)

5 points · by snyball · 5y ago · 5 comments