July 23, 2007

IronRuby pre-alpha drop and Visual Studio 2008 Beta2 in few days

 John Lam announced the very first pre-alpha drop of IronRuby - Microsoft open source (!) implementation of the Ruby language, licensed under Microsoft Permissive License. This release contains early bits of Ruby implementation for .NET based on the DLR(Dynamic Language Runtime), you actually have to build it if you want to ...

May 15, 2007

Compiled XSLT decompiler?

I was reading Scott's post on Reflector Addins and had this idea... Now (well, not now but in the next .NET version - Orcas) that XSLT can be compiled into dll, it must be time to think about XSLT decompiler (and appropriate Reflector addin of course). I believe that must be ...

November 8, 2006

C# Future Directions: Ruby

Remember that catchy RubyCLR motto? Now C# (Anders Hejlsberg) is playing catch up talking about automatic properties: public string Bar { get; set; }Above is meant to be translated by a compiler into private string foo; public string Bar { get { return foo; } set { foo = value ...

June 21, 2006

Rotor 2.0

This is old news, but I somehow missed it so I'll post for news-challenged like me. Microsoft has released "Shared Source Common Language Infrastructure 2.0" aka Rotor 2.0 - buildable source codes of the ECMA CLI and the ECMA C#. This is roughly .NET 2.0 sources with original comments. Priceless ...

May 12, 2006

