[Chicago-talk] MS langs get query language

Andy_Bach@wiwb.uscourts.gov Andy_Bach at wiwb.uscourts.gov
Mon Nov 14 14:41:40 PST 2005


Er, big news, in MS land seems to be:
What do Don and Anders mean by query facilities? Think about having an
SQL-like syntax as a first-class part of C# or Visual Basic. This
SQL-like query could run against in-memory data structures, XML files,
and relational databases. The query results would be enumerable, so
that you could walk through them with existing syntax, like foreach.

The first example Don and Anders give in their overview paper on LINQ
is this:

using System;
using System.Query;
using System.Collections.Generic;

class app {
  static void Main() {
    string[] names = { "Burke", "Connor", "Frank", 
                       "Everett", "Albert", "George", 
                       "Harris", "David" };

    IEnumerable expr = from s in names 
                               where s.Length == 5
                               orderby s
                               select s.ToUpper();

    foreach (string item in expr)
      Console.WriteLine(item);
  }
}

The new classes are in the System.Query namespace, called in by the
second using statement. The new LINQ syntax is the second executable
statement, which fills the variable expr using a query expression,
from s in names where s.Length == 5 orderby s select.ToUpper();. You
can see immediately how that syntax has been inspired by the SQL
SELECT query.

This particular expression uses three of the standard query operators:
Where, OrderBy, and Select. The others are OrderByDescending,
SelectMany, Take, Skip, TakeWhile, SkipWhile, Concat, ThenBy, Reverse,
GroupBy, Distinct, Union, Intersect, Exceptâ?¦ and a lot more, including
conversion operators, equality operators, generation operators,
quantifiers, and aggregate operators, all of which operate on
sequences.

In Visual Basic, the query expression above would be written as:

Dim expr As IEnumerable(Of String) = _
                  Select s.ToUpper() _
                  From s in names _
                  Where s.Length = 5 _
                  Order By s

As you can see, that's even closer to SQL than the C# version.

For those of you fluent in languages like Scheme, the new query syntax
is built on lambda expressions, which have been added to C# 3.0 and
Visual Basic 9.0. If you're not already familiar with lambda
expressions, they're like anonymous methods, only you can pass the
functions around as arguments to other functions. At the
implementation level, lambda expressions can be compiled as either
code or data.


** Read more at http://www.byte.com/documents/byt1132002863923/ **

This seems surprisingly tame - am I missin something?

a

Andy Bach, Sys. Mangler
Internet: andy_bach at wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5932

BPCP Act:  Bankruptcy Prevention and Creditor Protection Act.
Devil's Dictionary, (not) Ambrose Bierce
http://sunsite.berkeley.edu/Literature/Bierce/DevilsDictionary/

----- Forwarded by Andy Bach/WIWB/07/USCOURTS on 11/14/2005 04:39 PM -----

"BYTE Update" <byte at newsletters.sdmediagroup.com> 
11/14/2005 04:35 PM

To
andy_bach at wiwb.uscourts.gov
cc

Subject
BYTE Update






=============================================
||
|| A BYTE Newsletter
||
|| November 14th, 2005
||
|| http://www.byte.com
||
|| A CMP Service
||
=============================================


************************************************************
The Best of BYTE, Volume 3: Number Crunching

Number crunching is to computing what speaking prose is to
talking--we all do it and we all tend to take it for granted. So while
the articles presented in this issue of the Best of BYTE are important
and useful, they also make number crunching seem new and exciting--and
rekindle the sense of amazement we felt when we ran our first FORTRAN
Fibonacci sequence program.

http://newsletters.sdmediagroup.com/cgi-bin4/DM/y/er110FjZC50JSg0DcLY0GN
************************************************************


==== This Week's Table Of Contents =======================

1. INTRO

* Mr. Computer Language Person, Martin Heller: "LINQ"

2. THIS WEEK'S TOP STORIES

* Feature, Charles J. Cohen: "Designing a Gesture Recognition 
System"

* Chaos Manor, Jerry Pournelle: "Don't Steal This Column"

3. IN THE NEWS

* "IBM Dominates Supercomputer Rankings"

4. NEWSLETTER SUBSCRIPTION INFORMATION


- - - - - - - - - - - This Week's Sponsor - - - - - - - - - - - -

The data warehouse project took...

25 weeks, 9 weekends and 7 all-nighters. 
So why is your boss getting the credit? 
Get the respect you deserve - search thousands of Tech Management Jobs:

http://newsletters.sdmediagroup.com/cgi-bin4/DM/y/er110FjZC50JSg0Dcn10GH

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Dr. Dobb's Developer Library DVD: Release 1

