Readit News logoReadit News
shallowthought commented on Police find electronic signal-jamming device inside California home   whio.com/news/trending/po... · Posted by u/CharlesW
Dylan16807 · 4 years ago
> But hey, why worry about tainting the jury pool, right? Guilty!

How many people do you think follow that twitter account?

Even if half the citizens have prior knowledge of a case, you'd just pick the jury out of the other half.

shallowthought · 4 years ago
God my life would be so much easier if I could just choose which half of America the jury pool came from.
shallowthought commented on React Renderer for Three.js   github.com/pmndrs/react-t... · Posted by u/oleksiitwork
tills13 · 4 years ago
Is there an error in the examples? You have

    const mesh = useRef()

    ...

    <mesh ref={mesh} ...

You'll be rendering an undefined element (before the ref has a chance to attach).

Also, the TypeScript example makes me head hurt.

    const ref = useRef(null!)
Ah, yes. A non-null null literal.

shallowthought · 4 years ago
I have to wonder: Have we gone too far? Is TypeScript becoming more tedious than helpful? Has React lost its way in its blind zeal for pure functions?

...no, no, definitely not. Must've gone crazy for a second there.

shallowthought commented on SolarWinds hackers were able to access Microsoft source code   msrc-blog.microsoft.com/2... · Posted by u/accountinhn
shallowthought · 5 years ago
Of course, it absolutely HAS to be a nation-state. There's just no way anybody not being paid millions of dollars could possibly break their ironclad blah blah whatever you get it

Deleted Comment

Deleted Comment

Dead Comment

shallowthought commented on Linus Torvalds' good taste argument for linked lists, explained   github.com/mkirchner/link... · Posted by u/mkirchner
axaxs · 5 years ago
Simply put, safety slows code down. It's a matter of whether you know what's happening underneath or not. The more you try to make C completely safe, the more you slow it down and therefore remove the need to have written it in C in the first place. Whether that's a good thing or not is an exercise for the implementer.
shallowthought · 5 years ago
That's irrelevant to what Linus is saying. He's not saying "this is good code, but only with the caveat that it's written in C and run in the Linux Kernel". He's saying that changing it to make it far more difficult to read and modify, but cleverer, has made it better code in general.
shallowthought commented on Zero-click, wormable, cross-platform remote code execution in Microsoft Teams   github.com/oskarsve/ms-te... · Posted by u/Tomte
Denvercoder9 · 5 years ago
More likely a typo, considering that "z" and "x" are next to each other on the keyboard.
shallowthought · 5 years ago
DVORAK users might have something to say about that, you insensitive clod!
shallowthought commented on Zero-click, wormable, cross-platform remote code execution in Microsoft Teams   github.com/oskarsve/ms-te... · Posted by u/Tomte
shallowthought · 5 years ago
Is spelling "zero" as "xero" a pun I don't get?
shallowthought commented on Why I Love Tailwind   mxstbr.com/thoughts/tailw... · Posted by u/0xedb
timdaub · 5 years ago
Mhh... I don't know how to feel about this.

Over the last year, I've shipped a bunch of (p)react components [1, 2, 3] and what is cool about them is indeed that you can now encapsulate a UI function and make it re-usable within your project or even across projects.

In theory, this should finally give front end devs the same super powers as backend devs: high reusability.

However, a problem that I wasn't able to distinctly address is CSS. Currently, there's simply too many variants of encapsulating CSS into a "react module". You can opt to use:

- css modules

- styled components and derivatives

- CSS in JS or classes in JS, etc.

But ultimately, if you build your UI as a patchwork of many integrated UI elements (which IMO should be something legit in frontend development), you'll end up having to include 5 different CSS-in-bla libraries either in your build pipeline or (worse) in your bundle code that you ship to production (bloats the size and hence your app's performance).

Long story short: Combining styled components with twin macro and tailwind doesn't make my life easier currently. And the benefits to my users will not be apparent directly either.

Not to say that all the CSS-to-XY movement isn't cool. Still, I think the best solution to this problem has yet to be discovered.

1: https://github.com/TimDaub/preact-touchable-dock

2: https://github.com/TimDaub/react-envelope-graph

3: https://github.com/TimDaub/react-simple-knob

shallowthought · 5 years ago
My concern is that people might get too complacent with libraries that claim to make CSS local, and people might get lazy and all start using the exact same "generate a unique id" library, which will then start generating a ton of the same id across multiple users of that library.

u/shallowthought

KarmaCake day39June 8, 2020View Original