Oh gimme a break. I've been up 19 hours. Have to stay awake to accompany brothers GF to the market..
She won't be awake for another 2.. :eek:
chem
Printable View
Oh gimme a break. I've been up 19 hours. Have to stay awake to accompany brothers GF to the market..
She won't be awake for another 2.. :eek:
chem
Tell me about it.Quote:
Originally Posted by CornedBee
Would that mean Unicode as default? Or just as an option? How much more work would it involve?
Would it be possible (and not insanely difficult) to make the majority of the language and THEN go back and add Unicode?
If you code well, no.
If you like to hard-code things, then yes.
If you code well, it would also be easy make it support 8 bytes per character, although the desirability of that is doubtful :)
Char type? yes.Quote:
Originally Posted by eyeRmonkey
code-based library calls (like C/C++) are much better if you are not using the IDE for programming. much easier than fiddling with compiler command-line arguments.
While it would be a nice addition, it would most likely be used outside of the US, as we have one basic language. Not sure if it's worth the effort for UNICODE.
As I said; if you code well in the first place, it's no extra effort anyway.
Not sure if you've discussed this already, but have you considered adding a speed estimation utility? By that I mean analyzing the compiled machine code and calculating the number of clock cycles required to run each procedure? That would be realy cool.
The intel Instruction Set manual gives the number of clock cycles for each opcode so you'd only need a lookup table, (or maybe one table for each CPU type).
Can you explain situations where their might be extra work or how coding well would require no extra effort?Quote:
Originally Posted by penagate
Awesome idea. That is going on the list of ideas for sure. With a big star next to it. I like it. :)Quote:
Originally Posted by wossname
You might think I'm crazy but I'd like to see the Public scope modifier go. Allowing member variables to be made Public just encourages bad practices, when you should be using a property instead.
IMO,
- there should be no choice of scope for member variables - they are Private and inherited without exceptions;
- classes should have the option to be made private to the namespace, but public by default;
- to achieve the ease of a Public member variable, there should be a shorthand property notation:
which would be short for:Code:long property myProperty;
Also, I am deliberately making another case for using semi-colons here, because it is FAR easier for the parser, when finding a semi-colon as in the first code example, to stop looking for a method body, because it knows that there is none. If you omit semi-colons then you have to stop looking when you encounter the next statement, which introduces syntatic ambiguity (IMO).Code:long property myProperty
get
{
return _myProperty;
}
set (value)
{
_myProperty = value;
}
Never assume that anything that MIGHT be variable, will be constant.Quote:
Originally Posted by eyeRmonkey
If you stick by that you'll have no problems.
(Of course, in VB6, it's a bit harder because you don't have the degree of control, but you can try :D)
Another suggestion:
- In addition to the multiple specification, an IF operator (as opposed to the construct).
Example - this:
becomes:Code:delete myObject1;
if (myObject2 != null)
delete myObject2;
if (myObject3 != null)
delete myObject3;
A fairly trivial shortening of code, but neat nonetheless :) The trick there for the parser is to test whether the IF keyword is part of an expression (hence an operator), or the first keyword in a statement (hence, the construct). As an operator if the RHS evaluates to TRUE then the LHS is returned.Code:delete myObject1, (myObject2 if (myObject2 != null)), (myObject3 if (myObject3 != null))
Code:Object operator if (Object LHS, bool RHS)
{
if (RHS == true) {
return LHS;
} else {
return null;
}
}
// plus automatic overloads for all other base types
What about branches and loops? You'd need test conditions, which would mean running the program and collecting common test data to feed into the profiler later.Quote:
Originally Posted by wossname
Great idea penagate! I added them to the lists I have.
As far as semi-colons, don't most languages that use them not REQUIRE them? If we don't require them then what is the point in having them at all?
If we do require them, then I don't see it as that much of a downside. I guess it depends on if Jake is going to use flex and bison or not. I guess even if he does, the semicolon would still help a lot.
Speaking of Jake, where has he been? Not even a small reply here and there? I hope he gets him computer soon.
Penagate, since I havn't seen any changes to the logo (which isnt a big deal because they look fine as is) can you make a 16x16 and 32x32 of the fusion symbol so I can drop them into an icon? Also can you start thinking of what icons we should have for the project file and source file? I'm sure they wil have the fusion symbol in them, I'm just not sure how.
I haven't seen a semi-colon-using language where they are optional ;) As you say, not much point in using them if they are.
I'm pretty sure they are optional in JavaScript, but its been a while since I've used it.
How long do you think it will take to throw together a nice 32x32 and 16x16 of the fusion symbol (using the gray-er version of the logo - not the blue one)?
Do you want them with backgrounds?
I'll have to draw a new symbol for the smaller ones because resizing the bigger one looks like crap. Maybe later tonight.
I figures your graphics program could resize it and make it look decent. When I resizes it to 32x32 it looked alright, but 16x16 looks kinda bad.
Probably with backgrounds, but without might be alright also. It depends I guess. You might also try it w/o a background but with maybe a 1 pixles background-colored glow around the edges of the symbol... if that makes any sense.
Also, you don't have to fit the whole thing into the image. What I did when I made the icon was cut off a little bit of the edges.
If you do re-draw it try to keep the dark center part off-center like it was in the banner you posted before. You know what I mean? It acutally gives a more centered/3D look the way you do it, but it isn't centered 2D. That is how I like it. I hope that made sense.
They aren't optional in javascript. It throws the "Done, but with errors on page" error in the status bar.
Semicolons in those languages denote a line, or an executable statement. Makes parsing it alot easier, especially when you can have multiple "lines" on the one line.
etc..Code:a+=1;b+=1;c+=1;
Creating a compiler in Bison and Flex looks more complicated than actually writing one IMO. The grammar files confuse the hell out of me.. :eek:
chem
from what i remember it was only Internet Explorer that allowed the optional use of semicolons, but i could be wrong on this.Quote:
Originally Posted by eyeRmonkey
the code generated by flex is not meant to be human readable.Quote:
Originally Posted by chemicalNova
i have attached a copy of some lexical analysis code generated by flex.
Yeah well it will sometimes get complicated but you can always just do a simple one that estimates the efficiency. Such things will always be indefinitive anyway so there's no real need to be accurate to the nth degree.Quote:
Originally Posted by penagate
How about another feature that detects infinite loops, or something that detects if a loop counter (ie. ecx) is acidentally modified within its own loop (without pushing or popping it). That would be neat too.
As part of my learning ASM I'm currently writing a simple ascii text game. I have the welcome screen working so far. Its only going to be a "guess my number" game (player versus PC and PC versus player :D). D# has nothing to worry about yet :D ...
I didn't mean the outputted C, I meant the grammar files it requires to generate that output. Stuff like:Quote:
Originally Posted by tr333
..does something to make a "blah" type. Thats not exact, its just an example and probably nothing like it. The ones I've seen though, just to create a C-type language, are so mind boggling. :eek2:Code:%FDFDFD%,%%@BLAHBLAH@
Thats actually a neat idea. You could probably sell that to Micro$oft or tell the MASM guys. M$ aren't smart enough to think of stuff like that, and would probably buy it from you if you said "I'm going to upstage your products". It would be interesting to see how something like this was implemented. You could make "cut-off" points for registers like ecx. Just in case it went into an infinite loop.Quote:
Originally Posted by wossname
chem
Great idea wossy. It would probably be an optional feature (because maybe they want it to be infinite?! :confused:), but I like it.Quote:
Originally Posted by wossname
PS - Congrats on 4,000 posts. :)
Back to our focus... Does anyone have a small project they can post that we can convert to lightfusion?
Every weekend, I've been going to Cocoa Beach 3 days at a time hanging out with my best friend, Jackie. She's pretty cool. And it sucks that my computer hasn't been touched in 3 weeks, hence it's still incomplete. Grrrrrr. :mad: Plus I've been getting some action, if ya know what I mean, by other girls there. ;)Quote:
Originally Posted by eyeRmonkey
Just got myself one heck of a birthday present. 12 more vinyls to add to my record collection. One of them is a single called Black Eyed Peas - My Humps. The others are some scratch records done by DJ QBert, some breaks, and some Trance from Paul Van Dyk and DJ Tiesto, and the single Kanye West - Gold Digger.
When I finally get my computer finished, I should be back to work on LightFusion. And at the rate that my father is working on my computer, I'd give it till Christmas :rolleyes:
I hate Gold Digger. What are the trance tracks?
Paul Van Dyk - For An Angel - Side A1 - PVD E-Weak Club MixQuote:
Originally Posted by penagate
Paul Van Dyk - For An Angel - Side B1 - Way Out West Mix
Paul Van Dyk - For An Angel - Side B2 - Terry Lee Brown JNA Mix
Paul Van Dyk feat. Wayne Jackson - The Other Side - Side A1 - Original Mix
Paul Van Dyk feat. Wayne Jackson - The Other Side - Side B1 - Martin Roth Mix
Paul Van Dyk feat. Wayne Jackson - The Other Side - Side B2 - Mark Spoon vs Mobilegazer "Sundown Mix"
Paul Van Dyk feat. Wayne Jackson - The Other Side - Side C1 - Deep Dish Other Than This Side Mix
Paul Van Dyk feat. Wayne Jackson - The Other Side - Side D1 - Breaks Mix
DJ Tiesto - Parade of the Athletes - Side A1 - Heroes
DJ Tiesto - Parade of the Athletes - Side B1 - Breda 8pm (DJ Montana Mix)
DJ Tiesto - Parade of the Athletes - Side C1 - Ancient History
DJ Tiesto - Parade of the Athletes - Side D1 - Euphoria
DJ Tiesto - Parade of the Athletes - Side E1 - Athena
DJ Tiesto - Parade of the Athletes - Side F1 - Olympic Flame
DJ Tiesto - Parade of the Athletes - Side G1 - Coming Home
DJ Tiesto - Parade of the Athletes - Side H1 - Victorius
And that's about it. Can't believe that the DJ Tiesto album came with 4 vinyls with one long song on each side. :)
Good taste :thumb:
Haven't got that particular Tiesto one, will have to look for it.
I've got a ton of Paul Van Dyk and Tiesto in MP3 format (not quite as classy as vinyls though), but I don't have any of those.
Gotta address multiple things.
First, penagate's suggestion to remove public member variables in favour of only properties, but make it so that a public property without explicit getters and setters gets defaults that just return and set.
Which begs the question, what have you achieved? The syntax has not changed. All you've done is introduce two functions, which hopefully will get inlined, but might not. So you have longer compile times (determining whether they can be inlined) and possibly slower execution (if they aren't).
For no gain.
Second, semicolons in JavaScript. They're required. But they're optional in JScript. You have to explicitely name the script block as JScript, though.
Third, infinite loop detection. What kind of infinite loop, exactly?
for( ; ; ) {
}
I know it's infinite. Chances are, I want it that way.
A more complicated loop that happens to not terminate?
How would you detect that? This loop will run forever if there are non-digits in the stream. Execution time? Sorry, no. The file just might be a gigabyte large, which means LONG execution time. And any longer, and the infinite loop detection is useless.Code:while(!filein.eof()) {
int i;
filein >> i;
}
Finding out through logical deduction is next to impossible for a computer program. You'd have to monitor every variable that might have something to do with it, at runtime no less, and detect that no relevant variable has changed.
It's a nice idea, but impractical. In particular:
Sorry, if you really believe that, then you're the stupid one. Not only MS, but a lot of informatics scientists are looking into stuff like that, and if they don't have it, then the reason is either that it's not possible, or that nobody knows how, or that they know how, but it's not worth the effort. MS would probably laugh at you if you said you'd upstage their products.Quote:
You could probably sell that to Micro$oft or tell the MASM guys. M$ aren't smart enough to think of stuff like that, and would probably buy it from you if you said "I'm going to upstage your products".
You raised some good points CornedBee. Although I think there still might be ways to implement those ideas.
As far as infinite loops, of course we can't catch EVERY infinite loop, but simple loops with obvious errors could be caught.
As far as calculating the speed of a program based on clock-cycles per ASM op-code, I think it is still possible. It may require some input from the user (IE - a common number of loops, a common file size, etc) and it wouldn't be perfect. We may have to give them a speed and have a note at the bottom saying "this report does not include the following sections of code:" and list the loops or parts where the program interacts with files and other things. I think it might still be a useful feature, but once again, it is far down the road.
For the time being we need to focus on syntax and we need to figure out when Jake is getting a computer. Maybe we should find someone to help him with the compiler and when he gets back they can work on it together. That would get things moving... It's just a thought, and I guess its up to Jake.
Current To-Do List:
* Make some decisions on syntax
* Begin taking small VB projects and translating them to LF code to help us in making decisions for LF sytnax
Eh, why not. Me not having my computer finished is getting this project no where fast. Plus on top of that, my social life has increased significantly since my old best friend and I became best friends again, and now I'm friends with her friends, and friends with their friends, etc. I now got more friends that are girls than a mofo. :)
Sounds good. Now we just have to find someone that is willing? Any ideas? Is anyone interested? Whoever takes on this role will be taking part in some major decision making such as how we are going to make the compiler (translate into ASM and compiler from there or make it form scratch) and other things like that. I hope we can find someone so we can get things moving. Any takers?
Current To-Do List:
* Make some decisions on syntax.
* Begin taking small VB projects and translating them to LF code to help us in making decisions for LF sytnax.
* Find someone that wants to work on the compiler (and help Jake with the compiler once he gets his computer up and running).
IDE: * Figure out how to get relative paths of files reliably.
Way to spoil the fun of trying to bag Microsoft CornedBee. :(
chem
You have eliminated public member variables ;) If you want to add explicit accessor functions you can, whereas to do the same with public variables requires a rework of the code. Forcing all variables to be private and requiring the use of properties to access member variables is simply enforcement of good programming practice.Quote:
Originally Posted by CornedBee
And, any half-decent compiler would optimise away the one-line functions in favour of direct variable access in the compiled code.
Here's a short program I'm currently translating to ASM, nice simple thing for you to try out in LS.
PHP Code:static int UserGameLoop()
{
//USER has to guess the computer's number
Random r = new Random();
int lower = 0;
int upper = 1000;
//Console.Clear();
Console.WriteLine( "Guess the computer's secret number, between 0 and 999, (enter 'Q' at any time to quit)" );
int CPUNumber = r.Next( lower, upper ); //computer chooses a number between 0 and 999
int userNumber = 0;
int attempts = 0;
string scratch; //accepts user input before parsing
double userDouble = 0; //holds the raw number
do
{
scratch = Console.ReadLine().Trim().ToLower();
if ( !double.TryParse( scratch, out userDouble ) )
{
Console.WriteLine( "Quitting..." );
return -1; //quit the game
}
userNumber = (int)userDouble;
if ( userNumber < CPUNumber )
Console.WriteLine( "{0} is too small, try a LARGER number.", userNumber );
if ( userNumber > CPUNumber )
Console.WriteLine( "{0} is too LARGE, try a smaller number.", userNumber );
attempts++;
} while ( userNumber != CPUNumber );
Console.WriteLine( "Congratulations, you guessed {0} correctly in {1} attempts.", CPUNumber, attempts );
return 0; //success
}
Not a bad argument, but it violates two of your LightFusion principles:Quote:
Originally Posted by penagate
1) Don't force the programmer.
2) Make it obvious what the generated code is.
The second principle you listed is fairly dodgy. Well optimised assembly is almost never obvious. As for the first, I'm not sure what it really means. Unless you include every possible language facility in the universe, you'll always be "forcing" the programmer to a degree. Maybe eyeRmonkey can clarify that one.
The first rule you guys mentioned (Make it obvious what the compiler is doing) seemed like a good idea at the time (and still somewhat does in my mind) but I see some backdraws to it now that you bring this up. Like Penagate said, if we optimize the assembly then it can't be obvious. The reason I brought that rule up is because I thought that if the user knew what the compiler was doing, then they could write fast code easier.Quote:
Originally Posted by penagate
Since we are going for a fast lanugage, I thought it made sense to not only make a compiler that compiled fast code (thats subjective statement anyway), but also put some of the responsibility on the programmer to make the code fast BUT make it easier for them to do that. I figured letting them know what the compiler is doing would be a great way to allow them to make fast code.
I'm not sure how we should deal with this. Do you guys see what I am saying about helping the user write fast code? What do you think we should do?
For the second rule you brought up (Don't force the programmer) that has its ups and downs also. There are obvious advantages to forcing the user to write good/proper code, but this could also turn users away from our language (but obviously we can't please everyone). I guess we should add an exception to this rule (and maybe the last rule), but I'm not sure how to phrase it. Something to the effect of "unless the gain is greater than the sacrafice (of forcing them)". But that is very subjective also.
Like Penagate said, every lagnuage has syntax rules that force the programmer in some sense. If we change something about our language that forces them in some way that other languages don't, does that mean we are truly "forcing them".
I like the points Penagate has made. I think this language needs to have some things that make it unique (without changing things for the sake of changing them).
I also think this is somewhat of a big decision to make this early, but I will defeintely keep it on our list. Remind me in about 3 months Penagate. ;)
We can defenitely keep discussing it, I just don't think we will come to a final decision now unless someone makes an awesome point.
truthfully, i think you guys are getting way ahead of yourselves here on this. Why dont you get it working first?
Because Jake can't work on the compiler right now so we have nothing to do but work on the syntax and think up features. He doesn't have a computer until maybe christmas. We are looking for someone to help him with it so we can get started sooner.
There lies the awesome point.Quote:
Originally Posted by |2eM!x
chem
Okay, if that is how you guys feel, then what do you suggest we do?
I am TOTALLY open to suggestions. It bugs me that we aren't moving anywhere at the moment also, but what can we do without out a key team member? If we assign the compiler to someone else at this cirtical stage then we are making a big decision. That person holds a lot of huge decisions in their hands and are joining the team late (unless its someone who has been following this thread).
Does anyone have any ideas?
I don't know how far Jacob got with the compiler/linker, but not very far I presume, so it wouldn't be too big a deal. Once he has his computer he can get back working on it again.
I disagree. The big decisions should be made at this stage when the language is still in design phase ;)Quote:
Originally Posted by eyeRmonkey
Also, obviously if the compiler is going to be open-source, then the language has to be a standard of some sort (so that others can develop compilers for it). so words to that effect need to be written somewhere.
Not sure what you were reffering to in the last paragraph when you you said "words to that effect."Quote:
Originally Posted by penagate
I asked some questions near the beginning of this post. Could I get some feedback?
He means that if LightFusion is oging to be open source (which we assume it will be), then a standard must be produced. We don't mean a standard be produced in your head, we mean write it down, and post it on the original Post.
chem
I'm not the one who is writing a standard in my head. That was Jake last time I checked. I posted a .doc with all the syntax rules that have been suggested a few pages back. Obviously that is not sufficient to count as a standard but we are not far enough and have not made enough decisions to have anything that could count as a standard at this point. But, as penagate pointed out, that is probably something we should be working on now.
I feel a lot of critisism coming from the few people who are reading this thread. You guys keep saying we aren't doing what we need to be, which is fine, but I would really like to hear some suggestions (such as: "You should make a standard for the language") instead of "You shouldn't be doing this or that".
Chem, you keep posting things to the effect of "get to work" but every time I ask for suggestions I don't get any replies (Post #885).
You guys can't expect that we should know what we are doing. We are a bunch of chickens with our head cut off because we don't have any professional training and we are just a bunch of friends who came together for a project. Why should we know what we are doing?
Now obviously that isn't an excuse to not be organized and not try to do our best, but we need constructive critism (and we get some) not things like "Why dont you get it working first?"
I hope you guys can understand where I am coming from on this.
The point of all this is to learn something from making a programming language. That's what we n00bs at this intend to do. We are not experts at this. But based on our programming experience, I feel it's very possible that we can pull this off. :)
Penagate, could you continue the discussion of your ideas for making everything property based or give me an example or something like that? I would like to make a decision on it eventyally since that is probably the better thing to do at this point.
Here is a syntax conversion of some code originally posted by Wossy:
Quote:
Originally Posted by WossName
And here is the LF conversion:
As far as I'm concerned, semi-colons are back in.Code:static bool UserGameLoop()
{
//USER has to guess the computer's number
Random r = New Random;
int lower = 0;
int upper = 999;
//Console.Clear();
Console.WriteLine("Guess the computer's secret number, between 0 and 999, (enter 'Q' at any time to quit)");
int CPUNumber = r.Next( lower, upper ); //computer chooses a number between 0 and 999
int userNumber = 0;
int attempts = 0;
string scratch; //accepts user input before parsing
double userDouble = 0; //holds the raw number
do
{
userNumber = Console.ReadInput;
if ( Vars.TypeOf(scratch) = lfDouble )
{
Console.WriteLine( "Quitting..." );
Return False; //quit the game
Exit;
}
if ( userNumber < CPUNumber )
Console.WriteLine("{userNumber} is too small, try a LARGER number.");
if ( userNumber > CPUNumber )
Console.WriteLine("{userNumber} is too LARGE, try a smaller number.");
attempts++;
} while( userNumber != CPUNumber );
Console.WriteLine("Congratulations, you guessed {CPUNumber} correctly in {attempts} attempts.");
Return True; //success
}
I'm unsure about the following:
* Class for Random stuff (should it be a class?)
* Class for Vars (should it be Vars.TypeOf()?)
Penagte, how long until the small logos will be ready so I can put them into the icon? How about a thin banner like you made before (except now based on the most recent version).
Does anyone have any idea how we can find someone to work on the compiler?
You call that a LF conversion? :ehh:
Looks more (or actually all) like C++. We were designing LF to be sort of like a cross between VB and C++ with a twist of our own style, and we were most certainly eliminating the semicolons.
Jake, well what would your conversion look like then? The whole point of doing this is to iron out the syntax (I guess its more like sew it together, not iron it out :)).
Why am I so easily swayed on the issue of semi-colons. I guess it is a pain to type them out. It will be harder to parse, but if you do make the parser then I guess its your choice.
i would say that typing one extra character per line is not much effort, considering the benefits in code readability and ease of parsing.
There's a superfluous Exit call in the conversion. Unless Return no longer returns immediately.
It won't be any more difficult to parse. The new line character is invisible to us, but not the computer when converted to bytes, and would be no different than the semicolons. I'd parse it right now and show you, but I only got like 10 minutes of my lunch break at work left. :(Quote:
Originally Posted by eyeRmonkey
I guess it depends on how you view Return. I was thinking of it as FunctionName = (value). I guess Return is different than that.Quote:
Originally Posted by CornedBee
Once again, how would your coversion look like in LF?Quote:
Originally Posted by Jacob Roman
What would the sytax look like for a set of code that is all on one line then? As in multiple lines on one line. In a C-ish language it would look like this:
Code:b = 10; c = "start"; d = ALPHA_2
Hi there!
This project looks awesome! I'm writing my own parser/interpreter at the moment (Which i'm then going to convert to a compiler).
Are you going to use lex and yacc? or Flex and Bison for all you windows users? It will make your life SOOO much eisier.
-Girvo
Girvo, I'm pretty sure we will be be using Flex and Bison, but at this point we don't have a team member on the compiler (at least not for a month or 2) so we are looking for someone to join the team. At this point we are going no where. The IDE is coming along slowly, but is totally pointless this early on and even more pointless without a compiler.
Current To-Do List:
* Make some decisions on syntax.
* Begin taking small VB projects and translating them to LF code to help us in making decisions for LF sytnax.
* Find someone that wants to work on the compiler (and help Jake with the compiler once he gets his computer up and running).
Once again, I changed my mind on the subject. It wouldn't be hard at all to have the IDE insert the semi-colons for you (because it will already be doing a lot of other operations automatically). That is the best of both worlds IMO. Readability, easy parsing and easy coding.Quote:
Originally Posted by Jacob Roman
What do you guys think of that?
Would you like me to help with the compiler? I'm ok with Flex and Bison. But, you might want to keep the same person working on the compiler the entire time so...
-Girvo