Slashdot Mirror


Optimizing Development For Fun

chromatic writes "Geoff Broadwell has written an analysis of optimizing an open source project for fun, specifically the Pugs project. Broadwell argues that making development fun and easy leads to higher quality code and a faster velocity of development, even when implementing a frivolous project (a toy Perl 6 interpreter) in an uncommon language (Haskell). The Pugs leader, Autrijus Tang, will speak about both Pugs and Haskell at EuroOSCON."

40 of 144 comments (clear)

  1. This is all well and good... by g_dunn · · Score: 4, Insightful

    But, as a programmer, if the project I'm working on isn't something I want to do, and enjoy doing, why am I doing it? Even in the workplace, all of my projects are fun to me - That's why I decided to work there! And as open source projects are generally done as an aside, why volunteer to work their if the project doesn't interest you anyway? If you're not enjoying what you're doing, why are you doing it?

    1. Re:This is all well and good... by NanoGator · · Score: 5, Insightful

      "If you're not enjoying what you're doing, why are you doing it?"

      Food on the table, mainly.

      In any event, I think questions like this are more helpful for management than they are for programmers or anybody else with a similar profession. The article uses the word 'fun', but in practice, I think 'importance' is a more interesting term. (Maybe they're not all that dissimilar?) Constantly changing directions in order to meet arbitrary deadlines or "chasing money" is a real morale killer. Working with well laid plan knowing that you're boring work is going to pay off into an interesting product, that's a lot more interesting. It's important.

      Eh I think I'm mainly just stating the obvious here. When I hear stories of companies like EA demanding tons of unpaid overtime to meet an arbitrary deadline, it seems to me that even the 'fun' parts of asset building turn into a curse real fast. It's not fun to try to shortcut your way to the finish line with the concern that one of those shortcuts will come back and nip your hinder.

      --
      "Derp de derp."
    2. Re:This is all well and good... by dubl-u · · Score: 2, Insightful

      In any event, I think questions like this are more helpful for management than they are for programmers or anybody else with a similar profession.

      I don't know about that. I'd use the term "enjoyable" instead of "fun", but I strive to structure the projects I work on so that everybody is enjoying it. Like most people, I'm much more productive when I'm enjoying things, so there's a big financial benefit to arranging things so that people are eager to come to work every day. And I think it's every employee's responsibility to push for an environment that's maximally productive.

  2. Want to make dev fun? by Anonymous Coward · · Score: 5, Interesting

    Use Python!

    Seriously - we use it except in a few places where C/C++ is a better fit for interfacing with DirectX. The results? People are having real fun and getting a ton done. We couldn't be happier.

    1. Re:Want to make dev fun? by Anonymous Coward · · Score: 5, Interesting

      Except that this article is about people developing in Haskell - a language that's every bit as fun to use as Python (it even has optional syntactic whitespace), but compiles to native code (so it's faster) and infers types at compile-time (so it's robuster).

      Think Pugs is cool? Look at this. These guys have implemented a complete transactional file system - looks like a Unix FS, but provides snapshots, unlimited undo, true copy-on-write handling of links (including link cycles), and perfect concurrency without requiring any OS-level threading. In just 540 lines of Haskell.

      Give it a try. The learning curve's steep at first - it's got some concepts you simply won't have encountered anywhere else. But if you're smart enough to have dropped C++ in favour of Python, you're smart enough to handle Haskell.

    2. Re:Want to make dev fun? by jonastullus · · Score: 2, Interesting

      i agree that python has a tendency (at least for me) to cause relaxation and make even otherwise boring tasks fun due to its extremely readable nature and good balance of write-once vs. read-often.

      and also, c++ is not such a hard competition when "having fun" is on your agenda. every single time that i sit down to program c++ i end up heavily frustrated at some point due to wrong "#include" order, some whacko unreadable compiler error or simply a hard to find segfault (most often due to forgotten pointer initialization, *will i ever learn*)...

      yet, python tends to have its own set of problems, mainly stemming from the fact that NO type checking is done at startup time and so you have to start your program again and again, everytime only finding/fixing one small typo! certainly most of this problem can be eliminated by good unit testing practices, but a little more help from the interpreter/compiler would still be nice at times.

      my current craze is for languages with type inference (standard ml, ocaml, haskell), which for me combine the cozy compiler assistance of typed languages with many/most of the liberties of dynamically types languages like ruby, python, perl, lisp, scheme...

      well, except for restrictive languages like c++ and java (i don't know cobol personally ;-), programming can be fun in any of the above languages (well, maybe not perl, but that's a question of personal taste).

    3. Re:Want to make dev fun? by Eil · · Score: 4, Informative


      Mainly, Python is powerful but has a deliberately shallow learning-curve. The most often-cited reasons are the following Python mantras:

      - Everything is an object
      - Syntax is simple and predictable (but feels a little odd if you're coming from C, C++, Perl, Java, etc)
      - There's one obvious way to do it. (Contrast with Perl's, "There's more than one way to do it.")
      - Batteries included (comes with a large library of modules)

      Pretty sure there are more, but these are the biggies that I can recall. These are the same reasons that many quote for using Ruby as well, but I got around to trying it yet.

      I used to be a big fan of Tcl for it's insanely shallow learning curve. (Even more so than Python.) I wrote a usuable Tk (GUI) app within the first hour of even hearing about it. Too bad it didn't really catch on and mature as well as Python and Perl did over the same time-frame because it really is a nifty language.

    4. Re:Want to make dev fun? by macshit · · Score: 2, Insightful

      i agree that python has a tendency (at least for me) to cause relaxation and make even otherwise boring tasks fun due to its extremely readable nature and good balance of write-once vs. read-often.

      I think you underestimate the ability of people to write bad code -- I've seen a great deal of really crappy impossible-to-understand python code.

      I get the impression that many people think "hey it's an easy-going casual high-level language, I don't need to use any care whatsoever!"

      [This problem can be even worse with languages that have an "easy" reputation and are less naturally clean than python, e.g., perl, or (shudder!) tcl.]

      --
      We live, as we dream -- alone....
    5. Re:Want to make dev fun? by jonastullus · · Score: 4, Interesting
      ## I think you underestimate the ability of people to write bad code

      but i don't.

      good python code is extremely readable, and medium python code is a pleasure to WRITE, because many things just seem to solve themselves.

      BUT, writing big software or maintaining medium-to-crappy python code is far worse than many of the alternatives (except perl, of course)... this is exactly why i have become such a big fan of type inference, not to speak of garbage collection which i had my doubts about in the past, but fully embrace nowadays.

      python's shady object-orientation makes many things harder than they need be (compare ruby).
      • lacking private/public flags for methods
      • ugly "__something__" pseudo-access-control
      • implicit creation of attributes on write-access (*hello typos*)
      • not so beautiful handling of "method not implemented" functionality
      • incessant and visually displeasing explicit "self." everywhere
      • lacking abstract/virtual classes, interfaces
      • too frequent "necessity" of metaclass-hacks (although the possibility is very nice)
      • verbose attribute initialization in constructors
      • the evil "param = []" default value pitfall

      and other defects with python's object system have led me to believe that it is not an ideal language for big-scale OO development.

      yet, for rapid prototyping i know few languages that allow the programmer such unhindered experimentation and the *possibility* of resulting readable code. also for applications of a few thousand lines, written by a few people it can actually create a certain fun factor!
    6. Re:Want to make dev fun? by jma05 · · Score: 2, Informative

      All good. But don't get confused between static and strong typing. Python is dynamically and strongly typed, not weakly typed.

    7. Re:Want to make dev fun? by njyoder · · Score: 2, Insightful

      Sure, if you want an uglier, single paradigm language that's harder to maintain, it's great. But us non-zealots prefer to use languages that are easier to read and don't think that a single programming paradigm is the end-all and be-all.

      The "lines of code" argument is tired, old and bullshit, frankly. Anyone can write a minimal line version of practically anything, but that says nothing for maintainability, readinability or anything else. Someone's written a 3 line RSA utility in perl, but have you taken a look at it?

    8. Re:Want to make dev fun? by Fahrenheit+450 · · Score: 2, Interesting

      Sure, if you want an uglier, single paradigm language that's harder to maintain, it's great.

      Uglier is in the eye of the beholder. Hell all I hear about Python is how clear and clean it is, but every time I look at it I can't help but think how ugly it is, with all of it's __some_crap_or_another__ and whatnot. Sure, it's nicer than, say, C++, but that's a bit like saying someone is cuter than Karl Malden... Bottom line, saying something is uglier should mean little to anyone who isn't you -- we all like and dislike different things for different reasons.

      As for harder to maintain, I suppose you have some evidence to back up this assertion? If you do, I'd love to see it...

      The "lines of code" argument is tired, old and bullshit, frankly. Anyone can write a minimal line version of practically anything, but that says nothing for maintainability, readinability or anything else.

      I pretty much agree with you on the first point. I won't say it's BS, but I do believe that it's overhyped. The part you may or may not be missing is that it's not the ability to squeeze tokens out of an algorithm that's important. It's the ability to say a lot, and clearly, with just a few words that's important (a subtle but real distinction). This was touched on a bit by Simon Booth and Simon Jones in their paper Are Ours Really Smaller Than Theirs? It's the succinctness that they talk about that is important, as it should lead to fewer errors, and actually aid maintainability and readability as it allows a person to keep more of the program in their head. Of course I don't know if it actually does this -- I'd love to see some follow on research...

      Someone's written a 3 line RSA utility in perl, but have you taken a look

      Taken a look at it? Hell, I own the t-shirt!

      --
      -30-
    9. Re:Want to make dev fun? by jonastullus · · Score: 2, Informative

      EXAMPLE:

      def test(arr = []):
          return arr

      t = test()
      t.extend(["hello", "world"])

      u = test()
      print u

      RESULT:

      $ ./test.py
      hello
      hello hello

      REASON:

      the default value expression is evaluated once, when the function
      object is created, and the resulting object is bound to the argument.

      FIX / WORKAROUND:

      if you want to create a new object on every call, you have to do
      that yourself:

      def __init__( self, myList=None):
          if myList is None:
              myList = [] # create a new list
          self.myList = myList

    10. Re:Want to make dev fun? by jonastullus · · Score: 2, Informative

      *darn*, i totally bogged up the result:

      RESULT:

      $ ./test.py
      > ["hello", "world"]

  3. Why shouldn't it be fun? by punkdigerati · · Score: 4, Insightful

    I'm sure many more people would have a cleaner house if cleaning their house was fun.

    1. Re:Why shouldn't it be fun? by jonadab · · Score: 2, Funny

      > I'm sure many more people would have a cleaner house if cleaning their house was fun.

      There actually are people who think cleaning stuff up is a real blast. Most of us are convinced they're certifiably loony, but they're so useful to have around that very seldom does anyone have one of them committed to a mental institution. The usual response is more like, "Hey, that's great, glad you're having such a good time. Maybe I'll buy you a new mop out of my next paycheck. No, don't thank me, I just love it when you have a good time, really."

      There are not very *many* of these people around, though. Perhaps one or two per thousand, not nearly enough to keep all the world's households clean. Which is probably for the best -- I think it would be kinda scary if there were too many of them.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  4. Faster velocity? by Anonymous Coward · · Score: 2, Insightful

    Why "faster velocity of development"? Wouldn't "faster development" have worked?

    1. Re:Faster velocity? by hunterx11 · · Score: 4, Funny

      Perhaps they wish to specify a vector, lest they should develop backwards. Unfortunately, even for a play on words this is nonetheless a possibility.

      --
      English is easier said than done.
  5. Avoid Recursion by Dante+Shamest · · Score: 5, Interesting
  6. refactoring dirty prototypes by jonastullus · · Score: 2, Insightful

    Embrace anarchy

    It's important also to make committer sign-up fast and easy

    new committers could be invited en masse and sign up on their own

    committing quick and dirty protypes that can be refactored as they grow



    *AAAHHHH*
    and i thought (quick and dirty) prototypes were supposed to be immediately scrapped and their essence implemented in clean, revised code... *silly me*

    all in all an interesting read, commending "anarchy" and as-turbulent-as-possible commits over more stringent methodologies. i can imagine that PUGS is going along quite "smoothly" and am in awe how these two radically different communities (haskell and perl) managed to find each other ;-)

    but whether this community and flair can be reproduced simply by adhering to somewhat questionable guidelines is another question alltogether.

    1. Re:refactoring dirty prototypes by Pseudonym · · Score: 2, Interesting
      [I] am in awe how these two radically different communities (haskell and perl) managed to find each other ;-)

      It's not such a shock, IMO. Ever since it's been a "real" language (about Perl 5 or so), Perl has always been inspired by Lisp-like languages with its support for programming with lists, map/filter-like programming, higher-order programming and so on. And Perl is still a prerequisite for building the most common Haskell compiler, GHC.

      Haskell and Perl represent flip-sides of the programming coin. I find it no surprise that they've found a home together.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  7. All we need now is ... by Douglas+Simmons · · Score: 4, Funny

    this to be implemented into apt-get so we the debian community are still superior to those pompous fun-compiling gentoo users.

  8. Mod story +5 Insightful by Spy+Hunter · · Score: 4, Interesting
    Most insightful article about software development I've ever read. Every open source project could learn a thing or two here, and closed-source commercial products could learn a bit too.

    IMHO this philosophy could go a *lot* farther too. We should be building these types of concepts into our software development tools (not just source control but IDEs and compilers and even languages). It should be as easy as possible for users to get the source, build it, modify it, and submit their changes. Ideally as easy as editing a Wiki. Though the inherent complexity of software means that Wiki simplicity will probably never be reached, we could certainly do a *lot* better than we do now.

    In an open source project the ease of the process of getting, compiling, modifying, and submitting changes to the source is directly related to the number of new contributors joining the project, which is directly related to the rate of improvement. Traditional software development tools have far too many pitfalls and require far too much know-how for casual users. The process of contributing to open-source projects could and should be a lot more automatic and foolproof, because attracting contributors is the single most important thing an open source project can do to improve itself.

    --
    main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    1. Re:Mod story +5 Insightful by daveb · · Score: 2, Insightful

      sounds like an interesting methodology - but what does FUN stand for? How does it compare with SCRUM and is it Agile?

      How can we teach this as a thriving Software Engineering methodology if it doesn't have a silly acronym

    2. Re:Mod story +5 Insightful by Spy+Hunter · · Score: 4, Insightful
      If a Wikipedia article gets munged temporarily by someone who's stupid, uninformed, or malicious, it's no big deal, and it will probably get fixed soon. But when it's a piece of software, the consequences are potentially a lot more serious, and there's no guarantee that the damage will be detected or fixed any time soon.

      Why will the damage to wikipedia get fixed soon? Because anybody can fix it. Why will the damage to the software not be fixed soon? Because only a couple of people have the ability to fix it. The idea is to give far more people the ability to fix that problem (a number which is proportional to the number of people who are likely to cause the problem, so the problems shouldn't get out of hand).

      Why is the software problem more serious? Because softare is fragile. Is that inherent to software, or is it just the condition of the software development tools and processes we use today? I believe it is the latter. I believe software development tools and processes could be a lot more robust and forgiving of simple mistakes. And if projects started really opening up contributions, made it as easy as editing a Wiki, then they would be forced to become more robust. This is a good thing, not something to be avoided.

      I'm not sure the conclusions from The Mythical Man Month apply directly here. The main conclusion is that adding developers to a project makes it take longer. Open source software isn't on a strict schedule, and it doesn't have central management with clearly defined lists of requirements. New contributors aren't assigned to speed up existing work, they add their own features and improve the software in their own way.

      Most successful open-source projects also have exactly one author. Massive parallelization works best for something like Wikipedia that's both big and inherently parallelizable. Most software isn't like that.

      I'm thinking about the big projects here. KDE, GNOME, Mozilla, Debian, etc. But why is it that developing software isn't inherently parallelizable? To the extent that is actually true, once again I blame the tools. We need better software development tools to make software development more parallelizable. I don't think there's any inherent reason why "Joe's Yet Another MP3 Database" on SourceForge shouldn't be able to use this type of develoment methodology, given the right tools.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    3. Re:Mod story +5 Insightful by bcrowell · · Score: 4, Insightful
      Why is the software problem more serious? Because softare is fragile.
      No, it's more serious because, e.g.:
      • People depend on software to get their work done.
      • Broken software can mess up your data.
      • Malicious software can do bad things, like give your credit card number to Russian gangsters.
      Vandalizing a Wikipedia article has none of these serious consequences.

      Why will the damage to wikipedia get fixed soon? Because anybody can fix it. Why will the damage to the software not be fixed soon? Because only a couple of people have the ability to fix it.
      If you take the total number of people in the world who are interested in and capable of doing OSS programming, and divide by the number of OSS projects, the result is a number close to 1. This is why most OSS projects have a single author. Imagining that "only a couple of people" have the privileges to fix a bug is actually optimistic -- the most likely case is that only one person is interested.

    4. Re:Mod story +5 Insightful by Spy+Hunter · · Score: 2, Interesting
      People depend on software to get their work done. Broken software can mess up your data. Malicious software can do bad things, like give your credit card number to Russian gangsters.

      People shouldn't depend on software under active development; only released software. Obviously before releasing a piece of software some quality assurance work will have to be done. This needs a different process than normal development work; it can be done on a branch of the code. This problem is largely solved by existing large OSS projects. By adding more contributors more errors will be introduced but more errors will be fixed, and overall more useful code will be produced.

      If you take the total number of people in the world who are interested in and capable of doing OSS programming, and divide by the number of OSS projects, the result is a number close to 1.

      And why is that? Because OSS programming is hard to do. It's very hard to jump in and immediately contribute to a project that you use. If we make it easier, more people will do it. You could have made a similar argument against Wikipedia before it started. Who wants to write an encyclopedia article? It turns out that everybody does, if it's easy enough. Making it easy is the key.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    5. Re:Mod story +5 Insightful by l00k · · Score: 2, Interesting
      If you take the total number of people in the world who are interested in and capable of doing OSS programming, and divide by the number of OSS projects, the result is a number close to 1. This is why most OSS projects have a single author. Imagining that "only a couple of people" have the privileges to fix a bug is actually optimistic -- the most likely case is that only one person is interested.

      If you took the total number of people who contribute to the Wikipedia, and divide by the total number of Wikipedia articles, you get a result much less than 1--0.6. So, how does 0.6 of a person write an article? They don't. Groups of people work on articles not as individuals, but as a community. And when they have added their bit to that article, they move to another one.

  9. Good points by Anonymous Coward · · Score: 2, Interesting
    Form the article:

    * Embrace anarchy. One of the key realizations of modern Internet projects (the oft-quoted Web 2.0) is that on the whole, your users can be trusted.
    * Avoid deadlocks. There should be nothing blocking a programmer from committing his code.
    * Cast committer rights far and wide. A central core committer group is necessarily slower than allowing every developer to commit as desired.

    This all boils down to one thing: Open the CVS access for everybody. And that is exactly what I have come to hate about the GNOME project: Development is essentially closed because every piece of code needs to be reviewed and there are not enough reviewers. I often wondered whether these guys really believe in Open Source. Is KDE development equally restrictive and boring?
  10. Re:while by autrijus · · Score: 4, Insightful
    Verily. However, I think a key parts of of the fun is a solid expectation of making a difference in the world, while the current result being immediately useful (for learning and/or production).

    A project generally regarded as pointless will likely have a difficult time finding contributors that sees this kind of fun in it.

  11. It's not frivolous by Anonymous Coward · · Score: 3, Insightful

    What a weird article description. Getting people to hack on frivolous projects generally isn't a problem. Getting them to hack on tough projects can be. Okay, maybe this is a test implementation in a funky language, but this isn't a frivolous project according to the Perl folks; Damian Conway described the work as "both amazing and amazingly useful: as a way of
    exploring the deeper design and implementation issues" here:
    http://www.nntp.perl.org/group/perl.perl6.language /19263

    Worst of all, the word frivolous distracts from the point of the article, which is all about techniques you can use to help making hacking on any project fun. It's not about only hacking on projects that are instrinsically fun, as 'frivolous toys' tend to be.

    1. Re:It's not frivolous by chromatic · · Score: 2, Informative

      I meant that Pugs started as a frivolous project in the same sense that the Linux kernel started as a frivolous project and as much as any learning experience refactorable into useful, non-frivolous code is frivolous.

      I'm not sure when Autrijus realized what he had, but I'm sure he didn't intend to write a full-fledged Perl 6 implementation with pluggable backends targeting Perl 5, Parrot, the JVM, and JavaScript, at least not at first.

  12. You obviously have never seen the boring....... by hummassa · · Score: 2, Insightful

    projects some of us have to work on. I *do* enjoy programming very much, but I also get stuck in boring stuff waay too often. And yes, I need to put food on the table for me, wife and 2 kids.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  13. Let's run with this idea a little by wyoung76 · · Score: 3, Interesting
    If we use wikis as a front-end to the cvs, and by default mark all modules with a simple security level (no disk access, etc), and wrap each thing with unit tests for basic error capturing, and had incremental compilation, then we might have an easier and more collaborative way of coding.

    To further the idea a little more, the wiki also helps in documenting the structure of the project, and like other tools would be able to show any/all references to given code.

    Certainly, if you're a hardcore coder, you'll have a preference for direct access to the cvs. For more casual coders, or those who just want to wander around looking for interesting things to help on, the wiki frontend could help.

    That being said, I have no idea how well this idea could work, but for smaller prototyping projects it might just work.

    1. Re:Let's run with this idea a little by qbwiz · · Score: 2, Informative

      I think that that's where the unit tests come in. If something doesn't compile, or it doesn't pass the unit tests, then it cannot be checked in. There could also be known-good checkpoints, which enable users and possibly even developers to work on something that should work.

      --
      Ewige Blumenkraft.
    2. Re:Let's run with this idea a little by Ramses0 · · Score: 2, Interesting

      I did something similar to this at work... some greasemonkey scripts wired to a wiki as a backend datastore with some extra popup helper dialogs.

      You would then run it via Python's great runtime eval stuff.  Since I'm pretty tired, maybe some code would help demonstrate:

      def Import( wikiword ):
          print ">>> Importing: " + wikiword
          text = getTextFromWikiWord( wikiword )
          code = getCodeFromText( text )
          if len( code ) == 0:
              raise "No Code Found For: " + wikiword
          exec code in globals()
          return

      def getTextFromWikiWord():
          # you can do some sort of HTTP fetch or file.open here

      def getCodeFromText():
          # this basically grep's for [code]...[/code] blocks
          # and smushes them together

      def Execute( wikiword, **params ):
          print ">>> Executing: " + wikiword
          Import( wikiword )
          str = wikiword +"( **params )"
          eval( str )
          return

      if __name__ == '__main__':
          Execute( sys.argv[1] )

      ...the basic premise being that each function gets stuck onto it's own wiki page (def foo()...), wiki provides the equivalent of CVS, and with Python I basically wrote a new "import" function that imports code on the fly in about 20 lines of code.

      Before going farther with this, read up on Knuth's "Literate Programming" ideas.  Also, take off your "programmer's goggles" and  put on your "not an expert programmer's" goggles.  With a sufficient level of abstraction, and good whip-cracking on the architecture to keep most complicated stuff "out of sight", non-programmers can pretty effectively build software out of componentized pieces.  They can even build some component pieces themselves if they're motivated and can understand what's going on.  And once it's in a wiki hidden between [code] blocks, lean on the wiki to provide gooood documentation (think wikipedia, but with little blocks of code).

      --Robert

  14. Pugs 6.2.10 has just been released. :-) by autrijus · · Score: 4, Informative
    I am delighted to announce Pugs 6.2.10, released during a slashdotting on geoffb's "Optimizing for Fun" column:

    http://developers.slashdot.org/article.pl?sid=05/1 0/09/1831219

    The release tarball will be available from CPAN shortly:

    http://pugscode.org/dist/Perl6-Pugs-6.2.10.tar.gz
    SIZE = 2394516
    SHA1 = 3d8669fdccc3616c99cdde68659759b8b5782859

    With two months of development, this release features more tightly integrated JavaScript and Perl5 code generator backends, a library interface to the Pugs system via support for the Haskell Cabal frameworks, as well as many new tests.

    After the release, the push toward 6.28.0 will begin in earnest, with the newly specified container model and object model integrated back to the main runtime, fleshing out support for the remaining OO features.

    Again, thanks to all the lambdacamels for building this new ship with me. :)

    Enjoy!
    /Autrijus/

    Changes for 6.2.10 (r7520) - Oct 10, 2005

    Feature Changes

    Shared components

    • Support for the Haskell Cabal framework, exposing Pugs as a library to other Haskell users, paving the way for use in IDEs, as well as future Inline::Pugs and Inline::GHC modules
    • Adopted the code convention of expanding literal tab chars to spaces
    • JavaScript backend can be invoked with pugs -B JS
    • Perl 5 backend can be invoked with pugs -B Perl5
    • Pugs will now compile version ranges in use/require statements
    • Significant backend enhancements; see below
    • $?PUGS_BACKEND can be used to tell which runtime is in use
    • exec emulated partially on Win32

    JavaScript backend

    • Passes 91% of the main test suite including TODO failures
    • Integrated with MetaModel 1.0
    • Faster code generation, taking advantage of -CPerl5 output.
    • Switched to continuation passing style CPS to properly support return, ?CALLER_CONTINUATION, coroutines, and sleep
    • Improved support for binding and autodereferentiation
    • Initial support for multi subs
    • Initial support for symbolic dereferentiation
    • List construction no longer creates new containers
    • Miscellaneous performance improvements
    • Named-only arguments +$x and ++$x cant be passed positionally anymore
    • Parts of the Prelude can be written in Perl 5 now to improve performance
    • Perl 5-like regular expressions mostly working
    • Proper UTF-8 handling
    • Support for monkey-but $foo but {...}
    • Support for $CALLER:: and $OUTER::
    • Support for lazy {...} blocks for delayed evaluation
    • Support for temp and let declarations
    • Support for array and hash autovivification
    • Support for array and hash slices
    • Support for evaluating expressions in the PIL2JS shell :e <exp>
    • Support for junctions
    • Support for loading JSAN modules by using use jsan:Module.Name
    • Support for lvalue subroutines foo = ...
    • Support for slurpy hashes in subroutine signatures
    • Support for the Proxy class not yet user-visible
    • Support for the eqv operator
    • Using for with only one element to loop over works now
    • int works correctly on special values like Inf or NaN now
    • substr returns a r/w proxy: substr$str, $pos, $len = $replacement

    Perl 5 backend

    • Passes 33% of the main test suite including TODO failure
  15. That's mistitled by Estanislao+Mart�nez · · Score: 3, Informative

    That shouldn't be called "Avoid Recusion," because you're not really avoiding recursion. What you're doing (as the wiki itself explains) is abstracting it into a higher-order function. Still a pretty damn important technique that one should master in functional languages--recognizing the "shape" of a loop (is it a map? a left or right fold? an unfold?), and implementing the looping logic as a higher-order function separately from its specific uses.

  16. This makes sense by doc+modulo · · Score: 3, Interesting

    Because there are 2 kinds of fun/joy systems in the brain.

    The kind triggered by dopamine, the short high that doesn't last, the Mtv, nicotine, "I want to buy this" kind of fun.

    And the relaxed kind of contented joy that works with the serotonin system in the brain. Which does last and is an indicator of good relationships with friends, experiencing nature and knowing that "all is right in my domain, I'm ok for exploration into new things" kind of fun.

    That last kind of joy is an indicator of efficiency and "everything is as it should be" and if you feel that while coding, you must be on the right track.

    --
    - -- Truth addict for life.
  17. Vice Versa? by Maljin+Jolt · · Score: 4, Insightful

    While writing perl in haskell *is* fun, writing haskell in perl would be a horrific nightmare torture. Perhaps all code language disputations/wars should be solved by duel of this kind.

    --
    There you are, staring at me again.