HNHacker News
TopNewBestAskShowJobs

Apanatshka

127 karma · joined May 20, 2014

blog.jeffsmits.net
submissionscomments
Apanatshka··on Ask HN: What Are You Working On? (April 2026)
I'm implementing different parsing algorithms (for programming language text to syntax tree purposes). There are so many papers published on different algorithms... I'm just slowly reading it all, and implementing the algorithms and improvement ideas, sometimes combining ones from different papers. At the moment I'm constraining myself to LR-based algorithms to not drown even more in the sea of publications.

I have a recursive ascent code generator with a bunch of optimisations that I wrote about [1,2]; it's a linear-time parser for LR(1) with reduced overhead. I have an RNGLR implementation (a polynomial-time parser for any context-free grammar), that's still a table-based interpreter like more LR-based parsers out there. I've extended that implementation with special code to handle cycles more efficiently. Some day, I'll take some time to write a paper on that and publish it. Currently, I'm trying to combine the two ideas and create a generalised recursive ascent code generator. If I succeed I'll write another blog post again, it's been a year since the last one...

[1]: https://blog.jeffsmits.net/optimising-recursive-ascent/ [2]: https://blog.jeffsmits.net/optimising-recursive-ascent-part-...

Apanatshka··on Ask HN: What are you working on? (February 2025)
Reading literature (academic and otherwise) on parsers, writing blog posts about what I learn, trying to implement the things I learnt. I've written about basic finite automata (for regular expressions), LL, LR (including the difference between SLR, LALR, and LR(1)), detoured into some optimisations for LR from the 80's, then generalised LR (RNGLR in particular). I'm now implementing these things, RNGLR is not easy to implement despite having understood it well enough conceptually to write a blog about it (https://blog.jeffsmits.net/generalised-lr-parsing/). I've read far more than I've written about, trying to keep that straight in my head as well / planning the next... probably year of writing ^^'
Apanatshka··on Ask HN: What are you working on? (February 2025)
Is that legal in your country? In mine (Netherlands) there are way too many people with doorbell camera aimed right at the street even though it's illegal to record a public space like that. Most folks are ignorant about it though, or think that surely the internet-connected gadget sold by some anonymous corporation won't be abused....
Apanatshka··on Optimising LR Automata
Author here, feel free to ask me whatever you like.
Apanatshka··on Dutch Drug-Related Text Classification Model by NOS
The Dutch Public Broadcasting Foundation (NOS) published these models along with an article about the millions of drugs ads on Telegram, and responses by the Dutch police, Telegram, and some of the drug dealers. The article is in Dutch over here: https://nos.nl/artikel/2506160-miljoenen-drugsadvertenties-o...
Apanatshka··on Inkscape 1.2.2
You've given up on Gimp? What's wrong? Did I miss some news?
Apanatshka··on Robot treats 500k plants per hour with 95% less chemicals [video]
That's because trains get taxed, while flights _still_ get subsidised. It's maddening.
Apanatshka··on OrganicMaps is Android and iOS offline maps for travel without trackers or ads
There's an app called StreetComplete (recently discussed on HN) that allows you to easily contribute missing information like local business information to OSM. If you can find the time, you can use that to solve some of the issues you have and help others at the same time! :)
Apanatshka··on Pesticides are killing the world's soils
An important and sometimes forgotten thing about democracy is that it isn't as simple as the majority rules. It's the majority rules while taking minorities into account. In a well functioning representational democracy this is kept in mind my career politicians. In a hybrid between representational and direct like in Switzerland, the population can overrule and just go with majority rule.

For example, the Swiss pension system is similar to others in Europe, where the current working population pay taxes almost directly towards pensions of the retired. Since this system will break down if taxes aren't increased like crazy or pensions lowered, politicians have been trying to change the system. But there are too many people soon to be retired or already retired that care less about their country's youth and future than their own pension, so they keep blocking changes. So every democratic system has its tradeoffs...

I learned this from a young Swiss when I was visiting Switzerland and praising their way of democracy. It was a few years ago though, so maybe this info is no longer accurate. And I didn't fact check, it was just an example brought up in casual conversation.

