Chronos is one of the many Smalltalk-related blogs syndicated on Planet Smalltalk
χρόνος

Discussion of the Essence# programming language, and related issues and technologies.

Blog Timezone: America/Los_Angeles [Winter: -0800 hhmm | Summer: -0700 hhmm] 
Your local time:  

2006-04-18

Sci/Tech: Communication Channel Secured by Quantum Mechanics Used To Transmit Encryption Key at Record Speed over Fiber


Code for 'Unbreakable' Quantum Encryption Generated at Record Speed over Fiber from PhysOrg.com

Raw code for "unbreakable" encryption, based on the principles of quantum physics, has been generated at record speed over optical fiber at the Commerce Department’s National Institute of Standards and Technology. The work, reported today at the SPIE Defense & Security Symposium in Orlando, Fla.,* is a step toward using conventional high-speed networks such as broadband Internet and local-area networks to transmit ultra-secure video for applications such as surveillance.
[...]




Sci/Tech: Simulation Breakthrough: When Black Holes Collide


Simulation Breakthrough: When Black Holes Collide from PhysOrg.com

NASA scientists have reached a breakthrough in computer modeling that allows them to simulate what gravitational waves from merging black holes look like. The three-dimensional simulations, the largest astrophysical calculations ever performed on a NASA supercomputer, provide the foundation to explore the universe in an entirely new way.


[...]




2006-04-15

The Videotape Recorder Turns 50

Quote:

"During his remarks, Lodge mentioned a new technological breakthrough, but was not specific. At the conclusion of his address, he remained at the podium. As the crowd began to murmur and break up, the video monitors went from black to an image of Lodge. Only this time, Lodge was still making his presentation, not standing silently.

This was a seeming impossibility, as the only means for preserving video images was kinescope recording, a process in which a special motion picture camera photographed a television monitor. When the recording was finished, the film had to be removed and sent away for developing. Under normal circumstances, this could take hours.

The crowd, realizing that they were experiencing something very unusual, became hushed and locked onto the monitors, viewing an image of Lodge that was indistinguishable from the video seen just moments before. Again, this was quite uncanny, as even the best "kine" had a distinctive look that set it apart from the live video it had captured.

Then a curtain opened, revealing a strange machine and four individuals hovering around it. The crowd couldn't restrain itself and amid cheers, whistles, back slappings and applause, began pushing and pressing in around the world's first video recorder and part of the team that had made it possible. Some even stood in chairs to get a better look at the device that was making this miracle possible.

That was the scene 50 years ago this month."

For the rest of the story, follow the link to The Videotape Recorder Turns 50


Daylight Saving Chaos

Just saw this post from Stilgherrian on the mess caused by a this-year-only change in the date for transitioning from DST back to standard time in Australia.

