Questions about windows support

Nick Sabalausky a at a.a
Tue Feb 21 13:51:13 PST 2012


"H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message 
news:mailman.811.1329854653.20196.digitalmars-d at puremagic.com...
> On Tue, Feb 21, 2012 at 01:48:35PM -0500, Nick Sabalausky wrote:
> [...]
>> Another issue with it is that to make a binary work on both an older
>> and newer Linux, you have to actually compile it *on* an older Linux.
>> I've heard that, in theory, you can use a newer Linux to create
>> binaries that work on older systems, but in practice, nobody actually
>> knows how.
>
> Oh, there are ways to do that, sure.
> [...]
> This is arcane black
> magic that will explode in your face if you don't know what you're
> doing, unfortunately.
>

Exactly.

>
> [...]
>> Eeeww. I had no idea the shell did the expansion. That's just awful.
>
> Awful in some ways, powerful in others. Shell expansion allows you to do
> stuff like:
>

Actually, I specifically meant glob expansion.

I do think it's good that, for example, env var expansion occurs in the 
shell - I can't imagine that working well otherwise. Quoted args should also 
be handled by the shell:

$touch 'My Modern Filename.txt'

Speaking of cmdline args and argv, I've written this trivial 'showargs' 
utility which I find indispensable for examining/experimenting/debugging cmd 
line params:

----------------------------------------------
import std.stdio;
void main(string[] args)
{
        writefln("args.length: %s", args.length);
        foreach(i, arg; args)
                writefln("args[%s]: '%s'", i, arg);
}
----------------------------------------------
$ dmd showargs.d
$ ./showargs ' hi world ' hi world '' x ' '
args.length: 7
args[0]: './showargs'
args[1]: ' hi world '
args[2]: 'hi'
args[3]: 'world'
args[4]: ''
args[5]: 'x'
args[6]: ' '
----------------------------------------------

Does something like that already exist in Unix that I've overlooked?

> mv myfilena{e,}me.ext
>
> to correct a misspelt filename, for example.
>

That's not a bad trick, I'll have to remember it.

> Me, I personally wished that instead of shoving all that functionality
> into the shell, they would've just provided a library that did these
> standard things so that programs could use them as needed.
>

For globs, at the very least, I definitely agree.

> IIRC, glob() was originally only implemented in the shell; it was only
> later that it actually became a library usable by other programs.
>

I see, that would certainly explain it then.

>
> [...]
>> Maybe I don't understand the way the package/dep managers work well
>> enough, but it always seemed bad to me that you can't do:
>>
>> $sudo apt-get install [url to an apt-compatible package]
>
> If you filed a bug on bugs.debian.org and ask nicely, somebody may
> implement that for you.  :)
>

Yea, probably worth a shot... Actually, I wonder if aptitude might already 
do it? (Hmm, doesn't look like it. At least if it does, the man page doesn't 
seem to mention it.)

>> Linux is definitely groing on me more and more, but you're right, it
>> does have it's quirks.
> [...]
>
> The thing is, the *concepts* behind the OS are rock solid,

Oh yea, no arguments here.

> but the
> implementation suffers from decades of historical accidents that led to
> a working but sometimes quite counterintuitive system. For example, what
> on earth does "grep" mean anyway?! (Yes I know what it means. I'm just
> saying, it's a totally stupid name for that utility.) And "cat"? It that
> supposed to meow? And what on earth does "etc" stand for anyway, and
> what has it gotta do with configuration files?!
>

Agree again ;)

> Or my favorite syscall, creat(). Apparently in the old days there was
> only one E on the keyboard. Oh wait... :P
>
> There are also little flaws inherited from decades-old conventions that
> nobody dares break, lest existing code fail in new and mysterious ways.
> Or not-so-mysterious ways, like if you redesign the terminal protocol to
> be more in line with modern computing.
>

I think the way to do that would be to make it a completely alternative 
protocol that software has to specifically choose to support. Sure, it's be 
next-to-useless at first, but eventually support could build up to critical 
mass and finally tip the scale. Similar to the approach of Wayland. (On the 
other hand, IPv6 still isn't the de facto standard...)

> But whine as I may, I still love my Linux systems, both at home and at
> work. I know how to sing to their tune and make them dance. Whereas
> Windows just stares at me with a blue face.
>

For me, Windows is an old friend (or at least XP anyway) and I know how to 
deal with it. But over the last decade my respect for Linux has slowly grown 
and grown. I thought Linux was in a pretty bad state around 2001 and 
temporarily wrote it off. But at this point, I think that if Linux had these 
four things:

1. A nice GUI file manager I really liked (including TortoiseGit-style 
functionality and Windows's quick image viewer).

2. A port of Programmer's Notepad 2 (or if I found something very, very 
similar. I'm not an emacs, vi, or eclipse kinda guy. Normally I use kate or 
gedit on Linux, but they're both still painful compared to PN2).

3. A good GUI SMART monitor comparable to Hard Disk Sentinel (not just 
something with an utterly useless manually-polled interface).

4. A music library manager that worked like iTunes/WinAmp/Foobar2000 (but 
hopefully wasn't shitty like iTunes and WinAmp and didn't have Foobar's 
limitations).

There's a few other things that would be really, really nice to have too 
(like a video player up-to-par with Media Player Classic HC, and DVD 
Decryptor, DVD Shrink, and uTorrent...I *do* have totally legit uses for all 
those!).

But those four main things listed above: I think those would probably be 
enough for me to feel comfortable making Linux my primary OS and leave 
Windows as my secondary. In fact, I really am itching for that to happen. In 
the meantime, I've been considering giving MSYS/MinGW another chance. I've 
had bad experiences with it before, but I've seen hints that things may have 
improved since then.




More information about the Digitalmars-d mailing list