Apanatshka··on Putting an Ultra-Tiny Linux Board in a Phone Charger Eventually
Make sure to test your RPi 0W with the Bluetooth speaker you had in mind asap. Mine won't connect to my soundbar, which is complicating my setup for connecting my projector and soundbar wirelessly :(
Apanatshka··on 75 Years Ago, 'War of the Worlds' Started a Panic. Or Did It? (2013)
The article mentions Radiolab. I remember listening to a Radiolab episode about War of the Worlds, but that must have been a later revision, because in that episode they go into how the first airing of the play did not cause a panick, but other airings of the play in other places certainly caused panick and violence.
Apanatshka··on Still alive
That excerpt made me think of Romantically Apocalyptic, which is a... visual novel / web comic? I read it for a while, really enjoying the art and the strange and absurd conversations, characters and events. It felt a bit unplanned and all over the place though, but that might just be my prejudice towards web comics combined with the style of writing.
Apanatshka··on Malware on My Android Phone
My Firefox on Android has a QR code scanner, I typically use that even when I know it's not a website. When you open a new tab and select the address bar you get to see the button for the QR code scanner.
Apanatshka··on LLVM merges machine function splitter for reduction in TLB misses
I've seen a poster presentation at the student research competition of a PL conference where the student created a tool to do this after the fact on binaries. It looked quite promising, but I think preliminary results were single digit percentage speedup for most benchmarks. I'll have to see if I can find it again.
Apanatshka··on Hash Array Mapped Tries (HAMT) to the Rescue
Happenstance really, he briefly joined our research group. I'll send him a link to this thread.
Apanatshka··on Hash Array Mapped Tries (HAMT) to the Rescue
Haven't implemented it myself, though I mean to try one day. But I've spoken to Michael before and used his implementation: https://github.com/usethesource/capsule
Apanatshka··on My Favourite Diff
A similar example is in a "filtering" operation. I mostly have this in functional programming where you pass a predicate to filter on. But what's the perspective of the filter? Are you filtering poison from your water, or are you sifting the water looking for gold nuggets. I prefer to use functions remove and retain (respectively) to be more explicit.
Apanatshka··on Programming Language Checklist
Projectional editors use that setup. Might be slightly different than what you have in mind since projectional editing is not great at text editing. But have a look at Jetbrains MPS, that's a language workbench for projectional editors.
Apanatshka··on The Challenge of Cross-Language Interoperability (2013)
What I've gathered about Graal is that once you have a compiler for the platform, Cross-Language communication on a hot path gets optimised to near-zero cost.
Apanatshka··on Ask HN: What language/framework do you plan to use in your next project?
Good luck :) I love the language, but you'll need some perseverance to learn the more interesting parts like lifetimes and the borrow checker. I can recommend the book on rust-lang.org!
Apanatshka··on Data from man's pacemaker led to arson charges
I think multiple episodes including the season 2 christmas episode comment on brain computer interfaces in one form or another and they all seem realistic and scary to me. Best not use direct brain computer interfaces.
Apanatshka··on Programming books you might want to consider reading
I second Modern compiler implementation in ML. I'd also add Types and Programming Languages by Pierce, commonly referred to as TAPL for background on type systems. https://www.cis.upenn.edu/~bcpierce/tapl/
Apanatshka··on WebGazer.js: Eye Tracking on the Browser
I researched this over a summer once by downloading the latest scientific papers on gaze tracking. The result were pretty disappointing to me. Then I figured I was doing this researching all wrong. Because I already knew from highschool biology that your eye does micro movements all the time to keep the retina stimulated and to keep a larger area in focus at the same time. So I opened wikipedia and looked up the smallest micro moments that the eyes do. Based on the angle of it and the average distance between your eye and the screen, it's easy to see that you can never replace the mouse with gaze for a pixel perfect pointing device.

However! If you think outside the box, you might get a fairly accurate gaze tracker and a different GUI design to get this to work. That vision (no pun intended) is more of a long term one. An easy short term use for eye gaze use would be automatically setting GUI window focus based on eye gaze. That already might save you a keyboard-mouse switch. As long as you have no more than four windows on your screen, you can make it work with the current tech already.

Apanatshka··on Push-down Automata with a bit of Rust
This is my second serious blog post ever published. Any feedback on writing, style, subject matter, code/theory ratio etc. is much appreciated.
Apanatshka··on A Farewell to FRP
I'm similarly ambivalent. Though Elm and it's flavour of FRP were more of a hobby (I never turned into an academically valuable thing :) ), I was still very interested in the roots of the system and how to use and improve it. I know the change was happening already, that signals were not used much in the Elm Architecture; I also understand and applaud the simplification. But I'm still a little sad to see FRP go, it's an interesting idea and does have potential IMHO.
Apanatshka··on Show HN: My first blog post – Finite Automata with a bit of Rust
Thanks for the feedback :) I didn't know that about Rust's regex! Despite the note at the end that I wouldn't write more Rust automata code, I'm still a little tempted to try my hand at a Rust crate for automata related things. I'm not sure if I'm going to try that first or try to write the next post in the series...
Apanatshka··on Show HN: My first blog post – Finite Automata with a bit of Rust
This is the first serious blog post that I've ever published. I'd love to get feedback/tips/critique!
Apanatshka··on Symbolic expressions can be automatically differentiated too
That's also a really cool article. Thanks for sharing it!
Apanatshka··on Modular implicits – a system for ad-hoc polymorphism in OCaml [pdf]
Summary of the idea:

Add implicit arguments with some extra syntax. Whenever the argument is unambiguous, you can just not mention it, whenever it's ambiguous you add the argument to a function call. Modules provide the structs of related functions, so implicit module typed arguments are a good fit for "typeclass-like" functionality. The paper also mentions some nice extensions of importing implicits inside other modules.

If you know implicit arguments from Scala or Agda [0] or whatever other language, you get the mechanism.

If you know type classes from Haskell, you know the "goal" and the capabilities. Only this proposal requires less extension of the language, because you can disambiguate instances by supplying one by hand (basically implicits applied to "the scrap your typeclasses" approach [1]).

[0]: http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Docs.Implic...

[1]: http://www.haskellforall.com/2012/05/scrap-your-type-classes...

Apanatshka··on Show HN: GPU text rendering with vector textures
Source: MS Paint.

haha, that's clever ^^ EDIT: seriously though, those are some Paint skills, I didn't even notice until I saw the "source" text below it.

Page 1 of 2Next →