News for hackers. Stuff that matters.
Re:Tales of the M1 GPU by rjzzleep on Tuesday November 29, 2022 @09:15PM (#33796106)
Of course it's possible in either. By the way, Mac drivers are in fact written in a subset of C++. At least they used to be, maybe that has changed.
Re:Tales of the M1 GPU by astrange on Tuesday November 29, 2022 @10:18PM (#33796604)
They are written in a strange subset of C++ with its own inheritance system and currency classes.

In NeXTStep they were written in ObjC, and probably should've stayed that way.

Re:Tales of the M1 GPU by Razengan on Wednesday November 30, 2022 @01:26AM (#33797624)
> They are written in a strange subset of C++ with its own inheritance system and currency classes.

Can someone explain? Is there something other than DriverKit, which seems to be C++?

https://developer.apple.com/documentation/driverkit

Re:Tales of the M1 GPU by dagmx on Wednesday November 30, 2022 @01:51AM (#33797739)
I suspect they’re either conflating things with ObjectiveC or FireBloom (https://saaramar.github.io/iBoot_firebloom/)

Both would sort of fit those descriptions I guess if one were to squint.

Re:Tales of the M1 GPU by astrange on Wednesday November 30, 2022 @03:57AM (#33798432)
Re:Tales of the M1 GPU by dagmx on Wednesday November 30, 2022 @04:17AM (#33798552)
Oh interesting. Thanks for the link
Re:Tales of the M1 GPU by pjmlp on Wednesday November 30, 2022 @03:10AM (#33798203)
You have to go back to IO Kit, Driver Kit is the new one in userspace.

https://developer.apple.com/documentation/iokit

Which is how the Objective-C framework for NeXTSTEP drivers used to be called,

http://www.nextcomputers.org/NeXTfiles/Docs/NeXTStep/3.3/nd/...

Re:Tales of the M1 GPU by pjmlp on Wednesday November 30, 2022 @03:14AM (#33798231)
Just like UNIX kernel code is a strange subset of C.

I always find strange how "kernel C" is C, even though ISO C would bork in kernel space, but doing a similar C++ subset is pointed out as not being C++.

Re:Tales of the M1 GPU by astrange on Wednesday November 30, 2022 @03:59AM (#33798446)
I'd also call kernel C strange. Mostly justified, but there's no particular reason the memory allocation call with the same behavior as malloc() in IOKit isn't named malloc().