Key points:


  • Because the Windows fix wasn’t security-related, it wasn’t labelled “critical” — so it wasn’t downloaded automatically by Windows Update.

  • Even downloading the daylight saving Hotfix and digesting Microsoft’s easy to follow (ahem!) overview wan’t enough. [Stilgherrian's] own properly-patched Windows XP test computer still reverted to standard time anyway.

  • Microsoft’s patch has to be removed [next year], because Windows can’t cope with different rules for different years.

Macs and Unixes also had problems.

I've added Stilgherrian's post to the "Cautionary Tales" page of the Chronos web site.


2006-04-13

Architecture is not inflexible dogma

Chris Petrilli goes off on a great rant against the typical stupidities of corporate IT:

"People obsess over the choice of tools, but the true talent, and the true skill, is the understanding of business problems that are trying to be solved, including the window available. If my tool—whatever it is—can help me focus and be more collaborative with the people whose problems I’m trying to solve, then it’s a better tool."

Coffeehouse chess players have often memorized all the moves for all the variations for all the standard chess openings--as recorded in books. But when a Grandmaster presents them with a move not in the books, they're lost. After all, it's the grandmasters who write those books.

True artists create great works of art using their native talent. Others paint by the numbers. Of course, true artists specify those numbers.

True software architects know when to apply architectural/design patterns elucidated by others, and when and how to invent their own if that's appropriate. Enterprisey architects follow the rules popularized a decade (or more) ago by someone they ignored at the time, but whose methodology and thinkng they now apply dogmatically without fully understanding the system's limitations.

Gifted sofware engineers know when counting the number of classes, or the number of methods, or the number of instance variables is a valid measure of code quality--and they know when such "painting by the numbers" is simply invalid to the case at hand.

Great architects judiciously break the mold, creating new rules that work better than the old ones. Dogmatic architects defend the old rules by force of habit, because that's the "safe" thing to do.

Don't be caught fiddling while the enterprise burns.


Sci/Tech: Rice scientists attach motor to single-molecule car


Rice scientists attach motor to single-molecule car from PhysOrg.com

In follow-on work to last year's groundbreaking invention of the world's first single-molecule car, chemists at Rice University have produced the first motorized version of their tiny nanocar. The research is published in the April 13 issue of the journal Organic Letters.


[...]





2006-04-12

The Timing of Time: Chronos Benchmarks

The time has come, the benchmarker said, to speak of many things. Of dates and times and cold, hard facts, of durations and timings. Of why the code is boiling hot and whether Chronos has wings (with apologies to Lewis Carrol.)

To put it less poetically: What follows are some benchmars comparing the Squeak version of Chronos (Version B1.167) with Squeak's native Chronology library.

First, let's level set. I've been working on Chronos since October 2004, and although it's my first attempt to implement a date/time library in Smalltalk, and it's the first time I've ever implemented a date/time library as a hobby without being paid by an employer, it's not at all the first date/time library I've implemented. I essentially "started from scratch" on the fundamental architecture/design of Chronos at least three or four times. I have spared no expense in time, effort or amount of code to achieve both the functionality I was determined that Chronos should have, and also the level of performance I thought was necessary/achievable. In other words, you should have every right to expect that Chronos would generally exceed the level of performance provided by the "out of the box" date/time libraries as distributed with the various Smalltalk implementations.

Also, it should be noted that Squeak is among the august group of Smalltalk implementations that make any attempt to have their date/time package conform to the ANSI Smalltalk Standard (VisualAge, Gnu Smalltalk and #Smalltalk are the only others, as far as I am aware.) More than that, Squeak's Chronology package exceeds the ANSI-required functionality, in that it offers significant and useful behavior related to intervals of time.

1. The hardware and software used for the benchmarks:

CPU: AMD FX-55
Chipset: nForce4-Ultra
Motherboard: MSI K8n Neo4
RAM: 2GB DDR400
OS: Windows XP, SP2
Squeak Version: 3.8.
Chronos version: B1.167

2. System Clock (Primitive 137)

The system clock benchmark measures the amount of time required to perform 1,000,000 invocations of Squeak primitive 137. Both Chronos and Chronology rely on this primitive in order to answer the current date and/or time-of-day, and so it's useful to measure the amount of time required to execute this primitive, since it is used by both Chronos and Chronology:

[1000000 timesRepeat: [SystemClock ticksNowSinceSystemClockEpoch]] durationToRun => 0:00:00:00.462 (0.462 seconds)

3. Get current date/time--without any subsequent queries

Chronology:
[1000000 timesRepeat: [DateAndTime now]] durationToRun => 0:00:00:44.556 (44.556 seconds)

Chronos:
[1000000 timesRepeat: [Timepoint now]] durationToRun => 0:00:00:06.241 (6.241 seconds)

4. Get current date/time, then query result for year, month, dayOfMonth

Chronology:
[1000000 timesRepeat: [DateAndTime now year; month; dayOfMonth]] durationToRun => 0:00:00:49.364

Chronos:
[1000000 timesRepeat: [Timepoint now year; month; dayOfMonth]] durationToRun => 0:00:00:09.605

5. Get current date/time, then query result for dayOfYear

Chronology:
[1000000 timesRepeat: [DateAndTime now dayOfYear]] durationToRun => 0:00:02:34.078 (154 seconds)

Chronos:
[1000000 timesRepeat: [Timepoint now dayOfYear]] durationToRun => 0:00:00:08.982 (less than 9 seconds)

6. Get today's date

Chronology:
[1000000 timesRepeat: [Date today]] durationToRun => 0:00:01:45.931

Chronos:
[1000000 timesRepeat: [YearMonthDay today]] durationToRun => 0:00:00:09.897

7. Get current time-of-day

Chronology:
[1000000 timesRepeat: [Time now]] durationToRun => 0:00:00:22.68

Chronos:
[1000000 timesRepeat: [TimeOfDay now]] durationToRun => 0:00:00:09.525

8. Create point-in-time value from YYYY-MM-DDTHH:MM:SS parameters

Chronology:
[1000000 timesRepeat: [(DateAndTime year: 2006 month: 7 day: 23 hour: 4 minute: 55 second: 16)]] durationToRun => 0:00:00:45.891

Chronos:
[1000000 timesRepeat: [(Timepoint year: 2006 month: 7 day: 23 hour: 4 minute: 55 second: 16)]] durationToRun => 0:00:00:04.004

9. Create point-in-time value from count of seconds

Chronology:
[1000000 timesRepeat: [(DateAndTime fromSeconds: 3331083316)]] durationToRun => 0:00:00:43.938

Chronos:
[1000000 timesRepeat: [(Timepoint secondsSinceEpoch: 63289227316)]] durationToRun => 0:00:00:03.486

Note: In the above, although the count of seconds differs, both expressions evaluate to the same date/time value--and the Chronos example has one more digit.

10. Add 50 days to a date

Chronology:
| tp |
tp := Date today.
[1000000 timesRepeat: [tp addDays: 50]] durationToRun => 0:00:01:24.046

Chronos:
| tp |
tp := YearMonthDay today.
[1000000 timesRepeat: [tp addingDays: 50]] durationToRun => 0:00:00:01.733

11. Add 500 days to a point-in-time

Chronology:
| tp duration |
tp := DateAndTime now.
duration := Duration days: 500.
[1000000 timesRepeat: [tp + duration]] durationToRun => 0:00:00:11.112

Chronos:
| tp |
tp := Timepoint now.
[1000000 timesRepeat: [tp addingDays: 500]] durationToRun => 0:00:00:01.217

And that should be enough to see the general trend, as far as the performance of Chronos relative to Squeak's Chronology package is concerned.


Chronos Version B1.167 Published

Chronos Version B1.167 has been published ("Beta Release 1--build 167".) Chronos B1.167 is available for both VisualWorks and Squeak. The Chronos Seed Archive for B1.167 is also available (the "Chronos Seed" is the platform-independent Chronos codebase, used for porting Chronos from VisualWorks to other Smalltalk pltatforms.)

Chronos Version B1.167 can be obtained from the Chronos Web Site. The VisualWorks version can also be obtained from the Cincom Public StORE Repository. Or you can use either the direct download link for VisualWorks or the direct download link for Squeak.

The Chronos Time Zone Repository is included in the download archive. Be sure to follow the Chronos Installation Instructions--especially if you have not already done so for a previous version of Chronos.

If you are reinstalling Chronos into an image in which an earlier version is already resident, and do not install the new version from the Cincom Public StORE Repository using StORE, it is necessary to first remove the earlier version. StORE has been able to correctly install the new version on top of every earlier version I have tried--but I haven't tried them all.

About Chronos Version B1.167


Chronos Version B1.167 includes no new functionality, nor any bug fixes (at least, not in the usual sense.) The changes in this version are either 1) the removal of unused methods, 2) repackaging for the purpose of making it easier to port Chronos, or 3) changes motivated by issues discovered when porting Chronos to other Smalltalk environments.

