Computer Science Canada

The Turing Initiative

Author:  StealthArcher [ Tue Mar 04, 2008 11:03 pm ]
Post subject:  The Turing Initiative

Posted Image, might have been reduced in size. Click Image to view fullscreen.

Even with the current stagnation of the OpenT project, and my inability to help, I have coem up with a project for myself and anyone who wishes to join in.
The Turing Initiative,dedicated to giving the language Turing, whether in 4.1.1 or opent, one last breath of air.
It involves several partial projects, which include as below:

TPhoTo: Contains: HBM Converter, Modules for format extension
-Will contain the HBMConverter, hopefully finished it will be able to compress and encrypt all of your photo needs.
-Modules added to facilitate easier picture use, as well as allow PNG format usage.

TPainT: Program only
-Fully functional paint image program, capable for full 24 bit color.
-Hopefully with TPhoTo, will be able to save in png, as well as bmp, jpg, gif, and hbm.

TNeT: Program
-Probably impossible, but I'd like to try
-Fully functional net browser compatible with XHTML and CSS.

TGamE: Modules Classes and functional components.
-Classes and modules for creation of games easier in method.
-Allows expansion for extensions made by the user.

TChesS: Program
- Made with TGamE, both to show it's power, and capabilities of AI with turing,

TDaTa: Program
-Functional database program complete with wizards, and tables. (Don't say a word Mazer, or any other D&D players.)

TRuby:Modules and Program
-My most hopeful of the projects.
-Fully functional basic ruby compiler in turing.
-Complete with interactive ruby basics, hopefully teaching kids one language as they learn another.


My way of helping, seeing as I cannot yet figure out compiler theory.

Author:  Clayton [ Tue Mar 04, 2008 11:10 pm ]
Post subject:  RE:The Turing Initiative

Could you not think of something a bit more original for the names? This feels like so many other names that it makes me sick.

Author:  StealthArcher [ Tue Mar 04, 2008 11:12 pm ]
Post subject:  RE:The Turing Initiative

I will probably later, this is just a starting project. You yourselves even said you probably wouldn't stick with OPENT as a name.

Author:  Tony [ Tue Mar 04, 2008 11:56 pm ]
Post subject:  Re: The Turing Initiative

StealthArcher @ Tue Mar 04, 2008 11:03 pm wrote:

-Fully functional basic ruby compiler in turing.

The caveat to being turing complete is that it doesn't account for efficiency of either resources or effort. Can you think of a way to implement something like
Ruby:

(1..100).inject(&:+)

how about
Ruby:

def learn(name, &block)
   self.class.send(:define_method, name, &block)
end


Just some interesting code sniplets I came across recently.

Author:  StealthArcher [ Wed Mar 05, 2008 11:16 am ]
Post subject:  RE:The Turing Initiative

Well, I didn't say it would be the greatest compiler ever, just basics. However, if I could figure out how to add those...., hmmmm.

Author:  Tony [ Wed Mar 05, 2008 11:28 am ]
Post subject:  RE:The Turing Initiative

oh, and the thing is... Ruby is not compiled, it's interpreted. You could modify live code, runtime.

Ruby:

self.class.send(:define_method, name, File::open("remote_file", "r").read)


Smile

Author:  StealthArcher [ Wed Mar 05, 2008 11:31 am ]
Post subject:  RE:The Turing Initiative

Isn't turing also interpreted though? Though I know modifying the code does not allow you to chage operation runtime.

Author:  Mackie [ Wed Mar 05, 2008 12:09 pm ]
Post subject:  RE:The Turing Initiative

I'm sure I can help. Well see how much time I have. What do you want me to start on?

Author:  StealthArcher [ Wed Mar 05, 2008 12:13 pm ]
Post subject:  RE:The Turing Initiative

Actually your gradient module was something I was going to ask for to put in TGamE(I KNOW I KNOW CLAYTON THE NAME SUCKS.).

I hope to maybe even allow for basic 3d games once it's finished. (probably too hopeful, but my understanding of turing is better than a year ago.)

Author:  Tony [ Wed Mar 05, 2008 12:26 pm ]
Post subject:  Re: RE:The Turing Initiative

StealthArcher @ Wed Mar 05, 2008 11:31 am wrote:
Isn't turing also interpreted though?

No.

Author:  StealthArcher [ Wed Mar 05, 2008 1:25 pm ]
Post subject:  RE:The Turing Initiative

So it isn't interpreted, hmmm.

Well, any ideas on how to implement it Tony?
You know ruby far better than I do.

Author:  Mackie [ Wed Mar 05, 2008 5:45 pm ]
Post subject:  RE:The Turing Initiative

Alright, so far on TNet (Name Suggestions?):
code:

<b>
<i>
<u>
<html>
<title>
<br>

All pretty much work. Although using more than one style tag still needs some work. It is currently 50 or so lines. And of course you can enter the desired address. I was sick today so I decided to get started.

Author:  StealthArcher [ Wed Mar 05, 2008 6:13 pm ]
Post subject:  RE:The Turing Initiative

Sweet stuff.

As for the names I was going to do a mock version of 'tea' related names, just to bug Clayton. TNeT was going to be 'Steep'. Very Happy

As for the names changes, I've so far got:

TRubY-Gleam
TGamE-Toybox
TPhoTo- Megapix
TNeT- Don't know yet, was considering Ocean.
TChesS- King's Guard
TDaTa- Tony's Mind(not), I don't really know this one yet either.
TPainT- eh... Braque maybe? I would do hitler, as his art was nice, but I think that would offend some people, and it would be illegal in germany.

Author:  Tony [ Wed Mar 05, 2008 6:39 pm ]
Post subject:  Re: RE:The Turing Initiative

Mackie @ Wed Mar 05, 2008 5:45 pm wrote:
Alright, so far on TNet (Name Suggestions?):
code:

<b>
<i>
<u>


...
those tags are deprecated and should not be used.

Author:  darkangel [ Wed Mar 05, 2008 6:54 pm ]
Post subject:  Re: The Turing Initiative

Also, getting the <img> tag to work will be hell, garenteed! lol
Turing unfortunately can only send strings, ints, reals, booleans, etc. not data (which would be required for a picture)

Author:  StealthArcher [ Wed Mar 05, 2008 7:00 pm ]
Post subject:  RE:The Turing Initiative

But can it receive them?

Author:  Mackie [ Wed Mar 05, 2008 7:04 pm ]
Post subject:  RE:The Turing Initiative

Don't be so sure about not getting pictures, I've got a plan for that. Wink Although unsupported files in Turing like PNG... that's another story. I think StealthArcher has a plan for that in TPainT, So I'll leech off of that.

@Tony
There are two reasons why they should be implemented. There easy as a start, and a lot of people still use them.

Author:  StealthArcher [ Wed Mar 05, 2008 7:18 pm ]
Post subject:  RE:The Turing Initiative

Make sure to implemnt the now-relevant XHTML tags as well, we dont want this to be an internet explorer 6....

Author:  Mackie [ Wed Mar 05, 2008 7:50 pm ]
Post subject:  RE:The Turing Initiative

We'll be lucky if it's IE6. Razz

Author:  StealthArcher [ Wed Mar 05, 2008 10:08 pm ]
Post subject:  RE:The Turing Initiative

NOOOOO MACKIE! YOU MUST HAVE CONFIDENCE... AND...er...um


Yeah sadly you're right, but we can always try.

Author:  StealthArcher [ Wed Mar 05, 2008 10:58 pm ]
Post subject:  Re: The Turing Initiative

Posted Image, might have been reduced in size. Click Image to view fullscreen.


Here's the updated version.

TRubY now is Gleam
TNeT is now the Ocean Internet Browser
TGamE is now the Toybox
TChess is now Kniggit(King) Guard
TDaTa is now Datamaster
TPhoTo is now Megapix
TPainT is now Picoss


If you still hate the names, I can attempt to change them again, they aren't necessary to be stuck yet.

Author:  Mackie [ Wed Mar 05, 2008 11:06 pm ]
Post subject:  RE:The Turing Initiative

Much better.

Author:  StealthArcher [ Thu Mar 06, 2008 6:03 pm ]
Post subject:  RE:The Turing Initiative

Cervantes, if you look at this and are on, I'm wishing to us your text field class, like I did your button if I make some improvements I had in mind...

Well, I downloaded the source for the libpng from the GNU project.

I can only say one thing, If openT promises to up turing's speed, get it out ASAP, because putting in all this is gonna be one hell of a slowdown.....

As well the only way I can think of for Alpa is one pixel at a time, so it will be slow too, as my HBM conveter, which I've tested RGB.SetColor+Draw.Dot extensively on, it takes about 12 seconds to draw a 400 by 500 image, not that good.

BTW EDIT number 4....

Anyone feel up to redrawing the icons for King Guard, Datamaster, Picoss, and Toybox?

Gleam, Ocean, and Megapix turned as as some of my best art, but those other four just suck. >_<

Author:  Mackie [ Thu Mar 06, 2008 7:47 pm ]
Post subject:  RE:The Turing Initiative

I was working on a text field.. Razz I figured I'd need one of my own for the special jobs it need to do in Ocean. Anyway, Updates!

The original version of Ocean wasn't very well thought out. So I cut off the bottom 50 lines and started that again. With a much better plan this time. Also for anyone wanting to check out the latest releases of TInit's many projects.

http://www.mackiedrew.com/tinit

Author:  [Gandalf] [ Thu Mar 06, 2008 9:43 pm ]
Post subject:  RE:The Turing Initiative

If the idea of the Chess program is to show the "power, and capabilities of AI with Turing", then you chose the wrong game. To achieve reasonable strength of play a Chess AI requires a huge amount of calculations. You would have to implement every known search optimization and heuristic to get around what a basic alpha-beta would yield in something like C. Well, maybe that's a bit exaggerated, but not by much.

Author:  syntax_error [ Thu Mar 06, 2008 9:55 pm ]
Post subject:  RE:The Turing Initiative

waste such time on a logo and your product shall not be.

Author:  Mackie [ Thu Mar 06, 2008 10:40 pm ]
Post subject:  RE:The Turing Initiative

First version of Ocean is out on the FTP it won't load pages correctly like TNet did yet. But it's got a better backbone. I just don't have the mind right now to deal with that glitch. So I'm going to bed.

Author:  Nick [ Thu Mar 06, 2008 10:42 pm ]
Post subject:  RE:The Turing Initiative

I tired TNet... it never did load google... it just lagged like hell after I typed the URL

Author:  Mackie [ Thu Mar 06, 2008 10:51 pm ]
Post subject:  RE:The Turing Initiative

Hmm, it worked fine for me. It's development was so brief I never got to debug on other machines.

EDIT:

Just as a plus for anyone who joins this project here's what you get so far.

An e-mail address @newprogramr.com with 200MB Storage
Access to the project FTP with read/write privileges.
Access to the Google Apps Group. (Currently Pending)

This is all for organization. I know how ridiculous it gets trying to keep a project together.

Author:  Sean [ Fri Mar 07, 2008 8:06 am ]
Post subject:  Re: The Turing Initiative

I'll help out, Mackie drew me in.

I have some knowledge of GUI and am able to code up some GUI things that you request. Let me know what you need, and I'll start.

Author:  Mackie [ Fri Mar 07, 2008 2:45 pm ]
Post subject:  RE:The Turing Initiative

Well for buttons and text input were covered by Cervantes' classes. If you could do some work with scrolling that would be just peachy. Smile

What we need is a box that you can just throw stuff in, and scroll bars just happen.

Author:  Mackie [ Sat Mar 08, 2008 5:13 pm ]
Post subject:  RE:The Turing Initiative

What would be better? Downloading a Page into a file then reading the file over and over. Or just downloading the page right into memory.

Author:  StealthArcher [ Sat Mar 08, 2008 7:25 pm ]
Post subject:  RE:The Turing Initiative

Pend's if we ever plan to add in tabs, turing tends to be a memory muncher, what takes 10MB with GIMP can't be done in turing with my HBMC.

Author:  Mackie [ Sat Mar 08, 2008 7:55 pm ]
Post subject:  RE:The Turing Initiative

Ah, well I didn't know what to do so I'm going to do both. The problem is that with all the GUI components being added in, and the window resizing actually working I need to start refresh the window rather than the initial load. I realize that downloading the page every millisecond isn't realistic. I'm planning to download the page, and store it in memory for now at least. Premature optimization is the root of all evil.

Author:  Sean [ Sat Mar 08, 2008 9:58 pm ]
Post subject:  Re: The Turing Initiative

So, Mackie the project that you have assigned me to do is become more familliar with Scrolling, or is it to throw stuff into a certain box?

Author:  Mackie [ Sat Mar 08, 2008 10:07 pm ]
Post subject:  RE:The Turing Initiative

No I honestly just need a box I can through stuff in to scroll. Razz But you don't need to do that. I was just thinking it would be useful. We have many thing that need to be done or finished on Ocean. If you want you could start another project too. I was thinking about getting a little done on Datamaster (Still needs a better name Razz). It looks like it would be fun.

Check out our Goals for v1.0.0.0 in the Ocean -> Documentation folder of the FTP.

http://www.mackiedrew.com/tinit

Author:  Sean [ Mon Mar 10, 2008 9:48 am ]
Post subject:  Re: The Turing Initiative

Would an Excel type program, coded in Turing be useful?

Author:  Mackie [ Thu Mar 13, 2008 8:31 pm ]
Post subject:  RE:The Turing Initiative

Alright my file browser is in Alpha now. It's just going to be a simple tool to select a file. I actually needed one for Ocean, so i figured meh? I'll go all the way.

Author:  Mackie [ Fri Mar 14, 2008 6:48 pm ]
Post subject:  RE:The Turing Initiative

By the way, the File Browser is functioning.
http://compsci.ca/v3/viewtopic.php?p=156314


EDIT:
We already have a ton of stuff in Turing that can handle raster images. I think It could be fun to make a program that can interprets and edits vectorized images. I was looking at an '.svg' in a text editor. It's human-readable. It makes things just that much easier.

Author:  StealthArcher [ Wed Apr 16, 2008 1:37 pm ]
Post subject:  RE:The Turing Initiative

Wow, I let this die much snax?

Okayyy, had a long bout of depression (or something, dont ask cuz I have no clue), and felt like doing nothing for the past month+1/2 or so.

I'll (hopefully) be putting Picoss Alpha V0.1 later tonight. So, uh, I IZ BAK?

Hopefully, my posting and aid will become regular again as well, I fell off of visiting while I was down Very Happy

Author:  Sean [ Wed Apr 16, 2008 2:15 pm ]
Post subject:  RE:The Turing Initiative

Well, seems that Mackie is working on Ruby, but with this being revived, you may lure him back.

Author:  Mackie [ Wed Apr 16, 2008 2:29 pm ]
Post subject:  RE:The Turing Initiative

Oh well the FTP is up still. I may still do some stuff here. Probably more tools and functions, I seem to enjoy making those better. The webbrowser is... Eeek...


Anyway, since you missed it Stealth, here is a thread with released tools originally intended for Tinit.

http://compsci.ca/v3/viewtopic.php?t=17531


Posted Image, might have been reduced in size. Click Image to view fullscreen.

Could come in handy.

Author:  StealthArcher [ Wed Apr 16, 2008 4:27 pm ]
Post subject:  RE:The Turing Initiative

Most definitely.

Author:  Sean [ Wed Apr 16, 2008 4:41 pm ]
Post subject:  RE:The Turing Initiative

Pfft. Mackie, remember to send me the project.

I'll work on it soon enough, most likly tomorrow.

Author:  StealthArcher [ Wed Apr 16, 2008 4:45 pm ]
Post subject:  RE:The Turing Initiative

You are continuing Mackies Ocean Beta?

Author:  Sean [ Wed Apr 16, 2008 4:48 pm ]
Post subject:  RE:The Turing Initiative

No, Mackie's Evolution Program. I think he is planning on doing that.

However, if I ever finish this program of his, it could be added onto your Initiative.

Author:  Mackie [ Fri Apr 18, 2008 1:01 am ]
Post subject:  RE:The Turing Initiative

Just to show I am working:

Turing:
var ColorPicker : nat1 :=
    Window.Open ("offscreenonly,nobuttonbar,graphics:370;140,title:Color")
var font : int := Font.New ("arial:14")
var Red, Green, Blue : nat1 := 255
var mouseX, mouseY, mouseB : int
var buttonActive : boolean := false

function CalculateColor (startColor, endColor : int, ratio : real) : int

    var startRed, startGreen, startBlue, endRed, endGreen, endBlue : real

    RGB.GetColour (startColor, startRed, startGreen, startBlue)
    RGB.GetColour (endColor, endRed, endGreen, endBlue)

    var Red : real := startRed * ratio + endRed * (1 - ratio)
    var Green : real := startGreen * ratio + endGreen * (1 - ratio)
    var Blue : real := startBlue * ratio + endBlue * (1 - ratio)

    RGB.SetColor (110, Red, Green, Blue)
    result 110
end CalculateColor

procedure gradientBox (x1, y1, x2, y2, startColor, endColor : int)
    for i : x1 .. x2 - 1
        Draw.Line (i, y1, i, y2, CalculateColor (endColor, startColor,
            (i - x1) / abs (x2 - x1)))
    end for
end gradientBox


function scroll (mouseX, mouseY, mouseB, x, y,
        width, height, default, Color : int) : nat1

    gradientBox (x, y, x + width, y + height, 112, 111)
    Draw.Box (x, y, x + width, y + height, black)
    Draw.FillOval (default + x, y + height div 2, 3, 8, Color)
    Draw.Oval (default + x, y + height div 2, 3, 8, black)

    if mouseX > x and mouseX < x + width and mouseY > y and
            mouseY < y + height and mouseB = 1 then
        result mouseX - x
    end if

    result default
end scroll

loop
    Mouse.Where (mouseX, mouseY, mouseB)

    % Color Display
    Draw.FillBox (10, maxy - 100, 100, maxy - 10, 111)
    Draw.Box (10, maxy - 100, 100, maxy - 10, black)

    % Scrollbars
    RGB.SetColor (111, 0, Green, Blue)
    RGB.SetColor (112, 1, Green, Blue)
    Red := scroll (mouseX, mouseY, mouseB,
        110, 105, 255, 20, Red, brightred)
    RGB.SetColor (111, Red, 0, Blue)
    RGB.SetColor (112, Red, 1, Blue)
    Green := scroll (mouseX, mouseY, mouseB,
        110, 75, 255, 20, Green, brightgreen)
    RGB.SetColor (111, Red, Green, 0)
    RGB.SetColor (112, Red, Green, 1)
    Blue := scroll (mouseX, mouseY, mouseB,
        110, 45, 255, 20, Blue, brightblue)
    RGB.SetColor (111, Red, Green, Blue)
    %----------

    % OK button
    if buttonActive and mouseB = 0 then
        buttonActive := false
        exit
    end if
    RGB.SetColor (110, 0.95, 0.94, 0.91)
    if mouseX > 310 and mouseX < 368 and mouseY > 2 and mouseY < 28 then
        if mouseB = 1 then
            buttonActive := true
            RGB.SetColor (110, 0.87, 0.87, 0.81)
        else
            buttonActive := false
            RGB.SetColor (110, 0.95, 0.94, 0.84)
        end if
    end if
    Draw.FillBox (310, 2, 368, 28, 110)
    Draw.Box (310, 2, 368, 28, black)
    Draw.Box (310, 2 + 1, 368 - 1, 28, black)
    Draw.Text ("Ok", 327, 10, font, black)
    %------------

    View.Update
    delay (5)
    Draw.Cls
end loop

Window.Close (ColorPicker)


It's still crude, but pretty could for an hours work. Hopefully turning it into a function like the file browser. I'm currently optimizing, and adding new features, including being able to return colors. Might be useful, for color selection in the graphics programs. More tools to come...

Author:  Clayton [ Fri Apr 18, 2008 7:38 am ]
Post subject:  RE:The Turing Initiative

Just a quick thing: Be consistent with your method/variable names. Some are starting with capital letters, and others aren't (in both cases). Stick to one style, (preferably lower case names) so that your codes is easier to read, and use.

Author:  StealthArcher [ Fri Apr 18, 2008 9:49 am ]
Post subject:  Re: The Turing Initiative

Currently my style somewhat follows Tony's:

variableName

COnstant(yes, first two letters Caps, weird, bet it's my own)

Procedure

FunctioN

ObjEct (two letters caps, beginning and middle)

When I do Program in C++ braces are on the same line as the declaration.

Author:  Mackie [ Fri Apr 18, 2008 12:02 pm ]
Post subject:  RE:The Turing Initiative

I copyed from old code on this, so my naming conventions proabably are far off. I'll go back and change them now.


: