
-----------------------------------
trishume
Sun Jan 22, 2012 11:05 am

New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
For a while now I have been working on a new editor for Open Turing. 
http://f.cl.ly/items/160o2j08301Y271G233C/Screen%20Shot%202012-01-22%20at%2010.42.30%20AM.PNG
It has many new features like:

autocomplete
code folding
tabs
regular expression find and replace
optional dark theme


Unfortunately there has been limited human/unit testing so there are many undiscovered bugs. There are also many known bugs that are still being fixed.
Many of the bugs are a result of the hackish way it runs code. It calls the old editor to compile the code and then has a special runner execute it.


It is not ready for use by everyone. But it is functional enough that I, and a number of my friends, use it regularly.

If you want to try it you can download it here: 

-----------------------------------
Insectoid
Sun Jan 22, 2012 11:59 am

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Impressive!

-----------------------------------
Alex C.
Sun Jan 22, 2012 2:14 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
i love you :3
:lol: just kiddimng!!! :D
still, thats nice!

-----------------------------------
Alex C.
Sun Jan 22, 2012 4:40 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
you know what would be really useful though?
"SPELL CHECK"... every time i type Input.Keydown instead of Input.KeyDown i die a littles inside... T_T

-----------------------------------
SNIPERDUDE
Sun Jan 22, 2012 6:26 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
An IDE! :D

-----------------------------------
mirhagk
Sun Jan 22, 2012 6:48 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Math.Distance does not highlight correctly (Math does however). It also has Distance pop up twice in the autocomplete. Also a feature I'd suggest is a little pop up box saying parameters and other information for a function. (like VS with ///)

-----------------------------------
trishume
Sun Jan 22, 2012 7:48 pm

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Math.Distance does not highlight correctly (Math does however). It also has Distance pop up twice in the autocomplete. Also a feature I'd suggest is a little pop up box saying parameters and other information for a function. (like VS with ///)

None of the built-in functions highlight. I haven't migrated the 1000+ line keyword list from the old editor yet. I will fix the distance thing, thanks. And I used to have the popups but they mysteriously stopped working and I'm still working on why. But I agree they are really useful.

-----------------------------------
ihsh
Sun Jan 22, 2012 11:30 pm

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Wow, these new features are great (especially the tabs and the code-folding)! You must have spent a lot of time developing the program! :O

But somehow, when I click "run," my output screen will never open (even though I get the message" compile suceeded, running..."). Does this has anything to do with the fact that my computer finds "turingexeprolog.exe" suspicious and removes it?

Also, for the auto-complete, is there any way to make it so that you can select the option you want with your mouse?

-----------------------------------
mirhagk
Mon Jan 23, 2012 12:54 am

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
@trishume yeah that popup thing is probably the biggest reason I use an IDE (I can learn new library functions without having to read through giant documentation manuals)

-----------------------------------
copthesaint
Mon Jan 23, 2012 7:23 am

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
If your making this, and seriously spending the time to make this IDE, I just wanna suggest one thing, the most usefull thing for any IDE, At t he right top corner make it show links to procedures and functions 

for example, if this was your program

procedure x (s : string)
put s
end x

procedure y (var x : string)
x := "hello world"
end y

function i (pie : boolean) : string
if pie then
result "You have pie!"
end if 
result "you dont have pie! :("
end i

Then your IDE would display at the top right corner

[code]proc x (s : string)
proc y (var x : string)
function i (pie : boolean) : string[/code]

and when you click on proc x for example it would focus your screen to it. It would make everyones live 100% easier because I always, ALWAYS check my procedures to see what I set my parameters to :S lol Then too, if you improve debuging (turing is generally easy to debug but) if you improve debuging you can make for example a red x appear beside the procedure that is causing the problem.

-----------------------------------
trishume
Mon Jan 23, 2012 8:05 am

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Yes, turingexeprolog.exe is essential. 

Nitty gritty: 
turing.exe is passed the flags "-compile file.t"
this compiles it into a .tbc (turing byte code) file
turingexeprolog.exe is passed -file file.tbc which runs the program.

