September 11, 2018
On Tuesday, 11 September 2018 at 06:42:26 UTC, Chris wrote:
> On Monday, 10 September 2018 at 19:28:01 UTC, aberba wrote:
>> On Monday, 10 September 2018 at 16:09:41 UTC, rjframe wrote:
>
>>
>> That's exactly whats happening in Africa. The continent is leapfrogging from nothing to a smart phone thanks to China. Many don'[t know how to even use a PC. Especially the young and upcoming generation.
>>
>> The smart phone market is really significant.
>
> That's why I'm trying to draw attention to first class ARM support by the D Foundation (not just some voluntary efforts, much as they are appreciated). ARM in dmd wouldn't be a bad idea perhaps, as Manu suggested. It's become more than obvious over the last couple of years that mobile devices have become very important and that people often use them instead of PCs or laptops. Fewer and fewer developers can "escape" development for mobile ("we want an app too"), and if a language doesn't offer first class support for mobile, then devs won't bother with it. A lot of other (new) languages are directing their efforts towards mobile for a reason.

I agree with a lot of what you say here, but I'm not sure what you mean by "first class support for mobile." What exactly do you believe D needs to reach that level?

I think most of the heavy lifting with core language and stdlib support is done. What remains is polish and integration for the build process and possibly IDEs and of course, making sure there are D libraries to make mobile dev easier.

I will be sporadically polishing the build process over the coming months, by getting much more building through dub. I won't be doing anything with IDEs, as I don't use them.

As for libraries, that all depends on what you're doing and how much others in the D community want that too.

It might be a good idea to set up a funding target to get the iOS port back up to speed again. I don't use Apple products so it won't be me picking up that porting work, but maybe Dan could be enticed to finish it as a paid project, since he did most of the voluntary work so far. I'm purely speculating, no idea if money changes the equation for him, just know that he's been too busy to work on it for the last couple years.
September 11, 2018
On Monday, 10 September 2018 at 13:43:46 UTC, Joakim wrote:
> LDC recently added a linux/AArch64 CI for both its main branches and 64-bit ARM, ie AArch64, builds have been put out for both linux and Android. It does not seem that many are paying attention to this sea change that is going on with computing though, so let me lay out some evidence.
>
> At my workplace six years ago, the developers were all allocated a core i5 ultrabook- likely with 4 GBs of RAM and a 128 GB SSD, though I don't remember those specs- and a 27" 2560X1440 display with which to get our work done. I was pretty happy with the display, the best I'd ever used to that point. I'm guessing the setup cost my employer a couple thousand dollars per developer.
>
> I picked up an Android/AArch64 smartphone earlier this year, with 6 GBs of RAM, 128 GBs of flash, a Snapdragon 835 octa-core CPU, and a 5.5" 2560X1440 display. This is the fastest computer I've ever owned, and it fits in 6 cubic inches and weighs a little more than a third of a pound. It cost me approximately $700.
>
> That is a stunning change in mobile capabilities in just six years, where what used to be a mobile developer workstation now comes packed into a smartphone at a fraction of the cost.
>
> If you think the phone doesn't actually perform, I borrowed a 2015-model Macbook Air with a core i5 and 4 GBs of RAM and built the last pure C++ version of ldc, 0.17, using both cores with `-ninja -j5`. It took two minutes with clang from Homebrew, the same amount of time it takes me to build the same source on my smartphone with clang by running `ninja -j9`.
>
> This phone has been my development hardware since early this year, by pairing it with a $30 bluetooth keyboard and a $5 stand to hold it up. I'm typing this long forum post up on it now.
>
> Tech companies are starting to realize this and going after the desktop/laptop PC markets with various 64-bit ARM products:
>
> https://www.engadget.com/2018/08/09/samsung-galaxy-note-9-dex/
> https://arstechnica.com/gadgets/2018/08/samsungs-tab-s4-is-both-an-android-tablet-and-a-desktop-computer/
> https://youtube.com/watch?v=uLvIAskVSUM
> https://www.anandtech.com/show/13309/lenovo-yoga-c630-snapdragon-850-windows
>
> That last link notes 25 hours of battery life with a Windows/AArch64 laptop, one of the key benefits of ARM, which is why even Microsoft has come around.
>
> Yes, I know, these devices won't replace your quad-core Xeon workstation with 32-64 GBs of RAM anytime soon, but most people don't need anywhere near that level of compute. That's why PC sales keep dropping while mobile sales are now 6-7X that per year:
>
> https://www.businessinsider.com/PC-sales-are-continuing-to-slump-fewer-are-sold-now-than-when-the-iPhone-launched/articleshow/62547330.cms
> https://www.androidauthority.com/smartphone-sales-idc-2018-871363/
>
> Most of those mobile devices running iOS have AArch64 CPUs, and google said last December that "over 40% of Android devices coming online have 64-bit support," which is why they're requiring apps with native libraries to support it by next fall:
>
> https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
>
> D now has mostly working AArch64 support, with the ldc 1.11 release last month:
>
> https://github.com/ldc-developers/ldc/releases/tag/v1.11.0
>
> That is the result of years of intermittent AArch64 patches added by the core teams of ldc and gdc- David, Iain, Kai, Johannes, Dan, and others- to which I recently added some Android patches. You too can pitch in with the few remaining issues or try out the AArch64 support with your own D code.
>
> This company provides a free linux/AArch64 CI for OSS projects, LDC uses it:
>
> http://blog.shippable.com/shippable-arm-packet-deliver-native-ci-cd-for-arm-architecture
>
> Despite all this, D may never do very well on mobile or AArch64, even though I think it's well-suited for that market. But at the very least, you should be looking at mobile and AArch64, as they're taking over the computing market.

Is it possible to develop versus a NVidia Jetson, CUDA included?


September 11, 2018
On Tuesday, 11 September 2018 at 07:42:38 UTC, passenger wrote:
> On Monday, 10 September 2018 at 13:43:46 UTC, Joakim wrote:
>> [...]
>
> Is it possible to develop versus a NVidia Jetson, CUDA included?

I think so, but I doubt anyone has ever actually tried it:

https://www.nvidia.com/en-us/autonomous-machines/embedded-systems-dev-kits-modules/

As for CUDA, Nicholas Wilson said recently that he could do something with it for his DCompute project with ldc, but no idea what the current status is:

https://forum.dlang.org/post/slijjptlxdrfgvoyahsk@forum.dlang.org
September 11, 2018
On Tuesday, 11 September 2018 at 07:23:53 UTC, Joakim wrote:

>
> I agree with a lot of what you say here, but I'm not sure what you mean by "first class support for mobile." What exactly do you believe D needs to reach that level?

Basically the things you describe. I was thinking of a stable and easy build system, e.g.

$ dub init android [iOS]

$ dub --arch=arm64

And and of course check which language features work (or don't work!) on ARM and write a documentation.

Cf. https://kotlinlang.org/docs/reference/native-overview.html

The thing is that D already has a lot of useful stuff like C/C++ and Objective-C interop. It would be a pity if we didn't use it.

> I think most of the heavy lifting with core language and stdlib support is done. What remains is polish and integration for the build process and possibly IDEs and of course, making sure there are D libraries to make mobile dev easier.
>
> I will be sporadically polishing the build process over the coming months, by getting much more building through dub. I won't be doing anything with IDEs, as I don't use them.
>
> As for libraries, that all depends on what you're doing and how much others in the D community want that too.
>
> It might be a good idea to set up a funding target to get the iOS port back up to speed again. I don't use Apple products so it won't be me picking up that porting work, but maybe Dan could be enticed to finish it as a paid project, since he did most of the voluntary work so far. I'm purely speculating, no idea if money changes the equation for him, just know that he's been too busy to work on it for the last couple years.

That'd be part of the first class support. That a dedicated team works on it. Volunteers are not enough. Once it's polished it will still need loads of maintenance.
September 11, 2018
On Monday, 10 September 2018 at 13:43:46 UTC, Joakim wrote:
> LDC recently added a linux/AArch64 CI for both its main branches and 64-bit ARM, ie AArch64, builds have been put out for both linux and Android. It does not seem that many are paying attention to this sea change that is going on with computing though, so let me lay out some evidence. ...

I mostly agree with you, Joakim. I own a very nice (but now old) ODROID U2 (check the ODROID XU4 or C2!) so ARM support is important for me...

Also, check this: https://www.hardkernel.com/main/products/prdt_info.php?g_code=G152875062626

HOWEVER, I think Iain is right - PPC64 and RISC-V are becoming more and more popular nowadays and may become more popular than ARM in the future but that future is unclear.
September 11, 2018
On Tuesday, 11 September 2018 at 07:23:53 UTC, Joakim wrote:
> I agree with a lot of what you say here, but I'm not sure what you mean by "first class support for mobile." What exactly do you believe D needs to reach that level?

Natural-feeling bindings to platform libraries that are not incredibly slow and that are well-maintained. What does it matter that you can run a webserver from your phone if you can't write a "hello world" GUI program, set an alarm, or enqueue a download?
September 12, 2018
On 9/10/2018 9:43 AM, Joakim wrote:
> Yes, I know, these devices won't replace your quad-core Xeon workstation with 32-64 GBs of RAM anytime soon, but most people don't need anywhere near that level of compute. That's why PC sales keep dropping while mobile sales are now 6-7X that per year:
I'm all for supporting modern open CPU architectures. At the same time,
I fear that the specific trend you're describing here (people ditching
PCs for cellphones/tablets) is effectively a reversal of the PC revolution.

For the last 30+ years people benefited from "trickle down computing". They had access to PCs that were equivalent to cutting edge servers of 6-7 years prior. They had ability to choose their operating system, expand and upgrade their hardware and install any software they wanted.

All of this is breaking down right now.

Intel got lazy without competition and high-end CPU architectures stagnated. All the cutting-edge computing is done on NVidia cards today. It requires hundreds of gigabytes of RAM, tens of terabytes of data and usage of specialized computing libraries. I very much doubt this will "trickle down" to mobile in foreseeable future. Heck, most developer laptops today have no CUDA capabilities to speak of.

Moreover, mobile devices are locked down by default and it's no trivial task to break out of those walled gardens. IIRC, Apple has an official policy of not allowing programming tools in their app store. Alan Kay had to personally petition Steve Jobs to allow Scratch to be distributed, so kids could learn programming. I believe the general policy is still in place.

Android is better, but it's still a horror to do real work on, compared to any PC OS. Fine, you rooted it, installed some compilers and so on. How will you share your software with fellow Android users?

In essence, we are seeing the rapid widening of two digital divides. The first one is between users and average developers. The second one is between average developers and researchers at companies like Google. I very much doubt that we will see an equivalent of today's high-end machine learning server on user's desk, let alone in anyone's pocket, within 7 years.

My only hope is that newer AMD processors and popularity of VR rigs may help narrow these divides.
September 12, 2018
On Wednesday, 12 September 2018 at 06:41:38 UTC, Gambler wrote:
[snip]
>
> In essence, we are seeing the rapid widening of two digital divides. The first one is between users and average developers. The second one is between average developers and researchers at companies like Google. I very much doubt that we will see an equivalent of today's high-end machine learning server on user's desk, let alone in anyone's pocket, within 7 years.

I don't think it's necessarily gonna be like the late 80's PC "revolution" that led to ever more powerful machines being available to the average home user. But most definitely people are switching to mobile, especially because most phones are now powerful enough to do what people used PCs for: internet, email, streaming and even gaming. Then you have speech recognition and text to speech on Android and iOS which makes mobile phones attractive for the visually impaired, and it fits into your pocket. There may be additional benefits in places like Africa where you might not be able to set up PCs and laptops everywhere (which is true even of first world countries). Think of money transfer via apps. I think that's a huge thing in some places in Africa. It's not just about the processing power, it's about convenience. The first question you often hear is "Is there an app for it too?" And even if ARM is replaced someday, the mobile market will remain strong, just with a different architecture - and then D has to cater for that too.


September 12, 2018
On Tuesday, 11 September 2018 at 07:52:45 UTC, Joakim wrote:
> On Tuesday, 11 September 2018 at 07:42:38 UTC, passenger wrote:
>> On Monday, 10 September 2018 at 13:43:46 UTC, Joakim wrote:
>>> [...]
>>
>> Is it possible to develop versus a NVidia Jetson, CUDA included?
>
> I think so, but I doubt anyone has ever actually tried it:
>
> https://www.nvidia.com/en-us/autonomous-machines/embedded-systems-dev-kits-modules/
>
> As for CUDA, Nicholas Wilson said recently that he could do something with it for his DCompute project with ldc, but no idea what the current status is:
>
> https://forum.dlang.org/post/slijjptlxdrfgvoyahsk@forum.dlang.org

I'm about to release v0.2, ETA 1 week, with math functions and a API that asserts that you use it correctly (i.e. less reliant on driver error codes which is therefore easier to develop for).
September 12, 2018
On Tuesday, 11 September 2018 at 08:34:31 UTC, Chris wrote:
> On Tuesday, 11 September 2018 at 07:23:53 UTC, Joakim wrote:
>
>>
>> I agree with a lot of what you say here, but I'm not sure what you mean by "first class support for mobile." What exactly do you believe D needs to reach that level?
>
> Basically the things you describe. I was thinking of a stable and easy build system, e.g.
>
> $ dub init android [iOS]
>
> $ dub --arch=arm64

Yes, something like that should be done, but I won't be doing much with dub till next year. If anyone else is interested in doing it earlier, feel free.

> And and of course check which language features work (or don't work!) on ARM and write a documentation.
>
> Cf. https://kotlinlang.org/docs/reference/native-overview.html

I don't see any language features listed for Kotlin there, but ldc does have an AArch64 tracker issue, which lists what else needs to be done:

https://github.com/ldc-developers/ldc/issues/2153

>> It might be a good idea to set up a funding target to get the iOS port back up to speed again. I don't use Apple products so it won't be me picking up that porting work, but maybe Dan could be enticed to finish it as a paid project, since he did most of the voluntary work so far. I'm purely speculating, no idea if money changes the equation for him, just know that he's been too busy to work on it for the last couple years.
>
> That'd be part of the first class support. That a dedicated team works on it. Volunteers are not enough. Once it's polished it will still need loads of maintenance.

I don't think there's a "dedicated team" for any platform that D runs on, so we don't have "first class support" for any platform then.

D is largely a volunteer effort: if that's not enough, maybe D isn't right for you. This isn't Kotlin or Swift, where one of the largest companies in the world puts full-time devs on the language and gives everything away for free because it suits their agenda.

In Apple's case, that means Swift doesn't really support Android and definitely doesn't support Android/AArch64, because putting full-time devs on getting Swift working well with Android doesn't suit their agenda of pushing iOS:

https://github.com/apple/swift/blob/master/docs/Android.md
https://blog.readdle.com/why-we-use-swift-for-android-db449feeacaf

However, since Swift is largely open source, there is a small company that claims to have added Android/AArch64 support to the Swift compiler:

https://www.scade.io

Kotlin is becoming more cross-platform now since google is more cross-platform, but then you're depending on google continually funding development on an OSS project, which they've backed out of before:

https://arstechnica.com/gadgets/2018/07/googles-iron-grip-on-android-controlling-open-source-by-any-means-necessary/

I don't fault google for making those choices, as nobody has a right to their OSS contributions, but it is something to consider when using any platform, and even more so for an OSS project: who is funding this and why? Will their model be sustainable?

There are no easy answers here: if you want a free-priced, OSS toolchain, you're going to be marching to the beat of someone's drum.

As for ongoing maintenance, Android/ARM was done years ago and hasn't taken much in the way of maintenance to keep most of the stdlib/dmd tests passing, so I don't think that's much of an issue.

btw, it was a thread _you_ started that finally spurred me to begin this Android port five years back, though I'd enquired about and had been considering it earlier:

https://forum.dlang.org/thread/yhulkqvlwnxjklnogmfv@forum.dlang.org

On Tuesday, 11 September 2018 at 16:50:33 UTC, Dejan Lekic wrote:
> On Monday, 10 September 2018 at 13:43:46 UTC, Joakim wrote:
>> LDC recently added a linux/AArch64 CI for both its main branches and 64-bit ARM, ie AArch64, builds have been put out for both linux and Android. It does not seem that many are paying attention to this sea change that is going on with computing though, so let me lay out some evidence. ...
>
> I mostly agree with you, Joakim. I own a very nice (but now old) ODROID U2 (check the ODROID XU4 or C2!) so ARM support is important for me...
>
> Also, check this: https://www.hardkernel.com/main/products/prdt_info.php?g_code=G152875062626
>
> HOWEVER, I think Iain is right - PPC64 and RISC-V are becoming more and more popular nowadays and may become more popular than ARM in the future but that future is unclear.

If and when they do, I'm sure D and other languages will be ported to them, but right now they're most definitely not.

I know because I actually looked for a RISC-V VPS on which to port ldc and found nothing. Conversely, I was able to rent out an ARM Cubieboard2 remotely four years back when I was first getting ldc going on ARM:

https://forum.dlang.org/post/steigfwkywotxsyppvza@forum.dlang.org

I contacted one of the few companies putting out RISC-V dev boards, Sifive, a couple weeks ago with the suggestion of making available a paid RISC-V VPS, and one of their field engineers got back to me last week with a note that they're looking into it.

I think their model of having an open ISA with proprietary extensions will inevitably win out for hardware, just as a similar model has basically won already for software, but that doesn't mean that RISC-V will be the one to do it. Someone else might execute that model better.

On Tuesday, 11 September 2018 at 21:37:17 UTC, Neia Neutuladh wrote:
> On Tuesday, 11 September 2018 at 07:23:53 UTC, Joakim wrote:
>> I agree with a lot of what you say here, but I'm not sure what you mean by "first class support for mobile." What exactly do you believe D needs to reach that level?
>
> Natural-feeling bindings to platform libraries that are not incredibly slow and that are well-maintained. What does it matter that you can run a webserver from your phone if you can't write a "hello world" GUI program, set an alarm, or enqueue a download?

There are those who run the webserver as an app and reuse their webapp as a mobile app, since mobile always comes with a webview or browser. You can now do that with your vibe.d web app if you choose, I'd say that matters.

I don't think any other platform D supports has the type of "well-maintained" bindings you're asking for either, hasn't stopped those that want to use D.

I've got a bit better than "hello world," though that's there too, in the sample D apps in my android repo and the instructions in the wiki:

https://github.com/joakim-noah/android/tree/master/samples
https://wiki.dlang.org/Build_D_for_Android