Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
phleet
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
Starting to Build Things
(jamie-wong.com)
2 points
by
phleet
12y ago
|
0 comments
32.
▲
by
phleet
12y ago
The difference here is that in Python vs C, you almost _never_ actually need to know what's going on under the hood[1]. Whereas in every framework I've _ever_ used, I eventually need to dig into the guts of them because of some le
33.
▲
by
phleet
13y ago
It's definitely totally fine to build these things for fun, but with a landing page like this, it seems like the author built it for some purpose beyond that, otherwise I don't see the point in presenting it in this form. If the a
34.
▲
by
phleet
13y ago
Promises aren't just about keeping things flat. The biggest value to me is being able to avoid the passing around of callbacks and them relying on varying conventions (some async are function(args, ..., callback(err, data)), some are f
35.
▲
A Map of Everywhere My Family Has Ever Been
(jamie-wong.com)
1 points
by
phleet
13y ago
|
0 comments
36.
▲
by
phleet
13y ago
I take a bit of offense of not being referred to as the "actual" Jamie Wong. More important in the context of the startup world, more prolific sure, but this seems needlessly dismissive.
37.
▲
Visualize Chrome JavaScript CPU profiles using KCacheGrind
(github.com)
2 points
by
phleet
13y ago
|
0 comments
38.
▲
by
phleet
13y ago
Sweet - always good to see people using my stuff in the wild :)
39.
▲
by
phleet
13y ago
If you're interested in reading the data with KCacheGrind, you can do that using pyprof2calltree: https://github.com/pwaller/pyprof2calltree The result ends up looking like this: https://f.cloud.github.
40.
▲
Rubber Ducky Logs
(jamie-wong.com)
29 points
by
phleet
13y ago
|
11 comments
41.
▲
by
phleet
13y ago
I agree that this usage isn't really in line with how it's used in mathematical proofs. Do you have a better concise suggestion I can keep in mind for next time?
42.
▲
by
phleet
13y ago
Done.
43.
▲
by
phleet
13y ago
Agreed. I suppose the more important test for library code is "googleability" rather than "greppability".
44.
▲
by
phleet
13y ago
I've done a bunch of work with statically typed languages and am not about to argue that dynamic languages can be as easily navigated or statically analyzed by IDEs as statically typed ones can. That said, dynamic languages still have
45.
▲
by
phleet
13y ago
Agreed. I do comment on dynamic invocation being more problematic when I say "As a broad generalization, I would say dynamic declaration is occasionally worth the tradeoff, but dynamic invocation is almost never worthwhile.", but
46.
▲
by
phleet
13y ago
Your example of adding a comment mentioning the methods called in there would indeed pass the Grep Test, and is a reasonable compromise when there is a real call for dynamic declaration. I think there are definite ways of adding metaprogram
47.
▲
by
phleet
13y ago
I have no problem with autoloading classes (though I suppose me including "modules" in the list might've implied that). If a class is autoloaded, I can still find its declaration and implementation using grep. As for "No
48.
▲
by
phleet
13y ago
functions passed as arguments are fine, because something needs to be passing them. While the function invocation site itself is dynamic, the source of the call isn't. Basically the important aspect is that even if you have higher orde
49.
▲
The Grep Test
(jamie-wong.com)
284 points
by
phleet
13y ago
|
169 comments
50.
▲
by
phleet
14y ago
Ah, interesting. File system access isn't blocked completely: __import__("os").listdir("/evaluate") open("/evaluate/test.py").readlines()
51.
▲
by
phleet
14y ago
The first thing I always try on sites like these is stuff like this: __import__('commands').getstatusoutput('ls /') or __import__('subprocess').call(["ls", "-l"]) which gets blocked by the interpreter somehow with exceptions.OSError - [Errn
52.
▲
by
phleet
14y ago
Yep - totally right. It would involve mocking out the entire browser API in a way that would somehow still follow the same codepaths. That said, it could still catch some things. If the web worker errors out, you just completely ignore the
53.
▲
by
phleet
14y ago
There's a significant amount of voodoo involved (mostly crazy with() {} statements) in the CS editor that only John Resig fully understands AFAIK, but the rough idea used was to ship the code over to a web worker where all the global APIs i
54.
▲
by
phleet
14y ago
This suffers from one of the same problems as most live editors: try typing `while(true) {}` in the javascript editor - the UI thread will block and freeze up the whole page. Worst of all, you'll lose unsaved work (unless you're persisting
55.
▲
by
phleet
14y ago
Have you seen Prose? http://prose.io/about.html
56.
▲
by
phleet
14y ago
I use vim extensively and I use both Ctrl-P and NERDtree. Many, many people I know use both. They serve difference purposes for me. I use NERDtree to create/rename/move files and quickly change my CWD (looks like you use rooter for CWD). I
57.
▲
by
phleet
14y ago
Speaking as one of the interns that worked on the project, I don't really feel that this was too harsh. Had he focused on all the things that were wrong with it and torn it to pieces, I would be inclined to agree, but he's provided a number
58.
▲
by
phleet
14y ago
Poe's Law: http://en.wikipedia.org/wiki/Poes_law
59.
▲
by
phleet
14y ago
This is true only once you've decided on your tools, and rails has such an outrageous selection that I can see people getting stuck before they start. Should I be using Test::Unit or RSpec? Maybe Cucumber? Should I be testing this functiona
60.
▲
by
phleet
14y ago
Care to suggest some books for 1.?
More ›