Dr. Dobb's Developer Library DVD is a new, fully searchable DVD that 
includes 16 years of Dr. Dobb's Journal, 14 years of C/C++ Users 
Journal, three years of The Perl Journal, nearly four years of Dr. 
Dobb's Sourcebook, and thousands and thousands of lines of source code--
all on one DVD! Search across all magazines for a single term with a 
fast and powerful Java-based search engine, or browse the magazines 
individually in easy-to-read HTML. Regularly $129.95...Now only $79.95! 
Click here to purchase your copy today! 

http://newsletters.sdmediagroup.com/cgi-bin4/DM/y/er110FjZC50JSg0DcMC0G1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. LINQ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

by Martin Heller


As you probably know, Microsoft just launched Visual Studio 2005, SQL
Server 2005, and BizTalk Server 2006. There's so much to tell about
those products that I can't even scratch the surface in one column,
and Microsoft is doing a media blitz, so I'd be wasting my breath. If
you've been following the beta versions, you already know all about
the parts of the products that you use yourself; if you've been
waiting for the final products, well, they're here.

Infragistics NetAdvantage 2005

Major launches like this one are both a marketing opportunity and a
technical challenge for the ISVs who make companion products. Take
Infragistics, for example. With NetAdvantage 2005, Infragistics has
provided a large assortment of enhanced controls for use both in
Windows Forms and Web Forms applications. I've found their controls a
big time-saver in projects. For example, I recently started working on
a market forecasting application for a client. It uses NetAdvantage
controls for the charts, the grids, and for the input controls on the
forms, saving me about 6 months work writing display code and input
range-checking code.

Infragistics has released a new version of this package quarterly for
Visual Studio .NET 2003, while also tracking Visual Studio 2005 betas
with versions of NetAdvantage that are one revision back. It's a huge
job, since Microsoft made some major changes for .NET Framework 2.0.
ISVs not only have to fix their code to be compatible, they have to
take advantage of the new features in a compelling way. Infragistics
seems to be doing that, from the betas I've tried; I'll have more to
say when NetAdvantage 2005 for Visual Studio 2005 is formally
released.

LINQ

The current Microsoft launch makes .NET Framework Version 2.0 the
current supported product. Naturally, the development teams are
thinking about what will go into Version 3.0. One of the most
interesting ideas that has been publicly disclosed so far is the
Language Integrated Query (LINQ) project.

LINQ is the brainchild of Don Box and Anders Hejlsberg, and has been
supported by a number of others on the Microsoft .NET, C#, and Visual
Basic architecture teams. Basically, the idea is to add
general-purpose query facilities to the .NET runtime, with specific
extensions for XML and relational data. These query facilities are
being added to C# 3.0 and Visual Basic 9.0, and technology previews of
these were shown at the PDC in September. I wouldn't be at all
surprised if they were also added to a future version of managed C++,
but I haven't yet seen anything about that.

What do Don and Anders mean by query facilities? Think about having an
SQL-like syntax as a first-class part of C# or Visual Basic. This
SQL-like query could run against in-memory data structures, XML files,
and relational databases. The query results would be enumerable, so
that you could walk through them with existing syntax, like foreach.

The first example Don and Anders give in their overview paper on LINQ
is this:

using System;
using System.Query;
using System.Collections.Generic;

class app {
  static void Main() {
    string[] names = { "Burke", "Connor", "Frank", 
                       "Everett", "Albert", "George", 
                       "Harris", "David" };

    IEnumerable expr = from s in names 
                               where s.Length == 5
                               orderby s
                               select s.ToUpper();

    foreach (string item in expr)
      Console.WriteLine(item);
  }
}

The new classes are in the System.Query namespace, called in by the
second using statement. The new LINQ syntax is the second executable
statement, which fills the variable expr using a query expression,
from s in names where s.Length == 5 orderby s select.ToUpper();. You
can see immediately how that syntax has been inspired by the SQL
SELECT query.

This particular expression uses three of the standard query operators:
Where, OrderBy, and Select. The others are OrderByDescending,
SelectMany, Take, Skip, TakeWhile, SkipWhile, Concat, ThenBy, Reverse,
GroupBy, Distinct, Union, Intersect, Exceptâ?¦ and a lot more, including
conversion operators, equality operators, generation operators,
quantifiers, and aggregate operators, all of which operate on
sequences.

In Visual Basic, the query expression above would be written as:

Dim expr As IEnumerable(Of String) = _
                  Select s.ToUpper() _
                  From s in names _
                  Where s.Length = 5 _
                  Order By s

As you can see, that's even closer to SQL than the C# version.

For those of you fluent in languages like Scheme, the new query syntax
is built on lambda expressions, which have been added to C# 3.0 and
Visual Basic 9.0. If you're not already familiar with lambda
expressions, they're like anonymous methods, only you can pass the
functions around as arguments to other functions. At the
implementation level, lambda expressions can be compiled as either
code or data.


