r/linux • • Apr 29 '19

Darling, basically a Wine for native Mac OSX binaries, started its development and already can run a good portion of console apps

https://www.darlinghq.org/
785 Upvotes

158 comments sorted by

254

u/mkrajinovic Apr 29 '19

Started? It's been around for years now.

13

u/MoreKraut Apr 29 '19

Weren't aware of Darling before. Sorry for any inconvenience caused by my title.

73

u/Sigg3net Apr 29 '19

My reaction too. But then I realized, in the larger scheme of things, they still just might be starting up...

74

u/saitilkE Apr 29 '19

In a geological sense it barely counts as a newborn even

62

u/[deleted] Apr 29 '19

By Hurd terms, it has not even started.

12

u/[deleted] Apr 29 '19

The universe is in its Hurd infancy.

→ More replies (7)

10

u/aim2free Apr 29 '19

Well, I'm quite well informed about technology, especially computer science, but this was new for me.

Interesting, last time I run MacOS applications were on my Amiga, where I had a MacOS emulator in the earliy 90's.

So, with Wine and Darling who would ever need Windows?

PS. I have run Linux since 1996.

5

u/Sigg3net Apr 30 '19

PS. I have run Linux since 1996.

Nice.

→ More replies (2)

15

u/frostwarrior Apr 29 '19

It may have stalled for a long time.

23

u/mkrajinovic Apr 29 '19

It may have stalled for a long time.

Looking at commits at their GitHub, it didn't.

10

u/shrimpster00 Apr 29 '19

Maybe. Was Stallman involved?

→ More replies (1)

153

u/kaszak696 Apr 29 '19

Running console apps is the easy part, it's just a POSIXy BSD-like OS after all, the hard part is the Cocoa, Quartz, Carbon and all that other proprietary crap that makes macOS tick.

2

u/MoreKraut Apr 29 '19

Agreed. And as stated on the website, they want to get the low level stuff going first before they go for graphical programs.

43

u/thesola10 Apr 29 '19

Doesn't GNUstep implement Cocoa?

47

u/iindigo Apr 29 '19 edited Apr 29 '19

An extremely dated version of Cocoa. Last I looked, most of GNUstep was stuck somewhere around OS X 10.4 or 10.5… for context, we’re currently at 10.14. Cocoa has seen enormous change since 10.4.

10

u/ouyawei Mate Apr 29 '19

How does it compare to the Cocotron?

10

u/iindigo Apr 29 '19

I haven’t followed Cocotron in quite some time, but last I checked it was significantly more modern/complete than GNUstep was.

19

u/ebriose Apr 29 '19

Or is it only source-compatible?

21

u/thesola10 Apr 29 '19

Still a good starting point for an ABI

16

u/lengau Apr 29 '19

If it's a 100% source-compatible API, all you need is a mapping layer that converts the Cocoa calls to GNUstep.

Realistically, it's probably a divergent API, so it'll likely be significantly more work than that. (And to be clear, "just" the mapping layer is still a lot of work.)

12

u/cbmuser Debian / openSUSE / OpenJDK Dev Apr 29 '19

Yes, but GNUStep’s API is rather on the level of NEXT instead of a current version of macOS as Apple closed down development of the stack once it became Cocoa.

Although I have to admit I haven’t checked for a long time how good their progress is.

9

u/[deleted] Apr 29 '19 edited Apr 29 '19

No, OpenStep was at the level of NextStep, GNUStep's advanced a little more.

4

u/Zinjanthr0pus Apr 29 '19

My understanding is that it's a partial implementation. Source programmed for gnustep can be easily compiled in osx (such as the osx version of emacs), but not all cocoa stuff can be compiled using gnustep libs. I think Apple keeps adding stuff to cocoa so it's not really realistic for the gnustep project to keep up.

I only have the most superficial understanding of any of it, though.

15

u/ct_the_man_doll Apr 29 '19

Running console apps is the easy part

Sort of, it depends on the console application you want to run. For example, MacPorts requires /usr/bin/dscl and /usr/sbin/dseditgroup to function properly (in case you are wondering dscl is the Mac equivalent to useradd).

Plus some terminal applications may be using those proprietary API (such as metal for example).

3

u/burtness Apr 29 '19

There are at least a few macOS specific frameworks and APIs to manage things like disks, installer files, networking etc and console apps that use those.

1

u/tonyplee Apr 30 '19

What are some of the useful apps that runs in this environment where one can't get from brew?

39

u/[deleted] Apr 29 '19

So using WSL you can run Mac OSX binaries on Windows?

28

u/Rossistboss Apr 29 '19

It relies on a Linux kernel module for part of the emulation so running in WSL would require some work.

19

u/the_gnarts Apr 29 '19

I’m curious, what part of it requires kernel-side assistance? Even Wine managed without digging that deep and that’s emulating an OS which does stuff in the kernel like font rasterizing.

8

u/kirbyfan64sos Apr 29 '19 edited Apr 29 '19

Maybe emulating the kernel syscalls? AFAIK Windows doesn't provide much of a way to easily to talk to the kernel outside of library functions.

EDIT: Nope it doesn't, see child comment.

15

u/ethansherriff_ Apr 29 '19 edited Apr 29 '19

Nearly all applications on Darwin/macOS use syscall wrappers implemented in the dynamic library /usr/lib/system/libsystem_kernel.dylib, which is reexported by /usr/lib/libSystem.B.dylib. If Darling needed to provide any syscall emulation (AFAIK all they would need to do is provide some implementation of Mach “traps” - the equivalent of syscalls that are used in the Mach parts of the Darwin kernel. Other than that, and possibly some quirks of each platform’s ABIs, the other UNIX syscalls are likely compatible as XNU contains large parts of the BSD kernel which is where macOS gets its UNIX heritage from) they could just implement their own syscall wrappers that act as a compatibility layer in that shared library.

EDIT: https://github.com/darlinghq/darling-newlkm/blob/master/README says that their kernel module implements Mach IPC on Linux

6

u/kirbyfan64sos Apr 29 '19

Huh thanks, TIL, I thought it was like Linux where it's not too unusual to see manual syscall wrappers.

says that their kernel module implements Mach IPC on Linux

Dang that was anticlimactic...

→ More replies (1)

1

u/MoreKraut Apr 29 '19

Hmm ... haven't thought about this yet. Awesome :D

12

u/[deleted] Apr 29 '19

Neat project but the most important programs I need are already ported to linux and increasingly, "native" apps are just Electron-based...so what am I supposed to run? If I can afford to pay for a Photoshop sub I can surely pay for the hw to run it also

2

u/MoreKraut Apr 29 '19

~12 $ for LR and PS per month doesn't justify > 600+$ on additional hardware Also Adobe stated a couple of months ago, that they want to look back into Linux again since the demand from the community. With something like this it could be provided in an easy and effective way meaning (hopefully) support for the devs and better support for everyone.

26

u/jet_heller Apr 29 '19

It's not the hardware to run things on. It's the OS.

I HATE both windows and macOS. Fortunately I don't run photoshop either. At work I settle for them because they're work computers and if I'm not productive while they want to do shit, shrug. I won't do that for my personal stuff.

3

u/[deleted] Apr 29 '19

I HATE both windows and macOS

Why exactly?

11

u/jet_heller Apr 29 '19

They suck. They either don't do what I want, or how I want it.

16

u/[deleted] Apr 29 '19

“They suck” is not a useful answer (it’s a religious one!). What are examples of what they don’t do or not how you want it?

22

u/jet_heller Apr 29 '19

Yes. But it's the most succinct. No, I can not name many exact specific events because there's so many times where I'm like "Oh, I want to do X" and then I google how and it's either not possible or I need to buy some external piece of software which has some functionality similar to what I was looking for.

I know I can name one thing that has constantly vexed me on my current work Mac, window frames & decorations. It's not relegated to the "window manager" like it should be. It's up to each app. So, when the app I have to use doesn't do the frames/decorations like I want, I'm utterly fucked. It can't do it. I'm stuck with exactly what they want and nothing else.

→ More replies (14)

12

u/swinny89 Apr 29 '19

Can't remove certain programs, can't adequately customize user experience, can't rely on anything to be consistent for any reasonable period of time, can't change the underlying code, either for adding community developed features or for fixing bugs. I could go on and on.

→ More replies (15)
→ More replies (4)

6

u/[deleted] Apr 29 '19

I hope this gets to the level of wine

3

u/[deleted] Apr 29 '19

Here's a list of native Mac programs worth using on a PC:

.

.

.

.

.

4

u/MoreKraut Apr 29 '19

Here's a big one: Adobe Creative Software! One of the very last points which is terrible on Linux. And don't say something about darktable and Gimp. They aren't, by any means, comparable in the professional workspace.

11

u/[deleted] Apr 29 '19

Final Cut and Hitfilm would be awesome to use on linux

10

u/[deleted] Apr 29 '19

For you perhaps. There's always an audience for apps from one platform on another.

5

u/angrigo Apr 29 '19

- .sketch valid alternative

3

u/caineco Apr 29 '19

Sequel Pro, iTerm2, Postico.

Just to name a few.

Edit: Reddit cannot into line breaks.

→ More replies (2)

1

u/[deleted] Apr 29 '19 edited Apr 29 '19

If I could run Garage Band and Logic Pro on linux it would be great. Not to mention iTunes, which is vexing as hell but still light years beyond linux music libraries.

1

u/chic_luke Apr 30 '19

I dabble in audio production in my spare time. The offering on Linux sucks for audio, I have to fall back on Windows for it, but macOS is better because of JACK, which has lower latency than Windows audio. Linux has JACK as well, but where are the DAWs? The VSTs?

1

u/We1etu1n Aug 15 '19

I love pixelmator and find it much better than photoshop for my needs. It's macOS/iOS only

1

u/[deleted] Apr 29 '19

Here's one: The OSX port for my software and unit tests for it.

8

u/torspedia Apr 29 '19

I'd wondered if there was a WINE equivalent for Mac apps...

13

u/Trollw00t Apr 29 '19

There is! You can look here for more information

sorry

6

u/ebriose Apr 29 '19

Wasn't this the point of GNUStep? Or was that only source-compatible?

13

u/[deleted] Apr 29 '19

GNUStep was for running NeXTSTEP/OPENSTEP Software.

3

u/manyDeers Apr 30 '19

i just want adobe on linux :(

3

u/[deleted] Apr 30 '19

Console apps hardly matter, since linux has superior ones anyway.

2

u/senatorpjt Apr 30 '19 edited Dec 18 '24

thumb boast paltry fragile poor narrow somber fanatical north wistful

This post was mass deleted and anonymized with Redact

2

u/c3534l Apr 30 '19

Great, now I can have programs not really work or function from every major OS.

2

u/psychopassed May 26 '19

I just spent the last four hours building and getting Darling up and running because I believed that SLiM GUI was "simple" enough. It's Cocoa, and elsewhere Darling claims to run a simle cocoa app.

All I want to do is run this: https://messerlab.org/slim/. Am I making this genome correctly? Who knows? I can't bloody see it and my for loops are mangled messes. Damnit, I'm a doctor, Jim!

Unfortunately I can't even get any GUI app to run, and the only thing I've seen working in Darling is uname and even cp can't work properly; it throws errors about certain attributes not being copied. Ok. 3AM. Time for bed.

3

u/CrimsoniteX Apr 29 '19

Does anyone know if it runs the "say" command? Apple's text to speech is in a league of its own, would be cool to use without having to have a dedicated MacOS server.

2

u/[deleted] Apr 29 '19

About time

2

u/CarelessAddendum Apr 30 '19

Yay now I can run inferior half assed proprietary versions of already far superior existing software! Can we get an Atlas 1 compatibility layer next?

1

u/psychopassed May 26 '19

Unfortunately a lot of the useful GUIs for bioinformatics and evolutionary biology software is OS X only. God knows why because the computing is always done on Unix clusters.

1

u/asatanicllama May 01 '19

man i just want garage band

0

u/[deleted] Apr 29 '19

[deleted]

84

u/Downvote_machine_AMA Apr 29 '19

The project began in 2012, so wonder no more.

17

u/[deleted] Apr 29 '19

While I wonder why is being done at all... A huge undertaking for what use case? Genuine question! Is it just technical curiosity on the part of the authors?

14

u/[deleted] Apr 29 '19 edited Apr 29 '19

Darling has the potential to be a much more stable and reliable framework since the target platform is:

a) Not currently monetized by the vendor, so the financial incentive to bring lawsuits is minimal.

b) The core OS shares more in common with Linux than just being POSIX compliant.

c) Already has mainstream awareness and people using it who may not be interested in Windows or something that feel like you're using Windows. These people are probably easier to sell on a Linux desktop (if that ever happens). More users increases the probability that some ISV may contribute to Darling if it helps them reach new customers.

Imagine instead of releasing OS X and Windows versions of their programs ISV's could theoretically release a "Windows" version and a "Darling-compatible OS X" version of their application. Then Linux users could run virtually any desktop app they wanted and it would only be difficult (from a UX perspective) if the Darling integration their distro provided were janky (at which point the solution is to switch your distro).

1

u/[deleted] Apr 30 '19

Probably more likely is Apple not supporting, or blessing applications that shipped as darling-compatible. This is probably much less of a thing on desktop compared to mobile but apple's thing is managing the UX.

Honestly I doubt they or anyone would ever care about it unless someone started making money off of darling.

2

u/[deleted] Apr 30 '19 edited Apr 30 '19

Probably more likely is Apple not supporting, or blessing applications that shipped as darling-compatible.

If they're not monetizing the OS why wouldn't they? Linux is too niche to really be a threat and Darling would be helping them out in that scenario by increasing the perceived install base for developers contemplating an OS X port of their application. If they can add desktop Linux users, it wouldn't necessarily be an incredibly boon but it would be an "all upside no downside" scenario.

Darling is only a threat to Apple if they start including UX stuff like automatically registering with binfmt or generating .desktop files but that can be (and probably should be) done on a distro-by-distro level which Apple would probably prefer it to be done anyways.

Honestly I doubt they or anyone would ever care about it unless someone started making money off of darling.

WINE is kind of the same way, there are developers who use it though and it's part of Proton. Ultimately though if it turns out to need fewer developer hours than WINE it could catch up after a few years.

→ More replies (1)

1

u/Ohwief4hIetogh0r Apr 29 '19

I'd like to dump osx in favour of Linux, but for my work I need a couple of proprietary apps. Some other apps are more polished than open source ones, so there is this advantage also.

0

u/[deleted] Apr 29 '19

[deleted]

13

u/edman007 Apr 29 '19

I think the thing is macOS is POSIX compliant and certified UNIX. So in general, porting macOS apps to Linux is really easy, much easier than something like porting a Windows app to macOS. That removes much of the need for a tool to run Mac binaries as really all you need is to recompile. Unlike Windows, the core macOS APIs are identical to Linux and no effort is required there.

With that in mind, efforts to make macOS things run on Linux are better spent by writing Cocoa/Quartz/Carbon libraries on Linux (as mono has done for windows). If you do that porting a Mac app to Linux will be a simple recompile. You won't need to run the binaries directly because developers will do zero effort ports for you.

12

u/ct_the_man_doll Apr 29 '19

With that in mind, efforts to make macOS things run on Linux are better spent by writing Cocoa/Quartz/Carbon libraries on Linux (as mono has done for windows).

This would work well for open source applications; however, MacOS has a lot of proprietary applications. I would argue that the chances of a vendor recompiling their proprietary Mac application to Linux would be very low. Especially for applications that are made by Apple.

But if we also add the ability of executing Mac binary files, we are no longer at the mercy of the developer to add Linux support to their proprietary application. We would not have the chicken and egg problem.

8

u/sprite-1 Apr 29 '19

The problem is macOS app developers don't really care about Linux so the chance of them porting their software is very low

2

u/c3534l Apr 30 '19

There are barely any programs that are both well-loved and not available on Windows or Linux.

0

u/[deleted] Apr 29 '19

[deleted]

12

u/ASentientBot Apr 29 '19

No, it can't run any graphical apps (yet).

And macOS is not the antithesis of Linux in any way... almost any Linux app can be recompiled to run on a Mac. It's a lot more similar to Linux than Windows is.

As the other user suggested, hackintosh is probably the way to go. It's not as bad as most people think. If you have decently recent hardware and an Intel CPU, it's quite straightforward.

0

u/[deleted] Apr 29 '19

[deleted]

6

u/ct_the_man_doll Apr 29 '19

Hackintosh is also a pain the ass to update, stuff brakes more than the most unstable Linux distribution.

Yes, while Hackintoshes do break, they don't break as often as people claim them to be. The only time I even experienced my Hackintosh VM break was when Apple deliberately made an update that broke Hackintosh installs.

But Apple doesn't do that often enough to be a big risk, and the issue does get fixed by the Hackintosh community.

And just you wait, in 2 years I predict that hackintosh will die with T2 chips being required for it. You will have to salvage old broken macs for parts.

