Firefox Bug on Long Tooltips

humor, software engineering No Comments »

The true test of Geekdom is whether you can read a bug report on a Saturday evening and find great humor in it. Here is your chance:

Bug 45375 – SeaMonkey-only bug: Long tooltips should wrap instead of being cropped (multiline tooltips)

Look for such “celebrity” appearances as the “xkcd” guy and others. My favorite part, is the bug reporter chiming in each year to wish the bug happy birthday, though there is an inconsistency when he changes the gender of the bug along the way. Maybe I should file a bug on the bug report?

Regular Expressions, Lisp, SQL, Parsing, Domain Specific Languages

code, lisp, philosophy, programming, software engineering, unix 3 Comments »

I’ve been trying to code some more on Project Shelob (my web server) in my spare time. I’m to the point of needing a configuration file, so I can start up the server using different ports and directories for testing. Speaking of testing, I’m also to the point of needing automated test suites. I was refactoring some of the HTTP code, and when I got done, it was far more readable, and there was much rejoicing! Unfortunately, two days later I discovered I had introduced a subtle bug in keep-alive handling during a 404 event. Oops.

Anyway, I decided to use JSON as my configuration language. Simple, accommodated everything I needed, and later I would be able to easily write an AJAX GUI front end to configure the whole thing. Should be slick, right? Not as easy as it might sound. Though I have written parsers by hand, I’d rather not. Ok, so I’m using C++, surely someone has written an easy to use open source library that I can just stick in my rules and get out a nice data structure, right?

Well, kind of. There is Boost Spirit which would do everything that I want it to do, but it also required me translating the EBNF grammar of JSON into Boost’s strange amalgamation of YACC and C++. Okay well and good, but surely there is something better? After some more searching, I run across ANTLR which seems to be the spiritual successor to LEX and YACC/Bison. It even has a nice Java GUI and someone had kindly done the ANTLR rules for JSON. Check out the graphical goodness:

Still, the C++ backend wasn’t fully supported and required installing libraries and was complicated. Not 100% what I needed or wanted. All of which got me thinking about domain specific languages. Most programmers don’t consider it, but SQL and Regular Expressions are good examples of Domain Specific Languages (DSL), as are lex and yacc/bison. Up till now, I’ve frowned on the whole idea of DSLs in general. It had always seemed like bad software engineering practice to invent a new language for each problem. After all, did we really want to learn an entirely new programming language with each assignment? Who is going to maintain the code?

However, the facts point out that you have to learn an entire API anyway, and the API really just layers over what you’re really trying to do with a language that wasn’t quite expressive enough to do the job natively to begin with. Which of course leads me to LISP and through Martin Fowler who makes some good points here:

“One of the most obviously DSLy parts of the world is the Unix tradition of writing little languages. These are external DSL systems, that typically use Unix’s built in tools to help with translation. While at university I played a little with lex and yacc - similar tools are a regular part of the Unix tool-chain. These tools make it easy to write parsers and generate code (often in C) for little languages. Awk is a good example of this kind of mini-language.”

While I’ve been using SQL, regular expressions, awk, lex, and yacc for years, I’d never really classified them in my mind as DSLs. I’ve been well aware of the power of small specialized utilities aggregated together to perform a bigger task and why UNIX has been so successful at this, but I hadn’t made the leap to apply this to my programming. Fowler continues:

“Lisp is probably the strongest example of expressing DSLs directly in the language itself.. Symbolic processing is embedded into the name as well as practice of lispers. Doing this is helped by the facilities of lisp - minimalist syntax, closures, and macros present a heady cocktail of DSL tooling. Paul Graham writes a lot about this style of development. Smalltalk also has a strong tradition of this style of development.”

I’ve heard “grey-beards” and academics talk about the power of Lisp for years, and though I did some trivial functional programming in college, I’ve dismissed the rants of the Lisp guys as nothing more than rants. Today though, the ideas are crystallizing in my head, and I’m excited to explore this more.

Reading about Get Friday on a Sunday

humor, psychology, random 3 Comments »

I read way too much and I visit too many random web sites. Today, I was reading the Wall Street Journal online about outsourcing the more common things in your life.

I do a search for Get Friday, one of the Indian firms mentioned, out of curiosity.

Under unusual services they have provided a couple tidbits:

  • Apologizing and sending flowers and cards on their behalf to spouses or clients.
  • Research on how to tie a shoe lace meant for a kid (client’s son).
  • Talking to parents in our client’s stead.
  • Reading bedtime stories to a young kid on phone

What kind of person thinks it would be a swell idea to have someone in India read your kid a bedtime story on the phone because they are too busy? Although, it would be fun to have everyone route their requests to a personal assistant, just to see the looks on their faces.

Microsoft, true innovation

humor, microsoft, philosophy, unix No Comments »

Wes: check out introducing pipes
Matt: “Those who do not understand Unix are condemned to reinvent it, poorly.”
Matt: I hear vista finally has symlinks. Wake me up when they invent mount points and finally kill drive letters
Wes: I think you can do that somehow.
Matt: yeah sure, and break everything *nerd rage*
Wes: yeah, junction point. junction points (technet)
Matt: “Those who do not understand Unix are condemned to reinvent it, poorly.”

Update, Wes says, if you want to know more see his blogs at:

Smalltalk Inventor Uses Python

python No Comments »
“Alan Kay of Smalltalk fame, friend of Seymour Papert of Logo, champion of One Laptop per Child (OLPC) has become our new keynote speaker (EuroPython by transmission) and provider of new hope to many a would be Python learner. That’s right, Alan has adopted Python as his new pet language”

From: http://worldgame.blogspot.com/2007/04/declassified-letter.html

I was a ghost in the machine until the machine woke up

philosophy, random, video, web 2.0 1 Comment »

Found this video randomly today…. This is why I do what I do. Computers are great.

NVidia Forcedeth Ethernet Full-Duplex

linux, red hat, system administration, troubleshooting 2 Comments »

Just an FYI, the NVidia Gigabit Forcedeth Ethernet driver in Linux uses the ethtool command to get and set the duplex rate and not the mii-tool like many other web pages erroneously state.

The True Reason Halliburton is Evil

humor, network, politics, random No Comments »

They have their very own Class A IP space assigned to them:

See: http://en.wikipedia.org/wiki/List_of_assigned_/8_IP_address_blocks

Understanding Monkey Patching

python, rails, ruby, software engineering 3 Comments »

I’ve noticed one of the problems I have writing this blog is that I prefer to have finished thoughts when I write up something, or at least to have a good understanding of a problem I am working on before committing it to ‘paper’. Unfortunately, this doesn’t lead to many updates. I’ll try to break this habit a little. Recently I heard the term ‘Monkey Patching’ after one of the Seattle Patterns Group meetings, in relation to Ruby on Rails.

A Monkey-Patch (also called Monkey Patch, MonkeyPatch) is a way to extend or modify runtime code without altering the original source code for dynamic languages (e.g. Ruby and Python).

Today, reading a blog entry from Chad Fowler, the term came up again with a Python developer saying:

You can monkeypatch code in Python pretty easily, but we look down on it enough that we call it “monkeypatching”. In Ruby they call it “opening a class” and think it’s a cool feature. I will assert: we are right, they are wrong.

When I read that, I felt almost relieved, because I was thinking the same thing. I can see a limited use for it, but it seems like something you should only do in dire circumstances, that it would be detrimental to good software engineering practices. I can’t prove this, nor am I totally convinced, but Ruby and Ruby on Rails in particular seems to play a little bit fast and loose. I suppose this fits in with Agility, but there does seem to be a mental divide between Python and Ruby people (even though they are really quite close linguistically). To date, I’m much more in the Python camp, but I’ve been deploying Rails apps at work, and I’ll be delving more into Ruby as I go forward. I have heard rumors that Zope does Monkey Patching, and this convinces me even more. Zope has almost single handedly destroyed Python’s reputation at my place of work. Thanks Zope!

Solaris Perl CPAN

perl, solaris, system administration, troubleshooting 1 Comment »

Today, I was searching Google for help installing Perl modules through CPAN using the default Solaris Perl. Sadly, my own blog was one of the search results, and it was no help. I guess this entry is going to make the situation even worse.

So I suppose I should put some useful information:

  • Solaris Perl is compiled using Sun Studio and not gcc
  • You must compile Perl modules with the same compiler Perl was compiled with
  • The Blastwave Perl is also uselessly compiled using Sun Studio and not gcc
  • Sun Studio is now free instead of thousands of dollars and free to download
  • The Sunfreeware Perl Package is compiled with gcc. Go sanity!

I’m sure if you cared enough and wanted to waste time, you could download the Sun Studio compiler just for your handful of Perl modules, or you could download the Sunfreeware package and use gcc, the compiler that God intended you to use. Your choice man. BTW, Sun, you suck.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in