skysight-inc/HackerNews huggingface dataset:
> No, actually, there have been situations in the past where using `self` was not the best choice, and I didn't. Using `self` is extremely confusing when defining methods on metaclasses for instance (self turns out to be a class object)

Here's somewhere that Python could have made things easier for you. What's wrong with `self` being a class object? It's something Ruby gets right, in my opinion.

> You completely change the semantics of defining methods and potentially break explicit code.

Yep. In a good way. Guido had a chance to fix this at Python 3, and didn't. Do you seriously not see the benefits of the code I posted?

> The programmer is always the driver, the difference is that decorators allow doing this without adding a pointless syntactic special case.

Yes, the programmer's always the driver, but my point is that in Python the programmer has more driving to do than necessary. The reason this is confusing and inelegant is precisely because it's not a pointless case. Decorators allow doing it, but they're absolutely not the best way, its a (ab)use of a conceptually unrelated mechanic.
I've never jumped on the Node bandwagon either, because I detest Javascript, but...Shouldn't async-style programming be fairly familiar to Javascript developers? At least those who have ever made an AJAX app?

It seems like it was a paradigm shift for the author, but I wonder if it actually is for most people who Node is primarily targeted towards: those who like and regularly use Javascript.
StackOverflow has been very clear that they don't intend to be a discussion site. Even if you like subjective questions, that doesn't mean that a site shouldn't be able to specialize in something else.

I like basketball. But I wouldn't expect stackoverflow to allow basketball questions.

This isn't a judgment on the value of discussions... but there are other sites for that.
Look at it this way:

Async event-driven programming is not going away, it's probably always going to be the most performant model because incoming packets translate into interrupts and kernel mode and thread context switches are expensive.

Javascript is not going away, and has become shockingly efficient with V8.

These are both forces of nature in their own respective domains. So somebody's gonna combine them to implement an async IO reactor system in Javascript. This is Node.js, which looks to me like a pretty decent implementation of the idea.

It may not be your cuppa tea, or the best way to implement every dynamic website. It just is what it is: inevitable.
People probably keep asking "give me the code for x" because they know that someone out there will give them the answer. If they knew that the only reply they could expect to get to that query was a link to http://whathaveyoutried.com (or a curt "RTFM"), they'd be forced to develop their own skills.

By giving them the answers without pushing them to work harder at answering their own questions, we're actually hurting them, not helping them.

But this is a very old observation that long predates programming or the internet. The old Chinese proverb is: "Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime."
> I could also take the works of Darwin and insert references to young earth creationism on every page, but

Something very similar to this exists: A version of Origin of Species with a 50-page rebuttal attached:
https://www.google.com/search?q=creationist+origin+of+specie...
I'm upset because I invested a substantial amount of time without really reaping much of a reward (other than knowing to avoid it). I'm upset because there's a lot of unreasonable hype.
I have been doing async-style programming for a while and still consider it terrible. I had to do it because at the time there were no better alternatives given my constraints. I could have told you then it was a bloody mess when evaluating it and I can tell you the same now. In other words it seems "accessible to brain" and a "better platform" can be independent.
> But using a photo within the context of a blog post on a commercial blog would be ok.

This is clearly forbidden by NC.
Awesome, thanks for the link.

I'd been experimenting with Node.js the other day and ended up reimplementing that 'async.series([...])' function.

Node-lazy is another module that looks very useful.
Demo of client-side S3 uploads using CORS
> Async event-driven programming is not going away, it's probably always going to be the most performant model because incoming packets translate into interrupts and kernel mode and thread context switches are expensive.

That's like saying "assembly isn't going away, because it's the language of the CPU". Of course assembly isn't going away, but other than the Kernel and device drivers, there's not much reason to use it else where.

Coroutines are a much better way to write performant network services. In Go, when a goroutine blocks on I/O, it yields execution to other goroutines. You, the programmer, never think about it, because the platform handles it for you.
Unfortunately it's Windows only which doesn't fix the issue of Twitter for Mac being put out to pasture. It is a great twitter app if you ever use Windows though
If occasional miscategorization by a search engine is a noticeable harm in your life, you're basically living in heaven and it's time to move onto charitable endeavors like world peace and food security.
It feels like the opposite of jury nullification. It grants more power to the state to protect patents than the law has ever been used for. Nullification is historically used as a check on the state, rather than a tool to make the law mean something completely different and much farther reaching. And, of course, it's generally used in criminal cases.

