HNHacker News
TopNewBestAskShowJobs

ii

526 karma · joined May 23, 2008

submissionscomments
ii··on An Optimizing Python-to-C++ Compiler
For a set of 27 non-trivial test programs (at about 7,000 lines in total; see the ss-progs-0.0.29.tgz download), measurements show a typical speedup of 2-40 times over Psyco, and 2-220 times over CPython. Because Shed Skin is still in an early stage of development, however, many other programs will not compile out-of-the-box.
ii··on Python extension for Firefox
Unfortunately it didn't work: Alex Badea has actually made a pyxpcom extension for Firefox3, but it is a somewhat different approach as it relies on a matching python being installed on the system and other extensions using pyxpcom may not get registered :( http://vamposdecampos.googlepages.com/pyxpcom
ii··on Dostoevsky on the dangers of science
Read the story.

Edit: I agree that he isn't talking about the "dangers of science". It's more like "Nerd in the city"

ii··on Python extension for Firefox
The most amazing thing is that you can use real Python inside web pages instead of JavaScript (only for your Gecko/Mozilla apps not for all the web for obvious security reasons).
ii··on Dostoevsky on the dangers of science
It's amazing how Dostoevsky captured the dark essence of nerdiness in this story.

Here's the original for those who know Russian:

Его пожирала страсть самая глубокая, самая ненасытимая, истощающая всю жизнь человека и не выделяющая таким существам, как Ордынов, ни одного угла в сфере другой, практической, житейской деятельности. Эта страсть была — наука. Она снедала покамест его молодость, медленным, упоительным ядом отравляла ночной покой, отнимала у него здоровую пищу и свежий воздух, которого никогда не бывало в его душном углу, и Ордынов в упоении страсти своей не хотел замечать того. Он был молод и покамест не требовал бо’льшего. Страсть сделала его младенцем для внешней жизни и уже навсегда неспособным заставить посторониться иных добрых людей, когда придет к тому надобность, чтоб отмежевать себе между них хоть какой-нибудь угол. Наука иных ловких людей — капитал в руках; страсть Ордынова была обращенным на него же оружием.

ii··on Just why did people start using Python anyway?
No killer apps? What about this http://www.python.org/about/quotes/ ?
ii··on Suppose I wanted to write a C++ based web application...
Of course C++ will beat Python in speed if you invest enough time in it. And assembly will beat C/C++ if you invest even more time.

My point is that some people assume that if they would just sit and write something in C++ without putting enough time and effort and skill in it, it would be somehow magically faster and better than high-level language, just because it's C++. They are mistaken.

Python standard library is extremely fast. For example 'list.sort()' in Pytohn could run 3 times faster than C++ 'sort(vector<string>)'.

Here are few examples when simple Python code runs faster than the same code in C++: http://groups.google.com/group/comp.lang.python/browse_threa...

ii··on Suppose I wanted to write a C++ based web application...
Try to rewrite something simple written in Python in C++ first and measure the differences in speed/dev time first.

Chances are you may end up with a story like this: http://groups.google.com/group/comp.lang.python/browse_threa...

Albeit micro-benchmarks may indicate that Python is 100-200 times slower than C++, they may not be applicable to the real world. Python can be very efficient. And when combined with libraries like NumPy, beating it's performance with hand-crafted C++ is difficult.

Emperor has no clothes.

ii··on John Gruber on Flash Player for iPhone
As it was "impossible" for Apple to decide when all they had was the old Macintosh toolbox and NextStep UIs, but they did it. They made Carbon/Cocoa to look reasonably consistent despite huge internal differences.

Linux can do the same with Qt/GTK+/etc. It certainly possible to have high-level UI consistency between multiple toolkits, especially when they all share the same lower-level stuff (X11/Cairo).

ii··on The Google 20 Year Usenet Timeline
I still maintain the point that designing a monolithic kernel in 1991 is a fundamental error. Be thankful you are not my student. You would not get a high grade for such a design :-) -- Andy Tanenbaum to Linus Torvalds

http://groups.google.com/group/comp.os.minix/browse_frm/thre...

ii··on Cloud computing is a trap, says Stallman
They don't have to use the Linux kernel in the first place ... they could use the Hurd, NetBSD or FreeBSD instead ;)

http://www.debian.org/ports/#nonlinux

Linux distros are more GNU than Linux, the problem is in the name -- 'GNU' sounds and looks nerdy and unfriendly.

ii··on Rebuttal to "A hacker's loneliness"
Thank you.

The reason why old people keep telling this BS is that they just don't understand what it is.

They can understand a person practicing musical instrument, they can understand a person working with canvas and brushes, they can understand the scientist sitting around his papers but they can't understand people doing the same behind their computers.

Computers are the whole new medium: we need at least two more generations to make it fully acceptable by average daddy and mommy.

