Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Skinney
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
481.
▲
by
Skinney
11y ago
> ... lots of Git usage patterns have evolved around creating garbage and then throwing it away rather than having an explicit and safe delete operation that is rarely used Any delete operation in Git is safe. At least compared to delete
482.
▲
by
Skinney
11y ago
A merge will provide you with a single commit-message, rebasing will provide you a commit-message for every commit, making it easier to remember what the intent of a change was. Sometimes that isn't clear. Regarding the "rebase, c
483.
▲
by
Skinney
11y ago
Yes, but a rebase re-applies every commit to the new base. So you solve conflicts one commit at a time, instead of solving every conflict in a single merge commit. It's easier to remember the intended behaviour when the code changes ar
484.
▲
by
Skinney
11y ago
Well, you can set the expiration period for the reflog. If I remember correctly you can set it to "never". You can also disable alteration and removal of branches on a remote git repo. It's really all about knowing your tools
485.
▲
by
Skinney
11y ago
I used bookmarks back when I used Hg, which is a couple of years ago, but I had some problems with them. From time to time bookmarks wouldn't update remotely. This made me always push twice, to make sure the bookmark was updated. They&
486.
▲
by
Skinney
11y ago
What do you mean by a "set of commits". Why not just have topic branches? Branches isn't the only thing that keeps commits alive, you also got the reflog and tags. I have a hard time understanding why you would want to keep s
487.
▲
by
Skinney
11y ago
Git doesn't really have a technical difference between a tag and a branch either. They are both files containing a hash for some commit. Tags are just more cumbersome to move (branches are moved on new commits), and they can be signed
488.
▲
by
Skinney
11y ago
Hey, if you don't use the index then don't use the index. Use git commit -a. If you wan't something like the index in Mercurial you have to specify which files you want to commit, or which to exclude, which IMHO is a lot more
489.
▲
by
Skinney
11y ago
Technically, JVM doesn't have a type system, last I checked. Which is why Java (the language) uses type erasure. CLR does have a type system, but this also makes certain things harder to implement which is why, i think, Scala stopped w
490.
▲
by
Skinney
11y ago
It also has a large impact on how often the GC is run. Less memory used, less GC performed.
491.
▲
by
Skinney
11y ago
Not yet, but that is planned for the next release.
492.
▲
by
Skinney
12y ago
Considering React says that there are things they can do to improve React even more, suggested to me that React is currently as fast or slower than those other frameworks, but React can once again become faster than them.
493.
▲
by
Skinney
12y ago
> This is said often but without much qualification. I've found mutable data structures with change propagation (via observable or what not) to work much better given that the whole diffing thing can be avoided altogether since you
494.
▲
by
Skinney
12y ago
Im not arguing in favor of GC. The argument was that a GC takes away memory control, but memory control is up to the language. Go doesn't restrict you to stack/heap allocation. You can create structs which embeds other structs. Th
495.
▲
by
Skinney
12y ago
Depends on the language. Go, for instance, gives you a lot of freedom when it comes to memory layout, and allows you stack allocate objects to avoid GC.
496.
▲
by
Skinney
12y ago
It wouldn't work reliably in C# either. Both platforms allow you to inform the GC that now would be a good time to collect, but in both systems the GC can ignore your advice. C# has structs which will try to allocate on the stack, but
497.
▲
by
Skinney
12y ago
A GC cannot occur at any tie after deallocation. Well, I guess it depends on the collector really, but usually it happens on allocation. If you avoid allocations, you also avoid collections.
498.
▲
by
Skinney
12y ago
Two things. First, most GC doesn't actually deallocate anything, but that's a minor nitpick. The second, more important note, is that you are now describing a system where everything is garbage collected. This needn't be the
499.
▲
by
Skinney
12y ago
True. What I really meant is that safe code can interact with unsafe code, and thus cannot guarantee everything working correctly. Of course, this is bug with unsafe code, my bad.
500.
▲
by
Skinney
12y ago
Go is stable, wheras Rust is not. Go also targets other use cases than Rust, and so the two are not directly comparable. 1. Rust cannot guarantee multi-threaded memory safety in all cases. Care, as in Go, must still be taken. 2. I agree wit
501.
▲
by
Skinney
12y ago
The only thing that worries me about this product, is that there isn't any mention of battery life.
502.
▲
by
Skinney
12y ago
It means it inherits the 'this' of the enclosing function. Without fat arrow: function outer() { function inner() { this === inner.this; } } With fat arrow: function outer() { var inner = => this === outer.this; }
503.
▲
by
Skinney
12y ago
Oh? Lifetimes are that flexible? It's been a long time since I looked into Rust, so I had no idea. I would thought it was difficult to decide when to free an object, if it is linked to by two separate data structures and one of them go
504.
▲
by
Skinney
12y ago
The core datastructures are immutable and uses structural sharing. This would require reference counting (slower) or a proper GC to be efficient (Rust doesn't have one). Doing this in Rust would probably give you worse results than the
505.
▲
by
Skinney
12y ago
> Now, if someone combined a pauseless GC with proper cleanup (i.e. skipping GC altogether) of variables where the compiler could determine when they can be thrown away, matters would be different. (So, in other words, the compiler inser
506.
▲
by
Skinney
12y ago
Or just a smart language implementation. Go makes it easier to avoid heap allocation, and thus GC, since it allows you to specify if a structure resides on the heap or stack.
507.
▲
by
Skinney
12y ago
The way you guarantee constant framerate in both a GCed or manual environment is the same: arenas/regions/pools/buffers. Manual memory management is susceptible to memory fragmentation, which can severely slow down allocation
508.
▲
by
Skinney
12y ago
Ahh, commented on the wrong article... Was wondering why I was downvoted :P
509.
▲
by
Skinney
12y ago
Would be fun to try to compare this with a decent GC and see what the difference is likely to be. The reason why I say this is because Javas default GC pre-allocates a heap (a Java allocation is mostly just bumping a pointer), and since it
510.
▲
by
Skinney
12y ago
Nah, Clojure seqs are more like .NET/LINQ enumerables. Functions that work over seqs/enumerables return a new seq/enumerable. From what I understand, and I'm sure I am wrong, a transducer receives and transforms a value,
More ›