Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Learning Regular Languages with L* Algorithm (gopinath.org)
132 points by todsacerdoti on Jan 7, 2024 | hide | past | favorite | 2 comments


Dang this looks incredible, but I feel like I have to ask you to write full names for the variables instead of one letter, full names are way more readable and accessible.

Sure, you know now what “o._T” means, and it’s even in the context, but the reader or future you might not know that, and the lines might get separated, and then it forces us to ask, “What’s o again?” “What does ‘_T’ mean?”

Especially in literate programming blog posts, IMHO, be like the dude from Jurassic Park, “spare no expense” on typing out the full names of variables, because human readability is way more crucial than ease of cranking out more lines of code.

Yeah, we write more, and yes, it forces us prepend verbs like “get_” to functions so they have different names than the matching variables, but typing speed isn't the blocker.

Maybe one way programming can “beat” mathematics is simple readability. Mathematicians constantly assign one single symbol to some complicated thing. I’d argue that’s the #1 reason many folks consider math hard. We look at a big wall of symbols and it’s frustrating to need to refer back to context and hunt around for each symbol just to pronounce the formulas aloud. Even if the symbols are right next to the formula, that’s a lot of extra saccades for your eyes to make, back and forth, back and forth.

If math were readable aloud without needing a damn lookup table, then more people would understand math. Sorry for the rant but I’m a “full variable names” guy lol. Thank you for sharing the post, I’ll definitely give it a deeper look.


The purpose of writing single letter variables IMO is to allow for quick assessments of structure as opposed to meaning. For example it makes nesting more obvious.

In math there’s also some incentive to elide the meaning of a variable completely, as it often adds unnecessary tethers that hold a statement down from being abstracted. For example if we phrase the axioms of Euclidean geometry in terms of some unspecified object L, we can more readily work with a system that rejects the parallel postulate (e.g. two Ls that aren’t parallel intersect more than once is easier to imagine than two lines that aren’t parallel intersect more than once).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: