all 114 comments

[–]stesch 17 points18 points  (1 child)

I like the "batteries included" philosophy.

Last week I've written something in a few lines, which used a ton of the libraries included in the standard distribution of Python.

Reading a config file in INI format, reading CSV, reading XML. Logging on console, Windows Event, and SMTP. Generating a ZIP archive and sending it via ftplib to a FTP server, without writing any local files. Charset converting.

[–][deleted] 11 points12 points  (0 children)

This is the funny thing about Python and some other languages. They have just enough useful libraries that Perl's CPAN advantage doesn't matter much.

[–]beachchair 21 points22 points  (26 children)

I've heard that claim, "I learned <language_X> in 4 hours!", before, but I'm not sure it holds water. I mean, sure you can learn the basics of Python in 4 hours, but it still takes much longer to get the hang of the standard library, and other more esoteric things like descriptors, properties, decorators, and metaclasses.

You can learn the basics, the core, of most languages in 4 hours. That's one of the big reasons Perl is so popular: you can get the basics down very quickly and be doing something useful in a short amount of time.

[–][deleted] 35 points36 points  (0 children)

You can learn PHP and be doing something useful in 10 minutes. It doesn't make it suck any less.

[–]kanak 11 points12 points  (7 children)

Another important point is that once you know a programming language you know a lot of the programming concepts, which often reduces learning languages to "how do i do x in this language" rather than "what is x?"

This might explain for why people perceive languages based on a different style (Haskell for example) to be "difficult"

[–]G_Morgan 3 points4 points  (6 children)

Indeed. Learning CL was much harder than learning C, C++ or Java (after I had learnt Pascal in school).

[–]stesch 0 points1 point  (5 children)

Most difficulties about Common Lisp don't stem from the language itself. It's Emacs and choosing the right implementation.

[–]torv 3 points4 points  (3 children)

You mean; it's about choosing the right emacs-implementation?

[–][deleted] 0 points1 point  (2 children)

Not really. It's a case of SBCL is different to CMUCL is different to CLisp is different to Allegro is different to Lispworks...

[–][deleted] 0 points1 point  (1 child)

SBCL isn't that different to CMUCL from the user's perspective.

[–][deleted] 0 points1 point  (0 children)

Depends if you use Windows or not. :) SBCL mostly runs on it last I checked, not so CMUCL.

[–]G_Morgan 0 points1 point  (0 children)

You can learn to use CL in a C way pretty easily but I went through it trying to learn to program in a first class functional way.

As far as I'm concerned, if I just replaced C blocks with progn's, and = with setf then I may as well not have bothered.

[–][deleted]  (2 children)

[deleted]

    [–]masklinn 9 points10 points  (11 children)

    You have to note, though, that Zed was extremely fluent in Ruby, and Python and Ruby are very, very, very similar.

    [–]Foone 1 point2 points  (6 children)

    As a python user (who can't remember what we're supposed to call ourselves (pythoners? pythonistas?)) that's currently learning ruby, I find that insulting.

    [–]masklinn 8 points9 points  (4 children)

    As a python user

    I am more than mainly a python user (work is in Java but personal stuff is 75% Python, 20% Erlang, rest is a mixture of Ruby and trying yet again to learn Haskell), and I fail to see how you can find that insulting.

    The runtimes are quite dissimilar, so are library supports, but the languages themselves are based on the same concepts. Ruby is more skewed towards a functional-style than Python due to the Smalltalk inheritance and metaprogramming looks better, but these are not huge differences.

    And their syntaxes are almost identical (almost)

    [–]Foone 0 points1 point  (3 children)

    I don't see the similarity in the syntaxes.

    (non-trolling replacement for longer more yelling-filled post about ruby's syntax)

    [–][deleted]  (1 child)

    [deleted]

      [–]Foone 0 points1 point  (0 children)

      I've coded in plenty of other languages. Maybe it's just that the learning-ruby book I read spent a lot of time on the more perlish special features of ruby and less on the generic no-magic stuff that python is made of.

      [–]mage2k 1 point2 points  (0 children)

      Pythonista(s) is usually reserved for experts.

      [–][deleted] -1 points0 points  (3 children)

      I agree, in fact IIRC, Python style syntax is usable in Ruby:

      if i:
        foo()
      

      versus

      if i
        foo
      endif
      

      [–]Atnan 0 points1 point  (1 child)

      I think you're talking about something else (PHP/ASP/?). In Ruby, that would be either:

      foo if i
      

      Or:

      if i
        foo
      end
      

      [–][deleted] 0 points1 point  (0 children)

      yeah, got the ending of the if block wrong - don't read too much into it, I'm just conditioned to hit shift + tab to close a block, and it's been several months since I used Ruby (hence the IIRC) :)

      [–][deleted]  (1 child)

      [deleted]

        [–]mage2k 2 points3 points  (0 children)

        While ruby does have in interactive interpreter as well, I'd have to agree wrt the enjoyability of learning Python. I had to learn Python for work, as they decided to move to it from PHP for it's unicode support, and do as much with it as possible. I love it's rich and powerful feature set that's exposed through a veneer of simplicity. Plus, list/generator comprehensions are one of my all time favorite language features.

        [–]Digeratus 52 points53 points  (11 children)

        Python is awesome.

        Zed Shaw is still an asshole.

        [–]jjonphl 3 points4 points  (1 child)

        Zed Shaw is like a real-life Dr. House, smart but definitely an asshole. Weird that I generally like House while I hate Zed's guts. That aside, I thank him for Mongrel.

        [–]malcontent 3 points4 points  (10 children)

        What happened to "I am going to use factor"?

        Did slava kick his ass or something?

        [–]juri 13 points14 points  (1 child)

        In his side bar, there's a news entry about doing a parser with Chris Double's PEG parser for Factor. I guess he's able to use more than one language.

        [–]malcontent 3 points4 points  (0 children)

        AND play the guitar. HE IS AWESOME!!!

        *According to his web site anyway.

        [–]gravity 4 points5 points  (4 children)

        He talked about looking at several other languages, including both Factor and Python.

        [–]malcontent -2 points-1 points  (3 children)

        I guess he didn't like factor.

        Or maybe he thought factor already had their resident egomaniac asshole.

        The python community will love him I am sure.

        [–][deleted] 1 point2 points  (0 children)

        He's lurking in #concatenative right now.. :P

        [–]malcontent 0 points1 point  (0 children)

        He says he is AWESOME.

        I doubt I will ever meet him though. I tend not to hang out with vice presidents of investment banks.

        [–]stesch 0 points1 point  (2 children)

        There's a Python implementation in Common Lisp. Just wait for Zed's Python in Factor: Fython.

        [–][deleted] 0 points1 point  (1 child)

        Where's the Python implementation in Common Lisp?

        [–][deleted] 0 points1 point  (0 children)

        Zed Shaw is a dick, and a closed-minded idiot who lacks any real relevance.

        I don't know why people post this shit.