Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't "import minecraft" enough?


Relevant xkcd reference :

http://xkcd.com/353/


Yes, this 500 lines statement is somewhat misleading. This program isn't written on Python, rather on a large specific library which does a lot of heavy lifting.

It's better than nothing, though, to be able to look at an app dissected even to a few large blocks.

Kudos.


Pyglet handles a lot of low-level drudgery involved in talking to OpenGL, setting up a window, dealing with input, etc. It's similar to SDL or GLFW in that regard.

I've written that code several times, and honestly nobody is any less of a programmer for using that instead of dealing with the bullshit themselves.

It's similar to complaining about using the Node abstractions for IO instead of manually adding that yourself--it's just being silly.


When there are libraries to do the heavy lifting for you, I would still say that the 500 lines is rather accurate. I have never taken the "X lines of code" to refer to all the libraries included, but rather to the lines of code necessary for a new user to write in order to make something that works.

I agree that it can be distorted, by defining everything as an external library, but it does give a good measure of how quickly one can pick up a new tool and make something useful.


We have different definitions here. As poster above said, in the limit it's just "import minecraft". I'd then argue after e.g. Paul Graham in "On Lisp" that you're modifying language when you're adding new facilities - like functions - to it. That allows you to much easier solve your problem - in the language which you created for that, rather than in the original language.

In this example a lot was done in the external library which was imported. The rest is a little bit of Python with crucial use of those facilities offered by imported library. So I'd say it's not Python - by much - which this program is written on. But that's just a definition - I find it useful to define it this way, but it's certainly not the only possibility.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: