CYCAS fills a need

I need to get my dad to try CYCAS and see if his old autocad files will open in CYCAS in Linux.

Compatibility with DXF (and DWG?) has been a hold up for converting his desktop to Linux for years. He is still running a version of Windows 98 that was actually installed in 1998. Its the must cluttered and unstable windows desktop I’ve ever known.

Ubuntu + CYCAS might just be the ticket.

Things I thought I’d never need to know about COM

I did some VERY basic COM programming in C and C++ in 1999. It was so basic it really was just a few function calls exposed so that they could be called from Visual Basic. I initially struggled with Variant. Then I learned to love the elegance of the giant union. I hated that there were so many type of strings. I had done MFC, but this was ATL. And of course I was wrapping up ONC (yes not DCE!) RPC calls, so I eventually wanted char*. Long story short, I learned a little bit about COM, and I never used it again. I remember through the process, reading about COM threading models and the single apartment model and the multi apartment model. Of course usually these topics just got in the way of what I wanted, which was the simple VB-> C -> ONC RPC-> network cloud -> omg calling function on unix, which I wanted.

(I still love that concept. It was pretty easy to call unix from windows or windows from unix, using ONC RPC. Yes, ONC RPC can be a pain, but it works. I don’t recall where I found my ONC RPC toolkit for win32, and yes it was very much a kludge.)

Here I am years later, and I actually found that Threading model stuff useful!

After reading a series of news group posts…
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/7ee0a48dde3d4188/bf6f1ac9c25190ad?q=QueryInterface+for+interface++failed.+service+permissions+-outlook&rnum=10&hl=en
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/8c313072acb7b8f4/673e7d3c744e452f?q=QueryInterface+++failed&rnum=1&hl=en
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.windowsforms/browse_thread/thread/e40283466a8688c8/f4febade7679f67f?q=stathread&rnum=2&hl=en
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/df6b006cb3bcfaf9/1d204a540064f9a4?q=QueryInterface+++failed+sta&rnum=1&hl=en

I finally realized that, HEY! Maybe that AspExec legacy COM control, that I don’t think we should be using anyway, is expecting an STA model. Even though my VB.NET Windows Service is marked with the STAThread attribute, when I spawn new threads by creating new System.Threading.Thread objects, I should set the ApartmentState property to STA.

The AspExec control expects to be run from legacy ASP. Legacy ASP uses the STA model. ASP.NET can be told to use the STA model by setting ASPCompat attribute of the @Page directive to true. That part is well documented. I have a feeling that if the ASP.NET page or webservice were creating instances of Thread, that those instances would need their ApartmentState property set to STA as well. Spawning threads in ASP.NET Pages or WebServices is probably not very common or even advised.

I was tickled pink when it turned out that this was the issue. All those years ago I had studied COM and thought I would never need that thread model information, but it turns out I used it after all.

Anti-terror from Rocketboom

Links suggested from RocketBoom, but since not everyone is down with video podcasts, I figured I’d post them.

http://www.pfff.co.uk/weblog/ is a first hand account of a survivor of the London subway attacks.

http://www.werenotafraid.com/ is a collection of blog pics saying “We are not afraid!”. A pretty powerful, and sometimes funny, statement to anyone who would try to use terror to instill fear in the general population.

On a site note, I hope Robert and Patrick Scoble keep up the podcast. Patrick is hilarious. The awkward father-son banter is hilarious.

Mathematica? Why not

Roml’s Mathematica post triggered me to think… Why Mathematica?

Octave, Maxima, and R will each do at least 80% of their commercial counterparts, Matlab, Mathematica, and SPSS. It sounds like you purchased Mathematica because you want that specialized 20% which Maxima will not do. I liken this to using any other niche commercial software such as Oracle over Postgresql, or Websphere instead of Jboss.

Would it be possible to get Oracle or Websphere packages into a debian tree? Yes, we are programmers, just about anything is possible. Is this likely to ever occur? No, I don’t think so. Oracle and IBM may claim to embrace open source, but they don’t embrace, nor do they even understand the levels of ease of use and administration which you are suggesting.

My advice: use Maxima. 🙂 It doesn’t do what you want? Add the feature you want, this is the power of open source! Don’t have the time to add said features? Then you are doomed to struggle with the manual installation of commercial software!

Exercise is good, I am not

I am in the worst shape of my life. Too much sitting at the desk at work, and to much sitting at the desk or on the couch at home.

A 45 minute bike ride used to barely make me sweat. Now it feels like a huge workout. I’m going to try to resolve the inactivity.

I almost feel an itch coming on for some code. Dotnet needs a flexible BitTorrent library. NBT started off on that path. I need to see how complete it is. Ipodder is a good piece of software, but I prefer to develop in dotnet and C#, so adding ipodder functionality to RSS Bandit might suit my needs.

Visual Basic.NET color syntax highlighting in Vim

I wish I had added these lines to my vimrc months ago. I’m not sure why they aren’t in vim’s filetypes.vim. My vim is pretty new. Perhaps I should file a feature request?

” Visual Basic.NET
au BufNewFile,BufRead *.vb setf vb

I’m really just using vim as a reader. Color syntax highlighting is nice in a source reader. Of course I wouldn’t have to read that way if work had source control and viewcvs. I think right now we are scoring between a 0-1 on the Joel test. I’d like to get us to 4 or 6 by my 1 year anniversary.

A Clever and Fun 4th of July

Not my 4th of July, but Joe Shaw, Nat Friedman, and their friends did something VERY awesome, clever, and fun, a reenactment of the Scopes Trial.

