GP: Please use the word rape to the full extent provided by the english language, and let those who don't like the word deal with it.
As for the benchmark, who writes their own load balancer? Isn't this generally a solved problem? If the point is to extract max performance from a simple ping-pong server then I'd go right to C and epoll/libevent/etc. I'm guessing that the team is somehow trying to extrapolate data from a ping-pong server to the actual problem they're trying to solve which is dare I say, stupid.
In general the best way to solve this problem is use whatever language the team / person writing the software likes because having them write it faster generally outweighs whatever server costs one will run into, whenever this is not the case the best answer is 99% of the time: write it in C.
Not really. Ravish might. But other than on, say, gamer message boards, 'rape' doesn't have many other meanings than forcible sexual assault. Take a look at the usage in print and find casual uses of 'rape' in that context.
rape 1 |rāp|
noun
[...]
2 the wanton destruction or spoiling of a place or area: the rape of
the Russian countryside.
Source: New Oxford American Dictionaryedit: styling, source
Interpretation of natural language is strongly influenced by lexical connotations. If you use a negative word in your sentence, people will have negative reactions to it, regardless of your intent.
In practice most people who do this are merely profoundly ignorant and unsympathetic, rather than overtly being assholes. But yes, if someone intentionally choose to use words with upsetting connotations, I consider them an asshole.
Everyone has the right to not care about those people being offended.
And everyone has the right to consider those people assholes.
People getting upset by mere words (not even uttered against them) are hardly worth a hackers time.
Also notice how you, the oh-so-sensitive to the "emotions of strangers" and the "meanings that upset people", called him "an asshole" (for merely suggesting the use of a word). Way to go for tolerance.
And perhaps I'm being hypocritical by insulting people, but I get angry when I see people with this ignorant "Not my problem" attitude to offensive language, and communication in general.
Communication is a two way street. If your messages are not being received as you'd like, is it so absurd to suggest that you consider changing what you say before criticising how others listen?
Well, I'll take any effort needed to avoid language that might upset people -- except the kind of people that are upset by language.
Those I'll take any effort needed to upset them.
I mean, I would not use words that might hurt a regular person or somebody who is actually sensitive to them because of their state/past/gender/color/etc.
But I would very much use all the words that annoy the kind of people who get annoyed by words all the time, ie. the PC crowd. I'm with this Carlin and Lenny Bruce guy on this one.
Rape is a trigger word unlike most other words.
I for one don't sensor myself around my friends, I tend to cross the line, all the time. My friends see me in context smiling or laughing, I know most of their life stories. It's safe to push the limits of hyperbole.
Here we have little/no context. Someone sees the word and they think of something horrible, the place, the person, the smells. All the things that are blocked out on and every day basis.
So why not avoid the word? Just to be kind to a stranger.
Get over yourself. Taking on the title of hacker isn't some prestigious achievement, it's a self-aggrandizing social signal for tech hipsters. Beyond that, every caliber of individual can be upset by 'mere words', including yourself.
This forum is called "Hacker's news" for a reason. And that reason predates "tech hipsters" by 40+ years. It's not an achievement, I'll give you that. But it IS a culture, and that culture doesn't take self-censorship and puritan values very well...
>Beyond that, every caliber of individual can be upset by 'mere words', including yourself.
Being upset when some words are targeted at you or at people you do not think deserve such treatment is normal. It's being upset just because of the use of words that's prudish and bad.
"it IS a culture, and that culture doesn't take self-censorship and puritan values very well..."
These days, the title of 'hacker' is akin to the title 'patriot': everybody knows what a real one looks like and they're all too happy to monkey patch their own arbitrary components into the definition. Last I heard, there is no general stance regarding self-censorship in the hacker community.
Also, I think its an impressive type conversion for you to cast what is commonly described as overzealous liberalism to puritanical religiosity. There is nothing puritanical about respecting the sensitivities of sexual assault victims.
Well, I don't consider it that impressive.
Political correctness is just one method the liberals found to maintain the puritanical religiosity of their past. Just the secullar side to the same coin.
You cannot get puritanism out that easily, you just divert it from religious thinking to other endeavours.
We have the same kind of conversions in Europe too -- not to mention that it's a kind of well discussed topic in literature and psychology.
You'd be surprised, but no, it isn't a solved problem because the problem can't be solved in a general way and a lot of people are writing their own load balancers.
> If the point is to extract max performance from a simple ping-pong server then I'd go right to C and epoll/libevent/etc.
For a ping-pong server, sure, but a ping-pong server has no value in real life. The point of building your own load balancer is for doing custom load balancing and routing, based on individual needs of the project.
The complexity grows exponentially and while big companies are building such things in C, mere mortals do not have the resources for it. And in fact building on top of libevent is not going to give you performance advantages over Java NIO. The only thing that sucks about building on top of the JVM (compared to C) is the garbage collector, that can lead to unpredictable latencies related to blocking the whole process during the marking phase, even with CMS, although it is manageable and much better productivity-wise than to deal with GLibc incompatibilities or with multi-threading in C, plus I hear that G1 from JDK7 for large heaps and CPUs with multiple cores, or Azul's pauseless GC are awesome.
There's always a tradeoff of course, but sometimes the best path for many projects is the solution that makes the best compromises between productivity and performance and that's why I'm a happy Scala user and love the JVM.
Sure, even for people who are experienced with it it takes a bit longer to write robust code in C than it does in a higher level language, but the performance benefits can be enormous. If you've got a well defined block of functionality that needs to be quick, you might well be better off taking the time to do a C implementation than you would be spending ages optimising a Scala implementation.
Of course I spend a lot of my time arguing the opposite at work - we write a lot of C++ out of habit, but it's not performance critical at all and it's running on Linux on an Intel Atom. We'd be a lot more productive writing the app in (for example) Python.
[1] Short version, yes, lot's more than in any single language you use (cheating slightly here by counting C and C++ together). Go a few levels down in the stack of whatever you're writing and you'll get to C/C++ probably quite quickly, or worst case at the OS (and if you don't have an OS, then you're writing embedded code, and you started in C).
With all due respect to embedded software, the stuff that you have to deal with is limited in scope. I'm not saying it isn't hard or challenging, but nonetheless it is limited in scope. And this matters - I also worked a lot with C/C++ and while C/C++ developers can easily reason about things like cache locality or branch predictions or data structures, if you want to block them at an interview the easiest thing to do is to ask them to do some strings processing. The point of having high-level abstractions is to build bigger, more complex things and with C/C++ the pain starts straight from the get-go.
> even for people who are experienced with it it takes a bit longer to write robust code in C than it does in a higher level language, but the performance benefits can be enormous
Err, no, not really. Tackling multi-threading issues in C is absolutely horrible, coupled with the fact that C/C++ do not have their own memory model, so you end up with really hard to reproduce bugs by just updating some packages on the host OS. Libevent has always been a joy to work with in the context of multi-threading, the result being a whole generation of insecure and freakishly sensitive servers.
On top of the JVM you've got a good memory model, you've got multi-threading done right, you've got async I/O without headaches and as far as the concurrency model is concerned, you can take your pick from light-weight actors, futures/promises, shared transactional memory, parallel collections, map/reduce and so on, without any of the associated headaches.
There's also the issue of using all the hardware that you have. We are only scratching the surface of what can be done in terms of GPUs, but a high-level language running on top of the JVM or .NET makes it feasible to use the available GPUs or other available hardware resources by using high-level DSLs. The Liszt DSL is a really cool example of what I'm talking about: http://liszt.stanford.edu/
So if you mean "performance" as in measuring the time it takes for a while-loop to finish, then sure C is the best, but go further than that to efficient usage of all available resources and the problem is not really black and white.
> you would be spending ages optimising a Scala implementation
That's not true in my experience. At the very least with the JVM you can quickly and easily attach a profiler to any live production instance. In so far as profiling and debugging tools are concerned, the JVM is the best. And that's where the real difference comes from my experience in the real world - optimizing without real profiling is premature optimization and low level optimizations many times stay in the way of more high-level architectural optimizations with better benefits.
Speaking of spending ages on stuff and the server-side, good luck debugging what happened from a 3 GB core dump generated on a segfault, because somebody though that an Int is actually a Long.
Also, just lust week I tested our servers on top of Amazon's c1.xlarge instances, which have to be 64bits, servers which are normally running on c1.medium which are very cost efficient, but that are better left to run with a 32bits OS. In 15 minutes I was able to basically migrate from 32bits to 64bits. Good luck doing that with C/C++.
The short answer for me is all the great tooling that comes with a JVM solution as well as the simplicity of deployment. Getting a C/C++ native solution to play nice with a continuous integration environment is often very painful (especially compared to a system that is JVM only). Unit testing tools are better for the JVM, IDE/Debugger/Profiling support is better, etc.
All of these things (and the fact that good JVM code can be very close to C/C++ performance) means I don't roll with C because it's scary, rather because it's a pain.
You wouldn't expect people to react positively to violent body language while you deliver a nonviolent sentence, why should you expect them to react positively to you using violent metaphors in a nonviolent sentence?
But hackers strive to be.