Hi Andreas, Matthew, John, (Hi All),
I'm getting my house in order, merging the Newspeak VM into the OSCog platforms hierarchy. One big difference between trunk vms (and Newspeak) and Qwaq VMs on Mac OS X is that in the Qwaq VM there is an early chdir to the directory containing the .app, whereas in the non-Qwaq VMs the directory is left as is. If you look at http://squeakvm.org/svn/squeak/trunk/platforms/Mac OS/vm/sqMacMain.c you'll see that this chdir has been commented-out, so there was a point when it was in standard VMs. Andreas, Matthew, do you think the Qwaq behavour is important to preserve? John, what's the history of this? Should I even bother trying to maintain the Qwaq behaviour and instead disable it in all builds (Qwaq, OSCog, Newspeak)?
best, Eliot
Well I think this is a discussion point for the squeak & pharo list. The comment is quite clear: "LETS NOT DO THIS, SEE what happens for people wanting to do ./Squeak.app foobar.image zingger.st"
At 3.8.19b1 I did sqMacMain.c drop cwd to VM directory at startup time to help script writers use ../ or ./ Mmm spring 2008
Historically, John Maloney's original code did the chdir in o-s 7.5.x that was ported forward into os-x when it ran as pre-mach-o app and at the time there was some confusing signals from Apple about should apps change to the home directory etc... So it sat until I added in sufficent unix cmd options/parms awarness for people to complain about the behaviour.
On Wed, May 25, 2011 at 4:55 PM, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi Andreas, Matthew, John, (Hi All), I'm getting my house in order, merging the Newspeak VM into the OSCog platforms hierarchy. One big difference between trunk vms (and Newspeak) and Qwaq VMs on Mac OS X is that in the Qwaq VM there is an early chdir to the directory containing the .app, whereas in the non-Qwaq VMs the directory is left as is. If you look at http://squeakvm.org/svn/squeak/trunk/platforms/Mac OS/vm/sqMacMain.c you'll see that this chdir has been commented-out, so there was a point when it was in standard VMs. Andreas, Matthew, do you think the Qwaq behavour is important to preserve? John, what's the history of this? Should I even bother trying to maintain the Qwaq behaviour and instead disable it in all builds (Qwaq, OSCog, Newspeak)? best, Eliot
FWIW, I'm completely neutral on this just as long as we ensure that "FileDirectory default" points to the image directory. Whether the OS' cwd is the image, the vm, or some random directory is completely irrelevant from my POV.
Cheers, - Andreas
On 5/26/2011 1:10, John McIntosh wrote:
Well I think this is a discussion point for the squeak& pharo list. The comment is quite clear: "LETS NOT DO THIS, SEE what happens for people wanting to do ./Squeak.app foobar.image zingger.st"
At 3.8.19b1 I did sqMacMain.c drop cwd to VM directory at startup time to help script writers use ../ or ./ Mmm spring 2008
Historically, John Maloney's original code did the chdir in o-s 7.5.x that was ported forward into os-x when it ran as pre-mach-o app and at the time there was some confusing signals from Apple about should apps change to the home directory etc... So it sat until I added in sufficent unix cmd options/parms awarness for people to complain about the behaviour.
On Wed, May 25, 2011 at 4:55 PM, Eliot Mirandaeliot.miranda@gmail.com wrote:
Hi Andreas, Matthew, John, (Hi All), I'm getting my house in order, merging the Newspeak VM into the OSCog platforms hierarchy. One big difference between trunk vms (and Newspeak) and Qwaq VMs on Mac OS X is that in the Qwaq VM there is an early chdir to the directory containing the .app, whereas in the non-Qwaq VMs the directory is left as is. If you look at http://squeakvm.org/svn/squeak/trunk/platforms/Mac OS/vm/sqMacMain.c you'll see that this chdir has been commented-out, so there was a point when it was in standard VMs. Andreas, Matthew, do you think the Qwaq behavour is important to preserve? John, what's the history of this? Should I even bother trying to maintain the Qwaq behaviour and instead disable it in all builds (Qwaq, OSCog, Newspeak)? best, Eliot
Hi Eliot, Hi Esteban:
On 26 May 2011, at 09:02, Andreas Raab wrote:
FWIW, I'm completely neutral on this just as long as we ensure that "FileDirectory default" points to the image directory. Whether the OS' cwd is the image, the vm, or some random directory is completely irrelevant from my POV.
I would be really happy if you could consistently remove the chdir.
From my point of view, it is very relevant.
However, "FileDirectory default" seems to be very underspecified. (The comment in the method does not tell me what it is supposed to mean.) A "FileDirectory current", that reflects the current working directory of the shell the VM was started in, would certainly help all the people who use Smalltalk for automation on the command-line.
Thanks Stefan
On 5/26/2011 9:16, Stefan Marr wrote:
Hi Eliot, Hi Esteban:
On 26 May 2011, at 09:02, Andreas Raab wrote:
FWIW, I'm completely neutral on this just as long as we ensure that "FileDirectory default" points to the image directory. Whether the OS' cwd is the image, the vm, or some random directory is completely irrelevant from my POV.
I would be really happy if you could consistently remove the chdir.
From my point of view, it is very relevant.
However, "FileDirectory default" seems to be very underspecified. (The comment in the method does not tell me what it is supposed to mean.)
Please let's not confuse matters here: What Eliot has been mentioning is a chdir() call in the VM which I have no opinion about. What I do have an opinion about is the notion of FileDirectory default which has always been set to the image directory (see FileDirectory class startUp). This should remain the same because there's lots of code which assumes precisely that and if changes in the VM would cause this to be a different directory, a lot of code would needlessly break. There could very well be some other way of querying the startup directory but that is not the question that was asked in this thread,
Cheers, - Andreas
Hi Andreas:
On 26 May 2011, at 09:30, Andreas Raab wrote:
On 5/26/2011 9:16, Stefan Marr wrote:
However, "FileDirectory default" seems to be very underspecified. (The comment in the method does not tell me what it is supposed to mean.)
Please let's not confuse matters here: What Eliot has been mentioning is a chdir() call in the VM which I have no opinion about.
Yes, that was clear for me, and that is would I like to see changed.
What I do have an opinion about is the notion of FileDirectory default which has always been set to the image directory (see FileDirectory class startUp).
The only thing I wanted to mention is, that it deserves to be included in the comment. At least from my perspective. That is what I meant by being underspecified, thus, perhaps under-commented ;)
Anyway, once the VMs consistently omit the chdir, then a `FileDirectory current` or some other standard way to obtain the current working directory would be helpful. (And a more verbose comment in FileDirectory default would help to distinguish the two). But perhaps something similar to `FileDirectory current` is already hidden somewhere in the image?
Thanks Stefan
On Thu, May 26, 2011 at 09:02:24AM +0200, Andreas Raab wrote:
FWIW, I'm completely neutral on this just as long as we ensure that "FileDirectory default" points to the image directory. Whether the OS' cwd is the image, the vm, or some random directory is completely irrelevant from my POV.
Cheers,
- Andreas
+1
Dave
On 5/26/2011 1:10, John McIntosh wrote:
Well I think this is a discussion point for the squeak& pharo list. The comment is quite clear: "LETS NOT DO THIS, SEE what happens for people wanting to do ./Squeak.app foobar.image zingger.st"
At 3.8.19b1 I did sqMacMain.c drop cwd to VM directory at startup time to help script writers use ../ or ./ Mmm spring 2008
Historically, John Maloney's original code did the chdir in o-s 7.5.x that was ported forward into os-x when it ran as pre-mach-o app and at the time there was some confusing signals from Apple about should apps change to the home directory etc... So it sat until I added in sufficent unix cmd options/parms awarness for people to complain about the behaviour.
On Wed, May 25, 2011 at 4:55 PM, Eliot Mirandaeliot.miranda@gmail.com wrote:
Hi Andreas, Matthew, John, (Hi All), I'm getting my house in order, merging the Newspeak VM into the OSCog platforms hierarchy. One big difference between trunk vms (and Newspeak) and Qwaq VMs on Mac OS X is that in the Qwaq VM there is an early chdir to the directory containing the .app, whereas in the non-Qwaq VMs the directory is left as is. If you look at http://squeakvm.org/svn/squeak/trunk/platforms/Mac OS/vm/sqMacMain.c you'll see that this chdir has been commented-out, so there was a point when it was in standard VMs. Andreas, Matthew, do you think the Qwaq behavour is important to preserve? John, what's the history of this? Should I even bother trying to maintain the Qwaq behaviour and instead disable it in all builds (Qwaq, OSCog, Newspeak)? best, Eliot
On 26 May 2011 01:10, John McIntosh johnmci@smalltalkconsulting.com wrote:
Well I think this is a discussion point for the squeak & pharo list. The comment is quite clear: "LETS NOT DO THIS, SEE what happens for people wanting to do ./Squeak.app foobar.image zingger.st"
+1. chdir is evil. I would understand if it would have some benefit.. but its not.. it is there only to make command-line harder.
At 3.8.19b1 I did sqMacMain.c drop cwd to VM directory at startup time to help script writers use ../ or ./ Mmm spring 2008
Historically, John Maloney's original code did the chdir in o-s 7.5.x that was ported forward into os-x when it ran as pre-mach-o app and at the time there was some confusing signals from Apple about should apps change to the home directory etc... So it sat until I added in sufficent unix cmd options/parms awarness for people to complain about the behaviour.
On Wed, May 25, 2011 at 4:55 PM, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi Andreas, Matthew, John, (Hi All), I'm getting my house in order, merging the Newspeak VM into the OSCog platforms hierarchy. One big difference between trunk vms (and Newspeak) and Qwaq VMs on Mac OS X is that in the Qwaq VM there is an early chdir to the directory containing the .app, whereas in the non-Qwaq VMs the directory is left as is. If you look at http://squeakvm.org/svn/squeak/trunk/platforms/Mac OS/vm/sqMacMain.c you'll see that this chdir has been commented-out, so there was a point when it was in standard VMs. Andreas, Matthew, do you think the Qwaq behavour is important to preserve? John, what's the history of this? Should I even bother trying to maintain the Qwaq behaviour and instead disable it in all builds (Qwaq, OSCog, Newspeak)? best, Eliot
--
John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
Thanks all. It's getting nuked :)
On Wed, May 25, 2011 at 1:55 PM, Eliot Miranda eliot.miranda@gmail.comwrote:
Hi Andreas, Matthew, John, (Hi All),
I'm getting my house in order, merging the Newspeak VM into the OSCog
platforms hierarchy. One big difference between trunk vms (and Newspeak) and Qwaq VMs on Mac OS X is that in the Qwaq VM there is an early chdir to the directory containing the .app, whereas in the non-Qwaq VMs the directory is left as is. If you look at http://squeakvm.org/svn/squeak/trunk/platforms/Mac OS/vm/sqMacMain.c you'll see that this chdir has been commented-out, so there was a point when it was in standard VMs. Andreas, Matthew, do you think the Qwaq behavour is important to preserve? John, what's the history of this? Should I even bother trying to maintain the Qwaq behaviour and instead disable it in all builds (Qwaq, OSCog, Newspeak)?
best, Eliot
vm-dev@lists.squeakfoundation.org