lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Duck <duck@roaming.ath.cx> writes:

>>Hi Duck, hope the antipodes are treating you well
>
> Christmas and New Year are back in summer where they belong.
>
>>As for the builtin io.popen. It works fine in console programs,
>>Unix/Windows. But it doesn't work _at all_ under Windows
>>non-console
>
> Yes, MSDN itself shamelessly admits that:
>
> /If used in a Windows program, the _popen function returns an
> invalid file /pointer that will cause the program to hang
> indefinitely. _popen works /properly in a Console application.

Being developer with a scripting background and recently delivering
products for Windows as well, I am constantly amazed at the incredibly
shoddy quality of the basic Windows utilities.

For example, try the following stuff in a batch file (without using
"echo off") and place a directory "something" in one of the places
where this script will look for it

if exist something\NUL goto havehome
for /D %%I in (.. c: d: c:\* d:\*) do (
  if exist %%I\something\NUL (
    %%~dI
    cd %%~pnI
    echo Picking the installation in %CD%
    pause
    goto havehome
  )
)
:havehome

Note that as opposed on the command line, one needs to double some
percent signs.  Note that %CD% echoes a wrong value, but one can't
write %%CD%% since that is echoed just verbatim.  Note that the
execution echo of the for loop command is _mangled_ at the front.

"Windows can't be too complicated to support" is a sentiment for those
who have never tried it.  For us, supporting Windows for what amounts
to be a _working_ console application, has proven to be a terrible
resource drain, tying developers into absolutely ridiculous fiddling
work.

In a similar vein, making AUCTeX support Windows installations has
been tying up a lot of resources (most problems stemming from path
name differences) that were not anticipated up front.

Currently I have the problem that Windows barfs at one of our
customers because of too many open files (512 or so).  There are no
documented limits for tuning I can find, and I don't even know where
to look.

How Microsoft managed to become a "platform of choice" is certainly a
marketing feat second to none.  The system as such can only be
described as mostly unusable, unmaintained and unmaintainable in its
most basic parts.

-- 
David Kastrup