HNHacker News
TopNewBestAskShowJobs

hurril

555 karma · joined December 11, 2020

# Functional toy language https://github.com/pandemonium/lukas-rs
submissionscomments
hurril··on What I miss in Java, the perspective of a Kotlin developer
Yes, it is terrible and it's the main reason I'll never be doing any Java, ever again. I did 10 years up until Java 6 (or so) and then jumped ship in favour of Scala (at that point.) Now, Scala for sure isn't perfect and Java isn't terrible, but mainstream Java really is.

My point, though, is not to throw up all over Java but rather to quibble with the statement that Java has somehow evolved since then. It really hasn't!

hurril··on What I miss in Java, the perspective of a Kotlin developer
Spring isn't a web framework, it's gaffer tape for a language that just isn't good enough without it; that's why it's [spring] still around and its use is so prevalent. It's not at all mainly for very specific functionality in the sense that your post sort of implies [for web, and databasy things I presume]; in fact: it's just for wiring and for applying/ attaching things to "abstractions". As in: please decorate these sets of things with this behaviour.

If you'd chosen languages that permit abstractions in a real and usable sense, then you would not need this. In fact: with _one_ exception, I've never had a container in any Haskell, Scala or F# project ever. Do you think we ever needed one?

And this is my point: those other languages have seen _tons_ of development in the "abstraction arena" with (internal) DSL:s and super powerful frameworks for making powerful DSL:s. Java has had none of this because these concerns har all (poorly) handled at the container level.

The tacked on "functional stuff" is for sure cool coming from a Java backround, but they're pretty much useless.

hurril··on What I miss in Java, the perspective of a Kotlin developer
What I mean is that a Java program is almost always sitting in a Spring container with most important stuff happening as "decorated magic"; this has been the case since even before 1.6. To say that it is somehow better now than it was, is therefore not worth much. Sure, I'm sure you guys'll put a map or a stream in there somewhere but it's ... still the same thing. There's no real evolution at all.

The springification is what I mean by it being externalized and you generally don't see that in C, no. The pre-processor might be sort of the same thing but you generally don't bootstrap the entire thing using it.

hurril··on What I miss in Java, the perspective of a Kotlin developer
Yet, Java-codebases look the same now as they did then. The program structure is still "externalized" to a container because of a lack of abstractions. It's still exactly the same.
hurril··on Blockchain Is Dangerous Nonsense
Why don't you give your answer to these questions first? I'll wait.
hurril··on Netflix Should Sell Ads
Of course it is. Happens _all the time_ in business that the competition catches up and surpasses.
hurril··on Netflix Should Sell Ads
Because then they will get overtaken. The growth slowdown will turn into a growth stop and after that they will begin to shrink.
hurril··on Two Vexing Problems in Functional Programming
Making a huge array of values to in-place edit by copy is just... drinking water with the glass upside down. Why would you do that?

Either do a nice imperative for-loop as that is an excellent and imperative way of solving the problem (which I don't know what it is.)

Or solve it in any of the normal functional ways. Pick the style that you and your team likes.

hurril··on We don't need runtime type checks
I disagree completely. Having runtime checks or not if the code that's written is basically randomly stringed together expressions, are all unsound code.

This is runtime type-checks: if x == null: die "Nullpointer exception";

it is simply not better than: x.DoTheThing();

They are equivalent.

The solution to that is not a runtime check, it's actually using a typing system in the first place. Runtime type-checks is no different from:

let x = 42; if x != 42: die "It's supposed to be 42"; compute_the_thing x; if x != 42: die "It's supposed to be 42"; save x; if x != 42: die "It's supposed to be 42";

Only completely unsound code would rely on something like that.

I know that I'm not checking types in my pretend-o-code.

"In practice, if the car I ordered is a pizza, I want to know!"

I would say that this is misusing my analogy by flirting with simple value bugs. Ordering a thing and getting the wrong kind of product, that's perfectly understandable in the world of bugs and what not.

Calling the place_order function, expecting to get back an order object but instead getting the function "not" or a database connection, that's more akin to what we're talking about here. It's the wrong data type and having a runtime check to catch that is a sign of dealing with unsound code.

Just crash everything is what _you_ are suggesting because that failing runtime type-check _is_ a de facto runtime crash of whatever was running at that point.

Code that runs the risk of encountering such a problem should not compile because it's not even wrong.

hurril··on We don't need runtime type checks
This is a false premise or at least a false dichotomy.

Discovering that the car you ordered is a pizza is not something you just... abort and undo/ redo. It's: wtf did you do? My age is "pizza", your name is the function "not", your account balance is a database connection. It's ridiculous to say the least and using a tool that makes that > 0% probability is just awful.

There are so many different typing systems, conflating all of them into "static type checking" in order to have something to pit against "runtime checks" is just not serious.

hurril··on Spotify deletes 70 Joe Rogan episodes
You're conflating whether or not a private entity is free to do something with whether or not I agree with the soundness of that action. They are distinct.
hurril··on My Elm Experience
Yes - a sign of a competent management imho. We're already an F# and C# shop, however, so Fable wasn't such a big leap.
hurril··on My Elm Experience
We do this at work and _everybody_ is very happy with it. Works extremely well!
hurril··on Ask HN: How does my Instagram keep getting compromised?
Should be easy enough to post a list of stolen accounts someplace public.
hurril··on Python, OCaml, and Machine Learning (2020)
It's a wonderful language. Been working full time in it for two years now.
hurril··on One-Thousand Year-Old Plants
Right but I think a point could be made that would say that a claim that a clonal species has lived a long time, also claims that _everything_ alive now is basically the same individual. It's merely "cloned" itself from the very first cell 2 billion years ago.

Clearly that's not what we think.

hurril··on Binance banned from doing business in UK
So show me someone that either saves cash or BTC.
hurril··on Binance banned from doing business in UK
How could that be of my imagination when it's used and liked in the parent to my comment? Everyone is a fiat holder but holding (not crypto) does not constitute being a fiat holder.

But yes, I agree with you about where fiat is used. It's almost always used by people that don't quite undersand the concept of value or that of money for that matter.

Money is not declared valuable by political authority. That is just not how it works. Crypto is what's declared valuable by fiat, ironically. Its value is described as derived in terms of a limited supply (it's just like Gold!)

