February 02, 2012
On Sun, Jan 29, 2012 at 4:26 PM, J Arrizza <cppgent0@gmail.com> wrote:

>
> So another, better, question: Do you -- we -- want to make D a popular language or not?
>
> If not, that implies one set of development and architectural strategies.
>  If yes, it implies another set. The two sets have some but little
> intersection. And that means you have to choose the end goal you want now
> and, once chosen, you have to stick to it.
>
>
No response to this?

I currently have an embedded Java application running on an ARM. I am
looking for a replacement language and  associated libraries, specifically
a GUI. I need the user responsiveness to be fast and I need to have a few
extra cycles free to eventually do some graphing, all on
an under-powered processor.

I chose Java for this device because I didn't want to divert my developers
re-inventing the wheel or playing the "match the library versions" game.
The JDK is big and it's clean. It is self-consistent. Java is a
simple language, there is no struggling with odd obscure error messages or
compiler errors. There is a huge breadth and depth of community support.

For the current device, using Java has paid off hugely. It's easy to develop in, it was easy to set up and the developers have been able to concentrate on the application (the thing we get paid to write and deliver). If we need some utility or functionality, chances are it's already been written and debugged over many years and by millions of people.

The down side is Java is slow. That's why I'm looking at D. I need a fast, efficient language that is strongly OO and has a gc. There must be GUI support that does not use X (and 3 or 4 other layers) on an ARM processor running embedded linux. It has to cross-compile because we simulate the device and debug on our workstations. D looks like a custom fit for this situation!

On the other hand D is facing a catch-22. It can't get a full suite of support code, IDEs, etc until its popular and it won't get popular until it gets all of that ready to go up-front. The only solution is to leap-frog using existing technology on an already popular platform.

The Android GUI libraries provide two things towards that end: a platform for D to take off from and the beginnings of debugged GUI code. The popularity of Android will pull D along with it, especially if D can find a niche in the needs of those Android application developers who want speed. As D's relevant libraries fill out, there will be less and less a need to use Java and it will gradually take over as the predominant language for serious apps on Android.

So... Will D and Android GUI libraries be able to replace Java in the next two years? Is there a commitment or direction towards that end?

John


February 02, 2012
On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
>
> So... Will D and Android GUI libraries be able to replace Java in the next two years? Is there a commitment or direction towards that end?
>

Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
February 02, 2012
On Thu, Feb 02, 2012 at 06:50:42AM -0800, J Arrizza wrote: [...]
> So... Will D and Android GUI libraries be able to replace Java in the next two years? Is there a commitment or direction towards that end?
[...]

Somebody just has to do it. IMNSHO, talking about it isn't going to accomplish much. It's up to the community to produce the library/set of libraries that will allow easy development in D for Android. If nobody is currently committed to do it, then somebody should take the initiative to do it. Waiting around for "official" recognition will only waste time.

Just my $0.02.


T

-- 
"I suspect the best way to deal with procrastination is to put off the procrastination itself until later. I've been meaning to try this, but haven't gotten around to it yet. " -- swr
February 02, 2012
On 2 February 2012 17:18, Iain Buclaw <ibuclaw@ubuntu.com> wrote:

> On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
> >
> > So... Will D and Android GUI libraries be able to replace Java in the
> next
> > two years? Is there a commitment or direction towards that end?
> >
>
> Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.


Have you experimented with the android toolchain? Successfully built a GDC
for it?
I'm keen to get on with it the moment a working toolchain appears,
regardless if druntime/phobos builds/works.


February 02, 2012
On 2 February 2012 18:10, Manu <turkeyman@gmail.com> wrote:
> On 2 February 2012 17:18, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
>>
>> On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
>> >
>> > So... Will D and Android GUI libraries be able to replace Java in the
>> > next
>> > two years? Is there a commitment or direction towards that end?
>> >
>>
>> Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.
>
>
> Have you experimented with the android toolchain? Successfully built a GDC
> for it?
> I'm keen to get on with it the moment a working toolchain appears,
> regardless if druntime/phobos builds/works.

As soon as I've got some things off my plate with getting GDC out the door. I intend to get it going on my Android and my ARM7 plug. :)

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
February 02, 2012
On 2 February 2012 18:54, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> On 2 February 2012 18:10, Manu <turkeyman@gmail.com> wrote:
>> On 2 February 2012 17:18, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
>>>
>>> On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
>>> >
>>> > So... Will D and Android GUI libraries be able to replace Java in the
>>> > next
>>> > two years? Is there a commitment or direction towards that end?
>>> >
>>>
>>> Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.
>>
>>
>> Have you experimented with the android toolchain? Successfully built a GDC
>> for it?
>> I'm keen to get on with it the moment a working toolchain appears,
>> regardless if druntime/phobos builds/works.
>
> As soon as I've got some things off my plate with getting GDC out the door. I intend to get it going on my Android and my ARM7 plug. :)
>

To answer your question though, I have an old copy that worked on my ARM plug device back a few months ago when I started experimenting.  I intend to pick it back up soon though.



-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
February 02, 2012
On 2 February 2012 20:57, Iain Buclaw <ibuclaw@ubuntu.com> wrote:

> On 2 February 2012 18:54, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> > On 2 February 2012 18:10, Manu <turkeyman@gmail.com> wrote:
> >> On 2 February 2012 17:18, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> >>>
> >>> On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
> >>> >
> >>> > So... Will D and Android GUI libraries be able to replace Java in the
> >>> > next
> >>> > two years? Is there a commitment or direction towards that end?
> >>> >
> >>>
> >>> Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.
> >>
> >>
> >> Have you experimented with the android toolchain? Successfully built a
> GDC
> >> for it?
> >> I'm keen to get on with it the moment a working toolchain appears,
> >> regardless if druntime/phobos builds/works.
> >
> > As soon as I've got some things off my plate with getting GDC out the door. I intend to get it going on my Android and my ARM7 plug. :)
> >
>
> To answer your question though, I have an old copy that worked on my ARM plug device back a few months ago when I started experimenting.  I intend to pick it back up soon though.


Is the NDK's ARM7 toolchain modified in any way from stock GCC? why do they provide their own toolchain? shouldn't they just build it from GCC main?


February 02, 2012
Am Thu, 2 Feb 2012 22:28:19 +0200
schrieb Manu <turkeyman@gmail.com>:

> On 2 February 2012 20:57, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> 
> > On 2 February 2012 18:54, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> > > On 2 February 2012 18:10, Manu <turkeyman@gmail.com> wrote:
> > >> On 2 February 2012 17:18, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> > >>>
> > >>> On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
> > >>> >
> > >>> > So... Will D and Android GUI libraries be able to replace
> > >>> > Java in the next
> > >>> > two years? Is there a commitment or direction towards that
> > >>> > end?
> > >>> >
> > >>>
> > >>> Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.
> > >>
> > >>
> > >> Have you experimented with the android toolchain? Successfully built a
> > GDC
> > >> for it?
> > >> I'm keen to get on with it the moment a working toolchain
> > >> appears, regardless if druntime/phobos builds/works.
> > >
> > > As soon as I've got some things off my plate with getting GDC out the door. I intend to get it going on my Android and my ARM7 plug. :)
> > >
> >
> > To answer your question though, I have an old copy that worked on my
> > ARM plug device back a few months ago when I started
> > experimenting.  I intend to pick it back up soon though.
> 
> 
> Is the NDK's ARM7 toolchain modified in any way from stock GCC? why

Well, they have their own build systems/scripts (and those are not that easy to understand and they're huge). Cross compilers are usually built with such scripts (crosstool is a famous one, openembedded has some stuff too) as building them manually can be a pita.
> do they provide their own toolchain? shouldn't they just build it from GCC main?
> 
I guess you mean why they use different sources? They add some patches
to GCC, but afaik they try to upstream most of those now.
See /android-ndk-r7/build/tools/toolchain-patches/gcc/

Regarding toolchain binaries, you'll need special compiler/optimization flags depending on the processor you actually target. IIRC gcc also needs information about the C library your targeting and some kernel headers, so you'll need different binaries for different systems(eglibc glibc uclibc bionic), abis (arm-eabi-gcc, gnueabi). Android uses arm-eabi-gcc and their own bionic C library, while other linux based ARM systems usually use glibc and gnueabi.

BTW: when googling for the android ndk i found this:
http://michael.f1337.us/2011/11/19/rebuilding-the-android-ndk-for-objective-c-support/
this could actually be useful when trying to add D
support to the ndk.
February 03, 2012
On Thu, Feb 2, 2012 at 7:18 AM, Iain Buclaw <ibuclaw@ubuntu.com> wrote:

> On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
> >
> > So... Will D and Android GUI libraries be able to replace Java in the
> next
> > two years? Is there a commitment or direction towards that end?
> >
> Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.
>
> Iain,

A viable alternative will, in my opinion, pave the road (interstate?) towards eventually replacing Java. I currently use embedded Java (Jamvm & GNU classpath) and I am planning to move to Android when my project has some time. Others in my organization are already on board, it's just a matter of appropriate timing in the project.

I like to believe I made a  rational choice with Java and I also like to believe that moving to Android and the dalvik JVM is an even better rational choice and so, again,  it is very likely that others are  making the same choices.

And there is strong evidence Android has been chosen in the current wave of
devices. I've been looking at Android for the last couple of years, and
this was front page news recently:
http://www.medicalelectronicsdesign.com/article/android-best-operating-system-choice-many-medical-applications

I also know I am very dissatisfied with Java's speed and so it is very likely others are dissatisfied too. They will be or already looking for a replacement.

If D is ready, it will be snapped up. I think most embedded device people who went to Java are ex-C/C++ (as I am) and even though the benefits are huge, Java's slow speed grates on their nerves (like it does mine). D is the next logical step.

I have only a few hours a week to dedicate to this but if you can give me some instructions & downloads, I'd like to try whatever you have.

John


February 04, 2012
Am Thu, 2 Feb 2012 20:10:55 +0200
schrieb Manu <turkeyman@gmail.com>:

> On 2 February 2012 17:18, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> 
> > On 2 February 2012 14:50, J Arrizza <cppgent0@gmail.com> wrote:
> > >
> > > So... Will D and Android GUI libraries be able to replace Java in the
> > next
> > > two years? Is there a commitment or direction towards that end?
> > >
> >
> > Not replace, but it is my goal to certainly have it a viable alternative, just as you could alternatively use C/C++ on Android instead of Java.
> 
> 
> Have you experimented with the android toolchain? Successfully built
> a GDC for it?
> I'm keen to get on with it the moment a working toolchain appears,
> regardless if druntime/phobos builds/works.
> 

Here's a toolchain, can't guarantee that it works though ;-)
http://www.mediafire.com/?i5at6mlzo60y4
(linux only, 32bit)

Couldn't test the toolchain in any way yet. I think to compile you'll
need to uses the --sysroot switch:
http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
and you'll have to use -fno-section-anchors of course.

A druntime build is included, but it maybe won't work at all.