ENIGMA Forums

General fluff => Off-Topic => Topic started by: Goombert on April 23, 2014, 03:40:25 am

Title: Environment Variables are Windows Only
Post by: Goombert on April 23, 2014, 03:40:25 am
Well I was recently fixing the environment_get_variable function for SuperRiderTH the old version was really messed up. But anyway, I just wanted to check Studio's manual for lols, and well...

Quote from: YoYoGames
NOTE: This is a Windows only function.
http://docs.yoyogames.com/source/dadiospice/002_reference/miscellaneous/environment_get_variable.html

Apparently YYG doesn't know that Unix invented environment variables, and is pretty much one of the biggest reasons Windows has them.
https://en.wikipedia.org/wiki/Environment_variable

Quote from: Wikipedia
They were introduced in their modern form in 1979 with Version 7 Unix, so are included in all Unix operating system flavors and variants from that point onward including Linux and OS X. From PC DOS 2.0 in 1982, all succeeding Microsoft operating systems including Microsoft Windows, and OS/2 also have included them as a feature, although with somewhat different syntax, usage and standard variable names.

I think this is the epitome of why their logic is so flawed.
Title: Re: Environment Variables are Windows Only
Post by: Darkstar2 on April 23, 2014, 04:00:41 am
lmao!

Someone should post this on their forum

Title: Re: Environment Variables are Windows Only
Post by: Josh @ Dreamland on April 23, 2014, 07:35:31 am
I'm pretty sure that anyone who actually knows what Unix is, is aware of this.
Title: Re: Environment Variables are Windows Only
Post by: onpon on April 23, 2014, 08:17:44 am
Of course POSIX systems have environment variables, but it's obvious that what that documentation really means is that YoYo Games is too lazy to implement support for POSIX environment variables.
Title: Re: Environment Variables are Windows Only
Post by: Rusky on April 23, 2014, 09:45:38 am
ENIGMA: mocking their competition for lacking insignificant features since 2007
Title: Re: Environment Variables are Windows Only
Post by: daz on April 23, 2014, 10:11:19 am
Don't assume that they don't know other operating systems have environment variables. It's mostly likely just a matter of "we only got around to adding this function for Windows".
Title: Re: Environment Variables are Windows Only
Post by: Goombert on April 23, 2014, 02:50:24 pm
Do you know how easy it is for Linux daz? It's about 50% simpler than a chdir()
Title: Re: Environment Variables are Windows Only
Post by: Rusky on April 23, 2014, 03:53:16 pm
Do you know how many games even use environment variables? It's about 100% less than you think.
Title: Re: Environment Variables are Windows Only
Post by: Goombert on April 23, 2014, 03:57:54 pm
lel, you're, but still
Title: Re: Environment Variables are Windows Only
Post by: Darkstar2 on April 23, 2014, 04:57:34 pm
Do you know how many games even use environment variables? It's about 100% less than you think.

Good old DOS games lol !
Title: Re: Environment Variables are Windows Only
Post by: Josh @ Dreamland on April 25, 2014, 07:37:18 pm
When I was little, I used GM to make all sorts of things. Not just games. The ability to do things like edit the registry was crucial, and it taught me gobs about how my operating system worked. I wouldn't learn until later how flawed an approach this was, but hey, we all have to start somewhere.

The point is, yes, a typical game doesn't have any use for environment variables, and is typically concerned with its own directory only insofar as loading resources from a local folder is concerned. But I still value support for lower-level functionality.
Title: Re: Environment Variables are Windows Only
Post by: Rusky on April 26, 2014, 03:41:13 am
When you were little, you used Windows, which has the feature being complained about here.
Title: Re: Environment Variables are Windows Only
Post by: Josh @ Dreamland on April 26, 2014, 05:35:11 pm
I don't see a problem with using an otherwise cross-platform toolkit to do platform-dependent coding. With preprocessor expressions, equivalents or alternatives can be given on platforms which do not support that feature.

It's a little unfair that Linux users have to pick between dconf, gconf, xfconf, kconf, and just writing the keys to a file in ~. But that's the downside of customizability, something that Linux distributions have always had, and Windows has generally not. At this point, the obvious choice is dconf or just writing the file.