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 - Josh @ Dreamland

2296
Announcements / Re: Quick Poll
« on: March 12, 2010, 09:30:52 AM »
Serp--
They'll be stored in the file format for when ENIGMA queries for them.

retep--
I'm going to have a check box / radio button to decide whether to treat } as }; or not. It'll be defaulted to };. This way, we don't have users pissed off about the only feature of EDL that depends on newlines.

2297
Announcements / Re: I hate the last ten days before a release.
« on: March 12, 2010, 08:37:01 AM »
Same difference.

2298
Announcements / Re: I hate the last ten days before a release.
« on: March 11, 2010, 03:22:09 PM »
retep--
I'll need a bunch of people who know a good amount of C++ shortly. Will help when mass-producing GM's dumber functions.

Fede--
Am hoping it's impressive (though not the first thing I release for testing, which will just be a spruced up R3 [extra parenthesis for no reason]).

miky--
Git does look rather nice, but I have yet to set up whatever key it wants me to have in order to use it, so that's a hassle. It's also not on SourceForge, so I have to change habits to use it.

2299
Announcements / I hate the last ten days before a release.
« on: March 11, 2010, 08:52:16 AM »
Consistently, the last ten days before a release grow to twenty and then maybe thirty due to lack of coordination. It's a wonder I managed to hit within 15 hours of R3's deadline, honestly.

Standings:
As has been reported, the C parser is done. There's been no reason to modify it so far, and I'm hoping never to run into such a reason.
A great deal of the other two parsers is done; more than 75% of each.
I'm to the point where I would like to start testing everything working together before progressing on either parser, however, we have a problem with that.

LateralGM has three members.
Ism's on spring break, spending time with people somewhere. I don't want to ruin it for her; she could probably use the vacation after the earthquake following the release of GM8 (which honestly, I wasn't expecting at all; don't know if she was or not).
Quadduc is apparently working on other (somewhat cooler, admittedly) projects.
Clam is pretending to go to college (Really, he's running a social experiment to see what the worst thing he can wake up to is after passing out drunk).

The good news is, Ism intends to help during boring times of spring break, and to actually come back afterward.  :v:

As for me, my college courses are on spring break as well. High school ones aren't, so I have to show up to them for two hours a day anyway. What's annoying, though, is being unable to hook ENIGMA up to LGM without Ism; there's just been too much change... And it's so close to just being done...

Presently, Ism is trying to get a simple DLL working from Java. I'm hoping JNA will allow ENIGMA to ask LGM for resource information instead of relying on it to be sent... We'll see how it turns out. The last phase could be messy.

I guess I'll continue to work half-blindly on my parser... I do wish for the batch passing of scripts to it, but whatever. There's also a timing issue with serp. He's done some impressive work on ENIGMA's library while I was working on those parsers. They're on GIT, which I hate working with. I don't know when to check out, is the problem. Having a revision system is supposed to fix that, I thought. ;_; 'S what we get for having two of them.

I'm running a couple checks for old mistakes that I corrected long ago but never released a patch for. Heh, what a ride. It's nice to be this close again.

2300
Announcements / Re: Quick Poll
« on: March 09, 2010, 02:33:36 PM »
I meant the poll. I can't just have a checkbox for whether you want the compiler to bitch about that; you're bound to make the mistake again even once you're aware anyway.

I see what you mean now, and I like it.

Of the 14 who voted, 10 thought that it should either be the user's responsibility or that immediate instantiation should be disallowed; about a 50-50 split between those. That being the case, I think it'd behoove me to make it a checkbox between the two, defaulted to the one with more votes. So, by default, } will be };, but that can be turned off.

2301
Announcements / Re: Quick Poll
« on: March 09, 2010, 02:16:25 PM »
Ah, only when there's a newline, hm... That can probably be arranged, but I think it'd confuse the hell out of people due to potentially appearing inconsistent. I'll add an option for it.

That's basically the principle on which JavaScript was founded, though, so...

2302
Announcements / Re: Pride
« on: March 08, 2010, 11:01:08 PM »
I understood it to be machine-independent code that is optimized and loaded native, JIT.
I assume it should be at least somewhat faster than code compiled for a particular architecture but not optimized for a particular system. I'd like to know by how much on average it's faster, to see if it at all justifies its use.

Memory is cheap. I can't know which objects will use a certain resource, everything's an integer. Doing so by sprites I know will be used is begging for trouble.

Assuming Haskell and C's performance boosts are the same, that's not a bad gain, but I'm not sure it's worth the effort.