On experimenting with LINQ CTP without screwing up Visual Studio (C# only)

LINQ May 2006 CTP installs C# 3.0 compiler and new C# language service into Visual Studio 2005. New syntax, keywords, Intellisense for extension methods and all that jazz. This essensially disables native C# 2.0 compiler and C# language service. If you installed LINQ on Virtual PC - big deal. But ...

November 29, 2005

Support NDoc project!

I've been asking for help on getting NDoc working with .NET 2.0 recently. I was lucky enough and Kevin Downs, the developer of NDoc sent me an alpha version of the next NDoc release that was good enough for generating Mvp.Xml API documentation. And that unexpected problem made me realize ...

November 22, 2005

Ndoc for .NET 2.0 help anyone?

I'm stuck one step before releasing Mvp.Xml library v2.0 for .NET 2.0. I can't generate API documentation, because NDoc doesn't support .NET 2.0 yet :( Apparently NDoc wiki contains instructions how to get it working with .NET 2.0, but the wiki seems to be down and the google cache is ...

November 1, 2005

"Does Visual Studio Rot the Mind?" by Charles Petzold

I can't refrain myself from linking to this wonderful "Does Visual Studio Rot the Mind?" paper by Charles Petzold. Sorry. That's gonna be another good source of citations. ...

October 28, 2005

Migrating from Hashtable to Dictionary<K,V> - beware of a difference in the indexer behavior

I'm migrating lots of code to the .NET 2.0 nowadays and wanted to warn my readers about one particularly nasty migration issue. When moving from Hashtable to Dictionary<K, V> look carefully at the indexer usage - there is a runtime breaking change here. With Hashtable when you do myhashtable[mykey] and ...

October 27, 2005

PDC 2005 videos online

Microsoft put hundreds of hours PDC 2005 videos online at http://microsoft.sitestream.com/PDC05. Here is a list of XML-related and others interesting presentations worthwhile watching IMHO. ...

September 13, 2005

C# 3.0 chat with C# team

That's an interesting chat: C# 3.0 Language Enhancements Description: Can't attend PDC but still want to talk to the C# team? This chat is your chance! Join the C# team to discuss the newly announced C# 3.0 features like extension methods, lambda expressions, type inference, anonymous types and the .NET ...

September 8, 2005

Little known Visual Studio facts

Here are some amazing facts about Microsoft Visual Studio: Visual Studio 2005 will have 2700 commands that come from Microsoft alone, 800 of them - shared ones Visual Studio is well factored into 250 basic packages Visual Studio is the base for 36 SKU's Visual Studio 2003 shipped with 358 ...

June 11, 2005

Microsoft Certificaion: Second Shot Offer has been extended through August 2005

Good news for those who missed the opportunity to retake a Microsoft Certificaion exam for free - the Second Shot Offer has been extended through August 2005. ...

May 25, 2005

70-316 Exam: Passed. Got MCAD.

So yesterday I passed 70-316 exam ("Developing and Implementing Windows-based Applications with Microsoft Visual C# .NET and Microsoft Visual Studio .NET"). Slack preparation during a week, bad-surprizingly too many questions on darned DataSets, but anyway I got 900 out of 1000. Now that I passed these three exams (70-315, 70-316 ...

April 9, 2005

Visual Studio 2005 Beta2 in just 16 days?

Hey, just look at this. It says Visual Studio 2005 Beta2 will ship April 25, in just 16 short days and nights. Great. After Visual Studio .NET and Visual Studio .NET 2003 it's third version and it will rock not only according to the third version law. I especially enjoy ...

March 30, 2005

Happy resource wasters

The day can't go well when it starts with such. That's really sad to see. The guy, who "used exceptions quite extensively to pass messages from the database all the way to the client", tested (no, "tested") cost of throwing exceptions in .NET on his desktop using such "test": Sub ...

January 3, 2005

Open-source license woes with using NAnt

We've been planning to use NAnt in our product for running customizable scripts and almost convinced our boss to go for it (IBM's Websphere server where all server automation is implemented via Ant is good argument here). But unfortunately we've found out that Ant and NAnt have different licenses. Ant ...

December 16, 2004

On Introduction to MSIL by Kenny Kerr

Kenny Kerr has posted another instalment in his amazing "Introduction to MSIL" blog series. It's about brilliant for-each construct, which was introduced by Visual Basic and now adopted by VB.NET, C#, C++ and even Java. Worth reading. Besides I very like that idea of learning from blogs - you know ...

December 2, 2004

Don't miss chat with C# IDE Team today

C# Chat: The C# IDE Have some questions about expansions, intellisense, or type colorization? Have some suggestions for or comments about refactoring support? Join the C# IDE team to discuss the past, present and future of the C# IDE. December 2, 2004 1:00 - 2:00 P.M. Pacific time Add to ...

November 28, 2004

Re-throwing exceptions - a subtle difference between Java and .NET you better be aware of

Here is what I learnt from Jackie Goldstein's talk on .NET Worst Practices at the .Net Deep Dive conference in Tel-Aviv last Thursday. There is a subtle, but hugely important difference between how .NET and Java re-throw a caught exception and I missed that somehow when been learning .NET. Not ...

November 7, 2004

Imprinting on "randomness"

Well, that's just a simple level 100 quiz aiming to imprint "standard random number generators are not really random" program to those who still lack it. What will produce the following C# snippet? System.Random rnd = new System.Random(12345); System.Random rnd2 = new System.Random(12345); for (int i=0; i<1000; i++) if (rnd.Next ...

October 31, 2004

Is System.Net.FileWebResponse class so limited WRT to content type?

I got a problem. It's .NET problem. In XInclude.NET I'm fetching resources by URI using WebRequest/WebResponse classes. Everything seems to be working fine, the only problem is as follows: when the URI is file system URI, the content type property is always "application/octet-stream". Looks like it's hardcoded in System.Net.FileWebResponse class ...

October 14, 2004

F# Compiler Preview

Interesting news from Microsoft Research: The F# compiler is an implementation of an ML programming language for .NET. F# is essentially an implementation of the core of the OCaml programming language (see http://caml.inria.fr). F#/OCaml/ML are mixed functional-imperative programming languages which are excellent for medium-advanced programmers and for teaching. In addition ...

September 26, 2004

Wesner Moise on Enums and Performance

Wesner Moise (.NET Undocumented) writes on enums perf in .NET. While enums are value types and are often recognized and treated like standard integral values by the runtime (in IL, enums and integers have almost no distinction), there are few performance caveats to using them. Enumerated types are derived from ...

August 19, 2004

Real-world puzzle - Generic syntax for ASP.NET

Mikhail Arkhipov is trying to come up with any reasonable syntax for expressing generic controls in future versions of ASP.NET (he doesn't think it will be in Whidbey). So far all of them look plain ugly or unextendable (e.g. WRT to multiple types), needless to say malformed according to XML ...

August 15, 2004

Wesner Moise on Whidbey Hashtables

Wesner Moise (.NET Undocumented blog) compares old good .NET 1.X System.Collections.Hashtable and brand new Whidbey Dictionary<K,V>. Interesting. In short: New collision elimination strategy - chaining instead of probing. Yeah, array based linked list for each bucket. Allegedly it doubles perf! Who said linked lists are just interviewers' toy? As a ...

July 4, 2004

VSIP SDK 2005 Beta 1 released

Oh boy, what a month. Here is another juicy release I wish I had any free time to dig in: VSIP SDK 2005 Beta 1. ...

May 13, 2004

Mono beta1

Mono project (an open source implementation of the .NET framework for Linux, Unix and Windows) reached Beta1 stage. They say Mono 1.0 can be released this summer already. Now to funny part. I've been reading Release Notes while downloading the release and found myself in the contributors list :) Well ...

March 25, 2004

Visual Studio 2005 Community Technology Preview is here

Visual Studio 2005 Community Technology Preview March 2004 - Full DVD available for MSDN subscribers! ...

February 10, 2004

DevDays 2004 Israel

It's been Microsoft DevDays 2004 in Israel today. Well, DevDay actually. Here are the impressions I got there: One has to get up earlier to not miss the keynote. VS.NET has cool PocketPC emulator. Code Access Security is omnipotent. Lutz Roeder's .NET Reflector may hang out in the middle of ...

January 27, 2004

msdn.microsoft.com/data

MSDN starts new Data Access & Storage Developer Center, msdn.microsoft.com/data, "the home for developer information on Microsoft data technologies from MSDN" (via Chris Sells). Great, worth to subscribe. List of related bloggers (indispensable attribute of any portal nowadays) - http://msdn.microsoft.com/data/community/blogs. Stars like Dino Esposito, Mike Gunderloy, Andrew Conrad, Michael Rys ...

December 11, 2003

What's going on with GotDotNet?

First they have closed blogs. Now Dare's moved RSS Bandit project to SourceForge. Hmmm... ...

Uroboros snake XSLT

Today I felt the Uroboros snake breathing just in my cubicle when I realized XSLT is able to write output to the input tree. Funny, huh? XmlDocument doc = new XmlDocument(); doc.Load("input.xml"); XslTransform xslt = new XslTransform(); xslt.Load("test.xsl"); XmlNodeWriter nw = new XmlNodeWriter(doc.DocumentElement, false); xslt.Transform(doc, null, nw); nw.Close(); This transformation ...

November 12, 2003

One more surprise from Longhorn team - OPath query language

Just found new beast in the Longhorn SDK documentation - OPath language: The OPath language is the query language used to query for objects using an ObjectSpace. The syntax of OPath also allows you to query for objects using standard object oriented syntax. OPath enables you to traverse object relationships ...

November 10, 2003

"How to XSLT CSV file" revisited

Well, it's extremely well-chewed topic well-covered by many posters, but provided people keep asking it I feel I have to give a complete example of the most effective way (IMO) of solving this old recurring question - how to transform CSV or tab-delimited file using XSLT? The idea is to ...

November 6, 2003

Dreams come closer

Seems like old dreams about deep extending VisualStudio.NET up to adding new languages, editors and debuggers without funny-not-for-me COM programming but using beloved C# finally come true! Microsoft is inviting beta testers to VSIP Extras Beta program. The killer feature: .NET Framework support. Interop assemblies are provided to allow VSIP ...

November 4, 2003

Rest in peace, DOM

While Don Box is declaiming of the VB glory, Mark Fussel is busy with quite opposite bussiness - he's reading the burial service over XmlDocument aka DOM, worth to quote as a whole: The XML DOM is dead. Long live the DOM. Dearest DOM, it is with little remorse, to ...

November 2, 2003

nxslt 1.3 released

So, nxslt version 1.3 is at your service. New features include: Support for XML Inclusions (XInclude) 1.0 Candidate Recommendation. Done by incorporating XInclude.NET library into nxslt. XML Inclusions are processed in both source XML and XSLT stylesheet, by default it's turned on and can be disabled using -xi option. Improved ...

September 18, 2003

XInclude.NET 1.0

Today is the day, I'm glad to announce XInclude.NET 1.0 release. Download it here. For those who have no idea what XInclude.NET is: XInclude.NET is free open-source implementation of XInclude 1.0 Candidate Recommendation and XPointer Framework Recommendation written in C# for .NET platform. XInclude.NET supports XPointer element() Scheme, XPointer xmlns ...

September 16, 2003

Back to beloved plumbing

Now it's time to come back to my beloved XML plumbing - XInclude and XPointer. A bit of polish and tomorrow I'm going to release XInclude.NET 1.0. Changes since 1.0beta - XPointer xpointer() schema support (XPath subset only), bug fixes and minor performance improvements. Along with that I've started an ...

September 9, 2003

Sweet piece of code

//Whoohaa! XPathExpression expr = nav.Compile("set:distinct(//author)"); expr.SetContext(new ExsltContext(doc.NameTable)); XPathNodeIterator authors = nav.Select(expr); while (authors.MoveNext()) Console.WriteLine(authors.Current.Value); EXSLT's set:distinct in XPath-only selection. Sweet.Coming soon, watch announcements! ...

August 31, 2003

Magnetic power of Mono

In related news - yesterday I've been given Mono CSV commit access, thanks to Ben and Miguel. Seems like I'm the first Oleg amongst Mono guys, so my account is just "oleg". Now I desperately need one more hour in a day, it's a pity the Earth is so close ...

August 27, 2003

Effective in-memory document validation

Am I right that it's impossible to validate in-memory XmlDocument without serializing it to string and reparsing? XmlValidatingReader requires instance of XmlTextReader and what's worse it uses its internal properties, not exposed as XmlTextReader public API, so that won't work even if one would provide fake instance of XmlTextReader, which ...

August 24, 2003

id() function and XML Schema

According to XPath data model an element node may have a unique identifier (ID), which can be used then to select a node by its ID using XPath's id() function and to navigate using XPathNavigator.MoveToId method. Querying by ID is extremely effective becuse in fact it doesn't require traversing the ...

August 17, 2003

Document-free XPath compiler

An interesting question has been raised in microsoft.public.dotnet.xml newsgroup: how to compile XPath expression without a XML document at hands? XPathNavigator class does provide such functionality via Compile() method, but XPathNavigator is abstract class hence this functionality is available only to its implementers, such as internal DocumentXPathNavigator and XPathDocumentNavigator classes ...

June 23, 2003

I'm published at MSDN

This weekend I was completely unplugged, my wife took me away of computers and we drove to Tiberias. No laptop, no internet, just two days of swimming in the Sea of Galilee aka Kineret and fish-eating. It was great. Apparently at the same time my article I was talking about ...

June 4, 2003

nxslt 1.2 released

So version 1.2 of nxslt released. Changes since 1.1: built-in support for 60 EXSLT extension functions (huge thanks to Dare) support for custom extension functions minor bug fixes Built-in support for 60 EXSLT extension functions (yes, with conformant names :), full list of supported functions: EXSLT - Commonexsl:node-setexsl:object-typeEXSLT - RegExpregexp:testregexp:matchregexp:replaceEXSLT ...

June 2, 2003

Chris Brumme on application domains

New revelation from Chris Brumme, now about AppDomains. A must reading. ...

May 29, 2003

On implementing custom XsltContext when extending XPath

Here is another easy-to-solve-when-you-know-what-is-wrong problem. It took me couple of hours to find the solution, so I wanna share it. Hope it'll be useful to anybody. The problem. When adding custom XPath extension functions as described in "HOW TO: Implement and Use Custom Extension Functions When You Execute XPath Queries ...

May 20, 2003

On returning nodeset from XSLT extension function

Update: This hack is about .NET 1.X. In .NET 2.0 you don't need it. In .NET 2.0 with XslCompiledTransform class you can return a nodeset as XPathNodeNavigator[]. As all we know, unfortunately there is a confirmed bug in .NET Framework's XSLT implementation, which prevents returning a nodeset from an XSLT extension ...

May 18, 2003

XInclude.NET 1.0beta released

Just released XInclude.NET 1.0beta. Changes since 1.0alpha: Support for XPointer framework, shorthand pointer, element(), xmlns() and xpath1() schemas Minor bug fixes So enjoy. ...

May 15, 2003

Hacking method names

Sometimes at rainy days of our life we can found ourself looking for a way to create something impossible, say a method containing dash in its name ;) Well, if it seems to be impossible in one reality, try another one. It's impossible in C#, but it's possible in ...

May 13, 2003

Plumbing XPointer

I've implemented XPointer support (shorthand pointer, xmlns(), element() and xpath1() schemas) for the XInclude.NET project. (Btw, I'm wondering if XPointer may be useful not only in XInclude context?) It was really fun and good exercise. Here are some details: Parsing. XPointer grammar is actually one of the simplest and ...

