The blog of flying mind

March 23, 2008

The PDC and Application Compatibility, but still no Hosting

Filed under: Software

Also see: Snippet Compiler update

The PDC has happened, which means two things.  I
can post some of my (slightly self-censored) reactions to the show, and I can talk
about what we ve disclosed about Whidbey and Longhorn more freely.  In
this particular case, I had promised to talk about the deep changes we re making
in Whidbey to allow you to host the CLR in your process.  As
you ll see, I got side tracked and ended up discussing Application Compatibility
instead.


 

But first, my impressions of the PDC:


 

The first keynote, with Bill, Jim
& Longhorn, was guaranteed to be good.  It had all the coolness of Avalon,
WinFS and Indigo, so of course it was impressive.  In fact, throughout all the
sessions I attended, I was surprised by the apparent polish
and maturity of Longhorn.  In my opinion, Avalon looked like it is the most mature
and settled.  Indigo also looked surprisingly real.  WinFS looked good in
the keynote, where it was all about the justification for the technology.  But
in the drill-down sessions, I had the sense that it s not as far along as the others.

(more…)

C# 3.0 Lambdas and Type Inference

Filed under: Software

Also see: Merry Christmas Indeed!

Daniel Cazzulino recently wrote a blog entry whose main focus was on building pipelines using iterators in C#. Towards the end he showed a slightly irritating problem in C# 3.0. He wanted to write this:

var transformer = x => new { Original = x, Normalized = x.ToLower() };

However, the C# compiler complains because it doesn’t have enough information to infer the type of the transformer variable. The problem it reports is “Cannot assign lambda expression to an implicitly-typed local variable”.

Daniel doesn’t present a working solution to this particular problem – he ends up structuring his program differently to avoid the issue entirely. But in his discussion of this problem, he proposes something that he describes as ugly, and which, as he points out, doesn’t work anyway:

Func<string, {string Original, string Normalized}> transformer =
 x => new { Original = x, Normalized = x.ToLower() };

This is a direct approach to the problem described in the compiler error message. Can’t assign the expression to an implicitly-typed variable? OK, let’s make the variable explicitly typed. Unfortunately, you can’t specify the type because the expression involves an anonymous type. And that’s the thing about anonymous types: they don’t have names.

(more…)

A web site is not an RSS feed…nor the reverse.

Filed under: Software

Also see: A web site is not an RSS feed…nor the reverse.

There was a time not so long ago when we built “home pages”.  Glorviously extravagant, naievely simple web sites that said who we were, and what we were about.   On those home pages, we put news & announcements, and often, links to static pages of content.   If we wanted to interact with visitors, we included guest books, maybe a simple message board, or just displayed our email address prominantly so others could drop us a note.    All of this was created by hand with the expectation that changes would be few and far between.

Eventually this became such a common approach for building a web site, that we tried to standardize these things.  At the same time, we discovered that a frequently updated web site received more visitors than one that was static or rarely updated.  As a result, content-management features were added to speed updates, forums were improved to include user avatars, threading, and email subscriptions.  Finally, the news & announcements became data-driven, annotated with metadata, and archived for historical review.

The current incarnation of this evoulution is what we call the Weblog.   A weblog is still nothing more than an “about” page, news, articles, and forums, it just has evolved a few new facets and appendages to impower users to interact in new (and hopefully better) ways.   Today, we can hardly imagine a web site without at least 1 RSS Feed.  In fact, most web sites today (nearly) completely revolve around their News & Announcements and the related RSS feed.  Yet, we must remind ourselves that the RSS feed is useless by itself.  It is an evolution FROM a web site, not an evolution OF a web site.  It is nothing more than an alternative delivery vehicle for information, not neccessarily a replacement for the weblog (read web site).

(more…)

YouTube Tries to Get Legal

Filed under: Software

Also see: Cool Silverlight Momentum Video Posted

First, let me offer a great big thank you to Youtube from me and everyone on the internet, including many small businesses. Im just guessing here, but based on reports coming from Compete and others, I don’t think its a stretch to say that Youtube subsidizes the cost of more than half the user generated internet bandwidth consumed in the United States.

Yep, you read that right. If you thought that the internet only used free as an incentive back during the Bubble Years, think again. I’m sure I speak for 10s of millions of us who have hosted videos on Youtube when I offer much gratitude to Google for their generosity. Never could even I have imagined that when they bought Youtube it would be such a costly mistake. If buying a company in order to subsidize the video bandwidth of the internet isn’t crazy.., I dont know what is.

Fortunately for Google, they have unquestionably the world’s best network and most likely the world’s lowest bandwidth costs. So if anyone is going to be able to afford that cost, it would be Google.

As long as their stock price doesn’t fall another 50pct that is. At that point even the most forgiving shareholder may ask about the wisdom of subsidizing all things video on the internet. Particularly when they realize that they have forgotten to price in the overhanging risk of the legal copyright challenges still in play against Youtube. Those lawsuits have not gone away, and the risk certainly has not been reduced. They simply are not front of mind to shareholders these (more…)

Silverlight 2 Beta 1 Cross Domain Bug

Filed under: Software

Also see: Sliced Bananas On Opaque Data

I recently ran into what appears to be a bug in Silverlight 2 Beta 1’s handling of cross-domain web service access when using a clientaccesspolicy.xml file. I’m hoping this post might save a few other people the time it took me to work out what was going on here.

Here’s the executive summary: if the web service exposes resources whose URIs contain semicolons, you will not be able to access those resources cross-domain if you’re using clientaccesspolicy.xml. The workaround is to use crossdomain.xml instead.

Now for the more detailed version.

In case you’re not familiar with cross-domain web service access, here’s the basic idea. By default, a web browser won’t let client-side code go connecting to any old web site. Client-side code is allowed to make requests against the web site from which it was originally downloaded, and it should only have access to other sites if those sites opt in.

In pure AJAX sites, this is often achieved using a faintly smelly hack where web services return runnable script rather than simple data. Flash introduced a somewhat more formal mechanism by which a web site can declare that it’s happy to be accessed by client-side code from other domains. Silverlight now supports this feature as of v2 beta 1.

Here’s an example. If your web site offers a resource called /crossdomain.xml containing this:

<!DOCTYPE cross-domain-policy SYSTEM
 \"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">
<cross-domain-policy>
 <allow-access-from domain=\"*\" />
</cross-domain-policy>

(more…)

Data Types a la Carte

Filed under: Software

Also see: Merry Christmas Indeed!

Also see: A VS.NET Macro to Generate Machine Keys.

Also see: Hello world!

Data Types a la Carte. Wouter Swierstra.

This paper describes a technique for assembling both data types and functions from isolated individual components. We also explore how the same technology can be used to combine free monads and, as a result, structure Haskell’s monolithic IO monad.

This new Functional Pearl has been mentioned twice in comments (1 , 2 ), and has now also appeared with comments on Phil Wadler’s blog. Obviously it’s time to put it on the front page.


http://lambda-the-ultimate.org/node/2700

Eriskay: a Programming Language Based on Game Semantics

Filed under: Software

Also see: On the Perils of Wikipedia

Eriskay: a Programming Language Based on Game Semantics. John Longley and Nicholas Wolverson. GaLoP 2008.

We report on an ongoing project to design a strongly typed, class-based object-oriented language based around ideas from game semantics. Part of our goal is to create a powerful modern programming language whose clean semantic basis renders it amenable to work in program verification; however, we argue that our semantically inspired approach also yields benefits of more immediate relevance to programmers, such as expressive new language constructs and novel type systems for enforcing security properties of the language. We describe a simple-minded game model with a rich mathematical structure, and explain how this model may be used to guide the design of our language. We then focus on three specific areas where our approach appears to offer something new: linear types and continuations; observational equivalence for class types; and static control of the use of higher-order store.

In a substantial appendix, we present the formal definition of a fragment of our language which embodies many of the innovative features of the full language.

