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 Previous  1, 2, 3  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
[Gandalf]




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

Sigh... I suggest you learn some more languages, and learn more about programming languages. Any decent programming language (in the 1000s out there) will allow you to create your own functions (or methods, whatever you wish to call them). Most languages only work with code, at least in the sense that I believe you mean it, not centering around GUIs like VB. Many programming languages use /* */ to signify multi-line comments, not just C++ and Turing.

Turing and C++ "share common methods of thinking" about as much as dozens of other languages share them with C++ (as an example). I believe you will find any procedural programming language shares "common methods of thinking" with Turing in many ways.
Sponsor
Sponsor
Sponsor
sponsor
Imm0rtal




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

[Gandalf] wrote:
Sigh... I suggest you learn some more languages, and learn more about programming languages. Any decent programming language (in the 1000s out there) will allow you to create your own functions (or methods, whatever you wish to call them). Most languages only work with code, at least in the sense that I believe you mean it, not centering around GUIs like VB. Many programming languages use /* */ to signify multi-line comments, not just C++ and Turing.

Turing and C++ "share common methods of thinking" about as much as dozens of other languages share them with C++ (as an example). I believe you will find any procedural programming language shares "common methods of thinking" with Turing in many ways.


Very true sir. But how many of those languages hold the simplicity of Turing which what were discussing.. an introduction into C++ or programming in general.

You won't learn C++ by programming in C# (Well Maybe...) or Python. Yes many languages hold similar rules but at that point.. what is the point? Eventually you need to dive into C++ and if you understand the core rules of how software is made its time to pull up your Managed C++ .Net Developement book and start learning about libraries and namespaces.

Haha just joking.. .NET is from Satan. Honestly though you only need so much information before its time to crack down and learn. If you are not capable of that then perhaps Software engineer isn't the profession for you. If you think the boat is stopping at C++ and we are gonna be using that in 15 years from now.. Oh my. Twisted Evil

I agree with you fully.. but would having turing commands translated into a console really be THAT usefull? I mean theres only so many different ways you can see printf before you have had enough and want to actually learn C++ instead of C&Ping out of a notepad.
[Gandalf]




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

My point has already been made.

Turing will not teach you, or introduce you to C++ any better than Pascal, Python, Ruby, or anything else. Probably less so in most cases.

As for the rest of your post... Were we ever talking about "cracking down and learning"? I don't recall so. Did I ever say the boat stops at C++? I believe far from it. We were not talking about just converting text output and input to the console, but converting the whole interpreter into something which will also allow you to see the coresponding C++ code.

Really, this is veering off of what I meant in the first place. Something like this would no doubt be useful, but in the long run, if you want something new after Turing, go learn Ruby or some other language of your choosing from the start.
MysticVegeta




PostPosted: Tue Mar 14, 2006 10:52 am   Post subject: (No subject)

Also, if you are doing Turing to Java or C++, then you would have to know what packages to import before hand you convert the code and also know more about different classes in Java, wtd would be I guess the bestperson to learn this from.
Imm0rtal




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

[Gandalf] wrote:
My point has already been made.

Turing will not teach you, or introduce you to C++ any better than Pascal, Python, Ruby, or anything else. Probably less so in most cases.

As for the rest of your post... Were we ever talking about "cracking down and learning"? I don't recall so. Did I ever say the boat stops at C++? I believe far from it. We were not talking about just converting text output and input to the console, but converting the whole interpreter into something which will also allow you to see the coresponding C++ code.

Really, this is veering off of what I meant in the first place. Something like this would no doubt be useful, but in the long run, if you want something new after Turing, go learn Ruby or some other language of your choosing from the start.


Some people started with Assembly/ C++
[Gandalf]




PostPosted: Tue Mar 14, 2006 7:02 pm   Post subject: (No subject)

Great for them, but I doubt it was the best, or easiest way to go about things. A large reason for higher level programming languages is to provide a better way of introducing programming to people.
MysticVegeta




PostPosted: Tue Mar 14, 2006 7:58 pm   Post subject: (No subject)

I agree with Gandalf, to start off, ASM/Java/C++ would not be the best way, even Turing wont be, I would say Pascal, Python, VB and Ruby would be good.
Imm0rtal




PostPosted: Wed Mar 15, 2006 1:30 pm   Post subject: (No subject)

MysticVegeta wrote:
I agree with Gandalf, to start off, ASM/Java/C++ would not be the best way, even Turing wont be, I would say Pascal, Python, VB and Ruby would be good.


Depending how you look at it. Python could be harder then C++. Thats just my opinion.
Sponsor
Sponsor
Sponsor
sponsor
Jake




PostPosted: Wed Mar 15, 2006 4:48 pm   Post subject: (No subject)

