HN user

serjeem

14 karma
Posts1
Comments5
View on HN

Insisting it's a deep, dark magic and not the advanced application of `str.replace` does the industry a disservice.

Respectfully, this perspective contradicts the computer science underlying our work--there are in fact different categories of string "languages" that can be parsed using different technologies, and regular expressions are not enough for most "languages".

See https://en.wikipedia.org/wiki/Chomsky_hierarchy for the different categories of languages and the required tech to parse them.

I consider CS theory to be about the deepest and darkest magic I get to use on a daily basis :P.

The only difference is layers. Enough regular expression becomes a parser. A slim enough compiler is just a templating engine.

You can't add enough layers of standard regex to parse, say, C++ or even a tree of matching parenthesis. You need a different tech like CFGs.

Hope this helps improve the grokking! The "interesting meat" here actually points at some really deep, fundamental CS theory that's really worth knowing.

Is there a general theory or framework for how these kinds of mechanical things get designed and work?

I am always really impressed by the ways mechanical motion can be transformed but I have no idea how people figure out these mechanisms. Is it just 3000 years of trial and error and intuition?

I haven't seen a lot of hate in that direction. As someone who uses ST almost primarily, my biggest complaint is that it's not open source and free, which is going to stunt it's growth and keep it from being a real competitor with Emacs or Vim.