HNHacker News
TopNewBestAskShowJobs

sheng

42 karma · joined May 18, 2013

submissionscomments
sheng··on NUID – An entropy friendly and highly performant unique identifier generator
UUIDs are 120 Bit or less. Depending on the Version you use. But you lose 8 bit on any version because 1 byte is used to decode the UUID version.
sheng··on Testing the 12-inch MacBook's Performance with Windows 10
I know what you mean and the amusing thing is that it used to be the other way around. Back then in the older days of Gnome2 and KDE3 it was possible to use them with other window managers like Beryl and Compiz. These again also provided a 3D desktop experience and in their later development stage they were well optimized and stable. They were the one who blew windows vista out of the water when it came to smoothness, resource consumption and hardware support.
sheng··on OpenGL in 2014
All the whining and complaining makes me wondering how anyone was able to write something with OpenGL at all. This is fascinating because a great amount of people were actually able to write awesome Games and Applications with this API.

Look at the whole lot of mobile devices. I have no numbers to base this statement on but I would be bold enough to claim that OpenGL is thanks to the multiplatform ability by far the most successful graphics API out there. The set of devices that brings some or another form of OpenGL support outnumbers other graphics platforms. This alone is a huge accomplishment. Heck, even Minecraft was able to run on PowerPC systems until they pushed the java version supported[1].

But now I need to look at the link and have to admit that the criticism is still correct. The API is still pretty rough and could see some improvements. I know this myself, I also played around with OpenGL at some point. There is a lot of boilerplate code that needs to be written before you can start yourself with the real game. This was always the case. This is why we always had an engine, a framework to built on.

But to say that it all is a huge pile of shit is a little bit harsh …

[1] https://help.mojang.com/customer/portal/articles/884921-mine...

sheng··on Google Stops Forcing You to Join Google+ When Opening a New Account
IIRC what was innovative about G+ was the circle thingy. Can't elaborate though because I never used any of the social networks intensively yet.
sheng··on Why Python Runs Slow, Part 1: Data Structures
try pycharm, it highlights occurrences of self.pieces with different colors where you are reading from and writing to it. It even makes it visible on the scrollbar.
sheng··on What makes Node.js faster than Java? In a nutshell, it's all about concurrency
I'm always wondering why gevent never gets the same attention other concurrency frameworks do. From my point of view it looks like a very sweet library with useful tools and should work just fine in combination with gunicorn or uwsgi. I never had a chance to test it with some real work load though.
sheng··on Python and Flask Are Powerful
I'm not familiar with SQLAlchemy but my overall SQL sense is tingling here:

  purchase.downloads_left -= 1
Is this the preferred method to update a field? I'm asking because i'm wondering if sqlalchemy will translate this to an sql query similar to:

  UPDATE purchase SET downloads_left = downloads_left - 1;
Because otherwise this might be dangerous.
sheng··on Requests for comment: MP4 Video
thanks for the tl;dr summary, I may give the full discussion a try.
sheng··on Requests for comment: MP4 Video
Why not webm?
sheng··on Real-time applications and will Django adapt?
Another real time application issue that rarely gets any attention is WebRTC. I wish people would start tackling these issues for python/django, too. As of writing this I don't know about any library that would allow me to write a server application in python that would serve as a peer in a WebRTC session. The benefit would be unreliable real time data channels to the server. This can be of great use for games. Of course there are many different use cases.
sheng··on If you move your mouse continually the query may not fail. Do not stop moving
that's the reason why win9x in emulators like qemu and vbox will cause those emulators to eat up the entire CPU.
sheng··on Django plugins you shouldn't start without
> Django Graceful is a set of commands for deployment

> of django projects as fastcgi backends.

Or just use uwsgi[1] and supervisord[2] if possible.

[1] http://uwsgi-docs.readthedocs.org/en/latest/

[2] http://supervisord.org/

sheng··on YouTube, then and now
Oh Youtube, where did you go so wrong …
sheng··on Ask HN: Do any netbooks still exist?
Silly customers won't buy them, unfortunately. It has to be Windows7 or OSX, everything else seems to be a deal breaker.

No offence here, i'm a linux user myself. Everywhere i go and look all i can see are macbook{air,pro} and i can't really understand why anyone would go with such a cage.

sheng··on Flat Surface Shader
it looks quite nice but unfortunately I guess it's by far too power hungry. My GTX 560's fan went up.
sheng··on What makes Lua tick?
would you mind to state some of the so many ways of summing up all the numbers in a list of strings for python? And give a counter example for lua?
sheng··on Apple to patent a mobile-based method and system to transfer money
This is prior art: https://play.google.com/store/apps/details?id=de.schildbach....

You're sending money to your mobile phone and it's stored there via the downloaded block chain.

sheng··on Poll: HN Linux users, what desktop environmemt do you use?
GNOME 3.x Shell