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

Proposals / New ENIGMA Implementers' API; this concerns all developers
« on: March 15, 2012, 09:16:17 PM »
As the new parser approaches completion, it is time to start considering the implications. I have already made the executive decision of implementing half of this in the past, but what has been implemented will need some recoding, and the new parser allows for marvelous new extensions I would like to take advantage of. As such, I figure it would be good of me to draw up this proposal both to inform developers and open the floor for comments before they are implemented.

Developers heretofore have used the global enigma::instance_event_iterator to determine the current instance and interface with its locals. At first glance, there's nothing wrong with this, but when we really consider its implications, we start to see its limitations:
  • Threads cannot manipulate this variable concurrently.
  • Sideways casts between virtual ancestors cannot be made correctly in other files.
  • Functions which change scope must synchronize their use of this variable.
  • This variable does not, in itself, affect the scoping of scripts and functions called therein.
We can correct all of this by having reflexive functions, such as instance_destroy(), take an additional parameter, _E_SELF, of a particular C++ instance type (eg, _OBJ_object0*).

This is similar to the mechanism with which you are likely already familiar, the  varargs type, which allows you to request an stdargs-like overload which you can treat like an array of parameters. It is similar in that each of these are semantics that can be declared in C++, but only used in EDL via the intervention of the parser.

The proposal, then, is as follows:
  • Any parameter with the type enigma::varargs will be allowed to be passed an infinite number of parameters, as an array. The parser will handle packing the parameters given into the array in an efficient manner.
  • Any parameter with the name _E_SELF and a pointer-to type will be invisible to the user and filled in by the compiler with a pointer to the instance in question, meaning this in events and member scripts, and with->inst in with statements.

The lexical stipulations should be my concern rather than yours. Basically, don't assume you can do anything stupid. For instance, the following is a set of legal overloads:
Code: (C++) [Select]
int max(double, double);
int max(double, double, varargs);
While the following is ambiguous:
Code: (C++) [Select]
int max(double, double);
int max(varargs);

The reason, of course, is that if you pass it two doubles, both functions are equally logical choices. Now, I could choose to give weight to the concrete matches precedence, but I'm asking for your opinions on that, first.

Now, as for the _E_SELF parameter, if you think you have a better method of unambiguous identification for this which corrects issue (2) given above, let me know. Or, if you prefer a different name, such as just SELF, let me know as well. Otherwise, this will be the new format for the prototype:
Code: (C++) [Select]
void instance_destroy(enigma::object_basic* _E_SELF);
So, post suggestions, or be aware that these two modifications mean changes to the API, including existing functions.

Floor's open. Be informed. Feel free to contribute.

Proposals / Re: Edit Image/subimage... Button?
« on: March 15, 2012, 02:19:08 PM »
I'm mostly trolling, but... :P

Proposals / Re: Edit Image/subimage... Button?
« on: March 15, 2012, 09:54:54 AM »
So it's a keylogger?

Games use WM_KEYDOWN. Applications use the hotkey API. Keyloggers use hardware scan functions.

Proposals / Re: Edit Image/subimage... Button?
« on: March 12, 2012, 11:53:54 AM »
It is pretty different, isn't it. I think DarkAceZ wants a button with the little pencil and paper icon ("edit") between the paper with the star ("new") and the big X ("delete").

Also, I'd move that "wrap" checkbox on its own somewhere where it's more noticeable and less hideous. Like under that scroll pane with the subimage thumbs. Then right-align the arrows.

While we're proposing features, I'd like to see a button myself, with the icon you use for the effects tile. It should have options to quickly invert all subimages (255 - channel), flip/rotate all, reverse order, add reverse order, and if you're feeling jumpy, any of GM6's stock effects (fade from one subimage to another, rotate by a fraction of a given angle each subimage, shrink from a given subimage, grow to a given subimage, etc). Depending on just how jumpy you feel, I'm personally in the market for a "color to alpha" and "alpha to color" function--the former does some math on the color channels to determine the alpha channel (probably comp<,,>(<,,>)), the latter just renders the image over a background of that color.

