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

946
DFortun81 did it. He was writing an encryption program that operated recursively. Without knowing it, he ran it on "", which of course was the working directory. All his files became encrypted; problem was, there was no cipher because the encryption algorithm was wrong. Lost everything in that directory that didn't have an EXE to decompile.

LGM shouldn't be keeping a file open for the source until it is ready to write.

947
Yeah, and so does everyone else until they toast every file in their directory.

948
What I am suggesting is that you talk to Ism about adding a "workbench" setting to LGM. So your folder will be in ~/Games, and your DLLs will be in ~/ENIGMA/Workbench, or just ~/Workbench, or whatever.

949
ENIGMA launches the game. You can change the working directory from which the game is launched by editing the environment ENIGMA creates for it in better_system. You should probably be able to do this without editing better_system.cpp.

I do not recommend defaulting the working directory to the GM6 folder due to the number of novices (and even overconfident experienced users) who end up accidentally scrubbing the contents of the game's working directory while using the file manipulation functions.

950
What is it you believe this accomplishes on Windows?


Oh, I see. You people take turns destroying ENIGMA.

The correct implementation of get_working_directory is NOT { return working_directory; }.
The correct implementation of working_directory is #define working_directory get_working_directory() (actually, the correct implementation would move the macro EDL-side, but I digress).
The correct implementation of get_working_directory, on Windows, is as follows:

Code: (C++) [Select]
string get_working_directory() {
  char wd[MAX_PATH];
  size_t len = GetCurrentDirectory(MAX_PATH, wd);
  return string(wd, len);
}

So, with the proper implementation of that function, and not DatZach's ass-backwards hard-coded path value for the working directory, your code is useless.

In other words, while your code presently holds a function, it is wrong that it should do so.

And now I'm twice as pissed off by this whole scenario.

951
You've missed the point.

Your.
Solution.
Does.
Nothing.
Useful.

952
If the implementation of get_working_directory is correct, the only thing you are doing is risking formatting problems with the underlying operating system.

So, technically, your solution does nothing. Especially on Linux, where \ is a valid character in filenames. The only thing your "fix" does is waste time. First, time to call the function. Then, time to poll the operating system for the path. Then, time to concatenate strings. Then, time to parse the path that it already had parsed as the working directory.

Your solution also confuses HaRRi, who now apparently misunderstands the concept of a working directory.

953
Hi,
  • The working directory is handled by the operating system. It is the exe directory by default. It should not be prepended to filenames under any circumstance, as it is not a variable owned by ENIGMA.
  • "The fucking compile button" works fine, last I checked; you just need to add .exe to the end of the name on Windows. If this has changed, talk to Ism so she can dismiss you formally.
  • Let me once again emphasize that the working directory belongs to the operating system. You should not be storing it or manipulating it in any way.


What I'm going to do is close my eyes and pretend no one prefixed `get_working_directory()` to the given filename. When I open them, sometime after I graduate, I'm hoping it will be gone.

954
Announcements / Re: Commit Privileges
« on: October 25, 2012, 07:15:40 PM »
Meh. I know exactly what I would do to the project if I had any time to work on it (and do a good job of it, I mean). :P

955
Announcements / Re: Commit Privileges
« on: October 24, 2012, 08:29:19 PM »
I knew that'd be a good idea. ^_^
Which is good, because we're kind of overdue for a good idea.

My schedule:

Thursday: Prepare elaborate cheat sheet for statistics midterm. Do some math homework.
Friday: Quiz over some math stuff. Statistics midterm. Continue math homework. Continue stats homework. Finish starting computer architecture homework.
Saturday: Finish math homework. Finish statistics homework. Continue computer architecture homework.
Sunday: Continue computer architecture homework. You really don't understand how long this assignment is.
Sunday: Continue computer architecture homework. You really don't understand how long this assignment is.
Monday: Business as usual. Submit math homework. Continue computer architecture homework. It's a long assignment.
Tuesday: Spend all morning finishing computer architecture homework, arrive late to class and submit it.
Wednesday: Business as usual. Submit statistics homework. Mourn the grade I'm going to get on architecture homework.
Thursday: For the first time in eleven years, maybe find some time to work on ENIGMA.

956
Announcements / Commit Privileges
« on: October 22, 2012, 09:03:39 PM »
I'm swamped with college. TGMG's swamped with college, or "uni" (as in "university") as they call it in whatever ghetto he's from (And, well, everywhere else but America). Ism's swamped with "irl things," ie, her job. That's it for the "primary" developers. HaRRi and polygone have also not committed much recently.

In fact, you may have noticed that the lion's share of recent commits belong to forthevin. I haven't received any notices of him fucking anything up to date, and I've just merged another pull request of his which I haven't the time to test, so I decided that the best solution is just to instate him as a contributor with commit access.

So, everyone welcome forthevin to the development team.

Also, go ahead and direct all bitching at the missing primary developers here as well.

As for you, forthevin, don't worry; no additional responsibility seems to come with the title. Apparently. Except maybe fixing things if you fuck them up.

957
Issues Help Desk / Re: Josh is an idiot.
« on: October 22, 2012, 11:18:55 AM »
Then it is a system function but was never invoked by the system for some reason or another. Meaning, someone probably removed it from the loading process.

958
Issues Help Desk / Re: Josh is an idiot.
« on: October 22, 2012, 11:16:00 AM »
Cool. Now, try calling init_joysticks().

959
Issues Help Desk / Re: Josh is an idiot.
« on: October 22, 2012, 11:11:37 AM »
Try filing a report which contains more about how to reproduce your problem and less about the objects of your dissatisfaction.

960
Proposals / Re: Collision shape options
« on: October 20, 2012, 04:58:36 PM »
I'll happily pull the patch so long as it doesn't break any existing functions.