Heh, I'm gone for a day or two and this breaks out..

Okay, I think I'll clarify what I'm doing...

The project is written in C++. It opens up a turing .t file, parses it into a heirechy of classes (I'm normally very suspicious of OO, but it works magically here) An example of a class:

class function
-funcName
-typeSpec (e.g. int, float whatever)
-array of arguments
-subheiercy of other elements (the code in that function)

When parsing a file, say it comes across "function" at the beginning of a line. It creates a new function element, and tells that function to parse whats inside its code. So it's very recurssive.

For those wondering about the Draw subprogram thing, all it is in Turing (check your installations) is a module thats included in every program, with all (well most i think...) of the functions declared extern. i.e. they are in a seperate library created by holtsoft and not programmed in Turing. So, all I've got to do is write a replacement library, and that Draw module will parse (as it is included in every program) each time, and it will link to my library, no ugly hacks. OpenGL won't be a problem, especially with 2D stuff, I've got extensive experience using OpenGL/SDL, so it will be cross platform as well (I'm coding this on a Mac, and testing it at school on Windows)

The hardest part is forcing myself to check code for errors. It's really boring but must be done.

Since there seems to be at least some people interested, I'll make sure to link to the eventual release here.

1.0 will include support for (most of) the base language, and the Draw subroutine (and possibly a few others like Font and Pic) The code will be available +binaries, and the code will be under the BSD license if anyone wants to use it (can't see why tho)

Shouldn't be too long, a month at tops before I've got something out.

The "site" is http://ieatcrayons.net/turingplusplus

If anyone has an suggestions I'd love to hear them (keep in mind I'm not changing the language *at all*, if theres something like an artificial limitation in some part of Turing you don't like I probably won't change it for compatibility reasons)

p.s. Thank you Holtsoft for such an amazing documentation of your language. You made it all too easy.[/url]
Imm0rtal




PostPosted: Wed Mar 15, 2006 6:55 pm   Post subject: (No subject)

Makes a fun Proof Of Concept. I will likely download it.. But excuse me if I still don't see the point. Very Happy
wtd




PostPosted: Wed Mar 15, 2006 7:28 pm   Post subject: (No subject)

To really pull this off you'll have to write a complete Turing parser. That is not a trivial task, since Holtsoft does not make Turing open source and one cannot therefore be privy to a full, modern Turing grammer.

Please see the following Lambda the Ultimate discussion on transforming code written in one language into another.

http://lambda-the-ultimate.org/node/1255
Jake




PostPosted: Wed Mar 15, 2006 8:08 pm   Post subject: (No subject)

Thanks for the reply!

Even though Turing isn't opensource, the helpfile/book it comes with has a complete description of the language (and subprograms) with a full description of syntax and what not, it's really fabulous.

If it were any other language I wouldn't dare even think of trying it, but Turing was designed to be very simple + easy to learn, its almost english looking, and consequently very easy to parse.

The hardest part is the sheer volume. The core of Turing isn't that big, but it's still a daunting task Smile
[Gandalf]




PostPosted: Thu Mar 16, 2006 12:22 am   Post subject: (No subject)

A challenge will be to actually make the C++ code understandable, and not filled with too much overhead.

If you need testers, or some help with a specific function, I'll make every effort to help. Really, this will require quite a thorough understanding of most of the functions in Turing, for example, who ever uses condition? or tag? There are quite a few of these.

Good luck, I hope you are successful. Smile
Martin




PostPosted: Thu Mar 16, 2006 1:59 am   Post subject: (No subject)

C++ is an awful language (there wtd, I said it) and is slowly dying out in favour of more modern languages (such as Java), especially in server applications. Really, don't bother with it. Learn C instead, or a fun language like Ruby or Haskell - you'll learn way more.
Jake




PostPosted: Thu Mar 16, 2006 11:34 am   Post subject: (No subject)

Thanks Gandalf! I'll keep that in mind! Your right, the hardest part is making it readable to humans. OpenGL and its state machine nature isn't very "readable" when Turing is converted to it (since put etc have to be drawn on the opengl layer, it just looks horribly messy) I'm thinking of ditching OpenGL and just doing the graphics software-side.

Martin, I'm not going to get into a language pissing match, but you clearly don't understand what you're talking about. C++ is as widely used as it ever is, and Java is definantly not succeding it, at least not any time soon. I don't understand why you would say to learn C instead of C++, since C++ is just like a v2.0 of C, it's just as fast and can do everything C can, plus more. C is dying out to C++, if anything. Anyways peace. Language preference is up to the individual.
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 2 of 3  [ 32 Posts ]
Goto page Previous  1, 2, 3  Next
Jump to:   


Style:  
Search: