878 karma · joined Jul 8, 2007 (19y ago) · 155 submissions
1.
Computers and Intractability: A Guide to Algorithmic Lower Bounds(blog.computationalcomplexity.org ↗)
1 points · by kcl · 4y ago · discuss
comment 4y ago · link · parent
comment 4y ago · link · parent
This is an open and ancient question. I don't suppose to have the answer. I will say, the case for mathematics pre-existing is stronger than what you refute here.
comment 4y ago · link · parent
> it's not rocket science to handle it in a sane fashion even in a multi-threaded application. Modern languages make this trivial. The author makes it sound like some dark art
Which language? I'll specify one so we can begin the process of picking each apart. Python? There is a sibling thread indicating Python issues. I don't know what the actual internal status is with Python signal handling but I am guessing the interpreter actually doesn't handle it correctly if I spent any time digging. Do you mean apps implemented in Python? They will almost certainly not be internally data-consistent. Exposing a signal handling wrapper means very little particularly when they frequently do this by ignoring all of the bad implications. I just checked Python's docs, and not surprisingly, Python guarantees you'll be stuck in tight loops: https://docs.python.org/3/library/signal.html That's just one gotcha of many that they probably aren't treating. This dialogue is going to play out the same way regardless of which language you choose.
Do you mean Postgres? I haven't used it recently but the last comment I read on HN seemed to indicate you needed to kill it in order to stop ongoing queries in at least some situations. If by a stroke of luck it does support SIGINT recovery (which would be great), what about the hundreds of other db applications that have appeared recently? You can't just call the signal handler wrapper and declare victory.
7.
210 points · by kcl · 4y ago · 90 comments
comment 4y ago · link · parent
I don't know if I think cryptocurrency will be as transformative as the internet or the mobile phone, but I think it will be within a level or two of that scale. It makes good on its promise year after year. NFTs just became popular in the last few years, and that is only one example of many. Are you going to bet against NFTs in the long run? I certainly wouldn't. We don't even know all the technologies crypto is going to enable yet.
comment 4y ago · link · parent
> Secondly, you know what's cheaper... Not doing anything at all.
These techniques are on the level of resetting a stack pointer or calling `sbrk()`. Incorporating them doesn't produce more-advanced GC schemes, it just means you neglected to consider similar allowances for RC.
The line of contention is at traversing the object graph and pausing threads.
10.
Reference count, don't garbage collect(kevinlawler.com ↗)
189 points · by kcl · 4y ago · 406 comments
comment 4y ago · link · parent
Punishing honest consumers is not the right way to go about this.
comment 4y ago · link · parent
> I've heard many many times that you can only learn math by doing it, which is certainly true
yes
> and is akin to saying that you can only learn a language by...
no. this is you evading the main point.
Taking a graded class with homework can help. So can finding an elementary book on a subject that interests you (topology, combinatorics, algebra, ...). Linear is dry, that may be your issue.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
There ought to be a codeword where you can invoke the shortcomings of Erlang without getting dragged into a conversation with someone desperate to talk about Erlang. Next time I will rot13 it.
comment 4y ago · link · parent
One issue is that the pthread model is too low level (think AND and OR gates), but you must include it for completeness.
I agree with the comments here that say higher-level multithreading support needs to be "baked in" to the language. Grand Central Dispatch did a good job of raising the bar here, but has its own problems, and is arguably too low level.
Another issue is that existing, widespread languages are too old to have cooked higher-level threading support in. You really have to do it from the start. C++ bolt-on parallelism might as well be syntactic sugar. Newer languages, like Rust, have attempted to solve concurrency problems but failed - it's not clear that the designers genuinely understand concurrency at all. Goroutines solve one limited issue of many and seem about as difficult as asking programmers to write threaded programs.
To do this correctly you need a new language that cooks it in from the start. There is a laundry list of things that have to be done precisely. It might be possible to do this by rewriting a reference implementation of an existing popular language, but the development overhead and performance concerns involved in backwards-compatibility make that probably infeasible. (Python can't even escape it's global-interpreter lock.) So likely the language that solves this problem is either unwritten or unknown.
Other mentions in the comments here:
ThreadSanitizer: It's not very good, nor can it be.
Erlang: solves the problem, but the actor formulation is too awkward for all but Erlang-specific use-cases.
19.
Stablecoins(kevinlawler.com ↗)
2 points · by kcl · 5y ago · discuss
20.
1 points · by kcl · 5y ago · discuss
21.
Tether Forward Contracts(kevinlawler.com ↗)
1 points · by kcl · 8y ago · discuss
comment 9y ago · link · parent
I advise people not to work for Joel or his companies. This is developer-hostile advice from someone who should know better. You don't want to work for a guy like this or his companies.
23.
15 points · by kcl · 10y ago · discuss
24.
Atlas Data Structure(getkerf.wordpress.com ↗)
28 points · by kcl · 10y ago · 6 comments
25.
Is Parallelism Hard or Not?(kevinlawler.com ↗)
7 points · by kcl · 10y ago · discuss
26.
Time Bars(getkerf.wordpress.com ↗)
2 points · by kcl · 10y ago · discuss
comment 10y ago · link · parent
There are several steps where your method could (will) fail. Since you don't introduce any machinery for the hand, you imply an O(k^2) checking algorithm. You also imply an unsorted hand. If you generate the hand in random order, then you fall to an O(k*lg(k)) sort. "Sorted" is an implicit requirement that we initially omit, but revisit later, because introducing it early makes the discussion harder to follow.
If you try to introduce machinery like a hashtable, the next thing you might suggest, you violate an implicit O(1) additional space requirement, which I've grudgingly reintroduced to the more-formal description ("why is this here?"). This conversation keeps going, but other failure paths we leave unexamined.