** Read more at http://www.byte.com/documents/byt1132002863923/ **


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2. THIS WEEK'S TOP STORIES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FEATURE: Charles J. Cohen
"Designing a Gesture Recognition System"

Devices controlled by gesture input have commercial applications 
as well as military ones. Cybernet's Charles J. Cohen explains how 
computers interpret non-verbal language.

http://www.byte.com/documents/byt1132000495079/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COLUMN: Jerry Pournelle, Chaos Manor #304, Installment 1
"Don't Steal This Column"

Jerry Pournelle argues that Google's plan to scan books and make 
them available in "snippets" over the Internet probably won't hurt 
book sales--but it will definitely hurt authors.

http://www.byte.com/documents/byt1132001745612/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3. IBM Dominates Supercomputer Rankings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

by Rick Merritt, EE Times


IBM Corp. took top honors in the latest ranking of the world's top 500
supercomputers released Monday (Nov. 14) with its systems taking the
three top spots and five of the top ten slots.

IBM's BlueGene/L system installed at Lawrence Livermore National
Laboratory (LLNL) ranked as the fastest supercomputer in the world at
280.6 TFlop/s, twice the performance the system demonstrated in
earlier rankings. It is the first system to surpass the 100 TFlop/s
mark and is expected to remain at the top of the rankings for some
time.

IBM has been building out the custom cluster architecture at LLNL.
Ultimately it will sport 128,000 custom Power CPUs when it is
completed. BlueGene/L is designed to use less power and require less
floor space than competing supercomputers, in part by its use of very
small individual nodes with only a few custom-built chips.

Another version of BlueGene/L being built at IBM's T.J. Watson
Research Center ranked as the second most powerful computer in the
world at 91.20 TFlop/s Linpack performance. A separate IBM
architecture at LLNL, dubbed ASIC Purple and based on IBM's pSeries
575 servers, took third place on the list at 63.4 TFlop/s.

The Columbia system at NASA/Ames, a cluster based on Intel Itanium
CPUs built by SGI, slipped to the No. 4 spot with 51.87 TFlop/s
performance.

IBM continues to be the dominant vendor on the list with 43.8 percent
of the systems, slightly up from 43.2 percent a year ago.
Hewlett-Packard maintained its second-place standing in the survey
with 33.8 percent of all systems.

IBM's systems represented 52.8 percent of the total installed
performance of computers on the list, compared to 18.8 percent for HP.
No other computer maker captured more than seven percent in any
category.

Intel microprocessors are at the heart of two-thirds (333) of all 500
systems. Eighty-one of the systems used Intel's latest 64-bit Xeon
processors. AMD's 64-bit Opteron processors gained ground with 55
systems using them compared to only 25 systems in the ranking six
months ago.

IBM had the second most popular processor architecture among top 500
systems. Its Power chips appeared in 73 systems.

Clusters continue to be the most popular architecture among systems on
the list with 360 clusters in the current ranking. That's up from 296
clusters a year ago. On the current list, 249 clusters used Gigabit
Ethernet as an interconnect, while 70 used Myricom's Myrinet.

The least powerful system on the list was measured at 1.64 TFlop/s.
That's up from 850.6 GFlop/s for the lowest ranking system one year
ago.

The Top 500 list is compiled by Hans Meuer of the University of
Mannheim, Germany; Erich Strohmaier and Horst Simon of Lawrence
Berkeley National Laboratory; and Jack Dongarra of the University of
Tennessee.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4. NEWSLETTER SUBSCRIPTION INFORMATION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Messages intended for publication in our "Letters to the Editor" area
should be sent to: letters2editor at byte.com

Sending a message to this address constitutes permission to use your
message in part or whole. Please indicate which, if any, of the
following information we may include with your letter:

~ Your real name, as it appears in your message body
~ Your title and affiliation (if applicable)
~ Your e-mail address.

Messages intended for our internal use only--i.e., not for publication
on BYTE.com's web site or elsewhere--should go to: feedback at byte.com

Or, for a more extensive list of BYTE.com staff e-mail, go to:
http://www.byte.com/staff.html

Did someone forward this to you? Would you like to subscribe?
http://www.byte.com/newsletter/

ADVERTISING INFORMATION
For more information on advertising in CMP newsletters,
contact our Web Sales Managers:
Andrew Mintz (978) 897-3035 amintz at cmp.com
Trice Alford (785) 838-7591 talford at cmp.com

BYTE.com
2800 Campus Drive
San Mateo, CA  94403
http://www.byte.com
Copyright (c) 2005 CMP Media LLC.







More information about the Chicago-talk mailing list