Fiat currency derives its value from network effects, debts and the feeling of safety (or the lack thereof.)

hurril··on Newspeak and Domain Modeling
This is not to remove all sources of bugs, it is a more succinct way to gain guarantees. Typing, as in making types modelling, your domain so that illegal states are impossible to represent implies a lot of tests won't have to be written. Why? Because whole classes of bugs are impossible.

But rest assured, the rest of the bugs are still around so you still need tests. Just not those.

I've worked like this for years now and there's just no turning back.

Do you know how many "null checks" and similar sanity checks are in my code? Close to zero. Do you know why? Do you think I'm a moron or because _those_ things are _actually_ impossible that way.

But rest assured, etc.

It simply cuts down on the amount of certainty that has to be incessantly (re)verified and tested.

Also: when you sit down to model your whole domain in this manner, do you know what you discover? All the things that would be anyway - just further down the line.

"Oh, we don't always have a contract number in these scenarios so _that_ case will have to have a constructor. Oh - that means that this purchase function has to stop "lying" about being able to process any invoice becauase some of them won't have a contract number. Shucks!"

How do you solve that? 4 000 lines of tests and 20 lines of assert hasContractNumber.

hurril··on Binance banned from doing business in UK
Holding stock in a company (for instance via en index fund) is not a fiat holding. The fact that it is commonly priced in terms of fiat currency is not any different that the fact that BTC is too.

Neither of them have to be. All exchanges take place in pairs; one holding is exchanged for another. Buying BTC with dollars is (USD, BTC); buying Microsoft is (MSFT, USD); buying EUR with dollars is (EUR, USD).

Nothing prevents you from pricing Microsoft stock in BTC or BTC in EUR or Etherium.

The holding as such, however, is only a fiat holding when it is in fact either a (wad of) cash equivalents and/ or a bank balance.

There isn't a person on earth for which there is only two types of relevant holdings, in either USD or BTC. A person that (seriously) considers acquiring a crypto holding, such as BTC, is most likely choosing between other crypto currencies, gold or silver, primarily. Even more likely, they're merely FOMO-speculating as a complement to plain stock holdings.

The fact that a number of you don't seem to understand this should call your competency into question.

hurril··on Binance banned from doing business in UK
Fiat holder is a ridiculous term in a false dichotomy. A holding of BTC is a security holding just as holding stocks (despite the fact that they are not legally referred to as such.) Nobody chooses between holding dollars or holding BTC. Nobody.

The fact that this parent has a number of children that don't seem to pick up on this is problematic to say the least.

hurril··on IRS records reveal how the wealthiest avoid income tax
Stakes in business like these can never be realised to nominal value so their present value is much lower than their nominal.
hurril··on Tesla Q1 2021 Results
Yes. A lot of the stock rockets do this now, so sure - that connects the stock to the company.
hurril··on Apple commits $430B in US investments over five years
Because you said this:

"Getting rich via investment depends on having income above a threshold which is set by the cost of living."

It's just not necessary to talk about getting rich. Getting rich is not relevant in this context. You made claims that are blatantly false that are part of the ever tiresome either rich or poor-dichotomy.

Most people can save money and invest that money in a way that makes them shareholders.

hurril··on Tesla Q1 2021 Results
No, a market crash would not touch Tesla as the stock and the company are two different things. The fact that a lot of people want to pay top dollar to own a share of the pie is not the Tesla operations churning out cars (or not.)
hurril··on Apple commits $430B in US investments over five years
You construct the same kind of false dichotomy that is so incredibly common among the but duh rich and duh poor blahblah do.

There are more categories than the ultra rich and the incredibly poor. Stop that.

A lot of people can save 10-20% in stocks (such as via index funds.) A lot of people would rather not do this and still complain and point sticks at "the rich."

What can you do?

"The reason is that being a shareholder only matters for those already making a ton."

Is simply wrong and nonsensical. I don't make a ton, I am not ultra rich, it matters a lot to me to be a shareholder. It matters because that way I get to make money when "they" do.

hurril··on Apple commits $430B in US investments over five years
Why aren't you a shareholder?

EDIT: sure - downvote me all you want. The question is still around.

hurril··on Java Is Underhyped
My point is that you do not simply update PATH and JAVA_HOME these days. That was Java 1.02 or somesuch roughly a hundred years ago.
hurril··on Where’s the evidence that grit predicts success?
And you have a point there. Certainly people have different concrete definitions (and wishes) for success. I'm not your average struggle porn/ you can also be successful-morons :)
hurril··on Where’s the evidence that grit predicts success?
I think you're being a little bit weasly here. They do have a shared definition of success and you are part of that, as am I. The definition does not have to be identical to be useful.
← PreviousPage 9 of 10Next →