Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
oisdk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
oisdk
7y ago
What about the singleton tree with just None in it? As in, what's the difference between `node(None, leaf(), leaf())` and `leaf()`? Or the following: x / \ / \ / \
62.
▲
by
oisdk
7y ago
Oh ok, I understand. I don't really buy the idea that go is a simple language, I have to say. A lot of go's design choices read (to me) as needlessly complex, like features were added to address corner cases one by one instead of
63.
▲
by
oisdk
7y ago
I'm not sure if I understand you: the `res, err := fun(); if err != nil` pattern shows up everywhere in most Go code, and I think that pattern-matching would be a better fit for it. Swift does it pretty well, as does Rust, both of whic
64.
▲
by
oisdk
7y ago
Well, adoption rates of programming languages has almost nothing to do with the features and qualities of the language itself. Swift is big because it's backed by Apple, Go is big because it's backed by Google, Javascript because
65.
▲
by
oisdk
7y ago
I wasn't really trying to convince anyone to use Haskell at their day job: I am just a college student, after all, so I would have no idea what I was talking about! I wrote the article a while ago after being frustrated using a bunch o
66.
▲
by
oisdk
7y ago
I really wasn't trying to compare Python to Haskell, rather I was trying to show a few example features in Haskell with the Python code as a reference for the "standard" way to do a binary tree type thing. Other than the (adm
67.
▲
by
oisdk
7y ago
If you write out the coordinates for a straight line from the origin they look like this: 3, 5; 6, 10; 9, 15... So now, instead of having to test 6, 10 and 9, 15 when we see it, we can just test 3, 5 once and we'll know the an
68.
▲
by
oisdk
7y ago
Oh, of course! Looking at it now that's pretty obvious, lol. Although I think even if I had spotted that I still would have put it into oeis to see if there was a quick membership test.
69.
▲
by
oisdk
7y ago
What's the simpler pattern?
70.
▲
by
oisdk
7y ago
Other than the ability to put a predicate in the pattern position (which you can do in several languages, including Haskell with ViewPatterns), I still don't see what Perl 6 adds here? Of course it's more difficult to model the pr
71.
▲
by
oisdk
8y ago
Author here! It's my fault the code and report are a little disorganized, but there is a related work section in the full report ( https://github.com/oisdk/agda-ring-solver-report/blob/master... ) which me
72.
▲
by
oisdk
8y ago
This is a bizarre article. The lede is buried a little: towards the end we get a lengthy defence of a guy called Gary Null. It starts with this section: > It was Dr. Gary Null’s investigation into this phenomenon that first alerted me th
73.
▲
by
oisdk
11y ago
Not really - like Norvig said, that's one interpretation, but there is another valid one. Say you had a bunch of families with two children each. The children are evenly distributed in terms of gender and the the days of the week on wh
74.
▲
by
oisdk
11y ago
In Swift: (0...100) .filter { $0 % 2 == 0 } .map { $0 * 2 } Will pass through the sequence multiple times, yes. But to avoid it it's as easy as: (0...100) .lazy .filter { $0 % 2 == 0 } .m
75.
▲
by
oisdk
11y ago
Really? For me, a chain of maps and filters is far easier to understand than nested for-loops or something. I think it's a lot to do with exposure: imperative code is far more well-known, and most people are more exposed to it than the
76.
▲
by
oisdk
11y ago
The blog link on the website fleshes out the thinking a little further: http://blog.haskellformac.com/blog/from-the-read-eval-print-... The author also had a blog post on it here: http://justtesting.org/
77.
▲
by
oisdk
11y ago
While you are allowed network-connected apps on the MAS, you have to specify the entitlement. I'd imagine that's something you'd have to justify (or at the very least you'd get more scrutiny and a longer approval time).