Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thinkpad20
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
thinkpad20
6y ago
On the subject of foreign data wrappers, there's an extension for storing columnar data in Postgres which is implemented via this concept: https://github.com/citusdata/cstore_fdw I haven't used it myself but
2.
▲
by
thinkpad20
7y ago
I find that Haskell (both mine and that of others) involves a lot less pattern matching than ReasonML, since control flow is often expressed by type classes. Unfortunately, these are lacking in reasonml, and I think that might contribute to
3.
▲
by
thinkpad20
7y ago
My examples were deliberately dumb, but I’ve certainly use this ability to pattern match at arbitrary depth innumerable times. It most commonly appears when looking at a tuple of N values, and I want to enumerate specific pairings of values
4.
▲
by
thinkpad20
7y ago
I just noticed that it was converting all of the &’s I typed into & escapes. Didn’t realize how much further it went.
5.
▲
by
thinkpad20
7y ago
Pattern matching goes significantly beyond checking “foo.type”. It adds the ability to specify exactly (as exact as the language and your data allows) what case you’re dealing with. For example, a list of length three where the first and la
6.
▲
by
thinkpad20
7y ago
I think you have a very specific, and not widely shared, definition of “code as art.” Code as art does not mean code full of pointless Rube Goldberg mechanisms or following some esoteric golden ratio whatever. For me, “code as art” means co
7.
▲
by
thinkpad20
7y ago
> Error: ENOENT, no such file or directory '~/foorc' I can’t count how many times I’ve seen error messages that look like this, often with no context at all, in JavaScript apps, even widely used ones like npm and webpack.
8.
▲
by
thinkpad20
7y ago
Seems like there's plenty of CO2 to go around. What's the issue?
9.
▲
by
thinkpad20
7y ago
As a Chicago resident worried about the terrible air quality here, this gives me some hope that things can be improved if the political will can be mustered.
10.
▲
by
thinkpad20
7y ago
I think the problem is that no one was arguing that slavery per se makes a country rich. The argument was that it did in the case of the US.
11.
▲
by
thinkpad20
7y ago
First of all, I have heard and read from numerous sources that I trust that slavery played a huge role in the early American economy. But that on its own would be a simple factual dispute. The second issue is that regardless of the accuracy
12.
▲
by
thinkpad20
7y ago
Perhaps my choice of the term "direct" is overly specific, but I feel like this is a very nit-picky quibble. The underlying point I was trying to make doesn't change, which is that the United States benefited hugely (in purel
13.
▲
by
thinkpad20
7y ago
Not to be "that guy," but I think the real reason we'll never colonize Mars is simply that we're going to run out of time. Climate collapse and/or nuclear war will probably set in long before we have the technology
14.
▲
by
thinkpad20
7y ago
> If slavery makes a country rich, why isn't Africa rich? I never made the claim that any country can become rich simply by having slavery. The question of why the West is so much richer than e.g. Africa or Brazil is obviously vastl
15.
▲
by
thinkpad20
7y ago
America’s success was the direct result of ethnic cleansing of millions of Native Americans and the backbreaking labor of millions of slaves. The comparison is ridiculous. We were the exploiters.
16.
▲
by
thinkpad20
7y ago
This project is very interesting and I think it’s great that this is being studied, but we already have a technology for reducing greenhouse gasses in trees and other plants. They do not have expensive and pollution-causing manufacturing pr
17.
▲
by
thinkpad20
7y ago
I’m curious to what extent this is just innuendo and FUD, and how much there’s legitimate speculation (if there could be such a thing) as to Nadal and/or Federer doping. I’ve never heard even a whisper of doping suspicion with Roger, a
18.
▲
by
thinkpad20
7y ago
> Just as natural languages derive directly from our needs to do things with, and communicate about, things in, and state of in the real world, such as running away from lions, attracting mates, and (more recently) engaging in commerce,
19.
▲
by
thinkpad20
7y ago
> In Rust 1.36.0, the HashMap<K, V> implementation has been replaced with the one in the hashbrown crate which is based on the SwissTable design. While the interface is the same, the HashMap<K, V> implementation is now faster
20.
▲
by
thinkpad20
7y ago
It doesn’t eliminate them entirely; it’s just very smart about allowing packages to be built exactly once, and having a deterministic output such that it can be determined before a package is built whether a prebuilt version is available. T
21.
▲
by
thinkpad20
7y ago
Can you really do it in python with an arbitrary function? What if your function takes a dictionary, set, or some other unhashable type as an argument?
22.
▲
by
thinkpad20
7y ago
I wish Haskell had better syntax for records, but to be honest it’s very rare that it actually presents a real issue in practical code that I write. Sure, it can be a bit awkward to update nested records, but I struggle to think of more tha
23.
▲
by
thinkpad20
7y ago
Try using nix instead. Aside from being a fantastic package manager for many languages it’s a godsend for Haskell. The lengthy compilation times with Haskell are one of the not so wonderful parts of the language, but they largely disappear
24.
▲
by
thinkpad20
7y ago
“as much as I love China and can understand their politics due to the size of their country” The size of China is not the source of their politics; the source is a totalitarian state that ruthlessly suppresses any dissent and maintains cons
25.
▲
by
thinkpad20
7y ago
Conflicts which the military industrial complex has no interest in us ever getting out of, as recent events in Yemen demonstrate. Not to mention what's looming on the horizon in Venezuela or Iran. https://www.opensecrets.org
26.
▲
by
thinkpad20
7y ago
ReasonReact is a fantastic project that is written in OCaml (with Reason syntax). In addition to being a wonderful frontend framework, it's also a great introduction to the language.
27.
▲
by
thinkpad20
7y ago
A global counter is difficult because shared global mutable state should be difficult —- it can wreak havoc on your code. That said, if you’re really set on it it’s not particularly bad counter :: IORef Int counter = unsafePerform
28.
▲
by
thinkpad20
8y ago
Haskell is still a pretty awesome language tho, so using it on the frontend is pretty sweet. Nothing about the language is problematic here (with the possible exception of laziness which is one reason why I personally prefer purescript).
29.
▲
by
thinkpad20
8y ago
I normally wouldn't value those things as highly but I find that compiler speed and tooling makes a huge difference to me for front-end dev specifically, because I'm constantly doing the code->compile->use cycle, and a slow
30.
▲
by
thinkpad20
8y ago
Mainly I was more interested in ReasonML than OCaml (syntax- and tooling-wise), and the recommended toolchain there is bucklescript. I'm not really aware of the differences between bucklescript and js_of_ocaml, or how easy it would be
More ›