pouët.net

delphi sceners...

category: general [glöplog]
jcl, yea, it has to do with audience. Mine is probably the last 5% as my software requires you to be a somewhat advanced user as to the point when it doesn't matter what OS you use.. or something like that..

well, as regards the linux on the desktop issue i still find that windows (xp in particular) is way way way beyond linux. I use linux only for production servers, web server etc. So for me, i wouldn't run linux on the desktop yet, and i wouldn't run win2k3 server as a server as it's easier to administer. But linux is improving all the time, in 2 years by the time longhorn comes out I think linux will be a just as good choice. I'll just wait to decide until then.. Also it depends wether or not MS choose to implement their xbox-style PC where you have to ask them for permission to do anything with your computer.. (Palladium when fully implemented)
added on the 2004-01-08 21:07:24 by j j
ok, i upped my own avatar.. HA!
added on the 2004-01-08 21:12:58 by j j
also why i'm interrested in supporting unix/IRIX is that sgi makes the only hardware architecture where they hide up to 32 ATI Radeons behind one single OpenGL coding interface <3 i'm working on some freeware visualization stuff that in extreme cases should be able to run on such hardware just because it's cool..
added on the 2004-01-08 21:27:38 by j j
Windows or linux on the desktop? Why not use both? Simply install Cygwin/X on your Windows machine and put a linux box next to it and enjoy the best of both worlds. Alt-Tab is all you need.

(And sorry for being offtopic ;-)
added on the 2004-01-08 21:42:13 by sparcus sparcus
j: it's obvious everything has its pro's and con's... as an example... SGI hardware rocks, and so does programming OpenGL for them... but OTOH, Irix does suck, and it's probably (on pair with AIX) the worst SIV-based unix i've ever been able to use (yes, worse than SCO, even on its first versions).

One thing you mention, and I don't really happen to have understood ever: there's a point where the OS doesn't really matter (for expert users), you are right. But, specially for that... I just -can not- understand why Linux zealots exist. I can understand it looks way more 'hax0r', I can understand you can 'personalize' it to limits (although, if you dare to hack a Windows, you can aswell, it's just not so obvious)... yet, compared to a system like Windows 2000 or XP and it's supporting Microsoft, third-party, or custom software (always taking into consideration, that warez exists, and we all [or, most of us], do it, to a greater or lesser extent)... I can't really see any feature that I couldn't get to do in Windows... and, for most of those tasks (except Linux distros come with tons of bundled software, and you have to download it separately for Windows), Windows is usually more comfortable, and faster. I could understand it with a system like Windows 9x/Me, which hanged all the time, was unstable as shit, and was worth nothing (that was the time where I did actually use Linux, or BeOS), but now? I can't see how so-called 'expert' users can choose Linux over Windows... they are maybe expert, but, in my oppinion, far from being wiser than the rest.

Let's not talk about Longhorn, or Palladium here... I'm talking at what is there as of today. When/If (and I have my great doubts it'll do it), Palladium gets implemented as planned, I'll probably change my mind, but today... there's nothing 'wrong' with Windows XP (there could be better things? yeah, but they are not available to other OS's anyway, as far as I know) for a desktop usage, comapred to what is there, on the same price tag, or lower (don't get hardware involved here).

This is of course, getting off-topic, but hey...
added on the 2004-01-08 23:26:39 by Jcl Jcl
Jcl: What version of Windows XP are you using? It doesn't seem the same as mine, which is slow, needs much ram, it needs 3 extra appliocations to be kept alive (firewall, antivirus, adware killer), is loaded with crap (imo) software you cannot remove (IE, MSN, OE, WMP), "phones home" rather frequently, it crashes occasionally (bad drivers), you have little control over it and you must pray not to lose that special unknown/hidden boot file that no recovery method can repair?

I mean... Isn't it so friggin' strange why there are all those linux zealots out there?
added on the 2004-01-09 00:16:59 by moT moT
moT: uhm... i don't know WHICH version you are running, but I am running Windows XP SP1, updated with all hotfixes... and I have damn great uptimes unless any hardware caused any error, and it's a lot of boxes I own (for home and for my company). I sincerely don't consider IE or WMP as 'shit', but that's a personal matter. It doesn't come with MSN, it comes with Windows Messenger... which will bug you exactly 10 times asking you to register a passport account, and, after those 10 times, it'll never bug you off again... OE, you don't really have to install it (there's an option in Add/Remove windows components).

