Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nanolith
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
241.
▲
by
nanolith
4y ago
It's not always a convenience. Perhaps when dealing with the potential elimination of certain classes of programmer error, but there are definitely use cases where specialized GC can solve runtime problems more efficiently than hand-wr
242.
▲
by
nanolith
4y ago
GC is a quite rich area of research. I've implemented novel GC algorithms in firmware. There are some algorithms that are just more compact when GC is available. Algorithms and heuristics that are graph heavy or require pruning nodes w
243.
▲
by
nanolith
4y ago
Elon Musk's ideological takeover won't save Twitter. It's too late for that. Twitter has lost too many active users to make a comeback. I deleted my Twitter account this year. I had it for 16 years. My Twitter account was
244.
▲
by
nanolith
4y ago
The first parser that one writes for a real language is a big accomplishment. I remember the one I wrote for C89 back in high school, which was more annoying than many because it requires writing a preprocessor as well. All of the theory an
245.
▲
by
nanolith
7y ago
I do it today; your assumption that "it would" is incorrect. void z(value* x) { /* preconditions. */ MODEL_ASSERT(valid_value_ptr(x)); /* do operation. */ /* pos
246.
▲
by
nanolith
7y ago
OpenBSD's development process already incorporates linters and other static analysis tools, as well as code reviews. Decomposing logic using Hoare triplets and properly incorporating assertions as hints to a model checker wouldn't
247.
▲
by
nanolith
7y ago
If you read the article, this RCE had nothing to do with memory safety. But, a model checker does a great job of finding memory issues as well as logic errors, if you use it correctly. OpenBSD, AFAIC, has not announced any plans. But, the
248.
▲
by
nanolith
7y ago
You also lose a lot of tooling that has been built up over the decades to help with C development, such as model checkers. Simply replacing one language for another doesn't help. It's silver bullet thinking. This isn't an i
249.
▲
by
nanolith
7y ago
That depends a lot on the Zen school and the texts you were reading. Zen is based on direct experience. That being said, in some schools, such as Renzai, koans are used as a tool. However, most sangas you attend, especially in the west,
250.
▲
by
nanolith
8y ago
It is not unheard of for these problems to occur with this sort of long meditation retreat, but it is rare. The beginner's mind is not used to spending so much time in this state, and it can lead to hallucinations or extreme discomfor
251.
▲
by
nanolith
8y ago
Nowhere did I say that pImpls should only be used. That was only one of several strategies I discussed. The article may have discussed standard headers, but it was neither titled to indicate that it was talking about only standard header
252.
▲
by
nanolith
8y ago
> Alternatively if compile time is not the slow part of that pipeline, then you're prematurely optimizing the wrong thing anyway. Developer productivity does not matter in your world? > In other words you only optimized the criti
253.
▲
by
nanolith
8y ago
> Again, no, it isn't. You seem to be severely underestimating the systemic impact of cache misses if you are considering them a "small" impact to efficiency. You are severely overestimating the impact of cache misses if y
254.
▲
by
nanolith
8y ago
Sure, and I would never recommend that indirection be used all the time as that would be premature. However, if compilation times have gotten painful enough that we need to examine performance improvements to our headers, the pImpl pattern
255.
▲
by
nanolith
8y ago
> Do you also write all your functions to pass large inputs by value until a profiler says you can pass a const reference? No, but neither do I pass types that fit in a native integer by const reference because copies should be avoided a
256.
▲
by
nanolith
8y ago
This depends on who is writing the code and who is compiling the headers. A software developer who is building headers for someone else (an internal or external client) may trade the overhead of this pattern for a faster compilation time.
257.
▲
by
nanolith
8y ago
I think you may want to read the quote from the paper a bit more carefully. "...he will be wise to look carefully at the critical code; but only after that code has been identified" I was told that "premature optimization is
258.
▲
by
nanolith
8y ago
Right. Much like avoiding pImpl because it might make a function call that occurs 0.001% of the time faster. That is the basis of the thread I was replying to. Understanding what you are optimizing FOR and where the most attention should
259.
▲
by
nanolith
8y ago
For instance, pulling in the STL for an interface header instead of encapsulating these details. :-) No one is claiming that we should ignore performance all together. But, understanding through profiling where performance issues are and
260.
▲
by
nanolith
8y ago
If someone says that premature optimization isn't a thing, I don't think it is condescending to point out that it is by posting original source material. :-)
261.
▲
by
nanolith
8y ago
> Premature optimization is not really a thing Okay. I'm going to stop this thread right there and take some opportunity to provide some mentoring. I hope you accept this, as it will help in your career. Read this paper. It is a
262.
▲
by
nanolith
8y ago
This is true. Fortunately, these do not need to be inlined, which can still free client code of compile time overhead. It's a tradeoff between compile time and complexity.
263.
▲
by
nanolith
8y ago
This depends on what you are building. Don't commit the sin of early optimization. Does a client of the framework you are writing -- which is probably using STL internally -- need a single instruction operation for adding a value for
264.
▲
by
nanolith
8y ago
I recommend three things for wrangling compile times in C++: precompiled headers, using forward headers when possible (e.g. ios_fwd and friends), and implementing an aggressive compiler firewall strategy when not. The compiler firewall stra
265.
▲
by
nanolith
8y ago
This is true. Complete understanding rarely occurs until one can understand how to wield this knowledge.
266.
▲
by
nanolith
9y ago
It's relatively low-tech, but it does work. First, I have some scripts to preprocess the Markdown and extract custom markup that I have built to do things that Pandoc's Markdown can't, but that I can still easily inline in t
267.
▲
by
nanolith
9y ago
I can second this. Markdown and Pandoc work quite well together. I write documents professionally using this setup. I do fall back to LaTeX for certain formatting, but it's actually quite easy to build pass-through filters so that ra
268.
▲
by
nanolith
9y ago
For C model checking, I use CBMC. It is a great tool, but it does take some finesse to use well. http://www.cprover.org/cbmc/
269.
▲
by
nanolith
9y ago
In early days of CBMC, it was possible to confuse it and get it to generate incorrect code for MiniSat. This is a representation issue. Those issues have long since been solved. Now CBMC's biggest problem is that of performance, and
270.
▲
by
nanolith
9y ago
To the extent that the model checker is complete and error free, and to the extent that that the model corresponds with that under instrumentation. I've been far down that rabbit hole, and I've found cases where certain model chec
More ›