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

My last job was for a product which launched with a promise of a free tier forever, which they removed a year or two ago.

It is not.

Null is the thing which it isn't. A null value is evidence that your modelling does not fit the domain.


Unfortunately, the simple fact is that one can be handed a JSON document with non-existent keys, and one can be handed a database row with a null column. Often, the programmer may handed a schema from a third party they have no control over: opening a semantics debate is likely not a good course of action.

I guess since basic types, like an int or double, cannot be null, I understand why these cannot be null. This unfortunately limits their usefulness, but it's a carryover from the underlying properties of the basic type.


Value types will be optionally null. What java will introduce to the tooling is narrowing of nullness types. Hence Foo! <: Foo? <: Foo. This will assist in enabling safe domains or scope in code that are null-restricted with ease. Hence we can model around such a type system rule.

I agree that it is unfortunate.

Oh cool. It's newtype from Haskell 1.3 (1996).

https://www.haskell.org/definition/from12to13.html#newtype


No idea why dfa11's sibling comment got nuked. Looks correct to me.

I guess you can probably do the same with Unpacking.

https://wiki.haskell.org/Performance/Data_types


My last impression of Bangladesh was the fire accord stuff, i.e. build emergency exits and get garment factory owners to stop locking their workers inside since they keep going up in flames.

Maybe they've grown. Is Bangladesh at the stage where they outsource labour to other countries yet?


Bangladesh's Human Development Index (HDI) has shown a consistent upward trend, reaching 0.685 in the 2023/2024 report, ranking 130th out of 193 countries. It remains in the "Medium Human Development" category, marking a 72.5% increase in HDI value since 1990 due to significant improvements in life expectancy, education, and GNI per capita.

https://data.undp.org/countries-and-territories/BGD


What does that have to do with exploitation?

Wow, in 36 years of scientific and technological progress, life expectancy went up and so did raw economic output?

Again, what does that have to do with exploitation?


Sometimes you go back and reinvent the stack (breaking everyone's code) and other times you introduce things non-breakingly.

> why isn't a Haskell monoid defined as an extension of a semigroup

  class Semigroup a => Monoid a where 
  [https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Data-Monoid.html]
> If functors are as basic and fundamental as they seem, why do they get an awkward "fmap" - with most standard types re-exporting it as plain "map"?

map was in the original 1990 Haskell spec [https://www.altocumulus.org/haskell-report-1.0.pdf]. Functors & fmap came later. I guess they went with a non-breaking feature introduction.

Other times they do a breaking change. Monads didn't used to need to be Applicative Functors. Now they do. [https://wiki.haskell.org/Functor-Applicative-Monad_Proposal]

Anyway, it could be worse. You could be working in a language that can't even express the functor/map interface.


> class Semigroup a => Monoid

Yes, hence the "at least a few years ago". But perhaps I'm misremembering and confusing it with applicative functors, it has been a few years.

> I guess they went with a non-breaking feature introduction.

Sure, but functors aren't exactly novel, are they? Although it has contributed a lot to programming language design in general, Haskell didn't exactly invent the concept of a generic "map". So why wasn't it there in the first place, and why was it - despite its obvious prominence - not deemed important enough for a (what seems to be tiny) breaking change?

> Anyway, it could be worse. You could be working in a language that can't even express the functor/map interface.

Are those still around? I thought even Go eventually started supporting generics?


"Generics" doesn't cut it. Most languages just can't functor.

Go - no. https://www.reddit.com/r/golang/comments/v1ljep/monads_and_p...

Swift - no. https://forums.swift.org/t/higher-kinded-types-monads-functo...

Rust - no. https://www.reddit.com/r/rust/comments/152bgj0/current_state...

"Awkward fmap" and "random collection of category theory concepts thrown together in a weekend" is great compared to the alternatives.


> The false “hard problem of consciousness” assumes upfront that there exists a metaphysical gap between mind and body.

Or a gap between my mind and the minds of the other commuters on this bus.

There are 15 or so biological machines here, but only one of them is being experienced in bright sound and colour.


The polymorphism looks a little half-missing as well (checker.c):

  /* generalize: check if vars in t are free (not bound in env).
   For now, a simplified version that just returns the type as-is. */
  CkType *ck_generalize(CkTypeEnv *env, CkType *t) {
So the identity func (id x = x) stays a monotype?

Also, I'm not seeing any more or less safety in this code than the surrounding code:

  /* thread-safe version that returns allocated string */
  static char *type_to_str_alloc(CkType \*t) {
    char buf[512];
    type_to_buf(t, buf, sizeof buf);
    return xs_strdup(buf);
  }
Are multiple type-checking threads blasting through this at the same time?

The most interesting claim that this file makes is that it does HM-inference as well as subtyping. I'm smart enough to parrot "that's undecidable" even if I'm too dumb to know why.

HM is hard enough without taking the sizeof pointers and mallocing every few lines.


Meaningless comparison and category error.

I challenge you to put the information in this article to use.

Market cap is the number of shares multiplied by whatever (some small number of) those shares traded for lately.

GDP is actual economic activity. Money changing hands for goods and services.

A better (but still ultimately meaningless) comparison between the two would be economic activity.

Germany 2025 GDP: 5T USD

Nvidia 2025 revenue: 130B USD


> Meaningless comparison

The comparison isn’t meaningless. (The headline is nonsense.)

> comparison between the two would be economic activity

I almost hate comparing revenue to GDP more than market cap! Production measures finished goods. Revenue mixes intermediate and finished goods. So yes, you’re comparing two flows, but the complexity hidden therein is actually less intuitive to wrap one’s head around than a stock-versus-flow comparison, which we all understand with speed-versus-distance.


This is an ill-informed rant.

The key idea is that software dev sucks for you today, because Smalltalk wasn't good.


> I want an alternative to SQL

I don't think it's SQL itself - it's the DB vendors ship weak isolation so people aren't hit by deadlocks, isn't it?

> Make transactions atomic by default

Not the issue, right? It's the weak isolation.


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

Search: