A functioning Turing Machine using Notepad++ and its find/replace regex engine
11–20 of 91 posts
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#12I was under the impression that RegEx was not turing complete. Is there something special about N++’s regex engine that allows this?
No, nothing special about N++ (well, lookahead, but many regex engines have that). Repeated Search+Replace is the key, and not part of regex.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#13Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#14Not a Turing machine if the user has to press a button for each step.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#15Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#16I was under the impression that RegEx was not turing complete. Is there something special about N++’s regex engine that allows this?
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#17Neat, Though it does make me wonder if a python parser wont soon become standard in editors. Its just too damned convenient for many things, sure you might be able to come up with a regexp search and replace that does the same thing, but odds are it will take longer than coding a few loops. BASH sucked far too much, and C++ and most languages lacked the convenient filesystem libs required, but python just works and i…
And no, regexps get a bad rep but they are for the easy 99% and insanely quick to come up with. Learn basic syntax and you'll be thankful for decades to come.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#18Neat, Though it does make me wonder if a python parser wont soon become standard in editors. Its just too damned convenient for many things, sure you might be able to come up with a regexp search and replace that does the same thing, but odds are it will take longer than coding a few loops. BASH sucked far too much, and C++ and most languages lacked the convenient filesystem libs required, but python just works and i…
My own editor is written in Ruby, and so all extension is done by loading Ruby code into the running process, and I can drop into the Pry debugger with a keypress, or another keypress gives me a prompt to enter a single-line expression instead. The latter is literally a one-line method. Adding a binding to eval() a whole buffer would be equally trivial... Being able to extend everything trivially in a language I'm comfortable with (so not Emacs lisp) makes such a difference to usability.
Incidentally, the ability to interact with the open buffers using a script also from outside the editor is another thing I love as an extension mechanism for editors - an idea I first saw in FrexxEd (co-written by the founder of Curl) for the Amiga, which exposed the open buffers in the filesystem (think the Amiga equivalent of a FUSE filesystem), which would have the added benefit of not being language specific. It doesn't need to involve any FUSE-like stuff either - just a command line utility to "cat" an open buffer and to replace the open buffer from stdin would be sufficient.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#19Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#20Earlier quoted context omitted.
No, nothing special about N++ (well, lookahead, but many regex engines have that). Repeated Search+Replace is the key, and not part of regex.
I find myself wondering if anyone has done a proper analysis to prove that human activity is Turing complete!