Readit News logoReadit News
seventhson commented on A few things to know before stealing my 914 (2022)   hagerty.com/media/advice/... · Posted by u/colinprince
zdw · 2 years ago
I run an ergodox split keyboard and a thumb trackball.

Half the Keys have no labels, unless it's the one with the clear caps, which has no labels at all.

Right shift is mapped to Escape (for vim, of course)

There is no Caps-lock, only Control.

Nobody messes with my stuff. :)

seventhson · 2 years ago
Switch to a Dvorak layout (with blank keycaps!) and you will have all the bases covered.
seventhson commented on B.C. government hit tweet limit amid wildfire evacuations   vancouverisawesome.com/hi... · Posted by u/nosecreek
damnesian · 2 years ago
>Don't rely on proprietary infrastructure you have no control over for essential public functionality.

This. Love him or hate him, it doesn't matter- surely everyone can now agree Musk's personal, totally idiosyncratic treatment of the platform has rendered it completely useless for anything beyond pure vanity.

A public-owned twitter-type platform is the answer, imho.

We have publicly funded tv and radio- I think they have done a great job for what they are- what kid hasn't been improved by exposure to Mr. Rogers or Sesame Street?- but we live online now. It's time for a publicly-owned messaging system, whether that be federated or otherwise.

seventhson · 2 years ago
We already have an emergency messaging system called Amber Alert. Just generalize that infrastructure a bit and you're halfway there.
seventhson commented on {n} times faster than C   owen.cafe/posts/six-times... · Posted by u/414owen
torstenvl · 2 years ago
I haven't run any benchmarks, but jump-if-equal and set-if-equal would seem to have the same level of predictability.

My naive, untested intuition is that there's only one meaningful difference: the former has to dump the entire pipeline on a miss, and the latter only has to nop a single instruction on a miss.

But maybe I'm missing something. I'll re-read his rant.

EDIT:

Linus rants a lot, but makes one concrete claim:

    You can always replace it by
    
      j<negated condition> forward
      mov ..., %reg
     forward:
    
    and assuming the branch is AT ALL predictable (and 95+% of all branches
    are), *the branch-over will actually be a LOT better for a CPU.*
So, I decided to test that.

    [18:50:14 user@boxer ~/src/looptest] $ diff -u loop2.s loop4.s
    --- loop2.s 2023-07-06 18:40:11.000000000 -0400
    +++ loop4.s 2023-07-06 18:46:58.000000000 -0400
    @@ -17,11 +17,15 @@
      incq %rdi
      xorl %edx, %edx
      cmpb $115, %cl
    - sete %dl
    + jne _run_switches_jmptgt1
    + mov $1,   %dl
    +_run_switches_jmptgt1:  
      addl %edx, %eax
      xorl %edx, %edx
      cmpb $112, %cl
    - sete %dl
    + jne _run_switches_jmptgt2
    + mov $1,   %dl
    +_run_switches_jmptgt2:  
      subl %edx, %eax
      testb %cl, %cl
      jne LBB0_1
    [18:50:29 user@boxer ~/src/looptest] $ gcc -O3 bench.c loop2.s -o l2
    [18:50:57 user@boxer ~/src/looptest] $ gcc -O3 bench.c loop4.s -o l4
    [18:51:02 user@boxer ~/src/looptest] $ time ./l2 1000 1
    449000
    ./l2 1000 1  0.69s user 0.00s system 99% cpu 0.697 total
    [18:51:09 user@boxer ~/src/looptest] $ time ./l4 1000 1
    449000
    ./l4 1000 1  4.53s user 0.01s system 99% cpu 4.542 total
I feel pretty confident that Linus has made a poor prediction about poor prediction here. Jumps are indeed slower.

To be fair to Linus, since Clang and I are using sete here, not cmov, I also tested cmov, and the difference was insignificant:

    [19:53:12 user@boxer ~/src/looptest] $ time ./l2 1000 1            
    449000
    ./l2 1000 1  0.69s user 0.00s system 99% cpu 0.700 total
    [19:53:15 user@boxer ~/src/looptest] $ time ./l5 1000 1            
    449000
    ./l5 1000 1  0.68s user 0.00s system 99% cpu 0.683 total
Jumps are slower.

seventhson · 2 years ago
Linus' post is 15+ years old. Much has changed in Intel hardware since then. He was probably right on the money re the hardware available at the time.
seventhson commented on Flattening ASTs and other compiler data structures   cs.cornell.edu/~asampson/... · Posted by u/fagnerbrack
TazeTSchnitzel · 2 years ago
Blender (the 3D modelling software) is a fascinating case of this. To make loading and saving files fast and lossless, it uses identical on-disk and in-memory representations. In other words, everything is in an arena, and saving and loading is just a memcpy of the entire arena. Considering the massive potential complexity of a Blender project and the myriad issues you could have with serialisation and deserialisation, this seems like a great design to me.

