News for hackers. Stuff that matters.
Re:The earliest version of HN I can find; 166 LOC by caffeine on Saturday July 25, 2009 @08:34PM (#723885)

    ; *** remove before flight
          (hspace 30)
          (intag (a href "kapow") (pr "kill server"))
lol..
Re:The earliest version of HN I can find; 166 LOC by henning on Saturday July 25, 2009 @09:59PM (#723943)
Why would there be any confusion over what the earliest version is? It would just be the initial revision in your source control repo.
Re:The earliest version of HN I can find; 166 LOC by irrelative on Sunday July 26, 2009 @12:22AM (#724051)
I agree completely. Even if I'm just playing around, the cost of creating a source repository is so small (especially with distributed repos) that I pretty much do it when I'm just playing with an idea.

If the idea grows big, it's fun to look at where it was when I started. If it fizzles, well at least you have something for the memories...

Re:The earliest version of HN I can find; 166 LOC by akho on Saturday July 25, 2009 @11:14PM (#724013)
… which is usually empty.
Re:The earliest version of HN I can find; 166 LOC by jacquesm on Saturday July 25, 2009 @06:25PM (#723771)
We should translate that into as many languages as possible and use it as a benchmark for a real world application to compare the efficiency of the various languages.
Re:The earliest version of HN I can find; 166 LOC by pg on Saturday July 25, 2009 @06:27PM (#723773)
You'd have to translate it into Arc at this point. It would not run in present-day Arc.
Re:The earliest version of HN I can find; 166 LOC by profquail on Saturday July 25, 2009 @07:18PM (#723816)
Re:The earliest version of HN I can find; 166 LOC by pg on Saturday July 25, 2009 @07:33PM (#723835)
I wish someone would create some benchmarks that were good for comparing code size. That would be a bit harder, because the problems would have to be bigger, and thus more likely to be ambiguous, but it would be a useful thing to have.
Re:The earliest version of HN I can find; 166 LOC by blasdel on Saturday July 25, 2009 @08:45PM (#723899)
Gzip-ed bytes of code is pretty great, and relatively fair to languages with verbose (but isomorphic) syntaxes. It's aiming to count the information content.

A benchmark counting the unshared working set would be pretty decent, but quite unkind to news.arc -- counting all of Arc and most of MzScheme as part of your program. MRI Ruby programs would be totally fucked, since the mark-happy GC keeps any library code from being shared between fork()ed processes.

Re:The earliest version of HN I can find; 166 LOC by ivankirigin on Sunday July 26, 2009 @12:20AM (#724048)
I think those comparisons would be meaningless.

For example, looping over a matrix in matlab is both clunky and extremely inefficient. You can just do matrix operations that are extremely tight.

You might use that to say it is better than C.

But it is C. They've just make language constructs that make is easy to do matrix operations. You could do the exact same thing with a library in C.

So comparing languages might run into the issue of comparing available libraries. I don't think new languages want to compete on availability of libraries.

Re:The earliest version of HN I can find; 166 LOC by scott_s on Sunday July 26, 2009 @11:25AM (#724475)
By your rationale, Perl and Python are C.

Since Matlab has language constructs for doing matrix operations, it is better for manipulating matrices than C. That Matlab compiles down to C, or calls into C libraries, is an implementation detail.

Re:The earliest version of HN I can find; 166 LOC by ivankirigin on Sunday July 26, 2009 @03:59PM (#724818)
You can't get around the interpreted vs compiles difference (among others) that differentiate Python and C. The discussion is one of code size though, not the other differences.

You can make compact and readable C that looks like other language constructs by writing libraries, to a limit.

My point, if I didn't complete it, is one I've mentioned a few times. Libraries matter more than things like LOC count. And it is a really big difference.

I challenge anyone to write an Arc levenberg marquardt minimization in less than 100 LOC. In Matlab (and other languages with good sets of libraries) it is literally just a parameterized function call.

Maybe I'm just too pragmatic for discussions like this.

Re:The earliest version of HN I can find; 166 LOC by jacquesm on Sunday July 26, 2009 @05:02PM (#724884)
Ok, so let me try to spell this out to see if I understand what you mean:

You are basically saying that whatever is primitive to the languages is irrelevant because the language that has the best libraries will win such a contest hands down because what needs to be re-implemented in one language is a primitive in the other.

That's true as far as I can see, but only for 'domain specific' problems. By running a benchmark that contains samples from many domains it should be possible to average out those factors.

Another way to deal with it would be to limit the code to code written in primitives.

Still matlab would handily outperform any other language not endowed with primitives for matrix manipulation, but that's exactly the whole point of such a test. To figure out given a problem for a certain domain what would be the most expressive platform to solve the problem in.

Re:The earliest version of HN I can find; 166 LOC by ivankirigin on Sunday July 26, 2009 @11:47PM (#725334)
Across many domains, the effect of libraries is exaggerated. Perhaps minimization isn't enough. Let's add image processing, talking to hardware over a serial port, and parsing an xhtml file. Libraries win:

  image.convolve( filter )
  hardware.write( c_struct )
  beautifulsoup( xhtml )
Re:The earliest version of HN I can find; 166 LOC by jrockway on Saturday July 25, 2009 @07:32PM (#723832)
I'm not sure how meaningful this would be; arc was basically written for news.arc.
Re:The earliest version of HN I can find; 166 LOC by colladude on Saturday July 25, 2009 @06:50PM (#723788)
"meaning it's 4 days old." -> 4 years :-)
Re:The earliest version of HN I can find; 166 LOC by jdale27 on Saturday July 25, 2009 @06:56PM (#723793)
No, 4 days. The write date of the file is September 6, the comment below says he started writing it on September 2.
Re:The earliest version of HN I can find; 166 LOC by sanj on Saturday July 25, 2009 @07:26PM (#723822)
What's the LOC now?
Re:The earliest version of HN I can find; 166 LOC by jrockway on Saturday July 25, 2009 @07:31PM (#723830)