And @copthesaint the "mark" menu does that, just not as well. It's crappiness is on the bugs list.

-----------------------------------
evildaddy911
Mon Jan 23, 2012 11:30 am

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
did you take out the "replace" button?, also, in the autocomplete, could you have it put the parameters beside the name? i HATE having to check which parameters go where.
@Alex C: for the spell check thing, just have it hightlight any variables/procs/fcns that turing cant find

EDIT: just found the replace button, under find, never mind!

-----------------------------------
ProgrammingFun
Mon Jan 23, 2012 9:02 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
This is awesome! Sidenote: How many people would want a Ribbon UI on this?

-----------------------------------
SNIPERDUDE
Mon Jan 23, 2012 9:14 pm

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
This is awesome! Sidenote: How many people would want a Ribbon UI on this?

The idea of a ribbon UI has potential, it really comes down to how well it's implemented/designed.
I may take part in this, the graphics would be easy enough for me to do.
Programming being more of a hobby, if someone else designs the interface I could take care of visual appeal.

-----------------------------------
ProgrammingFun
Mon Jan 23, 2012 10:51 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I'm gonna try to implement a web editor for turing in my free time :D

-----------------------------------
mirhagk
Mon Jan 23, 2012 11:19 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
A web editor as in a online place to run Turing code? I would friggen love it, so many times I have my iPod touch and that's it, but I wanna just quickly test out a little algorithm (which turing is perfect for)

-----------------------------------
ProgrammingFun
Tue Jan 24, 2012 8:15 am

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
A web editor as in a online place to run Turing code? I would friggen love it, so many times I have my iPod touch and that's it, but I wanna just quickly test out a little algorithm (which turing is perfect for)
Yeah, I'm gonna take it up as a personal project after exams to also improve my JavaScript and jQuery skills. I would probably have to start with compiling a GeSHi library for Turing (help appreciated! though I could beg Dan and Tony to give me the one on this site) and then make a static typing thingy before implementing the IDE in JavaScript.

We'll see how it goes. I'm hoping that I don't fail terribly. This will be an excuse to learn HTML5 and improve my JavaScript skills.

-----------------------------------
mirhagk
Tue Jan 24, 2012 8:57 am

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I really hope you do well as well.

-----------------------------------
ProgrammingFun
Tue Jan 24, 2012 10:35 am

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I really hope you do well as well.
Thanks :D (I'm not as familiar as everyone else is with Turing because I only used it for half a semester before moving onto Java)
Also, @SNIPERDUDE, if I do start this project, I could use your help with the visuals ;)

And if it works, we could use PhoneGap to make dedicated mobile apps for it as well :D

-----------------------------------
SNIPERDUDE
Tue Jan 24, 2012 2:56 pm

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
And if it works, we could use PhoneGap to make dedicated mobile apps for it as well :D
That actually sounds pretty cool. So many times I've wanted to do some code testing on my phone when I'm out or bored on the subway.

-----------------------------------
ProgrammingFun
Tue Jan 24, 2012 3:09 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I think that we shouldn't steer this thread off topic but one question, would you suggest that all compiling take place server-side and or client-side?  Server side would slow down the server if many people use it (though I doubt anyone out of CompSci would).

-----------------------------------
Raknarg
Tue Jan 24, 2012 4:01 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Just thought I'd point out, if a variable is undeclared, it doesn't seem to point out where

-----------------------------------
mirhagk
Wed Jan 25, 2012 12:14 am

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
And if it works, we could use PhoneGap to make dedicated mobile apps for it as well :D
That actually sounds pretty cool. So many times I've wanted to do some code testing on my phone when I'm out or bored on the subway.

I think this was actually discussed before, and certain phones have in the license agreement something about not compiling user's code or something. I'm not 100% sure, but it's something you should look into before investing time on making apps for the phones.

-----------------------------------
ProgrammingFun
Wed Jan 25, 2012 5:20 am

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I think this was actually discussed before, and certain phones have in the license agreement something about not compiling user's code or something. I'm not 100% sure, but it's something you should look into before investing time on making apps for the phones.
Thanks for letting me know...though we could probably get around that if the code is compiled by the server ;)

