Posts

Showing posts from May 31, 2009

Why Must Software be Rewritten for Multi-Core Processors?

Perm url with updates: http://xahlee.org/UnixResource_dir/writ/multi-core_software.htmlWhy Must Software Be Rewritten For Multi-Core Processors?Xah Lee, 2009-06-04, 2011-03-02I had a revelation today, namely, that it is necessary to rewrite software to use multi-processor in order to benefit from it.This may sound stupid, but is a revelation to me. For the past decade, the question has been on my mind, about why should software needs to be rewritten to take advantage of multi-processors. Because, in my mind, i thought that software are at some fundamental level just algorithms, and algorithms, have nothing to do with hardware implementation aspects such as number of processors. I always felt, that those talks about the need or difficulty of rewriting software for multi-processor (or multi-core these days) must be the product of idiocy of industrial imperative coding monkeys. In particular, some languages such as java, the way they deal with it, seems to me extremely stupid. e.g. the c…

The Complexity And Tedium of Software Engineering

Perm url with updates: http://xahlee.org/UnixResource_dir/writ/programer_frustration.html.The Complexity And Tedium of Software EngineeringXah Lee, 2009-06-02This page is a blog of a experience of few examples that illustrates some seemingly trivial task can become quite tedius and complicated in the software industry.A Complexity with EmacsDiscovered a emacs problem.Summary:Seems that emacs 23 will have a problem loading a css-mode written by Stefan Monnier The css-mode.el file does not contain any sort of version number, which makes the problem worse.Detail: I have a Mac running emacs 22 with OS X, and i have PC running emacs 23 and Windows Vista. When i use the emacs 23 to load css mode, it gives this error: “if: Wrong type argument: integerp, (0 . 8)”. The problem seems simple in retrospect, but wasn't simple at all when you trying to get things done and things don't work as expected. Here's the story. Emacs 22 does not have a css mode, emacs 23 does. There's one …

Perl Script for Removing Mac Resource Fork

Perl Script for Removing Mac Resource Forkperm url with updates: Perl Script for Removing Mac Resource ForkXah Lee, 2009-05-31This page shows some perl script and tips for preparing Mac files to be used on Windows or Linux.Resource Forks and File Type CodeBefore Mac OS X, Mac files heavily relies on Resource fork. With OS X, it is decided in the early 2000s that resource fork is going the ways of dinosaur.Another confusing thing is that Mac files often has file Type code. Its purpose is similar to Filename extension used by Windows and Internet media type for indicating which app can be used to open the file. The Type Code is not stored in Resource Fork, but is part of the HFS+ file system. Resource fork for data files is discourage by Apple since early 2000s, and i think vast majority of modern apps does not create files with resource fork. However, Mac applications (those in “/Applications/” folder, may still rely on resource fork to function.File type code are still used in OS X.…

Switching from Mac/Unix To PC/Windows

Switching from Mac/Unix To PC/Windowsperm link with latest updates: http://xahlee.org/mswin/switch_to_windows.htmlXah Lee, 2009-05-26I bought a PC with Windows today, and am switching to Windows from my 19 years of Mac experience with 10 years of professional unix computing. This page tells the story. I have a aging Mac. It is a IMac G5 (iSight) bought in late 2005. It is the last iMac with a PowerPC chip. The machine is great, but is 4 years old. So, i needed a new machine. I went to local shop Fry's Electronics and was just gonna get the new Mac Mini that Apple just released this month. The cheapest Mac Mini is $600. Looking in the store, you find that a PC for the same price has at least 2 times the hardware power. Mac vs PCMac mini (MB463LL/A) amazonPC (HP Pavilion A6750F)
amazonCPU2.0 GHz Intel Core 2 Duo2.3 GHz AMD Phenom X4 9650 Quad-CoreHard Disk120 GB750 GBRAM1 GB8 GBPrice$600$600By the above comparison, you can see that the Mac is fucking shit, and they've been in th…