But I don't know how the appeals process will go. I have no idea what makes an appeal possible in a civil case.
Entrepreneur Verghese "Milkman of India" Kurien Passes Away
Could you cite said studies? I studied aerospace engineering in college and was taught that there is no evidence of this beyond a pilot and some air hostesses, at some point a few decades ago, hypothesising that some avionics error was caused by passenger electronics.
That's sort of why I put the "I think" bit on the submission's title.
"Presidential deGrees"?
This is only because you're using AdBlock. The popup window is smaller than it's meant to be since the ad itself isn't being shown.

I don't think Wolfram Alpha cares (or should care) too much that their ads don't render properly when blocked by AdBlock.
Should Investors in the Same Round of Financing Ever Get Different Prices?
Nose.js is a great platform , but not for YOU needs. You don't like Node.js, so you won't like Twisted and Tornado in Python too. The thing you hate is not Node.js, but it is its approach. And the reason is, that it is not designed for YOUR needs. That's all.
Sorry if my post came across as implying that Japanese was "better" to learn, I don't think there is any "best" language to study.

Much like you, I studied another language before I found one that worked for me. I studied German, before I committed to Japanese. I had fun studying it, but I was never excited enough to the point where I wanted to move to Germany. Learning a language is a very difficult process (especially Chinese for English speakers) and having the freedom to choose to take a different language is what allowed me to find one that I was truly passionate about.

I believe that Chinese will continue to remain important, but forcing kids into it might dissuade them from finding a foreign language they truly enjoy. That's all I wanted to say.
The above post is a great example of under-thinking things. It takes as read that one can easily determine what enjoyment and happiness is, something that is incredibly hard to get right over the course of a lifetime.

Most things that are fulfilling in life require a great deal of self-denial for longer term ends. And that self-denial can break you. Likewise, a life of hedonism can leave you feeling unfulfilled and unhappy with your lot.

It's very far from simple.
I assume you're getting downvoted for an aggressive tone, but I can't help but agree. "Lacking rigor" is a generous way of describing the article.
Requiring a tonal language for young children is a great thing–typically adults that speak only non-tonal languages have a much, much harder time learning the tonal structures. I put this in the same category as teaching music to younger children (higher plasticity)

Besides, isnt this the first step to the Mandarin-English pidgin language spoken in Firefly? ;)
> I'd agree that is probably not the best way to write an application with many layers of business logic.

Exactly!

Which, to me, means that it doesn't scale well. (Scaling here refers to growing the size and complexity of the program - as opposed to handling an increasing number of concurrent connections).

And, given this point, why should anyone use it as a platform to build their product on?
I find that stretching my head around a new and different paradigm is it's own reward. Everyone's different and has different goals.

If your goal is to implement dynamic web content as productively as possible, no one will fault you for sticking with what you already know and are comfortable with. But it's not valid to conclude that everything else is terrible if it doesn't improve the type of things that you do.

Personally, I've lost count of the number of times I'd wished a blocking API call was instead non-blocking. Do a survey of how many desktop Windows applications are able to exit gracefully while a File->Open dialog box is still open.
> Async event-driven programming is not going away,

I just made it go away -- started using gevent. You can make it go away also by using an actor based language like Erlang.

If we were in the 90s you'd probably would have said C++ is not going away so that's what all web services should be written in.

> thread context switches are expensive.

Green thread context switches are pretty cheap and Erlang's processes are very light weight. I was running with 100K processes at one point all with long polling (comet style) connections. That's very cheap.

> It just is what it is: inevitable.

Yap but that wasn't his argument. I don't see (even in general) how inevitability of something turns that something into a good thing.
Right, you think that Node.js is a terrible platform for you. I'm pretty sure that everyone here would agree with that statement. You really can't make any more general of a statement than that though given your limited experience.
It's that simple - if any customer electronic devicea disturbance is messing with some airplane systems, then taht airplane should be grounded forever. Full stop.
I see no mention of the duration for which this fee is paid for. Is this $15 fee per year, per month or lifetime?
So that warrants a 'Screw Amazon'. Really?

Amazon is subsidizing the cost of the device through the advertisements. Google subsidizes the cost of email through advertisements. AT&T subsidizes the cost of cell phones through contracts.

I don't understand. Why is subsidizing a device with advertisements suddenly evil?
A word of advice. Stop and think about your tone before you write.

To answer your post:

This has nothing to do with excuses or perceived difficulty. It has everything to do with cost benefit analysis. When forcing a group of students to learn a language, usefulness vs difficulty is a valid concern.

The State Department estimates that it takes only around 600 hours of classroom instruction to learn Spanish, but 2200 hours for Mandarin (for a native English speaker). They also recommend that half of the hours learning Mandarin occur in country.

