News for hackers. Stuff that matters.
Re:PG: Arc Likely To Be Open-Sourced This Winter by jimbokun on Monday January 14, 2008 @10:00PM (#98484)
Well, that just complicates my "language to learn this year" decision.

Last year was Common Lisp. I was planning on doing Python this year. Then recently Scala has been looking very interesting, with the functional/static thing with not bad performance and access to the whole Java stack (I program Java at my job).

Now Arc might be a possibility. At this rate, it will be December and I'll still be trying to decide.

Re:PG: Arc Likely To Be Open-Sourced This Winter by euccastro on Monday January 14, 2008 @10:37PM (#98507)
Choosing Python would leave you 49 weeks left to learn something else this year. That's discounting the two weeks you've been taking to decide.
Re:PG: Arc Likely To Be Open-Sourced This Winter by jimbokun on Monday January 14, 2008 @11:18PM (#98538)
Touche. :)

I think you're right. I already found a task for Python to do, spent a couple weeks (off and on) refining it, and at the end I seemed to have used all of the prominent features of Python somewhere in that script. At the end of that, I had this vague feeling that I now "knew" Python and wasn't sure what was left to learn.

So, you are confirming my vague feeling and I can now move on to Scala and decide whether or not to switch to Arc once it emerges. :)

Re:PG: Arc Likely To Be Open-Sourced This Winter by SwellJoe on Tuesday January 15, 2008 @12:17AM (#98566)
Since you're feeling cocky, have a look at the Zope/Plone source. You'll almost certainly realize you don't know Python (and possibly that you don't actually want to).
Re:PG: Arc Likely To Be Open-Sourced This Winter by ivankirigin on Tuesday January 15, 2008 @02:35AM (#98597)
There is a difference between a language and its common idioms. "Generator expressions" is a good phrase to test how much people know. For example: http://norvig.com/sudoku.html

Python can definitely fit in your head, as far as the language. Reading lots of code is a good way to learn the idioms.

Re:PG: Arc Likely To Be Open-Sourced This Winter by SwellJoe on Tuesday January 15, 2008 @03:50AM (#98615)
I wasn't actually referring to the usual Python idioms, but if you're unfamiliar with Zope/Plone, you can be forgiven for not knowing that. The Zope developers (and to a lesser degree Plone) don't actually seem to like Python, and so they've reinvented many common language features and libraries. Partly this is historical...the Python that Zope was originally written in didn't have most of those features or the standard library that exists today. It's one of the problems of developing a large codebase in a language that is still in rapid flux and doesn't mind throwing out backward compatibility (my Perl code written before Zope existed still runs on modern Perl, while practically none of my Python code from 1.5 through 2.2 runs today unmodified).

But, regardless of the very sound reasons for it to be the way it is, it's a very intimidating codebase, and a really good case study in the "reinvent everything" mindset. (It's quite powerful, and I've worked with several of the guys who built it, as I did contract work for Zope Corp for a few years, and I have the utmost respect for their talent and intellect. They're some of the smartest developers I've ever met. But it's not quite like anything else I've ever seen when it comes to having a learning cliff, even with some pre-existing Python knowledge.)

Re:PG: Arc Likely To Be Open-Sourced This Winter by ivankirigin on Tuesday January 15, 2008 @03:06PM (#98802)
Yah, I assumed they were doing something fancy, not knowing what they actually are doing.

I'm told a great place to read good code, both Python and C, is to read the code that makes Python.

Re:PG: Arc Likely To Be Open-Sourced This Winter by tjr on Wednesday January 16, 2008 @02:11PM (#99389)
Yes, C is another good example. The language is fairly small, and it's not terribly difficult to learn the language itself and write your own programs. But to be able to look at an arbitrary piece of C code and understand all of the implications is another matter entirely.

This is true of any language to some degree, although some are worse than others, and if the code was purposefully written in some non-traditional way it can be even harder.

Re:PG: Arc Likely To Be Open-Sourced This Winter by ivankirigin on Wednesday January 16, 2008 @03:47PM (#99432)
It is most certainly not true about C++.
Re:PG: Arc Likely To Be Open-Sourced This Winter by tjr on Wednesday January 16, 2008 @06:36PM (#99536)
Touche'; I should have grouped my sentences differently. C++ is not a small, easy-to-learn language.
Re:PG: Arc Likely To Be Open-Sourced This Winter by ivankirigin on Thursday January 17, 2008 @01:35AM (#99667)
I'm reminded of Duff's Device http://en.wikipedia.org/wiki/Duff%27s_device

  send(to, from, count)
  register short *to, *from;
  register count;
  {
    register n = (count + 7) / 8;
    switch (count % 8) {
    case 0: do { *to = *from++;
    case 7:      *to = *from++;
    case 6:      *to = *from++;
    case 5:      *to = *from++;
    case 4:      *to = *from++;
    case 3:      *to = *from++;
    case 2:      *to = *from++;
    case 1:      *to = *from++;
               } while (--n > 0);
    }
  }
Re:PG: Arc Likely To Be Open-Sourced This Winter by jimbokun on Tuesday January 15, 2008 @11:19AM (#98712)
I knew about list comprehensions, but generator expressions add some new tricks. And I also now have a clearer idea of what constraint propagation means.

Thanks for the link!

Re:PG: Arc Likely To Be Open-Sourced This Winter by tokipin on Thursday January 17, 2008 @09:59PM (#100125)
this year a particular language surprised me: Lua. i'm not a polymath of programming languages, but in my experience Lua is the most powerful non-lisp language (in terms of abstractive power). it's scripted, functional, dynamically typed, supports closures, asymmetric coroutines, has a heterogeneous data structure, and gives you access to the 'compiler'. it's something like a heavily improved and simplified javascript