2303
Announcements / Re: Pride
« on: March 08, 2010, 10:26:55 PM »
But the bytes coding for those may vary. Now we know it doesn't; to write a decompiler for one is to have one secured for them all. There is only one.
And by stats, I meant benchmarks of LLVM-JIT code versus native on different platforms and architectures. Not just a list of over-elaborated features.

Also, I don't want to do a check to see if the sprite or background has been loaded every time you draw it. The less such checks, the better.
If GM offers such (which I think it may), it will be replaced with a more hands-on system, driven by functions or user-defined events.

2304
Announcements / Re: Pride
« on: March 08, 2010, 09:37:58 PM »
"So can pointers in C++. Does that mean that C++ can't be garbage collected?"
"So there's no strings, surfaces, data structures, sounds or images that you could ever possibly delete?"

C++ could be garbage collected if I replaced all calls to malloc with my own. It is because GM integers are only incremented by one, and are completely ambiguous. Case-in-point: object0 == sprite0, sprite0 == sound0, sound0 == path0. The only unique IDs are for instances, and, well, that's the only thing I come close to garbage collecting. People often shortcut and reference some sprites by integer instead of full identifier. I have also seen choose(spritex,spritey...), and with that, of course, random() used in the mix. There's no garbage collecting resources that are identified like that. My best bet is to assume they are in use until _destroy is called. Good garbage collectors work by tracking references rather than pointers, especially ambiguous ID's representing pointers in an array.

"I think I made myself fairly clear on the nature of the VM I was describing."
Yes, reading that over, now that my expectations for a good reason to use such a VM are zero, I see what you are describing. I was just looking for something to set it off as a better idea than native code. Granted that being able to discover the architecture the program is on and run some specific optimizations for it at load time is nice. However, I don't see it as necessary for the extra work on the platforms for which I would/could include it.

"LLVM has its website to back itself up"
I don't see a single statistic, though it is a nice site compared to others of its breed. They even invested in background textures.

"LLVM isn't much higher-level than normal assembly; it's just not machine-specific"
Which makes it a fraction of the work to write a decompiler for. Though I suppose that can be dropped as a concern since they do optimize it some at compile/link time.

"Anyway, the whole decompilation and obfuscation issue is moronic. Who cares if people can decompile your game and see its source code? What are they going to do with it? Claim it's their own? How are they going to get away with that? Steal the ideas in the code? Don't flatter yourself."
Everyone says that. I agree with most of it. Doesn't mean everyone will kiss ENIGMA's ass for using that same excuse. Some people just like feeling more secure.

Anyway, all this future talk. Clearly, the closest thing Clang has to what I need is its parser, assuming it can really tell me what can be used as a type, and verify if X is a member of Y with a decent complexity. I will add that to my list of considerations for if the one I wrote should ever fail to be enough. Until then, I don't need it, and other than that, the project is no use to me.

2305
Announcements / Re: Pride
« on: March 08, 2010, 05:38:54 PM »
Quote
So your argument against including GC is that real programmers don't use GC? In that case, you should stop using C++, because real programmers use butterflies. It would be really stupid not to include some way to get rid of the crap that users allocate. That's one of the reasons GM takes up so much memory, and I thought a main goal of this project was to make a more efficient GM.
I didn't say I wanted to act anything like a real programmer, I said that garbage collecting my own code was lazy and that GML doesn't have anything worth garbage collecting, especially being so spontaneous as a language. Again, GM users don't allocate anything. I've sometimes opened files and forgotten to close them, yes, but that can't be garbage collected. Nothing in GM can be, because everything is an integer. There is no reference, weak or strong. A reference can be pulled out of one's ass.

Quote
You're completely failing. A VM is not something that has to be installed on the user's computer. The Lua VM is very, very small, and it's almost always embedded in the programs that use it. Look at Löve2D.
I'm aware. I couldn't tell what in specific Rusky was promoting, probably due to the fact that he claims not to be advocating anything in specific.

Quote
Clang parses the whole thing for you, so you would be done already with what you've been working on for... how many months?
Almost half a year, thanks. Probably less than Clang spent on theirs, or has left before they say it supports all of C++.


Quote
GM also uses a lot of memory; why would you use what it does as justification? Also, manually allocating and freeing requires a different kind of heap than what GC usually uses. It's not really faster, it's just got the load in a different place. Have you ever written malloc? The only difference is that GC puts the load on freeing while manual puts the work on allocation. If the collector ran at the right time or in a different thread, it could potentially be faster. Finally, I never suggested making Enigma's internals garbage collected, only the parts that the user interfaces with or writes.
That wasn't meant to be justification in the sense that it was excuse; I should have been more specific. I can't just load and dump resources as they come in and out of need, simply because I never really know when they're needed. GM always keeps them in memory; when the user wants them, they are there instantly. The best I can do is provide functions to give the user more control of that.

