The best kittens, technology, and video games blog in the world.

Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Sunday, April 14, 2013

magic/xml gem published

"Cat Scratch Fever!" - Ottawa 2002 by Mikey G Ottawa from flickr (CC-NC-ND)

Once upon a time I built gems for my libraries, but then rubygems site migrated like three times, and I really didn't feel like keeping track with all that, so I stopped doing anything.

Now I pushed magic-xml gem to relevant gem repositories (it has a dash like github repository name).

Apparently bkkbrad made magic_xml (with underscore) gem based on earlier version as well. Which brings me to:

Public service announcement

Everyone, it's time to talk serious business. Ruby community must decide if it wants dashes or underscores in gem name, and it must decide it now.

  • 15578 gems have underscores
  • 17127 gems have dashes
  • 1465 mix both in their name!!!
This is insanity. It's also a pretty safe bet github has something to do with it - I love you guys, but it's really time to get your act together.

I'll be using dashes, since that's what github seems to be promoting, and I tend to put my software on github these days.

Other goodies

A lot of my small utilities depend on magic/xml, so this will allow me to publish them without having to bundle magic/xml library (even it's just one file, very old school).

For now I just pushed lastfm_status program - which does precisely what its name implies - to unix-utilities repository, but I'm sure there will be more, especially once I figure out which of my programs break half of Internet's Terms of Service enough to get banned, and which only a little ;-p

Thursday, July 19, 2012

magic/xml for Ruby on github

Silver Profile at Window - Slightly Blurry 702 x 749 by ♥ Crystal Writer ♥ from flickr (CC-NC-SA)
Making all my old software publicly available on github continues. Now it's time for magic/xml - which can be now downloaded from github here.

I needed to do a few fixes for Ruby 1.9 compatibility - mostly Array#to_s is now Array#inspect, not Array#join, and it works just fine now with either 1.8 or 1.9.

Over all these years I haven't used magic/xml as much as I thought I would. Somehow the XML and XHTML dominance everybody was expecting never materialized, and instead JSON and HTML5 took over. I can't say I'm too unhappy about this development - but magic/xml remains the most convenient way to solve the (now less important) XML problem in Ruby.

I think I might have overdone monkey patching a bit - especially with regards to pattern matching, which in Ruby is pretty hard to extend cleanly due to lack of multimethods (and general massive hackery in Ruby's implementation of it). I'd love it if some future version of Ruby did pattern matching right, but since no other language ever did so (I might write more about it sometime later), it might be too much to hope for.