Earlier 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!
A functioning Turing Machine using Notepad++ and its find/replace regex engine
21–30 of 91 posts
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#22So it can play Towers Of Hanoi?
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#23Neat, 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…
I wouldn't be happy with Python, but I do agree with the general premise that extensibility or automation ought to be expected of editors. 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 m…
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#24Earlier quoted context omitted.
I wouldn't be happy with Python, but I do agree with the general premise that extensibility or automation ought to be expected of editors. 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 m…
Out of curiosity, what do you actually use the Ruby liveloading feature for? I use Neovim, which has a similar (but less powerful) feature that allows one to live-execute Lua code (or Vimscript, I suppose). But I almost never use it outside of testing code for my configuration, because the rest of the editor's feature set suffices fairly well for text editing.
E.g. I have functions in there to insert headers in my journal for example.
In terms of executing code "actually" live, it's ~80% for debugging when I work on the editor itself. Pry provides all of the plumbing so all the code needed to add that is just to suspend the editors own input handling and call pry, coupled with an exception handler that calls pry as well, so there was no reason not to, basically.
But once I'd added it, the 20% left felt worthwhile as a means of e.g. do complex searches, or generate tables or otherwise do search and replace of content that requires more (e.g. parsing timestamps and replacing them with another format....) and any number of things I don't do very often but that feels very comfortable when you do need it. To be clear it's not like it does much you can't do easily without it. E.g. after all I could just dump the buffer to a file, load it in my repl of choice, manipulate it and write it out again and reload it in my editor. It's one of those small things that feels unimportant when you don't have it there, that doesn't save you a huge amount of time, but that just makes things feel nicer when you get used to them.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#25Not 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
#26Neat, 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…
Python just works... Every now and then I'm still bitten by the 2->3 transition. And I'd very much not like it to be a required dependency in my systems either. 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
#27Earlier 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!
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#28Neat, 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…
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#29I 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
#30Earlier quoted context omitted.
Python just works... Every now and then I'm still bitten by the 2->3 transition. And I'd very much not like it to be a required dependency in my systems either. 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.
Learn basic syntax and you'll spend the next few decades wondering each time _which_ basic syntax is expected because none of them ever say.