Like I said, not much in the GML really needs freed. GM offers no method of freeing anything except through functions ending in _destroy. I suppose those could have threaded frees, but I'm not sure it'd be worth it to do so.

Quote
Ack. Having a once-compiled module is one advantage, yes. But the user would not have to install the VM on their system. Just like GM games include the runner and Enigma links the engine to the game, it could be included with the game. Literally nobody has LLVM installed, because it's a library intended to work exactly this way. There are also several other advantages of a VM. The game module could be easily separated for use with different runners simultaneously like instant-play. Optimization can be more aggressive with JIT. The engine's API, the runner and the games would be decoupled.
I know little about LLVM. Simply have no interest in it, especially seeing that the only advantage it seems to have is a potentially more aggressive optimization, which no one has backed up (in advance: "it's a fact" will not back this up). That separation doesn't seem to be an advantage. In fact, I take it for more of a problem; the same problem half the GMC was screaming about. ENIGMA games compress to fit inside 300 KB. Last I recall, they compress to fit in just over 100. This sounds like another attack on compression and step back toward decompilation-made-simple. Yes, obfuscation... Just like Yoyo's been promising but never delivered... Not good enough if they did.

Quote
Clang is GCC compatible. The platform it's built on supports PowerPC. There's no reason for it not to support Wii in the future (just like it will support the rest of C++ in the future). I did not suggest using Clang right now. However, Clang has a separate library that will parse C++ for you, which would save you the work of having to do it yourself as well as allow future versions to cooperate with the Clang compiler to get rid of all the unnecessary work.
GCC compatibility is a plus you'd not yet advertised. You did mention it supports PowerPC, but just because there is no reason for something not to happen does not mean it is going to happen. There's also no reason for it to support Wii in the future. Just because you are enamored with it, and maybe others are, doesn't mean someone will take the effort to do for it what they did for GCC. The work is done, and people are happy with it. Passing the parse work off to clang would have been nice if I knew I could trust it and I knew so from the beginning. Since my parser's done now, and in the format I like, I have no reason to switch to anything else from here on out. Unless something really stupid happens.

Again, I didn't ask for a design. I wrote my own, and it's done now. I don't want to hear about other techniques unless they are genuinely worth the work to replace what I have with them.

2306
Announcements / Re: Quick Poll
« on: March 08, 2010, 02:27:17 PM »
Game_boy:
Correct. This doesn't even affect anyone who does use the resource; only those who want to declare structures in individual events, which is a hassle anyway.

Luis:
Yes. Didn't want to complicate things with a second new vocabulary word that's essentially synonymous to the first.

The 11th plague of Egypt:
The problem with that is figuring out when you're ready to remove the training wheels and stop hearing that particular error. It'd confuse people when pressing the syntax check button revealed a warning. What about the rest of the document? Is this the only problem? Perhaps clicking the syntax button again would suppress that warning... I really don't have an intuitive system planned out for it, though.

2307
Announcements / Re: Prophase
« on: March 08, 2010, 02:20:19 PM »
Yes, was being funny. Linux port was written with the thought "maybe this'll finally bring more than 20 games to the OS...." But then it turned out I hate Windows in comparison.
Regardless, Windows is still the first priority (though not so much first to justify me stopping to write a DirectX port right away).

2308
Announcements / Re: Pride
« on: March 08, 2010, 02:05:45 PM »
"Enigma's design is GM + C++, it was created without C++ in mind." Assuming it is the fault of a typo that the sentence is contradictory, you are apparently trying to tell me what was on my own mind as I created the project...

"Are you going to leave all the rooms with all the backgrounds and all the sprites loaded the entire time?"
Considering that this is exactly what GM does, I don't see doing so as a problem. I intend to implement a system to use object grouping data to allow importing and exporting blocks of resources, maybe on a basis that won't need the game to freeze (reading a small amount each step so small cutscenes can run in the game in the meantime). However, this is irrelevant to the current argument. You are asking me to include a garbage collector for data the *engine* works with? Garbage collectors are for the lazy. They aren't very slow as of late, but they will never be as fast as handling the allocation and freeing linearly,except, maybe, with a well-optimized VM the likes of which will not be written for this project and thus is again irrelevant. I'm not writing a garbage collector for my own convenience, and I cannot make accurate guesses at which resources will be added when, due a lot to how GML is structured.