A port of Chronos to a third Smalltalk environment may be announced soon.

Also, I expect that updates/enhancements/changes to Chronos will be few and infrequent (or perhaps nonexistent) for the next month or so.

--Alan


2006-04-11

San Francisco's catastrophic 1906 Earthquake a warning for today


San Francisco's catastrophic 1906 Earthquake a warning for today from PhysOrg.com

It was an unprecedented natural disaster that destroyed a coastal US city. A bungled government response made it worse. Racism plagued survivors. It wasn't Hurricane Katrina, which slammed New Orleans and the Gulf Coast last year. It was the 7.8-magnitude earthquake that rocked San Francisco one hundred years ago on April 18.
[...]


When the nominal moment of the 100-year anniversry of the Great San Fransisco Earthquate occurs--which will be 2006-04-18T05:12-0700--the duration since the event will actually have been 36524 days and 23 hours (876599 hours or 52595940 minutes,) and not 36525 days of 24-hours each. The reason is that back in 1906, Daylight Saving Time was not observed--not in San Francisco, not in the United States, and not anywhere in the world. In fact, in 1906, time zones with "Standard Time" had only been in use in the United States for 23 years.

The count of seconds since the event depends on which timescale one uses. Using UT0 or UT1, the count of seconds would be 3155756400. Using UTC, it is necessary to at least add the 23 leap seconds that have occurred since the adoption of the UTC timescale in its current form in 1972.

The UTC standard says nothing about whether leap seconds should proleptically be imputed to have occured before the adoption of leap seconds into UTC--although some date/time algorithms take just that approach. Whether that's "right" or not depends on the Use Cases that one is attempting to satisfy.


2006-04-09

Sci/Tech: Big breakthrough for tiny particles

A new technology is born:


Big breakthrough for tiny particles from PhysOrg.com

MIT chemical engineers have devised an elegant new method for creating complex polymeric microparticles that could have applications in a variety of fields, from drug delivery in medicine to the creation of building blocks for the photonic materials that carry light. The particles can also add texture to skin creams and color to inks.
[...]