The trade-off of course is that your data structure design is kinda sticky, insofar as you need to be able to open files for older versions.

seventhson · 2 years ago
I once worked on a very large commercial application that was based on a home-grown I/O framework which operated on similar principles.

It was a complete pain in the ass. You were constantly future-proofing your data structures because you knew you were going to be stuck with them for all eternity because the I/O framework was going to serialize them verbatim whether you liked it or not. Those were dark days...

seventhson commented on Goodreads has no incentive to be good   countercraft.substack.com... · Posted by u/lawgimenez
a_bonobo · 2 years ago
It's the same with IMDB, isn't it? Toxic subgroups and communities 1-star bombing movies that haven't even come out yet. The wikipage on review bombing doesn't even list Goodreads but has many examples from IMDB: https://en.wikipedia.org/wiki/Review_bomb#Films,_television_...

So what could Goodreads do differently? It's true that the owners do as little as possible with the site, but that also means that overall the scoring system has very little impact. Would you trust it?

seventhson · 2 years ago
Require reviews to show a substantial understanding of what the book was about? That means moderation which is always dangerous but probably better than the alternative.
seventhson commented on Monster gravitational waves spotted for first time   nature.com/articles/d4158... · Posted by u/throw0101c
chorsestudios · 2 years ago
These ‘monster’ gravitational waves have supposedly been ‘spotted’ by calculating disparities in pulsar timings. The article didn’t have as much information as I was hoping - were any of these waves detected/confirmed by LIGO?
seventhson · 2 years ago
The wavelengths are too large for LIGO. The wave measurements were correlated with data collected from many pulsars.

https://arstechnica.com/science/2023/06/nanograv-picks-up-si...

seventhson commented on Drugmakers are abandoning cheap generics   kffhealthnews.org/news/ar... · Posted by u/JPLeRouzic
bregma · 2 years ago
Well obviously the enlightened consumer would simply choose not to have cancer when the price of treatment is too high or the supply too low, thus keeping everything in balance and the theory working perfectly. Ceteris paribus of course.
seventhson · 2 years ago
"Ooo, the drugs for this cancer are cheap and plentiful. I'll choose this cancer for my terminal disease."
seventhson commented on Exposing Floating Point (2019)   ciechanow.ski/exposing-fl... · Posted by u/eindiran
turtledragonfly · 2 years ago
Pretty solid article. I'm glad there was mention of the non-uniform-distribution of floats, though my biased view wishes there were a little more emphasis that floats really really want to be "near 1", to keep precision. The practice of normalizing data to a [0,1] space, doing your math there, then transforming back to "big" space is useful not just for conceptual simplicity, but also for maintaining precision in intermediate results.

Also, there's a pretty good range of integers that can be represented exactly by floats; one of the reasons the Lua developers were resistant to adding an integer type for many years. I believe you can represent about 24 bits of exact integers in a 32 bit float.

I've been wrangling with fixed-point representations a lot lately, so the differences are stark in my mind (:

seventhson · 2 years ago
> floats really really want to be "near 1", to keep precision.

The number of significant digits is identical for (nearly) the entire range of FP values. There's no value to keeping it "near 1" for IEEE 754 floats - the precision is exactly the same regardless whether near 1 or near 1 trillion. This makes them ideal for general computation and modeling physical properties.

In contrast, posits, the unum alternative to IEEE 754, are highly sensitive to absolute scale. Posits lose precision as the magnitudes increase. Otoh, for small values, you get much higher precision which is why they getting some attention from the AI world where normalized weights are everywhere.

seventhson commented on How VSCode made bracket pair colorization faster (2021)   code.visualstudio.com/blo... · Posted by u/s3arch
david2ndaccount · 2 years ago

    > look, I'm sorry, but the rule is simple:
    > if you made something 2x faster, you might have done something smart
    > if you made something 100x faster, you definitely just stopped doing something stupid
<https://twitter.com/rygorous/status/1271296834439282690?lang...>

seventhson · 2 years ago
It might be stupid, or it also might just be naive, or a shift in priorities.

100x throughput improvement might just come from caching results from earlier computations (less naive) - at the cost of 10x memory footprint possibly (different priorities).

u/seventhson

KarmaCake day47June 12, 2023View Original