"So your reason for using a VM is... you aren't already doing it?"
Incorrect. The only reason to use a VM for this project is to have a once-compiled, cross-platform module. The necessary VM to run such a project on each system would need to be installed on each system, however, thus totally ruining that idea. And don't give me any shit about how many people have LLVM installed; there are people out there who don't even have Java installed, and that's giving me a hard enough time as it is.

Also, I didn't claim that GCC had an advantage in parsing *the* standard library. I implied it had an advantage in parsing *its* standard library. Which is better than Clang's because it comes with GCC, which is better than Clang because there is a version of GCC to cross compile for everything I ever wanted to port ENIGMA to (my favorite presently being the Wii). All the Wii Brew developers utilize GCC, last I checked. Feel free to move to their forums and convince them to switch to Clang; I'm sure none of them will laugh at you.

"Your search - site:wiibrew.org clang - did not match any documents."
No one there even advocates the noise the project was named after. :(

2309
Announcements / Quick Poll
« on: March 08, 2010, 08:58:12 AM »
As the more conscious of you realize by now, ENIGMA allows for C++-style declarations to be used in your projects. As you all should know, GM is very loose about its semicolons.

I asked Ism to create a script-like resource that will allow users to define their own structures and functions for use in the rest of the project. However, it is also legal in C to define structs in your code, and I don't want to alienate that as a feature.

For those who are new to C, structs are a simple data structure that lays out how chunks of memory look. They allow you to keep track of multiple things, like a named array. Instead of having, for example, a 2-Dimensional array to store x-y pairs, you could create a structure like the one featured below.

Veterans know that R3 allowed for cpp {} to handle such things. The cpp statement created a block of un-parsed code to allow users access to C++ without the parser having to check it for error, creating a workaround as well as a decent expandability. That block is no longer necessary for its old purpose; now we can choose to have it serve a new one along with it.

Say that in a create event, you want to create a structure with an X and Y pair. I don't know why you'd want to do this since you may as well just keep two arrays, but for the sake of example pretend you do.

Being used to the GM way, you say this:

Code: [Select]
struct xy {
  var x;
  var y;
}
direction = 0
speed = 0

That's a problem.
The parser would naively make your code look like this:
Code: [Select]
struct xy {
  var x;
  var y;
}
direction = 0;
speed = 0;

The above code looks correct, but in actuality, it redeclares direction as an xy structure in that piece of code. This is because the proper form for structure declaration in C is this:
Code: [Select]
struct name { int members; } instance; I'm sure you can all imagine why that isn't good... For those who can't, it means that for the rest of that code, the word "direction" will NOT refer to the builtin variable direction. It will instead refer to an instance of your xy structure, which behaves like an instance in GML. You could say direction.x = 0; direction.y = 1;, and it would be valid. To fix this, preventing the instantiation of immediate varnames (in this case, direction), you would simply add a semicolon following the closing brace.

Code: [Select]
struct xy {
  var x;
  var y;
};
direction = 0;
speed = 0;
The above piece behaves as one would expect.



All this considered, we are left with three options.
  • We can leave it up to the user to remember that semicolon.
     I still forget that semicolon at times. It is one of the most common mistakes in C/C++.
     It won't error, because direction is declared elsewhere. You'll have to figure it out yourself.
  • We can disallow immediate instantiation.
     This means that code will be treated as if the {} had been followed by a semicolon immediately, and that you cannot declare a new structure and instantiate it with one semicolon.
  • We can use cpp %{ %} for such declarations, erroring if the struct isn't in one.
     This is like the first option, but it will remind users to watch what they're doing. It's also pretty inconvenient, in my opinion. Whenever you want a new structure, you will have to input code similar to that below. I did like this suggestion when Miky made it, but then I couldn't make up my mind.

Code as entered for option 3:
Code: [Select]
cpp %{
  struct a {
    int b;
  } c;
%}
Creates a structure called a, with a member called b, and instantiates it in a variable called c. You can say c.b = 0, for example.

Please read over carefully and make your choice; feel free to ask questions or justify your answer. You can change your vote (assuming SMF works like the checkbox implies it will), so don't be afraid to just place one.

Note that the script-like resource mentioned is pure C++, and so expects perfect grammar. This does not apply to it.

I also ask that you don't just randomly pick one, though picking one because your retarded friend told you to do so is fine. I figure cheating on polls is a good thing; it reflects who cares most.

2310
Announcements / Re: Prophase
« on: March 08, 2010, 07:22:31 AM »
Why am I making this work for Windows, again? >_>

Oh right, GM userbase. *begrudgingly gets back to work*