Home

Advertisement

Clipping: Shakespeare on kernel commits

  • Apr. 29th, 2009 at 9:05 AM
I saw this post from Harald Welte on Google Reader shared by Raphael.
It's like Shakespeare writting a kernel commit message, very funny :-)
In days of old in 2.6.29, netfilter did locketh using a 
lock of the reader kind when doing its table business, and do
a writer when with pen in hand like a overworked accountant
did replace the tables. This sucketh and caused the single
lock to fly back and forth like a poor errant boy.

But then netfilter was blessed with RCU and the performance
was divine, but alas there were those that suffered for
trying to replace their many rules one at a time.

So now RCU must be vanquished from the scene, and better
chastity belts be placed upon this valuable asset most dear.
The locks that were but one are now replaced by one per suitor.

The repair was made after much discussion involving
Eric the wise, and Linus the foul. With flowers springing
up amid the thorns some peace has finally prevailed and
all is soothed. This patch and purple prose was penned by
in honor of "Talk like Shakespeare" day.

Signed-off-by: Stephen Hemminger 

Tags:

A good explanation of Tail Recursion

  • Oct. 22nd, 2008 at 9:19 PM
Chris Smith has a very straight forward explanation of tail recursion:
Tail Recursion is a specialized type of recursion where there is a guarantee that nothing is left to execute in the function after a recursive call. In other words, the function returns the result of a recursive call.

If there is no additional instructions to execute, then there is no need to store the instruction pointer on the stack, since the only thing left to do once the recursive call exits is restore the stack. So rather than needlessly modifying the stack, tail calls use a GOTO statement for the recursion. And once the recursion eventually succeeds the function will return to the original instruction pointer location.

He also uses F# to write the sample code: A succinct, type-inferred, expressive, efficient functional and object-oriented language for the .NET platform.

An appreciation of Arthur C. Clarke

  • Mar. 23rd, 2008 at 1:24 PM
From Google Blog:
"How do you summarize a man like Arthur C. Clarke? ..."
May his views continue to inspire for eons.

New GMail enhancements

  • Nov. 18th, 2007 at 10:56 PM
From the official gmail blog one more clipping tonight:
5 little-known Gmail features you may not yet know about
  1. "Archive and next" shortcut
  2. Share mail searches with friends
  3. Browser navigation and history
  4. Bookmark emails
  5. "Filter messages like this"
URLs to bookmark individual emails and creating filters simply based on one message are my favorite ones.

gmail blog logo

Charles Nutter shows us on his blog that a single line patch on Ruby REXML can increase a lot it's performance.
A little understanding of how it deals with strings and enconding made him to find this little gem of a patch.

It's the Java community enhancing the Ruby code base :-)
Index: lib/ruby/1.8/rexml/source.rb
===================================================================
--- lib/ruby/1.8/rexml/source.rb (revision 4596)
+++ lib/ruby/1.8/rexml/source.rb (working copy)
@@ -1,4 +1,5 @@
require 'rexml/encoding'
+require 'stringio'

module REXML
# Generates Source-s. USE THIS CLASS.
@@ -8,7 +9,7 @@
# @return a Source, or nil if a bad argument was given
def SourceFactory::create_from arg#, slurp=true
if arg.kind_of? String
- Source.new(arg)
+ IOSource.new(StringIO.new(arg))
elsif arg.respond_to? :read and
arg.respond_to? :readline and
arg.respond_to? :nil? and
REXML is...
REXML is a conformant XML processor for the Ruby programming language. REXML passes 100% of the Oasis non-validating tests and includes full XPath support. It is reasonably fast, and is implemented in pure Ruby. Best of all, it has a clean, intuitive API. REXML is included in the standard library of Ruby

the collective (connected) mind...

  • May. 29th, 2007 at 10:14 PM
Google blog clipping: Hot Trends!
And today we're introducing a new toy we are calling Hot Trends. It's a new feature of Google Trends for sharing the the hottest current searches with you in very close to real time. What's on our collective mind as we search for information? What's interesting to people right now? Hot Trends will tell you. At a glance, you'll see the huge variety of topics capturing our attention, from current events to daily crossword puzzle clues to the latest celebrity gossip. Hot Trends is updated throughout the day, so check back often.
Hot Trends aren't the search terms people look for most often -- those are pretty predictable, like [weather] or [games] or perhaps [myspace]. Yes, [sex] too. Instead, the Hot Trends algorithm analyzes millions of searches to find those that are deviating the most relative to their past traffic. And the outcome is the Hot Trends list.

C# Pain Points

  • Mar. 14th, 2007 at 1:57 PM
This blog entry at Artima shows some Pain Points in C# from their users:

These are the replies I found most interesting:

I am more concerned that MS keeps stomping over very excellent .NET open source projects. Half of LINQ really should be NHibernate. NDoc died and microsoft failed to replace it. NUnit should have just been adopted by MS, but instead there is MSTest garbage from Team Suite. And the Enterprise Application Library stuff is really just second rate garbage compared to Castle Project.
Not having the possibility to declare a variable as constant inside a method is probably what I miss the most from Java.
Sure you have const, but it does not work on instances and readonly can only be used on member variables. Maybe I'm just missing out on something, but until someone enlights me, I find this annoying.
  • Visual Studio...*shudder* Even with Resharper, it's only just bearable.
  • No instance-inner classes - sometimes you want more than a single method (anon delegate).
  • Looks like enums have to be integer types - I like the way Java enums are property types and implement interfaces.
  • no equiv of java.util.Set
List, IList, ICollection, Collection etc... these don't align with their more traditional definitions. It would be nicer if they corresponded to the collection classes in java a little bit more obviously.
With C# (standard style), things are a bit mixed up. Namespaces, types, methods and properties tend to all start with an upper case letter. Accessors/getters may be hidden by a property.

Of course, a good IDE will show you all these in different styles and colours too, but VS2005 (shudder) doesn't. Maybe the new VS, but I haven't tried it.
When interop with Win32 / COM isn't main-road-paved, it's ugly and complex.

Tags:

IntelliJ - good times..

  • May. 25th, 2006 at 11:16 AM
A cool demo about IntelliJ IDEA's Javascript Editor. Don't get me wrong, I think Eclipse is terrific, but IntelliJ was the first IDE to actually revolutionize the industry, and must still by now be the best one. If I had a small company of software development (the dream of so much of us...) I would seriously take into consideration the purchase of it.

I'm suspect to talk about IntelliJ because it was really my first great productive tool, I mean really productive as I had the task to develop in Java. My last frustrated experience at the time was with Borland JBuilder. All those several refactorings, clever shortcuts enhancing navigation and exploration of the source code and static code analysis introduced by IntelliJ were more than a shock to me at the time ;)

Eclipse since then has made a nice work to catch up with IntelliJ. And the fact that IntelliJ remains a commercial tool (not free nor open sourced) and still live and competitive is at least worth to mention (those guys must have made something good ;)

Jetbrains has also a nice blog about it.

IntelliJ logo

Latest Month

November 2009
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Tags

Syndicate

RSS Atom
Powered by LiveJournal.com
Designed by Tiffany Chow