May 11, 2003

How to check XML whitespace char

Working on XPointer parser for the XInclude.NET project I just realized there is no way (if I'm not mistaken) in .NET to check if a character is XML whitespace character. Plus all that functionality needed when parsing XML lexical constructs. No big deal, had to resort to old java ...

May 5, 2003

XmlReader V2

More good news: as Joshua Allen has confirmed, they are working on making XmlReader easier to implement. Primarily by "making some stuff that is currently abstract virtual". I look forward to see it. ...

On xml:base attribute in XIncludingReader again

Gudge thinks it's better to expose synthetic xml:base attribute as first one in order to solve access-by-index problem. Sounds convincing. I actually didn't implement index-based access yet, but only access by navigational methods MoveToFirstAttribute()/MoveToNextAttribute()/MoveToAttribute(). Last one is obvious, and in first and second ones my logic was as follows ...

May 4, 2003

On synthetic attributes in XmlReader

Gudge is mediatating on exposing synthetic attributes in XmlReader. Here are some details on how I've implemented synthetic xml:base attribute in the XIncludingReader. List of members implementing the logic: MoveToAttribute(), MoveToFirstAttribute(), MoveToNextAttribute(), ReadAttributeValue(), HasValue, IsDefault, Name, LocalName, NamespaceURI, NodeType, Prefix, QuoteChar, MoveToNextAttribute(), ReadAttributeValue(), Value, ReadInnerXml(), ReadOuterXml(), ReadString(), AttributeCount, GetAttribute(). It's ...

May 1, 2003

XInclude.NET 1.0alpha released

I've released first alpha version of XInclude.NET library today. Once I got xml:base working and meekly passed through XInclude Conformance Test Suite with almost no fails I decided to release this stuff. There is still plenty room for optimizations and XPointer is still not supported, anyway I like "release ...

April 20, 2003

On MultiXmlTextWriter, the article and plans

According to GotDotNet download statistics my MultiXmlTextWriter class has been downloaded 398 times, while last version of nxslt utility, which includes it to support multioutput XSLT - only 91. Hmm, looks like people prefer a component to build own solutions rather than old-fashioned versatile command line tool (not really ...

April 9, 2003

On XPathNavigatorReader idea

Don Box's Spoutlet: In the interest of generality, Simon asks if there is an XmlReader implementation that traverses an XPathNavigator. Such implementation seems to be trivial, but an interesting point is that such XPathNavigatorReader could easily give xpath1() XPointer schema support for our XInclude.NET project! And if I'm right ...

April 8, 2003

On XInlcude.NET project again

Kirk Allen Evans's asking hard questions: Should there be an XIncludeNodeList implementation that is the product of the merged Infosets? Or is this irrelevant since it would only apply to a fully-loaded DOM instance, which should already have been loaded? I believe XInclude should keep low level of XML processing ...

April 6, 2003

More XSLT intellisense for VS.NET

Rambling in the blog space, found Alexis Smirnov's blog and there a link to quite interesting article named "Xslt Transformations and Xslt Intellesense within the .NET IDE" by Doug Doedens. It's about how to make XSLT authoring easier and more convenient in Visual Studio.NET. That sounds similar to what ...

March 31, 2003

nxslt 1.1 released

I have released nxslt version 1.1. nxslt is .NET XSLT command line utility, written in C#. Timings are now more accurate, I'm using System.Diagnostics.PerformanceCounter class now. Two new features: custom URI resolver and multiple output. First one is trivial - it's now possible to provide a resolver class name to ...

March 27, 2003

On reading/writing XML in .NET

Dino Esposito has published a quite comprehensive article, named Real-World XML: Manipulate XML Data Easily with Integrated Readers and Writers in the .NET Framework in May MSDN mag issue. While reading the article two things caught my eye - usual negation of SAX usefulness and another API quirk, which ...