"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Thursday, August 12, 2004

Courtesy Implementations

Martin Fowler discusses Courtesy Implementations in Java-like languages. (Oddly he uses Ruby, which is capable of the solution presented in Smalltalk below.) These are more easily done in languages that trust you to extend the "system" classes. Moreover...

What if the Box can contain other kinds of objects that don't inherit from Node?

Object>>elephantCount
    "This is only installed in your boxed elephant application."
    ^0

Elephant>>elephantCount
    ^1

Box>>elephantCount
    ^children inject: 0 into: [ :count :child | count + child elephantCount]

Wednesday, August 11, 2004

May the best VM win?

A good deal more information on pycore, the Python implemented in VisualWorks Smalltalk. The good news is based on a fairly simple implementation, not on the performance-oriented ideas still in design. So is the race on for comparing the performance of pycore and IronPython? IronPython is more complete, but performance-wise, pycore is showing more potential at this point.

Quoting from the pycore item...

The interpreter is currently complete, except for 'exec'; the simple translator is substantially behind; and the optimized translator is only at the design stage. Nevertheless, some Python programs run faster even with the pycore simple translator than with CPython, for example:

  • Recursive fibonacci function, 9x faster
  • Iterating over a large list of integers, 5x faster
  • Creating a list element-by-element, 2x faster
  • Accessing an attribute by calling a method, 2.5x faster

Not "what", "water"

And Bill is an enzyme, while I am water... Water
You are water. You're not really organic; you're
neither acidic nor basic, yet you're an acid
and a base at the same time. You're strong
willed and opinionated, but relaxed and ready
to flow. So while you often seem worthless,
without you, everything would just not work.
People should definitely drink more of you
every day.

Which Biological Molecule Are You?
brought to you by Quizilla

Mmm

I'll take just the Bailey's and the Kahlua.

Why...

Why Societies Need Dissent

How *much* hippie?

Blaine is 34% hippie, but with pride...

I AM 55% HIPPIE!
55% HIPPIE
I am not a child of the 60’s but my heart is true to the cause, man. I realize that being a hippie is not just bell bottoms and tie-dye. It is also about the drugs and smelling bad, too!

Tuesday, August 10, 2004

Clearcutting in search of the truth

The Guardian...

In an interview with the Associated Press, McCain called the ad "dishonest and dishonorable." Asked if the White House was behind it, McCain said: "I hope not, but I don't know. But I think the Bush campaign should specifically condemn the ad."

White House spokesman Scott McClellan declined to do so and instead criticized the financing of the ad, saying the president "deplores all the unregulated soft-money activity." McClellan said the Bush campaign had nothing to do with the ad or the group behind it. "We have not and we will not question Kerry's service in Vietnam," he said.

Jim Rassmann, an Army veteran who was saved by Kerry, said there were only six crewmates who served with Kerry on his boat. Five support his candidacy and one is deceased.

Eschew Special Case Languages

Another example of languages with special cases causing conflicts.

Another reason "constructors" should just be a regular message sent to a regular object. You already understand the simple, regular rules...

In the Smalltalk language, everything is an object. This includes not only numbers and all data structures, but even classes, methods, pieces of code within a method (blocks or closures), stack frames (contexts), etc. Even if and while structures are implemented as methods sent to particular objects.

Monday, August 09, 2004

YMMV

The Eclipse IDE makes language choice irrelevant?

I'm dubious. I've not used Eclipse in depth, or in a year or so, but I think this may be overstated unless Eclipse is using Java as a target notation for a more expressive source language!

Some kind of a showdown: But what kind?

I am not exactly sure what Jon is asking for in his Showdown at the VM Corral.

What I think we need is a way to connect lightweight processes from multiple runtimes and distributed runtimes as easily (and simultaneously as *robustly*) as lightweight processes can be connected in Erlang.

We need to think less about the VM (and even less than that about the OS) and more about (sometimes distributed) interprocess communication. But we need to do this without the heavy burden of the WS-* ice field.

Sunday, August 08, 2004

Python in even more places...

Bill lists the platforms Python runs on.

But Python is also at least embryonic on the PLT Scheme platform and Peter Deutsch, ACM Fellow and one of the best VM engineers on the planet, is leading the pycore effort to get Python running on VisualWorks Smalltalk and perhaps Squeak.

Apparently pycore has a small number of tests running significantly faster than CPython.

Saturday, August 07, 2004

Oregon may regain its conscience

Rather than follow Missouri into ignorance, a new poll suggests a measure to put a gay-marriage ban into the Oregon constitution could be in trouble.

Ignorance must be bliss.

Tuesday, August 03, 2004

Creative Thinking

