Hacker News new | ask | show | jobs
by sshine 622 days ago
My favorite obscure line of TCL:

https://github.com/athas/EggsML/blob/master/concieggs/hooks/...

A line that contains a regex pattern for matching regex patterns.

TCL was chosen here because its regex engine isn't too powerful.

1 comments

>TCL was chosen here because its regex engine isn't too powerful.

Uh, not sure I see the significance but wouldn't that make Tcl less apt for this than something else? Why would you purposely choose a less powerful regex engine?

When you feed the engine regexes supplied by users, you don’t want arbitrary code execution or exponential or infinite running times caused by obscure features.