Turing in C++
Author |
Message |
mirhagk
|
Posted: Fri Aug 13, 2010 7:30 pm Post subject: RE:Turing in C++ |
|
|
yeah, sorry, my program like drastically changed from when I posted my first post. It's simply a program that runs a scripted version of Turing (actually I'm working on gettting a differently structured Turing-like language to work first).
After I finish the interpreter I will be working with a close friend of mine to rebuild the program so it can run on an iPod touch.
The current dumbed down version is going to be built in Turing, the final computer one will be built in XNA, allowing it to run on the 360 as well.
It should be a fun project, and I will keep you updated. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
DtY

|
Posted: Fri Aug 13, 2010 8:23 pm Post subject: RE:Turing in C++ |
|
|
XNA is C#, right?
You should probably consider writing it in plain C, so that it can be compiled with c++, c# or objective c.
Of course, once you get to Turing's OOP, compiling down to a non-OOP language will be more challenging, but it'd probably be worth it, since C++, C# and Objective C's object system have their differences. (IIRC, Turing's object system is a lot like c++'s, which would make it drastically different from Obj. C's, and I have no idea about c#.) |
|
|
|
|
 |
Euphoracle

|
Posted: Fri Aug 13, 2010 8:29 pm Post subject: RE:Turing in C++ |
|
|
What? Since when can you compile C to Objective-C or C#? What are you even talking about? |
|
|
|
|
 |
Dan

|
Posted: Fri Aug 13, 2010 8:29 pm Post subject: Re: RE:Turing in C++ |
|
|
mirhagk @ 13th August 2010, 7:30 pm wrote:
After I finish the interpreter I will be working with a close friend of mine to rebuild the program so it can run on an iPod touch.
The only way this will happen is with a jailbroken iPod. Apple strictly disallows compilers and interpreters.
Do you have a grammar for your version of Turing yet? |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
 |
DtY

|
Posted: Fri Aug 13, 2010 9:46 pm Post subject: Re: RE:Turing in C++ |
|
|
Euphoracle @ Fri Aug 13, 2010 8:29 pm wrote: What? Since when can you compile C to Objective-C or C#? What are you even talking about? Objective C (and c#, afaik) are both strict supersets of C (like c++), any valid C program is also a valid obj. c (and c#, afaik).
There are some differences though, for example C99 allows static arrays who's size are calculated at runtime, but obj. c does not allow this. I believe the latest objective c standard is based on C89. |
|
|
|
|
 |
chrisbrown

|
Posted: Fri Aug 13, 2010 10:04 pm Post subject: RE:Turing in C++ |
|
|
Objective-C is a strict superset of C, but C# is more similar to Java than either of those.
Regardless, Objective-C would probably be a little more friendly to develop with. I personally find pure C too tedious for most applications. |
|
|
|
|
 |
Atma Weapon

|
Posted: Fri Aug 13, 2010 10:05 pm Post subject: Re: Turing in C++ |
|
|
mirhagk @ Fri Jul 09, 2010 11:11 pm wrote: I thought I'd put this in the Turing thread, since it affects Turing users the most.
I am currently in the process of making a class for c++ that lets you use all of Turing's functions, and create windows etc. I have some of the drawing commands done, I'll finish the rest of them today, and upload the code tonight. I just wanted to let you guys know, as well as ask some help from experienced c++ coders.
I can do almost all of Turings commands, and can even get like offscreenonly working and stuff like that. I'm going to reach a huge roadblock once I get to the Network commands. (I think I can get parrallel ports working easily, depends if I still have my code from computer engineering)
I also have no clue how to implement the picture class, so I'll need help with that (and the sprite class)
This sounds fantastic, I'd try it immediately and it would be I think of immense use to try to wean myself from Turing onto something harder. Please do finish it! And selfishly, but perhaps wisely, please leave networking stuff 'til last, that sounds really complicated and don't get discouraged. I'm currently using Turing as like a prototyping language to show off my ideas, but a C++ implementation of turing commands would mean people like me have something concrete to comapre to when they're trying to learn the more powerful language, right? Fantastic idea, keep going! |
|
|
|
|
 |
Tony

|
Posted: Sat Aug 14, 2010 1:08 am Post subject: RE:Turing in C++ |
|
|
But there's still an issue, as Dan pointed out, that you will not get this past Apple's approval process. Also, I'm not sure why I would want to _write_ Turing code on an iPad. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Sponsor Sponsor

