HNHacker News
TopNewBestAskShowJobs

kotlin2

231 karma · joined October 12, 2022

submissionscomments
kotlin2··on A number that can't be calculated
You have an assumption that each number needs a unique program to compute the digits. You'd need to prove that statement first.
kotlin2··on From zero to 10M lines of Kotlin
> I find coroutines a really strange and leaky abstraction.

I've only used Kotlin on Android, but from what I remember co-routines are not necessary to use. If you don't like them, then don't use them.

Kotlin has a number of advantages over Java. The biggest of which is built-in optional typing. It's also really nice that everything is expression instead of a statement. Library functions like `let` also make code a little nicer to write. And stuff like data classes and better property initialization are icing on the cake. In my opinion, you can write Kotlin exactly as you would Java, but the development experience is much more polished.

kotlin2··on Much US “recycling” goes straight to the landfill
That’s a solvable problem though. Regulations could be changed to require more buffer areas for the landfill.

Also, another thing to think about it is that your parents likely picked the best place available for their means. Not many people choose to live next to landfills if they can afford something better. Had the landfill not existed, your parents would have likely needed to live next to some other type of hazard. It’s unfortunate, but a reality of our economic system.

kotlin2··on Why I Two-Space (2012)
You’d need to look at the source to notice the double spaces… because HTML collapses white space
kotlin2··on Linux: What Can You Epoll?
The write call returns how many bytes were accepted: https://man7.org/linux/man-pages/man2/write.2.html

> The number of bytes written may be less than count if, for example, there is insufficient space on the underlying physical medium, or the RLIMIT_FSIZE resource limit is encountered (see setrlimit(2)), or the call was interrupted by a signal handler after having written less than count bytes. (See also pipe(7).)

kotlin2··on Why do Americans love ice water so much?
The gulf stream makes Europe much warmer than the latitude would suggest.
kotlin2··on Amsterdam looks incredibly realistic in the new Call of Duty
One adage I like: "pessimists sound smart, optimists make money."
kotlin2··on The availability of text generators will force positive changes to education
This article contains a logical error that I see quite frequently, which is the belief that something being anti-X is somehow pro better alternative Y. In this article, the author believes that writing that stimulates critical thinking and analysis would do a better job at preparing students than the current five paragraph essays that students typically write. They argue that the prevalence of text generators will force change in education from the current system to something better.

The argument makes no sense when considered analytically. There is nothing special about the factual five paragraph essay that lends itself well to text generators. Rather, the fundamental issue is that humans have discovered ways of training ML algorithms that can perform almost any task that a human can do. There's nothing stopping the creation of text generators trained to write any conceivable school assignment.

Cheating is only going to get easier and more sophisticated over time. This presents a serious issue that may require rethinking how students are evaluated in general.

kotlin2··on San Francisco is spending $1.7M on one public toilet
I'm in the process of building a new kitchen in the NYC area and I can't really find a way to make it cost more than $150,000. And that's including demo work to expand the size, new floors and windows, and entirely new appliances, countertops, and cabinetry.
kotlin2··on Nearly Half of San Franciscans Have Been Victims of Theft, New Poll Says
Changing DAs is not like deploying a software service. It takes time for changes to propagate.
kotlin2··on Nearly Half of San Franciscans Have Been Victims of Theft, New Poll Says
Definitely can blame DAs for not brining charges. The rule of law is literally the only deterrence to anti-social behavior.
kotlin2··on Yen slips past ¥150 against the dollar to lowest level since 1990
That’s not really accurate. There only part that’s accurate is the US “sucking up all the dollars”, but it’s not due to a credit crisis. The U.S. is the most aggressive in terms of raising its baseline interest rate. The interest rate is higher in the US than anywhere else, relative to the safety of its government bonds. Therefore, people with money want dollars so they can buy treasuries and earn a higher yield.
kotlin2··on Open core companies are not incentivized to make their projects good
Are you then incentivized to work on managerial features rather than core product features? The disincentive comes from the fact that profits aren’t tied to the quality of the product.
kotlin2··on Drone footage reveals The Line megacity under construction in Saudi Arabia
Or you of train lines have opposite ends being disconnected. Why is that a problem?
kotlin2··on Why modifying gravity doesn’t add up
Light, in the GP’s example is also traceable back to a source. Observing an effect in a 3rd party isn’t directly attributable to anything without a plausible mechanism of action. Using light to detect stars as defense of dark matter isn’t a very strong argument.
kotlin2··on Open source is democratizing video game development
A lot of that is polish to make the game feel great. You should play Matty’s game Jumper. The game was made with Game Maker back in the early 2000s, which was targeted to low-code users back then. The game mechanics are very similar to Celeste. Despite the lack of polish, it’s still a very entertaining game.
kotlin2··on Open source is democratizing video game development
One thing that’s beautiful about game development is how you can create a fun game from the simplest principal. How complex is the gameplay in a game like a Celeste? Yes, there’s a lot of stylistic polish, but it uses pixel art and doesn’t require pathfinding, save for a few minor sections. And even a game like Celeste is many tiers above what can be enjoyable.
kotlin2··on California’s greenhouse gas reductions could be wiped out by 2020 wildfires
Not related to emissions policy, however.
kotlin2··on It’s time to repeal the Jones Act
> Again, the multiplier effect is only applicable when dealing with an external input to a system. Otherwise, you are arguing that simply raising prices creates economic growth which is clearly not true.

