Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BlakPilar

Pages: 1 ... 39 40 [41] 42 43 ... 49
601
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 15, 2011, 09:34:40 am »
Umm. A couple of things. I think you should make strings be able to be in single our double quotes, just because so many people are so used to that. Also, instead of the @ symbol, PLEASE PLEASE PLEASE use escape characters ("\n"=newline "\t"=tab "\\"=\ "\0"=null "\""=" "\'"=' etc.)
They are used for every computer language I've seen. (Python, Java, C++, C, Groovy, C#, Javascript, PHP, etc.)
Finally, methods can return a value. If they don't want to, then the return type is void.
Going in order:
-I suppose I could use both, but it's just hitting the key associated with both once easier quicker than holding shift then hitting it? (Basically, isn't it easier quicker to just type a ' than a ")
-I'll use the escape character for the single quote, but I had already planned to implement it for other characters like tab, line feed, etc.
-I've never seen something like "private void something() { /*code*/; return void; }". To me, methods and functions are different. "private void" would be a method, and "private <any type other than void>" would be a function.

Agreed. I think the C style of quotes, where single quotes are for a single character, literally replacing it in the program with the ASCII constant, and double quotes for strings, works better, rather than not differentiating between the two, though.
But honestly, how often do you use a char literal? (I'm not being a smart-ass, I really want to know :P) I might implement the char type for shiggles, but I don't even know how often it's used.

I think single line comments using "//" would be nice. I know I usually just use that for all my commenting.

You seem to use a lot of brackets, what if things like arguments were separated by brackets instead of commas, say:

Code: [Select]
MyFunc([arg1][arg2][arg3])

{{or}}

int [var1][var2][var3];

{{or even}}

int array1[5] = [[1][2][3][4][5]];

{{[] == null}}

Well, when I wrote something like "([arguments])", I meant that the "arguments" part was optional, but I like that idea :). The only thing I'd change would be the array part. It's going to be like VB (without the ability to change index numbers :P), so it would be "int array1(5) = ([1][2][3][4][5]);" I'll also put in single line comments with "//".

602
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 14, 2011, 07:21:43 pm »
Lol, sorry about that fredkin.

Anywho, I've added some beginning syntax to start things off. :D

603
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 14, 2011, 03:08:01 pm »
Thank you!

Until I get some syntax down, really the only thing I can work on is the environment and maybe some compiling :/

604
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 14, 2011, 01:01:36 pm »
This has nothing to do with the calculator lol

EDIT: Damnit, wrong forum... Can someone move this? <_< (To here)

605
Computer Projects and Ideas / Re: The dawn of a new OOPL
« on: August 14, 2011, 11:31:58 am »
Well right now the project name is Yanoopl (yet another object-oriented programming language), but for the name, the misspelling was intentional ;)

The language will be compiled until I figure out how to add some sort of debugging system like Visual Studio and its breakpoints (because I'd imagine there's some interpreting there.)

I don't think this will be dropped. It will slow down when school starts and pick up on breaks, but I think this is something that will definitely help with colleges and jobs in the future lol. Plus this is something I've been meaning to do for a while, and now I know how.

I'm not on a computer now, but I'll look at Haskell and your language when I am.

606
Computer Projects and Ideas / The dawn of a new OOPL
« on: August 14, 2011, 10:57:19 am »
SEE THIS POST
Spoiler For OP:

In case you haven't looked (or even glanced) at my signature, I'm writing an OOPL called Zenon. :D (In case you don't know what that means, it stands for Object-Oriented Programming Language.)

My only problem is: I'm terrible at coming up with syntax because I have no creativity :( The syntax I have right now looks cool, but it's impractical. It requires more unnecessary typing than I'd like.

This language will be .NET-based, so anything you can do in C# or VB, you'll be able to do in this. This includes designing forms, creating console-based applications, and probably libraries (.dll's) for use with other, non-Zenon programs. My request to you, the Omnimaga community, is to help construct a syntax for this language.

I guess the only thing I want you to keep in mind when suggesting syntax and whatnot is to try to make it fun to write in. Something you'd like to make a program or two with. The language can be simple, complex, or moderate, it can be completely original or it can combine elements of other languages together. But please, this will not be an esoteric language ;)

Syntax last updated: 4:24pm EST (GMT-5) on 19 Aug 2011.
Change with block comments and methods, etc.!!

Spoiler For Current syntax:

* - Indicates a change
+ - Indicates an addition
# - Indicates a removal
Since last edit, that is.
--
As in many languages, a semi-colon will mark the end-of-line.
--
Strings will be like every other programming language; beginning and ending with a (double) quote.
--
*Block comments will be [[ comment ]], single line comments will be "//comment"
--
Modifiers are the same as any .NET language. These include "public," "private," "sealed," and "abstract". However, "public" will be "global," "private" will be "internal," "sealed" will be "closed," and "abstract" will be "open".
--
Threads will be a built-in type for easier access. (yay)
--
#Moved arrays and matrices so they have their own mini-topic
--
Instead of using "." to access the methods of a variable, the colon (":") will be used. I.e. instead of "<var>.<method>;", it will be "<var>:<method>;"
--
Accessing the current application/class will be "current" instead of "this" or "Me".
--
Inheritance will be implemented.
--
"parent" will be used instead of "base" (like in C# or <insert other language that uses "base">) or "super" (like Java).
--
"break" (from C#, not sure on its equivalent in Java, etc.) will be "exit"
--
"quit" will be a general command to exit the program, unless in an infinite loop :P.
--
+Preprocessor directives will only be in the main file and will be denoted by '@'.

VARIABLES
Will be defined by "<type> <name> [= <value>];"
-Here is a list of current types (layout is "<type> : <declaration name> : <default value>")
  -string   : str  : ""
  -integer  : int  : 0
  -boolean  : bool : false
  -byte     : byte : 00

CONDITIONALS
Will be accessed by
 "if (<condition>) {
   <code>
  }
  elseif (<condition>) {
    <code>
  }
  else {
    <code>
  }"
You will also have the ability to use switch/case statements that will be used in a similar fashion.

METHODS / FUNCTIONS
Methods, since they don't return anything, are sub-procedures and therefore will be accessed by
 "<modifiers> sub <method name> ([<arguments>]) {
    <code>
  }"
Functions will be similar, replacing "sub" with their return type.
 "<modifiers> <type> <function name> ([<arguments>]) {
    <code>
    return <type>;
  }"

LOOPS
Will support 4 types of loops:
-While
 "do {
    <code to be executed until condition is false>
  } while (<condition>);"
-Until
 "do {
    <code to be executed until condition is true>
  } until (<condition>);"
---Both of the above loops can have the "test" (the "while" or "until" part) either before "do", or after the closing brackets like in the example.
-For
 "for (<int>[ = beginning], <end>[, increment]) {
    <code>
  }"
-For Each
 "foreach (<type> <var> in <collection [of type]>) {
    <code>
  }"
Thanks to calcdude for the idea of testing before and after.

CLASSES
Will be implemented in the same way that most languages (at least the ones I know) implement them.
 "<class name> <class var name> = new <class name>;"

ENUMS
An enum, in case you don't know what it is, is basically a group of numbers. However, in Zenon, they can be a group of anything. (If that can't be done, then a new group type will be added called Group)
-Declared:
 "<modifiers> enum <name> {
    <name> = <number>,
    <name2> = <number>,
    etc.
  }"
-Accessed:
 "<enum> <var name> = <enum>:<enum child>;"

+ARRAYS/MATRICES
As an example, here are declarations of a string array, matrix, and collections that have more that 2 dimensions:
-Array:  str# hello = new str#[0][1][2];
-Matrix: str# hello = new str#[[0][1][2],[3][4][5]];
-Multi:  str# hello = new str#[[0][1][2],[3][4][5],[6][7][8]];
Or, for non-specific declarations, one can do
-Array:  str# inf = new str#[];
-Matrix: str# inf = new str#[,];
-Multi:  str# inf = new str#[,,];


607
Computer Programming / Re: Syntax highlighting RTB in C#
« on: August 13, 2011, 09:31:17 pm »
Oh okay, cool. I'll look into using one of their editors, but I'm still going to try to finish this one.

608
Computer Programming / Re: Syntax highlighting RTB in C#
« on: August 13, 2011, 09:04:54 pm »
Yeah, I know about their TextEditor and AvalonEdit, but I'd prefer not to use any 3rd-party controls for the time being. This is something I've been meaning to get around doing for a long time, and I now have the perfect motivation.

I'm also not sure if I want the end product to be open-source or not, and from my understanding it would need to be open-source if I used TE or AE :\

609
Computer Programming / Syntax highlighting RTB in C#
« on: August 13, 2011, 08:58:24 pm »
I'm working on an IDE and the first thing I want to tackle/complete is the text editor. Right now I'm working on the syntax highlighting part of it. Strings highlight perfectly, and so do keywords. However, the part where it un-highlights keywords that have been partially deleted seems to not want to cooperate.

Here's my code, for anyone who thinks they can help, or just wants to take a peek at it ;)
(I comment a lot, so it should be fairly easy to understand)
Spoiler For Code:
Code: [Select]
    //Initiate vars
    string[] lines = this.Lines;
    int pos = 0;
    int cpos = this.SelectionStart;
    int line = this.GetLineFromCharIndex(cpos);

    //Let's see if there are even any keywords in the line.
    //If not, we'll exit
    bool cont = false;
    foreach (string kw in rsrvdWrds)
        if (lines[line].Contains(kw))
            cont = true;

    //If the current line doesn't contain any words,
    if (!cont)
        return;     //Exit

    //Get the exact beginning char index of the line
    for (int i = 0; i < line; i++)
        //+1 because of \n
        pos += lines[i].Length + 1;

    //Now pos is the index of the first char on the current line
    //Reset line colors (THESE ARE THE FOUR LINES THAT *SHOULD* RESET THE LINE COLOR)
    this.SelectionStart = pos;                  //Go to beginning of line
    this.SelectionLength = lines[line].Length;  //Select the line
    this.SelectionColor = Color.Black;          //Turn it black
    this.SelectionLength = 0;                   //Deselect the line

    //For each match of keyword in the current line
    foreach (Match kw in reservedWords.Matches(lines[line])) {

        this.SelectionStart = pos + kw.Index;
        this.SelectionLength = kw.Length;
        this.SelectionColor = Color.Blue;

    }

    //Highlight any strings that might be in the line's string
    this.HighlightString(line);

    //Resume current position
    this.SelectionLength = 0;
    this.SelectionStart = cpos;
    this.SelectionColor = Color.Black;
Oh, by the way, this is an extended control. By that, I mean it's a control that inherits from the RichTextBox. That's why it says "this" instead of "rtbCode" or something like that.

610
Art / Re: UserBarz
« on: August 13, 2011, 08:31:23 pm »
Or Quick Modify. :P

These are looking pretty nice.  Which ones in your sig did you make yourself?

I think that's what he meant lol.

And who?

611
TI-BASIC / Re: Number systems
« on: August 13, 2011, 07:56:54 pm »
Weregoose wrote that code I posted, not me :P

Sorry if that wasn't clear.

That darn weregoose... Always being referenced to with his mega-optimized code and whatnot...

612
TI-BASIC / Re: Number systems
« on: August 13, 2011, 07:49:58 pm »
Nowhere near as optimized as weregoose's, but I made a program for all of the original systems you stated found here. I'm sure the loops could be combined to do something like weregose's, but I' too lazy to do something like that on-calc at the moment.

EDIT: Fixed my incorrectedness :P

613
Art / Re: UserBarz
« on: August 13, 2011, 05:11:18 pm »
There is a button called modifiy, that avoids many yells!

I know. There's also a quote button that avoids confusion :P

614
Art / Re: UserBarz
« on: August 13, 2011, 03:29:19 pm »
First, umm... You might want to read the rules. I got yelled at for double posting outside of the rules one time, and you triple posted at the beginning >.>

Anyway, I like making userbars too :D I made all of mine except the bottom two and the TBEXE progress one.

EDIT: Just from a quick glance there's another double post by you. >.>

615
Miscellaneous / Re: Types of Cell Phones
« on: August 12, 2011, 06:52:06 pm »
Ok, well, I've changed my mind and I'm getting a Droid :)

So far it's looking like:
  • Samsung Galaxy S, (my friend has one and I liked how light it was)
  • HTC Wildfire S,
  • T-Mobile G2x,
  • Motorola DEFY, or
  • Samsung Vibrant

The Galaxy is awesome, but it's very expensive, right?

I have a terrible memory, but I think it was $100 with a new 2-year contract. It's not that bad, especially considering how much smartphones are.

EDIT: Yeah, $99.99 with a new 2-year contract. See here.

Pages: 1 ... 39 40 [41] 42 43 ... 49