Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
attractivechaos
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
attractivechaos
4y ago
> Honestly I find it hard to understand sticking with C89. C89 is the only C version with almost universal support across platforms and compilers (including ancient one). Requiring C99 may break backward compatibility and breaking compat
92.
▲
by
attractivechaos
4y ago
The open-source community did this to themselves. When the most popular frameworks and foundation tools (e.g. Python) disregard backward compatibility again and again, we have taken broken compatibility for granted and formed habit of pinni
93.
▲
by
attractivechaos
4y ago
Yep. The majority of startups in biotech use python mainly because it is much easier to find python programmers. Many of them have messy code base. They could probably do much better with Java IMHO.
94.
▲
by
attractivechaos
4y ago
Sorry for my ignorance – linked list matching the performance of vector is something new to me. I would like to learn more. The best way to prove your point is to show us a benchmark. However, I couldn't find one with a quick google se
95.
▲
by
attractivechaos
4y ago
A ring-buffer based queue is mostly better than a linked list but it is not necessarily the best. The typical STL deque implementation [1], with all its complexity, is usually faster than a ring buffer. [1] https://stackoverflow.
96.
▲
by
attractivechaos
4y ago
Well, modern programmers more often think "optimization is the root of all evil". I read an article that literally recommends not to optimize until the end.
97.
▲
by
attractivechaos
5y ago
> People using FTP can use a dedicated client, of which there are plenty on every platform FTP is used often in my field. The removal of FTP from both Chrome and FireFox has been very inconvenient. I tried a few free FTP clients with G
98.
▲
by
attractivechaos
5y ago
> There are a large number of non-ASCII layouts that can be mapped on top of a standard QWERTY[0] which show that ASCII is not a valid assumption for a modern general purpose programming language. I have seen multiple "foreign&quo
99.
▲
by
attractivechaos
5y ago
Have you installed jdk before? I installed jdk quite a few times without root and never had a problem. Jdk only depends on essential system libraries like libc. It ships other necessary libraries in the tar-ball. Do you have a reference to
100.
▲
by
attractivechaos
5y ago
The lack of the ICU library. As you mention it, I searched around and found setting "export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true" could solve the problem. I stand corrected. Nonetheless, adding an env variable is still an ex
101.
▲
by
attractivechaos
5y ago
I really like C# as a language, but as a Linux programmer, I found it difficult to install the dotnet sdk without the root permission. With that barrier, I can't recommend C# over Java, D or Go which are much easier to install.
102.
▲
by
attractivechaos
5y ago
For two standard formats in our field, you sometimes need to keep billions of short strings in memory. Many of these strings are 2 bytes or several bytes in length. The parser in C packs them as NULL terminated strings. The C++ and Java par
103.
▲
by
attractivechaos
5y ago
Four bytes are still overhead. Also, you often need to keep the capacity of a string. Another four bytes. The C string APIs are like the lowest denominator of all use cases. When you know string lengths, you can avoid quadratic strcat() or
104.
▲
by
attractivechaos
5y ago
This assumes README.md lists all the command-line options like in a manpage, which is not often the case. Also, manpages follow a conventional structure. You can expect the content in a manpage. Most READMEs are free-style. You don't k
105.
▲
by
attractivechaos
5y ago
The Trends in Genetics (not Cell) paper seems plausible. I don't study fish genetics or evolution. As I remember, fish genomes tend to have more genome-wide duplications and losses in comparison to other vertebrates. One possibility is
106.
▲
by
attractivechaos
5y ago
> glibc's hostility towards static linking is arguably a substantial part of why musl has attracted so much interest. Anothre reason is that glibc is equally bad for dynamic linking. Often a binary compiled on recent glibc doesn&#
107.
▲
by
attractivechaos
5y ago
Yes, it works, if you can jump 2^64 iterations quickly. This is how xoroshiro achieves multiple streams. The PCG32 or the xoroshiro method guarantees independent streams. Using high bits in seeds doesn't have the guaranteed behavior. W
108.
▲
by
attractivechaos
5y ago
I was aware of that blog post as well as the counter argument by the xoroshiro author against PCG. I am not studying RNG and can't say which is more correct. To me, I use xoroshiro mainly because PCG64 is complex to implement. My appli
109.
▲
by
attractivechaos
5y ago
This depends on what RNG you are using. If the master and the secondary RNGs use the same algorithm without extra internal states (e.g. splitmix or LCG), you will be generating the same stream over and over with small shifts. The end result
110.
▲
by
attractivechaos
6y ago
And LLVM, to that matter. There is gcc-rust but not sure when it will become mature enough.
111.
▲
by
attractivechaos
6y ago
You are right. There are lots of more operations in addition to comparisons. Just done a microbenchmark. The difference between macro- and function-based comparisons is largely indistinguishable.
112.
▲
by
attractivechaos
6y ago
In-memory B-tree is faster and uses less memory for small keys [1]. However, intrusive binary search trees (BSTs) are much more flexible and are the right choice for implementing kernels and malloc(). In addition, intrusive BSTs are often u
113.
▲
by
attractivechaos
6y ago
What you are showing is an implementation without long macros. It is cleaner and simpler. However, it is slower as compilers often can't inline user-provided comparison functions (though modern compilers seem to do a better job). For i
114.
▲
Tree.h in OpenBSD: dependency-free intrusive binary tree (2002)
(github.com)
112 points
by
attractivechaos
6y ago
|
36 comments
115.
▲
by
attractivechaos
6y ago
Single-dash long options are not started in Bioinformatics, but they are more often used in this field than elsewhere. Perhaps that is partly because some of the most popular tools (e.g. blast, muscle, bedtools and gatk) followed this unfor
116.
▲
by
attractivechaos
6y ago
It is sad that many new command-line parsing libraries don't follow the GNU rules anymore. They more often use "-long". Then users have to figure out whether this means "--long" or "-l -o -n -g". To make c
117.
▲
by
attractivechaos
6y ago
> Yes, but you are trading amazing performance in the average case against awful performance in the degenerate case. Poor hash functions or adversarial input could cause congestion in parts of the hash table. It is not just me. As I sa
118.
▲
by
attractivechaos
6y ago
Couldn't agree more. Advanced piano pieces often come with nontrivial cords and multiple voices. Those without proper ear training can hardly recognize even a single cord, let alone replicate a whole piece just by ear. Genius born with
119.
▲
by
attractivechaos
6y ago
> I would wager that is true in most cases. Strings. In C, comparing two strings involves a function call, a loop and a potential cache miss. Copying a string just moves a pointer, which is much cheaper. The additional copying costs li
120.
▲
by
attractivechaos
6y ago
Backshift has two potential disadvantages: 1) copying objects may be slower than testing equality (case dependent); 2) each deletion involves the entire probe chain (with tombstone, you inspect half of the probe chain in average). On the
More ›