Hacker Newsnew | past | comments | ask | show | jobs | submit | rnentjes's commentslogin

Keats blamed Newton for taken the magic out of the rainbow with a prism. Personally I think the magic only got greater.


To be fair, the average person already doesn't know how to do simple arithmetic.


After reading all that (ok skimming), he does mention nullable types, but doesn't go into them at all. What's wrong with having the option of defining if something can be null or not? This is how I understand nullable types, don't known about monads. You only have to check if it's null if you have defined that it can be null.

To me this sounds like a solved problem, for example like how it's done in kotlin: https://kotlinlang.org/docs/null-safety.html#nullable-types-...


Right, he says:

> If you want to make pointers not have a nil state by default, this requires one of two possibilities: requiring the programmer to test every pointer on use, or assume pointers cannot be nil. The former is really annoying, and the latter requires something which I did not want to do (which you will most likely not agree with just because it doesn’t seem like a bad thing from the start): explicit initialization of every value everywhere.

In Kotlin (and Rust, Swift, ...) these are not the only options. You can check a pointer/reference once, and then use it as a non-nullable type afterwards. And if you don't want to do that, you can just add !!/!/unwrap: you are just forced to explicitly acknowledge that you might blow up the entire app.


Yeah. C# has this ages ago— maybe from the beginning- it’s solvable in a variety of ways at the type system level.

The remaining challenge is interfacing with unsafe code. Unsafe code should be required to check all pointers for null before allowing it back into the safe parts of the codebase.


C# 2 added "nullable value types". For example bool? is a type which can be true, or false, or null. Does my cat like dry food? True? False? Actually I do not have a cat so that's null. Historically no value types were nullable. In C# 1.0 the bool could only be true or false.

C# 8 added "nullable reference types". For example string? is a type which can be any string, including the empty string "", or it can be null. What's the name of my oldest report? "Steve" ? "Mary" ? No, I do not have anybody reporting to me, it's null. Historically all reference types were nullable, it wasn't optional. In C# 1.0 any string could be null, whereas in C# 8 you could explicitly say that some strings mustn't be null.

However almost all C# software runs on the CLR, and the CLR doesn't believe in these rules, so where your C# is called by other software, possibly not even written in C# you do need to know that all your function boundaries don't actually enforce null checks. This matters most if you write libraries used by third parties in other programming languages, and least for in-house or personal stuff where it clearly goes in the "Don't do that" pile.

Perhaps think of a C# 8.0+ string parameter as a stern "Do not use null strings" sign rather than a firm language commitment like Rust's &str or a C++ &std::string. That new intern will obey it, that nerd who writes machine code for fun will at least know it's their fault if they don't obey it, but the customer on another continent who has apparently never read any of your documentation can't be relied upon to uphold this constraint.

[Edited: fixed numerous typos, there are doubtless more]


I am using this mouse because of that, and it works for me:

https://www.contourdesign.com/collection/contour-slidermouse


Seem to me that whether or not people will be asked to "come out of retirement" will completely depend on how good the LLM's will be in 20 years.

This seems to happen a lot in the discussions around LLM's. Some people discuss it like LLM's will not get any better, others discuss it as if LLM's will continue to get better forever. But only time will tell.


I'm not sure you need much time to tell. They seem to get better every few months.


Diplomacy has been tried multiple times before, even with security guarantees from the usa. Still Putin invaded. There can not be lasting peace without actual guarantees (for which use is not even a trustworthy party anymore). Because Putin will rebuild and invade again as he did after the last time.

This is what Zelensky tried to explain to Vance before the discussion blew up.


The PAL (Platform Abstraction Layer I assume) is just the stdlib that is provided. The stdlib is not the same for all platforms, as can be seen in the documentation. A regex implementation is provided for all platforms, but is not quite the same on all platforms: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.text/-r...

In shared code you can define interfaces that have to be implemented by any platform you use.


I'll add my julia attempt that animates and works with webgl:

http://julia.perses.games/


This might be an example of what you are looking for:

https://medium.com/@noclador/putins-plan-4652895de8ba


> https://news.ycombinator.com/item?id=30597537

yeah, this is pretty good - pretty darn good.

i'll have to look at it more later when i can spend some time.

> Russia will invade Ukraine. It is foolish to hope otherwise. Russia has moved every halfway combat-ready unit to the border with Ukraine. This is the largest accumulation of forces since the Warsaw Pact invaded of Czechoslovakia in 1968. In all of its history NATO has never pulled as many troops together as Russia does right now.

this is what i'm talking about.

good job on this analyst person -- wonder if anyone (besides you) reads him.


I also predicted it based on similar data. (I'm a nobody, so I can't claim to have predicted it "publicly". I don't think I even did so in an HN post. Also, I don't gather data or have sources - I just read stuff.)

I saw all the buildup during the Olympics, and I said that it was going to happen once the Olympics were over. I was two days early - I predicted Tuesday, it happened on Thursday.

I wasn't "three months" ahead of time - more like a week.


ps my initial link in this comment was just a typo mistake

...eh read some more of his stuff. Its all wrong and or cheerleading etc.


Alternative way to count the vowels in Kotlin:

    val numVowels = countVowels(getDTO()?.string ?: "")


Or alternatively, closer to the original, doing both null checks the same way the original does the first one:

  val numVowels = getDTO()?.string?.let(::countVowels) ?: 0


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: