Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Peaker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
271.
▲
by
Peaker
12y ago
> are not enabled by default because they can either lose history (rebase) or are complicated for new users (or are of dubious benefit). Yet for me and many users, this means we cannot go to any coworker's terminal and use those fea
272.
▲
by
Peaker
12y ago
Out of the box support for rebase and interactive rebase. Interactive commands to stage/unstage/commit. Better underlying data format: Checking out any version in history is a cheap operation. And generally better acceptance of th
273.
▲
by
Peaker
12y ago
Do you consider "git" a shiny new thing? Using CVS over git in this day and age is a very dumb decision. They may make up for it in other, good decisions. But this decision is a dumb one.
274.
▲
by
Peaker
12y ago
Great, and now how do you reasonably share a dependency between multiple repositories while correctly tracking the exact version of that dependency at each point in history?
275.
▲
by
Peaker
12y ago
When will submodules' horrible UI finally be fixed? Manually running "git submodule update" after every single command is terrible. Having the submodule in a modified state with "new commits", with no differentiatio
276.
▲
by
Peaker
12y ago
The error condition is represented by Nothing ("None" in OCaml?) and the rest of the code only runs if it was Just ("Some" in OCaml?).
277.
▲
by
Peaker
12y ago
Original code: if some_error_condition then None else ( // everything else in the function is nested ) Why not use a Maybe/Either monad like: x <- some_maybe_value // ever
278.
▲
by
Peaker
12y ago
Why Cont when Either would do?
279.
▲
by
Peaker
12y ago
You can write functional programs in Java, because it supports immutability, pure functions, etc. The fact Java has these features does not mean they are not FP :)
280.
▲
by
Peaker
12y ago
Note, %hu and %hhx are not portable ways to print uint16_t and uint8_t. Instead, you're supposed to #include <inttypes.h> and use: "No type promotion here: %f %"PRIu16" %"PRIx8"\n"
281.
▲
by
Peaker
12y ago
In Haskell, the latter looks like: alist = (map (**2) . filter (\x -> x `mod` 3 == 0)) myList Or: alist = (map (**2) . filter ((== 0) . (`mod` 3))) myList If alist is a transformation, and not applied to myList, it's c
282.
▲
by
Peaker
12y ago
Python tuples are used in both ways. Even in Haskell, though, people often write all kinds of type-class magic to allow "iterating" over a tuple. For example, a Binary instance over a tuple wants to call "put" on each
283.
▲
by
Peaker
12y ago
A single cryptic bug due to this practice will more than negate the minor doc readability benefits you get from that. And there will likely be many more than one cryptic bug. There are other ways to emphasize it ought to be a dict/mapp
284.
▲
by
Peaker
12y ago
I think the real problem here, and it is a true problem with Haskell development, is perfectionism. Code in Haskell can be so elegant, and examples of beautiful code are so abundant, that hacking together a bunch of hacks to see if they wor
285.
▲
by
Peaker
12y ago
The duplication there in each AST node kinda hurts the eyes :) Also, the type-switch on interface {} is ugly. Consider how an AST looks like in Haskell: data AST = LiteralInt Int | LiteralFloat Float | List [AST] ...
286.
▲
by
Peaker
12y ago
He said Go had something new to offer, and listed old things. He said Go makes concurrency safe & easy, when Go emphasizes features that contradict safety and ease. He said Go tackled problems in a newer way, when Go is really Algol69 +
287.
▲
by
Peaker
12y ago
Not quite, given that C++ templates do higher-level type-checking than just expanding and checking. Also, they support higher-order kinds (a template parameterized by a template). And specialization (specifying special cases). And automatic
288.
▲
by
Peaker
12y ago
Can you show some small example encoding of an AST in Go?
289.
▲
by
Peaker
12y ago
> I usually (> 98% of the time) only care if that something adheres to an interface. Well, whether something is "nil" or not definitely matters to whether it adheres to the interface, doesn't it? > There's no do
290.
▲
by
Peaker
12y ago
It's much more than just at the start end return of every function. But OTOH, it's much less than assertions, since they're restricted to a subset that can be proven (usually automatically). Note the Scala verbosity here is S
291.
▲
by
Peaker
12y ago
I actually use that solution in c (we have some reasons to avoid c++). Of course it sucks, but at least c has the excuse of being from the 70's.
292.
▲
by
Peaker
12y ago
> This ontology evolves over time as the software, understanding of the domain, & the domain itself changes. So what does this have to do with Go or type systems? > I usually use guard clauses to protect against nulls. I rely on m
293.
▲
by
Peaker
12y ago
It does not mean "memory safe" in general. It means different things in different contexts. Also, I wasn't making a point about the word "safe". I was making a point that if go is "safe", then the word &qu
294.
▲
by
Peaker
12y ago
I recommend Dijkstra's paper: "On the foolishness of "natural language programming" [1]. It explains how natural language is a very poor way to express programs, and how it held back science and progress for many centuri
295.
▲
by
Peaker
12y ago
Writing a language in Go, which doesn't have sum types won't be fun. Also, if you want to implement a compiler, and not an interpreter, the host language having GC is not very useful to get GC. Haskell is going to make working wit
296.
▲
by
Peaker
12y ago
Haskell powers quite a few blogs and websites. The claim that it is "no longer a practical language" is as silly as the "Real World" fallacy.
297.
▲
by
Peaker
12y ago
> Tell me again that Go does nothing new for us None of the things you mentioned are new. > Go makes concurrent programming safe and easy Mutability & concurrency, nils, interface casts -- these things all go against safe. >
298.
▲
by
Peaker
12y ago
Refusing to complicate the language is nice, unless it means complicating or making every program in that language less safe. Repeatedly, Go chooses the latter, and many people hail it while writing programs that crash on nil dereferences o
299.
▲
by
Peaker
12y ago
You seem to be brushing this off as a minor nuisance, when in many cases it is a showstopper. Need it for floats, duplicate it again. This is a solved problem -- the fact Go doesn't have the solution reflects very poorly on Go.
300.
▲
by
Peaker
12y ago
Programs that crash with null pointer dereferences are not very useful. Considering that "safe" removes most of the usefulness of the word "safe".
More ›