HNHacker News
TopNewBestAskShowJobs

gnufied

2,557 karma · joined March 2, 2007

submissionscomments
gnufied··on "Ruby developers need to stop using EventMachine. It's the wrong direction."
Author of Packet (https://github.com/gnufied/packet) a Reactor library that did use Ruby IO primitives here. I wrote this before, eventmachine had pure Ruby reactor. Non blocking calls were introduced in Ruby 1.8.5 IIRC and my library made heavy use of them, and they were buggy. Some issues I found:

* select() call used to segfault. * the non blocking read/write behaved very differently under different OSes and I am not talking Windows. There were differences between Linux and OSX for example. * Again frequent crashes when reading/writing when nonblock flag is set.

I am sure, situation is lot better now but for building a reactor library, native Ruby IO primitives fell short. There is always lack of advanced selectors (Epoll/KQueue) as well.

Now as I replied to thomas(?) below and since you yourself have wrapped libevent for Ruby 1.9, there were severe limitation in interpreter back then for even libevent wrapper to work. So I guess, given historical reasons, it made sense Eventmachine did not use native Ruby IO primitives or libevent.

gnufied··on "Ruby developers need to stop using EventMachine. It's the wrong direction."
Zed shaw tried to make libevent work with Ruby, but this was when we had Ruby 1.8.5 and there were problems with Ruby interpreter that prevented this (around threading IIRC).
gnufied··on Amazon reopen wiped Kindle account
Depends on where you are. It might be pretty good when dealing with Amazon in US, but I have been on the receiving end more than once when I order stuff to India. One of books I ordered, I never received and yet it was marked delivered in their history. I did not know what to do back then and case got closed just like that.
gnufied··on Amazon reopen wiped Kindle account
Not many have fortitude or resources to make it to the front page of HN, Wired etc. I can somehow relate (http://gnufied.org/2011/08/30/the-applecare-story/) how powerless an individual feels when faced with a large corporation offering no explanation or help at all. In the end Amazon corrected the mistake without offering any explanation makes it worse.
gnufied··on LinkedIn Mobile Moved from Rails to Node: 27 Servers Cut and Up to 20x Faster
If I had a choice I would have certainly picked EM. But I am not sure, how much of Rails code can be ported over to Event driven model of EM. I think the only thing which can be reliably ported is models.

Now, they did evaluate EM apparently and according to them node.js performed 20 times better than EM/twisted in certain tests and hence they went ahead with node.js. I am curious as anyone else to see, what those tests were.

gnufied··on LinkedIn Mobile Moved from Rails to Node: 27 Servers Cut and Up to 20x Faster
Ability to stream stuff from an Event driven reactor loop makes lot of sense when it comes to raw performance actually.

If you throw in Postgres database in mix which supports asynchronous queries - one can pretty much beat 20 passenger instances serving similar request. The problem again though is, doing non-blocking IO does not reduce database load. So, if likely they re-architected that bit as well.

gnufied··on LinkedIn Mobile Moved from Rails to Node: 27 Servers Cut and Up to 20x Faster
The title is misleading. From original article[1]:

> They found that Node.js, which is based on Google’s V8 JavaScript engine, offered substantially better performance and lower memory overhead than the other options being considered. Prasad said that Node.js “blew away” the performance of the alternatives, running as much as 20 times faster in some scenarios.

So according to original article, Node.js did not perform 20 times better compared to existing Rails based backend. According to Prasad, it performed 20 times better than alternatives of Node such as - Eventmachine & Python Twisted (they did evaluate both of them).

Now I am having hard time believing node.js can outperform Eventmachine or Twisted by 20 times. Most benchmarks I have seen and done tell me, node is marginally ahead. I would obviously like to see, what they benchmarked and how?

1: http://arstechnica.com/information-technology/2012/10/a-behi...

gnufied··on LinkedIn Mobile Moved from Rails to Node: 27 Servers Cut and Up to 20x Faster
From original article[1] (Not the highscalability link spam):

>This led them to a model where the application is essentially piping all of its data through a single connection that is held open for as long as it is needed.

So it sounds like from using a request/response driven architecture, they adopted streaming architecture. Also, they moved away from Rails and adopted an Event driven approach.

It is well known fact that, it is almost impossible to stream stuff with Rails currently and hence adopting a event driven approach made sense. I can see, how just these two factors alone will contribute hugely to performance.

[1]: http://arstechnica.com/information-technology/2012/10/a-behi...

gnufied··on RailwayJS
I daresay you seem to have wrong impression. Having Rails app for typical web stuff and Eventmachine (em-synchrony) + faye stuff for realtime things work pretty well in actual usage. I can wrap DB calls, memcache/redis, SMTP connections etc inside my event loop and can achieve near same performance as a Node app.

The alternative of using node.js for everything sounds good but I am not really sure, how good node and its web frameworks are for building typical CRUD applications. Rails really solves building database backed applications problem pretty well.

gnufied··on RailwayJS
In a language like Ruby or Python by using Fibers or Co-Routines(Greenlets), one can get benefit of non-blocking IO at the same time avoiding code spaghetti.

Gevent in python for example is pretty popular and similar is the case with Em-synchony in Ruby.

I have used callback objects but really that is not even close to what one can achieve with Fibers or Greenlets.

gnufied··on RailwayJS
May be not as much clear. But Ruby world has plenty of options for Websocket as well. I have built production Websocket server on top of Goliath and Faye and it works like a charm.

https://github.com/faye/faye-websocket-ruby

Faye is the the most feature complete websocket implementation out there and it works quite well.

gnufied··on Quit My Job For Consulting: Two Months Later
I love the idea of day rate, it means so much less stress as consultant. But what if, the client can afford only lets say 20 hours per week of time?

I am having somewhat of hard time working with clients who do not want fulltime though because:

a. Even though they pay only 20 hours of my time, they assume 100% availability. b. It gets awkward with them when they suddenly want to increase the hours but I have already committed my remaining hours elsewhere.

gnufied··on I’ll Give MongoDB Another Try In Ten Years
No. He is saying out of all faults Mongo has - blog author picks the one which is rather well known.
gnufied··on How Apple's Obsession with Google Is Hurting Apple
I agree with - we do not know if Apple did what it did just to hurt Google but how about coming clean to its customers.

How about saying - "Dear iPhone users, your iOS map experience might downgrade little bit in certain cities of the world after upgrading to iOS6, because Google chose not share their Map data with us. We apologize for incovenience but we are working hard to ensure our own Map coverage improves worldwide "

gnufied··on The man who singlehandedly carved a road through a mountain
I originally come from same region this story is about and currently as we stand Bihar is one of the poorest states in India. Much of road work in Gaya district happens courtesy of Japanese govt. funds (Gaya is a popular Buddhist tourist attraction).

Now back in 1960 I can only imagine the chaos the country was in. We just got independence. State and central govts are just figuring out, how to run a country. How to channel funds where the need is most. There is whole bureaucratic and panchayat system which is still being established. Also a state funeral after 47 years hardly can mean anything other than the deed was well done.

Having said all of above, Bihar is still a poor state. Current state govt. is trying but I wouldn't be surprised if similar things happen again. It is not very unusual for entire river bridges to be washed away during some rain and villages to be cut off from rest of the world (even now).

gnufied··on Hacker Guru (self-proclaimed) Ankit Fadia’s website Hacked (again)
Well, most Indian programmers know Ankit Fadia is a joke, and I understand collective fun we had - but at the end of day, this news is not hackernews worthy.
gnufied··on Xiki: A shell console with GUI features.
How does it work with environment switching tools like rbenv, rvm ?
gnufied··on Screw the Black Swans: Ichiro is our role model, not Barry Bonds.
While I agree that bit of Dave's article is about trying harder to appeal to underdogs. Is YC investing in companies abroad then? I am not talking about companies started abroad but essentially cater to US and/or global audience(I know you guys do invest in such companies) but Companies for example that were started in India and cater to Indians. Is YC investing in such companies? Last I wrote to YC, answer was no.
gnufied··on Mac OS X 10.8.1 is out.
Have you tried:

"To fix this, I removed all the remembered locations and then in Configure Network Prefrences -> TCP/IP changed Configure IPV6 to Link-local only."

EDIT: It did seem to make things better for me, where after waking up from sleep it at least automatically reconnects, but it is still not same as Lion I think.d

gnufied··on Rails, callbacks, workers, and the race you never expected to lose
Good points over all. If you don't want to disable transaction fixtures for certain specs and still want to use after_commit, I have this little patch - https://gist.github.com/3205621 which works flawlessly.

And I liked author's solution of tracking attribute changes. But may be there is a cleaner way. I had similar problem where, I needed a handle on after_commit :on => :update but in observer.

gnufied··on Show HN: Olympics Ranking Adjusted by Population (Evening Project)
It is not about climate or heat. More :

http://blogs.wsj.com/india-chief-mentor/2010/02/16/indian-en...

I believe deep down Indians being bad in athletics is similar to being a entrepreneur is hard in India. The reason is - individual freedom or individual decision making has never been our strong point. So, the one who walks off the beaten path is always unfairly judged by the society. Sure, those who succeed on this path are worshipped like gods here, but when you are starting small, you are up against huge odds. And it starts from your family. It is hard work.

gnufied··on Show HN: Olympics Ranking Adjusted by Population (Evening Project)
Sure. Look at my other comment below. We are def. proud of democracy, freedom of speech and lot of small things we take for granted and none can deny self confidence in young educated Indian.

But we are not China.

gnufied··on Show HN: Olympics Ranking Adjusted by Population (Evening Project)
You have setup a straw man here, I hope you realize that. I have never been to China but I will accept that living conditions there - are better than India.

However, we _are_ somewhat proud of our democracy (even though we hate it most of the time) and compared to China human rights situation and freedom of speech is more respected in India. Yes, you can pick few cases where - some right wing idiots pulled a stunt here and there but those things were criticized by everyone and afaik govt. and police does seem to work to protect that freedom.

gnufied··on Show HN: Olympics Ranking Adjusted by Population (Evening Project)
May be you have met wrong sort of Indians (nationalistic) ? I along with nearly everyone I know - understands that India is far behind China. We truly suck as society. Rate badly on corruption, infrastructure, women, minority rights.

There is nothing to defend.

gnufied··on Show HN: Olympics Ranking Adjusted by Population (Evening Project)
In India - it is just not possible to make a living out of athletics. It is largely true and partly just a perception problem. The only sport where you can make a comfortable living is basically Cricket and thats about it.

I know few of my friends who were state/national level table tennis and Badminton players but decided to let that thing go and opted for engineering degree because of pressure from parents etc.

Heck, I along with my friend are running a startup and one of the things my friend's dad asked is - "who will marry their daughter to you?". And this was for a brilliant embedded programmer who quit his regular to do this thing.

I can't imagine hardship (and hilarity) involved in finding prospective bride/groom for someone who "runs" for living. This thing is a no go clearly in Indian society.

gnufied··on Zyngapocalypse Now (And What Comes Next?)
I play Dota2 and has never bought or traded any item. Agreed Dota2 will be free to play, but compared to TF2 - it brings another aspect which is professional game play and ability to watch it within Dota client.

I am not sure, how much money valve will be making eventually but they are already selling tickets for watching professional games within Dota client. I think once it comes out of beta, selling tickets of professional games is a element we can't ignore. remember nearly 40-50K people turn up to watch any competitive dota2 game.

gnufied··on Gabe Newell Wants to Support Linux, Because Windows 8 is a 'Catastrophe'
It is one thing porting Steam to Linux and quite another making actual games available on Linux. Take OSX for example,a platform where Steam has been available for awhile now. and yet around half of most played titles on Steam are not available on OSX. What is more - Dota2 valve's own game is not available.
gnufied··on Goldman Sachs and the $580 Million Black Hole
If I am reading the story correctly it was. "And Mr. Elliott assured Ms. Baker that investors were worried about the market in general, rather than L.& H. in particular"
gnufied··on Show HN: Action.io - 0 to Rails in 60 seconds in your browser
This is of course offtopic but I meet lot of people who think Chef/Puppet are not written in Ruby. There is something in wanting to talk about a tool without actually using it.
gnufied··on Ruby Fiddle: Ruby Snippets in the Browser
One of the things that makes jsfiddle somewhat more useful is ability to play with Canvas and SVG from browser. Is it just me or when you make an interpreter run in the browser without any visual elements the whole thing appears a bit meh.
← PreviousPage 13 of 16Next →