On Thursday, 6 April 2017 at 05:32:41 UTC, rikki cattermole wrote:
IMO there is two things that need to be done to get D for
mobile:
1: ldc needs to natively target and distribute binaries for
Android (MIPS, ARM, at least).
I'm not sure what you mean by "natively target." Do you mean
that the shipping ldc compiler should come with Android/ARM
target support built in? That can be done, but it's useless
without a stdlib cross-compiled for the target and ldc doesn't
provide the cross-compiler scripts/toolchain with its releases
that would allow you to easily start cross-compiling, even though
the compiler itself is capable. Instead, I provide a
cross-compiler for linux/x64 that comes with a cross-compiled
stdlib for Android/ARM, and link to instructions on how to use it
with the Android NDK toolchain.
If you mean a native ldc compiler, that's already been done and
provided in the link above, ie a native ldc that you can run _on_
your Android device. That's what I use, since my development
hardware is an Android/ARM tablet (I have not used an x86 or x64
device in more than a year, instead renting out an x64 vps
recently to build the cross-compiler).
As for Android/MIPS, nobody uses it, just like Android/x86 now
that Intel has pulled out of the mobile market. No point.
2: extern(JNI) seriously, its a pain to work with Java over JNI
otherwise. It would be worse then not having extern(Obj-C).
I don't think it's that bad, but sure, we could always make it
easier.
On Thursday, 6 April 2017 at 09:39:05 UTC, kinke wrote:
More than anything else, we need the community to try building
mobile libraries and apps, because compiler support is largely
done.
What LDC would primarily need is a CI platform supporting ARM
(and ideally AArch64) in order to make it a true first-class
target. We don't know of a free CI platform, so ARM isn't
tested automatically, and it's currently mostly up to poor you
to check for regressions. ;(
Circle seems to have some Android support, though I don't know if
it's free, as Petar says:
https://circleci.com/docs/1.0/android/
I haven't been too inclined to look at this, as I've never messed
with these CI services and it's not a big deal to run the tests
myself occasionally. We should add CI for Android at some point
though, just one of the handful of tasks that it'd be nice if the
community would chip in with.
On Thursday, 6 April 2017 at 11:59:42 UTC, aberba wrote:
On Thursday, 6 April 2017 at 05:24:07 UTC, Joakim wrote:
That means this tidal wave of mobile swamping PCs is only
going to get worse:
That remains to be seen.
Notice the decline in PC sales since mobile took off on its
hockey stick curve? Now that they're even offering desktop-style
multiwindow on mobile, what makes you think it doesn't get worse?
I've predicted a collapse. Even Microsoft is selling the S8, a
flagship Android device (!), because they want to get their
office suite on Android:
https://www.thurrott.com/mobile/android/108140/microsoft-offering-customized-samsung-galaxy-s8-preorder
Even Microsoft has announced that they're taking another shot
at ARM, ie Windows is coming to ARM again, this time with x86
emulation for old Win32 apps:
http://www.theverge.com/2016/12/7/13866936/microsoft-windows-10-arm-desktop-apps-support-qualcomm
ARM is *rising*, that's true. But there is no factual evidence
in their decision (that you seem to know) backing your point.
Did you bother to read the article? The head of Windows, Terry
Myerson, specifically says, "Customers are asking for devices
with better battery life, with cellular connectivity. That's why
we've invested in this, and we're pretty excited to be announcing
it this week.” I'm not sure what other "factual evidence" you're
looking for.
Microsoft, Apple, Google, ... all invest in projects they end
up abandoning.
Are you suggesting that they will abandon Android or the iPhone
or just their desktop-on-mobile efforts? It is true that
multiwindow UIs on mobile is a nascent effort, and like anything
new may not go anywhere, but I wouldn't bet against it. In fact,
this entire thread argues that D should bet on it.
More than anything else, we need the community to try building
mobile libraries and apps, because compiler support is largely
done. We need to integrate mobile into our plans, rather than
it just being a sideline.
IoT, Cloud
IoT has not gone anywhere, while D already supports cloud.
The latter may seem far-fetched given D has not done that well
in desktop GUI apps, but mobile is still a new market and D
could do well. D is uniquely well-suited to mobile, because
it's nicer than Java or Obj-C while more efficient than the
former, and it could make it easier to go cross-platform.
Vadim has done some nice work building DLangUI on Android,
including a Tetris app that I spent half an hour playing on my
phone:
Any unpolished GUI toolkit (even when polished) will not sell
on android-iOS except for Games with custom drawn elements. C++
is in that same position. Google is busy pushing Java, Apple is
busy pushing Swift. DlangUI could work but will not land you a
big share in usage.
I'm not looking for big share, just a first step. Small share on
mobile is a lot bigger than big share on IoT/cloud.
I realize D is never going to have a polished devkit for
mobile unless a company steps up and charges for that work.
But we can do a lot better than the complacency from the
community we have now.
With the *rising* market for IoT and Cloud, the effort invested
in ARM should be geared towards these areas with much
potential. Canonical just gave up their Ubuntu Touch (Mobile
OS) and Unity 8 DE to invest their resources in Cloud and IoT.
Fighting for mobile apps market (except for WebGL/OpenGL/Vulkan
games), which big corporates like Microsoft are also in
fighting but losing doesn't seem like a good idea.
Irrelevant, as they were pushing entirely different mobile OS
platforms, while we're just talking about getting a language on
the currently dominant mobile platforms. The latter is much
easier.
IoT and Cloud entails ML, AI, NLP, embedded programming, bots,
microservices, containerization, robotics... which mir, vibe.d,
mqtt, and its projects are implementing some in bits.
The latter fields are mostly orthogonal to the first two
platforms you list, ie you can run any of those on most any
platform.
Thats what you can say has potential cus they are actually
*rising*
I am skeptical of IoT taking off anytime soon- witness the recent
DDoS from IoT devices- while we're already focused on cloud.
I think mobile needs focus because it dwarfs all those other
platforms in size, so even some small chunk of that moving to D
could be huge.
On Thursday, 6 April 2017 at 12:52:01 UTC, Adam D. Ruppe wrote:
On Thursday, 6 April 2017 at 05:24:07 UTC, Joakim wrote:
There are only two devs working on mobile, Dan and me, I don't
think anybody on the core team has even tried our work.
I don't even own a mobile device and don't see that changing
any time soon (they are really expensive, slow, and just
generally hard to use*). I do own a raspberry pi, but never
actually use anyway so I have no need to develop for it.
If I actually used one of these things, I'd probably join you
in hacking together stuff the way I've done web and desktop
libs, but I just don't use the hardware....
You're probably fairly unique in this even in this forum, but
unfortunately your comment does paint a picture of D devs being
disconnected from major current tech trends.
On Thursday, 6 April 2017 at 16:06:55 UTC, Radu wrote:
I think mobile would be nice, but there needs to be a good full
stack (game lib, UI lib, maybe both) packaged with the compiler
and runtime in order to get people attention.
We could probably put together a mobile devkit with DlangUI and
our other gamedev libraries. It's just going to take more than
just me doing it.
What I see as something that can be targeted from day one is
IoT, industrial controllers, cloud and other embedded/backend
platforms (I'm basically agreeing with aberba's post).
Others have tried D on embedded and reported problems with
stripping the runtiem down to perhaps even more constrained
hardware:
https://forum.dlang.org/post/ktqntaoewubgtbdgr...@forum.dlang.org
There is probably a niche of higher-powered embedded hardware
that D would do well on right now, maybe including your
situation, and as I noted in that thread, I don't know that it'd
take that much effort to strip D down more.
Given the many issues in the embedded market generally and how C
still dominates, I believe mobile is actually an easier sell,
though I'd like to see both happen some day.
I'm currently trying the armv5 platform, as you pointed out.
The possibilities are far more appealing for me to use the D
stack on Linux/Arm(Mips) as everything I know in the industrial
space uses this combination.
Being able to create software with a nicer language using nicer
libraries would be the "killer app" for an entire industry.
I think there is great potential and the proverbial
low-hanging-fruit here for getting stuff rolling.
I agree with you about D's potential in industrial use, though
I'd separate out IoT as not having gone anywhere yet.
Would be great if we could persuade the D foundation to sponsor
some Linux ARM/Mips CI infrastructure, I know I would pitch in
my 2 cents for the cause.
This infrastructure could be used by LDC and GDC and be
extended in the future.
As I noted above, there may be free services for open-source
projects that we're overlooking.
On Thursday, 6 April 2017 at 22:28:20 UTC, Dmitry Olshansky wrote:
On 4/6/17 7:24 AM, Joakim wrote:
I have been saying for some time now that mobile is going to
go after
the desktop next
(http://forum.dlang.org/thread/rionbqmtrwyenmhmm...@forum.dlang.org),
Samsung just announced it, for a flagship device that will
ship tens of
millions:
[snip]
The latter may seem far-fetched given D has not done that well
in
desktop GUI apps, but mobile is still a new market and D could
do well.
D is uniquely well-suited to mobile, because it's nicer than
Java or
Obj-C while more efficient than the former, and it could make
it easier
to go cross-platform.
Let's not forget Kotlin and Swift, things we'd really be
competing against - that is the other NEW stuff.
Kotlin runs on the JVM, so it's not going to be as efficient,
while Swift has not been ported to Android.
Also let's not forget the _legion_ of tools that let you do
cross-platform mobile app development in languages such as
JavaScript, Lua and e.g. C#.
Except for C# to some extent, only because they are now investing
much more on mobile tooling, I would not call any of those as
nice to use or as efficient as D. Mobile is a big market with a
lot of dev options, but I believe D could make a unique pitch.
Vadim has done some nice work building DLangUI on Android,
including a
Tetris app that I spent half an hour playing on my phone:
http://forum.dlang.org/thread/cdekkumjynhqoxvmg...@forum.dlang.org
I realize D is never going to have a polished devkit for
mobile unless a
company steps up and charges for that work. But we can do a
lot better
than the complacency from the community we have now.
Much as I like D I would admit that even Desktop/Server
developer experience is far from stellar. Now switching to
mobile the expectations of mobile developers are much higher -
they want a ready made development environment, full support of
platform APIs, thousands of examples, ready made GUI
components, tons of documentation, perfect support for all
manner of proprietary tools such as code signing, emulators,
you name it. Anything short of completely polished devkit is
not going to succeed.
In that case, even Apple and google's efforts have not succeeded,
as I've heard lots of bitching on all those fronts for the
official mobile devkits. ;) Take the Android NDK, which has long
been neglected for everything you list, though that may be
partially because they want to discourage its use, in favor of
Java.
D is never going to attract the crowd that wants everything
"ready made," but we can make a much better effort at attracting
the mobile niches that want D's advantages.
Most importantly though we would need to change the perception:
trying to be a D mobile app developer is doubly niche - first
because of D, second being an alien in mobile development.
Yes, D is niche, but niche efforts have to focus on small markets
where they're uniquely suited or giant markets where they can
attract some small share by being different, small share that is
still worthwhile because it's a much larger market. I'm
suggesting mobile is the latter opportunity for D.
As for "being an alien," eh, we can make it fit. As you yourself
said, there are many other languages jockeying for position on
mobile, it's not all just Java and Obj-C.