Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
chousuke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
76 ms
·
721.
▲
by
chousuke
16y ago
I think this point is overlooked all too often. With git, just mashing out code and committing at regular intervals is not using git to its full potential. You're supposed to spend time crafting proper commits, consisting of logical, well-s
722.
▲
by
chousuke
16y ago
For uninstalling things, pkgutil is a useful tool to know about. You can list all installed packages with pkgutil --pkgs and uninstall them by doing pkgutil --unlink pkgid I wondered for a long time how to uninstall packages from OS X until
723.
▲
by
chousuke
16y ago
I think the fact that git forces you to learn how it works is one of its greatest strengths. It's not like it's rocket science either; git's internals are remarkably straightforward considering what it can do. By having a rudimentary unders
724.
▲
by
chousuke
16y ago
Finns seem to like coining neologisms as well. The language is extremely productive, with every base word potentially yielding dozens of derivatives. There's even a national "language office" that tries to promote Finnish alternatives to fo
725.
▲
by
chousuke
16y ago
If git has defined 'branch' to mean something different from other VCS, then I think git got it right and everyone else is wrong. The distributed nature of git (and any DVCS) means developers on the 'dev branch' are working on different b
726.
▲
by
chousuke
16y ago
The repository/workspace issue I can agree with (though there is an environment variable that you can use to specify a repository outside the current directory), but what do you mean with "conflating branches and repositories"? In git, bran
727.
▲
by
chousuke
16y ago
My experience is exactly to the contrary. Often ads are loaded from some horribly slow server and it slows down the browser which has to wait for them, reflowing the content after each one. Not to mention that ads often change when the page
728.
▲
by
chousuke
16y ago
My current understanding of monads is that they are just a formalisation and a generalisation of an execution (or composition) mechanism that is implicit in most languages. For example, in a language like C, the active part of the program i
729.
▲
by
chousuke
16y ago
I don't understand this sentiment. Kanji are an integral part of the japanese language, and much of it doesn't make sense without them. You can and should start studying kanji as soon as you have a reasonable command of hiragana. Every time
730.
▲
by
chousuke
16y ago
Git pull/merge etc. have a --no-ff switch that will do a normal merge even if a fast-forward is possible. You can even configure the default, though I don't remember the config variable.
731.
▲
by
chousuke
17y ago
It does neither. The dispatch logic is on the protocol side, which can be modified. When a class is extended, the protocol function is changed to have an extra instance check. (I don't understand the details in full, though. You'll need to
732.
▲
by
chousuke
17y ago
I'd like to clarify that Protocols just generate a bunch of functions and a Protocol object (and an interface, but that's an implementation/interop detail). The functions are the interesting things in most cases. However, they're also names
733.
▲
by
chousuke
17y ago
Clojure's not very fast with numerical code if you write it idiomatically. One main reason for this is that functions can't (for now) take primitives as parameters, so all arithmetic is boxed unless it's done inline with explicit type hints
734.
▲
by
chousuke
17y ago
What kind of abstractions are the most trustworthy? In my experience, the ultimate in abstraction is anything that works solely with immutable data. This includes, obviously, pure functions, but also objects which have no mutable state. Suc
735.
▲
by
chousuke
17y ago
Most likely it's a "list" in the DSL, but implemented using Clojure's vectors, which are represented with square brackets and have convenient evaluation semantics (items are evaluated, but it's not a function call), so that it's much more c
736.
▲
by
chousuke
17y ago
I think you'll find that whatever git does, it's faster than the corresponding operation in SVN. When you send commits to a remote server, git compresses them and sends the packfile over the network. The server will refuse non-fast forward
737.
▲
by
chousuke
17y ago
I may just be stating the obvious, but I think this is because git is decentralised and SVN is not. If you fork a git project, your clone is just another branching point in the DAG that represents the "universe" of commits across all reposi
738.
▲
by
chousuke
17y ago
Functional programming is very focused on composing operations. Function composition is an obvious example, but it is not the only one. As far as I understand monads, they allow you to write generic operations separate from the logic needed
739.
▲
by
chousuke
17y ago
If you think of "git checkout" as "update the working copy", doing all those things with a single command makes a lot of sense. The "create a new branch" functionality doesn't really belong in your list, since branches are created with "git
740.
▲
by
chousuke
17y ago
I don't think it's unlikely at all. Git might be succeeded by something, but certainly some projects will be around. For example, the Emacs repository (the git clone at least. I haven't checked bzr) has commits dated before my birth. Some o
741.
▲
by
chousuke
17y ago
Branches don't really "disappear" in git, though. You're probably already aware of this, but for everyone not familiar with how git works: Named branches in git are just moving references to commits. If you delete the pointer, the branch do