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

OpenAI has a whole history of trying to scoop other providers. This was a whole thing for Google launches, where OpenAI regularly launched something just before Google to grab the media attention.

Some recent examples:

GPT-4o vs. Google I/O (May 2024): OpenAI scheduled its "Spring Update" exactly 24 hours before Google’s biggest event of the year, Google I/O. They launched GPT-4o voice mode.

Sora vs. Gemini 1.5 Pro (Feb 2024): Just two hours after Google announced its breakthrough Gemini 1.5 Pro model, Sam Altman tweeted the reveal of Sora (text-to-video).

ChatGPT Enterprise vs. Google Cloud Next (Aug 2023): As Google began its major conference focused on selling AI to businesses, OpenAI announced ChatGPT Enterprise.


why call him that when "saltman" is right there

The Dr Seuss reference was more appealing to me at the time

I can't get over Scam Altman.

It's worth pointing out that the two examples that you're writing are actually strictly different, and not just "better syntax for the same thing". (This is assuming `String | Int` works as in Python, and the second example works as in Rust.)

To understand the difference, `String | String` is just `String`. It's a union, not a sum type. There's no tag or identifier, so you cannot distinguish whether it's the first or the second string.

If this sounds pedantic, this has pretty important ramifications, especially once generics get involved.


To provide a concrete example, this bit me in a typescript codebase:

    type Option<T> = T | undefined

    function f<T>(value: T): Option<T> { ... }

    let thing: string | undefined = undefined;
    let result = f(thing);
Now imagine the definition of Option is in some library or other file and you don't realize how it works. You are thinking of the Option as its own structure and expect f to return Option<string | undefined>. But Option<string | undefined> = string | undefined | undefined = string | undefined = Option<string>.

The mistake here is in how Option is defined, but it's a footgun you need to be aware of.


The mistake here is that you assume that Option is a struct. For TypeScript, this is an idiomatic definition of something that is optional though.

I guess I just want to be able to do something like this in Swift:

    let x: String | Int
    
    switch x {
        case let value as String:
            // handle String value here
        case let value as Int:
            // handle Int value here
    }
There's one more thing about TypeScript-style union types: string literals. I think it's great to be able to do

    type Options = "option_1" | "option_2" ... "option_n"
And subsequently I could use

    let t: Options
    switch t {
        case "option_1":
            // handle `"option_1"` case here
        ...
        case "option_n":
            // handle `"option_n"` case here
    }
I think this is more programmer friendly than requiring an out-of-line definition of a new `enum`. Sometimes you just want to write some code, you know?

Hijacking your comment because this is a common point that's made on the superiority of Swift syntax against the union syntax.

At least with |, you're attempting to model the state space. You're saying "this is one of these things." You might get the exhaustiveness wrong, but you're in the right ballpark. As it's normally done right now, the Swift developer with five optional properties is modeling state as "maybe this, maybe that, maybe both, who knows, good luck." which is just worse than a bar. If you need to discriminate explicitly, add a `__kind` field!


So long as you have structurally typed structs (as TypeScript does), you can do stuff like {foo: string} | {bar: string} to the same effect as type constructors if and when you actually need it.

At the same time, how often do you really need (Just (Just (Just ...)))?


Sounds like it might be an issue with your setup, considering that other people have no problems running it. Hard to tell what the problem is, but definitely a frustrating situation.

I love how the haters of Rust's syntax can be roughly divided into two groups:

(1) Why doesn't it look like C++?

(2) Why does it look so much like C++?


Strong +1, Void Stranger is amazing and has a spiraling depth that just keeps going and going.


Interestingly, Google already donated its own AgentToAgent (A2A) protocol to the Linux donation way earlier this year.


Wow i have never even heard of that one and i feel i have been following the topic quite closely


Pixel hardware is below average? Since when? That sounds like a flagship phone to me.


In raw cpu and gpu performance terms it is quite weak compared to other flagships.

You dont notice unless youre gaming or encoding video or doing other heavy workloads. The daily driver experience is very smooth.

The cameras and camera software is in the top 5 consistently though, the screens are also really good, so its a mixed bag hardware wise.


Meh good enough for everything unless you use your phone as a "gaming pc". But the extra open-ness and security is worth it for me.


No, just run a popular Roblox game on a recent Pixel or 3-4 year old Sony. The latter runs better:)

But yeah, it's my choice as well, because f** Sony software updates policy.


What exactly do you need that Zig doesn't have? Inheritance?


Proper interfaces would be nice. I realize that eg tagged unions work for most cases but the syntactic sugar would reduce a bit of friction.


What form of interfaces would you want? Something trait-based? Rust's orphan rule has bitten me many times now, and it causes consolidation around certain libraries. Something like Go's interface, where the signature just needs to match? That would be nicer than the current situation with `anytype`, but I don't know if it's better enough to justify a full interface system. Curious to hear your thoughts.


Essentially enough syntactic sugar so you could write eg the Allocator interface without manually specifying the vtable and the opaque pointer.

But yeah, Go’s system is nice and simple. I am not sure, but I think the fact that Zig programs are a single compilation unit might have some bearing on the orphan rule. There is no concept of crates so “traits”/interfaces can be defined and implemented anywhere.


That's a good point that it's all a single compilation unit which removes the orphan rule problem, but it still has the issue that there could be multiple different implementations of a trait, each from a different dependency.

Though, I am seeing your point on a simple interface system that would be enough to have something like the allocater interface, or the hash map interface.


Allocator can be implemented as one function pointer - recallocarray, see https://man.openbsd.org/calloc.3


Meh, you also see algorithms that have subtle bugs because the author assumed that for every integer x, -x has the same absolute value and opposite sign.

I view both of these as not great. If you strictly want to rely on wraparound behavior, ideally you specify exactly how you're planning to wrap around in the code.


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

Search: