Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AngelFish

Pages: 1 ... 48 49 [50] 51 52 ... 215
736
TI Z80 / Re: TCPS embedded/independent scripting language
« on: June 21, 2011, 05:24:09 am »
Let us assume that each instruction can be mapped to a finite set of integers from 0 to some number X.  Let the number of possible states of the interpreter be similarly mapped some potentially infinite set of integers from 0 to m. Before continuing further, it must also be mentioned that any Turing complete language can store an infinite amount of data. Since TCPS has finite memory (due to the underlying hardware constraints), it is not truly Turing complete. However, it is common to ignore such constraints and assume that the language has access to an infinite amount of memory if it chooses to utilize it. I will assume that here as well. Also, the simplest way to prove TCPS Turing complete is just to recognize that since brainf*ck is Turing complete and Assembly can implement a brainf*ck interpreter while TCPS allows inline Assembly, TCPS is Turing complete by extension. However, the command list given does not have a command for arbitrary input [like brainf*ck's ',' command]*, TCPS cannot perfectly emulate brainf*ck. While this is really quite a significant oversight, excluding emulation of this command does not necessarily make TCPS Turing-incomplete (as a cursory examination of the properties of Rule 110 will demonstrate).

Now, in order for a language to be Turing-Complete, it must be able to emulate any possible Turing machine. In other words, there must be a 1-to-1 mapping of TCPS programs to Turing Machines. The data requirements of a Turing machine are 1) A Turing tape, which is essentially an infinitely large array of numbers, B) A number representing the memory location on the tape currently being accessed by the head, and C) a number representing the state of the machine. Let the memory space accessibly by the interpreter suffice as a representation of the tape. Let the memory location (PC) currently accessed by stored in some place either on the tape or internal to the interpreter while the state of the interpreter consists of the values of all other data contained within the program.

From the above requirements for Turing-completeness, it can be seen that any system which implements the following program is thus Turing-Complete:
   
Code: [Select]
Label: Beginning
If {PC}=0 Then
Change State to Q₀
Change {PC} to R₀
Change PC to PC₀ '
Goto Beginning
End
If {PC}=1 Then
Change State to Q₁
Change {PC} to R₁
Change PC to PC₁'
Goto Beginning
End

If {PC}=[i]x[/i] Then
Change State to Qₓ
Change {PC} to Rₓ
Change PC to PCₓ '
Goto Beginning
End
If (State Or {PC}) = (Halting_Condition) Then
Halt
End

While one could conceivably generating many other Turing-Complete programs, this is I think the most intuitive one. Since all Turing-Complete systems are Turing-Equivalent, any Turing-Complete system can implement that program and every non-Turing-Complete systems are missing one of the abilities. Therefore, a system is Turing-Complete if and only if the program can be implemented.

Label <string>:
   Labels are primarily a human construct and need not actually appear in the tape. Assume Labels    to refer to particular memory locations in a manner similar to pointers.

If {PC}=x Then:
   This routine can be accomplished in much the same manner as in brainf*ck. Subtract  1    from{PC} x times and then use the '[' and ']' looping commands to test the conditional.

Change State to Qₓ :
   Again, this can be accomplished in much the same way as brainf*ck. Use the '+' and '-'    operators to change the value of {PC} and the '<' and '>' operators respectively to
   access other memory locations (see the part on Goto for a description of the difficulties    associated with this).
Change {PC} to Rₓ:
   '+' or '-' will suffice.
Change PC to PCₓ ':
   Precisely the same idea as “Change State to Qₓ “
Goto <Label>
   Okay, I'll be honest; TCPS can't actually do an arbitrary Goto <Label>.  Neither can Brainf*ck.    To actually do so in either language is equivalent to solving the Halting Problem, which has    been proven to be generally undecidable. This does not mean that TCPS isn't Turing-Complete    though, as the provided example program can be rewritten such that the conditionals are located    at one point on the tape and Goto <Label> is equivalent to a finite (and known!) number of '<'    or '>' operators. I'll leave implementing as an exercise, as the general case is one of those things    that makes babies cry and milk go sour.
End:
   This is another primarily human construct that need not necessarily exist on the tape. It's    essentially just the ']' command.
Halt:
   This is the '!' command.

Since the program can indeed be implemented, TCPS is therefore Turing-Complete and this informal proof is thus concluded.

*The ability to input filenames, while technically "arbitrary input," just doesn't seem like a reasonable substitute since you'd basically have to write programs for each case of a computable problem. You could theoretically use this in a BF interpreter written in TCPS, but come on. Getkey is so simple that even BF has it >_>

PS: If you'd like my opinion, I don't think TCPS is really in the spirit of Brainf*ck, which was designed to be a Turing-Tarpit. Adding extra commands is kind of like putting more legs on a Kangaroo IMHO. It might make it easier for the Kangaroo to jump, but it's now it's a mutant Kangaroo. But it's your project, so good luck finishing it :)

EDIT: Sorry for the weird spacing. I typed this up in a word processor and the forum doesn't use the same typesetting.

737
News / Re: nDoom policy re-instated
« on: June 20, 2011, 10:28:17 pm »

I would like to re-iterate that language wars are not going to be tolerated during this period. If anyone, seem to be starting one, please politely tell them to stop and notify the chan ops. Thank you