ii··on GTK+ on OSX is finally available
Native GTK is not the Apple problem. GTK developers could use Mac application paradigms instead of Windows's and embrace GNUStep/Objective C for GIMP and GNOME instead of implementing their own toolkit. They made the choice of going Windows-like way, not Apple. That's the reason of why "on Windows for years, but still tricky on MacOSX".
ii··on Software piracy rate by country - U.S. lowest, at 20%
I don't think that it's a direct correlation. It's more about culture and knowledge. Most of armenians, azerbaijans and moldovans don't even KNOW that software can be bought.

PC by itself is a huge amount of money for them (and many of them get it free from rich relatives that make money in Moscow, Europe or US) and everything that is inside is considered already overpriced.

ii··on What can CPython learn from the new JavaScript VMs?
Python already has Psyco[1] and some people claim[2] that Python+Psyco is faster than V8.

[1] http://psyco.sourceforge.net/introduction.html

[2] http://groups.google.com/group/comp.lang.python/msg/f90342f5...

ii··on Microsoft’s Real Problem: Facebook is the New Outlook, and- not Listening to Generation Y
... and switch to something like "Facebook for Enterprise 2.0", not Outlook.

update: I bet every popular web service eventually will have enterprise-oriented version, like Yammer is to Twitter.

ii··on Letter to a Young Procrastinator
I must admit that the best ideas and solutions I have ever had were born under the heavy stress of almost missed deadlines.
ii··on Why Python?
Python could then evaluate the fetchmail --configdump output and have the configuration available as the value of the variable “fetchmail”.

Never ever do it. Python has very good parsers now. Using "eval" is crazy. Python is not just a scripting language like JavaScript, it has a full power of C under the hood, thus it's evaluation must be restricted. Or someone will set your or your client's “fetchmail” environment variable to '__import__('os').remove(...'.

ii··on The Elephant: Why is JRuby such a polarizing issue?
In Python you can do the same: 'if not bool: ...', 'while bool: ...', '[for ... if not bool]'. Crazy one-liners are also possible.

We have just enough formatting flexibility and we prefer readability.

ii··on Chrome Not Ready For Enterprise
Some users are scared to death when they see "ActiveX Plug-in" in "about:plugins" page while others criticize "the lack of ActiveX support". How ironic.
ii··on Google Chrome: Bad news for Adobe
No.

Take a closer look at integrated Gears with local web server and offline JavaScript hooks + ability to run webapps without browser "chrome" from icons/shortcuts.

Now add advanced rich JavaScript/HTML with ready to use open-source libraries on top of the fastest dynamic language VM in the universe and you probably will see that Chrome is more than "just a browser".

ii··on What's new in Python 2.6
Jython uses Java's native threads, there's no GIL.

Update: Jython 2.5 Easter egg

  >>> from __future__ import GIL
  Traceback (most recent call last):
  (no code object) at line 0
  File "", line 0
  SyntaxError: Never going to happen!
http://zyasoft.com/pythoneering/2008/06/realizing-jython-25....
ii··on What's new in Python 2.6
Removing the GIL won't magically solve any problems.

This has been tried before, with disappointing results, which is why I'm reluctant to put much effort into it myself. In 1999 Greg Stein (with Mark Hammond?) produced a fork of Python (1.5 I believe) that removed the GIL, replacing it with fine-grained locks on all mutable data structures. He also submitted patches that removed many of the reliances on global mutable data structures, which I accepted. However, after benchmarking, it was shown that even on the platform with the fastest locking primitive (Windows at the time) it slowed down single-threaded execution nearly two-fold, meaning that on two CPUs, you could get just a little more work done without the GIL than on a single CPU with the GIL.

http://www.artima.com/weblogs/viewpost.jsp?thread=214235

ii··on Google Chrome, Google's Browser Project
Mozilla/Gecko is not just a browser engine, it's a platform (XPCOM) and everything is implemented on top of this platform as XPCOM components/interfaces. The bad thing is that these components are not very easy to use, write and integrate into anything else.
ii··on StupidFilter Project
It's all about quotes. Is it a bug?

I must admit (without quotes) = not stupid. "I must admit" (with quotes) = stupid.

ii··on StupidFilter Project
Easy. I've just copied your message and added "lol!" at the end. It triggered.
ii··on Microsoft web browser that covers its tracks could hit Google’s advertising
InPrivate Blocking feature won't allow the site you're visiting to send information to third-party sites, various ad sites, google-analitics.com and friends included.
ii··on Be a JavaScript Rockstar (jQuery site redesign)
I should have said "in a few hours", lol.

http://jquery.com/blog/2008/08/29/death-to-javascript-rock-s...

ii··on Be a JavaScript Rockstar (jQuery site redesign)
Nice. This whole "Rock star" thing looks to be here only to generate a lot of buzz. I bet they will change it in a week.
ii··on Real programmers don't use frameworks
Frameworks were invented to lower the barriers of entry to programming

Bullshit. Modern frameworks like Django and Rails were extracted from real-life projects written from scratch by real programmers to let the real programmers re-use common web-development code and make it faster and more stable with time.

When you use the framework you still can dive in pure Python/Ruby or even custom C/assembly extensions to optimize your bottlenecks if you really need.

← PreviousPage 4 of 5Next →