Author |
Message |
trishume
|
Posted: Fri Jul 01, 2011 10:08 am Post subject: Turing Interpreter - ICS3U Final Project |
|
|
For my grade 11 programming final project/summative/ISU this year I implemented turing in turing. It also includes an editable, multi-line textbox that some people might find useful.
It can run simple turing programs but it doesn't have arrays or object orientedness. It comes with a bunch of example programs that it can run, including someone else's final project. Meta major project!
The full project includes media and the parser which is generated in java. It's about 23,000 lines in total.
But I only wrote 5,000 lines.
The rest are generated. About 10,000 were generated by the antlr parser generator.
Another 7,000 were generated by a ruby program that I wrote that parses the turing documentation and turns it into interfaces.
I also took the liberty of changing some of the things I don't like about turing. I made it dynamically typed. You don't have to declare any variables, or record fields. Just assign to them.
There's more information in the advertising I had to submit:
http://tristan.hume.ca/tint/
The github page has the download and more info:
https://github.com/trishume/TuringInTuring
What do you think of it. Feedback is appreciated.
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Fri Jul 01, 2011 12:39 pm Post subject: RE:Turing Interpreter - ICS3U Final Project |
|
|
Tristan Hume (with help from linecount.sh) wrote:
Around the same number of lines of good code as Adam Bielinski's Forces.
great testimonial quote!
Since everything on GitHub comes from an "Initial Commit", have you been developing all of this without source control (or just elsewhere)?
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
trishume
|
Posted: Sun Jul 03, 2011 6:54 pm Post subject: Re: RE:Turing Interpreter - ICS3U Final Project |
|
|
Tony @ Fri Jul 01, 2011 12:39 pm wrote: Tristan Hume (with help from linecount.sh) wrote:
Around the same number of lines of good code as Adam Bielinski's Forces.
great testimonial quote!
Since everything on GitHub comes from an "Initial Commit", have you been developing all of this without source control (or just elsewhere)?
I've been developing it off of my USB key for a couple months. So that I could work on it in programming class and occasionally at home.
If you look at the rest of my repos on github you will notice that everything is an initial commit.
I have just started moving some of my code to github in the last few days.
It's too bad turing and perl share an extension. It means you can't find other people's turing code on github. It all gets written off as perl.
Have you tried running it? What do you think?
|
|
|
|
|
|
Tony
|
Posted: Sun Jul 03, 2011 7:36 pm Post subject: Re: RE:Turing Interpreter - ICS3U Final Project |
|
|
trishume @ Sun Jul 03, 2011 6:54 pm wrote: It means you can't find other people's turing code on github.
I doubt that there is any other Turing code on GitHub...
I didn't actually run this, as I no longer have CrossOver on my computer.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
trishume
|
Posted: Mon Jul 04, 2011 7:42 am Post subject: Re: RE:Turing Interpreter - ICS3U Final Project |
|
|
Tony @ Sun Jul 03, 2011 7:36 pm wrote: trishume @ Sun Jul 03, 2011 6:54 pm wrote: It means you can't find other people's turing code on github.
I doubt that there is any other Turing code on GitHub...
I didn't actually run this, as I no longer have CrossOver on my computer.
If you look at my advertising screenshot you will see that it is from a mac.
You can download Wine for mac and it runs excellently, for free!
|
|
|
|
|
|
trishume
|
Posted: Mon Sep 05, 2011 6:53 pm Post subject: Re: Turing Interpreter - ICS3U Final Project |
|
|
Screenshot and zip file:
[/img]
Description: |
|
Download |
Filename: |
TuringInTuring.zip |
Filesize: |
13.79 MB |
Downloaded: |
191 Time(s) |
|
|
|
|
|
|
Insectoid
|
Posted: Mon Sep 05, 2011 8:05 pm Post subject: RE:Turing Interpreter - ICS3U Final Project |
|
|
Why hasn't this gotten more attention? I can't run it (same deal as Tony, and my CiderX/WineX/CXZ engines conflict with Wine) but it looks like you put a fair amount of effort in. It might well be one of the highest-quality submissions we've gotten, and perhaps THE highest-quality non-game submission (I can't confirm that though).
|
|
|
|
|
|
ProgrammingFun
|
Posted: Mon Sep 05, 2011 8:39 pm Post subject: Re: Turing Interpreter - ICS3U Final Project |
|
|
Insectoid @ Mon Sep 05, 2011 8:05 pm wrote: Why hasn't this gotten more attention? I can't run it (same deal as Tony, and my CiderX/WineX/CXZ engines conflict with Wine) but it looks like you put a fair amount of effort in. It might well be one of the highest-quality submissions we've gotten, and perhaps THE highest-quality non-game submission (I can't confirm that though). I definitely agree! This program is amazing and IMO, it should be included on the official Turing page. Great work, I'm gonna try to run my old Turing project on it when I find the time (will post here when done).
I think it would be awesome if we could get a interpreter for Turing built on another language (just a thought).
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Insectoid
|
Posted: Mon Sep 05, 2011 9:18 pm Post subject: Re: Turing Interpreter - ICS3U Final Project |
|
|
ProgrammingFun @ Mon Sep 05, 2011 8:39 pm wrote: Insectoid @ Mon Sep 05, 2011 8:05 pm wrote: Why hasn't this gotten more attention? I can't run it (same deal as Tony, and my CiderX/WineX/CXZ engines conflict with Wine) but it looks like you put a fair amount of effort in. It might well be one of the highest-quality submissions we've gotten, and perhaps THE highest-quality non-game submission (I can't confirm that though). I definitely agree! This program is amazing and IMO, it should be included on the official Turing page. Great work, I'm gonna try to run my old Turing project on it when I find the time (will post here when done).
I think it would be awesome if we could get a interpreter for Turing built on another language (just a thought).
http://compsci.ca/v3/viewtopic.php?t=16008
Unfortunately the project has stalled.
|
|
|
|
|
|
mirhagk
|
Posted: Mon Sep 05, 2011 11:01 pm Post subject: RE:Turing Interpreter - ICS3U Final Project |
|
|
Yes insectoid, but that was a compiler, this is an interpreter (an easier project, albeit still very difficult)
|
|
|
|
|
|
trishume
|
Posted: Tue Sep 06, 2011 3:55 pm Post subject: Re: Turing Interpreter - ICS3U Final Project |
|
|
My posting the screenshot was a covert bump. No one had looked at it because it was summer.
The thing about writing it in another language is that the standard library is huge. I just wrote a ruby program to parse the docs and write 5000 lines of wrapper code for the library functions.
5000 lines without even implementing any of the library!
It currently has small incompatibilities that break most programs. Because it of dynamic typing ,equivelant syntax for arrays and functions and time constraints I couldn't do arrays or objects
Reals and ints are also have no coercion. You have to write 3.5 * 100.0 instead of 3.5 * 100. (look at the 3D sphere demo for how reals work)
There are also various problems with keyboard detection difference (look at the vervoot major project demo for keyboard detection)
In general: dynamic typing was not a perfect conversion and I did not have time to fix the problems and add important things like arrays.
|
|
|
|
|
|
mirhagk
|
Posted: Tue Sep 06, 2011 6:39 pm Post subject: RE:Turing Interpreter - ICS3U Final Project |
|
|
I think I am going to look into this code, and look into creating a Turing interpreter in another language.
|
|
|
|
|
|
trishume
|
Posted: Tue Sep 06, 2011 6:58 pm Post subject: Re: Turing Interpreter - ICS3U Final Project |
|
|
good luck mirhagk.
Implementing all 320+ library functions will take a long time. Implementation of the interpreter will be easier in some other language though.
|
|
|
|
|
|
[Gandalf]
|
Posted: Tue Sep 06, 2011 7:38 pm Post subject: Re: Turing Interpreter - ICS3U Final Project |
|
|
trishume @ 2011-09-06, 6:58 pm wrote: good luck mirhagk.
Implementing all 320+ library functions will take a long time. Implementation of the interpreter will be easier in some other language though.
You could always leave the libraries implemented in Turing, at least for a start.
I took a look, nice project! Though it needs some work before being practically usable as a Turing-ish interpreter. You deserve bonus points for hosting it on github.
|
|
|
|
|
|
mirhagk
|
Posted: Wed Sep 07, 2011 8:42 am Post subject: RE:Turing Interpreter - ICS3U Final Project |
|
|
Gandalf has a point with leaving the library functions implemented in Turing. They can be slowly implemented in the interpreter itself as I go along, and decide that something is more critical etc. For instance things that relate to drawing should be implemented in the interpreter.
|
|
|
|
|
|
|