News for hackers. Stuff that matters.
Re:OCaml: Add support to iOS/Mac ARM64 by nindalf on Tuesday July 28, 2020 @11:13AM (#23976634)
I think most programming languages and associated tools will start supporting ARM64 as a first class citizen. The current lack of support isn't due to apathy, just constraints around ARM64 not being popular for desktop development. For example, it's difficult to support a platform that isn't well supported by your CI/CD provider.

Linus Torvalds previously said that ARM on the server would never be a thing since developers didn't run ARM on their personal machines. Since this assumption is no longer true, the ecosystem of tools will now support ARM better and we'll see ARM on the server become a major thing in a few year's time.

Re:OCaml: Add support to iOS/Mac ARM64 by EduardoRFS on Tuesday July 28, 2020 @11:18AM (#23976683)
I don't think that was the case for a long time on the tooling side, OCaml has a great support for ARM64 for a long time now, but Linux ARM64. But well most developers aren't actually using Linux.

But a thing that is going to change is supporting iOS, one of the reasons that this PR was approved(and it adds support to iOS) it's mostly because there is a Mac ARM64

Re:OCaml: Add support to iOS/Mac ARM64 by enedil on Tuesday July 28, 2020 @12:37PM (#23977594)
Most OCaml developers might be actually using Linux though.
Re:OCaml: Add support to iOS/Mac ARM64 by nix23 on Tuesday July 28, 2020 @12:47PM (#23977724)
>But well most developers aren't actually using Linux.

What??

Re:OCaml: Add support to iOS/Mac ARM64 by coldtea on Tuesday July 28, 2020 @07:20PM (#23981751)
Well, most aren't. The huge majority of developers use Windows and many use OS X.

In any major dev conference in the US/Europe OS X is almost 50% or more (and almost 80% on the presenters side), while Windows has tons of "silent" users (e.g. not the kind to make noise on blogs/HN/etc, but like 90% of devs anyway, working in enterprise, etc).

Even on Stack Overflow poll, which attracts less of the kind of "silent" enterprise devs more likely to use Windows and "bland" environments like .NET and Java, it's 45% Windows, 27% OS X and a little less of that (26%) Linux.

https://www.freecodecamp.org/news/stack-overflow-developer-s...

Re:OCaml: Add support to iOS/Mac ARM64 by asveikau on Wednesday July 29, 2020 @12:14AM (#23983461)
It's funny to see your observations about Stack Overflow, because it was co-founded by an ex Microsoft guy (Spolsky) and I remember in early days there it had quite the .NET community which was probably not coincidental. I think they also run the site on .NET.
Re:OCaml: Add support to iOS/Mac ARM64 by noir_lord on Wednesday July 29, 2020 @03:45AM (#23984303)
They do and very efficiently, it was at one point a bunch of high end servers - they called it out as an example of going deep not broad for scaling.

I remember reading they had 256GB of RAM on DB servers when that seemed like an absurd amount to me.

Re:OCaml: Add support to iOS/Mac ARM64 by the_af on Tuesday July 28, 2020 @01:03PM (#23977985)
I'm guessing he might have meant OCaml devs? Most development shops I've worked in used Linux servers to host their solution, and mostly Linux/Unix based tools and dev environments (people who preferred Windows as their desktop usually ssh'd to Linux boxes to work).
Re:OCaml: Add support to iOS/Mac ARM64 by EduardoRFS on Tuesday July 28, 2020 @01:10PM (#23978082)
Most developers, there is a lot of places to get this information but if you look at the stackoverflow survey, which is a survey large enough to be relevant, you get some data around 25% of developers using Linux.

We're talking about as their computer, not servers tho, everyone uses Linux for server

Re:OCaml: Add support to iOS/Mac ARM64 by nix23 on Tuesday July 28, 2020 @01:57PM (#23978705)
53% Use Linux:

https://insights.stackoverflow.com/survey/2019#technology-_-...

>Linux and Windows are the most common platforms that our respondents say they have done development work for this year. We asked about container technologies like Docker for the first time this year, and Docker was the third most broadly used platform.

But:

https://insights.stackoverflow.com/survey/2019#technology-_-...

Re:OCaml: Add support to iOS/Mac ARM64 by CurtHagenlocher on Tuesday July 28, 2020 @02:45PM (#23979271)
This is the distinction between the platform for which the work is being done and the platform the work is being done on. You can develop for Linux servers from other platforms.
Re:OCaml: Add support to iOS/Mac ARM64 by nix23 on Tuesday July 28, 2020 @03:51PM (#23979938)
Thanks, peoples from HN would not have understood that, big thumps up!
Re:OCaml: Add support to iOS/Mac ARM64 by the_af on Tuesday July 28, 2020 @01:18PM (#23978201)
Thanks for the answer! I have a followup question: if the server is Linux, that means the app itself (or the "solution") is Linux based, which means that an OCaml solution would have to compile (or cross-compile to) and run on Linux, which means that ARM64 on Linux is relevant :)

Unless of course most OCaml devs don't target Linux.

Re:OCaml: Add support to iOS/Mac ARM64 by yawaramin on Wednesday July 29, 2020 @12:51AM (#23983606)
Sure it's relevant, but again like Eduardo said, most devs don't have Linux ARM64 dev machines, they don't use it on a daily basis, they don't have experience with it.
Re:OCaml: Add support to iOS/Mac ARM64 by pjmlp on Tuesday July 28, 2020 @02:55PM (#23979380)
> everyone uses Linux for server

And here I am deploying .NET and C++ solutions on Windows Servers, strange definition of "everyone".

Re:OCaml: Add support to iOS/Mac ARM64 by yawaramin on Tuesday July 28, 2020 @04:23PM (#23980270)
Chill dude, 'everyone' doesn't mean 'literally everyone on the planet', it's a figure of speech :-)
Re:OCaml: Add support to iOS/Mac ARM64 by 3001 on Wednesday July 29, 2020 @12:39AM (#23983560)
This is unrelated, but your karma is 2020.
Re:OCaml: Add support to iOS/Mac ARM64 by yawaramin on Wednesday July 29, 2020 @12:44AM (#23983582)
Lol. Not sure if that's a good thing :-D
Re:OCaml: Add support to iOS/Mac ARM64 by coldtea on Tuesday July 28, 2020 @07:29PM (#23981811)
"Everyone" means most in casual conversation.

You maybe had it confused with the universal quantifier ∀ in a math/logic context, but it's not the same :-)

Re:OCaml: Add support to iOS/Mac ARM64 by pjmlp on Wednesday July 29, 2020 @12:25AM (#23983500)
Which still doesn't apply, when Linux based servers are about 50% of server market.

https://www.t4.ai/industry/server-operating-system-market-sh...

Re:OCaml: Add support to iOS/Mac ARM64 by brmgb on Wednesday July 29, 2020 @04:30AM (#23984525)
Come on, everyone knows the old trick of using paid shipments to pretend Microsoft have a large share of the server market. It conveniently discounts all these free installations of Linux.
Re:OCaml: Add support to iOS/Mac ARM64 by pjmlp on Wednesday July 29, 2020 @05:00AM (#23984727)
Just like everyone knows those stories about disgruntled employees asking to get their tools back.
Re:OCaml: Add support to iOS/Mac ARM64 by non-entity on Tuesday July 28, 2020 @03:58PM (#23980005)
I wouldn't think so, from what I've read OCaml has pretty poor windows support.
Re:OCaml: Add support to iOS/Mac ARM64 by scythe on Tuesday July 28, 2020 @03:26PM (#23979693)
They at least aren't using Linux on ARM laptops/desktops, which has been a year away for around a decade now.
Re:OCaml: Add support to iOS/Mac ARM64 by asveikau on Tuesday July 28, 2020 @12:34PM (#23977544)
I don't know much about ocaml specifically, but speaking in the abstract, probably one of the best reasons I can think of for a compiler to target arm64 Linux is to target android phones.
Re:OCaml: Add support to iOS/Mac ARM64 by EduardoRFS on Tuesday July 28, 2020 @12:42PM (#23977676)
Android isn't even on the official list of OS supported, recently I fixed the build system for Android, OCaml is just not a mobile language(yet)
Re:OCaml: Add support to iOS/Mac ARM64 by slezyr on Tuesday July 28, 2020 @12:58PM (#23977899)
> But well most developers aren't actually using Linux.

Then it would be Windows and not Mac OS.

Is Mac OS any popular outside USA?

Re:OCaml: Add support to iOS/Mac ARM64 by nicoburns on Tuesday July 28, 2020 @01:51PM (#23978623)
It's certainly popular in the UK. Especially for developers and students. Of course if you're doing mobile (iOS) dev you're pretty much forced to use macs.
Re:OCaml: Add support to iOS/Mac ARM64 by monadic2 on Tuesday July 28, 2020 @04:19PM (#23980217)
I'm not really sure you can call macs "popular" even here in the US.... they're a professional luxury for the most part. I say this with three macs within reach of me.
Re:OCaml: Add support to iOS/Mac ARM64 by coldtea on Tuesday July 28, 2020 @07:34PM (#23981838)
>I say this with three macs within reach of me.

Well, they're a steady 10% of the PC market, which would make 1 in 10 computer owners in the US have one. Perhaps more have Macs than any other PC brand (if we break them down individually, e.g. Dell, HP, Asus, Microsoft, etc.).

Any coffeeshop is choke full of Mac laptop yielding people. Any university the same. Most developer conferences (Java, Rails, JS, Python, Golang, etc) is 50%+ Macs on the audience (and close to 80% on the . Stack Overflow poll puts Mac desktop use by devs at 27% (Windows 45%/Linux 26%).

Re:OCaml: Add support to iOS/Mac ARM64 by monadic2 on Tuesday July 28, 2020 @08:58PM (#23982390)
I mean this is fair but I don’t see much point in comparing Apple to a single commodity pc manufacturer, no disrespect intended (I love my xps 13). I suspect coffee shops and universities are simply full of the professional class I implied earlier, which makes sense to me.

Also, go to a community college and count the number of macs there. There’s a clear class bias here.

Re:OCaml: Add support to iOS/Mac ARM64 by coldtea on Wednesday July 29, 2020 @04:23AM (#23984488)
>Also, go to a community college and count the number of macs there. There’s a clear class bias here.

Sure, since a PC would be more affordable, and in higher performance needs have more bang for the buck.

The Macs are for other kind of niceties (not raw performance per buck) and make different tradeoffs, plus cost more.

Re:OCaml: Add support to iOS/Mac ARM64 by freehunter on Tuesday July 28, 2020 @04:48PM (#23980539)
The subject of the conversation is developers, who are almost by definition luxurious professionals.
Re:OCaml: Add support to iOS/Mac ARM64 by josephg on Tuesday July 28, 2020 @06:55PM (#23981570)
It really depends on the programming culture. Game developers and many enterprise software developers almost universally develop on windows. I’ve had conversations with some people from those areas who have been shocked at the idea software developers use macs - they personally don’t know anyone who does.

But web development shops (especially node/react/etc), consulting, and SV startups seem to pretty consistently use macs.

It’s hard to intuitively tell how popular any of this stuff is in absolute terms because we’re all individually trapped in filter bubbles based on the kind of programmers we interact with.

Re:OCaml: Add support to iOS/Mac ARM64 by alasdair_ on Thursday July 30, 2020 @05:31AM (#23996187)
> Game developers and many enterprise software developers almost universally develop on windows.

Anyone doing mobile game development knows the pain of trying to develop for iOS without using a mac.

Re:OCaml: Add support to iOS/Mac ARM64 by unreal6 on Tuesday July 28, 2020 @04:42PM (#23980464)
They seem exceedingly popular in academia, it seems that most university students and professors posses them, even in computer science departments.
Re:OCaml: Add support to iOS/Mac ARM64 by tambourine_man on Tuesday July 28, 2020 @05:43PM (#23981005)
Of course it is.
Re:OCaml: Add support to iOS/Mac ARM64 by nicoburns on Tuesday July 28, 2020 @11:22AM (#23976720)
> The current lack of support

I'm not sure that's even true from a tooling perspective. It's true that desktop applications often don't support ARM64, but toolchains usually do because both Android and iOS are primarily ARM64 and are hugely popular platforms.

Re:OCaml: Add support to iOS/Mac ARM64 by mattgreenrocks on Tuesday July 28, 2020 @12:46PM (#23977716)
There's confirmation bias at work here, but I've definitely noticed a slight uptick on ARM-related work to various dev tools (think LLVM and whatnot) in 2019-2020 leading up to the announcement. That and $5 gets you a decent cup of coffee, but hey.

OCaml is known for having a small-ish implementation with good performance IIRC (not sure where multicore is these days). Will have to take a look at this.

Re:OCaml: Add support to iOS/Mac ARM64 by superherointj on Tuesday July 28, 2020 @02:30PM (#23979104)
OCaml has multicore now and seems to be doing well. Latest report: https://discuss.ocaml.org/t/multicore-ocaml-june-2020/6047/1
Re:OCaml: Add support to iOS/Mac ARM64 by heavyset_go on Tuesday July 28, 2020 @11:45AM (#23976957)
As someone who jumped on the ARM train early, and someone who doesn't want to contribute to creating more electronic waste than necessary, it's disheartening to see 32-bit ARM being increasingly ignored as a platform compared to ARM64.
Re:OCaml: Add support to iOS/Mac ARM64 by cesarb on Tuesday July 28, 2020 @12:13PM (#23977252)
It's not just ARM; the same has been happening to x86. 32-bit in general is going out of fashion for general-purpose platforms.
Re:OCaml: Add support to iOS/Mac ARM64 by heavyset_go on Tuesday July 28, 2020 @12:30PM (#23977481)
I keep a 32-bit x86 Mac alive as a hobby project, and I've noticed the same thing. Debian seems to be the only Linux distribution with a maintained and up-to-date x86 port.

edit: I don't want to take up more space in this thread, but would like to thank Vogtinator and saagarjha for pointing out other options for 32-bit Linux distributions.

Re:OCaml: Add support to iOS/Mac ARM64 by Vogtinator on Tuesday July 28, 2020 @12:51PM (#23977781)
openSUSE Tumbleweed supports i586 and up.
Re:OCaml: Add support to iOS/Mac ARM64 by nix23 on Tuesday July 28, 2020 @02:04PM (#23978806)
Tumbleweed is just great!!! That comes from a Arch and FreeBSD veteran.
Re:OCaml: Add support to iOS/Mac ARM64 by saagarjha on Tuesday July 28, 2020 @12:37PM (#23977591)
Alpine Linux supports it.
Re:OCaml: Add support to iOS/Mac ARM64 by the_duke on Tuesday July 28, 2020 @01:28PM (#23978347)
Well, even many mid-tier phones already have 4 GB RAM now.

The demise of 32-bit was/is inevitable for personal computing.

Re:OCaml: Add support to iOS/Mac ARM64 by wczekalski on Tuesday July 28, 2020 @12:04PM (#23977171)
ARM 32 bit is supported by OCaml. Just not for iOS/MacOS since the 32 bit iOS devices are ancient by now.
Re:OCaml: Add support to iOS/Mac ARM64 by yjftsjthsd-h on Tuesday July 28, 2020 @12:32PM (#23977519)
> 32 bit iOS devices are ancient by now

The last iPhone with a 32-bit processor appears to be the iPhone 5c, last produced in 2015. As I type this on a laptop from 2015, I have to question your definition of "ancient".

Re:OCaml: Add support to iOS/Mac ARM64 by saagarjha on Tuesday July 28, 2020 @12:39PM (#23977623)
iPhone 5c uses technology from 2012; it was already terrible to use as it approached its end-of-life in 2017. Old phones just don’t really have the lifespan that computers do. (In contrast, my iPhone SE–which is using 5-year-old technology as well–is still an excellent phone.)
Re:OCaml: Add support to iOS/Mac ARM64 by josephg on Tuesday July 28, 2020 @07:04PM (#23981636)
I think that’s increasingly not the case. I’m writing this message on an iPhone 6s which honestly still feels great. I had the battery replaced a couple years ago but aside from that I haven’t had any problems with it - all the apps I run on it feel smooth and responsive. (And in some cases better than my desktop since they aren’t running through electron.)

If not for the camera and iOS support inevitably ending, I don’t see much reason to upgrade.

Re:OCaml: Add support to iOS/Mac ARM64 by nicoburns on Tuesday July 28, 2020 @07:54PM (#23981964)
I think the iPhone 6S is actually the oldest phone to which this applies. It was a big step up in processor speed from the 6, and I think it marked the point at which phone cpus hit "fast enough". Hopefully apple continue to support the 6S for at least a couple more years, because I don't think there's any technical reason why they can't.
Re:OCaml: Add support to iOS/Mac ARM64 by photojosh on Wednesday July 29, 2020 @03:07AM (#23984143)
Notably it has also 2GB of RAM, when the older devices have 1.

One of the kids' phones is an SE which is pretty much the same internals as the 6S and it's still good.

Re:OCaml: Add support to iOS/Mac ARM64 by nephanth on Tuesday July 28, 2020 @03:02PM (#23979461)
The definition of "ancient" is probably not the same for your laptop and for a planned-obsolescence apple mobile device
Re:OCaml: Add support to iOS/Mac ARM64 by kergonath on Tuesday July 28, 2020 @01:12PM (#23978119)
Ancient, unsupported, and shrinking as older devices are broken or unused and no new device is built. There aren’t many reasons to target 32-bit iPhones, unless it’s a hobby.
Re:OCaml: Add support to iOS/Mac ARM64 by saagarjha on Tuesday July 28, 2020 @01:15PM (#23978149)
32-bit iPhones run iOS 10, so if you have a deployment target set that far back you should support them.
Re:OCaml: Add support to iOS/Mac ARM64 by kergonath on Wednesday July 29, 2020 @03:21PM (#23990575)
Right, I meant in the context of bringing Open Source tools to 32-bit ARM platforms. I don't think the people holding on to their iPhone 5Cs would bother with OCaml. Of course, if a hacker wants to do it, it's great.
Re:OCaml: Add support to iOS/Mac ARM64 by wczekalski on Tuesday July 28, 2020 @02:08PM (#23978849)
I too am typing it from a 2015 computer.
Re:OCaml: Add support to iOS/Mac ARM64 by petre on Tuesday July 28, 2020 @05:59PM (#23981119)
It's not just about electronic waste, many low power embedded platforms are still ARM 32 bit.
Re:OCaml: Add support to iOS/Mac ARM64 by babaganooj on Tuesday July 28, 2020 @01:05PM (#23978013)
I have this vague idea, which can be completely false, that porting software that runs on ARM64 Linux (which is what cloud servers use) to Mac ARM64 (which I think is BSD derived?) is not trivial. Or is it?
Re:OCaml: Add support to iOS/Mac ARM64 by saagarjha on Tuesday July 28, 2020 @01:14PM (#23978139)
Depends on the kind of software. POSIX compatible C requires few, if any, source changes. Code that makes direct syscalls will need more work.
Re:OCaml: Add support to iOS/Mac ARM64 by DCKing on Tuesday July 28, 2020 @01:24PM (#23978288)
It's worth pointing out that MacPorts still has a lot of modern tools and utilities working for PowerPC Macs. This is despite PowerPC Macs being 'officially' stuck on GCC 4.2 (unless you install newer... through MacPorts), ancient Mac OS X frameworks and barely any developers have a PowerPC machine at hand (because why would they).
Re:OCaml: Add support to iOS/Mac ARM64 by saagarjha on Tuesday July 28, 2020 @01:30PM (#23978378)
MacPorts also mostly supports Apple silicon. It's pretty cool!
Re:OCaml: Add support to iOS/Mac ARM64 by lmm on Tuesday July 28, 2020 @10:17PM (#23982883)
In the general case it's not necessarily trivial, just like porting software from x86 linux to x86 mac is not necessarily trivial. For example your software might rely on some system interface that's done differently on those platforms, e.g. if you're using kprobes then it would take an effort to port that to use dtrace. And if we're talking about a GUI application then the framework it uses might not be first-class on mac, e.g. GTK only works in an X11-based way. But there are cases where it's as simple as pushing the compile button and getting out something working.
Re:OCaml: Add support to iOS/Mac ARM64 by monadic2 on Tuesday July 28, 2020 @03:50PM (#23979935)
Hah, and arm servers were already gaining an economic edge before Apple’s consumer product switch.