30 minutes a day for 13 years of school won't provide enough instruction for these kids to become proficient, but it could provide enough to become proficient in 2 category 1 languages.
The async nature of the language and platform is very easily managed with libs like https://github.com/caolan/async, I came from Django and to me, once I mastered the async nature and understood it, nodejs was a breath of fresh air.
What is it designed for?

It's being hyped as a platform for writing scalable web applications. Not simple networking tools or little glue utilities, but large, complicated web apps that people have been using ruby and python to develop.
It's pretty easy to find alternatives to Node.js that are a lot more sound, a lot easier to work with, and a lot more performant if you need asynchronicity. You gain nothing save for the ability to use JS itself, for which the supposed benefits of sharing code are a total wash.

Node.js is async for people who don't actually know what they're doing, but are still willing to push an unnecessary boulder up the hill for the sake of a familiar language instead of learning how the industry's been handling async for the last few decades.

Node.js users "lack rigor", not this guy for questioning the ridiculousness of it all.

Go look at SFS/sfslite and its ilk to see how async is supposed to be done.
I'm the biggest America lover out there but I hate to say the answer may simply be to leave the US. Simply start over somewhere else. There are plenty of nice places that would love to have you.
NO SHOOTING AT PROTEST? POLICE MAY BLOCK MOBILE DEVICES VIA APPLE
I assume it's the same as the Kindle, where you pay a one time premium on the device.
No we are not, we just ignore adverts anyway!
I'm disappointed that the article I wanted to link to, "Startups Should Solve Problems, Not Boredom", is now gone.

http://www.leavesofcode.com/2011/06/startups-need-to-solve-p...

At any rate, he made a related point, that the Valley seems to see every problem as being essentially a flavor of boredom and every problem's solution as being an endless rush of attention-sapping communication (i.e. a social network). The article was really well written; it's a shame it's gone.
Yup, the good 'ol:

Person1: "They should donate so much more that that! God they are such penny-pinchers."

(Person1 donates nothing)
I actually would advice that it's bad in general, not just for me.

If node.js works for you, then I'd argue that Go would work even better for you.

If you don't mind losing some of the expressiveness of python/ruby, then surely you wouldn't mind transitioning from python/ruby to Go. And, what's more, Go is much better suited for large and complex programs than Node.js.
I think that a much better alternative to Node than Python or Go is Haskell. Why? Well, for one, it makes writing asynchronous code very easy--you essentially get it for free. Haskell web servers perform very well while keeping the code readable.

However, ignoring performance, there are also all of Haskell's other advantages. The type system is great--you can do stuff like ensuring links within your app work using the type system. Haskell is also very good at embedding DSLs, which can make writing web-specific code much nicer. In my experience, Haskell code tends to be more concise and declarative than Go or Python, making it easier to read. And, crucially, you can program at a higher level of abstraction which makes it both easier to write and maintain relatively complicated code.

Now, admittedly, going from almost any other language to Haskell is quite a shift. For most programmers, learning Haskell will take a bit longer than learning yet another imperative language (e.g. Go). However, I think this is well worth it, and web apps are a particularly convenient field for it.

This[1] StackOverflow question and an associated paper[2] are very interesting to read about how a Haskell web server could work and have good performance.

[1]: http://stackoverflow.com/questions/3847108/what-is-the-haske...

[2]: http://community.haskell.org/~simonmar/papers/web-server-jfp...

It would also be useful to look at a Haskell web framework like Yesod[3], Snap[4] or Happstack[5]. I'm currently a little biased towards Yesod (which has, coincidentally, recently received commercial backing), but I think the choice of framework is largely a matter of preference.

[3]: http://www.yesodweb.com/

[4]: http://snapframework.com/

[5]: http://happstack.com/
Citation? I'm genuinely curious.

I don't think anyone is against doing something that could potentially save lives -- but I've never seen any evidence to support the current status quo and the number of these types of articles is growing. If there were credible proof of disturbance why isn't it being brought out to counter this debate? This is too big a potential PR problem for the FAA to not try to convince us they're just looking out for our best interests.
wrong. The people most receptive to ads, are the ones who aren't bothered/irritated by them.

Letting people opt out of advertising for a fee, will just remove the small minority of people who would never click on ads anyway. A win-win.
I'm maybe cynical here, but this service will go away within a year. And it won't be because of too high direct costs for the host. It will be because of too much hassle.

When you do something like this these days, you only attract trouble (and a very few well-meaning people): spammers, script-kiddies, pirates looking for cheap storage or seedboxes and hacker groups valuing the anonymity for their releases which in turn will attract DoS attacks which will be a huge hassle for the provider to deal with.

So within a year, you won't only have to deal with too many users taking too many resources, you will also have to deal with annoyed providers, with law enforcement constantly asking for data you can't provide and of course with constant DMCA takedown requests.

