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:  

2007-02-28

A hidden twist in the black hole information paradox


A hidden twist in the black hole information paradox from PhysOrg.com

Professor Sam Braunstein, of the University of York's Department of Computer Science, and Dr Arun Pati, of the Institute of Physics, Sainik School, Bhubaneswar, India, have established that quantum information cannot be 'hidden' in conventional ways, or in Braunstein's words, "quantum information can run but it can't hide."

[Continued]




2007-02-26

Smalltalk Considered Fun

Jeffrey Massung, in his blog post Smalltalk: An Application Language, states that programming in Smalltalk is fun. Jeffrey has formed that opinion over the past few months: He started using Smalltalk for the first time in late August 2006, developing a 2D game engine in Smalltalk.

I've had the same opinion since November, 1985--partly for the same reasons that Jeffrey mentions:

This is what Smalltalk does for me. I only write the code that matters. If I need to rename a class, all references everywhere else in my sources are automatically updated for me. If I change a method name, a browser window opens allowing me to see every caller so that I promptly fix them. These are just two of many, many, many features, all possible thanks to the reflective nature of Smalltalk, due in no small part, to it's object-oriented approach to problem solving.
...
When it is implemented well (dare I say "properly?"), this paradigm doesn't just constitute another tool in the toolbox; it is the toolbox, from which everything else stems.

Since I started this endeavor to create a 2D game engine in Smalltalk, I've not once - wait, let me reiterate this - not once have I stopped, and started over again. I'm still working in the same image I started with in late August, 2006. All my designs began with prototypes (*cough* hacks *cough*) inside the main code base, and yet the code is clean. When they worked, it took minutes to reorganize and re-factor the code properly. And when they didn't, it took minutes to strip out bad code, and restore the old.

I've honestly never had more fun programming! Smalltalk has actually made programming more fun than it already was. It allows me to iterate the code so fast! The speed at which I can try an idea, see what's wrong, switch gears, or continue molding until it's right is so ridiculously fast, that it's fun. It's been stated that programming isn't fun. Problem solving and code design are fun. Programming in Smalltalk is just that - all the time. It's fun.

This is why it's common practice to warn those who are about to learn Smalltalk that they may no longer have much desire to ever use anything else.

Jeffrey notes that the reasons that Smalltalk is such fun, and that the programmer's tools are so powerful and enabling, is because Smalltalk is so pervasively dynamic, so pervasively reflexive, and so pervasively open. And that's all quite true. But there's yet other reasons why Smalltalk is so much fun, and why it's so powerful: Smalltalk is pervasively simple, pervasively uniform and consistent, and it's metalevel is completely symmetric with its base level.

Smalltalk has a very high degree of symmetry, compared to any "Algol-like" language with which most programmers would be familiar. LISP exhibits the same high degree of symmetry. Broken symmetries are what make other languages not so fun.

Here's the symmetry, the uniformity, the consistency and the simplicity, stated concisely: All values are objects, all behavior is mediated by sending messages, and nothing is done by syntax when it can instead be done by sending messages to objects.

Smalltalk's high degree of symmetry has proven to be far more important than any theoretical benefits that might be garnered by the use of static type checking, primitive data types, syntactic sugar, or any of the other autocratic, control-freak gegaws that commonly decorate the mainstream languages.

Programmers of the world, throw off your chains. Your favorite programming languages are too complex, and have too little symmetry. It's time for a "Copernican Revolution," where programmers recognize that the curly-braced languages are based on overly-complex "epicycles," and that there's a much simpler approach.

Static/late binding is not the center of the universe, and attempting to make it so is robbing you of the fun you could be having.


2007-02-24

Smalltalk Considered Unfriendly

Eric Dobbs' blog post (Playing Nice - what Perl's got that LISP and Smalltalk lack) hits the nail on the head: Smalltalk and LISP have not been as successful as Perl because LISP and Smalltalk want to be independent universes, hermetically sealed off from the rest of the world:

There's always been only one Perl; differing versions, sure, but you have never had to spend any time choosing whose Perl interpreter to use. More importantly, Perl began with the assumption that it would not be the only tool in your toolbox: it set out from the beginning to play well with others. By contrast, there have always been many flavors of LISP and Smalltalk any of which have tried to be pretty much everything you ever need.

Painting in broad strokes, David says Smalltalk's weakness is "at the boundaries:" when you want to try to do some typical unix system maintenance, or interfacing with underlying C libraries, or something similar. As long as you're staying within the Smalltalk environment, it completely rocks. But it's definitely painful if you try to reach outside. And it's especially painful if you want your code to work with different Smalltalks. What Perl got right was making it completely painless to integrate with its environment.

In some sense LISP wants to be on a LISP Machine and Smalltalk wants to be in its virtual machine, whereas Perl wants to go out and play with the other kids. The former languages are introverted and Perl is extroverted.


But, as Eric points out, that raises the question: "Why is Java more successful than LISP and Smalltalk?" After all, Java also wants to do everything itself, in its own idiosyncratic way, instead of relying on the host platform.

My answer: Java has not been as successful as it could have been, had it not been so fixated on always defining its own, separate culture (e.g, libraries, protocols, architectures, standards, etc.) And Java has peaked. It is losing ground against its competition, not continuing to advance. It owes its initial success to several unique factors, none of which are anywhere near as important as they were ten years ago: a) C++, b) the internet revolution, and c) the backing of Sun Microsystems, Inc. Java is now a legacy programming language, and its future will unfold in accord with that status.

Note that the languages that are beginning to overtake Java don't suffer from Java's antisocial attitude: Perl, Ruby, Python and C#. Yes, C#. Sun's strategy with Java was "same language, same architecture, same libraries--on all platforms." Microsoft's strategy with C# (and the CLR) is "any language, same architecture, same libraries, at least on Windows, and we're OK with others duplicating the CLR (and .Net) on other operating systems."

