After an appropriate amount of cajolling and threatening, Corbin Dunn finally has a blog up and going. Also, Chris Bensen has joined the fray as well. Welcome aboard guys!
Thursday, June 3, 2004
New blog happenings...
Friday, May 28, 2004
More RC fun...
In the "keeping up with the Jones'" department (Anders Ohlsson and Michael Swindell), I just ran across this Huge B-52 flying scale model. What is really interesting is that it uses real turbine engines! Some folks have just have way too much time (and money) on their hands..
Thursday, May 27, 2004
Delphi Win32: Why packages are better than libraries.
In this rather lengthy entry in Chris Brumme's weblog, Startup, Shutdown & related matters, he outlines many little-known items related to how the Windows OS handles dynamic loading of DLLs. He also mentions a major potential "gotcha" when executing code in "DLLMain()" (or in Delphi parlance, the unit initializations for all units in a Delphi "library"). Most of his discussions are couched in relation to the CLR buildup and teardown within an OS process. There is, however some interesting insight that can be gotten from this article regarding certain caveats when writing regular Win32 applications.
The most interesting section is the discussion regarding the OS Loader Lock. At their core, all Windows DLLs have an entry point referred to among the "C/C++" crowd as "DLLMain()." To us Delphi-heads, we just use the implicit unit initialization. The problems come from the very fact that in a Delphi library, unit initializations are called during the DLL_PROCESS_ATTACH phase of DLLMain(). Since the OS is holding the Loader Lock, there are a several things you can't necessarily do from within the unit initialization. Here's Chris' list of don'ts:
1) You must never call LoadLibrary or otherwise perform a dynamic bind.
2) You must never attempt to acquire a lock, if that lock might be held by a thread that needs the OS loader lock. (Acquiring a heap lock by calling HeapAlloc or HeapFree is probably okay).
3) You should never call into another DLL. The danger is that the other DLL may not have initialized yet, or it may have already uninitialized. (Calling into kernel32.dll is probably okay).
4) You should never start up a thread or terminate a thread, and then rendezvous with that other thread's start or termination.
OK.... so what does this have to do with
packages?As it turns out, Delphi packages avoid these issues because the initialization model is much different. When a Delphi package is dynamically loaded, unit initializations are not implicitly called like a Delphi
library. Only a small initialization stub is called that is just enough to wire the package into a global linked list of packages, setup that package's HInstance variable, and initialize the Thread Local Storage block. No unit initialization can be done until LoadLibrary returns and the OS Loader Lock is released. The LoadPackage function in SysUtils.pas does this by calling GetProcAddress on the package's HModule looking for the compiler-generated entry-point called Initialize and then calling it. This entry point calls a stub of code with a table of all the various unit initialization blocks addresses that in-turn runs through the list an calls each one. So when your unit initialization code is called when the unit is in a dynamically loaded package, you are free to do anything, including all those items listed above. Remember to always use LoadPackage to dynamically load your packages as this will ensure that this sequence of events is properly followed. Alternatively, you can load the package yourself using LoadLibrary, but you must call InitializePackage prior to making any calls into the package.Remember, also, the rules outlined by Chris apply to dynamically loading a Delphi
library that is linked with packages. This is because, even though you are implicitly dynamically loading the packages, the unit initializations of even the linked packages are controlled by the library's unit initialization sematics. Describing the complete details of how the unit initialization logic works is beyond the scope of this article.Wednesday, May 26, 2004
Plucky Duck...
So I've been trying out Pluck for the past couple of days as my news aggregator and so far I'm quite impressed. It displays the actual web page of the blog article by browsing to the originating site within a browser pane. So this means that even if the RSS feed doesn't include the entire article text, it doesn't matter because you are taken straight to the originating web page. All of this is hosted as an Internet Explorer add-on. Of course if you despise IE, then you probably won't like it.
Monday, May 24, 2004
Hallvard is now blgging
Hallvard's Blog
Hallvard has a keen eye for the details. He also is one of the few Delphi customers that succeeds in keeping us on our toes on a regular basis. No chance of getting too complacent with Hallvard looking over our shoulder... Welcome to the blogsphere!
Mis-attribution...
Guardian Unlimited | Online | Inside track
I think Mary got a little mixed up. From the article:
Thorpe's disclaimer includes the line: "If you actually think that my opinions are a reflection of Borland, then I have a bridge I can sell you."
Now scroll down to the bottom of this page and read my disclaimer. Then follow this link to Danny's blog and scroll down to the bottom of that page and read the disclaimer.
You decide...
Friday, May 21, 2004
Gates on blogging
OK.. I just couldn't let this one go... I tried.. really I did. Seems Bill is talking up blogging to top CEOs. This will either be great for many companies (especially technology driven companies)... or not. According to Gates:
"Another new phenomenon that connects into this is one that started outside of the business space, more in the corporate or technical enthusiast space, a thing called blogging. And a standard around that that notifies you that something has changed called RSS."
and
"Another big phenomenon is building communities around Web sites, around products. And virtually every company ought to have on their Web site the ability for their customers, their suppliers, various people, to interact and their employees to see the dialogue taking place there and jump in and talk to them and help them"
On the surface it is great that a well respected (or reviled) industry luminary, is pushing the idea of corporate blogging. Borland is certainly dipping its toe into the blogging waters and MS is going gangbusters into blogging. The good thing about widespread corporate blogging is that it can certainly help dispel all those various rumors and conspiracy theories about some corporate hidden agenda. Guess what, in general, all for-profit corporations have that one "hidden" agenda... make money, increase shareholder value, rise above the competition, etc... By a company condoning widespread blogging by its employees, it can become more transparent and visible to the customers. In other words put on a happy face.
Now what about the "or not" mentioned in my opening sentence? This is where my cynical side comes in. Especially in light of the recent announcements of JBoss sandbagging the public forums with corporate shills. The potential for abuse is certainly there. Just like any new tool or technology, there are those that would like to approach it from a much darker angle. Email opened up a new form communication that has now so permeated our society, that even your great-grandmother has an email address. Now every time you go to read your email, you cringe at the sight of countless offers for improving your sexual prowess, that $0 down 0% home mortgage, or that self-described hotty, Bambi wants to meet you. Email is now a marginalized commodity. A necessary "evil." While I don't necessarily see there being this huge rise is "blog spam," it has already started with RSS feeds. What if a company were to "commission" groups of individuals to start blogging without the appearance that they are company employees, or they use pseudonyms? What if several employees started doing it on their own and the company simply looked the other way while those employees spread FUD about a competitor and made libelous statements?
For now, blogging is in the "innocence" phase of its development. Just like email and the internet itself was "young and innocent" at one time.
Thursday, May 20, 2004
Charlotte's web...
I was trolling through the newsgroups while rebuilding Delphi, and happened across a post that was wondering what happened to "Charlotte?" I suppose one could also ask, "what happened to the Delphi /Java byte-code compiler?" I can't necessarily say that they're dead, but just dormant. They were also just technology demonstrations which were the result of some internal research. Many times we will present these little peeks into what's happening in the labs in order to gauge response and overall interest. We don't have a crystal ball... more like a Magic Eight Ball, so there are bound to be some things that just don't make the cut, were too early, too late, or simply too dumb (I'm not implying that either of these two items were dumb!)... Sometimes the technology that we developed while researching these items actually do have an impact on our current product offerings. Many times in ways that you may not directly recognize.
For instance, the "Charlotte" research has produced some parser-generator tools that are used extensively in C#Builder and Delphi8 for producing the Abstract Syntax Trees (AST's) used to build the CodeDOM necessary for the WinForms and ASP.NET designers. So... you say? Well what is unique about these grammars is that they are designed from the start to be very robust in terms of dealing with code that is currently under development. Those parsers must be able to make reasonable sense of code that will not actually compile. It has to do this by inferring certain things about the code by inserting special error nodes into the AST. This whole error recovery system is all part of the actual language grammar definition itself rather than glued onto the side as an after-thought. So in that sense, a little bit of "Charlotte" has been shipping with C#Builder and Delphi8 for a while.
What about the Java byte-code compiler? Well, it turns out that we may be using some of the concepts introduced by that little bit of tech for providing a solution to multi-unit namespaces. So, while we've demoed future tech (and may continue to do so), many times tech doesn't die or turn into a stand-alone product, but is "parted-out" to existing products so that it can gain the widest possible audience.
Wednesday, May 19, 2004
dbRTL public beta posted
There is now a public beta available for immediate download that fixes the "persistent field size mismatch exception" issue introduced by the Delphi 7.1 patch. You can get get more information here.
Cool hardware...
I've been eyeing this little bit of hardware for a while and so I finally went and got it. I have a lot of videos that I'd recorded on my home PC but I hat sitting at the computer to watch them. I'd rather go to the living room with the 53" big-screen. What I'd been doing was to burn them to a VideoCD or, more recently, to DVD. That works, but sometimes it is just a show I scheduled to be recorded and only watch it once and then delete it. I'd rather not burn a DVD just to be able to watch the show. So I bought this really cool little set-top device called the MediaMVP. It is essentially a little embedded Linux device with a PowerPC "set-top" chip with an MPEG decoder, some flash memory, some RAM and ethernet controller. It directly connects to the network and talks to a special server service running on your PC. It then streams audio, video, pictures and internet radio directly to your TV. Now I don't really watch too much TV at all, but there are a few things I do like to watch. Sure, I could spend several hundred bucks on a Tivo or ReplayTV, but I already have a TV tuner/video capture card in my PC with the requisite record scheduling software. This little device only cost $99. With the latest beta firmware, I can also play Divx encoded videos (that requires a Divx decoder on the server and a little more network bandwidth).
There's also a whole sub-culture beginning to form around this little gem. Here's a few links to various reviews and hardware tinkerers:
MediaMVP and VDR
Hauppauge MediaMVP Software
WinTV PVR & MediaMVP Board
Hauppauge MediaMVP review by PC Magazine
Review on Build Your Own PVR