Better HN
topnewbestaskshowjobs
Log inSign up

ajss

42 karma · joined Dec 20, 2016 (9y ago) · 23 submissions

Submissions

comment 7y ago · link · parent

> The function `a -> Maybe a` is a different function than `a -> a`. Despite his intuition that the latter provides a stronger guarantee and shouldn't break code, callers may be expecting the Functor instance that the `Maybe` provides and therefore is a breaking change.

I don't really follow that. How can it be a breaking change? Can you give an example?

comment 7y ago · link · parent

I really dislike that.

The document is mutable and goes through a whole sequence of states that aren't what you want?

Constructing a body object with a document argument modifies the document?

comment 8y ago · link · parent

People were running a real money service that consumed JSON from another service and it didn't validate the incoming JSON? Wow.

comment 8y ago · link · parent

Along a similar line, I love Stuart Halloway's talk on Narcissistic Design - https://www.youtube.com/watch?v=LEZv-kQUSi4

Prefer APIs over data.

Start with DSLs.

Always connect (and never enqueue).

Create abstractions for information.

Use static typing across subsystem boundaries.

Put language semantics on the wire.

Write lots of unit tests.

Leverage context.

Update information in place.

comment 8y ago · link · parent

Specs are not scoped. There's a global registry. You may end up chasing other people's bugs.

comment 8y ago · link · parent

I think "late indexing" maybe referring to an implementation detail. The indexes aren't updated after each transaction. When you query the db, the result is a merge between the index and the transactions that haven't been indexed yet. The index is updated in batches.

comment 9y ago · link · parent

Look at the function doc string. Look at the function spec/fdef Look at the function comments.

OK, there aren't any. Pull requests accepted?

comment 9y ago · link · parent

(defn [o n] (.write o n)) will have to look up the .write method by doing reflection on o & n at runtime, which is really slow.

(defn [^WriteInterface o ^long n] (.write o n)) can be much faster because the compiler knows the type of o & n.

comment 9y ago · link · parent

Emacs for Swift, Objective C, C, C++, Clojure, Python, Java, Javascript, Assembler, Bash, and random other minor stuff.

Wait... there are other IDEs?

comment 9y ago · link · parent

Ayn Rand didn't use force to take anyone's money. That's what she hated. When those who took her money offered her a small portion back, her philosophy didn't require her to refuse it.

Like if she was in a forced labour concentration camp, her philosophy wouldn't require her to refuse to eat the food she was offered.

comment 9y ago · link · parent

Robbing producers of wealth that did not also happen to be the owners of politicians is directly contrary to Rand's moral system.

comment 9y ago · link · parent

Her reasons were given a long time before she ever received social security (1974). Rand's moral system did not require her to file lawsuits that had no chance of success.

comment 9y ago · link · parent

You don't think government taxes by force? What about all the people imprisoned for not paying their taxes?

She became a wealthy woman from her successful books, so she paid far more in than she ever took out. Her estate was valued at about a million dollars when she died in 1982. Her total receipts from social security $14,000.

comment 9y ago · link · parent

> My point is that there are other variables to take into account other than prices.

You said quality food was reserved only for rich people. People with a median income in western countries can comfortably afford to regularly eat locally grown, ethically-produced, non-intensive farm-shop food if that's what they're into. Bill Gates & Donald Trump aren't eating higher quality food than they are.

comment 9y ago · link · parent

Modern medicine, access to all the world's knowledge on a handheld device in your pocket, cheap clean/safe water and food from every corner of the world, entertainment (music/films/tv/youtube) cheap/safe transport over thousands of miles in a matter of hours.

There's not a chance in hell I'd want to swap places with a king of 1000 years ago.

comment 9y ago · link · parent

I'm quite happy to accept the reporting of both gross taxes and gross subsidies. My objection is to only comparing the gross subsidies.

comment 9y ago · link · parent

I subtract all their taxes. If Exxon pays $100bn/yr in various normal taxes, and the government pays them $1bn/yr in fossil fuel subsidies, that's a net subsidy of -$99bn/yr.

How can it be a fair representation of their situation to only say they receive $1bn/yr in subsidy?

comment 9y ago · link · parent

> If there is a tax that's applied specifically to gas companies that isn't directly paying for infrastructure they use, then that tax can be subtracted from the subsidies. But the gas tax doesn't fit that bill; if anything it undercharges.

The gas tax is only one of many taxes that these companies pay - you have to sum all their subsidies and subtract all their taxes. That's the point. If you're not doing that, comparisons with subsidies to other industries are going to meaningless.

comment 9y ago · link · parent

Even granting your argument, if the government takes $x as a service charge for infrastructure, and subsidises by $y, that would be a net subsidy of $y, not $y+$x.

But $x is not a service charge. It bares no relation to the amount of anything used. They can't opt out of the road part of the service charge and build their own roads. The tax is not hypothecated. Whatever the rhetoric of politicians, it doesn't bare any resemblance to a service charge.

comment 9y ago · link · parent

Whatever the intentions of the people imposing the tax, the effect is to disincentivize gas consumption. My point is, if the government taxes certain activities by $x and subsidises the same activity by $y, quoting only $y doesn't give the full story.

comment 9y ago · link · parent

Looking at the gross subsidy is misleading. Federal gas tax revenues alone are about $35bn/yr.