[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Re: TopPage info for Sheffield Linux User Group
On Sat, 20 May 2000, Al Hudson wrote:
> > What bugs me is that it IS possible to write portable, modular code that
> > requires only a minimal amount of porting.
>
> .. assuming all platforms give equivilent services, hence wxWindows, etc.
Roughly. You have to aim at a certain group of systems. No use trying to
port it to your TI85.
> > #ifdefs are not necessarily the
> > devil.
>
> I'm afraid I don't agree with that ;)))
Well written and properly commented #ifefs can be very useful.
Never underate having a macro system till you use Java.
Hmmm, an example. DLL loading. I forget the windows call, but you can
write code thus.
#ifdef WINDOWS
typedef HANDLE DLLHandle
#define DLLOpen(x) whateverthecallisiforget(x)
#elifdef LINUX
typedef void * DLLHandle
#define DLLOpen(x) dlopen(x)
#endif
..
The APIs are so similar it's not really worth writing two different dll
loading systems.
> > Wine just takes the cruft to a new level.
>
> I've still yet to hear an argument that Wine adds significatly more than,
> say, GTK, Mesa, etc...
Well if you compare GUI and graphics APIs to an OS API you won't.
> If it was that easy, people would do it. People don't. You can't just
Trust me. People do. As an example try things like Unreal Tournament.
I was impressed by the way Epic handled their ports and it's paid of for
them.
> of the reasons Wine is often slow: people run it in X, thinking that X's
> performance is on a par with Windows. It's isn't; X is hopelessly
> inefficient for local apps. Run Wine over X/DGA, and the speed *is*
> equivilent.
Also the fact that most XFree drivers are very poor compared to their
equivalent Windows drivers. This is one of the areas where Linux needs to
catch up fast.
Abstracting your GUI is usually just a case of making sure all your system
specific code is kept fenced off in it's own directory.
Look at the mnemonic project for an attempt at building a web browser with
very little system specific code. (They are working on GTK and ncurses
interfaces - and before criticising it for lack of progress, it is mainly
about 2 or 3 people working part time)
> Why should people bother re-writing old code when it functions as well
> when you port it using Winelib? And you get a native Linux binary at the
> end? If you're writing NEW programs, that's different, but people don't
> just rewrite the codebase just to have a clean port. It takes too long -
> ask the Mozilla people.
I'd rather not. They don't seem to get things right themselves.
Compare the man hours in Mozilla to the man hours in Opera and you'll see
why starting afresh is often a good idea.
Winelib is OK for porting legacy apps, but I worry that too many new apps
are using it as a crutch for writing crap code.
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.