chris-martin
chris-martin on Hacker News
Posted by
chris-martin on Saturday May 27, 2023 @01:33PM
from the typeclasses.substack.com dept.
Posted by
chris-martin on Wednesday May 10, 2023 @06:44PM
from the typeclasses.substack.com dept.
Posted by
chris-martin on Monday May 08, 2023 @01:50PM
from the typeclasses.substack.com dept.
Was kind of surprised to find that this company had no Wikipedia article. Just started one:
https://en.wikipedia.org/wiki/AxactHow in the world do you fit a scam this big so far under the radar?
For a lot of web development work, three is the perfect number. Terminal, IDE, browser.
Hey, I just wanted to share this library I put together, because Chain looks really promising as a way to quickly put together a Bitcoin app. I'm particularly excited about it because I'm currently using Coinbase for payment notifications, and it's been a huge pain.
A little more description of the motivation:
http://blog.cardforcoin.com/post/96111319840/shifting-from-c...
Posted by
chris-martin on Friday August 29, 2014 @05:02PM
from the show-hn dept.
A short list:
- Trying to making small payments is terrible; the only way to tell whether a transaction requires fees is to try it, see it fail, and parse the error message to figure out the fee amount.
- The "order" abstraction is bad because it assumes customers will always pay the exact order amount, which is false because users make mistakes (especially since the order page instructs the customer to add miner's fees, and if they do, the amount will be wrong and the order gets reported to us as "mispaid"). I had to put a lot of time into writing our own documentation about how order statuses work, particularly mispaid orders - from trial-and-error that unfortunately had to include some bad customer experiences. Perhaps the worst problem is that when a customer makes multiple payments on an order, they show up in the web interface, but not in the API.
- When you request an email address on the payment page, Coinbase doesn't check that it's a valid address.
- choose_price on orders doesn't work.
- The API just needs more consistency. There are entities with statuses named "complete", "completed", and "Complete". There are things called "hash" and "hsh". The order API gives a number of confirmations for a transaction, but the transaction API doesn't.
> The hi-tech road is supposed to be installed once for several decades, where paved roads are re-paved every few years.
We're comparing the cost of solar panels to the cost of pouring some shit onto the ground... I'd assume that difference is far more than tenfold?
Yes! (Both.)
You'll end up spending an amount of BTC that is equivalent to 90% of the cost of your coffee. So, an example: If you choose the $10 option, and $10 is worth 10mBTC (exchange rate made up to simplify the math), then you'd pay 9mBTC and have $10 available to spend at Starbucks. If you then spend $5 of that at Starbucks, you'll end up receiving a refund of 4.5mBTC (the equivalent of the remaining $5).
Someone in Vietnam released software to the world, therefore this is a story about American culture. That's just how Americans think. It's also necessarily about modern American culture, even if you know absolutely nothing about the past.
This headline is sickening. Comal County criminal prosecutors ruined this man's life.
PS1="$(hr -) $PS1"
Beautiful.
Now I need a way to make this happen in SBT too.
How about a photosynthetic process that makes graphite from atmospheric carbon dioxide?
"write a program that copies standard input to standard output":
org.apache.commons.io.IOUtils.copyLarge(System.in, System.out);
I despise the Java language as much as the next dev, and the core library is drastically underfeatured - But if you can't manage to copy one stream to another because you don't use libraries, you have no one to blame but yourself.
The Wikimedia Foundation isn't a government agency, if that's what you're asking.
> Simply snail-mail a 128 bit one-time key pad to every voter.
Cool. Who do you think would pay me the most for my pad?
So... we've determined that you violated the law, but we're choosing not to enforce the law.
This what the kids call a bad code smell, right?
The code that the functional programmer produces is a more direct expression of the programmer's thoughts. The author thinks "I want to map this list using this transformation" (although perhaps not in those exact words). The author is never thinking "I want to create a new list, then for each index between zero inclusive and the list size exclusive, apply this transformation, append the result to the list I created, and then jump back to the call site providing that list as a return value." The imperative programmer is first thinking functionally and then translating that thought into procedures instead of directly writing expressions that match the thought (and like you said, it's just because they haven't learned the word "map" yet). Isn't that pretty much the definition of "unintuitive"? First thinking one thing, and then requiring conscious effort to think another thing instead?
I don't think recursion itself is difficult for most people to learn. The hard part is translating recursive functions into procedures. The imperative coding is what makes it confusing.
> Personally, I think imperative code is more intuitive. It matches how people think of operational behaviors.
The masses agree with you, apparently. That's why they sit in their cubes all day writing the same god damn re-implementation of map over and over again
List<String> result = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
result.add(input.get(i).toString());
}
instead of
input.map(_.toString)
because functional programming is confusing.
What is complex about Scala's pattern matching? x matches the value x, x:A matches instances of A, A(x) matches if A.unapply(x) evaluates to a Some, and _ matches anything. Erasure throws a wrench into it, but otherwise it's pretty straightforward.