Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mtdewcmu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
57 ms
·
541.
▲
by
mtdewcmu
12y ago
The GNU sed manual has examples like that at the end. It always seemed odd to show examples of things that are so awkward and inefficient. If they meant for sed to do those things, presumably they would have made commands for them.
542.
▲
by
mtdewcmu
12y ago
That makes sense (sort of). Better to use unsigned if you are trying to do modular arithmetic. Signed integers have some weirdness attached. The number that's one followed by all zeroes in binary (INT_MIN in limits.h) is defined as neg
543.
▲
by
mtdewcmu
12y ago
Having a Lisp will make it a little easier to write the Javascript interpreter. Baby steps.
544.
▲
by
mtdewcmu
12y ago
I was wrong, obviously.
545.
▲
by
mtdewcmu
12y ago
The way you can nest conditions in sed, like /foo/ { /bar/x }, is pretty powerful, and I knew a good bit of sed before I realized you could do that. It's not readily obvious from the manual.
546.
▲
by
mtdewcmu
12y ago
sed has regular expressions. I think you could do some binary arithmetic fairly easily with regular expressions and find and replace...
547.
▲
by
mtdewcmu
12y ago
That's kind of funny, because awk is already a programming language.
548.
▲
by
mtdewcmu
12y ago
With difficulty. I started playing with the idea of making a programming language out of sed at one point, but then I decided that, even if I succeeded, it would be a waste of time. I didn't take into account Hacker News.
549.
▲
by
mtdewcmu
12y ago
The same probably applies to TV, radio, newspapers, novels, and plays. So I don't think anyone should panic.
550.
▲
by
mtdewcmu
12y ago
Hard to say. What helps me understand algorithms is lots of mental effort.
551.
▲
by
mtdewcmu
12y ago
What about Martians? Remember, the bug is on Mars.
552.
▲
by
mtdewcmu
12y ago
I guess I don't know what your point was.
553.
▲
by
mtdewcmu
12y ago
I think researchers do ignore obvious flaws, but I don't think it happened here. It's easiest to ignore obvious flaws when you are testing something that almost no one would challenge, like "eating vegetables is good for you.
554.
▲
by
mtdewcmu
12y ago
Hilarious, yes, elegant, no. There's no guarantee that the list will actually come out sorted (unless you dig through the implementation of sleep() down to the kernel and confirm that the order is always deterministic). It's funny
555.
▲
by
mtdewcmu
12y ago
Sorting-algorithm animations have a long history, and, when I was younger, I thought these animations were fun to watch, but I never learned anything from them. At this point in my knowledge, I wouldn't expect to learn anything from a
556.
▲
by
mtdewcmu
12y ago
I agree. If the install is finished, then the system should be in its new normal condition, and that condition is either daemon-on or daemon-off. There is quite likely a real issue here worth fixing, but the fix is probably more nuanced tha
557.
▲
by
mtdewcmu
12y ago
That is a problem, but doesn't C++ have the same problem? The situation was better before 64-bit became popular, when int == long == 32 bits on any system that mattered (when 16-bit gave way to 32-bits, you couldn't be sorry about
558.
▲
by
mtdewcmu
12y ago
I've seen lists of those, and they are pretty esoteric. I don't think I've ever stepped on one accidentally.
559.
▲
by
mtdewcmu
12y ago
Well, you would expect there to be legacy applications around for a while, if they decided not to use MR in future algorithms.
560.
▲
by
mtdewcmu
12y ago
I'm pretty sure that absolutely nothing is preventing this, and you could start sending emails with JSON inside right now. The hard part is probably finding something meaningful for it to do.
561.
▲
by
mtdewcmu
12y ago
Deep, complicated inheritance hierarchies loaded with virtual functions is among my least favorite kinds of code to have to debug.
562.
▲
by
mtdewcmu
12y ago
>I don't have stats, but I would think that the comparison function's definition typically is available at compile time. The comparison function usually will be. The qsort function generally won't be available. >Also, i
563.
▲
by
mtdewcmu
12y ago
It seems like someone must have done it, if doing it is at all worthwhile...
564.
▲
by
mtdewcmu
12y ago
Any library that addresses exactly the same use case as STL is going to have the same limitations as STL. Everything is a trade-off. I think you can probably assume that STL does about as good a job as any library would, given identical tra
565.
▲
by
mtdewcmu
12y ago
I admire your persistence and tenacity in getting as far as you did with that rigamarole. I'll take your word for it that it that it ends badly. :)
566.
▲
by
mtdewcmu
12y ago
>>I'm just a little tired of all the C++ critics that insist that only naive or inexperienced programmers use it and they'd all be equally productive if they'd just man up and use C for a while. I'm not sure where
567.
▲
by
mtdewcmu
12y ago
>>I actually very rarely create class hierarchies in C++. The book I learned C++ from must have weighed 5 pounds, and about 4 of them were devoted to inheritance. I assumed that inheritance was the central point of OOP. I never quite
568.
▲
by
mtdewcmu
12y ago
I've never seen much value in exceptions. For that matter, I've never had much interest in using longjmp and setjmp. It's possible that I tried them out at one point just to see them work. But I've never come up with a u
569.
▲
by
mtdewcmu
12y ago
>Obviously it's absurd to conclude that Fukushima was good for the economy--the loss of capital more than outweighed the money spent fixing things. That depends on your definition of "economy," doesn't it? When I pict
570.
▲
by
mtdewcmu
12y ago
If I'm not mistaken, if you keep following that thread, somehow or other you eventually get e. I hope that wasn't too much pedantry.
More ›