Also, since SP1, there's a program that lets you define all your defaults, so IE doesn't need to be your default browser at all, OE doesn't have to b your default mail client, and so on... You don't even need to use explorer.exe as your default shell if you don't want to, there are alternatives, like Litestep, DesktopX, and some others... some of them free also. If it's about hacking an OS to work like you want it to work, then Windows XP allows you to do it... if it's about software that comes with it and you don't like, well, talk about -any- linux distro and all the shit it comes with.

Memory requirements? blah, buying 512Mb of RAM is worth not smoking a few days, or not having a few drinks on a saturday night, and they last way longer. Processor requirements? not that many either for the OS, -yes- for it's applications, but, it is a -desktop- OS, you can't expect to have a P133 as a desktop OS, and still want it to be fast like shit... Linux is -far- from being as fast as you want it, running the same software... more often than not, programs take much longer to start in Linux under XWindows, usually are not that much better (if any), and most of them crash like crazy weasels.

Yeah, you got Linux to be used as a command-line shell... but man, it's 2004, I wouldn't want to be using DOS to browse my directories for a desktop usage (again, we're not talking about servers here)

MacOS X comes with uninstallable Safari, Finder, and tons of other software, which, for the most part, suck, yet you hear anyone crying about that, or anti-trust sueing Apple? no way. So do many window managers for XWindows (KDE, Gnome, Enlightenment, and whatnot)

And last, but not least... the whole offer of third-party software for windows is -vastly- superior, in both quality and quantity than the same for Linux. OpenOffice is free, but it is -definitely- not better than Microsoft Office (if you argue about this, then you are one of those zealots noone can argue with)... Photoshop is better than Gimp, to all extents (but also, you can have Gimp, or OpenOffice running in Windows), we could argue Mozilla vs IE, but Mozilla runs in Windows aswell

I'm not saying Linux is bad, not at all... contrary to what linux-zealtos say (that Windows is a bad OS), i'm just saying that I find Windows better than Linux and Unix, for desktop usage. MacOS X would be on par when ran in appropiate hardware (which is much more expensive than the equivalent, performance-wise PC).

... and I haven't had any unknown/hidden boot file damaged ever (also, if you are referring to NTLDR, recovering from that [done it to customers] is as easy as inserting the CD, boot the computer, and pressing 'R' for automatic repairing).
added on the 2004-01-09 05:03:42 by Jcl Jcl
sparcus: why not get vmware?
Install linux, install vmware and install as many windows versions you like.. I mean this proggie is pretty cool...

I was pro-windows for many years but now as I work on linux I think this thing has future.
I don't give microsoft too much future. They are too proud, they think they can do everything just because they have a monopol. I think in about 10 to 15 years, windows is dead..

JCL: Sorry to fall into the discussion.. I agree: Microsoft Office is better than Open Office and Photoshop probably too (but I never understood that program.. I run better with gimp).
Mozilla is definitively better than IE.. I mean I'm working as web developer and.. for me that's pretty clear.

I think the whole thing is not about Windows agains Linux but more about Microsoft vs. Open Source..
added on the 2004-01-09 12:32:40 by phred phred
and for me it's a shame that the demo scene is on windows and not linux..
I mean, I still think demoscene is having the direction of open source and give everything for free and help eachother and so on.. and it is underground which I like.. that would all speak for linux.
I still remember the time when the "demoscene" wasn't sure where to go, to windows or to linux because DOS was dying..

I mean when develpoing on linux and you don't a kernel or whatever routine (sorry.. I'm not coding on that level) you can bring in yourself instead of being damned to use the routines microsoft wrote..
added on the 2004-01-09 12:43:33 by phred phred
jcl: what are your experiences with linux? I mean do you work on linux or do you have a webserver installed on linux or have you linux installed on your client.. I think it pretty depends on what you are doing..
added on the 2004-01-09 12:47:00 by phred phred
phred: main reason, I think, is that linux is (or was, historically, I haven't seen the latest distro versions) way harder to use than windows... the demoscene's goal is to reach a large audience... coders are usually (althought not quite always) advanced-expert users which might adapt to linux kind of easily... however, most graphicians and musicians are not (there are exceptions, of course). Also, to get other people involved in the demoscene (new people), you'd rather want your demos to be easily viewable for a large public, and, like it or not guys, that's Windows as of today.

Also, I don't see there's anything in the demoscene going on about open-source... in fact, most demos don't have the source code public... yeah, most of us wouldn't really care to show the code to others, but most demoscene-related code is horrible and the coder is usually just ashamed to show it.

And finally... yeah, well, you can mess up a linux kernel, but, realistically, which home user (desktop user) ever cares to do it? and also, if you wanted to, you could make a hack for windows kernel (just hijacking the function calls and calling the original ones). I've seen that done before in Windows, and, even for some internal DLL's, Microsoft has on-line documentation about how to do it, and encourages you to do it for some cases (talk about MSGina.dll, or something). Yes, it won't give their source code away to public, but there's not a real need for that... or that's how I see it. I've used Linux for a long time, and although, out of curiosity, I did have a look at the kernel's source code, I never dared to touch a line of it... it's pretty scary if you ask me :-)
added on the 2004-01-09 12:51:02 by Jcl Jcl
Was writing my post while your last one appeared. I was a linux/dos desktop user for a long time, till Windows 2000 (I also had Windows 98, but I used it exclusively for tracking and MS Office work). I've developed linux/unix server applications in the past, and have installed a few servers (web servers, ftp, etc.).

