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

Search This Blog

Wednesday, May 11, 2005

Jython Integers

Moving Python and other dynamic languages to the popular rigid virtual machines should preserve Python behavior while providing access to the host language and platform capabilities.

When I used Jython a couple years ago I guess I did not stress this behavior. And so today I am a bit surprised to see the following in Jython 2.1...

>>> java.lang.Integer.MAX_VALUE
2147483647
>>> n = java.lang.Integer.MAX_VALUE
>>> n
2147483647
>>> n.__class__

>>> n + 1
Traceback (innermost last):
  File "", line 1, in ?
OverflowError: integer addition: 2147483647 + 1
>>>
Comments

It is a correct behavior. Try evaluating "sys.maxint + 1" on CPython 2.1...

If you do "sys.maxint + 1L", (note "L") it works both on CPython 2.1 and Jython 2.1.

End Comments

OK. So the goal becomes getting Jython up to 2.4 or at least the version past CPython 2.1 where both sys.maxint + 1L and sys.maxint + 1 do the (same) right thing.

Thanks

The Age of the Dynamic

Update: It looks like IronPython could become a preferred approach to programming Avalon.

I define a new type in python, with *no properties*. I then dynamically assign anything to the objects with the name "name" and "value"... everything else is Avalon + Python goodness... oh yeah!
What's that buzz I hear?

End Update

Dynamic languages continue their dance with the Big Boyz.

All in due time. All in due time.

Information Overlord?

Philip Greenspun on Longhorn and file systems in general...

The average household user of a personal computer doesn't need anything with many more features than the Palm OS or Microsoft Outlook and probably has far fewer megabytes of documents than he or she has of archived email.
Information overlord?

Empirical Evidence And Analytical Reasoning

Bob Martin writes about the interplay of test-driven development and analytical reasoning.

Techniques such as TDD are valuable empirical techniques that can create the dots; but you need reasoned analysis to connect those dots. A suite of tests shows you that a program behaves as expected for discrete situations. Analytical reasoning tells you how you can generalize those situations.

AJAX

On the Ajaxian blog...

Google is the science fair of Ajax.

Live Action

James Roberston...

The nice thing is that I could experiment on live data in a running application. Here's a screenshot of the resulting inspector...

Tuesday, May 10, 2005

Navigation in Avalon

Ed Kaim writes about Avalon...

If you look at how the Web works, it's a "Web" because of the way you can hop from one site to another and criss-cross your way from anywhere to anywhere else. The integration isn't complex--it's basically HREFs, POSTs, and GETs. What these enable, however, is a way to write large systems to address business needs in such a way that they are really a set of smaller building block applications that can be glued together (often dynamically).

In contrast, Windows client programming today (Win32, .NET, J2SE, whatever) has a programming model that is much less conducive to integration... While there are tons of sexy features coming in Avalon, my money is on navigation as the single most important feature.

Monday, May 09, 2005

Greasemonkey and the Treaty of Orlando

Babak Nivi suggests...

Greasemonkey is to websites what inheritance is to objects in object-oriented programming.
But of course this is not correct. 8^)

As per Henry Liberman, this is clearly a delegation-based approach using web sites as prototypes.

(via Sam Ruby)

Impeachment Time

Greg Palast, former columnist for Britain's Guardian papers, author of the New York Times bestseller, The Best Democracy Money Can Buy, writes...

Now sharp readers may note they didn't see this memo, in fact, printed in the New York Times. It wasn't. Rather, it was splashed across the front pages of the Times of LONDON on Monday.

But in the US, barely a word. The New York Times covers this hard evidence of Bush's fabrication of a casus belli as some "British" elections story. Apparently, our President's fraud isn't "news fit to print."

The Republicans impeached Bill Clinton over his cigar and Monica's affections. And the US media could print nothing else.

Now, we have the stone, cold evidence of bending intelligence to sell us on death by the thousands, and neither a Republican Congress nor what is laughably called US journalism thought it worth a second look.

My friend Daniel Ellsberg once said that what's good about the American people is that you have to lie to them. What's bad about Americans is that it's so easy to do.

Sunday, May 08, 2005

Trouble Ahead

...or below, depending on the metaphor.

Warren Buffett and Charles Munger, via Philip Greenspun...

Some people seem to think there's no trouble... just because it hasn't happened yet. If you jump out the window at the 42nd floor and you're still doing fine as you pass the 27th floor, that doesn't mean you don't have a serious problem.

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.