Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mtdewcmu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
57 ms
·
571.
▲
by
mtdewcmu
12y ago
Sure. Here's one I bookmarked a long time ago: http://www.realworldtech.com/forum/?threadid=104299&curposti...
572.
▲
by
mtdewcmu
12y ago
Linus Torvalds has written quite eloquently in defense of using exclusively C in the kernel, pointing out some brilliant insights. Of course, the kernel is his at the end of the day, so he doesn't really have to be persuasive and there
573.
▲
by
mtdewcmu
12y ago
It's probably impossible with qsort. I was wondering, if both the sort routine and the callback were declared static, would gcc be clever enough to inline both, eliminating the function pointer? It seems like it should be possible in p
574.
▲
by
mtdewcmu
12y ago
>>I think the only exception is... exceptions, although there's probably a way to do it using setjmp/longjmp too. I'm pretty sure that C++ exceptions could be simulated that way. >>Templates make it easy to genera
575.
▲
by
mtdewcmu
12y ago
Insightful comment. I don't think we need to pity Oppenheimer for not winning a Nobel Prize. He accomplished quite a lot. We're still talking about him. By the by, I'm always amazed at how deep particle physics got all the wa
576.
▲
by
mtdewcmu
12y ago
The way PHP allows fluid, dynamic interaction with the symbol table is pretty nifty, I think, and even if there were no extract() function built into the language, you could implement it yourself out of other primitives. I'm not one th
577.
▲
by
mtdewcmu
12y ago
Drupal uses it to implement templates. I always got the feeling that it's one of those language features where you want to take a deep breath before using it; sort of like when you type `rm -rf *` and haven't pressed enter yet.
578.
▲
by
mtdewcmu
12y ago
Something that works in PHP's favor is that you can write very concise and clear code. At some level you have to trust your eyes.
579.
▲
by
mtdewcmu
12y ago
>"everyone understands it and a lot of useful things have already been written in it" That's such an overwhelmingly good reason to express yourself in English, instead of Esperanto, that you really don't need to postu
580.
▲
by
mtdewcmu
12y ago
Ok, I didn't claim that starting Yo was easy, or that merely contributing to important problems is harder than starting Yo. I meant that, e.g., solving the energy problem is much harder than starting Yo. Basically, those big problems a
581.
▲
by
mtdewcmu
12y ago
>energy, food, water, health, education The problem with those problems is that they are very hard. Much harder than starting a Yo. It's a false choice. Even if the founders of Yo were working on important problems, those problems m
582.
▲
by
mtdewcmu
12y ago
Looks like an interesting site. Thanks
583.
▲
by
mtdewcmu
12y ago
If you don't hedge your statements about programming, you will invariably be wrong. There are always counter-examples. The kind of ambiguity and side-effects I'm alluding to are ones programming languages explicitly support and en
584.
▲
by
mtdewcmu
12y ago
It wasn't a new paper when I took the class, either. None of the papers I read for that class were new. I took the fact that it was assigned reading to mean that the professor considered it timeless.
585.
▲
by
mtdewcmu
12y ago
That's interesting. You know you can pass structs by value, too, so I'm not sure how necessary it is to take the address.
586.
▲
by
mtdewcmu
12y ago
It sounds like you could say it's ObjectiveC-compatible, not ObjectiveC per se. But it's an unimportant distinction.
587.
▲
by
mtdewcmu
12y ago
My comment was about GCC's local functions. It wasn't really about your comment, so I regret if you took it personally.
588.
▲
by
mtdewcmu
12y ago
I'm sure that there are a lot of cases where you could make code look neater and sleeker with this kind of syntax extension, but my thesis -- and this is inherently hard to prove -- is that the uglier code you may have to write in C is
589.
▲
by
mtdewcmu
12y ago
I don't think they could be an ObjectiveC object, because they're described as C, not ObjectiveC. I think the problems you're describing are ones that are going to be faced in any attempt at C closures. Closures have memory a
590.
▲
by
mtdewcmu
12y ago
"C++ now has closures and... [they're] not that awful" Some high praise, that. C++ closures: they're not that awful .
591.
▲
by
mtdewcmu
12y ago
This reminds me of a paper I read in college, "The Dangers of Replication."[1] It lays out the fundamental limits on distributed updates, and it's a good one to read if you haven't seen it before. [1] http://w
592.
▲
by
mtdewcmu
12y ago
>>has to rely on magic unicorns that another engineer (who build the DB) put it in the product Where can I get these?
593.
▲
by
mtdewcmu
12y ago
I thought that the original justification for eventual consistency was that, for some kinds of data, availability is much more important than consistency. It could be that, in reality, that kind of data doesn't exist, because any data
594.
▲
by
mtdewcmu
12y ago
It's true literally.[1] If the language was designed around closures that's one thing. In C, it would be one language paradigm too many. If you want a language with closures, and all you have is C, the time-honored solution is to
595.
▲
by
mtdewcmu
12y ago
GCC's nested functions are implemented with trampolines, so there will be a performance penalty. For the amount that you gain, they seem like a bad idea. Tying your code to GCC for the sake of a small amount of convenience is a bad ide
596.
▲
by
mtdewcmu
12y ago
I'm aware of that, but do you get blocks?
597.
▲
by
mtdewcmu
12y ago
A closure is syntactic sugar for a function plus a struct. Sometimes I think they would be a useful addition to C. But these kinds of things never turn out to be as useful as they seem at first.
598.
▲
by
mtdewcmu
12y ago
I thought those were only available on OSX and iOS.
599.
▲
by
mtdewcmu
12y ago
Callbacks are inherently going to make a program harder to follow. Without seeing the code, it's hard to suggest other solutions.
600.
▲
by
mtdewcmu
12y ago
You can take the address of a literal? Being able to specify a literal for a struct is useful. You can, for instance, put the literal in a macro and use the macro to initialize or reset a struct. It's better than having to write additi
More ›