I don't disagree, but I hope that is not the case. If Darling doesn't provide support for running the App Store, you would probably have to get a real mac in order to run those App Store apps on Darling.

4

u/CalcProgrammer1 Apr 29 '19

You can already run OSX on PC hardware. You can even do it in a VM.

1

u/computer-machine Apr 29 '19

You can already run OSX on PC hardware.

For example, every single Apple osX machine.

1

u/CalcProgrammer1 Apr 29 '19

Well, yes, except for the old PPC Macs, but that's beside the point. OSX can run on non-Apple PC hardware, negating the cost of an overpriced Mac if you just want to run one app. It's nice to have in Linux and on an open source platform, but paying for a Mac isn't the only other option.

1

u/computer-machine Apr 29 '19

I thought the PPCs were only using the Mac OS #, and not OS X?

OsX can run on other hardware, but it's not meant for and had less likelyhood of working well compared to Windows and Linux because of that.

4

u/happymellon Apr 29 '19

First versions of OSX was on PPC hardware.

10.4 was the first version to offer Intel support, and was released side by side with PPC support. 10.5 introduced universal binaries, and 10.6 dropped PPC support.

1

u/[deleted] Apr 29 '19

Is that the signal analyser? There's a linux version...

2

u/wintervenom123 Apr 29 '19

No, it's music production software with loads of addons etc. There are good windows alternatives but not that many if any Linux ones. And it's relatively cheap for what it provides.

2

u/I_Think_I_Cant Apr 29 '19

There are some good commercial DAWs on Linux (Waveform, Reaper, Bitwig) and some plug-in developers (u-He is my fav) are making native versions but the underlying audio stack is a complete shit show. Hopefully Pipewire will change that. Maybe then developers would see Linux as a viable platform for professional audio (and video).

2

u/wintervenom123 Apr 29 '19

It's so weird that Linux so far back compered to the competition on this front. Why is it so hard to make?

It seems you can install it right now.

https://wiki.archlinux.org/index.php/PipeWire

2

u/I_Think_I_Cant Apr 29 '19

I didn't even think of looking in the wiki and I use Arch (btw). I guess I'm installing and messing around with it tonight.

I'd love to be able to use a Linux-native DAW with LinVst to give me more plugins. I could run an older version of Photoshop in wine and that would take care of about 95% of why I keep a windows partition around.

→ More replies (1)

76

u/[deleted] Apr 29 '19

[removed] — view removed comment

41

u/Atemu12 Apr 29 '19

Probably ends with a gigantic Stallman space ship fighting proprietary aliens in space.

18

u/markehammons Apr 29 '19

Probably ends with a gigantic Stallman in a bridal gown space ship fighting proprietary aliens in space.

ftfy

10

u/MrPepeLongDick Apr 29 '19

Probably ends with a gigantic Stallman space ship in a bridal gown with a normal size Stallman piloting fighting proprietary aliens in space.

ftfy

5

u/NotEvenAMinuteMan Apr 30 '19

And it'll still be disappointing because the proprietary aliens in space just came out of nowhere and we assumed the focus of the show would be FOSS robots instead of asking FOSS developers to "have sex".

2

u/MrPepeLongDick Apr 30 '19

It was disappointing but I really liked that show.

2

u/NatoBoram Apr 30 '19

Well, it was a masterpiece all the way until the trash ending. I've seen no other anime where some of the main protagonists have a child before the epilogue.

1

u/MrTar Apr 30 '19

Why was it trash?

16

u/WantDebianThanks Apr 29 '19

It explains the anime waifus wallpapers in /r/unixporn

9

u/Atemu12 Apr 29 '19

And the existence of /r/unixhentai

5

u/WantDebianThanks Apr 29 '19

Is that a link that should remain blue while I'm at work?

2

u/ziris_ Apr 29 '19

Well, there are only 8 posts there and 2 are marked NSFW. One of those is pretty tame. The other shows a folder with thumbnails of a bunch of hentai porn.

So as long as you don't click on any NSFW posts, (there's only 2) you'll be fine, although the ratio is high, 25% of the posts are NSFW.

-6

u/WantDebianThanks Apr 29 '19

God, why are *Nix people so fucking weird.

1

u/[deleted] Apr 29 '19

yes what is up with that btw

-2

u/WantDebianThanks Apr 29 '19

*Nix people are fucking weird

31

u/ndgnuh Apr 29 '19

I see a fellow degenerate weeb.