Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nanolith
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
271.
▲
by
nanolith
9y ago
Model checkers are amazing tools. I've been using one for C development for the past two years, and with the model checker, I feel more confident about code I write in C than I do about code in many other languages. That being said, m
272.
▲
by
nanolith
9y ago
Cyclone is an interesting example. Something that is backward-compatible with C and does not incur significant compile-time overhead, like C++ does, is a potential alternative. Unfortunately, Cyclone was abandoned. It only has support fo
273.
▲
by
nanolith
9y ago
You are correct on both counts.
274.
▲
by
nanolith
9y ago
I have spent a long time using alternative languages. I'm a compiler geek. However, most of these languages ultimately lead to disappointment. Not because they necessarily fail, but rather because the problem of writing software is
275.
▲
by
nanolith
9y ago
These results don't surprise me. A lot of these suboptimal examples come down to the complexity of the optimization problem. Compilers tend to use heuristics to come up with "generally good enough" solutions in the optimizer
276.
▲
by
nanolith
9y ago
Yes. It can only be answered experimentally, but the Square Law still applies, with constants to account for reaction time and friction. The point is that someone who has studied Algebra would be able to recognize a polynomial in the data
277.
▲
by
nanolith
9y ago
I've tutored students in algebra and remedial math in the past. I agree that it is more challenging to work with adults on the lower end of the intelligence curve, but even these adults can be taught enough algebra to pass the final e
278.
▲
by
nanolith
9y ago
I think that trendia already touched on a lot of these, but consider the typical every day problems that require algebra to solve: An item at the store is listed for $4.99 each, but under a promotion, the item is buy two, get one free. Wha
279.
▲
by
nanolith
9y ago
The response to low graduation rates can't be to further dumb down the degree. Every functioning adult should understand algebra. I'd actually argue that trigonometry should also be included in this list, but that's probabl
280.
▲
by
nanolith
9y ago
Haskell has a mature FFI. If there are any computational hurdles, it is possible to drop down to C/C++ to manage these. A good library can easily encapsulate this. Of course, there is the point where such a library becomes a thin wra
281.
▲
by
nanolith
10y ago
That would only be required for data on the GC heap. Yes, you would have to implement an FFI for communicating with the browser, especially for any callbacks into the browser that take allocated memory, but it is far better to build a hygi
282.
▲
by
nanolith
10y ago
To be fair, a generational mark-sweep GC algorithm doesn't take much more space over the compile-time modifications to the code itself. A reasonably performant GC algorithm suitable for most front-end work would probably only add abou
283.
▲
by
nanolith
10y ago
If I saw a manager do what she described, no matter how high up the food chain he was, I'd frog march him to HR myself. I don't even care if they fire me for it. We don't tolerate stuff like this in this century.
284.
▲
by
nanolith
10y ago
There are proprietary compilers for embedded chipsets that don't support this feature. Granted, these are fewer and further between than they once were, but they are out there. It really depends on how portable you want your code to
285.
▲
by
nanolith
10y ago
> A static analyser can't decide if you do "good goto" or "bad goto", but it's easy to ban goto outright and avoid all the "bad gotos". That depends on the goto statement. A good static analyzer c
286.
▲
by
nanolith
10y ago
Well, it's two different use cases. PCs are platforms, and they have common components and optional peripherals. Embedded systems are completely custom designs that rarely have common components. Everything is driven by BOM cost, an
287.
▲
Soybean nitrogen breakthrough could help feed the world
(news.wsu.edu)
3 points
by
nanolith
10y ago
|
0 comments
288.
▲
by
nanolith
10y ago
He gives some rather backhanded praise for TAOCP, if you can consider noting that a set of books look impressive on a bookshelf as praise. For instance, "I've used my set several times when I was stuck and couldn't find help
289.
▲
by
nanolith
10y ago
Give SICP a try. Then, pick up the dragon book if you enjoyed SICP. It's a different experience after that.
290.
▲
by
nanolith
10y ago
I've read the books on both of those lists, among many others. Not because these are all required reading, but because I've had a long career and I've fought to continually improve my knowledge in Computer Science. It seems
291.
▲
by
nanolith
10y ago
I think that's mostly your opinion. One can remain very tight to the language semantics and still get a lot of fine-grained control over performance in C++. No language can meet all use cases. Every language has features that it is b
292.
▲
by
nanolith
10y ago
Sadly, I don't think that's a problem that a language alone can solve. Ada, for instance, is awesome with its runtime enforcement of design contracts, but all a programmer needs to do is change the contract and chaos ensues. I&#x
293.
▲
by
nanolith
10y ago
Well, it's a Cheney GC. To be generational, there would need to be more than two heaps. But, that's hair splitting. Heh. I doubt one would find many C++ folks who would disagree that GC is useful some of the time. It's al
294.
▲
by
nanolith
10y ago
Even in the case of a mutable graph, one can use copy-on-write semantics to create a DAG of graph revisions that can be managed or compacted. I believe this was the strategy used by Subversion. Compaction and collection can both be trivial
295.
▲
by
nanolith
10y ago
Every data structure in C++ has an allocator override. If you want to use a bump pointer allocator, you can use a bump pointer allocator. In fact, this is a very common optimization in game software during time-critical frame rendering.
296.
▲
by
nanolith
10y ago
One does not need to ever use malloc()/free() or new/delete in C++. For instance, it is very common to use just the DATA and BSS segments in embedded code, and rely on placement-new, which is always deterministic. Dynamic memory
297.
▲
by
nanolith
10y ago
I stand corrected. I thought it said GNU GPL.
298.
▲
by
nanolith
10y ago
I think it's interesting. The fact that it's written in Pascal takes me back to my youth, when Pascal was still commonly taught as an entry-level language in schools. It's probably not for everyone, and the license terms sui
299.
▲
by
nanolith
10y ago
Nothing that extreme. This was more of a theoretical thing. Certainly, it could be used to filter people based on their ability to design a maze-solving heuristic, but some constraints would have to be placed on the test, as one can query
300.
▲
by
nanolith
10y ago
Another interesting aspect of the grid coloring approach is that one can pre-bake larger rooms within a maze, which is useful when adding a maze to a different style game, such as a first-person shooter or an RPG. Other features, which are
More ›