Announcements / Re: Why does it look like nothing's happening?
« on: March 11, 2012, 12:07:49 PM »
That's dumb, too. :P Why would we have LGM be responsible for it on Windows but not on Linux? You need elevated privileges either way, because people keep installing ENIGMA in the Program Files on Win 7 (at which point nothing works so they show up on the IRC).

I don't know that LGM's actually going to be capable of updating anything. We'll probably have to maintain installers and patches for each platform, and have enigma.jar invoke the correct installation system on them (the installer on Windows, the package manager on Linux, Steve Jobs on Mac).

Announcements / Re: Why does it look like nothing's happening?
« on: March 10, 2012, 08:21:42 PM »
Why would he need to share the changed files? Just merge them in locally if you want to try them.

Announcements / Re: Why does it look like nothing's happening?
« on: March 09, 2012, 10:33:39 AM »
Let's have LGM download itself.


Announcements / Re: Why does it look like nothing's happening?
« on: March 07, 2012, 05:27:21 PM »
Do you yourselves still believe you can create something similarly functional to GM before GM catches up completely on speed and platform support? (Obviously you are free so leaving a lot of extraneous functions and features out would be understandable).

Yep. By throwing out the interpreter, Dailly has made room for serious optimizations, but judging by the fact that his C++ runner promise has been around for as long as ENIGMA, I'm going to call bluff or similar on his LLVM promise. If they switched to LLVM, we might be hurt. I'm thinking we have about 6-8 millennia before that happens. As far as platform support goes, they've basically already caught up since ENIGMA's Android support only works on every third Tuesday of the month.

At this point, being free is an advantage. But I don't have any personal interest in this project if that's the only advantage. At this point, I'm looking for capability in more aspects than just speed.

Oh, and Luis- If I wanted, I could recommit them. The issue is that I'm afraid he's right; some of those files just shouldn't be in the repository. We ought instead to include them with releases as needed. The issue is creating a release mechanism around git.

Announcements / Re: Why does it look like nothing's happening?
« on: March 07, 2012, 07:34:50 AM »
Fundies is cheeseboy. It's possible he got it working on Windows, but I think his goal was to fix Linux. Rusky broke all platforms when he went on his deleting spree.

Windows would probably work if you checked out the SVN, then checked out the Git overtop it.

Announcements / Re: Why does it look like nothing's happening?
« on: March 06, 2012, 04:58:50 PM »
All right, cheeseboy, you've actually succeeded in pissing me off. Here are some bullet points you may have missed:
  • You are not entitled to my help. While you may expect me, as the coordinator of this project, to maintain it, I am in no way obligated to do so, even if it seems "logical" that I do. I could drop this project and all of you on your respective asses at any time.
  • I have not brought anything upon myself. You are also not entitled to the use of any of these communication systems. As a proponent of free speech, I let you speak on the forums and, until it becomes a distraction, on the IRC. I could without any repercussion ban you from either of these.
  • If the parser Rusky wrote over the course of that month were enough to power ENIGMA, he would either have his own ENIGMA or I'd have ran with it.

Fortunately for this project, neither I nor Ism have decided to leave it. In the event that either of us did, this project would crumble. While it is possible that someone new would rummage through the code in the project and run with the volumes of mundane GML functions implemented under SHELL/, no one in their right mind would run with the existing parser configuration as it is too deeply torn between GML and C++. This includes myself; ergo, I am recoding the parser to my specifications. Not as a GML lexer with LLVM code generation.

If you have a problem with this, feel free to leave.

As for the rest of you, understand that your comments are welcome, including constructive criticism. If in doubt on what constitutes constructive criticism, study the differences between your comments and the last several posts cheeseboy made. If you see a difference, it's probably constructive. Or written in English.

