Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
irahul
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
88 ms
·
721.
▲
by
irahul
15y ago
True, but I was objecting to presenting India as one coherent, consistent entity which it is not.
722.
▲
by
irahul
15y ago
India is a big, diverse country in terms of people, culture and economy. The article is pigeonholing a country with over a billion people in sparse categories. Any article talking about "India" is mostly generalizing based on a small datase
723.
▲
by
irahul
15y ago
You can write forward compatible 2.x. Here is a small guide to pitfalls and writing forward compatible code: http://lucumr.pocoo.org/2011/1/22/forwards-compatible-python... Note that he advises leaving print statement be; it's more famili
724.
▲
by
irahul
15y ago
On a related note, I generally simplify the implementation further: P(spam/doc) = P(w1/spam) * P(w2/spam) * ... * P(wn/spam) ------------------------------------------- P(w1) * P(w2) * ... * P(wn)
725.
▲
by
irahul
15y ago
It depends on your definition of real language. I consider Ruby and Perl to be real, production level language, and they are both excellent as glue languages. Python, on the other hand, would need some helper functions to make the interface
726.
▲
by
irahul
15y ago
> Blogs written in 5 minutes (which you can still do in Rails 3) have never impressed me. I don't know. I liked the rails 5 minutes blog demo. I wasn't into rails from the beginning - I followed the recent one http://guides.rubyonrail
727.
▲
by
irahul
15y ago
There is a good chance Jeff doesn't know about the source, and generated using one of the meme generator sites.
728.
▲
by
irahul
15y ago
Going by the reply to your comment(which is dead - I have 'show dead' set in my preferences), I see Poe's law in action http://en.wikipedia.org/wiki/Poes_law
729.
▲
by
irahul
15y ago
>I once wrote a clone of Microsoft Word for a company Out of curiosity, when was it? Wasn't openoffice.org an option?
730.
▲
by
irahul
15y ago
Looking at the rails pjax_rails gem https://github.com/rails/pjax_rails I see it automatically patches layout to return false when the request is pjax. https://github.com/rails/pjax_rails/blob/master/lib/pjax.rb#... layout ->(
731.
▲
by
irahul
15y ago
I am not sure what point you are trying to make. 1. Controlling how long page render takes at the server is under the developer control. 2. The size of network load is under developer control. 3. Client side optimization are under developer
732.
▲
by
irahul
15y ago
OP is measuring page render time on the server. Network latency is variable, and there isn't much one can do to fix it.
733.
▲
by
irahul
15y ago
> 1. Should I do it on the client or the server? I think most applications use both client and server components. If your question is more on the lines of which one plays a major role, it depends mostly on the app. GMail won't be half a
734.
▲
by
irahul
15y ago
> Why not simply switch to Ninja? It's jinja2, not ninja. If you want, you can use Jinja2 in your projects, but the other plugins you use will most likely be using django templates.
735.
▲
by
irahul
15y ago
I saw another post debating "Unix is IDE", and though I am an avid vim/linux enthusiast, there is no denying re-factoring is a pain, and relying on grep/sed might prove disastrous on a large code base. codemod is a regex based interactive r
736.
▲
Codemod - Interactive code refactoring
(github.com)
3 points
by
irahul
15y ago
|
1 comments
737.
▲
by
irahul
15y ago
If you predominantly code in Java, you are better off working in Eclipse, and using some plugin for whatever happens to be your favorite editor. I used to do a lot of Java in the past, and I have used eclipse and vim. Java in plain Vim is a
738.
▲
by
irahul
15y ago
> For refactoring, that's just an advanced text across many files manipulation feature, and emacs certainly can do it, but you might have to work on your .emacs file. Re-factoring is text editing, if you consider parsing to be advanced
739.
▲
by
irahul
15y ago
JVM startup time is terrible, compared to the alternatives.
740.
▲
by
irahul
15y ago
From a cursory glance at https://github.com/eigenhombre/PyClojure/blob/master/core.py it doesn't do anything with the lists yet, other than having a list class which stores the values. As far as lazy goes, how does clojure does it? Thunks
741.
▲
by
irahul
15y ago
I see. I wasn't aware wsgi file wrapper might use sendfile. http://www.python.org/dev/peps/pep-0333/#optional-platform-s... That's environment specific; the wsgi server should define a environ['wsgi.file_wrapper'] if it needs to provide s
742.
▲
by
irahul
15y ago
> There are a couple ways to do almost everything in Python; loops or map, Twisted or threads, unittest2 or nose, and so on There are always more than 1 ways to do something, but Python tries to be directive towards the recommended way
743.
▲
by
irahul
15y ago
> However, we've found reports of sendfile not working properly on certain platforms and we're still investigating, so I'm not convinced at this stage that the problem is with Flask itself. I am confused by your sendfile not working p
744.
▲
by
irahul
15y ago
A common philosophy seems to be that such files should be served statically by your front-end web server anyway, but that is not sufficient in all cases. For example, you might need to process the request through your framework to generate
745.
▲
by
irahul
15y ago
> First, it's quite simple to replace Django's templating engine with Jinja. Yes, it is. But most of the applications are tightly coupled with Django's ORM(auth, for eg, which I use very frequently), and in the end, I end up maintaining
746.
▲
by
irahul
15y ago
While we are at the topic of Python web frameworks, I seriously like Flask's design better than django's. True that django came out before SQLAlchemy or Jinja2 became popular/existed, but I would have loved it had they re-factored. Django
747.
▲
by
irahul
15y ago
Don't run on your whole app on gevent, but only the part which needs streaming/long poll. By decreasing the surface area, you can pin point the bugs arising due to monkey patching.
748.
▲
by
irahul
15y ago
> Downvote this if you're stupid enough to take advice from a tactless wannabe with the business sense of a doorknob. I happened to have read a bunch of his articles(shirtless video, joker, pro-win). I disliked all of them. I read this
749.
▲
by
irahul
15y ago
Even if it were possible, I would stick with @memoize def fib: pass fib = memoize(function ...) has unnecessary nesting, and @memoize is cleaner IMO. I am curious - do you find @memoize confusing? Personally for m
750.
▲
by
irahul
15y ago
> if Python had better function syntax and anonynous functions, decorators wouldn't even be a 'thing' Better function syntax? What's wrong with python's function syntax and how does it relate to decorators? Python does have anonymous fu
More ›