News for hackers. Stuff that matters.
Re:“I'm basically giving myself a permanent vacation from be... by adamnemecek on Thursday July 12, 2018 @12:16PM (#17516031)
Even though I write python only if it’s going to be like 200 loc tops, it’s insane how gracefully the language has aged. It came out in 91, thus predating for example Java. Fun fact, I believe the very first google scraper was written in it.

At the same time I can’t wait for the next language to replace it.

Re:“I'm basically giving myself a permanent vacation from be... by sametmax on Thursday July 12, 2018 @12:52PM (#17516428)
People often don't realize this. We hear a lot that python is moving too fast or too slow. To say that disregard the delicate balance the language had to dance on for 20 years. It's crazy.
Re:“I'm basically giving myself a permanent vacation from be... by adamnemecek on Thursday July 12, 2018 @12:57PM (#17516476)
Agree but it’s closer to 30.
Re:“I'm basically giving myself a permanent vacation from be... by brettcannon on Thursday July 12, 2018 @05:56PM (#17518959)
28 if you want the exact number. :) Guido started developing Python in December 1989 and went public with it on Usenet in February 1991 (Unicode 1.0 was standardized in October later that year to give perspective of how far back that was in the tech world).
Re:“I'm basically giving myself a permanent vacation from be... by vram22 on Thursday July 12, 2018 @04:46PM (#17518450)
>Fun fact, I believe the very first google scraper was written in it.

Fun "fact": I need to check my facts, but it could be that the very first Google was written it it, too :)

Checked:

https://www.google.co.in/search?q=what+language+was+google+s...

https://en.wikipedia.org/wiki/Google_Search

https://en.wikipedia.org/wiki/History_of_Google

Re:“I'm basically giving myself a permanent vacation from be... by kgwgk on Friday July 13, 2018 @05:47AM (#17521638)
That’s what he said :-) (first google scraper = scraper used in original google implementation)
Re:“I'm basically giving myself a permanent vacation from be... by vram22 on Friday July 13, 2018 @11:02AM (#17523490)
Okay, I thought he meant a product that scraped Google sites.
Re:“I'm basically giving myself a permanent vacation from be... by anothergoogler on Thursday July 12, 2018 @12:40PM (#17516304)
Python hasn't changed much, but the world around it has. For better or worse, when jobs in the language were few and far between, it was a friendlier and less competitive community.
Re:“I'm basically giving myself a permanent vacation from be... by petters on Thursday July 12, 2018 @01:34PM (#17516829)
Wasn't the first Google scraper written in Java? I saw an old Usenet post by Page from about 1997 asking about user agents in Java.

Perhaps that was the second scraper.

Re:“I'm basically giving myself a permanent vacation from be... by adamnemecek on Thursday July 12, 2018 @01:42PM (#17516900)
> Perhaps that was the second scraper.

I believe that is the case yes. However correct me if m wrong.

Re:“I'm basically giving myself a permanent vacation from be... by secure on Thursday July 12, 2018 @02:29PM (#17517318)
Yes, Larry Page’s first crawler was in Java, and Scott Hassan rewrote it in Python.

From https://www.vanityfair.com/news/2018/07/valley-of-genius-exc...:

> Scott Hassan: In the fall of ’95, for some reason, I started hanging out with Larry in his office. . . . At the time, Larry was trying to download a hundred pages simultaneously. And I was fixing some of the bugs that he was having with Java itself, and this went on for weeks, if not months. And I remember thinking, Wow, this is insane!, because I was spending a lot of time fixing this underlying tool. And so one weekend, I just took all his code, I took his whole entire thing, and threw it all out, and rewrote the thing that he’s been working on for months very quickly—over a weekend—because I was just sick and tired of it. I knew I could get the thing working if I used a language I knew very well, called Python. I wrote it in such a way that it could download 32,000 pages simultaneously. So Larry went from barely downloading a 100, to doing 32,000 [pages] simultaneously on a single machine.

Re:“I'm basically giving myself a permanent vacation from be... by cutler on Thursday July 12, 2018 @09:15PM (#17519862)
32,000 pages simultaneously - in 1995? Async has only recently been added to Python, no?
Re:“I'm basically giving myself a permanent vacation from be... by mathgenius on Thursday July 12, 2018 @10:30PM (#17520105)
Re:“I'm basically giving myself a permanent vacation from be... by scandox on Friday July 13, 2018 @04:01AM (#17521231)
Doesn't select have a maximum of 1024 file descriptors it can handle at any one time? Or some such?
Re:“I'm basically giving myself a permanent vacation from be... by __sr__ on Saturday July 14, 2018 @01:46PM (#17531379)
By default, yes. But it can be increased. See limit(1) and ulimit(1).
Re:“I'm basically giving myself a permanent vacation from be... by gcb0 on Thursday July 12, 2018 @10:54PM (#17520187)
is that a fact or are you guessing?
Re:“I'm basically giving myself a permanent vacation from be... by adamnemecek on Thursday July 12, 2018 @10:57PM (#17520198)
select doesnt scale well.
Re:“I'm basically giving myself a permanent vacation from be... by boyter on Thursday July 12, 2018 @09:22PM (#17519885)
Using threads maybe? Id be curious to see how you would achieve that in Python easily back in 1995.