Better HN
topnewbestaskshowjobs
Log inSign up

schrodingerzhu

5 karma · joined Oct 19, 2023 (3y ago) · 11 submissions

Submissions

comment 1y ago · link · parent

Alex Chi was in the project. He is now writing TinyLLM.

comment 2y ago · link · parent

"if the IDE autocompletes the type declaration for me somehow".

Then you will need type inference to some extend. :D

comment 2y ago · link · parent

Typst symbol classifier

Static website: works offline. Tiny model: 1.1 MiB (ONNX), fast to load and run. Decent symbol set: recognizes 300+ symbols.

4.

Typst Symbol Classifier(detypify.quarticcat.com ↗)

5 points · by schrodingerzhu · 2y ago · 1 comment

comment 2y ago · link · parent

The fact is that in many languages, type checking and type inference are coupled together (for languages with DT, bidirectional type checking is needed). When writing proofs, it is almost impossible to let user specify every type.

Ok, let’s go back to normal imperative programming. What about alias analysis? What to do with devirtualization? You NEED type inference. That is being said, I am not a fan of the “usual” ocaml’s style where ppl seem to write as less type annotations as they can. That is not user friendly.

comment 2y ago · link · parent

Parser generators have long been a savior for programmers, liberating them from the daunting task of crafting correct and maintainable parsers. Yet, this much-needed simplicity often comes at the expense of efficiency. We present, Paguroidea, a parser generator that harnesses the power of lexer-parser fusion techniques to create parsers that boast user-friendly grammar definitions while delivering performance that rivals specialized parsers. Building upon the foundations of the flap parser, our work introduces a series of extensions. One of our key contributions is a novel approach to the normalization method. By encoding reduction actions directly into the Deterministic Greibach Normal Form (DGNF), we provide parser generators with flexibility in manipulating semantic actions. This unique approach empowers developers with the freedom to customize their parser generators to their specific needs while maintaining semantic correctness. Furthermore, we formulate the execution of the parser in substructural logic, providing an elegant way to prove the correctness of the amended normalization procedure. In this exposition, we offer a glimpse into efficacious, user-friendly, and correctness-provable parser generation.

7.

Paguroidea: Fused Parser Generator with Transparent Semantic Actions(dl.acm.org ↗)

2 points · by schrodingerzhu · 2y ago · 1 comment

comment 2y ago · link · parent

This crate provides a data structure to handle dynamic tree connectivity. Both incremental and decremental operations are supported with amortized O(log n) time complexity.

As the underlying data structure is a Splay tree, this crate works best with the situation where the working set is relatively small.

To represent a node in the forest, one can create a handle via [Handle::new]. To connect two nodes, one can use [Handle::connect]. This will return a [Connection], which will keep the two nodes connected until it is dropped.

9.

Dynamic Tree Connectivity in Rust(github.com ↗)

1 points · by schrodingerzhu · 2y ago · 1 comment

comment 2y ago · link · parent

As a side note, LLVM is developing its own libc. It is not usable for now. But it will finally grow into a fully functional one in a year or two.