Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jedbrown
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
75 ms
·
691.
▲
by
jedbrown
17y ago
This is a very good point and is the fatal flaw of most metaprogramming. It does seem easy to generate quite confusing error messages by making minor typos. Clang does a much better job with macro expansion errors than gcc, but it's still
692.
▲
by
jedbrown
17y ago
This compiles with a standard C compiler, so it's more appropriate to compare to something like GLib. Cos has faster single dispatch than Objective-C and has extensible multiple dispatch with significantly better performance than C++ (as
693.
▲
The C Object System: Using C as a High-Level Object-Oriented Language
(arxiv.org)
62 points
by
jedbrown
17y ago
|
24 comments
694.
▲
by
jedbrown
17y ago
Yes, but there is a big difference between typing part of the file or function name and typing a full path. Search-based semi-global matching is a really fast way to navigate.
695.
▲
by
jedbrown
17y ago
I assume this is what CTANGLE produces, in which case your rebuttal of unwind's point is flawed. http://gist.github.com/319391 However, C99 section 6.9.1 "Function definitions" asserts that int f(void) { /* ... */ } is equivalent
696.
▲
by
jedbrown
17y ago
Losing the fixed-width font is annoying to me. I frequently have code or logs in emails, and these are horrible to read in a variable width font because columns don't align, and ^^^ indicators don't line up. I'm curious why this was aband
697.
▲
by
jedbrown
17y ago
Many modules are already imported, including Data.List.
698.
▲
by
jedbrown
17y ago
Sorry, I misread comment. Long ints have a 4-byte minimum, plaint ints have a 2-byte minimum.
699.
▲
by
jedbrown
17y ago
It's not at all uncommon to have an array that big these days. But the API should use size_t for the array size (or whatever is available in your language of choice).
700.
▲
by
jedbrown
17y ago
> I see that the standard only requires 4 minimum Oh really? What standard? C99 section 5.2.4.2.1 says 16 bits minimum for int, 32 bits for long, 64 for long long. There may not exist 64-bit architectures with 16-byte ints, but that'
701.
▲
by
jedbrown
17y ago
Or `M-*` to expand all the completions and then, if necessary, delete the ones you didn't want. Beats typing the extensions.
702.
▲
by
jedbrown
17y ago
The problem is that svn makes branching easy, but merging very hard. This provides an incentive to postpone merges which of course makes them even harder once the excuses run out and they have to be done. Distributed SCMs recognize that b
703.
▲
by
jedbrown
17y ago
Threading predates Gmail by a couple decades. RFC-822 (1982) specifies the necessary fields, and though I don't have personal experience prior to the early 90s, I'm sure decent MUAs supported threading in the 80s. I actually find Gmail's t
704.
▲
by
jedbrown
17y ago
The curve doesn't even look exponential since it seems to become infinite at finite time, more like 1/(T-t).
705.
▲
by
jedbrown
17y ago
I think few people work with the classic dvorak layout (the one with awkward punctuation characters).
706.
▲
by
jedbrown
17y ago
15% is a bit higher than I benchmark, but here is a version that is guaranteed to do the correct number of iterations, increments in floating point instead of performing the slow cast, and is faster than performing the comparison in float
707.
▲
by
jedbrown
17y ago
> import java.util.Calendar; might be your first clue... > but a tight inner loop with a function call is begging for an inline. The loop body makes several other function calls, you would be very hard pressed to measure the differe
708.
▲
by
jedbrown
17y ago
Incorrect code is silly. It is not unlikely that the different languages are performing a different number of iterations in these tests, correcting that by being precise about the range to be iterated over is not silly. The integer indice
709.
▲
by
jedbrown
17y ago
1. There is no C function. 2. Inlining in an actual C implementation doesn't matter because there is no register pressure and each trig function generates a real function call. Function calls to known addresses are really fast (~2 cycles),
710.
▲
by
jedbrown
17y ago
1. Looping with a floating point increment is silly here because you can't be sure how many iterations it takes. 2. C translation takes 11 seconds (compare to 25.6 for SBCL) http://gist.github.com/288936#file_silly distance loop
711.
▲
by
jedbrown
17y ago
Brace isn't really anything more than stripping out braces and semicolons in favor of significant whitespace. This amplify thing offers a slightly higher level of abstraction by providing syntactic macros.
712.
▲
by
jedbrown
17y ago
I'm not concerned about single-language debugging. Can these debuggers move through a mixed C-Lua stack? My stack might start and end in C, but cross through Lua two or more times. Can I set a watchpoint and get the program to stop where
713.
▲
by
jedbrown
17y ago
Remove the underscore: $ ping _why.usesthis.com ping: unknown host _why.usesthis.com $ ping why.usesthis.com PING why.usesthis.com (74.207.245.100) 56(84) bytes of data. 64 bytes from waferbaby.com (74.207.245.100): ic
714.
▲
by
jedbrown
17y ago
I'm not concerned about which language right now, anything with a REPL should be able to work in this way. But the context I'm working in is perhaps a bit trickier. The call stack would normally cross between languages multiple times so j
715.
▲
by
jedbrown
17y ago
How is cross-language debugger support? I have looked a few of these options, but in the use case I have in mind, the most likely place for bugs to occur is after crossing between languages multiple times, and not being able to move throug
716.
▲
by
jedbrown
17y ago
I think that quote holds less and less true over the years. It's not so much that there are huge numbers of people who need their PDEs solved, rather that those who do (aerospace, engines, circuits, oil, climate, defense, energy) really
717.
▲
by
jedbrown
17y ago
I agree with many of your sentiments. Here is a view from "inside" (I do PDE solvers from a mathematics and computational physics perspective, have written open-source models, and contribute to a popular open-source solver library). 1. Ver
718.
▲
by
jedbrown
17y ago
I do this too. The typical response is that they are forwarding my concern to their technical department, and I hear nothing further, and the issue never gets resolved.
719.
▲
by
jedbrown
17y ago
Sounds like a credit union I used to use that restricts the charset, is silently case-insensitive, and emails you your password if you go through the lost password dialog (it had been upcased). I sent them a letter chewing them out for t
720.
▲
by
jedbrown
17y ago
> Too much jeans and sneakers when I met her I have what I call the "running shoe filter". If she doesn't wear running shoes, it's very unlikely that I will be interested. But I agree with every other point you make.
More ›