News for hackers. Stuff that matters.
Re:Metal for IntelliJ Platform by an_opabinia on Thursday November 26, 2020 @08:27PM (#25224833)
You’d think Apple would just hire someone to do this for them, in Java. There are maybe 10,000 concerns they could pay for to resolve, with clear no nonsense objectives like “Does Java2D run on Metal?” And the crazy thing is they have the money to do it.
Re:Metal for IntelliJ Platform by webwielder2 on Thursday November 26, 2020 @09:44PM (#25225174)
“Does Java2D run on Metal?” doesn't seem like a top 10,000 question for Apple. It does however seem like a top 10 question for JetBrains. And so here we are.
Re:Metal for IntelliJ Platform by Technically on Thursday November 26, 2020 @10:54PM (#25225427)
How do you figure? Making the native graphics api available to popular toolsets seems pretty straightforward OS work.
Re:Metal for IntelliJ Platform by patmorgan23 on Thursday November 26, 2020 @11:54PM (#25225636)
But Apple wants people to use swift not Java.
Re:Metal for IntelliJ Platform by chrisseaton on Friday November 27, 2020 @04:07AM (#25226810)
That’s not the Apple strategy though is it?

They don’t want to be running around making Swing and SWT and Qt and Gtk work well on macOS. They offer their own and you can take it or leave it. I guess this lets them simplify and focus. It obviously works for them.

Re:Metal for IntelliJ Platform by pvg on Thursday November 26, 2020 @09:25PM (#25225089)
This specific thing is much more a JetBrains (and their customers) problem than an Apple problem and it looks like they've managed to put together a good solution - do the work and have some assurance it's going to end up in the mainline OpenJDK. They've been selling their tools on macOS for many years, have shipped plenty of custom JDKs before, it's safe to assume they have a decent idea what they're doing.
Re:Metal for IntelliJ Platform by geodel on Thursday November 26, 2020 @10:27PM (#25225327)
I wouldn't think at all. Just like I do not think Microsoft would implement Swift backend for windows.
Re:Metal for IntelliJ Platform by fomine3 on Friday November 27, 2020 @03:21AM (#25226546)
It looks like much possible than Apple will do.
Re:Metal for IntelliJ Platform by adamnemecek on Thursday November 26, 2020 @08:31PM (#25224849)
Apple has vested interest in users not running Java on their platform.
Re:Metal for IntelliJ Platform by onewland on Thursday November 26, 2020 @09:03PM (#25224982)
I've worked at Apple and hundreds if not thousands of their devs use Java
Re:Metal for IntelliJ Platform by chrisseaton on Thursday November 26, 2020 @09:09PM (#25225026)
That's interesting - what is Apple building on Java? They're still on Java 6 I think? I thought they deprecated their Java system APIs years ago as well?
Re:Metal for IntelliJ Platform by threeseed on Thursday November 26, 2020 @09:39PM (#25225150)
Been a while since I worked at Apple but it would likely still be:

- Apple ID

- Apple Online Store

- App Store

- Bug Reporter/Radar

- iCloud Apps e.g. Mail.

- iTunes Connect

- iTunes Store

- WWDC

Pretty much all of the internal apps will be in Java unless they are using off the shelf software e.g. discussions. In addition you would have all of the companies they acquired and whatever tech stacks they use e.g. Siri.

Re:Metal for IntelliJ Platform by jolux on Thursday November 26, 2020 @09:15PM (#25225054)
I bet most of their Java usage is web services and not Swing client apps.
Re:Metal for IntelliJ Platform by jen20 on Thursday November 26, 2020 @10:47PM (#25225402)
Apple have an OSS framework built on Netty (whose lead developer is employed by Apple) named ServiceTalk, and this talk [1] says that almost all back end services are Java-based.

I have no idea where the idea of Java 6 being in use comes from.

[1]: https://youtu.be/Ms8vriZ6ieU

Re:Metal for IntelliJ Platform by toyg on Friday November 27, 2020 @12:08AM (#25225690)
> where the idea of Java 6 being in use comes from

Possibly from confusion with the last time Apple actually shipped a JDK/runtime to the public. They used to produce their own optimized distribution, which had better Cocoa widgets among other things. It was part of the original big push to get decs on OSX, it’s mentioned in Jobs’s keynotes etc. They later deprecated it once they reached critical mass, and discontinued it; if i remember correctly, the last jdk they shipped was a v6.

Re:Metal for IntelliJ Platform by anton96 on Thursday November 26, 2020 @09:30PM (#25225114)
I’m pretty sure I saw the word «webObject» in my url bar while being redirected to their site at some point.
Re:Metal for IntelliJ Platform by vhogemann on Friday November 27, 2020 @03:07PM (#25232149)
Re:Metal for IntelliJ Platform by ex3ndr on Thursday November 26, 2020 @09:25PM (#25225087)
Their FoundationDB has java Record Layer and in their keynotes they specify that it is used in iCloud and it is basically all icloud is java based
Re:Metal for IntelliJ Platform by adamnemecek on Thursday November 26, 2020 @09:23PM (#25225080)
Not for building apps though, right?
Re:Metal for IntelliJ Platform by onewland on Thursday November 26, 2020 @09:57PM (#25225224)
not sure what you mean by "apps" but I am talking back-end mostly
Re:Metal for IntelliJ Platform by adamnemecek on Thursday November 26, 2020 @10:48PM (#25225407)
I mean desktop apps, not backends.
Re:Metal for IntelliJ Platform by vemv on Thursday November 26, 2020 @09:54PM (#25225213)
I think this is true to a certain extent. They'd rather have developers create UIs with Swift/ObjC, which tend to look and perform better on Mac.

i.e. it's probably more about fostering great UIs for the end customers rather than curbing Java altogether as a platform.

Re:Metal for IntelliJ Platform by kitsunesoba on Thursday November 26, 2020 @11:41PM (#25225595)
Yes, it’s more likely that an app written with Swift/Obj-C and AppKit/UIKit/SwiftUI will be more tailored to macOS specifically and will better take advantage of platform facilities than apps written with a different language and toolkit (such as Java+ Swing). Apps built with third party tools tend to be more lowest-common-denominator.
Re:Metal for IntelliJ Platform by p2t2p on Friday November 27, 2020 @02:14AM (#25226224)
Nobody cares, proved by electron and popularity of web apps in general. The only b thing Apple will achieve is to speed up the native going into irrelevance and being replaced with things like electron. Regular people don't care about "looks and feels native" zealots. All the relevant software has distinct, software specific looks. Adobe suite, Fusion, bunch of engineering tools, IDEs.
Re:Metal for IntelliJ Platform by Oreb on Friday November 27, 2020 @08:17AM (#25228448)
Regular Mac users _used to_ care. For many years, one of the defining characteristics of Macs was the high quality native apps, all with consistent look, feel and behavior. Mac users would refuse to use apps that weren't sufficiently Mac-like. Developers of Mac apps had a similar passion and perfectionism for good UX and UI.

Somewhere along the way, this part of Apple culture got lost. I think Apple's commercial success is part of the reason. The traditional Mac user base got diluted by lots of newcomers who didn't have the same high expectations and requirements for good and consistent user interfaces. The traditional Mac developers got diluted by programmers from other platforms, who – although not being technically inferior in any way – did not have the same passion or understanding of Apple's UI philosophy, often not even bothering to study the Human Interface Guidelines.

Re:Metal for IntelliJ Platform by kitsunesoba on Friday November 27, 2020 @04:53PM (#25232906)
A lot of Mac users still care, as is evidenced by the continued existence of the likes of Panic and OmniGroup.
Re:Metal for IntelliJ Platform by kitsunesoba on Friday November 27, 2020 @04:52PM (#25232897)
> Adobe suite, Fusion

Funny thing is that those are both products that many are reaching for alternatives to whenever viable. As powerful as they may be as tools, there's quite a lot that's throughly mediocre or even bad about them.

There are examples of truly great apps that use their own look and feel, but I don't think either of those are among them.

Re:Metal for IntelliJ Platform by toyg on Friday November 27, 2020 @12:02AM (#25225675)
It’s about fostering lock-in and staying in control. Which is why they felt the need to build something like Metal in the first place.
Re:Metal for IntelliJ Platform by urda on Thursday November 26, 2020 @10:22PM (#25225307)
This simply is not true.
Re:Metal for IntelliJ Platform by dstaley on Thursday November 26, 2020 @10:31PM (#25225341)
I would have loved to have seen a Vulkan implementation combined with MoltenVK[1] for Metal compatibility instead of a direct Metal implementation. This means that Java will now have to maintain two separate graphics implementations.

[1] https://github.com/KhronosGroup/MoltenVK

Re:Metal for IntelliJ Platform by p1necone on Thursday November 26, 2020 @09:37PM (#25225144)
Why is Apple still dead set on having their own special graphics API? Surely it would be better for everyone (even them) if they just adopted Vulkan like literally every other platform?
Re:Metal for IntelliJ Platform by tpush on Friday November 27, 2020 @04:06AM (#25226801)
> like literally every other platform?

What other platforms? The only ones I see adopting Vulkan are Desktop Linux and some newer Androids. The first effectively doesn't even matter.

Re:Metal for IntelliJ Platform by webwielder2 on Thursday November 26, 2020 @09:42PM (#25225164)
Still? What would have caused them to not want to maintain control of their platform?
Re:Metal for IntelliJ Platform by p1necone on Thursday November 26, 2020 @09:45PM (#25225178)
All it does it make software (especially games) less likely to be ported to iOS/macOS. And they have to maintain a graphics API, which isn't a small task. How is that a good thing for them?

This isn't really something that helps or hinders locking consumers into their ecosystem.

Re:Metal for IntelliJ Platform by webwielder2 on Thursday November 26, 2020 @09:48PM (#25225191)
iOS has no shortage of games, so that doesn't seem like a problem. And maintaining their own graphics API lets them fully integrate it into the rest of their hardware and software stack without the baggage that comes with a cross-platform standard.
Re:Metal for IntelliJ Platform by p1necone on Thursday November 26, 2020 @09:51PM (#25225203)
iOS is a pretty big market, I would argue that they have lots of games despite not supporting open standards, not because. Gaming compatibility on laptop/desktop macOS is pretty piss poor. (Although Blizzard has always been really good at supporting mac).
Re:Metal for IntelliJ Platform by lucian1900 on Friday November 27, 2020 @07:53AM (#25228301)
Windows, iOS and Android are the most common OSes, only one of which uses Vulkan and not even universally or exclusively.

The games consoles don’t use Vulkan either. It’s a niche API.

Re:Metal for IntelliJ Platform by threeseed on Thursday November 26, 2020 @09:42PM (#25225162)
Metal is used within the OS for all of its rendering.

So it's more a case of they built the API for themselves first and then made it available for developers.

They also have power consumption and mobile performance as being their highest priorities which may not align with Vulkans.

Re:Metal for IntelliJ Platform by p1necone on Thursday November 26, 2020 @09:47PM (#25225185)
I would be surprised if the graphics API layer had a particularly big impact on power usage. One of the stated goals of Vulkan is also to reduce CPU load when rendering.
Re:Metal for IntelliJ Platform by ksec on Friday November 27, 2020 @12:21AM (#25225722)
What does Vulkan brings to the table apart form so called cross platform compatibility? Which is a bit like Cross Platform Apps, they are just never as good as Native Apps.

It is not in any ways better than Metal. And when you design your own Hardware, it makes much sense to own your API design for maximum performance.

Re:Metal for IntelliJ Platform by ladyanita22 on Friday November 27, 2020 @02:24AM (#25226274)
I don't think you're right at all. I've read numerous times that Metal has significantly more overhead than Vulkan.
Re:Metal for IntelliJ Platform by random5634 on Friday November 27, 2020 @07:41AM (#25228218)
Please provide a citation- apple is doing amazing things with metal - particularly on the M1
Re:Metal for IntelliJ Platform by akmittal on Friday November 27, 2020 @01:34AM (#25226043)
There are times like this I feel electron is not bad of a platform. Platform APIs keep on changing but chromium always implement those in early phase(vulkan, metal, ARM mac OS etc). Development almost never have to worry about platform APIs.
Re:Metal for IntelliJ Platform by Thristle on Friday November 27, 2020 @05:00AM (#25227169)
Maybe in a couple of years when they get the resource consumption way down. And even web stuff runs better with the "native" implmentation, slack running on safari (really cant find it now, it was posted here a while ago)
Re:Metal for IntelliJ Platform by adamnemecek on Thursday November 26, 2020 @08:35PM (#25224877)
I have gone through something similar recently (implementing nanovg on top of Metal). It’s a really good experience and can be achieved with relatively little code.
Re:Metal for IntelliJ Platform by avalys on Thursday November 26, 2020 @09:16PM (#25225058)
Who else uses Java Swing these days?
Re:Metal for IntelliJ Platform by madhadron on Friday November 27, 2020 @12:37AM (#25225784)
Honestly, I've been looking into starting projects on it because it's mature and I can have some confidence that a jar I compile today will work in ten years.
Re:Metal for IntelliJ Platform by johnisgood on Thursday November 26, 2020 @07:42PM (#25224622)
It consumes less energy? By how much, and was this the main motivation?
Re:Metal for IntelliJ Platform by jmarcher on Thursday November 26, 2020 @07:48PM (#25224658)
The main motivation is OpenGL being removed from macOS at some point.
Re:Metal for IntelliJ Platform by gravypod on Thursday November 26, 2020 @07:56PM (#25224692)
I'd assume there's other considerations because if that were the only concern why not go with Vulkan, an industry standard?

https://github.com/KhronosGroup/MoltenVK

Battery life might be a good reason

Re:Metal for IntelliJ Platform by p1necone on Thursday November 26, 2020 @09:59PM (#25225232)
From what I understand MoltenVK is not super efficient compared to native Vulkan on other platforms.
Re:Metal for IntelliJ Platform by pvg on Thursday November 26, 2020 @08:08PM (#25224749)
For this sort of thing, adding another layer of indirection (and another dependency, developed elsewhere with potentially different priorities) is much more likely to end up being a 'now you have two problems' kind of scenario.
Re:Metal for IntelliJ Platform by hvis on Thursday November 26, 2020 @08:36PM (#25224888)
But they would have both a macOS port and a cross-platform Vulkan port then. "Two birds, one stone" kind of scenario.

And it's hard to imagine Java2D would have more complex requirements for Metal than the games that are already using MoltenVK.

Re:Metal for IntelliJ Platform by Macha on Thursday November 26, 2020 @10:07PM (#25225258)
OpenGL is still "fine" on Windows and optimal on Linux (which if their survey is accurate, are both larger platforms for them than Mac https://www.jetbrains.com/lp/devecosystem-2020/ ).

Of course, they could go full dx12 on Windows, Vulcan on Linux and Metal on Mac, but precisely because their needs are not that demanding in the graphics department, I imagine the incentive is to keep it simple

Re:Metal for IntelliJ Platform by hvis on Friday November 27, 2020 @10:17AM (#25229299)
The Vulkan drivers should be at least as available as OpenGL on both Windows and Linux. So it would make sense to target Vulkan and thus benefit from a shared codebase.

And if their Mac client base is not big, it should make even more sense to experiment with MoltenVK (lower risk).

Anyway, they probably have good reasons for that choice. Just wondering what those are. Perhaps Oracle is not big on relying on community projects like MoltenVK?

Re:Metal for IntelliJ Platform by WhoCaresLies on Thursday November 26, 2020 @09:06PM (#25225004)
"Performance on par with OpenGL"

I would have expected a performance increase to be honest

Or maybe they push the limits of POSSIBLE perf because of the JVM, i guess that's why performance gain can't be perceived, no matter what, the JIT and GC has to constantly work..

Re:Metal for IntelliJ Platform by chrisseaton on Thursday November 26, 2020 @09:08PM (#25225014)
They're aiming to get off a dead API as quickly as they can. All they have to do is match performance (no regression) and they're happy. They don't need to increase performance. That can be a separate project. Maybe you want to do it?
Re:Metal for IntelliJ Platform by pdpi on Thursday November 26, 2020 @09:31PM (#25225115)
The OpenGL-based implementation is pretty damn mature, and it’s probably well optimised. The new Metal implementation is an early access release, at a stage in the project where performance concerns are more like “don’t do stupid things” than like “extract every last ounce of performance out of it”.
Re:Metal for IntelliJ Platform by WhoCaresLies on Thursday November 26, 2020 @11:18PM (#25225514)
You are right, i guess
Re:Metal for IntelliJ Platform by brundolf on Thursday November 26, 2020 @08:23PM (#25224821)
Now I'm curious to what degree the graphics rendering is responsible for IntelliJ's sluggish, battery-hogging experience on macOS. I wouldn't think it's the main cause, but who knows
Re:Metal for IntelliJ Platform by threeseed on Thursday November 26, 2020 @09:46PM (#25225183)
I have a Hackintosh with an 10980xe and 128GB RAM.

I tried this Metal build and it doesn't make it any faster. Pretty sure it's all of the background indexing and compilation it is doing because there is no app that can push all of my cores to 5GHz like IntelliJ can.

Re:Metal for IntelliJ Platform by Thristle on Friday November 27, 2020 @05:06AM (#25227213)
Indexing completly destroys a CPU. Thats why they are pushing shared indices now
Re:Metal for IntelliJ Platform by brailsafe on Thursday November 26, 2020 @09:27PM (#25225098)
I quite like JetBrains various IDEs, but it would be nicer to have the same functionality built natively on Cocoa or SwiftUI or whatever.
Re:Metal for IntelliJ Platform by s4ik4t on Thursday November 26, 2020 @11:06PM (#25225465)
I think that would slow down the development and that's why not being considered
Re:Metal for IntelliJ Platform by brailsafe on Saturday November 28, 2020 @03:55AM (#25236360)
Nicer, not necessarily practical
Re:Metal for IntelliJ Platform by adamnemecek on Thursday November 26, 2020 @08:28PM (#25224838)
Sluggishness is caused by the fact that it's Java.
Re:Metal for IntelliJ Platform by p1necone on Thursday November 26, 2020 @09:38PM (#25225149)
It's not sluggish at all on Windows and Linux. "Java is slow" is a silly meme, it doesn't reflect reality.
Re:Metal for IntelliJ Platform by somehnguy on Thursday November 26, 2020 @10:14PM (#25225277)
I don't find it to be any more sluggish on my Mac compared to my coworkers on Linux. If anything I have a better experience than them due to various random Linux UI glitchiness (which could probably be attributed to the specific hardware they are using, but still).
Re:Metal for IntelliJ Platform by p1necone on Thursday November 26, 2020 @10:18PM (#25225295)
That's true. It can be a total nightmare trying to configure stable hardware rendering on a lot of linux distro/hardware combos.
Re:Metal for IntelliJ Platform by adamnemecek on Thursday November 26, 2020 @10:48PM (#25225410)
It's not a meme. Garbage collected language just can't be used for certain things.
Re:Metal for IntelliJ Platform by samus on Saturday November 28, 2020 @03:19AM (#25236162)
The classic example would be real-time applications where hard envelopes in terms of response times are required and GC pauses must _never_ happen. But even in these cases it is possible to do a lot:

- write garbage-free code (reuse objects and byte buffers, allocate memory off the Java heap and store the pointers in `long`s)

- use a GC that doesn't pause and carefully profile the app to ensure the GC can keep up with the rate of memory allocation

- turn off the GC and cross fringers if the app crashing is considered better than not responding

It's just difficult because most software is written using software patterns that require a GC, which is perfectly fine for many domains.

Re:Metal for IntelliJ Platform by sitzkrieg on Thursday November 26, 2020 @11:29PM (#25225550)
they are great for desktop IDE software though
Re:Metal for IntelliJ Platform by AlchemistCamp on Friday November 27, 2020 @04:52AM (#25227102)
I've found Jetbrain products to be really bloated and sluggish, at least on my machine.
Re:Metal for IntelliJ Platform by kaba0 on Saturday November 28, 2020 @06:12PM (#25241379)
Because they do a ton of things and are full-featured IDEs. Of course it takes more resource than a vim or vscode instance which are only code editors
Re:Metal for IntelliJ Platform by solarkraft on Friday November 27, 2020 @05:42AM (#25227451)
Ah, supporting new Platform APIs I see.

It would be nice if they could start working on supporting Wayland and in turn HiDPI on modern desktops.

Re:Metal for IntelliJ Platform by bpodgursky on Thursday November 26, 2020 @10:47PM (#25225401)
"Lanai" as a project name is hilarious. It's like begging to Larry Ellison

"Please don't cancel the project! You'll own it all anyway!"

*Lanai is the Hawaiian island that Larry Ellison owns