Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing -> C++ translator
Index -> Programming, Turing -> Turing Help
Goto page 1, 2, 3  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jake




PostPosted: Sun Mar 12, 2006 6:43 pm   Post subject: Turing -> C++ translator

I've been writing a turing to c++ translator the last few days, and I'm well on the way to having the entire base language (not the subprograms like Draw etc) done.

I was wondering if anyone has heard of a preexisting program that does this? I searched a lot first, and couldn't find one (or any Turing sites for that matter) I hope there isn't Razz
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Mon Mar 13, 2006 12:02 am   Post subject: (No subject)

Likely not. Not sure why you'd want to do this, it's like scanning in a printout from a dot-matrix printer and then reprinting it in a laserjet. Sure it'll work and do the job...but the laserjet can really do *so* much more.
Jake




PostPosted: Mon Mar 13, 2006 1:31 pm   Post subject: (No subject)

My reasons:
1. Turing is slow. Recompiling it into c++ would speed stuff up by a factor of a bajillion (I'm thinking more for graphical stuff, having drawfillbox draw an OpenGL quad would be hella cool)
2. It would help some people I know learn c++ if they can see their code redone in it.
3. I'm bored, and it's fun

Anyways, thanks.
MysticVegeta




PostPosted: Mon Mar 13, 2006 2:38 pm   Post subject: (No subject)

The OGL part is going to be hard I can tell you that if you have never dealth with Turing drawing fcns. But if you have good knowledge of turing which you say you do, you should do pretty good, as for me, I would really suck at doing this because I have really low level of C++ knowledge, but good luck Razz
person




PostPosted: Mon Mar 13, 2006 2:55 pm   Post subject: (No subject)

I think what you're doing is actually a really great idea to help people learn a new language. I remember when I first learnt java, there was this turing to java/java to turing translator that helped me a lot (but it was a little buggy). But anyways good luck, and can you please submit the completed version when your done? I'm really eager to see the result. Thanks, and good luck.
MysticVegeta




PostPosted: Mon Mar 13, 2006 7:28 pm   Post subject: (No subject)

person wrote:
turing to java/java to turing translator
Java to Turing translator would be impossible for most of the things because Java capabilities are far more greater than turing.
person




PostPosted: Mon Mar 13, 2006 7:48 pm   Post subject: (No subject)

Quote:
Java to Turing translator would be impossible for most of the things because Java capabilities are far more greater than turing.


Same with Turing to C++.
MysticVegeta




PostPosted: Mon Mar 13, 2006 7:54 pm   Post subject: (No subject)

no, all fcns made in turing exist in C++ I think you mean C++ to Turing
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Mon Mar 13, 2006 8:41 pm   Post subject: (No subject)

I was actually considering writing something like that a year ago. It didn't seem too difficult. Especially the graphics, since you just translate the Turing graphics calls to SDL/OpenGL calls.

And bam. You'd have a free Turing compiler that's faster, can do 3D graphics, and it's cross platform.

But it's still Turing. What have you gained? A way to let people use a bad language quicker. Not really the greatest solution.
Imm0rtal




PostPosted: Mon Mar 13, 2006 9:35 pm   Post subject: (No subject)

Ironically.. I was told that the turing compiler actually translates all its code into C++ and creates a sort of C++ run enviroment.

Also why bother reinventing the wheel.. if you have the ability to write all the C++ functions that associate with Turing.. why bother with turing in the first place.

C++ syntax is a annoying but you miss the whole point. C++ is unlike other languages such as basic/turing for a good reason. This is the same reason it is the most used language for most professional software.

But then.. what the hell do I know Rolling Eyes
[Gandalf]




PostPosted: Tue Mar 14, 2006 1:11 am   Post subject: (No subject)

One advantage I can see is that it would be a good way to convince former Turing users to switch to another language (C++ in this case). Many people learn best by example, and this would definately provide them with a structure for learning by comparison. Yes, C++ is not best to go into directly after Turing, but who said they can't learn a language in between.
Imm0rtal




PostPosted: Tue Mar 14, 2006 1:44 am   Post subject: (No subject)

[Gandalf] wrote:
One advantage I can see is that it would be a good way to convince former Turing users to switch to another language (C++ in this case). Many people learn best by example, and this would definately provide them with a structure for learning by comparison. Yes, C++ is not best to go into directly after Turing, but who said they can't learn a language in between.


Turing is a good intro for C++ as they work similar.. not = is more annoying then != but it does simplify the syntax.. I GUESS..

Note that Turing gets you away from the drag and drop Microsoft Only Basic languages (VB?).. Don't shoot yourself in the foot kids.. Linux users need software too.. Learn C++/ASM
[Gandalf]




PostPosted: Tue Mar 14, 2006 1:58 am   Post subject: (No subject)

Turing and C++ work similarily? How so? Just because Turing was created in C++ does not mean the languages are the same, or similar.

Also:
Turing not= is the same as
C++ != is the same as
Turing ~=
Dan




PostPosted: Tue Mar 14, 2006 2:01 am   Post subject: (No subject)

Acatualy, tho this may not be ture for newer versons, turing dose/used to just trasalte in to VC++ and then compie it. This is why turing is/was a psdo-code gnerator and not a real progaming langue.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Imm0rtal




PostPosted: Tue Mar 14, 2006 2:06 am   Post subject: (No subject)

Hacker Dan wrote:
Acatualy, tho this may not be ture for newer versons, turing dose/used to just trasalte in to VC++ and then compie it. This is why turing is/was a psdo-code gnerator and not a real progaming langue.


Tis true.

Also note alot of the syntax is similar in how it works Example: you can create your own functions and procedures in Turing. You are mostly dealing with just code.
(IE no buttons you righ click on then type Text1.text = "hello World")

Yes you don't need to be as specific with turing. You don't need parameters or semicolons. The commenting works the same way.. so what?

I wasn't saying they were similar only that its a good introduction for someone who has never seen C++ before. They share common methods of thinking even if turing is much more generous as far as errors go.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 3  [ 32 Posts ]
Goto page 1, 2, 3  Next
Jump to:   


Style:  
Search: