Better HN
topnewbestaskshowjobs
Log inSign up

dtech

8,715 karma · joined Feb 25, 2014 (12y ago) · 2,256 submissions

Submissions

comment 4mo ago · link · parent

That's not what the person I replied to asked at all, arbitrary types weren't mentioned.

They literally asked why they couldn't write JsonObject.of(Map.of(...))

comment 4mo ago · link · parent

Java lacks the expressiveness to make it much better than this. There's a reason almost all the "replacement Java" languages add something to support DSLs, e.g. type safe builders in Kotlin [1]

The kotlin stdlib-adjacent json lib does it like this

   buildJsonObject {
     putJsonArray("providers") {
        add("SUN")
        add("SunRsaSign")
        add("SunEC")
     }
   }
[1] https://kotlinlang.org/docs/type-safe-builders.html

comment 4mo ago · link · parent

It's pretty normal, almost all libs work this way. This way you can parse the JSON string into the matching data structure or print it into a string, and when building you can ensure it's valid JSON.

comment 4mo ago · link · parent

~no one == approximately no one

comment 4mo ago · link · parent

Nah, there is little demand for it that's the reason.

LLMs don't need a LSP, they work better without it often. Most Java devs use IntelliJ or another IDE with its inbuilt thing. For everyone else the existing one is good enough for incidental usage.

So ~no one cares

comment 4mo ago · link · parent

They are minor in the west which is what I replied to

comment 4mo ago · link · parent

There are minor Android players who seem to be standing their ground, so something has to be different here. Nothing, Xiaomi/Redmi, Motorola

comment 4mo ago · link · parent

The "advantage" is that in contrast to heavy metals like lead lithium is a lot less toxic as far as we know. Not 0, but not in the same league.

comment 4mo ago · link · parent

There's a lot of nuance to that statement. Most languages, including e.g. Java or Typescript, would not be strongly typed according to your definition, because their type system is "unsound": there are known cases where the type system does not protect you and the types are wrong. We generally still call these languages strongly typed.

In Typescript this is by design. The most obvious is array variance. Typescript makes them covariant because that's what a lot of sane TS and JS code uses them as, but they should be invariant because you can write to them.

Example:

   const dogs: Dog[] = []
   // A sound type system would error here,
   // but there's too many useful cases where you want to do this
   const animals: Animal[] = dogs 
   animals.push(new Cat())
   animals[0].bark() // runtime TypeError here

comment 4mo ago · link · parent

It's non-trivial to implement XML parser in a secure way, many stdlib ones are insecure by default. That should just not be a thing. XML has a bunch of vulnerabilities very specific to it, XXE is the most well known one, but you also have a bunch of DoSes due to expansions and XPath injection etc.

An object serialization format should not have a bunch of footguns and vulnerability categories specific to it.

comment 4mo ago · link · parent

You pay either just with money (Youtube premium) or by watching ads...

comment 5mo ago · link · parent

Steam has DRM,so no. Easily cracked yes, but then you can just go the full pirate route.

comment 5mo ago · link · parent

That's not selling, that's renting

comment 5mo ago · link · parent

Microsoft just tried a generation too early. They could have gotten away with it this gen, and assuming 2028 will be start of next gen it looks like next gen it will go over without a fight.

comment 5mo ago · link · parent

I'm so happy most modern language stdlibs decided having a guaranteed order for maps and other collections is a good idea.

Although I can definitely respect Go's decision to always iterate over maps in a random order.

comment 6mo ago · link · parent

Their managed solution is pricey and especially the linear scaling with how much you use it is very meh. It's comparable with AWS lambda which also isn't cheap. However it's minor on a typical cloud bill.

Self-hosting is very easy in my experience, I've done it for 2 years but management wanted to move to Temporal Cloud. They have a helm chart which just works including upgrades. This does assume you have the whole k8s shebang set up and working in your company. I never had to touch is outside upgrades which took maybe 30m including validation.

comment 6mo ago · link · parent

Not retail ISPs, but many extensions and free VPNs route VPN traffic through the connections of those who use them.

comment 6mo ago · link · parent

In good faith I cannot see an argument here, it's either

Region X was first and reduced their emissions 10-20% so it's fine and it's region Y that's the problem, or

Region X is fine because they have less people, region Y should reduce even though they already have a fraction of per-capita emissions

Both seem like pretty shitty arguments

comment 7mo ago · link · parent

I wonder if a proportionally large amount of RLHF was done by Indians which causes this behavior.

comment 7mo ago · link · parent

Many nations/languages did not respect that rename until Turkey became an ally in the 20th century.

comment 7mo ago · link · parent

More than a decade ago

comment 7mo ago · link · parent

Or they didn't want to commit to the extra shows until demand was clear

comment 7mo ago · link · parent

This is fully on Apple themselves. USB consortium asked apple to use lightning for what became USB-C, but Apple didn't want to give up the ecosystem control.

comment 7mo ago · link · parent

That's just plain bullshit? I just checked my local second hand marketplace, and 2 year old flagship models seem to go for about 35-50% of the current equivalent newest model price.

comment 7mo ago · link · parent

I propose every Linux post should be tagged (1991) from now on

comment 7mo ago · link · parent

I don't but this. The first 2 generations of iPod didn't even have USB connectors, only FireWire, which was a PITA as most PCs had a USB connection by that time but FireWire wasn't common as opposed to Mac.

comment 7mo ago · link · parent

It was probably very localized, where my parent worked in the late 90s every office room had at least one, so my parents also bought one for home so they could easily transfer files.

It almost dissapeares overnight once 32MB+ usb drives became common, much more convenenient.

comment 7mo ago · link · parent

Article is vague and contradicts itself about what is covered. Likely AI slop

comment 7mo ago · link · parent

You can't draw conclusions on individuals, but at a species level bigger brain, especially compared to body size, strongly correlates with intelligence

comment 7mo ago · link · parent

I don't event think h265 is widely supported. On Windows you have to pay separately for it
12345
76