Live data from Hacker News

Darling – macOS Translation Layer for Linux

darlinghq.org

151–160 of 176 posts

Re: Darling – macOS Translation Layer for Linux

#151

Earlier quoted context omitted.

> You don't. Darling is not a suitable replacement for testing on a real Mac in exactly the same way WINE is not a suitable replacement for testing Windows software. Disagree. Darling is not quite there (yet), but wine could reasonably be used to test dev builds, so long as a native windows version was trialed before release.

I tried this with a c++ class surely I can just recompile the final project somewhere towards the end of the class and everything will totally work! It didn't go well.

You don't need to recompile, you can just give them the windows binary you compiled with wine. (Assuming it works.)

Re: Darling – macOS Translation Layer for Linux

#152

Something like this is sorely needed by the open-source, not-for-profit, shoestring-resources, cross-platform development community... For example, let's say that I'm writing some cross-platform open source software. And let's say that I am developing this software on a Windows or Linux Box. Now, let's say that for whatever reason, I don't have and can't afford a Mac (a scenario like this is more common than you woul…

>OK, so now how do I compile/run/test the Mac version of my software -- without having that Mac?

Splurge on a $1/hour or $20/month account with

https://www.macincloud.com/

?

Re: Darling – macOS Translation Layer for Linux

#153

Earlier quoted context omitted.

While Windows's backwards compatibility is sadly getting worse, it's also still pretty incredible. I can run lots of obscure Windows programs that 2+ decades old! Mac backwards compatibility isn't as bad as some people say—I have a decade-old program that still works in Mojave, for instance—but Windows is a lot better. The platform with awful backwards compatibility is iOS. And there, you don't even have the option t…

Honestly, the only time ios has broken backwards compatibility is with 32->64 bit. And—not to minimize that, that is quite major, but that's pretty much the only time it's happened.

Have you ever actually tried to run early iOS apps on iOS 10?

I have. I had an iPod Touch for a couple of years as a teenager, but then left iOS until I got an iPhone in college. Once I had the iPhone, I decided to go through my purchase history and re-download the apps I'd used on my iPod, for nostalgia's sake if nothing else.

To my dismay, exceedingly few of the old apps worked, and most of those that did had major graphical glitches. (Not including apps which had been updated by the developer more recently, of course.)

Re: Darling – macOS Translation Layer for Linux

#154
post #152

Something like this is sorely needed by the open-source, not-for-profit, shoestring-resources, cross-platform development community... For example, let's say that I'm writing some cross-platform open source software. And let's say that I am developing this software on a Windows or Linux Box. Now, let's say that for whatever reason, I don't have and can't afford a Mac (a scenario like this is more common than you woul…

>OK, so now how do I compile/run/test the Mac version of my software -- without having that Mac? Splurge on a $1/hour or $20/month account with https://www.macincloud.com/ ?

In case anyone is curious, you have to prepay $30 for the PAYG plan, and you get non-admin access to the slowest Mac Mini you've ever used in your whole life. It does technically work to build iOS and macOS apps, though.

Re: Darling – macOS Translation Layer for Linux

#155

Earlier quoted context omitted.

> As for all of your complaints about the OpenGL drivers, that's an issue for developers, not end users. I shipped an application with WebGL under the impression that it would not need to be custom tested on a decade's worth of MacBooks Pro, but received a report later that a user had lost data because the graphics driver restarted the windowing system when he opened my webpage. If an honest, non-malicious webpage ca…

Woah there buddy. — Apple makes it extremely easy for anyone to start backing up their computer in a way that covers an array of scenarios from accidental or malicious deletions to full-on disaster recovery. — It has everything to do with MacOS because the creation of backups happens within a MacOS environment and the restoring of backups happens within a MacOS environment. The only "firmware" aspect is the (relative…

> If your plan is to recover data from a damaged device, you've failed before you begin.

Apple says this is the case, but it's not actually the case. Repairing a device is how you recover data from it. I know it's preferable that people make an effort to protect their data, but in the real world, approximately zero people back up anything.

Re: Darling – macOS Translation Layer for Linux

#156

Earlier quoted context omitted.

Honestly, the only time ios has broken backwards compatibility is with 32->64 bit. And—not to minimize that, that is quite major, but that's pretty much the only time it's happened.

Have you ever actually tried to run early iOS apps on iOS 10? I have. I had an iPod Touch for a couple of years as a teenager, but then left iOS until I got an iPhone in college. Once I had the iPhone, I decided to go through my purchase history and re-download the apps I'd used on my iPod, for nostalgia's sake if nothing else. To my dismay, exceedingly few of the old apps worked, and most of those that did had major…

> To my dismay, exceedingly few of the old apps worked, and most of those that did had major graphical glitches

Link them to me and I'll try them out. I've never had that experience.

Re: Darling – macOS Translation Layer for Linux

#157

Earlier quoted context omitted.

Have you ever actually tried to run early iOS apps on iOS 10? I have. I had an iPod Touch for a couple of years as a teenager, but then left iOS until I got an iPhone in college. Once I had the iPhone, I decided to go through my purchase history and re-download the apps I'd used on my iPod, for nostalgia's sake if nothing else. To my dismay, exceedingly few of the old apps worked, and most of those that did had major…

> To my dismay, exceedingly few of the old apps worked, and most of those that did had major graphical glitches Link them to me and I'll try them out. I've never had that experience.

I took a look, and it seems like a lot of them were removed from the App Store. If you happen to have any of these in your purchase history:

* Convertbot

* Tap Tap Revenge Classic / 2.5 / Dance

* Roland 2

There were definitely way more, but I don't remember which ones, and now that I'm on iOS 12 I can't test any of them (all 32 bit). These are the three I specifically remember not working.

Re: Darling – macOS Translation Layer for Linux

#158
post #131

Earlier quoted context omitted.

> I was with you right up until you made the cheap shot at Linux. That was as unnecessary as it was untrue. Here are some concrete examples: - macOS has essentially a single set of efficient and consistent keybindings that works everywhere. Command line and GUI work essentially the same, i can use emacs style navigation with C-a C-e C-f C-b etc. everywhere. I can copy with Cmd-C and paste with Cmd-V in my terminal. T…

I don't mind OSX - honestly there's bits of it I do genuinely like. But it's blind-sighted fanboyism that really does the platform harm. > keybindings Honestly, I find Mac OS keybindings and keyboard layout the worst thing about using Macs. Yes it might make some sense but when literally every other platform on the planet follows the same standard apart from Apple, it then makes Apple the ugly stepsister regardless o…

> > file history > You can have that in Linux

You can use lvm or zfs snapshots, but that's not what I'm talking about – I'm talking about in-app browsable history of things like documents or presentations.

> Krunner, for example, has all the same features as Spotlight

Last I checked it used Baloo to do the actual indexing, the list of high priority features/bugs on the project site https://community.kde.org/Baloo (Baloo crashes a lot in various places etc.) and a quick google make it look like it remains alpha software at best, I'm also pretty sure it doesn't have an equally reliable index update mechanism. The most important thing about spotlight for me is that it can search file names and content (filtered by type if necessary) fast and reliably and up-to-date. But you can also do types of searches that as far I'm aware of none of the linux utilities can do.

E.g. show me all the items I downloaded from a google.com domain:

    mdfind "kMDItemWhereFroms == '*google.com*'"
If I want to see the filetypes that where downloaded sorted by frequency I can add

    mdfind -0 "kMDItemWhereFroms == '*google.com*'" | xargs -0 -n1 mdls -name "kMDItemWhereFroms" | sort | uniq -c | sort -n
> For example I can run math calculations in it - which I haven't yet worked out how to do in Spotlight.

You literally just type what you want calculated, e.g. `sin(pi/4)`.

> As a counterargument I could list a dozen things that are in Linux that aren't in OSX. Like up to date core utils and proper package management.

nix. By my lights the only proper package management for any OS. Works fine under both linux and macOS (and will also trivially supply you with up to date coreutils).

> But do you actually use desktop Linux on modern hardware?

I have been using (well-specced) linux desktops for most of my work for a long time.

> The problem there is the application. However Linux will just kill the last process that over allocates memory.

I don't think that's how it works. The whole point of having a proper OS (rather than say DOS) is that misbehaving app won't just bring down everything else. Also if you have a process that wildly allocates memory, by default linux will start off swapping like mad, making your computer effectively unusable (and yeah, in fact my linux desktop does have an SSD and many times as much RAM as my macbook, so if I'm not comparing like to like my linux station is the one with much more powerful hardware). And even if it runs out of swap it doesn't just kill the last process, it uses a more complex scoring algorithm which has a good chance of killing something you didn't want to be killed.

Re: Darling – macOS Translation Layer for Linux

#159
post #141
post #139

Earlier quoted context omitted.

Re. keybindings: you can change your default GTK bindings to Emacs-style if you want to. Whether the super/Windows/Command key should be used for window management or application controls is still up for debate; it always bothers me whenever I have to use a Mac that some browser bindings are already taken by the WM/OS because Cmd is shared between apps and the OS. There are very few bindings that you can’t change on…

> Better to just use Git. How would this help with my example? Git is terrible for managing non-text files and has zero support for browsing such files interactively. It also doesn't work at the file level and is pretty much unusable for anyone who isn't a developer. > Re. keybindings: you can change your default GTK bindings to Emacs-style if you want to. Yeah, but that doesn't really work, it just makes the whole m…

> Turning off overcommit (and swap) does improve responsiveness but is not a viable option for a desktop system

Back when I got my first SSD I ran Linux without a swap file/partition. I did this partly because it was only a 60GB SSD so I wanted to conserve space. I also did it because I didn't want to shorten the life of the SSD with (this was back when such a thing was a concern) and I ran that set up for years on a pretty modest 8GB RAM with KDE installed (ie not just a lightweight tiling WM).

> unsurprising since a proper version needs FS integration

It really doesn't and apfs (your file system in OSX) doesn't even do this. In fact it's probably better that your meta-data indexer isn't embedded into your file system driver because you're just going to slow down file system operations - which matters a lot on UNIX-based platforms because they do lots of file system operations.

A far better approach is to have your indexer run as a separate process that monitors file writes (you can still have a kernel hook for that if you wish) thus you can then catalogue your files without interrupting your normal file system operations. You can also add more granularity like separate database per home directory (which would be much harder to do securely if you were embedding that code into the fs driver without then going down the route of having multiple tanks ala ZFS). It also makes it much easier to optimize your meta-data db since you can now dump everything into a RDBMS rather than attached to the space constrained inodes.

For what it's worth, this is another area I have first hand experience with because I've written a few hobby file systems over the years. Nothing serious nor performant; just myself messing around with a few ideas. But it's still earned me a greater appreciation for the design decisions behind the file systems we do commonly use.

Re: Darling – macOS Translation Layer for Linux

#160
post #158

Earlier quoted context omitted.

I don't mind OSX - honestly there's bits of it I do genuinely like. But it's blind-sighted fanboyism that really does the platform harm. > keybindings Honestly, I find Mac OS keybindings and keyboard layout the worst thing about using Macs. Yes it might make some sense but when literally every other platform on the planet follows the same standard apart from Apple, it then makes Apple the ugly stepsister regardless o…

> > file history > You can have that in Linux You can use lvm or zfs snapshots, but that's not what I'm talking about – I'm talking about in-app browsable history of things like documents or presentations. > Krunner, for example, has all the same features as Spotlight Last I checked it used Baloo to do the actual indexing, the list of high priority features/bugs on the project site https://community.kde.org/Baloo ( B…

> You can use lvm or zfs snapshots, but that's not what I'm talking about – I'm talking about in-app browsable history of things like documents or presentations.

I got that. It's still just some application UI wrapped around a CoW file system. Maybe a better way of saying your point is "doing the same on Linux lacks a lot of polish" - which is true. But that's when happens when Linux has to support a multitude of file systems but Apple can control every aspect of their ecosystem.

> Last I checked it used Baloo to do the actual indexing,

Possibly? Krunner has always "just worked" for me so I've never bothered to look under it's hood.

Regarding the bug you found, well I'd argue that you should expect to read bugs on a bug tracker given that's the point of bug trackers. It does feel like what you're basically now doing is the equivalent of reading a 1 star review of a product (eg on Amazon) and claiming it doesn't work by the proxy of others while also ignoring all the 5 star reviews from people who haven't had any issues. It's a heavily biased way to hold a discussion and if we're both honest, Mac's haven't been without their fair share of bad publicity either. So is it really worth our time cherry picking all the negative things when you and I both know that they're the exception rather than the norm?

> You literally just type what you want calculated, e.g. `sin(pi/4)`.

Handy to know. I suspected it would have been possible but I kept prefixing the formula with `=` which Spotlight didn't like.

> nix. By my lights the only proper package management for any OS. Works fine under both linux and macOS (and will also trivially supply you with up to date coreutils).

My point is you shouldn't have to install a 3rd party package manager. That's the bare minimum a modern OS should provide out of the box.

> I have been using (well-specced) linux desktops for most of my work for a long time.

I struggle to believe that given the descriptions of faults that you've been discussing. Though you have also said you've tinkered with the "swappiness" parameters (plus more) so I guess it's possible that you are running current hardware but have inadvertently tweaked Linux into performing terribly? Or maybe you're just exaggerating all these problems to make a point (much like your "look, I've found a bug on a bug tracker" comment above).

Either way, if the problems were as prevalent and severe as you keep describing then you and I - and millions of other techies for that matter - wouldn't be running Linux.

> The whole point of having a proper OS (rather than say DOS) is that misbehaving app won't just bring down everything else.

"Proper OS" is such a flakey term and what you described isn't even the "whole point" of running an OS. But that's a whole other tangent. More importantly Linux doesn't do what you're accusing it of doing. Thus your statement is simply untrue in a multitude of ways.

> Also if you have a process that wildly allocates memory, by default linux will start off swapping like mad

It's actually a great deal more complicated than that. It depends on the size of your swap file, what applications you have open and their current running state (ie can they be paged). It depends on whether your cache is non-zero and it also depends on the kernel parameters you define.

> And even if it runs out of swap it doesn't just kill the last process, it uses a more complex scoring algorithm which has a good chance of killing something you didn't want to be killed.

Depends on the version of Linux (the kernel) you're running. Older kernels will just kill the last requester. Newer kernels do have a scoring algorithm but it's really not that complex at all (if memory serves, it's ostensibly a just a percentage*10 figure of used memory)

Post reply on HN