738
Computer Projects and Ideas / Re: Trio and Niko: Falling
« on: June 20, 2011, 04:59:12 pm »
Is isn't the spot, but:

SDCC is NOT that inefficient at all.  It is in almost every case more efficient than Axe and it has many more features to offer -- I already put all of the axe commands into an include format too, so I can still access them.

Duly noted, then :)

@BrownyTcat: SDCC is a C compiler written for the z80 processor.

739
Computer Projects and Ideas / Re: Trio and Niko: Falling
« on: June 20, 2011, 04:45:10 pm »
Good luck. However, be warned that SDCC has a reputation for being slow and inefficient. You'd probably be better off with Axe (or Forth, if you feel like porting that :P).

740
OmnomIRC Development / Re: Font
« on: June 19, 2011, 02:54:46 am »
Yeah that could work. Else, if it wasn't for lack of certain chars or copyright issue,s he could just use TI fonts. :P

Another idea is Fyxedis. They look like SNES characters.

But that'd make code so much easier :P

741
Other / Re: Microsoft Kinect SDK
« on: June 19, 2011, 12:42:41 am »
How about we forget about everything so this doesn't into a blame game? :)


742
Other / Re: Microsoft Kinect SDK
« on: June 18, 2011, 11:43:45 pm »
It's one thing to charge for the hardware. That's completely understandable. It's another thing entirely to force users to have a commercial and somewhat expensive operating system.

Anyway, I'm disappointed, although not entirely surprised, that Microsoft is only allowing interpreted frameworks like .net and silverlight. The Kinect is already capable of amazing things. Imagine what would be possible if you got rid of that ridiculous abstraction.

743
Gaming Discussion / Re: Anything illegal in what I want to do?
« on: June 18, 2011, 04:34:45 pm »
Yeah, Atari no longer exists, so they won't really care.

Also the Atari company in France is a different company who bought the rights to call themselves Atari. Dunno if they also bought all the stuff from the former Atari too.

Well, Atari changed their name, last I heard, so the current 'Atari' is someone else. Either way, I think Hot_Dog is fine.

744
Gaming Discussion / Re: Anything illegal in what I want to do?
« on: June 18, 2011, 03:58:26 pm »
Since Atari is pretty much out of business and only really operating in France, you could probably sell new atari equipment without them caring.

745
ASM / Re: Texture drawing
« on: June 18, 2011, 03:44:46 pm »
has it got a routine to draw a textured quad?

I'm not sure why you would want to draw quads as well, since having more than one routine is going to slow down your code.

746
ASM / Re: Texture drawing
« on: June 18, 2011, 03:21:08 pm »
Either Calc84 or Runer presented a tilemapping 3d engine while back that had simple textures. I can't seem to find the screenshots, though.

747
Khavi / Re: Khavi: Java on the Prizm
« on: June 18, 2011, 04:07:07 am »
I've been kind of busy with other, more immediate things recently, but Khavi is still progressing. If everything goes well, I should have a working demo by the end of this week.

However, this demonstration will leave out a lot of crucial stuff, so here's a partial list of things waiting to be completed:

  • Full multi-threading support
  • Privileges
  • Khavi Scripting Language (KSL): This will be almost entirely undocumented, so don't worry about learning a new language. The syntax is only slightly better than brainf*ck, so you're not missing out on much except the chance to brick your calc :P
  • Shell dependencies: This will most likely be one of the last things implemented
  • Interpreter run-time libraries: Dependent on KSL and the booting process
  • Native interfaces: Depends heavily on KSL
  • Full Java VM instruction set
  • Full Lua instruction set: It's relatively close to completion, though.
  • Boot code: It's a major PITA to write and will probably be one of the last things written, since it's dependent on so many other factors. Also depends somewhat on KSL
  • The "Nuke(char *City)" function of the Java VM: Don't ask...
  • The context switcher: It's written, but I need to copy it from my notebook.
  • Memory management (distinct from garbage collection): Lookup-tables, lookup-tables, lookup-tables
  • Garbage collection: Screw it. Garbage collection is for wimps  :P
  • Anything else I've forgotten: Have you seen the size of this list?

748
Gaming Discussion / Re: Public Domain / Open Source NES Games?
« on: June 18, 2011, 03:20:34 am »
As far as I am aware, no. I also doubt that I'm wrong about any games that I've never heard of, because Nintendo kept programming pretty tightly controlled for the system (hence the use of the cartridges).

If you'd still like to learn from games, someone did a disassembly of Metroid and went through relabeling everything so it made sense. I actually found a link to it on Omni, of all places :P

http://www.romhacking.net/docs/459/

749
Other / Re: Possible now to crack Nspire keys?
« on: June 17, 2011, 11:40:08 pm »
If we do try to crack it again, I'd suggest the Amazon Cloud. Its uberpowerful and extremely inexpensive to rent some real power.

Let's put it this way: Even if every computer on earth were to attack the problem simultaneously, it'd still probably take longer than you're likely to be alive. Also, "extremely" inexpensive" in this case is still bloody expensive.

750
Casio Calculators / Re: More PRIZM bugs?
« on: June 17, 2011, 02:57:11 pm »
Yeah, I used the flash write function several times.

Pages: 1 ... 48 49 [50] 51 52 ... 215