And that's why we can't have nice things any more :/
Of course assembly isn't going away, but other than the Kernel and device drivers, there's not much reason to use it else where.

Assembly largely has gone away. It used to be that all serious PC apps were written in asm. Eventually though, C compilers and RAM improved enough to not require that. Today the only things written in asm tend to the absolute lowest-level system routines and a few hand-tuned loops.

But you might also be interested to know that MS embeds the web server in the kernel using async IO (http.sys) and that the WinHTTP client library runs async as well.

Coroutines are a much better way to write performant network services.

I agree native coroutines or CPS would better. There are better choices of development language than Javascript, too.

But it's not the tool, it's the hand and the attitude that wields the tool that determines the quality of the result.
I'm pretty sure he didn't mean recycling previously owned/installed/used/worn parts. I think he meant using previously designed parts --- parts that are components because they have been used in other models before. In other words he's saying most of the parts in this Tesla are debutting with this model, for the first time, anyway. So there's going to be teething issues. R&D rather than pure heads-down production.
I am tempted to make the mistake of asking for the solution almost daily. I am guilty of asking for the solution every few days. Thank you for writing this. I will use these two metrics as way to measure my growth as a programmer.
> But, python is strongly typed

These words, they don't mean jack shit.

> Dynamic typing has some (not all) of the problems weak typing has, but they are not the same thing

Well of course they aren't, for starters "dynamic typing" actually means something.
Note: showing colors in terminals is done through ANSI codes which have varying levels of compatibility with different terminals. For me, this works on an iTerm terminal, with $TERM set to xterm-256color.
Stretching my head around functional programming was rewarding. Stretching my head around lisp was rewarding. Stretching my heard around continuation[1] passing style was rewarding.

Stretching my head around everything-is-async was not rewarding. Just because it's different, doesn't mean it's good.

[1]: http://community.schemewiki.org/?call-with-current-continuat...
Perhaps the answer is not to take the debt on in the first place.
> C and C++ are weakly typed

This, in and of itself, means absolutely nothing. And neither does:

> Implicitly parsing strings to produce numbers isn't weak typing

There is no such thing as a widely accepted, let alone formal, definition for a strong/weak axis, every other guy out there has his own personal definition. What the bloody hell is the point of words for which no two persons share the same definition? No point. None at all. See comment above, it merely marks you as a guy without a clue.
from nodejs.org
"Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices."
That doesn't say to me "create large, complicated web apps with this". As a matter of fact, in my personal use node has showed its usefulness most when I am replacing small parts of my app that function slowly or poorly in some other way and moving toward a more modular approach.
This post shows exactly why "just use code to get things done" can be taken too far and why a solid theoretical background can be essential to growing as a programmer. The author bravely admits, "The async-style of programming is almost entirely inaccessible to my brain." There comes a point on the road to being a great coder where you can no longer really approach it as a craft; the theory and philosophy start to matter. A common plateau is the point where it becomes necessary to see the commonality between essentially the same computation being driven by different control approaches. I've seen many a competent procedural programmer be unable to write their first GUI app because they can't adjust to an event driven model or unable to make the most of SQL because of its semi-declarative nature. Coders need to see such mind expansion as an essential and fun part of the job.
"Now, if they can figure out how a boy band that started out with a following of veritable teenyboppers wound up receiving near-universal adoration, I'll be really impressed."

They were a bit rougher round the edges than your modern boy band, having been playing in 'adult clubs' in Hamburg. Remember the Cavern Club was in Matthew St, not a salubrious district then.

To answer the question: right time, right place, bloody clever manager
Node.js can be made to be plenty writeable and readable once you wrap your head around asynchronous programming. I'd write everything in my life in an asynchronous way if I could.
I encountered the same issue. I found the callback oriented programming style to be confusing and overly complex for the sake of a fast application. Although I managed to build something and still work with it, the uses for Node.JS are quite limited.

Want to build a realtime analytics platform? Node has you covered. Want to build a super lean and powerful server for an iPhone game? Node also has you covered. Want to build a web application that doesn't require anything realtime? Not so much.

Node serves a purpose for a lot of things, anything that requires a lot of connections and continuous streams of data it is a perfect fit, but nothing much else.

As for the Python remarks and websockets, I find Beaconpush does the job well: http://beaconpush.com/ - the server that drives Battlelog on Electronic Art's game Battlefield 3 is a python framework with websocket support, I believe it uses Beaconpush.
> ...or we can assume that the guy isn't an idiot

No, I think we can exclude that one with no issue at all.
Hermes Kelly 22cm Bag 029
Isabel Marant High Top Wedge Sneakers Suede