Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rbehrends
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
rbehrends
3y ago
Delaying deletions can result in significant memory overhead [1]. TANSTAAFL, as they say. [1] https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...
32.
▲
by
rbehrends
3y ago
> It may not be a problem in a language like Rust, where the compiler understands the concept of immutability. But most (if not all) mainstream languages except Rust don’t. Your object may be immutable in January but in February someone
33.
▲
by
rbehrends
3y ago
> That is a niche case not a common one though. It was an example meant as an illustration. The general case of "collection of objects" is hardly niche. > This attitude of non-systems programmers is why people argue garbage
34.
▲
by
rbehrends
3y ago
> Still no, because STW GC can pause innocent code in arbitrary unexpected moments. Well, yes, that's the problem, isn't it? And that's the point I was making. Pauses in the main thread absolutely count for latency purpose
35.
▲
by
rbehrends
3y ago
This is not a problem if the returned object is immutable. If you're returning mutable objects, then that already needs to be documented as part of the AI and not an incidental discovery from the object being reference counted. In any
36.
▲
by
rbehrends
3y ago
It would then follow that a stop-the-world collector is A-OK for single-threaded programs, because that doesn't count as pausing?
37.
▲
by
rbehrends
3y ago
> They are natural, and easy but that doesn't mean they are the right way. > Often I find with a little thinking that there is a enum key under it all that I can hard code - and the enum key is also type safe so that the compiler
38.
▲
by
rbehrends
3y ago
First, I have no desire to handle both memory and external resources in a unified way, because memory management and resource management have different needs. Memory is not just "one kind of resource", it's a very specific ty
39.
▲
by
rbehrends
3y ago
1. Such data structures (or more generally, std::vector<std::string, std::vector<std::string>> or something like that) are the natural way to represent e.g. dictionaries. So, you absolutely often need to do that and "don&#x
40.
▲
by
rbehrends
3y ago
What happens if a large std::unordered_map<std::string, std::string> has its destructor called? The maximum number of references is a red herring. While having a RC capped at 1 allows you to elide the actual reference count and makes
41.
▲
by
rbehrends
3y ago
This particular group ("Vulkangruppe") isn't about ecoactivism. They're an extremist, violent anarchist group that have previously attacked objects such as cable ducts or radio masts with the overall aim to disrupt publi
42.
▲
by
rbehrends
3y ago
For what it's worth, in Kotlin you could also do the following: val newLoc = oldLoc.run { copy(x = x * 2, y = y * 2, z = z * 2) }
43.
▲
by
rbehrends
3y ago
Absolutely not. While it obviously should not be used for use cases that it isn't designed for, as a conservative mark-and-sweep GC it is extremely well engineered and has very good throughput.
44.
▲
by
rbehrends
3y ago
> The compiler support you need in practice is quite limited. This is true, but it's absent especially in C. Of course, as long as you can intercept writes and/or reads through pointers, you are good to go in principle. However
45.
▲
by
rbehrends
3y ago
> I have been writing low latency code for a decade and never seen cascading deletes be a problem. I don't know what your domain is, but the domains I'm familiar with (especially hard real-time) deal with the underlying constra
46.
▲
by
rbehrends
3y ago
> It was demonstrated in the mid 80s that the MMU could be used to implement the write barrier (when I saw that I knew lisp machines were a dead end, though I kept using them for as long as was feasible). You can use this and other compi
47.
▲
by
rbehrends
3y ago
This needs some qualifications. The above problem is about latency of stop the world collectors in a domain that requires extremely low latency. And if you think that stop the world collections are representative of garbage collection as a
48.
▲
by
rbehrends
3y ago
The difference between Git and Bazaar/Breezy is how it handles displaying branches. In the latter case, you're getting a hierarchical log by applying the approach recursively, not a graph, which (IMO) is the better visualization.
49.
▲
by
rbehrends
3y ago
I could go into some detail here why Git is the harder to use system of the two, but I think that would miss the bigger point. IMO, the larger and longer-term problem is that (open source) version control systems seem to be mostly stuck in
50.
▲
by
rbehrends
3y ago
Mercurial runs on Python 3 just fine and has been for a while. In fact, starting with Mercurial 6.2 (from July 2022), Python 2 is no longer supported [1]. [1] https://wiki.mercurial-scm.org/Release6.2
51.
▲
by
rbehrends
3y ago
As somebody who has actually been using Sapling (because it provides a much saner UI and mental model than git), the git compatibility of Sapling is at best so-so. It feels more like a stopgap solution while they're evolving their own
52.
▲
by
rbehrends
3y ago
Because EU and German jurisprudence have created plenty of holes. It used to be that pure software inventions were unpatentable, while mixed software/hardware inventions (the classical example is anti-lock brakes) were patentable. Doct
53.
▲
by
rbehrends
3y ago
You can also publish .NET apps/services directly as container images [1]. Or you can distribute them as a single file, standalone, "ready to run" application, which precompiles your methods and includes the JIT. This results
54.
▲
by
rbehrends
3y ago
You can have it clean without rebasing. This is simply a matter of properly visualizing the history. Unfortunately, most of the major version control systems have decided to basically just dump a raw graph rather than presenting the history
55.
▲
by
rbehrends
3y ago
Well, it was apparently upheld twice on reexamination, where they could have fixed that. The problem is more that the bar for non-obviousness is so low, it's basically on the floor. Paired with a discipline (software development), wher
56.
▲
by
rbehrends
3y ago
No. It's more like what the following piece of code produces: def convert(xml): import re parsed = re.split(r"(<.+?>)", xml) output = parsed[0] tags_with_pos = [] for i in range(1, len
57.
▲
by
rbehrends
3y ago
> Remember, the actual i4i patent at issue was filed in 1994, and it only matters if there was prior art from before 1994. It might have been novel at the time. I am aware of the date of the "invention". I was programming on 8-
58.
▲
by
rbehrends
3y ago
It's not about storing XML, it's (as far as I understand the patent) about a specific representation of XML that can be more efficient to read. The patent is about representing documents with markup (XML or otherwise) not by embed
59.
▲
by
rbehrends
4y ago
> I never use three way string comparison, and so I wondered when other programmers use it. Three-way comparisons show up naturally when doing a binary search or implementing binary trees. Interestingly, the binary search implementation
60.
▲
by
rbehrends
4y ago
The actual waste here is that while the European Parliament normally meets in Brussels, it is still bound by a 1992 decision to have a monthly session in Strasbourg [1]. This creates a huge and unnecessary overhead (shuttling 705 MEPs back
More ›