Live data from Hacker News

The eigenvector of “Why we moved from language X to language Y”

erikbern.com

181–190 of 193 posts

Re: The eigenvector of “Why we moved from language X to language Y”

#181

Earlier quoted context omitted.

> whether Go succeeds in the sense this data suggests An interesting thing about this methodology is that it is extremely sensitive to the age of a language. It's possible to switch from an old language to a new language, but not the other way around -- so if you happen to do your measurements after a language has had some uptake but before it's been around for long enough that people have built significant projects…

The sorted stochastic matrix shows that C contradicts your assumption that it's not possible to switch from a new language to an old one. Or, at least, it shows that portions of new language code are occasionally rewritten in C.

I have defined "new language" in my comment as one so new that no significant projects exist in that language, not as one which is newer than C but still arbitrarily old.

> if you happen to do your measurements after a language has had some uptake but before it's been around for long enough that people have built significant projects on it and subsequently gotten sick of it

By this definition, it is not possible to switch from a new language to anything.

It's stated as a binary, but really this defines a continuum of newness, and the metric of the OP is very sensitive to it.

Re: The eigenvector of “Why we moved from language X to language Y”

#182
post #157

Earlier quoted context omitted.

> whether Go succeeds in the sense this data suggests An interesting thing about this methodology is that it is extremely sensitive to the age of a language. It's possible to switch from an old language to a new language, but not the other way around -- so if you happen to do your measurements after a language has had some uptake but before it's been around for long enough that people have built significant projects…

I didn't interpret the results in this post as "predicting the future distribution of language use." Rather, I interpreted the ranking as an indicator of a qualitative trend in that distribution. I think the author also made this very clear. And of course, all things trend toward newness, so your objection there seems more about time or human psychology than the methodology of the post.

From the post:

> I took the stochastic matrix sorted by the future popularity of the language (as predicted by the first eigenvector).

Emphasis in original.

Re: The eigenvector of “Why we moved from language X to language Y”

#183
post #95

Earlier quoted context omitted.

I very much doubt that. Buffer overflows simply wouldn't happen in most languages, and those are the majority of the vulnerabilities we see.

That appears not to be the case. pwillis@windows:~/Downloads$ wget -q -O allitems.csv https://cve.mitre.org/data/downloads/allitems.csv pwillis@windows:~/Downloads$ ( for year in `seq 1999 2016` ; do TOTAL=`cat allitems.csv | grep -v RESERVED | grep "^CVE-$year" | wc -l`; BUFF=`cat allitems.csv | grep -v RESERVED | grep "^CVE-$year" | grep -i -e "buffer.*overflow\|overflow.*buffer" | wc -l`; PERCENT=`awk "BEGIN{print…

Fair enough; I was thinking of the occasional "the whole internet is broken" CVEs we see a few times a year. My impression is that they're mostly C and mostly memory-safety, but that's a human subjective thing.

The right thing would be to weight by severity and number of users impacted, and bundle all the memory-safety vulnerabilities together (i.e. buffer overflow, double free, use-after-free, aliasing violation). I'll add it to the big list of blog posts I want to write.

Re: The eigenvector of “Why we moved from language X to language Y”

#184

Earlier quoted context omitted.

And I share my Go reservations with you, given the whole error-handling (or lack thereof) philosophy as well as information emerging that it may require 100 lines of Go to do roughly the same amount of work as 20 lines of Elixir or Haskell, according to one example at https://medium.com/unbabel-dev/a-tale-of-three-kings-e0be17a... (Although I concluded the Haskell-Elixir equivalency myself based on functional semanti…

Go is verbose. There is a lot of thought behind that, but that is an intentional design aspect of the language. Personally I would not use gin, either net/http, gorilla/mux, or httprouter are solid choices

What is the empirically-determined advantage of verbosity, then?

Re: The eigenvector of “Why we moved from language X to language Y”

#185
post #157

Earlier quoted context omitted.

