Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
liuliu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
59 ms
·
811.
▲
Reactor: Embedded language for C++ dynamic code generation and specialization
(github.com)
1 points
by
liuliu
7y ago
|
0 comments
812.
▲
by
liuliu
7y ago
But human can take more time and get it correct. Computers cannot simply take more time and be more accurate (I guess AlphaZero can, but that is a different problem entirely).
813.
▲
by
liuliu
7y ago
Yeah, that is unfortunate. Even if you want to do that (in C, the correct way, of course, is to name them differently), should use macro to select correct function prototype to dispatch to, that still enables type checking and avoid the var
814.
▲
by
liuliu
7y ago
For redis, I think given the code coverage on test cases, that shouldn't be a concern. TBH, I think any C code that doesn't have a coverage is not a functioning code. Too much bugs can only be caught at runtime (thankful to the sa
815.
▲
by
liuliu
7y ago
It is not a real issue in modern days. You just enable address sanitizer in all your debug builds and these issues are obvious at runtime (still not perfect, but an improvement from dark days).
816.
▲
by
liuliu
7y ago
It totally would! I think that is where C++20's coroutine proposal (or Rust) makes a lot of sense (and all these negative abstraction costs!). There are a lot of fun when working on though, and the end result is not bad (I translated m
817.
▲
by
liuliu
7y ago
My real use case involves transferring that event loop from existing thread to another spawned pthread, thus, having a "scheduler" / "executor" is easier. I think async.h is very similar to Protothreads, both are ve
818.
▲
by
liuliu
7y ago
Also: https://nlp.seas.harvard.edu/2018/04/03/attention.html
819.
▲
A More Natural Stackless Coroutine in C That Maintains Local Variables
(liuliu.me)
61 points
by
liuliu
7y ago
|
13 comments
820.
▲
by
liuliu
7y ago
We've written about it earlier this year: https://drz.today/2019/why-we-invest-in-silicon-while-our-be...
821.
▲
by
liuliu
7y ago
Yeah. Event at runtime, it seems possible when the owner thread gives up the ownership (by setting owner_tid = 0) can use an extra flag to let other threads to compete for the ownership. As long as the flag is on the 2nd half-word, (it seem
822.
▲
by
liuliu
7y ago
I think what the parent comment meant is it can be recursive. If you update one row, a lot of these recursively small minors of minors won't change, and you probably can do the computation quicker. I haven't fully worked out the m
823.
▲
by
liuliu
7y ago
In short, server data is more normalized than the data client needs. As you get closer to view layer, your data gets denormalized further and further. Client-server interaction sits somewhere in the middle to both minimize the bytes-over-wi
824.
▲
by
liuliu
7y ago
Yeah. But wouldn't it be nice / cool if the training process is interactive, reproducible, recordable and replayable?
825.
▲
by
liuliu
7y ago
it is hard to comment in this limited space without attracting a ton of downvotes. I am a futurist, and looking into 100-year from now, won't there be a united government just like what we saw in Star Trek? The rule-based global system
826.
▲
by
liuliu
7y ago
True. But the topic here is "One-China" policy.
827.
▲
by
liuliu
7y ago
True. It is just hard to rewrite nation borders once it is set and done for a country of China's size. Realistically, the West probably hope of USSR type of breakdown. To me, that is extremely unlikely given the desire of the Chinese p
828.
▲
by
liuliu
7y ago
What's the end-goal? Tibet cannot be a separate country (or in that respect, Hong Kong) very much like Quebec cannot be a separate country from Canada. You can say that China becomes arrogant, but what exactly West expect other than a
829.
▲
by
liuliu
7y ago
Then it is working. Fear is the best thing to force people to adopt authoritarianism. This comment just illustrated fearmongering is working beautifully in the United States as well.
830.
▲
by
liuliu
7y ago
I just surprised it wasn't already years ago, given South Park's nothing-is-safe free-pass in The States which we loved.
831.
▲
by
liuliu
7y ago
They do. It is a nationalistic rhetoric, much like what we saw here as well. At the end of the day, the legitimacy comes from some kind of populist support. Very unfortunate turn of events.
832.
▲
by
liuliu
7y ago
Interesting. To my knowledge, South Park was never imported into China. Maybe I am outdated, when it is imported to China?
833.
▲
by
liuliu
7y ago
It is not about serial ordering. The coroutine code looks the same as the synchronous code. While using GCD blocks, you can still end up with callback hells. However, you can, do nicer things with GCD when build on top of https://
834.
▲
by
liuliu
7y ago
Humans already do. Many SAT and GRE prep schools (New Oriental) taught statistic cues for these questions. Simpler cues could be picking "the longest answer in the 4 choices" or eliminate "the one most dissimilar to the other
835.
▲
by
liuliu
7y ago
We use custom format and an offline process to transform the format into Google Catapult for visualization. Catapult visualization for 30s trace should be pretty reasonable.
836.
▲
by
liuliu
7y ago
There are certain ironies. I don't think you can attribute the initial growth in 1980s to the U.S. investments. The initial growth in 1980s was largely driven by Hong Kong and Taiwan investments.
837.
▲
by
liuliu
7y ago
They both were kept their symbolic status at that time. HHDL was highest ranked in CCP before he fled. I don't know any evidence that sided with Koumintang backfired as you seemingly suggested for him. Part of the system was kept (nami
838.
▲
by
liuliu
7y ago
HHDL has a long and complicated life. His idealogy cannot be simplified to "seeking peace and religious freedom". Tibet was a slavery society under his ruling 70 years ago, unfortunately. People do change, but there are certain hi
839.
▲
by
liuliu
7y ago
First, they cannot be renditioned. That's what this protest is about. Yes. It is upset. It is also upsetting that the U.S. actually have limited due process as well (thus, can forfeit the asset without due process). There are practical
840.
▲
by
liuliu
7y ago
Hong Kong has independent jurisdiction system. So yes, they are living under a system where due process is respected.
More ›