Recent submissions

Comment · 11 years ago
Of course HN will always be biased towards followers of the hive. Don't worry, I won't be coming back. ;)
Comment · 11 years ago
Isn't the word 'array' quite obvious that it will create an array? Since PHP 5.4 you actually have the shorthand "[]" version available but it is still obvious to anyone who is using PHP or JavaScript (though JS arrays aren't hash maps like PHP's -- you need an object for that).

But I agree, it's crystal clear for anyone with a minor PHP knowledge. For the rest it's just "clear". (It will still work calling $a['1'] with the quotes so what exactly is the issue? If you mean the drawbacks of type coercion not sure if this example is the best one.)

Comment · 11 years ago
You are absolutely right, strictly speaking it is the same thing. Getting a simple 'Hello World!' from the server though is a different thing but it is by no fault of Apache, Python is just not PHP when it comes to web development in the sense that you need this:

  def wsgi_app(environ, start_response):
      output = 'Hello World!'
      status = '200 OK'
      headers = [('Content-type', 'text/plain'),
                ('Content-Length', str(len(output)))]
      start_response(status, headers)
      yield output

  # mod_wsgi need the *application* variable to serve our small app
  application = wsgi_app
Instead of this:

  <?php

  echo 'Hello World!';
Comment · 11 years ago
> Given any programming task, you're just going to end up with better code in pretty much any other language, especially a functional one.

This is the exact bull* that good hearted Haskell and Lisp guys have to face and fix because of arrogant people like you.

First of all, a good PHP programmer is a good programmer. End of story. You can write crystal clear code in PHP that anyone who started with C (how many I wonder?) or a C inspired language can read. Spreading information and knowledge IS FAR MORE IMPORTANT than debating the language.

Let me ask you a question, did you just happen to read that post that was recently on the front page of HN? The one that showed how much awesome is Lisp comparing to Python? How Python's creator seems to hate Lisp (functional programming)? Did you read it and got to the conclusion that since (perhaps) you are using a functional language then you are entitled to spew crap like that since you are the holder of truth?

Congratulation! PHP is worse than a functional language (you can write functional code in Python and PHP btw) and you are the winning lord of programming languages debates!

Comment · 11 years ago
I think the author got it wrong with the last sentence. The restaurant would be full with people that believe the complexity of said turd is proof of the craftsmanship of that developer and hence he is an Expert(TM). It doesn't matter that the turd adds ZERO to the project (in fact it makes it worse since turd is turd) they all need to feel they belong somewhere and in this case the majestic turd brought them together. Hence the turd is good. This should be a question when you go to an interview for a company: "Do you like turd here? Do you worship the dark lord turd?" If the answer is yes then you definitely don't want to work there.
Comment · 11 years ago
Yes, the internet is full of these so called experts. How do they end up being upvoted here is telling about the quality of the average reader unfortunately.

Sorry if I am hurting feelings here but it is true. You have to be a special flake if you think this is quality content. So please, go ahead with your reactions, they speak volumes about who exactly is the gross of HN.

Comment · 11 years ago
Angular vs Ember perhaps would be more appropriate.
Comment · 11 years ago
I am a bit reluctant about asking this but where do we stand in terms of real world performance? This is such a broad topic, I know, but surely there has to be some in-house metric system about this (perhaps popular web and scientific frameworks, game dev frameworks etc).
Comment · 11 years ago
Any chance he suffered a profound trauma being under surgery? I imagine an utter fear of surgery and this could have been triggered by something really insignificant like a small tingling or just the thought of surgery, of a foreign element cutting deep in your tooth canal. That, amplified over and over (he might even have lost conscience if his jaw was being held in place by a device -- the doctor wouldn't have known it this way) could have given birth of some kind of mechanism of memory wipe, sort of like the one victims of rape or horrible accidents develop as a self defence mechanism to (not?) cope with what just happened. Only in this case it went terribly wrong.
Comment · 11 years ago
Uhm, I just went and had a look at learntomod.com. Are all of the kids these days software engineers? The "Blocks" language / tool looks waaay to complicated, how on earth are kids learning that?! This video for example: https://www.youtube.com/watch?v=IFi2Xr5uQow well that would be a perfect candidate for a college level class, I believe, in teaching how to use visual programming software.

And even if kids somehow really grasp what is going on in there, aren't they damaged in some profound way when they will actually have to deal with code? I remember the shock and horror my colleagues had when in college we went from a visual Java builder software to actual coding in the data structures course.

And also, learning JavaScript as a beginning language? With all of the callbacks / asynchronous paradigm traps? Wow, that is really incredible for a kid to understand!

Comment · 11 years ago
Java doesn't have any optimization flags and the debugging info slowdown makes sense I suppose. That is the exact difference between them, GCC with -O3 is almost 100x faster in another test I just did: 10s for Java, 0.1 for C. When you turn off the optimization flags C jumps right at the same 10s figure though.

Really cool interesting stuff!

Comment · 11 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton