Better HN
topnewbestaskshowjobs
Log inSign up

aarol

11 karma · joined Oct 6, 2024 (2y ago) · 5 submissions

https://aarol.dev/
Submissions

comment 10mo ago · link · parent

https://aarol.dev

2.

In-browser autocomplete for entries with Radix Tries(aarol.dev ↗)

1 points · by aarol · 10mo ago · discuss

3.

What is a succinct data structure?(stackoverflow.com ↗)

1 points · by aarol · 11mo ago · discuss

comment 11mo ago · link · parent

I've been toying around with tree-sitter and have seen the potential for a proper, non-regex based highlighter. It's really powerful because it actually parses the text into an AST. With the AST it's possible for example to make variables the same colour everywhere. A function passed as a parameter could be highlighted as a function even in the parameter list.

I'm happy to see that tree sitter highlighting on the web is finally a thing. This seems really solid although the bundle size is a lot.

comment 1y ago · link · parent

I'm the author of the post, thanks for your feedback! I was inspired by your comment on HN a while back and started learning about this stuff, reading the source code of `memchr` was especially great.

You're totally right about the first part there was a serious consideration to add this to zig's standard library, there would definitely need to be a fallback to avoid the `O(m*n)` situation.

I'll admit that there are a lot of false assumptions at the end, you could totally specialize it for u8 and also get the block size according to CPU features at compile time with `std.simd.suggestVectorSize()`