ENIGMA Forums
General fluff => Announcements => Topic started by: Josh @ Dreamland on December 25, 2009, 03:01:18 am
-
I wanted to have a community-size test out today to begin the debug process, but STL provided me with more debugging goodness than I could ever have wanted.
For example, as it happens, they have created a set of templates (templates can be defined as 'crude, bitter replacements for a system that has worked for years without triangular-bracket goodness') which compare if two types are equal. It looks like this:
template<typename, typename>
struct __are_same
{
enum { __value = 0 };
typedef __false_type __type;
};
template<typename _Tp>
struct __are_same<_Tp, _Tp>
{
enum { __value = 1 };
typedef __true_type __type;
};
ENIGMA produces a loud wail if the first template above has anything in it. Yes, that's my fault entirely, but this shouldn't be a concern; these templates effectively accomplish nothing but are included by things anyway. Honestly, it's like saying string("string") just to be sure you're dealing with a string. And that's the closest I can compare it to in GML. I remeber when Dylan implemented is_real.
double is_real(double) { return true; }
double is_real(int) { return true; }
double is_real(bool) { return true; }
Anyone who understands a little about operator overloading is laughing right now, but only the truly brave are laughing at the templates above.
But anyway, it's Christmas. A time to forget how angry you are at every code input box in your vicinity, as well as the developers who made said box possible. A time to pretend that the godawful wail is actually a none-to-well-executed rendition of Jingle Bells. Best wishes to everyone; I'll probably be a few 60 miles north of here tomorrow with my lap top. Maybe sleeping, considering it's three in the morning and all I wanted was to have something to pass out today. <____<"
Instead, I'll just be passing out in general, and I welcome you all to do the same.
Merry Christmas guys, and thanks for your support.
(Maybe I can squeeze out a release by New Year's if I keep sleeping like this... [Actually, I'm better off taking the sleep])
-
Merry Christmas.
BTW How bad is this?
-
It's manageable. Will probably cost me more code, in addition to some more thought, but it'll be fine.
-
Merry Christmas Josh and everyone else :D
-
Just a quick thought, would you add some way to declare the size of GML arrays and lists to save up memory?
Or there is already one?
-
Plague:
var a;
a[xsize,ysize]; will work just fine. Or in R3, I believe you may need to add an =0; to that.
Also, you can declare int a[xsize][ysize]; but then the array bounds are non-negotiable and unforgiving.