News for hackers. Stuff that matters.
Re:MacOS 10.12 Open Source Components by filereaper on Thursday November 24, 2016 @02:43AM (#13028891)
Heh, I went spelunking through the bsd/mach layers of the code, was quite a bit of fun.

Looks like they've only released the x86_64 and x86 versions of the code? I don't see any ARM in there.

Anyways, found gems like this [1]:

  /*
   *	File:	sched_prim.c
   *	Author:	Avadis Tevanian, Jr.
   *	Date:	1986
   *
   *	Scheduling primitives
   *
   */
I hope to leave a legacy like this someday, hopefully someone will appreciate the author's comments 30 years later!

[1] https://opensource.apple.com/source/xnu/xnu-3789.1.32/osfmk/...

Re:MacOS 10.12 Open Source Components by raimue on Thursday November 24, 2016 @05:08AM (#13029453)
They are never releasing the full source code. Apple strips the ARM architecture, blocks of code for features they do not want to be open source, and the internal documentation before throwing these dumps over the wall.

Here are some hints of what they are doing to process the original sources:

https://opensource.apple.com/source/hfs/hfs-366.1.1/make_ope...

Re:MacOS 10.12 Open Source Components by dorianm on Thursday November 24, 2016 @05:49AM (#13029623)
Thanks, quite interesting:

    # Check for remaining bad file names
    BADFILES=`find . \( -name "*.arm*" -o -name "arm*" \) | xargs echo`;
    ...
    # Check for remaining bad file contents
    if grep -iEr '([^UD_]_?_OPEN_SOURCE_|XNU_HIDE_SEED|XNU_HIDE_HARDWARE|CONFIG_EMBEDDED)' .; then
Re:MacOS 10.12 Open Source Components by dorianm on Thursday November 24, 2016 @09:24AM (#13030434)
BTW some of their open source code (like XNU, the kernel) is on GitHub: https://github.com/opensource-apple/xnu
Re:MacOS 10.12 Open Source Components by raimue on Thursday November 24, 2016 @09:57AM (#13030604)
> https://github.com/opensource-apple

> MIRROR ONLY, UNOFFICIALLY

Someone took it and uploaded it to GitHub. This was not published by Apple. Also has not been updated in years.

Re:MacOS 10.12 Open Source Components by dorianm on Thursday November 24, 2016 @10:02AM (#13030631)
It was updated two months ago in September 15th 2016: https://github.com/opensource-apple/xnu/pull/4
Re:MacOS 10.12 Open Source Components by raimue on Thursday November 24, 2016 @10:20AM (#13030726)
Okay, right. I was mislead as all commits use a different author (opensource-apple is only the committer), so the activity graph on the profile is mostly empty.
Re:MacOS 10.12 Open Source Components by minxomat on Thursday November 24, 2016 @03:17AM (#13028998)
For giggles, here are some comments I grepped from the WinNT kernel: https://gist.github.com/turbo/75f0905275c29a3049f983cfe273ea...
Re:MacOS 10.12 Open Source Components by hashin on Thursday November 24, 2016 @10:02AM (#13030628)
Oh man, this is hilarious!

../tdi/tcpip/tcp/tcpsend.c:// STUPID FUCKING COMPILER generates incorrect code for this.

../fastfat/allocsup.c:// God knows what state we left the disk allocation in.

../dd/histgram/cmd/perfhist/perfhist.c:// the heck? we are gods anyways!

../nthals/halntp/mips/xxinitnt.c:// to the HAL by the NT god. Hail Caesar!

../w32/ntgdi/client/dcquery.c:// if cjotma == 0, this is HONEST to God unicode font, can not convert

../w32/ntgdi/fondrv/tt/ttfd/fontfile.h:// honest to God msft unicode font

../w32/ntgdi/fondrv/tt/ttfd/tt.h:// uint16 reservedPad; // only God knows why

../se/ctlpcqos.c:// Appease the compiler Gods.

../cntfs/create.c:// Here is the "M A R K [REDACTED]" hack from hell.

../afd/disconn.c:// Hack-O-Rama. TDI has a fundamental flaw in that it is often impossible

../afd/disconn.c:// Yet another hack to keep it from crashing

../fastfat/read.c:// Deal with stupid people who open the volume DASD with

../afd/recvdg.c:// Bomb off if the user is trying to do something stupid, like

Re:MacOS 10.12 Open Source Components by Gruselbauer on Thursday November 24, 2016 @06:30AM (#13029778)
These are hilarious, thanks.

> to the HAL by the NT god. Hail Caesar!

Re:MacOS 10.12 Open Source Components by SSLy on Thursday November 24, 2016 @04:02AM (#13029165)
where did you get the source to grep through?
Re:MacOS 10.12 Open Source Components by minxomat on Thursday November 24, 2016 @04:06AM (#13029179)
Just look a few comments below.
Re:MacOS 10.12 Open Source Components by fidz on Thursday November 24, 2016 @06:43PM (#13033504)
The kernel was open sourced?
Re:MacOS 10.12 Open Source Components by Reason077 on Thursday November 24, 2016 @03:42AM (#13029094)

  /*
   *	Author:	Avadis Tevanian, Jr. */
   */
Avie Tevanian did go on to leave quite a legacy. He was Apple's software CTO up until 2006 and was responsible for much of the Mac OS X we know today!
Re:MacOS 10.12 Open Source Components by huxley on Thursday November 24, 2016 @07:49AM (#13030037)
Avie was one of the lead developers of Mach at Carnegie Mellon as well, so his legacy extends beyond macOS and NEXTSTEP.

But I'd argue that beyond code, probably his most important Apple role was establishing a steady release schedule. After the disasters of the Pink (later spun off as Taligent), Copland and Gershwin megaprojects, Avie managed to get Apple to focus on making small steady releases.

And while MacOS X was a megaproject, it too was released in steady steps: Rhapsody, Mac OS X Server 1.0, MacOS X Public Beta and then finally Mac OS X 10.0

Re:MacOS 10.12 Open Source Components by ed_blackburn on Thursday November 24, 2016 @03:59AM (#13029154)
Re:MacOS 10.12 Open Source Components by prashnts on Thursday November 24, 2016 @03:25AM (#13029028)
From the source with a false `CONFIG_SCHED_DEFERRED_AST` flag :)

/* We don't support deferred ASTs; everything is candycanes and sunshine. */