I was also (although that's Unix) a systems admin at an ISP for 1.5 years (the ISP got sold to a larger company I didn't want to work at), we used SunOS (running on UltraSparcs) as proxy/cache and firewall (using commercial software for all of those), also used SGI for some graphic design and video editing stuff (although it was not my main task, I got to learn how to use it). I also was ordered to make a 9-month course on Unix administration, which included AIX, HP-UX, SCO (well, and some other subjects, including Informix [under SCO] and Oracle programming, Network administration, and IBM AS/400 programming (RPG2 and RPG4/ILE) and administration, that has nothing to do with Unix though).

I've also had little experience with BSD out of curiosity (with OpenBSD/FreeBSD), but just couldn't get to like it at all for desktop usage (it's probably cool for servers).
added on the 2004-01-09 12:58:21 by Jcl Jcl
Jcl: I have to thank you for the time and effort you put into answering me, however I think I failed to mention a very important thing: I was _not_ born in Linuxland, I merely imigrated there after getting fed up with Windows (after using them since forever btw). Do you understand? FED UP. Therefore, I am aware of most of the things you mention in your answer. In fact, most people I know consider me something of a 'Windows expert'.

Anyway. There is no point in arguing about this. It is quite obvious that what you run is a matter of preference. I just want to tell you that I still have small Windows installations to watch demos and occasionaly play games. Otherwise, I am perfectly happy with my Linux desktop installations.

Oh, and about the boot failure thing, of course I didn't mean NTLDR, that is easily fixed. I meant some strange data file deep within the \Windows\System32 directory (the registry file?) without which no recovery method offered by Windows or its installation disks can recover. It has hapened to me twice already and some more couple of times to people I know (I was the one to try to fix it for them). Who knows... Maybe they don't like me or something. So I guess the feeling is mutual.
added on the 2004-01-09 17:43:48 by moT moT
moT: of course, your choice is taken, and I deeply respect it... but that's like everything... you might buy the most expensive Porsche car, and have problems with it since the very first day... that doesn't make Porsche worse, but I'm sure you'll go with Ferrari, or Lamborghini next time :-)
(nope, I'm not comparing Windows to a Porsche... maybe to a Renault or something ;D)

Trust me, I know how you feel, coz I felt the same with Windows 95/98... I actually had that feeling since Windows 1.01 (I used Digital's GEM instead, on my XT)... but, on my experience (and that's a lot of boxes), Windows 2000, XP and 2003 have solved most of the problems the OS had (the OS, not third-party software), and keeping it up-to-date (which might be hard for dial-up users, I reckon), makes it work flawlessly and without any major problems on my end.

Yeah, it all comes down to personal taste... but I just hate people (not you, in general) bashing Windows without giving 'real' reasons other than bad experiences... as I said above, Porsches are not bad cars, even if some people had bad experiences with them :)
added on the 2004-01-09 18:44:30 by Jcl Jcl
oh, before anyone mentions it... i am not a Windows-zealot or pro-M$... not at all... I see the lacks in Windows, and things I would address differently than how it does them... but I can say the same for every other OS, so that doesn't make it 'worse' than others, for me... but on this discussion, I'm on the windows-side, so i'm not gonna throw stones at my own roof =)
added on the 2004-01-09 20:31:00 by Jcl Jcl
jcl: already too late. You are the devil's advocate from now on. Windows-zealot, pro-M$ (M$bribed) are your synonyms. Thank you for your cooperation. :)
added on the 2004-01-09 22:00:14 by FooLman FooLman
phred: you're right, vmware is a good solution as well. At work, we do all our development on linux, but we use vmware to run the msvc compiler and to do initial (mostly automated) testing (in the end we still need to test our windows software on the real thing ofcourse).
added on the 2004-01-09 22:08:38 by sparcus sparcus
I had seen some benchmarks that Delphi optimises significantly better than Borland C++ Builder. Possibly the language samantics is less lax and allows for better optimisation? One fairly weak point is floating point though. Anyway, i like the language, but i am more satisfied with C++ today - i hate the Cish syntax - but there are so many libraries and perfect platform support, and so on... Besides, templates hypnotize me!

Overall, if someone knows Delphi, i would recommend him to code a demo using GNU Pascal / Freepascal, since they contain useful extensions. Beware different preinit semantics! And beware of the lack of memory management on operator overloads and intermediates!

If someone doesn't know a single language, Delphi is probably the best start.

If someone thinks he wants to code a demo in C, i'd tell him to learn C++ first. I even think C++ is the better language to start with than C - grab the book at mindview.net - it is so much more flexible and lets you automate tons of stuff. Not necessarily bloating or slowing down. It's like you can create a good language of your own on top of unwieldy C!

So, happy coding!
added on the 2004-01-10 00:00:55 by eye eye
well, i know delphi, but if i use freepascal, is the compiler as good as the commercial borland delphi compiler ? is the benchmark you spoke about done with the commercial compiler? if this is so, are there benchmarks telling something about freepascal?

and at last : what are intermediates ?

thx =)
added on the 2004-01-10 17:47:31 by aser aser
The benchmark was with Delphi. Freepascal's code generator has its roots in GCC, but has been split away a while ago, and hacked on a bit, so it's not compatible with GCC back-end any longer. It generally generates fairly bloated code, which runs surprisingly fast - those few % difference to better compilers like Delphi shouldn't really be noticable.

Since the split, GCC code generator has been improved a lot. The GNU Pascal is extremely similar to Freepascal. In fact it looks like a backport of Freepascal's code to GCC. But so uses GNU backend directly, and can thus take advantage of better code generator. Unfortunately, the compiler itself is very memory-hungry, and may take a somewhat longer time to compile. Even Freepascal is a slow bitch when it compiles, but this one slaps on even more! However, generated code quality is very good, if you enable O2 optimisations. Enable -ffast-math (UNSAFE!), and Delphi will never catch up. ;)

By intermediates i meant, when you write a long expression, it may become fairly easy to forget that you allocate some memory within it, then use this memory further within expression, but it is not assigned anywhere. So you cannot free it. This is especially evil in the case, in which you overload operators on new-style objects (which are declred with the class keyword), and these operators may create new objects. Further on, they are not assigned to any object variable, since they are only used within this expression. The memory taken by objects is leaked.

The solution would be to use structures or old-style objects (keyword object) in stack mode (ie not through pointers), since they don't requiere to be freed. However, if those need to allocate unknown amounts of memory, you're back at the same problem. The only solution then is to bolt on the Boehm GC so that it can clean up.

Generally, i must say memory management in contemporary Pascal is somewhat not ready for such demanding use. We had talked this problem to death on a Pascal newsgroup... All solutions in operator implementation code are bound to fail at some point. There are 2 "real" solutions. First and the easiest, is to bolt on the Boehm Garbage Collector, actually fully changing the memory management semantics - turning the language into something like Java. Or change the compiler to enable stack-based object tracking and destruction - turning the language in fact in C++.

I would say that it may make sense to try some C - it will give you the feeling for performance-critical things, since C is very hardware near. But don't code larger things in C, since the language lacks of good means to organize the code.

If you are not opposed to the C-like syntax, you may want to look at the D programming language at www.digitalmars.com - it has a lot of sweet features, is easy to learn, and without memory management flaws. That is, we have both the Java-like and the C++-like solution, so that daily coding is easy and high performance applications are possible. Don't forget to check out the newsgroups - someone just partially ported GL Excess to D.

Keep on asking questions.
added on the 2004-01-11 00:16:24 by eye eye
I wrote a quite long post which was lost then somehow :(
I try it again, this time into a textfile...

First, I agree completely with Jcl on the windows/linux subject. I was one of the last holdouts of DOS, against windows, so you can't say I'm a windows-zealot or something like that :) In fact, I still dislike the idea that I have a windows system connected to the net, but there are simply no options... (on PC. I never tried Mac or Amiga :)

Linux is a crap, especially the softwares that comes with it. A usual Linux distro contains 10000 (literally!!) pieces of different junk software tools, about 15 of them which is usable. I also dislike linux people [if I ask something from a linux guru, there are two possible answers: 1) recompile your kernel; 2) RTFM].
In fact, I hate the whole Unix philosophy: that you have a bunch of little software tools that can do everything for you (I mean the std /usr/bin stuff: grep, awk, etc, etc) - but for the name of the god, there are no two of them with compatible user interfaces!!! Maybe this philosophy was OK back in 1970, but it was already outdated when I was born :)

(Maintaining compatibility is the biggest curse of the whole computer industry. See also the story of the Intel processors - I like Intel anyway, because I was grown up on them, and this compatibility feature, while poisoning performance, allows serious hacking for coders :)

So, meanwhile now I use XP, and it is stable, and pretty fast (ok that has something to do with machine too - having 768megz'o'ram, I simply turned virtual memory off, and had no problems at all :) and it is much more convenient to use than anything I ever used...

Second, to be a little bit ontopic, on the Delphi thingy. Well I think if you want to make a program like those currently called "demos", than delphi will be perfectly ok.
BUT, if you want to make a _real_ demo, or even better, an intro, then assembly is the key! and yes, I know, we are all lazy, and don't want to do everything in pure asm as in the good old times (at least when the target is >= 64k); and it is probably easier to interface asm with C than with Delphi (although I never tried the latter :) simply because C is not high-level enough. And C(++) is the most std programming language today, so it is probably a good idea to learn it :)

Assembly rulz anyway :) Till there will be Intel processors, there will be assembly programmers too; after all, someone has to write the optimizing compilers for you all :)
added on the 2004-01-11 13:29:20 by blala blala
blala: i have to agree with you completely about Unixen. Nontheless i'm going to take time to learn Linux soon. Nowadays you can't make a step without Windows or Unix, and there are many cases in which i would prefer FreeBSD or Linux for licensing and performance issues. ;) Nontheless, Unix is and stays a mess. Maybe we should support Zeta or something alike! Or see ReactOS evolve - it even is able to run windows 2000 calc today!

As to Delphi, in the basis of the language are constructs equivalent to C. Delphi has a convenient inline assembler - and has had it since day 1 in Turbo Pascal - which was a great lifesaver that days. You cas access local variables very easily within inline assembler. So, back in the DOS days, many hardcore ASM coders chose Turbo Pascal instead of C because it was cheap and enabled better integration of assembler. Nontheless, i would recommend any young coder a short dip into C - it would help understand pointer semantics better. BTW, i'm not sure whether free Pascal compilers have the same inline assembler as Delphi, or that CRAP like GCC.

As to 64k intros, they are not written in assembly these days. Only for 4k demos it would make sense. Compiler-generated code is usually no more than 1/4 longer than the best possible, and the difference is eaten up by UPX anyway. Besides, there's that one thing at which the long forgotten now resurrected Watcom is particularly good at. Like, you won't use STL in a 64k anyway. ;) Conceptual optimisation appears to be most important, so that texture, script, and so on are as tiny as they would get.

