Slashdot Mirror


BBC Creates 'Perl on Rails'

Bogtha writes "Long-time users of Perl for their public websites, and having successfully used Ruby on Rails for internal websites, the BBC have fused the two by creating a 'Perl on Rails' that has the advantages of rapid development that Rails brings, while performing well enough to be used for the Beeb's high-traffic public websites. This is already powering one of their websites, and is set to be used in the controversial iPlayer project as well."

49 of 216 comments (clear)

  1. Holy Crap by Anonymous Coward · · Score: 3, Funny

    Good god, did anyone proofread that first sentence? Its almost incomprehensible by normal, english-speaking humans.

    1. Re:Holy Crap by Anonymous Coward · · Score: 5, Insightful

      Strange it may be, but incomprehensible and a run-on it's not.

      "Long-time users of Perl for their public websites," - an appositive
      "and having successfully used Ruby on Rails for internal websites," - another appositive, successfully connected with a conjunction
      "the BBC" - the subject of the sentence (which the appositives are in apposition to)
      "have fused the two by creating a 'Perl on Rails'" - a perfectly fine predicate
      "that has the advantages of rapid development that Rails brings," - with a relative clause
      "while performing well enough to be used for the Beeb's high-traffic public websites." - and another modifying clause.

      In short: it's a sentence. It's grammatical. It's comprehensible. Quit whining.

    2. Re:Holy Crap by Cheesey · · Score: 4, Funny

      Its almost incomprehensible by normal, english-speaking humans.

      Yes, but add a few $'s and %'s in the right places, and it turns into a one-line cross-platform implementation of iPlayer written in Perl. (If your Perl code can be understood by humans without extreme effort, you're just not trying.)

      --
      >north
      You're an immobile computer, remember?
    3. Re:Holy Crap by pdbaby · · Score: 4, Funny

      I don't see the problem...

      understand it easily if longtime perl programmer($self);

      --
      Global symbol "$deity" requires explicit package name at line 2. - If only $scripture started "use strict;"
    4. Re:Holy Crap by coleblak · · Score: 3, Funny

      The short sentences we use nowadays are a more recent innovation. In the past, run-ons were the bloody norm and they totally sucked; people who used them needed to be shot in a most painful and brutal area since they can make it such a bitch to read a paragraph aloud in class when you're thirteen and just wanting to get it over with and go back to looking at the cute girl who sits in front of you.

      --
      77 HITS
      Really Long Off Topic Combo
    5. Re:Holy Crap by zsouthboy · · Score: 3, Funny

      I am interested in your ideas and would like to subscribe to your newsletter.

    6. Re:Holy Crap by Cairnarvon · · Score: 4, Funny

      If it was meant to be easy to understand, we wouldn't have called it "code".

    7. Re:Holy Crap by leonbloy · · Score: 2, Funny

      'Only a moron could believe that there is nothing wrong with a sentence which can be grammatically parsed as valid and comprehensible but which is so long and twisted that only after thirty words, a lot of comas and conjunctions, you can deduce its structure and realize that its beginning was an appositive instead of the subject', is an affirmation that I would not fully approve.

  2. Madness, I say by Anne+Thwacks · · Score: 4, Funny

    I am going to create "PHP off the Rails" for developers of PHP websites. PHP developers will need no training, as most of them are off the rails already!

    --
    Sent from my ASR33 using ASCII
    1. Re:Madness, I say by Just+Some+Guy · · Score: 4, Insightful

      Sounds like a bunch of Perl coders who cant be bothered to learn another platform trying to keep themselves in jobs.

      Sounds to me like a bunch of Perl coders with a few million lines of corporate code who thought this would be easier than learning another language for one specific smallish project.

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:Madness, I say by Victor+Antolini · · Score: 2, Funny

      What about http://www.sqlonrails.com/ ? It rocks!!

    3. Re:Madness, I say by kestasjk · · Score: 3, Interesting

      Sounds to me like the BBC are using flat files and no database! They're talking about having tens of thousands of files in a directory, and having an archive of data on all shows the BBC is showing, but no mention of using anything other than flat files!

      I seriously doubt they have very much Perl code around; there's not much dynamic content on BBC. I really can't imagine what their circumstances would have to be for it to be a sane option to rewrite Ruby on Rails in Perl

      --
      // MD_Update(&m,buf,j);
    4. Re:Madness, I say by omeomi · · Score: 2, Insightful

      If you tell me you 'need' a language to implement a website I know I need to find someone else to build it.

      Yeah! Especially HTML!

    5. Re:Madness, I say by Just+Some+Guy · · Score: 4, Insightful

      They're talking about having tens of thousands of files in a directory, and having an archive of data on all shows the BBC is showing, but no mention of using anything other than flat files!

      Flat files that are pre-generated from a database backend, maybe. As in a cron job each night that does something like "for show in db.select(shows): generatestaticpage(show)". I'd be amazed if the whole site was just one big Dreamweaver folder that gets published.

      I really can't imagine what their circumstances would have to be for it to be a sane option to rewrite Ruby on Rails in Perl.

      "We have a database engine. We have a template system. We have a language that everyone in-house knows. Let's write a generalized method for combining the three!"

      I suspect that happens a lot more often than you'd think. If anything, I consider it a testament to the BBC that they've decided to release their code so that everyone else doesn't have to reinvent it.

      Disclaimer: I much prefer Python, and to me the BBC is that extra channel that has "Coupling" and "Ramsay's Kitchen Nightmares". I have no special love for Perl or the BBC. I just think that it's pretty cool of them to do this and wish them luck.

      Nice sig, BTW. :-)

      --
      Dewey, what part of this looks like authorities should be involved?
    6. Re:Madness, I say by theshowmecanuck · · Score: 3, Insightful

      Personally I don't know why people are always jumping to the 'language of the week'. I don't think 'progress' is the answer. I think too many programmers suffer from the 'we want the coolest new gadget' syndrome. Perl is a good and able language and if they have implemented another tool to help them do their job, then good on them. Why the hell should they bother to learn another platform. That is a ridiculous and juvenile argument. Constantly having to learn new languages just because a new flavour comes along reduces productivity, and makes it difficult to hire new people as there will never be enough people who know the languages on the bleeding edge. Meanwhile they probably have tons of Perl code already in place working just fine. So what if they don't like to use your favourite tool of the week and want to advertise their own favourite. No matter what you may say, they still know how to successfully build and implement one of the highest trafficked news web sites in the world. Shove that in you pipe and smoke it. Get a grip for Christ's sake.

      --
      -- I ignore anonymous replies to my comments and postings.
    7. Re:Madness, I say by rho · · Score: 2, Funny

      I'm not getting involved with any of this. I'm holding out for Rails on Rails. You don't have to write any code, you just submit a bid and the project is finished.

      --
      Potato chips are a by-yourself food.
    8. Re:Madness, I say by syousef · · Score: 2, Insightful

      Sounds to me like a bunch of Perl coders with a few million lines of corporate code who thought this would be easier than learning another language for one specific smallish project.

      It's called putting all your eggs in one basket. When the language is no longer popular they'll be begging anyone with experience of it to join and trying to rewrite the entire monstrosity. Don't believe me? Think about Oracle forms. Half my job is replacing legacy code. What you're describing is a neat way of creating a HUGE legacy codebase for the future. Excellent for the programmer's job security. Not so good for the employer.

      --
      These posts express my own personal views, not those of my employer
    9. Re:Madness, I say by IkeTo · · Score: 2, Interesting

      > Sounds to me like a bunch of Perl coders with a few million lines of corporate code who thought this would be
      > easier than learning another language for one specific smallish project.

      Sounds to me like a bunch of Perl coders looked at their friends' code and find their ideas interesting, and is worthwhile to implement in their favorite language. Why people never learn to admit that some people think Perl looks nicer than the language they love most?

    10. Re:Madness, I say by Just+Some+Guy · · Score: 2, Funny

      Why people never learn to admit that some people think Perl looks nicer than the language they love most?

      For most of the same reasons that make it hard to admit that their wife is an alcoholic or that their son wants to become a Hari Krishna. There are certain truths that make it difficult to believe in a rational society. Yours is one of them.

      --
      Dewey, what part of this looks like authorities should be involved?
    11. Re:Madness, I say by gbjbaanb · · Score: 2, Informative

      absolutely.

      The best reason to use the existing technology is because you're currently using it.
      They could do a bit in Pythin, and another bit in PHP with perhaps a snippet of RoR in there that someone did a prototype in to see if could replace the entire codebase (ha), with a couple of C modules someone wrote for some fast-access parts, maybe with a VB.NET module that was written by someone experimenting with the latest 'coolest' tech, and a slice of Java written by an intern once.

      Or they could leave that kind of technology nightmare and stick to writing business applications that solve business needs and not the developer's current wet dream.

  3. Wow. A consultants dream by thammoud · · Score: 3, Insightful

    Take two of the weirdest looking syntaxes and fuse them together. Life time employment.

    1. Re:Wow. A consultants dream by jhoger · · Score: 4, Insightful

      Perl is readable to those that know Perl. I know Perl and I find idiomatic Perl readable.

      And "job security" language choices is just as much a problem with regular employees as consultants. As a consultant there's been more then one occasion where I had to go and clean up the mess after some bored employee made an "interesting" language or framework choice presumably to keep themselves interested.

      -- John.

    2. Re:Wow. A consultants dream by Tumbleweed · · Score: 2, Insightful

      Perl is readable to those that know Perl. I know Perl and I find idiomatic Perl readable.

      I think it more accurate to say that Perl code is readable to the person that wrote that particular piece of code. Since there are a million and one ways to do anything in Perl (and this is considered a 'strength'), then when another Perl hacker comes along and can't understand what the previous Perl hacker did, they rewrite the whole thing the way they know how to do it. That doesn't meet my definition of 'readable.'

  4. Super by brunes69 · · Score: 4, Funny

    So... is this trying to combine the slowness and unscaleability of Ruby on Rails with the unreadability of Perl?

    1. Re:Super by Nazlfrag · · Score: 3, Insightful

      Ahh, the old 'double negative' development methodology. They should have just gone with Microsoft Office SharePoint Portal Server, that's got full enterprise grade quadruple negative power.

    2. Re:Super by ^Case^ · · Score: 2, Insightful

      Why is it that every time somebody mentions Ruby on Rails people have to say it's slow and unscalable? I'm getting kind of tired seeing this myth propagated. Ruby may be slower than $LANG but it's not that much slower, and the Rails shared nothing architecture makes it infinitely scalable up to the point where the database backend can't keep up anymore. And once you get there it's not really the framework that doesn't scale anymore is it?

      Additionally the expressiveness of Ruby combined with the conventions of Rails leads to comparatively little code, making it easy to change the app to take advantage of advanced deployment strategies like using memcached scaling the app even further.

      So unless you can come up with concrete examples of unscaling Rails apps or arguments as to why Rails does not scale please keep quiet. Statements like yours without any arguments doesn't really provide much value, even if they are true. Thank you.

  5. Re:Great another framework by A+beautiful+mind · · Score: 2, Insightful

    Exactly. They should have just went with Catalyst. RoR is overhyped. Perl on Rails just appears to be a way to hype something. Catalyst is actually a nice MVC spirited implementation that has the advantages of well written Perl code.

    --
    It takes a man to suffer ignorance and smile
    Be yourself no matter what they say
  6. Conspiracy! by __aaclcg7560 · · Score: 4, Funny

    This is proof that there is a conspiracy to make up absurd programming shenanigans to sell overpriced door stoppers! Coming soon...

    "Perl on Rails for Dummies"

    "Perl on Rails for Idiots"

    "Perl on Rails Bible"

    "Perl on Rails in 24 Hours"

    "Perl on Rails in a Nutshell"

    "Perl on Rails: The Missing Manual"

    ...at a bookstore near you to burn a hole in your wallet!

    1. Re:Conspiracy! by Anonymous Coward · · Score: 5, Funny

      Not if you are a Comcast subscriber.

    2. Re:Conspiracy! by jrockway · · Score: 2, Informative

      Well, actually... there is a Perl MVC book on Catalyst:

      http://www.packtpub.com/catalyst-perl-web-application/book

      It's much better than the Rails books though :)

      --
      My other car is first.
  7. Don't get your hopes up by Anonymous Coward · · Score: 4, Funny

    This'll be UK-only; probably licensed under the BBCPL, which is like the GPL, but only for people in England, Scotland, Wales, and N. Ireland.

    1. Re:Don't get your hopes up by adrianmonk · · Score: 3, Funny

      This'll be UK-only; probably licensed under the BBCPL, which is like the GPL, but only for people in England, Scotland, Wales, and N. Ireland.

      Could be worse. Could be released under the TVL (TV Licence), where you'd have to pay £135.50 per year to run the software. (Or £45.50 if your web site is in black and white instead of color.)

      The good news then would be that if you live in your parents' basement and they have a TV Licence paid for, you can host the web site under their licence as long as the server is located in your parents' house.

  8. glark by Juln · · Score: 3, Funny

    Whatever.

    As long as it somehow involves more and better Dr. Who reruns, I'm happy.

    What? Their website? I want Dr. Who reruns on that, then. The ones with the curly haired guy.

    --
    Juln
  9. Thanks a lot Beeb.. by Adambomb · · Score: 3, Funny

    With all that the perl community sees in terms of mockery, did you REALLY need to add "powers the BBC iPlayer" to it?

    --
    Ice Cream has no bones.
    1. Re:Thanks a lot Beeb.. by BorgCopyeditor · · Score: 2, Insightful

      Only Perl programmers think Larry Wall is a trained linguist. It would be more accurate to say he remembered some terms from a few linguistics classes he took as an undergraduate (notably "topicalization") and used them as metaphors to describe the rationale behind some design choices he made in creating Perl. The explanations aren't terrible, and some things in Perl's syntax were indeed "intuitive" by comparison with C, but the notion that Perl "has a striking resemblance to natural language" is a dream of people who don't really know much about how "natural language" looks, i.e., non-linguists.

      --
      Shop as usual. And avoid panic buying.
    2. Re:Thanks a lot Beeb.. by jrockway · · Score: 3, Insightful

      > $ is for scalar, @ is for array, # is for hash

      % is for hash. And that's not really a good rule.

      Given %hash, it's called @hash{@keys} when you slice it, and $hash{$key} when you only want one element. References always are scalar, so even though $foo->{bar}[42][2]{baz} is referencing a hash of arrays of arrays of hashes, you have a $ on the front.

      Once you know the rules, it's fine... but it's not necessarily Perl's finest point (and this all changes in Perl 6 as a result). Even if you like Perl, you have to admit that there are lots of things wrong with it.

      There are just less things wrong with Perl than any other language :)

      --
      My other car is first.
    3. Re:Thanks a lot Beeb.. by chromatic · · Score: 2, Informative

      ... the notion that Perl "has a striking resemblance to natural language" is a dream of people who don't really know much about how "natural language" looks, i.e., non-linguists.

      ... and several of the other trained linguists who use and develop Perl.

    4. Re:Thanks a lot Beeb.. by poopdeville · · Score: 2, Interesting

      Given %hash, it's called @hash{@keys} when you slice it, and $hash{$key} when you only want one element.

      I know you know this, but others don't.

      The hash is always called 'hash'. The sigil provides datatype information for the intended return value of your access to the variable -- just about everything in Perl is an expression and has a return value. Program evaluation follows a model remarkably similar to what a functional language might use, evaluating sub-expressions as needed. I'm sure the internals could be better or smarter, but they definitely aren't bad.

      Sigils also provide a simple namespacing mechanism, so you can have $hash (say, a reference to a hash) and %hash in the same scope.

      And because there's that layer of indirection between the variable's raw values and its return value, you can inject code to make variables act differently than they normally would when accessed, by using the Tie mechanisms. As a result, a fair amount of Perl's OO syntactic sugar can in principle be defined in terms of Perl code instead of having to be a part of the interpreter. This mechanism is obviously open for abuse,

      In fact, I'm starting to think that a closure-based object system could be made to replace Perl's "standard" OO system with minimal syntax changes through the use of ties.

      --
      After all, I am strangely colored.
    5. Re:Thanks a lot Beeb.. by chromatic · · Score: 4, Interesting

      But since I have you on the line, so to speak, are you in fact asserting that Perl is like natural languages?

      Yes, to some degree. The primary goal of Perl, like other programming languages, is to communicate with other programmers. There appear to be two schools of thought on how to do this. One of them comes from the mathematicians, who appreciate simplicity and uniformity of expression (as least per their on definitions of both) as a primary design criterion. The other comes from the linguists, who (in my opinion) have somewhat better ideas of how people (not just mathematicians) really communicate.

      I'm not saying that one is bad and the other is good. You'd never likely get the Turing model or the lambda calculus out of a linguist, for example, and COBOL and AppleScript aren't great examples of applying linguistic principles to language design either -- so there's a balance to strike between them.

      I'm not sure either linguistics or computer-language development is well served by this comparison.

      I agree to some degree, but just because no one has ever done it perfectly doesn't mean it's not worth doing.

      On a day-to-day basis, does it actually guide your choices about the language?

      Yes, actually. Remember that Perl is an artificial language, so it can simultaneously be more and less a pastiche than English. Consistency and syntactical similarity of semantics are important in natural language (avoid false cognates) but even more so in a programming language. The Perl 6 designers believe strongly that similar things should look similar and dissimilar things should look dissimilar. As well, concepts such as noun markers and subject-verb agreement (context) are present in Perl, as well as pronouns (topicalization). This brings up other problems such as ambiguous antecedents.

      The designers evaluate new operators and concepts in terms quite heavily. Mnemonics are important, as well as the proper length of identifiers and semantics of their names. For example, Perl 6 uses say instead of println because we believe it will be a frequent operation -- more frequent than print and as such deserves a shorter identifier. Whatever the syntax for accessing the current continuation will be, it's likely to be somewhat longer, as it's not something we want people to need to use more than a few times.

  10. Surely the BBC of all organizations... by goombah99 · · Score: 5, Funny

    Should have preferred Python or Parrot. I mean c'mon. nudge nudge know what I mean... She's a goer.

    --
    Some drink at the fountain of knowledge. Others just gargle.
    1. Re:Surely the BBC of all organizations... by eniac42 · · Score: 3, Insightful

      I mean... say no more. A nudge is as good as a wink to a blind bat..

      Seriously though I dont know what the BBC is doing, smoking its way through £130m PA ($260m) of public money on computer "projects", like re-inventing mplayer/iPlayer/MediaPlayer.. Haven't we already done this? Shouldn't Aunty Beeb leave the hard-coding to the free market & concentrate on what it does best - artistic/jounalistic output?

      --
      "A nation that forgets its past is doomed to repeat it." - Churchill
  11. But what is Rails standing on? by Phroon · · Score: 4, Funny

    At the end of the lecture, a little old lady at the back of the room got up and said: "What you have told us is rubbish. Web development is really Ruby supported on the back of Rails."

    The developer gave a superior smile before replying, "What is Rails standing on?"

    "You're very clever, young man, very clever," said the old lady. "But it's Rails all the way down!"

  12. Re:Great another framework by ricotest · · Score: 3, Interesting

    According to the developers they were only allowed Perl 5.6 and a select group of BBC-approved modules on the live server. So Catalyst, CGI::Application, etc are right out.

    IMHO another example of management red-tape costing developers time and resources.

  13. Re:Great another framework by Anonymous Coward · · Score: 2, Insightful

    When you're running a set of websites as staggeringly busy as theirs, paid for with public money, I suspect you'll have strict rules about what gets onto your servers.

  14. Re:Great another framework by paulthomas · · Score: 3, Interesting

    The two frameworks fill different needs. Rails might be great for a completely new product, where you can fully take advantage of its "Convention over Configuration" motto as well as its neat integration between M, V, and C.

    Catalyst aims to be an extensible framework. Sure, there are recommendations for new projects, such as using DBIx::Class as the ORM, or Template Toolkit for your view, but these aren't written in stone. Each layer is flexible. You can use CPAN modules to build your own models and views. Want world GDP data? Make a model that calls WebService::CIA. Have your own custom database model already? Use it! (SixApart did this with Catalyst + their partitioned database system + Memcached).

    Catalyst is a little rough around the edges for some of the simpler cases that you might use RoR for, such as a plain old CRUD form system, which Rails will nicely generate for you, but for more complex applications Catalyst is not a bad choice.

  15. "need" is the new "want" by petes_PoV · · Score: 3, Funny
    If you tell me you 'need' a language to implement a website ...

    This is just word-inflation. in the same way that children nowadays "need" a chocolate bar.

    In business, the best way to see if someone really "needs" something is to see how much hassle they're willing to suffer to get it. For example, if they need a $1000 product, then I'd need a 20 page justification. If they need to attend a conference in 'Vegas, I need them to work weekends to catch-up the time etc. You get the idea.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
  16. Re:Great another framework by chromatic · · Score: 2, Insightful

    Rails is just as extensible as Catalyst, if not moreso...

    Have you ever tried to swap out ActiveRecord in its entirety for something else? The corresponding change in Catalyst is much easier than in Rails. (Rails 2.0 might have changed this; I don't know.) Rails is very proudly opinionated, while Catalyst goes to great lengths not to enforce any single particular component.

    ... how come the Perl community is tripping over itself to be Rails all of a sudden?

    Nice synecdoche, but Auntie Beeb's programmers are really not the whole of the Perl community. Plenty of the Perl community doesn't care one whit for web programming, for starters.

  17. slow whitelisting of CPAN modules by zby · · Score: 2, Insightful
    There is an insightful thread on the Catalyst mailing list about this. In summary it looks that:
    • The code has not been released - so all the discussion is a bit void
    • The reasons for it's development seem to be based on misunderstandings and 'white listing' of allowed modules (plus only Perl 5.6 allowed)
    • It looks like Siemens, which in some way administers BBC working environment, is very reluctant to white list new CPAN modules - so the BBC developers reinvent on a grand scale.
    If someone knows someone from Siemens involved in the whitelisting process - then please ask him why it is so slow and ask how the Perl community could help them to make it faster.
  18. Re:Never mind the merits of perl or ruby by totally+bogus+dude · · Score: 2, Interesting

    How do we stop this train and get off?

    Complain to your elected representatives, perhaps? Now THAT's thinking outside the box!