I should also point out that this is not my first year at a university. I was a full time college student in High School, but I brought ENIGMA to where it was back in 2010 (when I graduated) anyway. I am now a senior in college, even though it's just the start of my second year. Actually, I'm two credit hours shy of being a senior, but... I graduate in about a year.

Announcements / Re: Why does it look like nothing's happening?
« on: March 05, 2012, 02:37:34 PM »
And you expect me to allocate additional time to dealing with it because it's actually afflicting you? I'm in college. I only have so much time to myself, and even the time that is mine, I'm not allocating entirely to ENIGMA. Pissing and moaning about something that's broken on the IRC isn't going to aid in anything, it's just going to piss me off.

Announcements / Re: Why does it look like nothing's happening?
« on: March 05, 2012, 12:12:42 PM »
Yes, yes, cheeseboy. I'm still not putting whatever trivial problem you have before the new parser.

Anyway, I like git better than SVN mostly because of github. The local versioning's just a bonus, which sometimes bites you in the ass.

Announcements / Re: Why does it look like nothing's happening?
« on: March 04, 2012, 01:17:35 PM »

Announcements / Re: Why does it look like nothing's happening?
« on: March 03, 2012, 09:29:55 PM »
> It's not that git can't store binaries so much as rusky didn't want us storing binaries because it makes the repository huge and slow.
Same difference; one way or another, it is not to our advantage to keep binaries in the repo. That's a problem based on our current scheme.

And they do have their own parsers, but they are sloppy and inaccurate. In a sense, that's a good thing; it means that the whole operation doesn't go crashing down when a definition is invalid. I am trying to make sure this new parser can recover from similar errors without much issue. I had Code::Blocks in mind most of all, because it has the most to gain. My parser can/will be able to do two things that Code::Blocks' current parser cannot. First and foremost, coerce expressions. When you have map<string,myclass*> mymap, and you type mymap["something"]->, Code::Blocks *attempts* to display members of the previous class. However, instead of showing members of myclass (the mapped type), it shows members of std::map. My parser would be able to correct that problem provided only that it was capable of reading a basic definition of string, a basic definition of map, and a basic definition of map::operator[], all of which the old parser could do (if poorly since the break). My parser is also quite fast, not to brag. At least the old one was. If there were already a parser that could do this shit, I'd have found it. I'll be advertising fervently that my parser is capable of "all this shit."

Also, yeah, I read Ideka's comment too hastily. Point is, we have a grip on git, just not workarounds for the (well understood) problems it has introduced (however indirectly).

Announcements / Why does it look like nothing's happening?
« on: March 03, 2012, 07:46:33 PM »
Yes, we're having some "Git problems." Ideka just suggested we switch to Mercurial, in fact, but it'd be pretty pathetic if some trouble with our choice of version control software was causing us all this hassle. In reality, there are a number of nasty things afoot.

Our only issue with git's capabilities is its inability to store binary files, something SVN never showed its issues with. The rest of the issues all had to happen eventually, it's just that by switching to git now, we've busted the grand problem piƱata.

The other issues are all related to deployment. What's worse is that a new STDC just hit the mainstream repositories on Linux, and ENIGMA's current parser doesn't get along with it. That timing is in itself bad, because I am just now recoding that parser anyway to be able to share code with ENIGMA.

Now, the rotten, dried up cherry on top of this shit sundae is that the forum's having email trouble, so new registrants can't get their confirmation email. I can't say whether this is related to the influx of new users whom we are only managing to confuse to tears with the endless--to borrow HaRRi's word--maze that is the installation process on ANY platform now. But there's that, too.

So, everything is tangled, and along with general bugfixes, IsmAvatar and I are working hard to untangle it. In addition to that, you probably can't see the progress from the forum because the project has been split into separate pieces now. The part of the parser I am working on is a separate project in itself now. I hope that this will improve its chances of being adopted by, for example, IDEs that need definitions for code completion. This is a large-ish aspiration due to the diversity of code with which the parser needs to be able to interface, but never say never.

Proceed with Comments/Concerns/Complaints/General Hatemail.  Except cheeseboy.