What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

0
0
0
0
1
1
1
0
1
0

however, since you know Haskell, i do find it pedantic from your side that you're attaching to the "useState makes it impure" position when clearly useState() API could have been made monadic in the way i wrote above without any changes to the actual thing it's expressing. so it doesn't matter

0
0
0

but yes, i'm not saying React is actually pure in the Haskell sense. that would be absurd. it's written in JavaScript which has an entirely different model. i thought this would be clear enough to a reader who knows both, and they'd be able to infer what i'm trying to say from the paragraphs below

0
0
0
0

since React conceptual model maps 1:1 to what i'm describing above, which *is* pure, we should be able to talk about React in those terms if we want to. otherwise it wouldn't be a 1:1 mapping. yes, the actual way React works is different, but that's a different pragmatic encoding of the same model

0
1
0

it isn't impossible, it's just clunky to write in JS because it has no `do` notation (`await` is limited to Promises, and `yield` would screw up static typing). it's also unnecessary runtime overhead to create intermediate closures that's why React just does useState(). "use" is the "do"

0
0

it could look similar to chaining Promises, like function Counter() { return useState(0) .then((count, setCount) => { return useEffect(() => { // ... }, [count]).then(() => { return <div>{count}</div> }) }) entirely pure, just a chain of continuations

0
0
0
0
1
0
0

time for an

my name is Andre, I'm a software engineer from Brazil, working mostly with Ruby nowadays, but I'm also Rust-curious.

I was recently diagnosed as being on the spectrum. I'm married, I have a daughter, and, probably, too many cats.

I guess my main hobbies nowadays are reading and listening to heavy metal.

0

오늘의 TMI
🇯🇵의 교정기관(교도소)의 열악한 환경을 보고 🇰🇷도 그렇게 해야 범죄자들이 다시 오지 않으려고 갱생된다고 말하는 사람들이 있더라.
🇰🇷 (3년 기준) 재범률 +-25% 내외, 🇯🇵은 재범률 55% 인건 쳐다보지 않더라.

0
1
0
0
1
0

Is your WhatsApp really private?

Short answer: Of course not.

Although WhatsApp uses end-to-end encryption to protect the content of messages, it collects a large amount of metadata and personal information that can reveal much more about you.

Find out here.

The information that WhatsApp collects can be grouped into several categories, according to its own privacy policy.

However, the most valuable information is extracted from metadata, Meta's gold mine.

0
1
1
0
0
1
0
1
1
0
0
0
0
1
1
0
1
1