But I would also note that the the CLR, although it is better than the JVM at support for multiple langauges, is nevertheless not as friendly as it should be to deeply dynamic programming languages. That's one reason that the CLR-based languages aren't quite as "hot" as Ruby, Perl and Python.

Society is based on the theory that cooperation and collaboration are superior to conflict and confrontation. Peace is better than war. Friends are better than enemies. But Smalltalk and LISP have been trying to succeed as anti-social hermits, alone on their respective mountaintops (or up and away in their lonely balloons.) In the long term, I don't think that approach is likely to succeed. Smalltalk and LISP need to learn how to "play nice."

And there are two sides to "playing nice":
  1. Being willing and able to request services from your neighbors
  2. Being willing and able to answer requests for services from your neighbors

In other words, interoperability is reciprocal. You have to be able to play the role of a "broker," someone who "makes a market" in some set of services or commodities. That means you have to be equally willing to buy (make requests) or sell (respond to requests.)

From the point of view of the outside world, to the extent that Smalltalk and LISP provide any interoperability at all, it's almost all one sided: Smalltalk and LISP may deign to request something, but they don't offer any services in return. Unless and until that changes, I don't foresee either Smalltalk or LISP making much forward progress in the marketplace.

Of course, it's not that simple. There are really strong and compelling technical reasons why Smalltalk and LISP don't offer services that are easily consumable by foreigners. And there are also strong and compelling cultural reasons why Smalltalk and LISP prefer to build their own services and tools, instead of using the "community standard" services. The future of the two languages will depend on whether Smalltalkers and LISPers see these facts as reasons to do nothing, or as challenges to be overcome.

[Post Script:

I don't whether this is a direct response to my post, but Cincom (the folks behind VisualWorks) are making significant improvements to the ability of VisualWorks Smalltalk to "play nice" with other languages—as described in a blog post by James Robertson, the VisualWorks product manager: Better FFI all the way around]


2007-02-22

Swarmbots: Robot builds itself for special tasks


Robot builds itself for special tasks from PhysOrg.com

In one of the latest studies on autonomous robots, scientists sat back and watched as their robot created itself out of smaller robotic modules. The result, called “swarm-bot,” comes in many varieties, depending on the assigned task and available components. As the current state of the art in autonomous self-assembly, swarm-bots offer insight into the potential versatility and robustness that robots may possess to perform missions beyond human abilities.

[Continued]




2007-02-16

Handling various text file line-end conventions in VW

Martin Kobetic has posted an excellent tutorial on handling different text file line-end conventions in VisualWorks.

The Passport inter-Smalltalk portability library (on which the Chronos Date/Time Library depends) also provides a solution to the same problem:


  • UtilityFunction nextLineFrom: aStream

  • UtilityFunction skipToNextLineOf: aStream

Both of the above functions will work with any of the three text file line-end conventions currently encountered in the wild: CRLF (Windows,) LF (Unix/Linix/MacOS X) and CR (classic MacOS.)

Passport does not provide any support for writing text files using different line-end conventions, for two reasons:

  1. The external WriteStreams provided by most Smalltalk implementations will already convert CR to the host platform's line-end convention.

  2. Given the ability to read text files correctly, regardless of line-end convetion, there is not as much need to be able to write files with any particular line-end convention.

Chronos uses both of the above Passport functions in order to read time zone and other information from text files stored in the Chronos Time Zone Repository. Using those two Passport functions not only provides Chronos with inter-Smalltalk portability, it also means that a single version of the Chronos Time Zone Repository can be used on all host platforms, even when the text files were generated on a different operating system.


Macro, not micro: modified theories of gravity


Macro, not micro: modified theories of gravity from PhysOrg.com

When it comes to cosmology, the macro scale is important. As scientists search for the reasons behind the increasing rate at which the universe is expanding, they modify Einstein’s theory of gravity and delve into dark energy theories to explain this counter-intuitive phenomenon.

[Continued]




New energy source? Scientists convert heat to power using organic molecules


New energy source? Scientists convert heat to power using organic molecules from PhysOrg.com

Researchers at the University of California, Berkeley, have successfully generated electricity from heat by trapping organic molecules between metal nanoparticles, an achievement that could pave the way toward the development of a new source for energy.

[Continued]




2007-02-13

Chronos Time Zone Repository Version 2007b Published

Version 2007b of the Chronos Time Zone Repository has been published. It is based on version 2007b of the Olson Time Zone Database.

Downloads:




Chronos Roadmap

Current Task: Implement iCal Recurrence Rules

Planned Tasks/Enhancements/Features:


  • Implement full support for "Business Day Conventions," including addition/subtraction of business days (supplementing the already-supported "business days between dates" functionality.) Business date conventions specify the business rule for adjusting dates so that they don't fall on holidays, such as "next business day," "preceding business day," "nearest business day, "next business day in same month--adjusting to previous business day if necessary," "previous business day in same month--adjusting to next business day if necessary"

  • Implement multiple timescales (e.g., UT0, UT1, UTC, TAI, apparent
    solar...) Will at least implement UT1 and UTC--but the architecture will be extensible.

  • Complete all documentation.

  • Implement the Chinese Calendar.

  • Implement the Astronomical Hijri (Islamic) Calendar.

  • Implement conformance to the IANA Time Zone Registry Specification




2007-02-12

Researchers Create Tiny, Self-Propelled Devices


Researchers Create Tiny, Self-Propelled Devices from PhysOrg.com

North Carolina State University scientists have figured out a method to supply microscopic devices with enough energy to not only allow them to propel themselves through liquid – a difficult function in its own right – but also to perform some other functions, like emitting light.

[Continued]