Posted: Wed Nov 16, 2011 5:07 pm Post subject: Open Turing - 20-40% Faster Open Source Version of Turing With New Features
Open Turing - Faster, Open Source Turing
Open Turing is an open-source implementation of Turing for Windows. I (Tristan Hume) acquired the source code from Tom West, the last maintainer of the project. It is backwards-compatible with normal Turing.
I have made some improvements to help adoption. These include speed improvements and 3D support.
Also, most of the icons, images, splash screen etc. have been rebranded.
Partial change log:
-Up to a 40% speed increase. (depends on program)
-Built in hash maps
-Basic OpenGL 3D. Beta, no input.
-Command line invocation with turing.exe -run file.t
-New splash and logo
-Huge speed increases in Pic.ScreenLoad (caching)
How To Get It / Contribute
The project is hosted on Github. On the Github page you can find updated and more complete information.
All documentation on contributing, turing internals and how to use the new features will be on the Github page.
Posted: Wed Nov 16, 2011 5:21 pm Post subject: Re: Open Turing - 20-40% Faster Open Source Version of Turing With New Features
Wow! Seems very interesting.
DemonWasp
Posted: Wed Nov 16, 2011 5:25 pm Post subject: RE:Open Turing - 20-40% Faster Open Source Version of Turing With New Features
I haven't taken a thorough look yet, but this seems to be excellent. Well done!
Although I have to say that I was disappointed when the first file I opened contained:
code:
#include <setjmp.h>
How do I look at the original Turing source code on GitHub?
trishume
Posted: Wed Nov 16, 2011 6:21 pm Post subject: Re: RE:Open Turing - 20-40% Faster Open Source Version of Turing With New Features
DemonWasp @ Wed Nov 16, 2011 5:25 pm wrote:
I haven't taken a thorough look yet, but this seems to be excellent. Well done!
Although I have to say that I was disappointed when the first file I opened contained:
code:
#include <setjmp.h>
How do I look at the original Turing source code on GitHub?
What do you mean by "original"? I haven't made many modifications.
Yes, the code is very old and gives thousands of warnings. At least the code is generally well commented.
Although lots of the code is compiled from Turing Plus into C. Meaning it's garbage and confusing with no comments.
[Gandalf]
Posted: Wed Nov 16, 2011 7:02 pm Post subject: RE:Open Turing - 20-40% Faster Open Source Version of Turing With New Features
I've been waiting for this moment a long time. Very nice!
Quote:
What do you mean by "original"? I haven't made many modifications.
I assume the initial commit was the source code you got from Tom West? You can find that source tree here.
SNIPERDUDE
Posted: Wed Nov 16, 2011 7:45 pm Post subject: RE:Open Turing - 20-40% Faster Open Source Version of Turing With New Features
*gasp!* Is that you Gandalf?
Back on topic: I have been waiting for this for so long, I have completely forgotten about it. Tears.
trishume
Posted: Wed Nov 16, 2011 8:16 pm Post subject: Re: Open Turing - 20-40% Faster Open Source Version of Turing With New Features
OOPS! Release Snafu!
One of my friends found a bug in my Pic.ScreenLoad caching implementation. I was using a flawed hash map implementation.
I just switched to a battle-tested hash-map that appears to work.
Anyone who has downloaded it so far must re-download if they want Pic.ScreenLoad to work
The new Pic.ScreenLoad caches loaded files because in my experience beginner turing programmers often using pic.screenload every frame in their games, which is slow.
Caching adds a 10000% speed increase.
Interesting Fact: The 20-40% speed increase in general was caused by me turning on optimization in the compiler. The original guy compiled all previous releases of turing in debug mode.
trishume
Posted: Wed Nov 16, 2011 8:32 pm Post subject: Re: Open Turing - 20-40% Faster Open Source Version of Turing With New Features
Also, I'm not sure that the initial commit is exactly what I got from Tom, but it is close.
Anyway, If you want to help out, fork the development branch and work on things in the issues tab / anything you want. Then submit a pull request.
I particularly dislike how it's PicModule like approach. It also makes you limited to 1000 IntHashMaps.
trishume
Posted: Thu Nov 17, 2011 10:43 pm Post subject: RE:Open Turing - 20-40% Faster Open Source Version of Turing With New Features
Tony that's because everything without an "ed" or "mio" or "mdio" prefix is compiled from Turing Plus into C. Code generated by programs is never pretty. I believe the original turing plus and the compiler have been lost.
In terms of hashmaps that is because the external system does not allow easy OO. I plan on writing an OO wrapper for hashmaps, possibly one that uses #if OPENTURING to fall back on a turing hashmap implementation.
The reason it uses IDs is that it was easy an it prevents people from messing things up. I they were given pointers they could manipulate them and cause segfaults.
I believe that was the original idea for using IDs for pictures and things. If 1000 isn't enough the limit can be changed through some defines, at the cost of more memory usage.
Tony
Posted: Thu Nov 17, 2011 10:49 pm Post subject: RE:Open Turing - 20-40% Faster Open Source Version of Turing With New Features
I don't approve of the "assign by reference" approach. That is
code:
IntHashMap.Get (map, "key", res)
vs
code:
res = IntHashMap.Get (map, "key")
I think I can live with it returning NULL (that is, 0) on missing keys, especially if
code:
function IntHashMap.containsKey(map, key) : boolean
is added.
I'd want to write code such as
code:
var hashed_strings : array 1..2 of string := init("one", "two")
var map : int := IntHashMap.New()
for i:1..2
IntHashMap.Put (map, intstr(i), i)
end for
% watch this magic
put "number 2 is: ", hashed_strings(IntHashMap.Get(map, intstr(2)))
%> "number 2 is: two"
In this case NULLs (0s) would just throw array-out-of-bound exceptions. Alternatively I can check for the return value just as well as I would need to check the flag.
I would also accept optional by-reference flag variable, if distinguishing NULLs from legitimate 0s is an absolute must.
Posted: Sat Nov 19, 2011 6:32 am Post subject: RE:Open Turing - 20-40% Faster Open Source Version of Turing With New Features
Perhaps some one should read through the machine generated code, and try to rewrite/comment it. This project could take off but that section of the code needs to be turned into something that people can actually work on.
I'll try to do this, but I can't guarantee anything for the next week or so.
Also I think perhaps the project should turn into 2 branches. One that is a fully 4.1 compatible compiler, with bug fixes, maybe a few new features, speed improvements etc. I'd also like to see a new version arise that is a breaking update. 4.1 programs may or may not run, but we can get rid of a lot of the stuff we don't like, fix things we thing need fixing etc.
Specifically, the number of images/hashmaps/musicfiles or whatever should never be fixed. Obviously you can't allocate an array of a million for each turing program, but I think that an expanding array of pointers to images would be great, as it could be predefined as 1000, and going over that would just mean that it takes a while to load the 1001st image, which isn't an issue as the loading itself will be MUCH more expensive.