"I once asked Ivan, 'How is it possible for you to have invented computer graphics, done the first object oriented software system and the first real time constraint solver all by yourself in one year?" And he said "I didn't know it was hard."
-- Alan Kay on Ivan Sutherland.

Magnificent

I'm back from two weeks in Jasper and Banff, in Alberta.

Friday, July 16, 2004

Bush is a Word Weasel

Bush says Kerry does not support the troops and "There is nothing complicated about supporting our troops". But does he walk the talk?

In spite of this simplistic sound bite, Bush has actually cut support for the troops in terms of pay, veterans' benefits, and, oh, yeah: even meals available to active troops in Iraq.

And what's that issue about lack of sufficient armor?

The word weasel also weasel'd out of serving appropriately during the Vietnam war. What did Kerry do? Oh, yeah, earn several earn several purple hearts and a silver star.

I would not hold avoiding service against anyone because, based on my beliefs, I would have to be a conscientous objector and serve in a non-combat role. But Bush did not take this approach... he weaseled.

Bush is a lying weasel that clear thinking Republicans should not tolerate. Kerry and Edwards (again despite the rhetoric) have very moderate voting records in the Senate. They are in actuality much closer to a moderate Republican's beliefs than is Bush.

The lying-dangerous-to-the-world-and-our-troops-weasel Bush.

Thursday, July 15, 2004

Software that Lasts

Dan Bricklin's essay on software that lasts 200 years reminds me of s similar idea from Ward Cunningham on software lifecycles...

First, the notion of a program life cycle admits failure from the start. If we are to have a life cycle, let us make it long. One hundred years cannot be beyond reason. Second, analysis as an activity to be conducted independent of implementation [see correspondence] again presumes implementation artifacts to be short lived and of little value. These ideas have become self-fulfilling prophesies. Although they apply in the current circumstance, they have become barriers to change from that circumstance. They impede progress in object-oriented programming.

The cause of flexibility will not be served by merely discrediting life cycle or independent analysis. To make progress we must examine the system of practices that have lead to these principles, discard those practices justified only by habit, construct new practice where human nature alone is insufficient, and then describe the whole with metaphor that implies useful longevity for the programs we make.

Of course we want and embrace change if for no other reason than that change is inevitable. So a great component of a realistic response to these challenges will be addressing what it may mean for software to both *last* and *change* at simultaneously.

What OOPSLA Has Become

Twenty years ago, the monthly Communications of the ACM was something to look forward to. Fifteen years ago, I guess, it had morphed into something not much better than Dr. Dobbs.

Fifteen years ago, OOPSLA was something to look forward to. Recently it has morphed into something not much better than SD West.

My first clue was the last time OOPSLA was in Vancouver. The first night's social activity was to have some celebrity OOPSLAer's name taped to your back and you had to go around asking questions to guess the name. A small group of us immediately hit the bars and had a blast. Don't know how the game turned out.

More recent evidence.

Wednesday, July 14, 2004

Boo hoo

I guess it's pile-on time from the dynamic language zealots, including me!, around Boo, a language that may have some promise. This post does not pile on Boo, rather, on its critic at http://www.panopticoncentral.net

I will add that one major problem with our compilers today is that entirely too much information is locked up in them. We've started exposing compilation information through mechanisms such as the Visual Studio code model, but we need to go a lot further to enable more advanced and extensible tools. It's certainly possible to expose a lot more information about what exists in the code that's being compiled without having to make that information modifiable outside of the compiler, and I think that's something that's unquestionably worth pursuing in the long run.
Complexity begets complexity. Rigid languages are the foundation of a "langauge priesthood" just as humongous mainframes were the foundation of a "computing priesthood" before the personal computer.

The author is apparently against "extensible languages". Arguing against "extensible languages" while promoting C# is an oxymoron. It's just that C# has crippled the extension mechanism and will be reinstating them over time in slightly incompatible syntaxes.

Tuesday, July 13, 2004

Understanding Continuations

Ian Bicking has an operational, concrete description of how continuations work.

Here's another way of explaining that sometimes works...

  • Imagine running some code in a (good, hypothetical) debugger.
  • Step through the code at the finest level of detail.
  • The "step" command is what the code will "do next, atomically, then stop".
  • The "continue" command (continue without stopping again) is what the code will "do next and thereafter".
  • The "continue" command is the debugger's way to access a continuation.
  • The Scheme function call-with-current-continuation is like the "continue" command of this hypothetical debugger.
  • The difference is rather than having the debugger get access to the continuation, your code itself gets access to the continuation, "disguised" as a procedure rather than as a debugger command.
  • Like any Scheme procedure, this "continuation procedure" can be called over and over again.
  • Like any impure language, though, Scheme side effects like assignment and I/O are not purely functional and so subsequent invocations of the "continuation procedure" take place in the state of the system resulting from earlier side effects.

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.