Computer Science Canada New Commands for Turing |
Author: | StarGateSG-1 [ Mon Jun 20, 2005 5:07 pm ] |
Post subject: | New Commands for Turing |
I am starting the summer project. And I want you the people to tell me what commands you would liek to see. Here is the list so far. Rotated draw oval 3D box - completed? GUI Thick basic shapes Pic.Opacity Triangles Array average Better sprites Music player Array Shuffle (2d arrays) Draw line that works off slope Slope Func Advanced Math.tu stringSplit button-switch for characters using Input.Keydown LCD (lowest common denomonator) |
Author: | GlobeTrotter [ Mon Jun 20, 2005 8:35 pm ] |
Post subject: | |
tan and tand |
Author: | Bacchus [ Mon Jun 20, 2005 9:19 pm ] |
Post subject: | |
Get a newer version of Turing 4.0.5 wrote: tan tangent function (radians)
Syntax tan ( r : real ) : real Description The tan function is used to find the tangent of an angle given in radians. For example, tan (p/4) is 0.5. Example This program prints out the tangent of 0, p/6, 2p/6, 3p/6, up to 12p/6 radians. 4.0.5 wrote: tand tangent function (degrees)
Syntax tand ( r : real ) : real Description The tand function is used to find the tangent of an angle given in degrees. For example, tand (45) is 1. Example This program prints out the tangent of 0, 30, 60, 90, up to 360 degrees. |
Author: | StarGateSG-1 [ Mon Jun 20, 2005 10:10 pm ] |
Post subject: | |
Lol, I need to be more clear I don;t just want 2 word posts, there needs to be a reason behind. Example: Dealer module: This could be created to solve everyone's card dealing problems. Not the best example but along those lines, kinda spur of the moment. |
Author: | GlobeTrotter [ Mon Jun 20, 2005 10:51 pm ] |
Post subject: | |
How about adding a drawoval/drawfilloval command that allowes you to draw rotated ovals, not just ones where the stretch is along the x/y axis. |
Author: | StarGateSG-1 [ Tue Jun 21, 2005 2:05 am ] |
Post subject: | |
ummm be more clear, do you mean 3-D?? |
Author: | Bacchus [ Tue Jun 21, 2005 6:12 am ] |
Post subject: | |
I think they mean an oval that is streched between the x and y axis, say stretched along a 45degree angle. As for the shuffling module, I don't think it should be made exclusivly for shuffling cards. If we do that then we'd be doing a big chunk of someones FP for them. Maybe something just to randomize the numbers that is inputted. |
Author: | StarGateSG-1 [ Tue Jun 21, 2005 11:31 am ] |
Post subject: | |
Ya I know, I needed an I at 1 am thats all, Like I said Bad example. But yes a array shuffler has been made already, but the guy has reposted after the crash. As for that circle I don't think that can be donw, correct me if I am wrong, but yes the Actucal command can be chnaged but I believe The actuacl funtion is hardcoded. We would have to invent a whole new circle command. |
Author: | [Gandalf] [ Tue Jun 21, 2005 11:41 am ] |
Post subject: | |
I don't know, this might not be completely neccessary. It would be nice to have a sortof "split" module. It would take a filled in circle (drawfilloval) or some other shape and assign each pixel to an array, keeping the x,y,and colour of it. Then you could manipulate those pixels. I don't know, that's my line of thinking right now (type of stuff I'm focusing on), and I'm not that creative. It seems Turing is not really lacking too many commands, from the amount of responses this topic has been getting. I think it's something about the actual environment and 'language'. |
Author: | StarGateSG-1 [ Tue Jun 21, 2005 11:47 am ] |
Post subject: | |
That could be interesting, I think that yes the inviroment is a problem, but there are lots of error's, for instance we could create a error database were it would give examples how to fix all error's, w could finish off the GUI, We could add more complex stuff to it. That is why we need xperts becasue not to many people are aware of problems or things to add. B ut we could even have fun and game modules if all else fails. |
Author: | MysticVegeta [ Tue Jun 21, 2005 12:28 pm ] |
Post subject: | |
Can the oval thingy not be done by looping arcs? |
Author: | StarGateSG-1 [ Tue Jun 21, 2005 1:58 pm ] |
Post subject: | |
Maybe Like I said in other post i need people to help me before I can move on. Brainstorming will Have to wait. |
Author: | lyam_kaskade [ Tue Jun 21, 2005 3:53 pm ] | ||
Post subject: | |||
MysticVegeta wrote: Can the oval thingy not be done by looping arcs?
Unfortunately no. Arcs are also stretched along the x and y axis. What could work though, is an ellipse:
where (X,Y) and (X2, Y2) are the focii of the ellipse, and size is the size of the ellipse. [/quote] |
Author: | Jorbalax [ Tue Jun 21, 2005 4:20 pm ] |
Post subject: | |
Hmm... Here's a simple one, to start; Draw.Thick(Oval/Box/...) (x, y, xradius, yradius, thickness, color : int) - Draws a shape with a thick borderline. |
Author: | jamonathin [ Tue Jun 21, 2005 4:41 pm ] |
Post subject: | |
Here, I juss whipped together a Box3D and FillBox3D program. The way I did the FillBox3D may not of been the easiest, and by all means, edit it. Its too long to post code cuz I put a demo with it. Heres basically what it is Poly.Box3D (x1, y1, x2, y2, x-dist [3d], y-dist [3d], color) Poly.FillBox3D (x1, y1, x2, y2, x-dist [3d], y-dist [3d], colorfill, colorlines) |
Author: | Token [ Tue Jun 21, 2005 5:16 pm ] |
Post subject: | |
Thats amazing! I really want to help but I need ideas and my brain is drained from exams right now, i'll work on it a but tonight and then thursday is my last one so i'll be able to give it more focus |
Author: | StarGateSG-1 [ Tue Jun 21, 2005 8:18 pm ] |
Post subject: | |
That is great, See that is what I am looking for with this. Keep it up. Don't worry about not helping, I will have the starting later this month so people can finish exams. |
Author: | jamonathin [ Tue Jun 21, 2005 9:11 pm ] |
Post subject: | |
StarGateSG-1 wrote: Don't worry about not helping.
lol, im not sure what you mean by that. At first I thought it was sarcastic, then I read it over and saw that it's a double negative, so it's like saying. "Worry about helping". But then I starting thinking of it as lets just hold off till the end of the month so we can be more organized without exams in the way (like you said) . . . I think all that english bull**** those damn teachers were trying to click into me are hitting at the wrong time . . . |
Author: | StarGateSG-1 [ Wed Jun 22, 2005 8:39 am ] |
Post subject: | |
what else can I say Lol, nice rant - I think?? |
Author: | ZeroPaladn [ Wed Jun 22, 2005 9:46 am ] |
Post subject: | |
i was reading about the oval drawn, can't you do this simply by rotating an oval? |
Author: | Cervantes [ Wed Jun 22, 2005 10:01 am ] |
Post subject: | |
As in, Pic.New, then Pic.Rotate? Seems like unnecessary processing, to me. But still, any Draw.Fill types that we make are bound to be slow, because they must either be done with lots of drawdots, or make an outline of drawlines and then do a drawfill. |
Author: | [Gandalf] [ Wed Jun 22, 2005 11:18 am ] | ||
Post subject: | |||
How about something like Pic.Fade or Pic.Opacity. Then you could have the syntax like this:
3d box thing is really good. |
Author: | Token [ Wed Jun 22, 2005 12:46 pm ] |
Post subject: | |
maybe a simple little thing that finds the average of an array k so to sum up this thread and the other one, this is what we've got so far Quote: Rotated draw oval 3D box - completed? GUI Thick basic shapes Pic.Opacity Triangles Array average Better sprites Music player Array Shuffle (2d arrays) Draw line that works off slope Slope Func LCD (lowest common denomonator) if u have any to add to this copy and paste the list and add whatever it is you have to offer to the bottom, try to keep this list as current as possible, or maybe even post it at the beginning of this thread StarGate Edit:thanks Jorbalax for clarifying the shuffle one |
Author: | Jorbalax [ Wed Jun 22, 2005 2:01 pm ] |
Post subject: | |
I plan to add on to ArrayShuffle, by including the commands to shuffle two dimensional arrays. |
Author: | zylum [ Wed Jun 22, 2005 2:09 pm ] |
Post subject: | |
im working on a really user friendly 3d class but the only drawback is that it will use lots of classes and stuff so it wont be as fast as my optimized 3d engine... also, should it read .raw files or .ply files? i would prefer ply files because of speed issues. if i were to read .raw files i would convert them to ply anyways for speed bonuses but loading times would be dramatically increased (loading times of models) |
Author: | Drake [ Wed Jun 22, 2005 5:39 pm ] |
Post subject: | |
Definetly the GUI. I'm still angry about not being able to use any of the GUI.Alerts. Which ones are you working on first, anyway? |
Author: | Token [ Wed Jun 22, 2005 5:52 pm ] |
Post subject: | |
It all depends on who wants to work on which ones first i'm working on the bold basic shapes, at the moment and also the triangle one. most of them have creators working on them right now, other than the ones i mentioned like slope, lowest common denomintator... actually i think i'll take the 5 minutes out of my time to do slope right now but the thing is if were going to do math, we cant add to the Math module that holtsoft made, we'd have to name it somthing like AdvMath or somthin so most of them have people working on them, although GUI dosent, i dont think |
Author: | [Gandalf] [ Wed Jun 22, 2005 6:23 pm ] | ||||
Post subject: | |||||
Hehe, we could always go GR9Math.Slope . Actually I was thinking more along the lines of maybe Math2 or something like that. "Advanced" is relative. Here's another suggestion: create a cfor command or something like that. I really hate it when you have to do something longer than it should be to change a for loop to go back down or up (decreasing command-like). like when you have
It's just a quick idea, just remembered that, not sure if its even possible . I'll have to think on it more later. Syntax would be:
|
Author: | Cervantes [ Wed Jun 22, 2005 8:13 pm ] | ||
Post subject: | |||
Slow down, fellas. There's nothing stopping you from editing Turing's built-in modules. I've attached Turing's Math module, with an addition of my own (angle finder). Go to the turing install folder\Support\predefs\ and replace Math.tu with my file. (Don't worry, it works just fine and will not screw up your copy of Turing. If you don't trust me, make a back up of the original Math.tu) Then, run the following code:
|
Author: | Token [ Wed Jun 22, 2005 8:21 pm ] |
Post subject: | |
oh so that would make it much simpler, this way we wont have to import the files each time when we're working with it, i think for now we should just keep them in separate modules and then start incorperating it into their respective sections afterwards |
Author: | Cervantes [ Wed Jun 22, 2005 8:36 pm ] |
Post subject: | |
Token wrote: i think for now we should just keep them in separate modules and then start incorperating it into their respective sections afterwards
[accent="butchered french"]En contrare, mon amie (sp?).[/accent] That's more work. There's no harm in making modifications all the way through. As I suggested in my email to stargate, everyone working on the project should have multiple copies of the turing install on their harddrive. (3 copies, I think.) 1.) is the main one. 2.) is for their own modifications. 3.) is for testing the modifications of others. If you want to test someone elses modifications, just copy his new .tu files into the predefs folder of the third install and try them out. Oh, also I forgot to add in my last post: Jorbalax, why have just an ArrayShuffle module? Why not make a general Array module that has shuffling, sorting, & searching? On that note, I was wondering earlier about having modules inside modules. It can be done, though Turing will give you warnings all over the place. Despite this, everything runs fine. I think StarGate, you should ask Holtsoft about looking into this. Having modules within modules would help to keep things better structured (for example, Array module contains a shuffle module, sort module, and search module). Warnings appearing all over the place whenever someone trys to use the new features would surely not be so impressive. Zylum: Sounds awesome!! |
Author: | 36002 [ Thu Jun 23, 2005 7:52 am ] | ||
Post subject: | |||
What about the net commands? Can we do anything about those? Like somehow speed it up, compression maybe? Also, in PHP there is a command called "explode" which breaks up a string into an array at a certain symbal. An example syntax maybe for turing could be:
|
Author: | MysticVegeta [ Thu Jun 23, 2005 10:47 am ] | ||
Post subject: | |||
Hi, I made something similar to what you were saying, the command is -> stringSplit (sentence, letter)
|
Author: | zylum [ Thu Jun 23, 2005 1:50 pm ] |
Post subject: | |
yeah before the down time i suggested we incorperate regular expressions. its really powerful for handling strings. you guys should check it out in other languages such as java and perl |
Author: | MysticVegeta [ Thu Jun 23, 2005 1:57 pm ] | ||
Post subject: | |||
true, my previous post's idea was based on
code from Java. |
Author: | Jorbalax [ Thu Jun 23, 2005 2:31 pm ] | ||
Post subject: | |||
Here's one I made today. It's a button-switch for characters using Input.Keydown. Normally, when you're running Input.KeyDown in a loop and you press a button, the if statement you have set for that button will continuously run as it is down. Example Code
Thanks for the ideas, Cervantes, I'll try them. |
Author: | Cervantes [ Thu Jun 23, 2005 4:14 pm ] | ||
Post subject: | |||
36002 wrote: What about the net commands? Can we do anything about those? Like somehow speed it up, compression maybe? Also, in PHP there is a command called "explode" which breaks up a string into an array at a certain symbal. An example syntax maybe for turing could be:
I do not believe it is possible for a function in Turing to result an array with a dynamic upper bounds. |
Author: | StarGateSG-1 [ Thu Jun 23, 2005 5:36 pm ] |
Post subject: | |
I looks like there are alot of nice things coming together, this is much better than I expected, I have decided that the first thing I will do is work of the GUI.SaveFile and OpenFile, but I think I might get a summer job so I will have to squeeze it in, as for the list I will add that to the forst post Token. There will always be somethings we can't edit so we can just accpet those how they are and cervates is right we don't have to jump right on and make all these new ones we can take existing commands and edit and add to them. |
Author: | [Gandalf] [ Fri Jun 24, 2005 5:20 pm ] | ||
Post subject: | |||
Yeah, but you see, it would be hard to change some of the existing commands because they were written in other languages... Alright, here's my meek contribution, I added to the Draw module. Just copy the attached file to your "Turing/Support/predefs" folder and overwrite. I assure everyone that it does not mess anything up, you can always just edit it out if you want. Back up the original if you want, but its really not neccessary . Here's the syntax:
Oh, the Draw.ThickOval doesn't look perfectly because of the way ovals are made in Turing. I will try to fix this later, right now I just made everything as simple as possible . Right, right, and here's the attachment: *EDIT* Alright, updated. |
Author: | Cervantes [ Fri Jun 24, 2005 5:42 pm ] | ||
Post subject: | |||
Gandalf, let's reduce the number of boxes that need to be drawn from a possibly large number (number of boxes to be drawn equals the value of thickness) to a cap of four, regardless.
And as an added bonus of doing it this way, you can create a checkerboard effect by using a negative thickness. |
Author: | lyam_kaskade [ Fri Jun 24, 2005 7:11 pm ] | ||
Post subject: | |||
Couldn't you just draw two boxes?
|
Author: | Token [ Fri Jun 24, 2005 7:38 pm ] |
Post subject: | |
you could but if ur using this over another picture and there was a line diagonally through it, only one side of the line would be filled |
Author: | Cervantes [ Fri Jun 24, 2005 8:03 pm ] | ||
Post subject: | |||
There's also the question of speed.
I dislike using Draw.Fill. |
Author: | jamonathin [ Fri Jun 24, 2005 8:22 pm ] |
Post subject: | |
Hmm, valid point. The draw fill ran 28.22 times slower on my comp. I was trying to put together something for the drawthickoval thinger so that it wasn't so choppy, but I was using Draw.Fill, and it would have run into too many problems anyways. |
Author: | [Gandalf] [ Fri Jun 24, 2005 8:53 pm ] |
Post subject: | |
Alright, I've finished my two additions to the Draw module. Draw.ThickBox I stuck with Cervantes' way for obvious reasons. For the Draw.ThickOval, I changed it to Draw.ThickCircle since usually we are making cirlces (ovals can be added later ). ThickCircle runs much slower now, but it also adds a kind of effect . To make the speed a bit faster when it can be I added compensation. Well, tell me what you think, I'll add some more stuff later. |
Author: | jamonathin [ Fri Jun 24, 2005 9:39 pm ] |
Post subject: | |
Interesting way to draw your circle. To bad it only took 40 seconds to draw it on my crap ass comp. I think the only way to do it is to Draw.Fill, but that too would slow it down. I was thinking of changing all of Turing's Draw.Whatever where we have to input an int, if we were to change that to a real, and in the actualy command (In Draw.tu ) we were to simply round it there, saving time and trouble for the user. |
Author: | [Gandalf] [ Fri Jun 24, 2005 10:38 pm ] | ||
Post subject: | |||
Hmm, well I ran it on a Althon 64 2.8ghz and it ran pretty fast took only around 1/2 seconds... I guess I didn't really put into consideration the speed of the computer, hmm... Actually, I have another idea *jots it down* thanks jamonathin! I'll try it out and post it if it works. Oh, and out of interest, what was the thickness/radius of the circle you were drawing? I'll work on some other fixes/commands too.. I forgot to add the syntax of the Draw.ThickCircle - its:
Just in case . |
Author: | wtd [ Fri Jun 24, 2005 11:16 pm ] |
Post subject: | |
If you're drawing simple geometric shapes with thickness, you may wish to add the ability for your procedure to draw one side thicker than the other. |
Author: | Cervantes [ Sat Jun 25, 2005 7:34 am ] |
Post subject: | |
If you're drawing some basic shape and you can SEE it being drawn, it's too slow. I don't think there's much we can do about drawing. Jamonathin: That's a good idea, but keep in mind you cannot change the code for Draw.Box and others like it. You can change the parameters, but then it doesn't work. I suppose you could make a second procedure, but it would have to have a different name. Too bad Turing doesn't have overloading. |
Author: | Cervantes [ Sat Jun 25, 2005 9:51 am ] |
Post subject: | Ideas |
If anyone wants any ideas for procedures/functions to code, a good place to look is the Ruby Class and Library Reference. Sections to pay particular attention to would be strings and arrays. |
Author: | Token [ Sat Jun 25, 2005 10:49 am ] |
Post subject: | |
WOW! awsome idea Cervantes, if anyone is gonna start working on this, let me know so that i can add it to the list. |
Author: | Cervantes [ Sat Jun 25, 2005 12:23 pm ] | ||||||
Post subject: | |||||||
Here's all the methods I thought were feasible up until "s". I'll finish them later. I've attached it as the Str module, sorry if you prefer otherwise. Keep in mind that you don't have to overwrite the existing Str module; you can just open file from its current location and then delete the module, export, and all the lines starting with external. Also, Ruby's methods are interesting in that they have, as wtd calls them, "visual indicators" as to what they do. For example, capitalize! is a procedure that will change what it is referring to.
On the other hand, you could use the function, capitalize.
Same output. Similarly, Ruby has methods that end in a question mark (?) that indicate the method returns a boolean value. Ex. empty? I've tried to make a system that works something like this. But, Turing will not allow is to have characters such as ! and ? as part of method names (or anything, for that matter ). So, instead of using ! at the end, I've made it Make_<method name>. Instead of using ? at the end, I've made it Is_<method name>. Enough talking about Ruby. Here's the file. |
Author: | wtd [ Sat Jun 25, 2005 1:16 pm ] |
Post subject: | |
Instead of "make", how about "modify"? |
Author: | [Gandalf] [ Sat Jun 25, 2005 1:45 pm ] | ||
Post subject: | |||
Amazing! Some of that stuff is really useful, great idea to take stuff from other languages . Ruby seems pretty great. Here are two really simple things I added to the Math module. CircleArea and Slope. Slope is just basic, and it doesn't give the answer in fraction form even though that's how you usually need it for school?
|
Author: | Token [ Sat Jun 25, 2005 3:12 pm ] |
Post subject: | |
hey gandalf, yah its okay that its not in fraction format, it is just over 1 so if it returned 1.5 for the slope its 1.5/1, and hate to break it to yah, lol its already in the new module, umm and i'll add in the Circle one right now. could u please make a help file for the circle one for me and send it over? (using the template I sent). thanks alot, keep em coming guys Cervantes: yah (as the e-mail said) we'd prefer it in a separate module. if u dont feel like separating them (i wouldent blame you) just let me know which commands you added and then i'll do it, if u do separate it add it to AdvStr or somthin. thx alot |
Author: | Bacchus [ Sat Jun 25, 2005 3:20 pm ] | ||
Post subject: | |||
Gandalf, your ThickCircle draws a bit slowly... I looked at it and didn't figure out why you did some things.. also it can't make Ovals. So here try this:
|
Author: | MysticVegeta [ Sat Jun 25, 2005 3:45 pm ] | ||
Post subject: | |||
eh?
|
Author: | [Gandalf] [ Sat Jun 25, 2005 3:45 pm ] |
Post subject: | |
Thanks Bacchus! Token, I think you're missing the point. It's better to have it already in the module if there is a coresponding one, and if its some totally new idea (we don't have a lot of those) then we can make a new module. I am strongly inclined to keep the new commands in the already existing modules. Also, I didn't know somebody was working on Math, but that's alright. Do you need a helpfile for Draw.ThickCircle and Draw.ThickBox too? *EDIT* What's that MysticVegeta? It doesn't work good at all . The thing we are trying to eliminate is the white spots in the actual circle. We are also avoiding using drawfill* because of speed. Oh, wait - I noticed the Draw.ThickFILLOval. Thanks for the contribution, but try to get rid of the white spaces. |
Author: | Token [ Sat Jun 25, 2005 3:49 pm ] |
Post subject: | |
alright, i guess we'll put them in their respective modules, but we have to make sure that when we are done the func you fill out a help file. that way we dont miss anything. so yes please fill out a help file, they take 5-10 minutes each so its not that big of a deal |
Author: | wtd [ Sat Jun 25, 2005 3:59 pm ] |
Post subject: | |
[Gandalf] wrote: Amazing! Some of that stuff is really useful, great idea to take stuff from other languages . Ruby seems pretty great.
So, just use Ruby. |
Author: | MysticVegeta [ Sat Jun 25, 2005 4:03 pm ] |
Post subject: | |
[Gandalf] wrote: Thanks Bacchus!
Token, I think you're missing the point. It's better to have it already in the module if there is a coresponding one, and if its some totally new idea (we don't have a lot of those) then we can make a new module. I am strongly inclined to keep the new commands in the already existing modules. Also, I didn't know somebody was working on Math, but that's alright. Do you need a helpfile for Draw.ThickCircle and Draw.ThickBox too? *EDIT* What's that MysticVegeta? It doesn't work good at all . The thing we are trying to eliminate is the white spots in the actual circle. We are also avoiding using drawfill* because of speed. Oh, wait - I noticed the Draw.ThickFILLOval. Thanks for the contribution, but try to get rid of the white spaces. oh lol. I am not really good at understanding trignometry yet, so i made it according to my simplycity lol. |
Author: | [Gandalf] [ Sat Jun 25, 2005 4:19 pm ] |
Post subject: | |
wtd, I know, but well... I might some time soon. I have to make my decision betweem Java(school),C++, or Ruby. Simplicity is best! (usually, someone please don't get into an argument with me about this ) Here you go Token, this is the Draw.ThickBox helpfile attached. Also, I was looking around the other predefs/modules are here are some stuff I found/thought about: --The limits.tu file, we could probably change that around. Not sure if changing the maximum supported integer would cause too many problems. --Maybe we could export pi and e from Math.tu and make them global constants. --Something interesting, for old commands like randseed it automatically changes them to things like Rand.Seed, so there really is no difference. --Somebody could try 'unofficially' adding support for .gifs? It would be pretty useful. --We could add some more general colours to the RGB module, like "gold" and stuff like that. --There's an experimental View.Scroll command, maybe someone could figure it out and complete it? Yeah, those are some ideas I came up with . |
Author: | MysticVegeta [ Sat Jun 25, 2005 4:49 pm ] | ||
Post subject: | |||
Ah the fraction reducer, i found the CCC problem i coded and turned it into a module
|
Author: | Token [ Sat Jun 25, 2005 5:06 pm ] |
Post subject: | |
amazing! its in, umm and as to gandolf, heres the list with ur sudgestions added, and thanks for the help file. Quote: Here is the list so far. 1 Rotated draw oval 2 3D box 3 GUI 4 Thick basic shapes 5 Pic.Opacity 6 Triangles 7 Array average 8 Better sprites 9 Music player 10 Array Shuffle (2d arrays) 11 Draw line that works off slope 12 String split 13 Button -switch for characters using Input.Keydown 14 Message Prompt 15 Limits? (if someone could look into this I'd appreciate it) 16 Gif Support 17 More Colors 18 View.Scroll 19 LCD (lowest common denominator) 20 Lowest terms - completed 21 Slope Func - Completed 22 Isint- Checks to see if a real number is whole (int) - completed 23 Shake Screen - completed I'll add the help file and post the help file so that you can see how it turns out. |
Author: | wtd [ Sat Jun 25, 2005 5:10 pm ] | ||
Post subject: | |||
What about having a Fraction type and then defining operations for it?
|
Author: | [Gandalf] [ Sat Jun 25, 2005 5:16 pm ] | ||
Post subject: | |||
Nice, do you want to create a whole module for fractions or add it on to the Math one, for something like Math.FractionReduce. I'd probably just do that. Here's a new Font module. I added Font.Centre. There's a help file too. Here's an example program using it:
Oh, and are you going to add all these help files to the current one, or are you going to have to have two seperate ones? |
Author: | Cervantes [ Sat Jun 25, 2005 5:22 pm ] | ||||||
Post subject: | |||||||
[Gandalf] wrote:
Gandalf, those functions could be reduced to one line:
Similarly for CircleArea. Also note I used y2 - y1 and x2 - x1, not the reverse. It doesn't change the final result, but it's generally preferred to avoid working with negatives. Of course, it's not like the computer cares. CircleArea is a bit restricted. Let's expand it to ellipses, specified by the bottom left corner at (x1, y1) and the top right corner at (x2, y2).
I don't think there's any way to add things into the main Help file. |
Author: | [Gandalf] [ Sat Jun 25, 2005 5:25 pm ] |
Post subject: | |
Alright, thanks Cervantes, I'm not used to writing funtions. I was thinking something along the lines of decompiling the windows help file, editing the html, and then compiling it? Not sure if its possible though. Ohhhh, and I didn't realize/forgot that that PI variable is already exported. That's what is called when you do Math.PI |
Author: | Cervantes [ Sat Jun 25, 2005 5:33 pm ] |
Post subject: | |
Yep. Same with e, I believe. Decompiling the windows help file, editing the html, and recompiling it? Well... How do you decompile it? And it's not the windows help file that we're looking to edit. How do you know it's in html? Seems kinda strange to me. |
Author: | wtd [ Sat Jun 25, 2005 5:35 pm ] |
Post subject: | |
[Gandalf] wrote: Nice, do you want to create a whole module for fractions or add it on to the Math one, for something like Math.FractionReduce. I'd probably just do that.
Oh, I have no desire to write it all myself. Just giving someone else a push in the right direction. Oh, and if you're going to take a page from Ruby's book, learn this: synonyms can be very good. Feel free to have "Font.Centre", bt then also have "Font.Center" which does the same thing. |
Author: | [Gandalf] [ Sat Jun 25, 2005 5:54 pm ] |
Post subject: | |
Alright, where do I begin... Cervantes wrote: Decompiling the windows help file, editing the html, and recompiling it? Well... How do you decompile it? And it's not the windows help file that we're looking to edit. How do you know it's in html? Seems kinda strange to me.
I'm not sure how you decompile it, which is why I'm not sure it's possible. I realize that its not the windows help file we're editing , I meant that its a windows-form help file. I know it's html because it that's what help files are written in, chm stands for compiled html (I think). wtd wrote: Oh, I have no desire to write it all myself. Just giving someone else a push in the right direction.
Oh, and if you're going to take a page from Ruby's book, learn this: synonyms can be very good. Feel free to have "Font.Centre", bt then also have "Font.Center" which does the same thing. Sorry, I was talking to MysticVegeta, because he made his procedure a whole module. I didn't even see your post when I made mine - it took a while . Alright, I'll add the other spelling of centre/center, and I'll watch out for it in the future, thanks. |
Author: | Token [ Sat Jun 25, 2005 5:57 pm ] |
Post subject: | |
Gandalf: thats kinda what i'm doing, i'm making my own helpfile with the same software so i can just integrate it easily after |
Author: | [Gandalf] [ Sat Jun 25, 2005 6:01 pm ] |
Post subject: | |
Yes, but just how are you going to integrate it? It would be really cool if you could access the new help files from the F9 help menu. |
Author: | Token [ Sat Jun 25, 2005 6:02 pm ] |
Post subject: | |
its all in that software, it can be done. |
Author: | [Gandalf] [ Sat Jun 25, 2005 6:07 pm ] |
Post subject: | |
Ok, so you're going to decompile it somehow, and add the example to the "examples" folder, then add the loopup command to "Keyword Lookup.txt", right? Also, what is this magical software? *This is in no way spam or off topic, I'm just tired from writing Turing * |
Author: | Token [ Sat Jun 25, 2005 6:15 pm ] |
Post subject: | |
HTML Help Workshop is the program that turings helpfile is created in, and yah i'll just edit the keyword lookup file, you're one smart cookie Gandalf btw go on ICQ so that we dont have to keep chatting over the forum . |
Author: | Token [ Sat Jun 25, 2005 6:19 pm ] |
Post subject: | |
New Commands Draw ThickOval ThickBox Box3D FillBox3D Math Slope Isint Circlearea Screen Shake Str ?? Split Array <new module ShuffleInt Input KeySwitch KeyCheck Font Center The rest are on their way |
Author: | jamonathin [ Sat Jun 25, 2005 7:11 pm ] |
Post subject: | |
Gandalf wrote: Simplicity is best! (usually, someone please don't get into an argument with me about this ) Thats what i go by .
Anyways, I think I'm done with the Box3D and FillBox3D. If anyone has any suggestions for it, go for it. Here are the help files for these 'commands', 'functions', 'procedures', 'whatever'. You may want to read through them just incase i used the wrong terms for things. |
Author: | MysticVegeta [ Sat Jun 25, 2005 7:21 pm ] | ||
Post subject: | |||
Hehe all in one!!!!
|
Author: | jamonathin [ Sat Jun 25, 2005 7:40 pm ] |
Post subject: | |
Looks pretty good. (I cant test it right now) But it seems as if everything should work. This probabily sounds like a useless comment, but that's because I wold have mroe to say, then I'd re-read the proggy, then edit, and so on. |
Author: | Token [ Sat Jun 25, 2005 7:50 pm ] |
Post subject: | |
alright, heres the file as it stands now, with all the data that people have sent me thanks for those jamonathin, and everyone else who took the time to fill them out, here we go! and i'm getting rid of the executable part of the template, so heres the updated template |
Author: | jamonathin [ Sat Jun 25, 2005 8:00 pm ] |
Post subject: | |
Looks pretty good. Only two things I would consider changing. 1. The format on Math.Isint is the only one that's tabbed out far enough (just for looks purposes). 2. Jamonithin = _____ Jamonathin = Looking pertsy goods though. It looks all official and stuff |
Author: | [Gandalf] [ Sat Jun 25, 2005 8:47 pm ] |
Post subject: | |
Quote: 2. Jamonithin = Evil or Very Mad _____ Jamonathin = Mr. Green
Alright, I finally finished debugging the collection of all the new functions/modules. Please make sure your code is bug-free when you post it or else there are problems later on. I just spent a long time getting everything to work because of a few little bugs (some of the mine, granted). Here's the sum of everything we have so far: |
Author: | StarGateSG-1 [ Sat Jun 25, 2005 9:01 pm ] |
Post subject: | |
This questions is meant for cervantes only because I know he can answer it but, if anyone else knows they could answer it as well. My nquestion is how do you hide a password in a textfield. |
Author: | Cervantes [ Sat Jun 25, 2005 9:08 pm ] |
Post subject: | |
Hide a password? You mean, with asterisks? All you have to do is change the output type to be "stars". There's a procedure for it, called setOutputType. Call that, with the arguement being "stars". Alternatively, you could just set it as "stars" when you INITialize the object. You can look through the source code of my FP if you want for examples. Maybe soon I'll add to that textfield so that you can use the mouse and shift keys for highlighting. |
Author: | lyam_kaskade [ Sun Jun 26, 2005 12:24 am ] |
Post subject: | |
This might be a bit off topic, but I was just thinking that all the Turing commands are written in C++, and then called by the Turing program through external. But we are writing new commands in Turing, which will likely be much slower (like the draw commands, has to call the C++ code every time a new draw is done). Is there any way we can make new commands for Turing that aren't written in Turing? Also, does anyone know if the external command requires that the language be C++? Or can it be any language? |
Author: | wtd [ Sun Jun 26, 2005 12:26 am ] |
Post subject: | |
lyam_kaskade wrote: This might be a bit off topic, but I was just thinking that all the Turing commands are written in C++, and then called by the Turing program through external. But we are writing new commands in Turing, which will likely be much slower (like the draw commands, has to call the C++ code every time a new draw is done). Is there any way we can make new commands for Turing that aren't written in Turing?
You would likely have to compile any such library code directly into the Turing executable. That wouldn't be possible without more information than any of you likely have. |
Author: | Token [ Sun Jun 26, 2005 9:04 am ] |
Post subject: | |
wtd wrote: You would likely have to compile any such library code directly into the Turing executable. That wouldn't be possible without more information than any of you likely have.
Would you happen to have any of this information WTD? or anyone really for that matter |
Author: | MysticVegeta [ Sun Jun 26, 2005 9:06 am ] |
Post subject: | |
hehehe, messing with the assembly after unpacking turing lol. |
Author: | MysticVegeta [ Sun Jun 26, 2005 9:10 am ] |
Post subject: | |
on topic : hey, you know i think alikhan made a base converter, maybe we can make commands for logrithmic functions. |
Author: | Token [ Sun Jun 26, 2005 9:11 am ] |
Post subject: | |
see the thing i just realized is that there is no question of legality with adding to the turing predefs, but once we start unpacking the main .EXE for the entire program... i'm no lawyer but that may be a little risky. |
Author: | MysticVegeta [ Sun Jun 26, 2005 9:19 am ] |
Post subject: | |
I think as long as we can unpack exe and keep it to ourself and not distribute then it may be legal but i think i will need more research on the laws of Holtsoft. Ontopic: I was thinking maybe of making a command that factors a quadratic equation. Math.quadraticFactor(1, 2, 3) that is - 1x^2 + 2x + 3 eh? |
Author: | Cervantes [ Sun Jun 26, 2005 9:37 am ] |
Post subject: | |
Frankly, I think a lot of these functions are quite useless, or very near to it. Really, look at that Ruby page and find something to code that is useful. No offense meant, Mystic. |
Author: | MysticVegeta [ Sun Jun 26, 2005 9:50 am ] |
Post subject: | |
oh lol i am really into it. lol. I think the quadratic is useless but the logrithmic functions are quite usefull. |
Author: | [Gandalf] [ Sun Jun 26, 2005 4:05 pm ] |
Post subject: | |
Yeah, once you think about it, when you make functions like CircleArea (as an example from me) you're not making anything easier. Your just taking away from the fact that the programmer actually had to think while programming. Still, I guess we'll keep it for now. As for unpacking the .exe, well, you can look at it from a hex editor - that could allow you to change some basic stuff. You could also resource hack it, but again, that doesn't allow you to change the actual C++ code. What I looked at yesterday was a file called: Turing.pdb in the support/bin folder. I know that .pdb files are Microsoft C/C++ program database 2.00. What I found out you can do is extract this database. This is some of what I got: Maybe someone with more knowledge on the matter can tell us more? If there are any implications of this that I should be warned about, feel free to . |
Author: | wtd [ Sun Jun 26, 2005 6:17 pm ] | ||||
Post subject: | |||||
The only C++ aspect to this is that structs live in the main namespace. In other words, you can write:
Rather than:
The rest is pure C, taking no advantage of C++'s advantages. And with types like DWORD, it's no wonder Turing isn't portable. |
Author: | StarGateSG-1 [ Mon Jun 27, 2005 10:52 am ] |
Post subject: | |
For the record, we don't have to stop at just adding new commands, we could come out with our version completely, we can use hex editor and reshacker to do work on it. This is becasue Holt won't include our idea's becasue they want to keep everything thmeselves, including credit!!! So now i |
Author: | [Gandalf] [ Mon Jun 27, 2005 4:06 pm ] |
Post subject: | |
Have you contacted them or something? Or is this just what you think will happen? Besides, hex editing it won't really change anything, only some basic messages that it gives. Resource hacking it will allow us to change the icon and some of the menus and forms, maybe some messages too. Doing that could also cause legal problems which you would have to look into. Also, why is your message cut off? |
Author: | StarGateSG-1 [ Mon Jun 27, 2005 4:32 pm ] |
Post subject: | |
I didn;t cut off my message, and there are some programs that can open up more than a basic hex editor, the reshacker well it can do what you said, and we can aviod legal issue's of we give them full credits for everything they did and keep it non porfit, and we can't distribed it unless they get something for i.e The 80 $ or so it costs, so you have to own turing to use nayhting we make that is all. I am going to double check that know, I am going to read the user agreements. TO answer your first question, that is thier non-Offical answer, that doesn't mean it can;t happen that is there support answer, I am still waiting for a return from Tom West whoc an override. I am trying to keep the updates coming. |
Author: | [Gandalf] [ Mon Jun 27, 2005 4:41 pm ] |
Post subject: | |
I see, well, at least wait for some official answer. If we start editing their client and everything then they might not want to support us anymore. Like I said before, we can try dumping all the contents of the .pdb file, edit it, and make a new one somehow. The only other thing I can think of is actually decompiling the .exe and then editing the assembly (I think it is, not sure though) or else converting it to something else, like C/C++. The problem is though that even then we would need knowledge of C/C++ or Assembly. I think we should continue as we were and wait a bit. Start simple, then if it turns out good, improve the ideas and go more complex. |
Author: | wtd [ Mon Jun 27, 2005 6:48 pm ] |
Post subject: | |
If you try to reverse engineer the existing interpreter, you'll likely get into legal trouble. If you were to create your own implementation from the ground up, with no knowledge of how exactly Holtsoft built the current Turing interpreter, you probably wouldn't have too much trouble. Of course, the other option is to kick the habit and embrace something non-proprietary that doesn't require you to jump through so many hoops. |
Author: | Jorbalax [ Wed Jun 29, 2005 1:07 pm ] |
Post subject: | |
I'm inclined to agree with wtd...so long Turing, hello C++! Someone else can take up where I left off if they want. |
Author: | Bacchus [ Wed Jun 29, 2005 11:21 pm ] | ||
Post subject: | |||
Ok, I don't know about hacking Turing or making a new language or switching to C++, but before there was talk abot making an Ellipse. Here's my shot at it, kind of works kind of not, lol
|
Author: | Delos [ Thu Jun 30, 2005 3:05 pm ] | ||
Post subject: | |||
Just dropping by for a bit... [Gandalf] wrote: How about something like Pic.Fade or Pic.Opacity. Then you could have the syntax like this:
3d box thing is really good. Opacity can be achieved through my PicMerge[/shameless plug] programme. PM if you're interested in incorporating it into the existing Pic. module, I'll reconstruct the source (optimize etc) and release it. MysticVegeta wrote: on topic : hey, you know i think alikhan made a base converter, maybe we can make commands for logrithmic functions.
Base converter: quick method to switch between bases is to use intstr()! Check it out under F10. Logs: well, we have ln() so we can always do something like 'ln(3)/ln(10)' to get to log. |
Author: | jamonathin [ Fri Jul 01, 2005 9:24 pm ] | ||
Post subject: | |||
I have an idea for a new Command. Some of you probabily already know this, but may have forgotten about it. Have you ever got the error mesage?: Turing text at the Bottom XD wrote: Complex multi-dimensioned flexible array reallocation not implemented yet - sorry. I'm not entirely sure if we can even do this without making an entirely new variable, but, just an idea .
It doesn't make sense to me why they would go about telling you how to change a multi-dimensioned flexible array, without the program being able to do it. |
Author: | Bacchus [ Fri Jul 01, 2005 11:11 pm ] |
Post subject: | |
Take a look at the Flexible Array Tutorial by Cervantes, its doesnt work the best, but you can resize multi-dimensional flexible arrays. If you really wanted to, you could even look up the old thread that inspired the edit into that Tutorial. |
Author: | Cervantes [ Mon Jul 04, 2005 2:43 pm ] |
Post subject: | |
Here's the finished Str module. I think I only added one or two new functions, since a lot of them I can't do (they use blocks, or return an array with a dynamic upper bounds, or maybe some other things Turing can't do). Is someone going to tackle the Array module? I have a feeling a lot of the methods can't be translated into Turing (mostly because of blocks and an unknown upper bounds) so it shouldn't be too daunting a task. |
Author: | jamonathin [ Wed Jul 06, 2005 11:35 pm ] | ||
Post subject: | |||
I was juss screwin around with Turing's RGB thinger, and I came up with this little tool. I figured I'd post a demo of it before making a big deal about it, seeing as it may not be good enough for our lil update, but here it is. It just asks the user to input 2 colors and it creates a shaded image of it between the two colors. Click the mouse somewhere. P.S - good job on the str. mod.
|
Author: | MysticVegeta [ Thu Jul 07, 2005 11:29 am ] |
Post subject: | |
Nice! That looks pretty cool, looks like an oval gradient, good job |
Author: | StarGateSG-1 [ Mon Jul 11, 2005 3:58 pm ] |
Post subject: | |
I don;t know if anyoen noticed this but Draw.ThinkLine already existed??, I haven been away and AM not sure if thsi was brought up?? |
Author: | [Gandalf] [ Mon Jul 11, 2005 5:44 pm ] |
Post subject: | |
Yes, it already existed although it was not officially supported. We did not add any Draw.ThickLine - but that's what I got the idea from to make 'thick' shapes. Really nice 'oval gradient'! Good for making graphics on Turing. Only thing I would try to fix is the constant black outline around it - makes it look a bit worse. |
Author: | jamonathin [ Tue Jul 12, 2005 2:00 am ] |
Post subject: | |
what black line are you talking about [Gandalf]? I checked it out on different colored backgrounds, with different oval color, and still nothing. |
Author: | Shyfire [ Tue Jul 12, 2005 2:04 pm ] |
Post subject: | fullscreen???????????????????????/ |
k iv got an idea how about editing the window module to have a fullscreen function |
Author: | MysticVegeta [ Tue Jul 12, 2005 3:35 pm ] |
Post subject: | |
Thats not possible because turing cannot interact with Windows API. |
Author: | Shyfire [ Tue Jul 12, 2005 3:54 pm ] |
Post subject: | |
o ic well there goes that idea |
Author: | [Gandalf] [ Tue Jul 12, 2005 6:57 pm ] |
Post subject: | |
Well, see at the attachment, how there is always a black outline (not line ) wherever a cirlce overlaps? That's what would happen if there was a, say red background too. |
Author: | jamonathin [ Wed Jul 13, 2005 1:53 pm ] |
Post subject: | |
That's because that's the first (largest) oval being drawn, which is the second color (last value in command). What the command does is, it asks for two colors, and draws the fade between them. See, what my first idea was, was to have the oval fade into whatever color the background was, but then there would be some screwups with Pic.Draw's and whatnot, and originality of the oval. So I just had the user pick whatever two colors they wanted the ball to be. So, are you saying have the 'yellow' fade into whatever whatdotcolor is behind the oval? |
Author: | [Gandalf] [ Wed Jul 13, 2005 6:18 pm ] |
Post subject: | |
Yep. You could just have two different commands or something. I'm not sure how it would mess anything up, I didn't look at the code, but the idea I had of this is having it slowly fade into the background. It's up to you and either way it works pretty good. |
Author: | jamonathin [ Wed Jul 13, 2005 10:14 pm ] | ||||
Post subject: | |||||
Well firstly, I meant the background at first was a problem, because sometimes when I make a program, my background color is green or something, and I have pictures drawn on top of the background that don't relate to green whatsoever. And always making the circle draw with the background color could make the proggy look ugly. But if we were to draw a circle like such, we could compare every color in the background with the circle
And then we can incorporate our RGB thinger.
But now that we have that, try changing the 20,black to 200, black. Looks kinda cool, but wont work. I first I thought I knew what you were saying, and now i forgot, so this is all I have lol. Not sure where to go after this. |