Domain: reptiles.org
Stories and comments across the archive that link to reptiles.org.
Comments · 17
-
Re:Brevity. Soul of wit.Write shorter methods. That is all. I don't know to what extent you were joking, but I agree with this. If your blocks are significantly more than 50 lines long, there's something wrong.
The Linux coding style guide contains wisdom on this: "Functions should be short and sweet, and do just one thing. They should fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, as we all know), and do one thing and do that well." And something similar goes for width: "Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program." I must admit to often failing to live up to those ideals, but that doesn't mean they're good aims to have in mind. -
Re:Not for Win32 compatibility
Dude, most X servers running on Linux, Solaris, *BSD and a host of other modern UNIX systems make liberal use of IPC, in the form of the MIT-SHM shared memory extension:
The basic capability provided is that of shared memory XImages. This is essentially a version of the ximage interface where the actual image data is stored in a shared memory segment, and thus need not be moved through the Xlib interprocess communication channel. For large images, use of this facility can result in some real performance increases.
Additionally, some implementations provide shared memory pixmaps. These are 2 dimensional arrays of pixels in a format specified by the X server, where the image data is stored in the shared memory segment. Through use of shared memory pixmaps, it is possible to change the contents of these pixmaps without using any Xlib routines at all.
This extension goes back nearly two decades. Yes, 20 years! Lower-end computers 20 years ago were able to use UNIX IPC, for high-performance graphics, in a very usable manner. There's no reason why a computer from today, especially a high-end Mac, couldn't effectively use shared memory in such a fashion. This is especially true on Mac OS X, which does offer the UNIX-like functionality that is required. Combined with the brilliant minds at Adobe (they hire a large number of the top Indian graduates each year), there's no reason why they couldn't get Photoshop working using such technology. -
Linus' Opinion
I can't believe noone has posted about this yet. Click here (or check
/usr/src/linux/Documentation/CodingStyle) for Linus' witty and insightful views on this topic. Chapter 5 in particular. -
Re:ps
Not everyone's favourite editor can be configured to treat tabs the right way.
Probably true. I'm pretty sure elvis, vim and, Emacs can do this. I'm not sure about others.
Code that makes sense indented with tabs shown as 2 spaces might look bad or wrong when someone changes it.
Yes, that happens. I think that's about the same as when people use different width terminals. I do think the different tab width is more of a problem though because some comments will be tabbed after a line of code and then the next line of just comments lines up via tabs with the previous comment. Then again for comments I don't think it's too confusing when things don't line up.
I guess it does let you avoid agreeing on what size of indent to use but I am not sure that is a good thing.
I think allowing for user defined flexability is really important when working on code shared by many people. Personally I addopted the Linux kernel standard a few years ago. I've worked on code with 8 or more levels of indenting with 2 space indenting where it can be difficult to line up what closes where. 8 spaces are much easier to see at a glance but I'd like to respect that other people prefer another visual layout. I don't think using spaces allows that to happen without an editor that understands the language and can let you edit it in a way that looks differently than the actual file is laid out.
PS: the JWZ link was interesting. Both arguments have fair points so we end up with individual preferences. :^) -
Re:Where have we heard that name before?
ESA's new prototype shuttle was again recently re-dubbed Firefox (formerly Firebird, formerly Phoenix) to avoid confusion with a NASA program that had started up some months earlier...
... and receives a hefty lawsuit from Craig Thomas and MiG. Lovers of red pandas everywhere remain baffled, but the Mozilla project team see very little for potential in confusing a web browser with a space shuttle, and so choose to say nothing. -
Response 1 corrected:On local displays X can use the shared memory extension but it is the X application programmers' responsibility to use it.
X applications which have been correctly programmed and which use the shared memory extension do run fast on local displays. The speed depends a lot on which X server software you use. If you use the free XFree86 implementation, just remember the graphics drivers for most chipsets are not optimised because they have been written by the XFree86 project without the benefit, in most cases, of having programming information for the graphics cards from the manufacturers.
-
Re:Is it snappier than X?
Firstly, you are criticising X when you are actually likely using XFree86, the free non-commercial implementation of an X server. There are commercial X servers which in some cases run faster than XFree86. XFree86 writes its own device drivers but graphics hardware manufacturers have often provided little or no information to help XFree86 developers write better device drivers. The design of X is not the problem.
Secondly, the client-server design of X causes minimal delay on locally displayed, locally run applications. The X11 communications take place over the very efficient, low overhead Linux version of Unix domain sockets. Furthermore, there is the shared memory extension to X, XSHM, which bypasses the usual client-server model for XImages and XPixmaps so that applications which are locally displayed and locally run can directly read/write the data in shared memory in the X server thus avoiding client-server roundtrip communications for these common high-volume data-structures.
I use XFree86 on a variety of hardware ranging from an old 66MHz i486 PC to very recent Intel PCs, and find it runs as fast as Windows.
-
Re:BTDT
Not only is the moon landing a hoax, but I've just been informed the moon itself is a hoax.
Best quote from the site: But don't all qualified scientists and astronomers agree that there is a moon? Indeed, but shouldn't one be suspicious of such unanimity, when universities are supposed to be forums for open debate of controversial issues. Sweet.
-
Re:Getting higher speeds out of Linux graphics
"Those people who do know the extensions well are VERY busy improving XFree."The MITSHM documentation was written by Jonathan Corbet (of Linux Weekly News?) and Keith Packard in 1991. That's over 11 years ago! Is there a lack of good documentation because people are really too busy to write the documentation or is it because they do not want to write documentation?
-
Getting higher speeds out of Linux graphics
In an earlier comment somebody said, "Fresco is not X: Yes, we do not extend X. X is good, we do think so too, but it has certain shortcommings we do want to adress. Improving X is not an option: We'd need to carry along tons of code we do not need and blow the code size out of proportion (example: xlib, networking code)."
X may be good but sometimes it is simply too slow and, worse, the documentation does not go out of its way to explain properly the speedups that are available.
Ok, there's shared memory pixmaps and shared memory images but the documentation is incomplete.
When you need speed and don't care about hardware-dependency you can use Direct Graphics Access module - DGA. But where's good documentation for DGA? Is there anything faster than DGA in X? Where's the good documentation?
-
Re:The moon is a hoax
For those not in on the joke:
The Moon Does Not Exist!
Reminds me of a quote...
"I refuse to believe that the moon does not exist when we don't observe it." - Einstein (attributed) -
The Mad Revisionist confirms......that the Moon does not even EXIST! In the tradition of 'Holocaust revisionist' theory, the Mad Revisionist sets out - and by 'revisionist' standards - convincingly shows that the Moon is a propaganda hoax. If, indeed, the NASA study can show the Moon exists, the Mad Revisionist is offering a large reward that would cover NASA's costs
;)To quote from the web site, located here (full article not reproduced here, due to the many links contained therein):
In 1995, the American Historical Association, in an attempt to stifle revisionist scholarship, marked the 50th anniversary of the defeat of Nazism with a resolution calling on scholars to "initiate plans now to study the significance of the Holocaust." This, however, was not enough of a blow to free academic discourse for the enemies of truth. The president of the AHA, William Leuchtenburg, was asked why the resolution did not go so far as to explicitly recognize the Holocaust as a fact of history. He answered that for a group of historians to say that there had been a Holocaust was tantamount to "an organization of astronomers saying there is a moon."
While, on the surface, this appears as nothing more than a shameless attempt to trivialize and thereby discredit the work of revisionists, it nonetheless got me to thinking: why did this historian single out the moon? Why would a scholar, so familiar with academic standards of evidence, use such language to imply that the existence of the moon, unlike any other issue, was a given and not subject to proof? What, in other words, was he trying to hide?
It was then that I embarked on my research, which has led me to this day when I can confidently make the following assertion: The Moon does not exist. As I realize this revelation may appear shocking to the average reader, allow me to repeat it:
The Moon does not exist!
This is no lie. Until recently, I, too, believed in the traditional, establishment view of the moon. But any thinking person, untainted by the biases imposed on us by the controlled media, will have no choice but to reach the conclusion I did once faced with the facts described in this account.
[..]
A cash reward of $100,000 has been offered to anyone who can send us, by e-mail, conclusive physical evidence of the existence of the moon. This reward remains unclaimed.
Can you prove that the moon exists? Write to us at: madrev@reptiles.org
-
Re:The "Moon": A Ridiculous Liberal Myth
More info, here. Mod this up because I gave a link and know HTML.
-
Can you say "Re-inventing the wheel?"
Writing pixels directly to a frame-buffer is slow. You lose all of the acceleration features of your video card. Keeping as much of the protocol at a high level as possible is good. The only things that benefit from direct frame-buffer access are programs that do all their own rendering. (Think video decoders.)
Still, if you think about it, the basic gist of your idea is to get rid of the network channel from the communication protocol, and instead have the app talk directly to the X server, say, in shared memory. If so, then how does your idea compare to MITSHM and Shared-Memory Transport? Or the Direct Rendering Interface for that matter? And for 2-D stuff, let's not forget the Direct Graphics Architecture extension. Nothing stops GTK, Qt and friends from using any one of these technologies if they'd improve performance and latency.
--Joe -
Correct link
For that one time I didn't hit preview...
here -
Re:Occam's Razor
-
Moon Landing Hoax Links
These are quite a good (and funny) read.
http://www.primeline-america.com/moon-ldg/
http://www.angelfire.com/ut/aylett/eth69.html
http://batesmotel.8m.com/
http://www.forteantimes.com/artic/97/moon.html
Some people are crazy too, like this guy, who says the MOON is a fake.
------------