Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mrkeen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
421.
▲
by
mrkeen
11mo ago
> The main point of OOP to me is hiding internal state. > Some things are not well-suited to OOP, like linear processing of information in a server. I suspect this is where the FP excitement came from 'Hiding' isn't goo
422.
▲
by
mrkeen
11mo ago
> Other bright sparks jumped in on the action: what if this separation did not rely on the personal hygiene of the programmers - something that should always be called into question for public health reasons - and was instead enforced by
423.
▲
by
mrkeen
11mo ago
> Think about how you would model a laundry mat. It isn't enough to say you could use optimistic locks for access to the machines. One machine? Too easy, I want multiple machines! I want to reserve this machine and that machine.
424.
▲
by
mrkeen
11mo ago
So then I would sell STM to you from the "other end". Everyone else has multiple threads, and should replace their locks with STM for ease and safety. You've got safe single-thread and CSP, you should try STM to gain multithr
425.
▲
by
mrkeen
11mo ago
> databases also solve this problem They could, but are typically configured not to. With default settings they let other processes' commits cut into the middle of your read. (See READ_COMMITTED.). I was flabbergasted when I read th
426.
▲
by
mrkeen
11mo ago
All of the "my non-Haskell language does this" comments in the thread are the same (with maybe a Rust exception). The "lock" instruction is what the article is telling you to ditch. > If the programmer forgets to lock
427.
▲
by
mrkeen
11mo ago
Yes, multithreaded problems go away on a single thread. Is there any way for an external thread to ask (via CSP) for the state, think about the state, then write back the new state (via CSP)? If so, you're back to race conditions - wit
428.
▲
by
mrkeen
11mo ago
> it's better to avoid shared mutable state entirely. Yes! I would even go so far as to have the type system separate the mutable from the non-mutable for this reason! > Something actor like fits better and C# or Go channels work
429.
▲
by
mrkeen
11mo ago
And it's all still true, although I would offer the usual argument that concurrency!=parallelism, and if you reach for threads&STM to try to speed something up, you'll probably have a bad time. With the overhead of GC, STM-re
430.
▲
by
mrkeen
11mo ago
> I know OOP isn't cool any more, but the above is what OOP solves. The article was a lengthy explanation of why the problem occurs in non-STM settings. In OO settings. What do you propose as an OO solution?
431.
▲
by
mrkeen
11mo ago
What is the point of OO?
432.
▲
by
mrkeen
11mo ago
I don't get this: the entire Compaction needs to be wrapped in a mutex, and every callback needs to start with lock/unlock pair ... So explicit locking probably gravitates towards having just a single global lock around the en
433.
▲
by
mrkeen
1y ago
My point is, for an article about functional programming and Erlang, there wasn't any functional programming in Erlang. The author pivoted from rejecting "change state of X" to advertising "change state of mailbox".
434.
▲
by
mrkeen
1y ago
Port ping.erl and pong.erl to C and we'll compare them.
435.
▲
by
mrkeen
1y ago
> The author did not say this at all, they barely even touched on capabilities of erlang/OTP. Two separate Erlang nodes. On different machines, different networks, different continents if I wanted. And they could just… talk. No
436.
▲
by
mrkeen
1y ago
It's N1 is N - 1 , not N is N-1
437.
▲
by
mrkeen
1y ago
The hyperbole that Haskellers invoke around pure-functional vs impure is that you're never quite sure whether a function call you make will "fire the missiles". It's colourful language, but it's just a stand-in for
438.
▲
by
mrkeen
1y ago
It would be impractical. It would be monumental to even specify what 'safe' means in that degree of freedom, let alone allow/reject arbitrary assembly code according to the spec. E.g. Trying to reject string operations which
439.
▲
by
mrkeen
1y ago
What security issues are biting you in safe languages that wouldn't also appear in C/C++ ?
440.
▲
by
mrkeen
1y ago
Your environment is probably not more constrained than this: https://github.com/Copilot-Language/copilot
441.
▲
by
mrkeen
1y ago
They are, but you don't tend to keep them around in memory long enough. Start consuming the front before you produce the back.
442.
▲
by
mrkeen
1y ago
Getting shot? I think you might have stumbled onto the question of gun control. I wonder if that's ever been a topic of discussion. Or if it's about black-on-black crime, maybe there's something to look into with affirmativ
443.
▲
by
mrkeen
1y ago
> I'm not sure I understand Q1 - that's exactly the point: If you withdraw _from your account_ and customer B withdraws from _their_ account Same account. > the actor isn't clear here when you say "I re-read events
444.
▲
by
mrkeen
1y ago
* As others have pointed out, Paxos is leaderless. Electing a leader is a performance trick (reduce contention/retries), not a correctness trick - if you want to order your events. * EPaxos appears to relax ordering as long as the cli
445.
▲
by
mrkeen
1y ago
Where can I read more on F# unboxed types? My searches are only turning up examples of unboxed primitives. Where's the equivalent to https://hackage-content.haskell.org/package/vector-0.13.2.0/... ?
446.
▲
by
mrkeen
1y ago
Agreed. Modern Spring brags about not requiring pages of external XML files like it did in the old days. But plain constructors is still an improvement on both.
447.
▲
by
mrkeen
1y ago
If you're having trouble 'seeing from the other side', just substitute "toddler" for "communist", and "poisoned for years by memes and disinformation" with "infected by the woke mind virus&q
448.
▲
by
mrkeen
1y ago
Remember in 2015 when there was no chance of Trump winning, then he did, and everyone collectively realised no-one had actually talked (listened) to any of the voters that put him in power? Well, after win #2 (this time with the popular vot
449.
▲
by
mrkeen
1y ago
> if you wanted something changed and there was no agreement, you created a fork and if it was truly better it was eventually adopted by the majority. This assumes there wasn't agreement. And if so, what would 'eventually adopt
450.
▲
by
mrkeen
1y ago
Orphanless typeclasses FTW
More ›