I have been working on a project with the National Labs over the past several months. A central element of that work has been an effort to bring much of the information and computatiom power of the Labs into a Service Oriented Architecture paradigm and the Semantic Web constructs are at the heart of that part of the work.

Not being that familiar with the Semantic Web constructs, I embarked on a concerted effort to teach myself about it. So I have read through several books. But, for me, there is no substitute for doing some actualy programming on a topic to really do a "deep dive" into the material.

So I latched onto Segara, Evans and Taylors' "Programming the Semantic Web" (published by O'Reilly. I like O'Reilly's books, in general, and had some really good learning on their similar book "Programming Collective Intelligence."

I am a Perl programmer, through and through, and have been laboring with trying to convert the Python constructs that seem so prevalent in these SOA, Semantic Web, and Web Data Minimg "tutorials".

Out of this last few months' efforts, two questions have emerged for me.

First, why is Python so prevalent in this genere of discourse? What makes Python so preferred in the world of Collective Intelligence, Semantic Web, etc.?

Second, why is Perl so conspicuously NOT involved in those domains? I have searched extensively in CPAN and we only have a tiny handful of modules. Similarly, there are virtually no books on the topics that use Perl or are Perl-oriented.

Perl seems like an absolute natural programming language for these types of applications. I have tought myself enough Python that I don't have to struggle too hard when learning from the books. That progress learning Python, however, has taught me that I'm hard pressed to see or know why Python would be any better than Perl. Superficially, it seems that Python may be a little more compact (with constructs like its List Comprehensions); but my experience so far is that it is no easier to understand or read than obfuscated Perl which can be just as compact...and just as obscure. I take exception to the assertion in all of those books that "Python is used because it is so naturally understandable"; I don't see that at all.

So I'm curious (knowing that quite a few of you know Python much beter than I do and you all, here in the Monestary know Perl, of course) if anyone can explain the predilection for Python for those types of applications...and the dirth of Perl in them.

Just curious.

UPDATE: I guess I should know better than to post just before going away for a while. I really appreciate all the comments, observations, and contributions to this inquiry. I will try to go through, shortly, all of the responses and make some comments and thank each of you. But before I do that I thought I should follow up with a discovery that I made not long after I posted this.

I was rummaging around on CPAN trying some different keywords than I had used previously. As one respondent noted, I stumbeled upon the RFA keyword (a more seasoned Semantic Web affectionado would probably have thought that RFA would be obvious; but I being the numbie to the semantic web, not thought of it).

Turns out that there is a whole plethora of modules related to that keyword and all are rich in semantic web support.

So I eagerly went about downloading and installing (or trying to install) the most useful to my learning purposes (RFA::Core, RFA::Redland, RFA::Query, and a couple of others). I am not a stranger to having to install, manually, modules from CPAN so even though none of them had packages that were ActiveState Perl Package Manager compatible modules) I embarked upon manually installing them on my Windows XP machine.

Most of the supporting modules installed just fine; but the main ones (e.g., RFA::Core, RFA::Query, etc.) failed. Each was missing some key microsoft .dll's...so I went about updating and installing what was supposedly necessary. Then the installs proceeded to fail due to missing tools that...according to the on-line net groups...appear to be unique to unix (and unix-like) systems.

So while it appears that CPAN does, indeed, have a pretty rich semantic web toolset, it looks like I can access and use none of them.

For what it's worth, while I am at best a very, very newbie to Python, when I try to code the examples from "Programming the Semantic Web" in Python, I have similar problems and cannot get most of the examples to work in Python, either.

UPDATE 2:My Bad! I erroneously referred to those CPAN nodules as RFA::xxxxx...that should've been RDF::xxxxx. "RDF" is "Resource Description Framework"...pretty much the very core of the "Semantic Web". Don't know where I got "RFA"...must've been been slip of my aging mental cogs.

ack Albuquerque, NM
  • Comment on Meditating on Perl, Python and the Semantic Web

Replies are listed 'Best First'.
Re: Meditating on Perl, Python and the Semantic Web
by bobf (Monsignor) on Dec 19, 2009 at 16:20 UTC

    Interesting observation. I am just starting to dip my toe into this area and, in fact, "Programming the Semantic Web" is sitting (currently untouched) on my desk.

    While I cannot comment on the Perl vs. Python question, I have been poking around CPAN and I found several modules related to the semantic web. I hope others can add to this list.

      Thank you. As I just posted in my "UPDATE" to my original post, I, too, found some pretty impressie Semantic Web tools (especially under RDF::xxxx stuff) in CPAN.

      I sort of stumbled upon it by accident as I continued to try different "keywords" on CPAN. I just hadn't thought of looking under RDF...shows just how "newbie" I really am in the Semantic Web business.

      I eagerly embarked on a process of trying to install several of the modules that I thought would help my bridge between what the "Programming the Semantic Web" authors were presenting and what I could do with Perl.

      All looked well until I began to install the main modules (RDF::Query, RDF::Core, etc.). Not a single one would install successfully (though many of the lesser, supporting modules did just fine). As best as I can tell, they are all well suited for use on Unix (or Unix-like) systems but don't work well (or at all) on Windows machines (at least on my Windows XP machine).

      So now I'm back to frustration.

      But, on the up side, I am re-encouraged to see that Perl is well entrenched in the "Semantic Web" business. That restores my sense of "balance" as Perl and the "Semantic Web" (no matter any particular opionions one way or the other about the Semantic Web) seem such natural partners.

      Again, thanks so much for your reply. Good luck in your own travels regarding the Semantic Web.

      ack Albuquerque, NM
Re: Meditating on Perl, Python and the Semantic Web
by Jenda (Abbot) on Dec 19, 2009 at 10:11 UTC

    Could it be that Perl programmers prefer to actually do actual work? Instead of showing off in yet another iteration of the "computers will understand everything" hype? I wonder what will be the next name after "Semantic Web" dies off.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Sentimental touch you web? :D

      Interesting observation/comment. There is a serious part of me that truthfully completely agrees with the sentiment.

      In fact, one of the curious things I am finding while working my way through "Programming the Semantic Web" is the almost religous compulsion of the author (and it is not limited to the authors of that book...I have been working through a couple of other Semantic Web resources) to "hype" what I can only describe as an almost "holy grail" committment to the Semantic Web and its ability to "enable machine digestion and comprehension" of information.

      I remember (and I'm sure I'm dating myself) when "relational databases" were the "holy grail" of information management. This smells very much like the "hype" I remember back then, too.

      However, while that "hype" tends to turn me off; I have seen and continue to see some pretty impressive and worthy applications. The flexibilty, while it comes at a pretty big price, is...at least for me...a relief from years of having tried to help folks cope with very fragile and "in concrete" data base structures that needed to chage to a new structure. On that basis alone, I am seeing some definite value to the semantic web architecture.

      But...and here is, for me, the thing that makes what you've alluded to even more worrisome. The original concept encapsulated information in the holy "triples" framework and I have seen some impressive and pretty terrific appliations developed around that paradigm (to use an already overused term). But apparently, the magic "triples" are being driven to be "quadruples", "femtuples", etc.

      My experience tells me that a good indicator that we haven't found that "holy grail" yet is when the current contender has to grow and grow to handle more and more complex situations.

      I come from an old school that believes pretty strongly in Occum's Razor.

      So I suspect that we "aren't there yet". But, at the same time, if I get past the hype, I can see some pretty impressive advantages and applications for the basic concept of the Semantic Web.

      Thanks for your comment. I respect it a lot.

      ack Albuquerque, NM
Re: Meditating on Perl, Python and the Semantic Web
by LanX (Cardinal) on Dec 19, 2009 at 22:06 UTC
    Scholars tend to prefer Python because it is (seems?) more monolithical and orthogonal whereas Perl is more a fusion of different well known languages and concepts.

    It's like comparing a lego robotı versa Frankenstein's creature²...

    And scientist brains are - for good reasons - trained to think lego, they have problems to cherish organic approaches like sewing Sed legs, Bash torso and C arms together.

    So whats missing is a "lego interface" for Perl to convince this group³ ... ;-)

    Cheers Rolf

    (1) Batteries included
    (2) Baron Larry Frankenstein is Victors grandson... ;-)
    (3) activated with  use super::extra::hyper::strict; or  use oneandonlyoneway; or simply use anal;

      Actually not correct. At least, perl is widely used in bioinformatics.
        Actually I said "tend to prefer"...

        Cheers Rolf

        UPDATE: Guess which other language is also very strong in bioinformatics ...

      Master!

      May I introduce my bride Ruby, to you ? ;-)

        Hmmm...I've been curious about your "bride" for some time. But I have yet to give her the due consideration that she commands. She seems to crop up everywhere around me...and I know not why. I guess the muses have yet to kiss me regarding that siren. Your response urges me, perhaps, to reconsider.

        ack Albuquerque, NM
      llancet makes a good point but curiously, I think you do, too.

      I actually began my study of Perl using O'Reilly's bioinformatics book...before turning to the O'Reilly's "Learning Perl". Even though I turned to "Learning Perl" as my preferred "tutor", working my way throught the bioinformatics book was both instructive adn acutally built a passion in me for Perl that I might not have found othewise. It appealed to the "scientist" in me in a way that I can't describe...not that I'm a "scientist".

      On the other hand, thinking to your comment, LanX, I have to say that I see a very, very strong tendancy (at least at the National Labs) to gravitate to Python. I have talked to a few of their scientists and they tend to agree with you...somehow Python resonates with them more than Perl (though only one or two can claim any real familiarity with Perl...so maybe that points to some bias of unfamiliarity rather than anything really to do with the languages).

      One thing that stikes me as curious is that there seems to be an opinion amongst those that I've talked to, to reinforce what I've seen in "Programming the Semantic Web" and "Programming Collective Intelligence"...an assertion that Python is "more easy to read...is more 'understandable' that other languages like Perl. I find that curious...maybe because I'm biased towards Perl...as I find Python to be fairly obtuse and anything but "more 'understandable'". But that's just my opinion.

      Thanks for your feedback...and for the feedback from the other responders to your thread.

      ack Albuquerque, NM
Re: Meditating on Perl, Python and the Semantic Web
by MadraghRua (Vicar) on Dec 22, 2009 at 19:29 UTC
    Just out of curiosity, what do you think is in the Python Semantic tool portfolio that is missing from the Perl side? If you had your druthers what would you like to see? I'm interested in semantic web too - been participating with some of the science ontologies. I've been going through similar books to understand how to actually implement an ontology into a tool or an application.

    MadraghRua
    yet another biologist hacking perl....

      Excellent questions. I have been pondering that since shortly before I posted on this topic. Having spent more time searching on CPAN (see my other responses and my UPDTES to my original posting), I have to say that everything I had hoped for and would like appears to, indeed, be there...and more. I am impressed that there are actually several different Semantic Web frameworks (e.g., RDF::Redland and RDF::Stanford, and a couple of others) that seem remarkably complete.

      Now my only problem is that I can't get a single one of those larger frameworks to install successfully on my Windows XP machine.

      I am relieved to see the very significant, deep, and complete support for the Semantic Web concept within Perl; but I am now just frustrated that I can't (yet) access it.

      Thanks, so much for your response.

      ack Albuquerque, NM