http://qs1969.pair.com?node_id=690308

I recently had to do a complete survey of my current $work project. I realized that this "Perl" project is actually written in ten different languages, only some of which are Turing-complete. Ours has:

Think about that - when you're working on your "Perl" project, you're actually working in a polyglot that would have made Babel proud. There's no such thing as the "single-language" programmer and, frankly, I don't think there ever was.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on How many languages are in your project?

Replies are listed 'Best First'.
Re: How many languages are in your project?
by chromatic (Archbishop) on Jun 05, 2008 at 06:04 UTC

    A couple of years ago, I figured out how many languages I've written in to help create Perl 6:

    • Perl 5
    • Perl 6
    • PIR
    • C
    • Make/shell
    • Haskell
    • x86 assembly
    • PPC assembly
    • Scheme
    • Lua
    • Perl 1
    • XS

    Switching between PIR, Perl 5, and C in an afternoon is interesting.

      I'm double curious: How did Perl 1 fit in?

        I wrote the first version of Punie as an experiment, thinking that Perl 1 would be relatively easy to implement while still Perlish. Allison rewrote it as a test of the Parrot Compiler Tools.

      Just being curious: What did you use Haskell for?
      -- 
      Ronald Fischer <ynnor@mm.st>
        Perhaps Pugs? There's also a p5 to p6 translator in the pugs repo somewhere, which is also written in haskell.

        Update: yes, pugs ;-)

Re: How many languages are in your project?
by GrandFather (Saint) on Jun 05, 2008 at 04:39 UTC

    What? No English? Have you no comments or documentation for any of that project? ;)


    Perl is environmentally friendly - it saves trees

      Don't remind me: A small project I was on some years ago had code comments written in three (human) languages -- interspersed at random and sometimes conflicting.

      There's a user manual, yes, but that's separate from the code as it's written by another group. :-)

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
Re: How many languages are in your (HW) project?
by toolic (Bishop) on Jun 05, 2008 at 16:40 UTC
    Maybe OT since I am a hardware designer, and my final product is a piece of silicon, rather than a software package... but
    • Perl
    • Make, csh
    • Verilog
    • SystemVerilog
    • Assembly (2 different languages: one for each on-chip processsor)
    • C
    • HTML, XML
    • home-grown verification language
    • SQL

    Programmers aren't the only ones having all the fun :)

Re: How many languages are in your project?
by ikegami (Patriarch) on Jun 05, 2008 at 05:10 UTC
    You could also consider regular expressions, and maybe even pack templates and sprintf templates as mini languages too.
Re: How many languages are in your project?
by wade (Pilgrim) on Jun 05, 2008 at 21:59 UTC

    My work projects are always pretty-much:

    • C
    • ARM Assembly
    • DSP Assembly
    • Make (if it counts as a language)

    There's often supporting code written in:

    • Perl
    • bash
    • C++
    • XML (if it counts as a language)
    --
    Wade
Re: How many languages are in your project?
by Herkum (Parson) on Jun 05, 2008 at 15:52 UTC

    Did you forget Javascript? I don't know many web shops that can get away without using at least some form of Javascript now adays.

    I would throw in templating languages as well. HTML::Mason and Template::Toolkit, are both similiar but not exactly pure Perl. The have their own quirks that you have to learn.

    The final thing I wanted to throw in custom parsers. Poorly written ones are more cryptic than trying to decode a MD5 hash by hand...

Re: How many languages are in your project?
by Pancho (Pilgrim) on Jun 05, 2008 at 12:50 UTC
    Maybe we are all programmers in a 'single-language' that is implemented or expressed in many many ways... or maybe I'm still waking up and feel slightly esoteric...
    Pancho
Re: How many languages are in your project?
by CountZero (Bishop) on Jun 05, 2008 at 20:07 UTC
    Those and TeX and LaTeX (because I never figured out how to write Postscript and/or PDF files directly).

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      I'd say look at PDF::Template, but it is all but orphaned and waiting for a new maintainer.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        I did but the lack of support for tables killed it for me. That and the fact that LaTeX does all the lay-out for you in a professional matter and the thousands of modules on CTAN - Comprehensive Tex Archive Network.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        I heartily recommend PDF::API2. It was a very pleasent experience working with it, at a company I worked I completely replaced yucky Crystal Reports by Perl programs based on PDF::API2 and I wrote in no time a report module which could be used by users not knowing anything about Perl to generate PDF reports out of the database.
Re: How many languages are in your project?
by igelkott (Priest) on Jun 05, 2008 at 21:28 UTC

    Never really thought about it but now that I write them all out, it looks absolutely terrible.

    • Perl
    • SPL
    • Prism
    • bash
    • SQL
    • VBS
    • HTML
    • CSS
    • Javascript
    • C#

    The C# work was contracted out (and I do regret allowing it in) but the rest is used by me -- no one else to blame. SPL (sybyl programming language) and Prism (GraphPad macro language) are a bit odd but important in my field. I've just started adding CSS and Javascript but that's just out of laziness. Time permitting, I'll replace the VBS with a par executable.

    Luckily, I rarely have to work with C or Fortran anymore but I occasionally get wrapped up in small, specialized "languages" like SLN (sybyl line notation).

Re: How many languages are in your project?
by Anonymous Monk on Jun 08, 2008 at 05:35 UTC
    'There's no such thing as the "single-language" programmer and, frankly, I don't think there ever was.' I never thought about it before, but even in the early 1990's one of my projects was written in QB45 with inline ASM and C; and it called DOS BATCH files.
Re: How many languages are in your project?
by jds17 (Pilgrim) on Jun 08, 2008 at 10:58 UTC
    My current project at work:

    • C# (Web service)
    • Java / Wicket Framework (Web app)
    • HTML, CSS, Javascript
    • SQL: lots of queries
    • Perl / WWW::Mechanize: Web app testing
    • Gimp Scheme dialect (script to batch produce images for IE6 support)
    • Most fun parts: Perl & Wicket
      Gimp Scheme dialect (script to batch produce images for IE6 support)

      I personally believe that you already knew, but perhaps it's worth reminding for the benefit of others that you can write GIMP scripts in Perl too, except that support to do so used to be core in earlier versions of GIMP while now you have to install Gimp-Perl separately.

      --
      If you can't understand the incipit, then please check the IPB Campaign.
        Thanks for the pointer. I already had written a few Scheme plugins for use within the Gimp GUI and this felt quite natural, so I did not look for a Perl module this time.
      Do you use C# for server side or client? I have an off topic question...

      I have a Java web service that takes an Integer (not int, as this parameter can to be null at times). C# client side stub is generated based on wsdl, and it takes arg0 which is int, plus arg0Specified which is bool. However Java side complains about null pointer and fails.

      The same web service can be called successfully from soapUI, so the fault seems reside with C#, any idea?
        Hi, in my case it's the other way round: C# web service (i.e. server side) and Java client web app. Without seeing your code (including the exact web service invocation) and the error message I'm afraid I cannot help and it's really a bit off topic here, it does not even mention Perl ;-)

        Maybe you want to send a private message and / or post your question in a more fitting dicussion forum, e.g. TheServerSide.

Re: How many languages are in your project?
by Anonymous Monk on Jun 08, 2008 at 05:39 UTC
    Oh yeah, and that QB45 project was commented in both English and Chinese, so you had to run it under the ETEN Chinese system.
Re: How many languages are in your project?
by sharkey (Scribe) on Jun 12, 2008 at 03:09 UTC
    It's easy to brag about how many languages your only-works-on-our-highly-customized-server application uses. What about an application meant to run on lots of computers for use by ordinary users.

    I present to you the application I love to hate: lilypond

    • lilypond's own music typesetting language
    • c++
    • guile
    • postscript
    • tex/latex
    • python
    • shell/make
    • metafont
    • vim scripts, emacs lisp scripts
    • texinfo
    • html/css
    • flex

    Count the paradigms too: traditional, functional, stack-based, scripting, declarative, and various specialized languages.