I didn't interpret the results in this post as "predicting the future distribution of language use." Rather, I interpreted the ranking as an indicator of a qualitative trend in that distribution. I think the author also made this very clear. And of course, all things trend toward newness, so your objection there seems more about time or human psychology than the methodology of the post.

From the post: > I took the stochastic matrix sorted by the future popularity of the language (as predicted by the first eigenvector). Emphasis in original.

Nevertheless, it seems quite obvious the author did not literally interpret the eigenvector as "x% of future projects will be written in Go." Rather, the conclusions he drew were along the lines of "Oh wow look Go is on top, C and Java are still relevant."

Re: The eigenvector of “Why we moved from language X to language Y”

#186
post #13

I appreciate that the author wanted to implement their own eigen vector/value method, but really they should use: numpy.linalg.eig(x)[0] numpy.linalg.eigvals(x)[0] Numerical stability can be hard to get right...

They are just describing power iteration which is a standard technique for finding the primary eigenvector.

It is commonly used for web scale recommendation problems which likely explains it's usage given the author's prior background. Also underlies pagerank.

AFAIK it is quite stable but converges slowly. From my experience within 50 iterations you will have converged to a stable result.

Re: The eigenvector of “Why we moved from language X to language Y”

#187
post #185

Earlier quoted context omitted.

From the post: > I took the stochastic matrix sorted by the future popularity of the language (as predicted by the first eigenvector). Emphasis in original.

Nevertheless, it seems quite obvious the author did not literally interpret the eigenvector as "x% of future projects will be written in Go." Rather, the conclusions he drew were along the lines of "Oh wow look Go is on top, C and Java are still relevant."

I reserve the right to respond to what people say. Commenting on the accuracy of a label is worthwhile regardless of whether the label was meant to be precise or loose.

Re: The eigenvector of “Why we moved from language X to language Y”

#188
post #137

Earlier quoted context omitted.

Why do you say it will scale far beyond? Mat mul is N^3 as is eigenvalue solving. It's actually the second highest eigenvalue. The highest eigenvalue is always 1 for stochastic matrices.

Power method is not matrix-matrix multiplication (which is not N^3, BTW [1]), but rather matrix-vector multiplication. So the power method is N^2*k where k is the number of iterations required to reach precision (usually polylogarithmic). All this being said, scalability is _obviously_ a non-issue when talking about a matrix of programming languages. All methods are constant time. [1]: https://en.wikipedia.org/wiki/M…

Oh right, of course, because you're iterating the distribution. Duh.

And yea, mat mul is not N^3 theoretically, but most implementations are. I've heard that some (mkl maybe) are 2.8, but haven't had someone point code to me. My personal attempts at implementing Strassen were slower than a tuned N^3 implementation, at least for matrices that fit into memory.

Re: The eigenvector of “Why we moved from language X to language Y”

#189

Oi. Another person who thinks the number of search results returned is a real number that means something.... the fact that it gives even plausible results is impressive as the number is made up by googles servers.

Made up? Can you explain? I ask because I'm professionally working on a project which uses those results and I've often wondered about their validity. I know there are...Issues with them in various ways, but what are you aware of?

It's not appropriate for me to give you the details, so I'll just say I wouldn't rely on that at all.

Re: The eigenvector of “Why we moved from language X to language Y”

#190
post #85

Earlier quoted context omitted.

Might as well write it from scratch without POSIX and all the lessons we've learned since then. I think rust opens the door to designing kernels that are small and tight with most of the OS stuff that was traditionally in kernel space moved into user space.

Opens which door? Minix3 is microkernel based and userland compatible with NetBSD. XNU is originally based on the Mach microkernel and has part of FreeBSD bolted on. Both are open source, as are Mach proper and L4. Perhaps someone could start with Minix3 or Darwin rather than Linux or BSD or from scratch. Replace one component at a time in Rust, or D, or Ada...

Easily machine verified kernels that have a high degree of having no security exploits because of buffer overruns or null pointer shenanigans etc...
Post reply on HN