It’s always interesting to see a new programming language strongly based on some mathematical formalism, because a language gives you a concrete example to match the abstract semantic definitions to, and game semantics is something that I’ve been curious about for a while.

One particularly interesting feature is that the core language has a restricted model of the heap, which controls the use of higher-order store in such a way that cycles are prohibited. This is enforced with a notion called “argument safety”, which essentially prohibits storing values of higher type into fields which come from “outside” the object. This is somewhat reminiscent of the ownership disciplines found in OO verification systems like Boogie, which enforce a tree structure on the ownership hierarchy. It would be very interesting to find out whether this resemblance is a coincidence or not.

(more…)

Binding to .NET Frameworks Assemblies

Filed under: Software

Also see: Java Concurrency, another series on its issues

Also see: Exception Handling in Running a Business

Also see: LoadFile vs. LoadFrom

Also see: Chicago geek dinner 11/22

Also see: Be my Support Group

Also see: Access to old blogs

By “Frameworks assemblies,” I mean the assemblies that ship with the CLR. But, I’m not counting mscorlib.dll , since it’s special in a different way.

With v1.0 SP3 or later, Frameworks assemblies are unified. That means that the version of those assemblies that you request is ignored - you get the version that matches the loaded CLR. This only applies when the assembly is loaded by version - that is, by assembly display name or static reference (AssemblyRef in the CLR metadata).

For example, if the v1.1 CLR is loaded and you request v1.0’s system.dll, then you’ll get the v1.1 system.dll back. If you load it by path from c:\foo\system.dll, however, then you’ll get c:\foo\system.dll back, not the v1.1 system.dll.

Those assemblies are unified because the owners of the code feel that they are so closely tied to the CLR/mscorlib.dll that they should not be loaded with a different version than they were built against. Additionally, there are some cases where they expect that only one copy of the Frameworks assemblies be loaded in a given process.

If the v1.0 (pre-SP3) CLR is loaded, though, you will get the assembly that you ask for. Unification isn’t done for Frameworks assemblies in that version.

Do not rely on this behavior. You should still fully-specify assembly references with the correct version. That’s just good practice, in general. Besides, if your assembly is loaded in a CLR later than v2.0, those references may not be unified,

Live Chat Software: Next generation of Live Chat. On-Demand. Easy-to-Use.

Also see: Single source code base for Silverlight and WPF solutions

Also see: Blogging and Newspapers, a Lesson in How Not to Brand and Market

Also see: Tagspace, Meet Claimspace

Also see: Uniqueness Typing Simplified

Also see: Tagspace, Meet Claimspace

Also see: Silverlight 2 Beta 1 Cross Domain Bug

Also see: A web site is not an RSS feed…nor the reverse.

Also see: Prototypes and Java Config with Spring

Also see: Degrees of optimism in projects

Also see: We Live in an “Open Book” World, the Lie of Information Overload

Also see: App.config Examples

Also see: My Presidential Endorsement:

Also see: Scott Guthrie presents at NDDNUG

Also see: Generics and .NET

Also see: DevWeek 2008 Cross Platform Silverlight Demos

Also see: Cool Silverlight Momentum Video Posted

Also see: Be my Support Group

Also see: Blogging and Newspapers, a Lesson in How Not to Brand and Market

Also see: Infrequent blogging

Also see: Be my Support Group

Also see: Java Concurrency, another series on its issues

Also see: My Presidential Endorsement:

Also see: Music and Movies - Give Away the Soundtrack

Also see: Dare Obasanjo on C# Anonymous Types

Also see: Playing Multiple Simultaneous Sounds in WPF

Also see: xClaims and Microformats

Also see: Prototypes and Java Config with Spring

Also see: Generics and .NET

Also see: Microformats are like RFID tags for the Web

Also see: Degrees of optimism in projects

so you may get unexpected behavior.
http://blogs.msdn.com/suzcook/archive/2003/07/30/binding-to-net-frameworks-assemblies.aspx






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham