Earlier quoted context omitted.
I know the basic syntax and I never have that problem. Perhaps you mean the advanced syntax? However I don't see the problem, there either. I usually don't need it, and to be honest, when I do, I find it more maintainable to use multiple simpler expressions combined with some programming.
Some by "regex" mean "globs" and you can just use "*" and "?" for stand-ins for some number of characters. Some allow "|", some allow backrefs, some allow "()", or require them escaped with \, or allow them but not with * after. Some are case insensitive, some not. Some allow "{0-5}", some allow "[0-9]", some have handy things like "\w". It's just the guessing game of exactly what they want. It should be required tha…
A functioning Turing Machine using Notepad++ and its find/replace regex engine
51–60 of 91 posts
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#52Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#53 The instruction sets are the remaining lines, formatted like >C.I:WMN
C current instruction name.
I the input from the current tape position. Either 0 or 1. Each instruction has
execution parameters for both inputs.
W the output to be written to the tape at the current position. Either 0 or 1.
M the movement of the read/write head. A 0 moves the head one position to the
left. A 1 moves it to the right.
N the name of the next instruction to be executed at the new tape position.
Would it have been clearer to use "" to specify whether to move left/right from the current position?Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#54Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#55I was under the impression that RegEx was not turing complete. Is there something special about N++’s regex engine that allows this?
The 'regexes' in modern languages and tools, however, are not actually regular in the original mathematical sense, they have been augmented by several constructs that are not regular. Perl is the leader in this field, its latest addition is regexes which can reference itself recursively, making (presumably, never seen a proof) it at least context-free. Here, the non-regular constructs used is capture groups and arbitary forward lookahead.
In addition to that, the author is doing something sneaky by making the user press a button continuesly to advance the state of the turing machine, so it's not actually search+replace that is turing complete, it's search+replace+"repeatedly pressing replace all". Unlike what some other people say in this thread, repeatedly pressing a button to simulate the machine doesn't count as 'turing complete' and is not comparable to plugging the machine in power.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#56Not a Turing machine if the user has to press a button for each step.
That's not relevant as to whether it's a turing machine or not, tho... The possible calculations (and genericity) is what matters. The "button for each step" could be analogous to powering the turing machine, or turning some crank for Babbage's machine, or whatever..
>could be analogous to powering the turing machine, or turning some crank for Babbage's
Those things are done once for those machines, you press power-on or turn a crank for just one time and the machine starts, this is not the case here, here the human is acting as the control logic for the machine, repeatedly pulsing to drive the computation.
Your computer is not a computer without a hardware clock, the repeated pressing of a button is acting as a hardware clock here.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#57Not a Turing machine if the user has to press a button for each step.
Not a Turing machine if it's powered by human created electricity.
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#58Earlier quoted context omitted.
We are guaranteed to halt, e.g lifespan. After death cells enter apoptosis stage where cells do final stages upon shutting down. I’d say it appears we are Turing complete, or at least it appears so from this angle
How about a human population?
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#59I was under the impression that RegEx was not turing complete. Is there something special about N++’s regex engine that allows this?
Regular Expressions as defined mathematically is strictly less powerful than turing machines. (by several levels, they are strictly less powerful than general context-free grammars, which are strictly less powerful than general context-sensitive grammars, which are strictly less powerful than arbitary grammars) The 'regexes' in modern languages and tools, however, are not actually regular in the original mathematical…
Re: A functioning Turing Machine using Notepad++ and its find/replace regex engine
#60Neat, 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…