Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
irahul
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
31.
▲
by
irahul
11y ago
Haven't used flask in some time now, but most of your objections are missing the mark. > GLOBALS: Flask has a lot of globals (from flask import g, request, current_user, etc.) A better web handler function looks like this handle(req
32.
▲
by
irahul
11y ago
> publishers have the right to respond, either by blocking access to ad-block users All the best with that. The number of sites on which I will have to disable ad-blocker because you won't show the content otherwise is in single dig
33.
▲
by
irahul
12y ago
> it genuinely interests me how Vi users put up with the constant need to strain their pinky to switch to command mode. Is it any different from how emacs users put up with Ctrl/Alt? You aren't looking to switch, but if anybody
34.
▲
by
irahul
12y ago
What problems are you facing? Setting up evil mode takes just what the emacs wiki says. 1. Install emacs. Start emacs. "Alt-x package-install" press enter "evil" press enter. 2. Open your .emacs or .emacs.d/init.el.
35.
▲
by
irahul
12y ago
What is there to learn about the terminal? You learn the shell, coreutils, shell scripting, sed, awk, editor...Learning these isn't a measure of competency. If you just want name dropping, John Carmack works in Visual Studio, Notch wor
36.
▲
by
irahul
12y ago
> 5. :map <M-f12> @z to execute buffer z 6. Hit Alt-f12 over and over until I'm done Why map? @z and @@ till your are done? Or if you have this in your vimrc: vnoremap @@ :normal! @@<CR> @z, visual select, and
37.
▲
by
irahul
12y ago
> Remember, kids! ":set paste". Or get used to ctrl-[ which is easier to type than Esc, doesn't skip events(like ctrl-c), and doesn't interfere with anything.
38.
▲
by
irahul
12y ago
I am not sure which version of vim you are on. I have been using clibpoard paste for a long time in Ubunut. Do a ":version" in vim and check if it's compiled with +clipboard. If it is, then it should work. Also, you can have
39.
▲
by
irahul
12y ago
> If we could just have tail call optimization, I think we could make the rest work Manually thunk/trampoline it? class trampoline(object): def __init__(self, fn): self.fn = fn def __call__(self, *
40.
▲
by
irahul
12y ago
> I've never needed to use the rackup "rack" command directly, fortunately, if you do you ought to use a different alias Or escape alias \rack
41.
▲
by
irahul
13y ago
> I will most likely soon build my own static site generator, because none of the ones out there do exactly what I want. Why bother with the templating? Use Jinja2?
42.
▲
by
irahul
13y ago
Idiomatic go concurrency uses channels for synchronization and passing data around. You shouldn't be writing to shared data from multiple co-routines.
43.
▲
by
irahul
13y ago
There isn't much to a good looking editor. For me, it's choose a decent font and a color scheme and I am done. Emacs: http://i.imgur.com/NBZJSd6.png Vim: http://i.imgur.com/LnnVUQe.png
44.
▲
by
irahul
13y ago
> Or, were you demonstrating the method overriding + calling to parent use case? Yep. This gist is what I run co-workers through for demonstrating OOP in JS.
45.
▲
by
irahul
13y ago
I prefer to keep things simple. https://gist.github.com/rahulkmr/9482010 It makes working with teams easier.
46.
▲
by
irahul
13y ago
inoremap <C-x>c <esc>bgUWea Type the identifier in lower case, and then <C-x>c(or whatever you feel like mapping it to).
47.
▲
by
irahul
13y ago
> There's also poor testability, inability to re-use functions that reference the request internally, inability to statically analyze dependencies (less of an issue in Python, since the lack of types makes it hard to analyze them an
48.
▲
by
irahul
13y ago
> No more so than werkzeug since it works the same way. I don't know if you are being intentionally dense. Werkzeug doesn't work the same way. Thread locals restrict themselves to thread lifecycle; werkzeug locals restrict them
49.
▲
by
irahul
13y ago
> The request object is a threadlocal (or, if greenlet is installed, a greenlet-local). request objects aren't stored in python's thread local storage. If they were, a thread re-use will leak context local. Werkzeug uses the th
50.
▲
by
irahul
13y ago
> So you're saying that if I don't use multithreading my global variables are not, in fact, global? The request object is context local. If there are multiple concurrent requests, all request have different request objects. I d
51.
▲
by
irahul
13y ago
> "In almost every case where we allowed non-local effects, it has bitten us. Badly." But the request object in flask is not global. If the guarantees break(request locals leak to other requests), it will be a problem. I never
52.
▲
by
irahul
13y ago
> Views are functions from Request to Response in Django, The thing that irritates me about django is request is passed as an argument, and if you need if further down the chain, you have to pass it around. I want the request object to b
53.
▲
by
irahul
13y ago
Not compiling when assets haven't changed is a problem. I have been experimenting with https://github.com/ndbroadbent/turbo-sprockets-rails3 - seems to work so far. For me, the more important thing was not compili
54.
▲
by
irahul
13y ago
I would actually worry about LDPATH first before trying lxc.
55.
▲
by
irahul
13y ago
Yes. Different branch and uncommitted changes are an issue. Different branch can be solved by switching the branch if `git rev-parse HEAD != git rev-parse branch`. Uncommitted changes can be handled by `[[ -n $(git status -s)]]`(simply abor
56.
▲
by
irahul
13y ago
No it doesn't. But throwing away RVM doesn't fix the things RVM fixes. RVM doesn't solve all problems; that doesn't mean it isn't useful for problems it solves.
57.
▲
by
irahul
13y ago
> Addressed: https://news.ycombinator.com/item?id=6505227 False dichotomy. There is no technical debt. Both Ruby 1.9.3 and Ruby 2 are functional and used in production. It will take some time to totally move to 2, and wh
58.
▲
by
irahul
13y ago
I don't see any point in conversing any further since you are being intentionally obtuse. apt-get doesn't help me with different projects using different ruby interpreters and isolated gemsets(and it shouldn't); rvm does. I d
59.
▲
by
irahul
13y ago
Yes, but that won't solve when I have 2 applications deployed on the same production box. rvm solves it.
60.
▲
by
irahul
13y ago
Do you deploy with Vagrant? I think container might be the way forward, but I am not convinced, and I don't deploy Vagrant to production(containers might be the future for deployment but Vagrant in it's current state isn't).
More ›