There is also one research compiler which diserves to be mentioned: Vector Pascal. It generates tight NASM assembly and is a very good vectorizing compiler to make use of MMX, SSE, 3DNOW and SSE2 without too much effort - or as a base for further optimisations. However, it's for snippets only, it's really not advisable to write whole software with it.
added on the 2004-01-11 16:16:02 by eye eye
eye: I used FreeBSD; at first I loved it, but then soon realised that for a desktop, it is even worse than Linux (as Jcl already said that). For example sometimes the sound driver messed up, and you had to restart the whole system for getting sound instead of noise again... And that was not the only problem... Nevertheless, it is probably quite good for servers (again, as Jcl already said that :)

on Pascal/Delphi: I was a pascal guy at the age of 13, I hated C, so I can understand that side too; but hey, people have to grown up once... :)

Inline assembly will never have the feeling that a pure .asm file always had :)
Of course I'm aware tha intros are no more coded in pure asm (although all demoscene stuff I ever coded was in pure asm, I don't think this will be the situation in the future :) In fact, as far as I remember, some (quite decent) sceners was very surprised at Asm'95 [it's quite funny that it happened at that party :)] when they heard that we code in pure asm, and that was more than 8 years ago...

Well, a vector optimizing compiler probably makes good general code, but in my opinion, when there is a specific task running in a large loop - very typical in computer gfx - compilers will never beat humans in optimizing (on Intel-type processors; on RISC they probably do). I guess I could write for example blobs 2x-3x faster in asm using SSE/SSE2 than in C using the best optimizing compiler today (I will try it if I have some time :)
added on the 2004-01-11 17:46:23 by blala blala
many hardcore ASM coders chose Turbo Pascal instead of C because it was cheap and enabled better integration of assembler.

any _hardcore_ asm coder use pure asm.
uff, i spoke.
:)
added on the 2004-01-11 17:54:30 by blala blala
blala: There were quite some demos which were *almost* pure ASM, compiled with Turbo Pascal using it like glue. Can't remember exacly which though. Well, not exactly what you call hardcore hardcore, but more or less reasonable assembly addicts.

I trust that you will optimise better than the compiler, but i had just seen Optimus show me his code on the tUM (BTW i think he infected my notebook with some typical Win98 worms like Opasoft from his memory stick. Optimus, if you read it, scan your stuff. www.free-av.de) and... It was not exactly fast, and then it didn't even work correctly. Program logic is quite hard to get in assembly... So i tried basic things, but never did anything serious with it. As you would usually want your software be first correct, and then fast, it might even make sense to prototype in a higher-level language, and as soon as it works, translate it into a lower-level one. And given optimal algorithms can affect a lot and can be quite complex, this makes double sense.

You know Walter Bright, the author of Digital Mars / Symantec / Zortech C++ compilers - his linker optlink is written in pure assembly, 400k of it, and is the fastest linker in existence (takes a fraction of a second to complete even on largest exes), and uses special linking techniques (roping) to generate executables which load faster and work faster than usual, by analyzing callgraphs. Unfortunately, the linker is buggy, it breaks with some object files with no known reason, as well as for a number of known reasons, generated files make UPX dizzy, and so on... And he is not able to fix it any longer.

BTW, he said once "I generate all my 'handwritten' assembly by prototyping in C, then running the compiler, and editing the result unti it doesn't get faster". Obviously, where he edited his results more than once he would include optimisation patterns into his back-end. ;) It is very similar to how many other compiler writers work.

Likewise, i would see what the the best compiler gives me, and let that be a starting point.

BTW, the assembly coder uses experience + genetic mutation + profiler to optimise code. Could a tool possibly be written to perfectly optimise small pieces of code, by using mutation (equivalent and slihtly non-equivalent), profiling, and testing for equivalence by running many times with different input and comparing results with a reference implementation? Mega-peephole-optimiser? Not that i would like to make you and Optimus obsolete...

Aser: replace struct by record in my earlier post.
added on the 2004-01-12 20:50:46 by eye eye

login