-----------------------------------
trishume
Wed Jan 25, 2012 8:19 am

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
The thing with a web IDE is that everything would have to be done server-side unless you reimpliment the entire compiler. Which is quite the task.

And barring some really intense code you could only do text in and out.

To get it to work you would have to implement a command line switch for turing that redirects input and output to stdin. Then you could call that from rails or php.



For the ribbon UI I don't think that's a good idea because there are too few actions for it to be useful and it would take up a lot of vertical space.
I would love some help making it look nicer though. Just keep in mind that it is written in Qt. So there are no windows specific gui components like ribbons.
I can theme existing components though.

Also if anyone wants to learn Qt styling you can add css to stylesheet.qss in the new editor directory and it will load it.

-----------------------------------
Insectoid
Wed Jan 25, 2012 9:07 am

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
And if it works, we could use PhoneGap to make dedicated mobile apps for it as well :D
That actually sounds pretty cool. So many times I've wanted to do some code testing on my phone when I'm out or bored on the subway.

I think this was actually discussed before, and certain phones have in the license agreement something about not compiling user's code or something. I'm not 100% sure, but it's something you should look into before investing time on making apps for the phones.

[url=http://lunduke.com/]Lunduke language compiles to native code for any supported platform (most compilers only compile for the platform it exists on, ie gcc for mac only compiles for mac, etc). Lunduke supports many mobile platforms. Lunduke is also written in itself, so you can compile it for your phone if it's supported and then write Lunduke code on your phone. Unfortunately the iPhone TOS likely prohibits this.

-----------------------------------
mirhagk
Wed Jan 25, 2012 11:18 am

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
And if it works, we could use PhoneGap to make dedicated mobile apps for it as well :D
That actually sounds pretty cool. So many times I've wanted to do some code testing on my phone when I'm out or bored on the subway.

I think this was actually discussed before, and certain phones have in the license agreement something about not compiling user's code or something. I'm not 100% sure, but it's something you should look into before investing time on making apps for the phones.



If only I could jailbreak my iPod touch :( (it's second generation, and I can't find a jailbreak that works for it)

-----------------------------------
SNIPERDUDE
Wed Jan 25, 2012 1:18 pm

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
If only I could jailbreak my iPod touch :( (it's second generation, and I can't find a jailbreak that works for it)
Well there's your problem: You're using an Apple product

-----------------------------------
ProgrammingFun
Wed Jan 25, 2012 4:38 pm

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
The thing with a web IDE is that everything would have to be done server-side unless you reimpliment the entire compiler. Which is quite the task.

And barring some really intense code you could only do text in and out.

To get it to work you would have to implement a command line switch for turing that redirects input and output to stdin. Then you could call that from rails or php.
I was thinking the exact same thing...one solution could be the implementation that Dan uses for DWITE, though that's only text.
I guess that work could be comparable to OnLive...I'm gonna start with a WYSIWYG front end first though.

-----------------------------------
trishume
Wed Jan 25, 2012 6:46 pm

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Something you could do that would be useful for DWITE and all sorts of things is create a fork of openturing that has no platform dependent code.

All you'd have to do is remove references to functions with the mdio and ed prefixes and then write a command line interface for it.

From that all the platform dependent input, sound and graphics could be implemented in SDL and then with the Qt editor turing would be truly cross-platform.

-----------------------------------
mirhagk
Wed Jan 25, 2012 7:00 pm

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Something you could do that would be useful for DWITE and all sorts of things is create a fork of openturing that has no platform dependent code.

All you'd have to do is remove references to functions with the mdio and ed prefixes and then write a command line interface for it.

From that all the platform dependent input, sound and graphics could be implemented in SDL and then with the Qt editor turing would be truly cross-platform.
This would be awesome.

-----------------------------------
trishume
Thu Jan 26, 2012 8:29 am

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
With a cross platform version development would also move faster and turing would work better. When working on Open Turing I spend a remarkable amount of time fighting with Window's terribly designed APIs.

It annoys me how they got their act together and made good .NET apis but their C/C++ APIs are so terrible.

-----------------------------------
mirhagk
Thu Jan 26, 2012 12:57 pm

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
[quote="trishume @ Thu Jan 26, 2012 8:29 am"It annoys me how they got their act together and made good .NET apis but their C/C++ APIs are so terrible.[/quote]
That's why they were able to make good .NET library. By dropping support for those things that don't support .NET.

But yes C/C++ should not be windows only, there is no real benefit.

-----------------------------------
ProgrammingFun
Sat Jan 28, 2012 12:35 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I would like to suggest a code minimap for those large coding projects...similar to [url=http://www.sublimetext.com/]Sublime Text. :D

-----------------------------------
copthesaint
Sat Jan 28, 2012 1:45 pm

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I would like to suggest a code minimap for those large coding projects...similar to Sublime Text. :D

That would be 95% useless, this is still Turing, which means schools (if the program is made well) will be using the program mostly. and improved mark menu will be all that is needed, if even that is needed.

-----------------------------------
trishume
Sat Jan 28, 2012 7:30 pm

Re: New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Ya. I am an avid user of Sublime Text (Even wrote a [url=http://www.sublimetext.com/forum/viewtopic.php?f=5&t=4904&sid=fc863418c457dc545da34241d1485bb0]plugin.) And I agree that a minimap is not a priority for the new editor.

Whenever I am working on Open Turing I try to keep the user base in mind (favourite mantra: "This is not C++, this is not C++")

Some of Turing's design decisions make me shudder (colour numbers) but they usually make it easier for new users. Even though I would prefer full RGB. The RGB module / colour number is a great way to satisfy both types of users.

-----------------------------------
Aange10
Sat Jan 28, 2012 7:45 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
This editor is really amazing. Good job, and keep up the work! I do have one request... The Complete Structure function is really amazing, but the hotkey CTRL + Return... I don't even have a return button >..<

Is there anyways you could change it something convenient while coding? Like CTRL + Any_letter. Maybe CTRL + E.

Also, in Eclipse it has a very useful Delete Line command (CTRL + D). That'd be a cool implementation.


Good work ;)

-----------------------------------
mirhagk
Sat Jan 28, 2012 8:26 pm

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
 I don't even have a return button
How do you get to a new line then..... You know that return is the enter key right?

-----------------------------------
Sur_real
Sat Jan 28, 2012 8:29 pm

Re: RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
yeah some keyboards have both return and enter (macs?) but enter works as return in this case :D

-----------------------------------
Aange10
Sat Jan 28, 2012 8:32 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------


How do you get to a new line then..... You know that return is the enter key right?



Oh o.o

Thanks :)

-----------------------------------
mirhagk
Sat Jan 28, 2012 10:45 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
They keyboards that do are the ones that have enter in the main part, and return in the numpad part. But they are essentially the same thing (a very small amount of programs may detect differences in which enter key was pressed but for the most part they treat it the same)

-----------------------------------
crossley7
Sat Jan 28, 2012 11:39 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
I know that when I was writing my Chess game in C++, the SDL library had different codes for the 2 enter/return buttons but I have yet to see a program where the do different things.  Closest is that I believe I have had the number pad one not work in some programs.

Not sure about other things if they handle them individually or as the same.

-----------------------------------
mirhagk
Sun Jan 29, 2012 3:05 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Well I know left and right shift alt and control sometimes do different things. The numpad return key is probably not used as a different command just because some keyboards don't have them.

-----------------------------------
Srlancelot39
Sun Jan 29, 2012 7:41 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
This is incredible! Good job!

-----------------------------------
Aange10
Sun Jan 29, 2012 7:46 pm

RE:New Open Turing Editor *Alpha* - Autocompletion, tabs, regex search and more
-----------------------------------
Also, a suggestion, when I have a window open already, and decide to open another file, it should open a new tab in the existing window. Instead of 2 windows 