Hey guys, next time, get it on video and release it under for all to see. Give it a nice license. The world is in need of less restrictively licensed entertainment, and your reenactment sounds like quality entertainment.

Super Cool Neato Import

I just imported 399 Live Journal entries to be WordPress Posts.

What is even cooler is that I exercised some programming skills and implemented the backup button in lj-net. I checked it out from CVS on Sunday and played a little. I laughed when I discovered that the Backup option was in the menu, but there were no events for it. Then I remembered it was CVS, so people download actual releases probably did not click the button and wait for something to happen. Hopefully the button didn’t exist in the relese.

I wired up some lame test stuff on Sunday, but this evening I actually implemented the LiveJournal export xml format. This was great because WordPress already has a Live Journal import php script. I simply copied the xml backup to my WordPress host and set a define in the import script, et voila! A few years of very retarted LiveJournal posts.

I must say, beware! I followed very little (none) etiquette on the LiveJournal Posts.

Apple on Intel – No Big Deal

It has been 20 days since the start of the 2005 World Wide Developers Conference for Apple Computers. Steve Jobs confirmed what many had speculated for years. Apple’s Macintosh line of computers (their only line) would change to run on Intel chips.

There has been TONS of talk about this, what it means for Apple, what it means for Microsoft, what it means for Linux, what it means for Dell, and probably what it means for George Bush and maybe even what it means for your grandmother. It seems the smoke is clearing and the dust is settling and what is left is a huge mess of misinformation and some solid facts. I’m just going to state a few things from my point of view. Only time will tell whose thoughts and opinions turn out to be correct.

First is the notion that many power user types will want to buy an Apple computer and dual boot a Microsoft Windows operating system. This is a plausable idea at first, but lets consider some things. Apple keeps its computer easy to use. There are a number of things in the Intel move that I do not think will change. Holding down ‘C’ on bootup to boot from CD, or holding down ‘T’ to enter target disk firewire mode are two things that I think the new Intel based Macs will have. Think for a moment how these things might be accomplished on a current PC. They can’t! Well, the holding of C to boot from CD could be accomplished at a BIOS level, but today, far more technical expertise is required to force a PC to boot from CD. As for target firewire mode, I suppose the same could be done with a fancy BIOS, but nothing exists today. (I’m a firm beleive that anything is possible, it just takes some code, or the proper engineering.)

Apple currently accomplishes these types of features through the use of their Open Firmware Architecture. When a Mac boots, it has far more knowlege about the hardware on which it is booting than an Intel PC does today. Apple will use an Open Firmware to boot their Intel based Macs. The new Macs will not have a BIOS. Wikipedia gives a good background on what is a BIOS.

When a modern PC boots, it is still acting as an original IBM PC. Even Pentium CPUs boot in 16bit real mode. Apple doesn’t have to function this way. They can allow their firmware to switch into 32bit protected mode, see all of the memory in a system, utilize all the power of whatever CPU it uses.

That brings us back to the dual boot question. Even though an Intel CPU is being used, the new Mac is probably NOT going to be “PC Compatible”. Setting aside questions such as “How does a CD boot?”, “Will is use El Torrito to boot CDs?”, and “Where do drive letters fit in?”. Just the fact that there is no BIOS looking to boot a DOS operating system means that Windows XP is not going to boot on this thing. There is not need for MBR programs, DOS style Partition tables, none of that is on the new Mac. This thing is as much a Mac as a PowerMac G5 or a PowerMac G3.

The same dual boot question applies to Linux. My guess is that Linux won’t install on the thing the same way that Linux installs on a Windows Compatible Intel based computer. Lilo doesn’t fit anymore. The way a boot CD looks is no longer the same. But the Linux community reacts quickly. Linux will be running on the thing, even in a dual boot situation shortly after the release of the first machines, if not before then.

A note about 32 bit protected mode. I really don’t know much about the Intel 64bit architecture that Intel copied from AMD, but the fact that those x86_64 computers boot DOS and Windows the same way as the original IBM PC means that the argument above holds true for them. It seems that maybe they would have a 64 bit mode that would be used instead of the 32 bit protected mode previously mentioned. I don’t think the new Macs are going to use a 32 bit Intel chip. They will use the new 64 bit Intel chips.

Given the above, it should be clear why Dell shipping OSX machines is not as clear cut as some would suggest.

Somethings I’m not surprised about are the questions about VMWare and Virtual PC, and the use of Wine. Wine will now work on OSX. This is HUGE! I’m sure some performance enhancements will be needed, hopefully to remove the X Windows layer from Wine and let Wine run directly on one of Apple’s display layers. Even running Wine through Apple’s X11 implementation will allow for thousands of Windows programs to run on a Mac without emulation for the first time.

I hope to see a VMWare port to MacOSX soon. Remember that Virtual PC is a virtual machine on Windows, but on Mac, Virtual PC has always been an emulator. Microsoft would need to release a new version of Virtual PC for the new Macs. I can’t speculate on whether Microsoft will do this port quickly, slowly, or not at all. But at this point, FORGET DUAL BOOTING. All of the dual boot, machine boot argument above becomes irrelavent as soon as Windows XP is booting in a Virtual Machine. VMWare or Virtual PC, it doesn’t matter, Windows XP running as a Virtual Machine (instead of emulated) on the new Macs mean Windows applications at performance that Mac users have never seen on their Macs! Finally we can buy loaded up Powerbook Centrino’s and max out the memory and run Linux and Windows inside virtual machines. This is my dream. No more multiple computers.

This rant got a little long. I’m sure that I have more opinions and responses to the myriad of responses to this Intel based Mac announcement. Note that I have avoided use of the word “macintel” because its pointless. A Mac is a Mac.