Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mtdewcmu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
241.
▲
by
mtdewcmu
11y ago
I was expecting to read about drives being bricked by buggy firmware. I guess they finally solved the firmware side.
242.
▲
by
mtdewcmu
11y ago
I picked something sleepy.
243.
▲
by
mtdewcmu
11y ago
It's putting me to sleep, even though I'm listening through speakers and not headphones.
244.
▲
by
mtdewcmu
11y ago
>> Not paving roads would decrease vehicle speeds, too. Adding obstructions to windshields would also likely increase uncertainty and cut vehicle speeds. Removing suspensions from cars, as well. Most people would slow down if all your
245.
▲
by
mtdewcmu
11y ago
I didn't get the joke. I headed over to wikipedia to confirm that Knuth was not dead.
246.
▲
by
mtdewcmu
11y ago
Good idea. It seems like it should be possible also to do something similar with ImageMagick.
247.
▲
by
mtdewcmu
11y ago
It's doubtful that schizophrenia is all nurture, but it seems conceivable that coercive circumstances could aggravate a case of schizophrenia, taking a subclinical case and making it floridly symptomatic. Coercion could possibly tip
248.
▲
by
mtdewcmu
11y ago
I don't think C is bad for optimizers. What language consistently generates faster machine code than C?
249.
▲
by
mtdewcmu
11y ago
This is not hard to understand: a wobbly line is longer than a straight line. That's all.
250.
▲
by
mtdewcmu
11y ago
Peer review isn't such an efficient process. There is lots of evidence of this.
251.
▲
by
mtdewcmu
11y ago
It would probably be infeasible to judge every single paper purely on its merits. Reputation may be an imperfect proxy for merit, but it's certainly not worthless. In any event, this argument is there and needs to be taken seriously.
252.
▲
by
mtdewcmu
11y ago
That is neat and a lot easier to understand than the original link. All the notation made my eyes glaze over.
253.
▲
by
mtdewcmu
11y ago
I didn't know you could put the redirection first. You learn something new every day. Maybe that form would make it more mnemonic for some people, because it more resembles a pipeline.
254.
▲
by
mtdewcmu
11y ago
If you're going to write shell scripts or do anything sophisticated with the shell, it's worth understanding the difference. And there is a fundamental difference. With |, standard input is hooked up to a pipe. With <, standard
255.
▲
by
mtdewcmu
11y ago
Like a lot of people, he overuses cat when it's not needed. `cat FOO | more` is approximately equivalent to `more < FOO`, except the first one spawns an extra process for no reason.
256.
▲
by
mtdewcmu
11y ago
This is an offline algorithm. Take a look at GNU gperf[1]. [1] https://www.gnu.org/software/gperf/
257.
▲
by
mtdewcmu
11y ago
I'm thinking about how I'd implement CHM. I think I'd use a union-find data structure to generate the acyclic graph, as in Kruskal's algorithm. This would fit into an N-element integer vector. After finding the acyclic g
258.
▲
by
mtdewcmu
11y ago
At some point the cost of scanning a long file will overcome the cost of doing log(n) seeks. On short files, it really doesn't matter what you do, searching will be fast regardless.
259.
▲
by
mtdewcmu
11y ago
I never tried adding . to my CDPATH, but it makes sense.
260.
▲
by
mtdewcmu
11y ago
You don't need to know the number of the line you're looking at. You jump to the middle of the file , and you compare the nearest line to the search pattern. Then you recurse on the top or bottom half.
261.
▲
by
mtdewcmu
11y ago
The interesting use case for me is that you can make a sorted index and look up records efficiently, i.e. within a script. It works with ctags indexes, for instance.
262.
▲
by
mtdewcmu
11y ago
The interesting thing about look is that it uses binary search, so it is much faster.
263.
▲
look(1): lines beginning with given string
(linux.die.net)
47 points
by
mtdewcmu
11y ago
|
45 comments
264.
▲
by
mtdewcmu
11y ago
I made something similar to that. I also made a couple other scripts to help with navigating deep directory subtrees: "cdup" would jump to the specified ancestor directory of the CWD. So from /a/b/c/d/e, &
265.
▲
by
mtdewcmu
11y ago
CDPATH is kind of obnoxious. It's confusing to have phantom subdirectories no matter where you are, which interact with auto-completion, and they can alias real subdirectories, which is always surprising and annoying when it happens. F
266.
▲
by
mtdewcmu
11y ago
I have Page Up and Page Down set to cycle through the directory stack, so they are similar to the back and forward buttons in a web browser. Except that mine is circular. I can't take credit; I found the idea on the web somewhere and m
267.
▲
by
mtdewcmu
11y ago
I think most applications could be sped up significantly by rewriting them more efficiently in their own language. You're rarely maxing out the possibilities of the language you're using, because it requires time, skill and a diff
268.
▲
by
mtdewcmu
11y ago
If someone really doesn't want to work, then they're probably not going to make a very good worker. Why force them to get a job if they're going to be a drag? I think the vast majority of people want to work just to keep busy
269.
▲
by
mtdewcmu
11y ago
I think I agree. PHP uses ., and I can't recall ever having a problem with that. However, I've been bitten by +.
270.
▲
by
mtdewcmu
11y ago
I was going to say that.
More ›