No, that's not what I'm arguing. I'm arguing that the multiplier of a single dollar is based on the percentage of that dollar that stays in the local economy.

> Even given the above, I have no idea why you would assume this to be true. If someone in a foreign country is paid in US Dollars, the most likely thing to do with it is buy US goods or assets. (In the case of China, that is most likely US securities, but it's still not lost to the US economy).

Yes, that's why I mentioned that my argument is predicated on there being a trade deficit. The U.S. runs a massive trade deficit, so clearly not all the dollars end up back in the U.S. economy. Buying treasuries isn't really relevant because each dollar the government takes in in exchange for a treasury needs to be paid back out.

kotlin2··on Pipe Viewer
Having maintained an open source library, it’s actually really helpful to see features people want. Not everyone needs to contribute directly to the code base. User feedback is valuable, too.
kotlin2··on It’s time to repeal the Jones Act
TrickardRixx's reply is kind of perfect in that regard.
kotlin2··on It’s time to repeal the Jones Act
Yes, I linked to the wrong Wikipedia page. Thanks. But no, it's not an instance of the broken window fallacy.

Let's say the store owner buys the bread directly from China, and by doing so can offer bread at 20% less than before.

So, I pay $0.80 for bread. The store owner saves 20%, which is $0.16. And let's say pay $0.40 for the bread from the Chinese supplier, leaving the baker with $0.24 to spend. I also have an additional $0.20 to spend. If I spend it, the merchant I spent it with saves 20% and spends the other $0.16, then the total GDP contribution is 0.80 + 0.20 + 0.24 + 0.16 = 1.4. I spent $1, but only only received a multiplier of 1.4 instead of 1.8 in the original case. This should be pretty obvious because any money sent overseas stops being multiplied, even if you end up spending the same amount of money total. This, of course, assumes there is a trade deficit with the overseas country.

kotlin2··on Ask HN: Why don't I see gold at the end of the remote working rainbow?
A call center is not really a collaborative job at all, so it's unsurprising that there would be some gain from WFH. I don't think you can generalize what works in a call center to what works for knowledge workers, though.
kotlin2··on It’s time to repeal the Jones Act
U.S. built things costing 6-8 times as much as Chinese built things is not specific to shipbuilding.
kotlin2··on It’s time to repeal the Jones Act
> Neo-liberalism that literally pulled half of the planet out of permanent poverty?

My original quote said "better outcomes for the country." Yes, a lot of people were pulled out of poverty, but their gains came and the expense of middle-class Americans.

Maybe you're a globalist and you think this is a good outcome. I just hope you never have a nation state-level problem, e.g. unfair competition in the market place. The help you receive from the Chinese government, despite all of their gains, is likely to be quite minimal if you're not a Chinese citizen.

kotlin2··on Negative reviews can boost sales even more than positive ones
There is a third-class of one-star reviews. Opposing businesses posing as disgruntled customers.
kotlin2··on It’s time to repeal the Jones Act
I'm not arguing trickle-down economics. The concept I'm talking about is called the "money multiplier" [0].

Think about it like this: You go to the store and buy some bread for $1. GDP has increased by $1. Now the store owner saves 20% of the store's income and spends the other 80%. So after your purchase, the store owner goes to the bakery supply store and buys $0.80 of flour. Now GDP has increased by $1.80 from your initial $1 purchase. Trickle-down economics is more about how income is distributed in a society.

[0]: https://en.wikipedia.org/wiki/Money_multiplier

kotlin2··on It’s time to repeal the Jones Act
It's basically been disproven at this point that simply lowering cost does not necessarily lead to better outcomes for the country. This was basically neo-liberal orthodoxy until the mid 2010s, by which point it was clear that lowering costs by offshoring labor had hollowed out the middle class in America. Money has a multiplyer effect. Each dollar spent is received by someone who then goes on to spend a part of that dollar and so on. So if you take dollars and send them elsewhere, that multiplyer effect is dampened. Things may be cheaper, but the economy is worse overall.

Also, as the article itself states:

> [The Jones act] aims to promote and maintain the American merchant marine fleet for commercial and defense purposes.

The act has nothing to do with making things cheaper. Any earnest proposal to repeal the Jones act should address how the goals of the act can be met in other ways.

kotlin2··on Ask HN: Why don't I see gold at the end of the remote working rainbow?
I've removed that link to the BLS data as I agree it is erroneous to try to correlate that data to any broad trends in WFH / WFO. However, the Apollo Technical link is filled with misleading summaries and questionable sources.
kotlin2··on 75% of the time we spend with our kids in our lifetime will be spent by age 12
I don't think so. "an end" means a goal. "People are an end", to me, means that the creation of people is the goal. This is a common belief in religions like Catholicism that are against contraception.
← PreviousPage 2 of 4Next →