Talk:LOCK

Created
Well, I made up this language based on some ideas I got from MechaniQue (mainly that of using locks for flow control). Unfortunately, I don't have a complete, detailed specification because of some issues dealing with what is the best/most interesting way of doing things. (Like whether locks should be per line or per block and whether blocks should be able to be nested or not.) MagiMaster 01:41, 10 Oct 2006 (UTC)

Turing-complete?
For something to be Turing-complete, it must have the ability to use infinite memory (like "tape"). This makes LOCK not quite Turing-complete. I suggest having a command which can move the "tape." If you do that, then this SHOULD be Turing-complete. がんばれ！ (Go for it!) --User:Thematrixeatsyou: 219.89.219.30 06:01, 1 Nov 2006 (UTC)


 * I don't think that's quite true. For example, IRC, a language can still be Turing-complete with finite memory each memory cell can hold infinitely many symbols.  An example of this (sort of) is a string rewritting language, like Thue.  It certainly has no tape memory but is still Turing-complete.  For LOCK, you can have as many keys and variables as you want.  Actually, a better comparison might be C without arrays.  There, you still have no infinite tape, but an infinite number of named variables.  Anyway, I'm rambling.  The point is an infinite tape isn't the only way to have infinite memory. MagiMaster 17:20, 1 Nov 2006 (UTC)


 * The unlimited number of keys and variables is mostly irrelevant, since it is fixed by each program. For Turing-completeness the memory must be able to grow indefinitely for a fixed program. However the point of infinitely many symbols still holds: LOCK seems to have no limit on the size of integers, so it can almost certainly emulate arbitrary Minsky machines. --Ørjan 23:57, 1 Nov 2006 (UTC)

Interpreter
I made one, it implements the specification as it stands now. It seems to be usable for computation at least. Also, the article says this should be easily parallellisable but I don't think so because there's a shared accumulator. --Marinus 14:34, 22 May 2010 (UTC)