Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
haberman
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
83 ms
·
661.
▲
by
haberman
6y ago
> only the privileged can avoid experiencing negative political consequences inside their bubble. > Nat Friedman is on the wrong side of history here. These empty words are no longer sufficient. Hopefully he figures that out before hi
662.
▲
by
haberman
6y ago
Cool. :) Nice article btw. I noticed a few other things in the section about segments: > The good news is that caring about them isn’t too bad: they essentially boil down to adding the value in the segment register to the rest of the ad
663.
▲
by
haberman
6y ago
> There’s one exception to this: x86_64 allows for a 64-bit displacement with the a* registers. I don't think the example for this ( https://gcc.godbolt.org/z/35ytYW ) is correct. The highlighted instruction (&qu
664.
▲
by
haberman
6y ago
Is there any published rationale for the RISC-V instruction encoding? A few months back I set out to write a software emulator of RISC-V for fun. I expected the instruction set encoding to lend itself well to a very simple implementation, e
665.
▲
by
haberman
6y ago
As someone who needs math software somewhat infrequently, I had assumed that SageMath was a sort of de facto standard for people using Python with math. I was surprised to see that Google Colab doesn't support Sage in its notebooks. I
666.
▲
by
haberman
6y ago
Can anyone recommend a good intro to analogue circuit design? I've dabbled enough in digital circuit design to have a rough intuition for how to do interesting things with logic gates. But I don't have the faintest clue how even t
667.
▲
by
haberman
6y ago
I agree that being able to read source and modify the code for experimentation are important. In my experience, the best way to read source code and experiment are to get the source from the upstream repo (eg. GitHub) and read/build fr
668.
▲
by
haberman
6y ago
Yes, that looks like exactly what I had in mind. Thanks for the reference.
669.
▲
by
haberman
6y ago
Today I spent at least an hour fighting with Python packaging. The more I think about it, the more I feel that self-contained static binaries are the way to go. Trying to load source files from all over the filesystem at runtime is hell. Or
670.
▲
by
haberman
6y ago
In case you're wondering (like me) how you'd get input from printf(): > We ab^H^Huse [the Turing-completeness of printf()] to implement a the logic of tic-tac-toe entirely within this one printf call (and a call to scanf() to r
671.
▲
by
haberman
6y ago
With wikis or note taking applications, I always find it hard to get into a habit of using them. I think this is largely because too much brain space is taken up with: 1. When should I write something here? 2. How should I organiz
672.
▲
by
haberman
6y ago
Your "simplest-possible quicksort" appears to be the same as the first branchless Lomuto partition given in the article. The premise of the article is that, while branchless, this loop suffers from store/load dependencies tha
673.
▲
by
haberman
6y ago
Towards the end of the article, Gerben makes the point that the comparison is not on the critical path of his variant of QuickSort, so even if the comparison involves indirection, that comparison can still proceed in parallel with the main
674.
▲
Hoare’s Rebuttal and Bubble Sort’s Comeback
(blog.reverberate.org)
147 points
by
haberman
6y ago
|
48 comments
675.
▲
by
haberman
6y ago
> PEGs are however are easier to reason about, no ambiguities, so that was good enough reason. I frequently hear this mentioned ("PEGs don't have ambiguity"). It is literally true, but I don't think it's true in
676.
▲
by
haberman
6y ago
> Converting binary floating point to decimal floating point and vice versa is VERY VERY VERY SLOW The fastest dtoa() algorithms are on the order of 50ns or less: https://erthink.github.io/dtoa-benchmark/#results Th
677.
▲
by
haberman
6y ago
I use "pdftotext -layout" and then parse that. Here is some more info from people who have tried this approach: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
678.
▲
by
haberman
6y ago
Thanks for the reference. But a single transaction can span multiple financial institutions. Say you pay off a credit card. One half of the transaction comes from the credit card statement, the other half comes from your bank. The two halve
679.
▲
by
haberman
6y ago
Yes, in my experience CSV/XML/etc export is spotty. Some institutions don't have it at all, and even when they do the time range can be limited or hard to time-window reliably. For example, I can't get CSV about my pay s
680.
▲
by
haberman
6y ago
Wow, your setup sounds very similar to what I've converged on. Except I wrote a fairly substantial pipeline that preprocesses the data before giving it to beancount and Fava. Maybe I missed something, but it seemed like beancount wants
681.
▲
by
haberman
6y ago
Under that definition, would you agree that this article titled "Why can’t we hate men?" is hate speech? https://www.washingtonpost.com/opinions/why-cant-we-hate-men... If so, what do you think should be done
682.
▲
Optimizing UTC → Unix Time Conversion for Size and Speed
(blog.reverberate.org)
2 points
by
haberman
6y ago
|
0 comments
683.
▲
by
haberman
6y ago
Looks to be based on https://github.com/cntools/rawdraw , "CN's Fundamental Graphics Library", though I don't know who CN is.
684.
▲
by
haberman
6y ago
> Yes programming in C is hard. I'm not anti-PHP, so I'm not supporting the grandparent post in general. But as someone who is working on a PHP extension right now, I agree that PHP's C API is under-documented. The best se
685.
▲
by
haberman
6y ago
> and it has been criticised by many prominent conservatives. ...and Socialists: "Both Wood's and McPherson's remarks were published by the World Socialist Website, a left-wing, socialist website, which claims that the 161
686.
▲
by
haberman
7y ago
How do you handle time with such small code size? I see a timer interrupt for the music, but what about the animation? Is it dependent on the speed of the underlying CPU?
687.
▲
by
haberman
7y ago
We often call this "arena allocation". Wikipedia calls it Region-based memory management: https://en.wikipedia.org/wiki/Region-based_memory_management
688.
▲
by
haberman
7y ago
> A patch I helped review that's related to this in LLVM just landed today Cool. :) > Also, note that you need a custom linker script to define those symbols The code I posted above compiles and runs without any custom linker scr
689.
▲
by
haberman
7y ago
If we're in the realm of "non-standard linker tricks"... Compilers will concatenate sections of the same name. You can use this trick to produce a concatenation of arrays across several files: $ cat t1.c __attribute
690.
▲
by
haberman
7y ago
I'm curious what exactly makes this undefined behavior. And in particular, what about something like this? struct Foo { #ifdef __cplusplus int bar() const { return bar_; } private: #endif int bar_; };
More ›