|
|
 |
mirhagk
|
Posted: Sat Aug 14, 2010 7:07 am Post subject: Re: RE:Turing in C++ |
|
|
Tony @ Sat Aug 14, 2010 1:08 am wrote: But there's still an issue, as Dan pointed out, that you will not get this past Apple's approval process. Also, I'm not sure why I would want to _write_ Turing code on an iPad.
dang, I thought that might be a problem, wasn't sure what their rules were. I'll look more into to double check, but basically I would want the ability to not only develop games VERY easily for it, but I also would like to be able to check my ideas for algorithmns and things at any time.
Okay well I am still going to build the scripted version for practice, but I'll put more focus back into building the commands into C++ (actually I started doing it in XNA, since that is a LOT easier to use, and would encourage people to go above and beyond the library I create. |
|
|
|
|
 |
DemonWasp
|
Posted: Sat Aug 14, 2010 11:38 pm Post subject: RE:Turing in C++ |
|
|
Notably, C++ isn't a strict superset of C, because C++ reserves additional keywords. The following file will compile in gcc, but not in g++:
code: |
int main ( int argc, char ** argv ) {
int class;
}
|
|
|
|
|
|
 |
andrew.
|
Posted: Sun Aug 15, 2010 10:00 am Post subject: Re: RE:Turing in C++ |
|
|
Tony @ Sat Aug 14, 2010 1:08 am wrote: But there's still an issue, as Dan pointed out, that you will not get this past Apple's approval process. Also, I'm not sure why I would want to _write_ Turing code on an iPad.
Or you can do what some others have done and hide features in your app. Apple doesn't look at the source, they only try the app to see if it violates their rules.  |
|
|
|
|
 |
Insectoid

|
Posted: Sun Aug 15, 2010 10:49 am Post subject: Re: RE:Turing in C++ |
|
|
andrew. @ Sun Aug 15, 2010 10:00 am wrote: Tony @ Sat Aug 14, 2010 1:08 am wrote: But there's still an issue, as Dan pointed out, that you will not get this past Apple's approval process. Also, I'm not sure why I would want to _write_ Turing code on an iPad.
Or you can do what some others have done and hide features in your app. Apple doesn't look at the source, they only try the app to see if it violates their rules. 
Just don't let Gizmodo hear about it. |
|
|
|
|
 |
mirhagk
|
Posted: Sun Aug 15, 2010 4:06 pm Post subject: RE:Turing in C++ |
|
|
lol so then I just gotta come up with a reason for the app other than running Turing code. Um also how far is compiling, like for instance, a program reading a file that tells it how to generate a map, is that compiling, how about a program that reads a file that describes a mission in the game? Or something that reads a file to desribe AI behaviour? Or something that reads commands on how to run a certain program?
Is a scripter for Turing allowed as long as the user can't make code? Is something akin to RPG maker allowed? |
|
|
|
|
 |
TheGuardian001
|
Posted: Sun Aug 15, 2010 5:40 pm Post subject: Re: Turing in C++ |
|
|
Nothing that allows the creation of another application (either by compilation, or by interpretation) will get in.
Reading a file used in your program may be allowed (I'm not sure how iPhone apps keep track of data,) However it would not be allowed to be edited by the user directly.
A scripter is useless if the code cannot be modified (You're just making an open source App at that point.) RPGMaker style things would probably be allowed provided they did not provide a way to export the content as an App, or allow direct access to the iPhone API (So the RPGMaking segment, yes, the RGSS scripting segment, no.)
All of this is just my opinion based on what I've heard of Apple's rules though. For all I know, they might block out pretty much anything the user can fully customize. |
|
|
|
|
 |
DtY

|
Posted: Mon Aug 16, 2010 12:19 pm Post subject: Re: Turing in C++ |
|
|
TheGuardian001 @ Sun Aug 15, 2010 5:40 pm wrote: (I'm not sure how iPhone apps keep track of data,) You can include files in the app bundle (for read only), or there is somewhere on the filesystem that your app can read and write to (there's one that's specific to the app, and another that is common to all).
Apple rejects any applications that aren't written in objective c, but I have no idea how they figure out what is and what isn't. |
|
|
|
|
 |
|
|