Re: DIP 1003 (Remove body as a Keyword) Accepted!

2017-06-02 Thread MysticZach via Digitalmars-d-announce

On Friday, 2 June 2017 at 14:17:10 UTC, Mike Parker wrote:
Congratulations are in order for Jared Hanson. Walter and 
Andrei have approved his proposal to remove body as a keyword. 
I've added a summary of their decision to the end of the DIP 
for anyone who cares to read it. In short:


* body temporarily becomes a contextual keyword and is 
deprecated

* do is immediately allowed in its place
* body is removed and do replaces it fully

Congratulations, Jared!

https://github.com/dlang/DIPs/blob/master/DIPs/DIP1003.md


Yes, congratulations are in order. Although those of us who were 
questioning the need for any keyword at all in `body`s place may 
be a little disappointed that it has merely been replaced with 
`do`, I think no one can doubt the main thrust of the DIP, which 
is that `body` is an incredibly useful identifier, and that 
having it newly available makes D a better language.


Also, I've been following the forums for several years now, and 
this is the first DIP that I know of that was not written by the 
language authors, and yet was still accepted into the language. 
Correct me if I'm wrong, but that seems like a real landmark!


Also Mike Parker seems to be doing a very good job in his 
appointed position as DIP manager.




Re: DIP 1003 (Remove body as a Keyword) Accepted!

2017-06-02 Thread Jack Stouffer via Digitalmars-d-announce

On Friday, 2 June 2017 at 14:17:10 UTC, Mike Parker wrote:

Congratulations, Jared!

https://github.com/dlang/DIPs/blob/master/DIPs/DIP1003.md


Congratulations.

I recommend a longer deprecation cycle than usual for this, as 
this will break many legacy libraries that don't get maintained 
often. A period of two years sounds about right.


Re: D for Android beta

2017-06-02 Thread Jonathan M Davis via Digitalmars-d-announce
On Thursday, June 01, 2017 19:31:28 Joakim via Digitalmars-d-announce wrote:
> The beta release of ldc 1.3, the llvm-based D compiler, is now
> out:
>
> https://github.com/joakim-noah/android/releases
>
> It is accompanied by a non-trivial sample app from the Android
> NDK, ported from C++ to about 1.2 klocs of D: the classic Utah
> Teapot (https://en.wikipedia.org/wiki/Utah_teapot), updated with
> mobile touch controls.  This app also demonstrates calling Java
> functions from your D code through JNI, though most of it is
> written in D.
>
> There are two builds of ldc, a cross-compiler that you can use
> from a linux/x64 shell to compile to Android/ARM, and a native
> compiler that you can run on your Android device itself.  As I
> pointed out last year, not only is ldc a large mixed D/C++
> codebase that just worked on ARM, but it is possible to build
> arbitrarily large Android apps on your Android device itself, a
> first for any mobile platform:
>
> http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org
>
> This is the way the next generation of coders will get into
> coding, by tinkering with their Android devices like we did with
> Macs and PCs decades ago, and D is one the few languages that is
> already there.
>
> I will write up instructions on how to write an Android app in D
> _on_ your Android device by using ldc and the Termux app, and get
> ldc into the Termux packages, a package repository for Android:
>
> https://play.google.com/store/apps/details?id=com.termux=en

Yay! I keep meaning to check out programming for Android, but as with far
too many things, I never get around to it. But if I program for something
like Android, I'd definitely prefer to be doing it in D. A huge thanks to
you and everyone else who's worked on this!

- Jonathan M Davis



Re: D for Android beta

2017-06-02 Thread Joakim via Digitalmars-d-announce

On Thursday, 1 June 2017 at 19:45:17 UTC, Ali Çehreli wrote:

Very exciting! :)

On 06/01/2017 12:31 PM, Joakim wrote:

> I will write up instructions on how to write an Android app
in D _on_
> your Android device

I hope it will be detailed enough for people who are very new 
to programming on the Android.


Yes, the goal is to document all the steps, like I do on the wiki 
for cross-compiling now, but more so because it's completely new 
to most and requires a few more steps than the official NDK/SDK.  
But the official NDK requires using or mimicking their build 
system and the SDK can be a bear to setup, as they give you a ton 
of stuff like an IDE and emulators, so this might actually be 
easier overall.


On Thursday, 1 June 2017 at 21:54:59 UTC, Johan Engelen wrote:

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:

[awesome text]


This is great stuff Joakim!
It's very nice to see your detailed release notes, with links 
to the patches. Hope we can get much of that into LDC master 
soon.


There's not much left, the cross-compiler doesn't require any 
patches and the remaining tweaks to druntime/phobos are minimal.  
I'll get the last bits in, with the exception of that workaround 
in std.stdio for the regression specific to Android 5.0.


On Friday, 2 June 2017 at 00:00:17 UTC, Laeeth Isharc wrote:

Congratulations, Joakim!
https://www.reddit.com/r/programming/comments/6eqv46/write_mixed_dc_android_apps_even_build_them/
and news.ycombinator.com

Looking forward to termux.


Thanks for publicizing it, looks like you've started a discussion 
on reddit.


Re: SaveWip v2 Released

2017-06-02 Thread JamesD via Digitalmars-d-announce

On Friday, 2 June 2017 at 16:14:27 UTC, JamesD wrote:

If any interest, I can make a DUB package.

If you compile your source code frequently to check your work 
while learning a new language, for example the D language, then 
saveWip is for you!


[...]


The link on GitHub:

https://github.com/jasc2v8/saveWip



SaveWip v2 Released

2017-06-02 Thread JamesD via Digitalmars-d-announce

If any interest, I can make a DUB package.

If you compile your source code frequently to check your work 
while learning a new language, for example the D language, then 
saveWip is for you!


Saves source files to a work in progress folder with timestamp.

The timestamp file format is: wip\app.d_20170401_163556_6770.wip

Intended to be used as a Pre-Build command in your favorite IDE.

Saves your work before building and makes it easy to recover from 
coding misakes or revert portions of your code to an earlier 
version.


Optionally, you may build the savewip.exe then save on your 
system PATH.


```
savewip -h

Saves source files to a work in progress folder with timestamp

Usage: saveWip  [file | folder | path/* [./src]] [-keep=#] 
[-list] [-quiet]


-l  --list List files without saving to wip
-k  --keep Keep # versions in wip, purge older files
-q --quiet Supress listing files saved to wip
-h  --help This help information.

The ./wip folder is created if not present
The ./src folder is used by default if the source file or folder 
is not specified


Wildcards not allowed for the file or folder
Wildcards are allowed for path/*.ext but not for path/file.*

```


DIP 1003 (Remove body as a Keyword) Accepted!

2017-06-02 Thread Mike Parker via Digitalmars-d-announce
Congratulations are in order for Jared Hanson. Walter and Andrei 
have approved his proposal to remove body as a keyword. I've 
added a summary of their decision to the end of the DIP for 
anyone who cares to read it. In short:


* body temporarily becomes a contextual keyword and is deprecated
* do is immediately allowed in its place
* body is removed and do replaces it fully

Congratulations, Jared!

https://github.com/dlang/DIPs/blob/master/DIPs/DIP1003.md




Re: Release D 2.074.1

2017-06-02 Thread Jacob Carlborg via Digitalmars-d-announce

On 2017-06-01 23:04, Martin Nowak wrote:

Glad to announce D 2.074.1.

http://dlang.org/download.html

This point release fixes a few issues over 2.074.0, see the changelog
for more details.

http://dlang.org/changelog/2.074.1.html


Any progress on the remaining regressions [1]?

[1] 
https://issues.dlang.org/buglist.cgi?quicksearch=%5BREG%202.074.0%5D_id=215151


--
/Jacob Carlborg


Re: D for Android beta

2017-06-02 Thread Joakim via Digitalmars-d-announce
On Friday, 2 June 2017 at 10:40:48 UTC, Petar Kirov [ZombineDev] 
wrote:

On Friday, 2 June 2017 at 10:12:27 UTC, Joakim wrote:
On Friday, 2 June 2017 at 09:39:46 UTC, Petar Kirov 
[ZombineDev] wrote:

On Friday, 2 June 2017 at 08:58:01 UTC, Joakim wrote:

On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote:

[...]


I'd guess that's the issue, as I haven't tested against 
those older versions of Android and this app links against 
Android API 21, ie 5.0 Lollipop:


https://github.com/joakim-noah/android/blob/master/samples/Teapot/build-apk#L17

I'm pretty sure it'd work for your older Android versions if 
built slightly differently, as I used to support back to 
Android API 9 until a couple months ago:


https://gist.github.com/joakim-noah/f475b0be37b3834b4e50d68996b6ee1d#file-ldc_1-1-0_android_arm-L3438

It can be still made to so but I set API 21 as the minimum, 
because anything older has been declining for some time now:


http://blog.davidecoppola.com/2016/12/android-version-distribution-history-visualization-2012-2016/


Just FYI, I have the same issue with Android 6.0.1.


Hmm, is that the 64-bit Xiaomi device you mentioned in the 
github issues just now?


Yep

My guess there would be that it's because ldc only supports 
32-bit Android/ARM devices right now, and 64-bit devices like 
Xiaomi probably don't run 32-bit native Android libraries in 
their apps, though I don't know that for sure.  I just tried 
installing the teapot app on another 32-bit 6.0.1 phone that 
I'd never tried before, worked fine.


Running 32-bit apps on 64-bit Android, shouldn't be an issue as 
far I know. See:

https://stackoverflow.com/questions/30782848/how-to-use-32-bit-native-libraries-on-64-bit-android-device


64-bit ARMv8 hardware should run 32-bit ARMv7 binaries, but it 
depends on software support too, like providing the 32-bit system 
shared libraries that this 32-bit teapot shared library links 
against.  I found that SO link inconclusive, but I just found 
this blog post from a couple years ago that says that it depends 
on the device:


https://ph0b.com/android-abis-and-so-files/

With your 64-bit device, either it doesn't list ARMv7 as a 
supported ABI or there's some bug that's stopping it from running 
this 32-bit ARMv7 library on ARMv8.


This is not an issue for Java, because the Android runtime 
compiles Java bytecode to native code _after_ the app is 
downloaded, but other languages have to provide pre-compiled 
libraries for each CPU architecture.  Not a big deal as there 
are only really two in wide deployment, 32-bit and 64-bit ARM, 
with the vast majority 32-bit right now.


Perhaps you can help us get on 64-bit ARM, as you mentioned in 
the github issues.


Yes, ultimately I'm interested in writing a Vulkan library that 
runs on both 32 and 64-bit Linux, Windows and Android, so I'm 
interested in helping with the AArch64 support too, though my 
compiler-foo is pretty slim. As mentioned in the GH issue [0], 
what do I need to bootstrap LDC on Android?


[0]: https://github.com/joakim-noah/android/issues/10


I've followed up on github, we can discuss there.


Re: D for Android beta

2017-06-02 Thread via Digitalmars-d-announce

On Friday, 2 June 2017 at 10:12:27 UTC, Joakim wrote:
On Friday, 2 June 2017 at 09:39:46 UTC, Petar Kirov 
[ZombineDev] wrote:

On Friday, 2 June 2017 at 08:58:01 UTC, Joakim wrote:

On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote:

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
The beta release of ldc 1.3, the llvm-based D compiler, is 
now out:


https://github.com/joakim-noah/android/releases

It is accompanied by a non-trivial sample app from the 
Android NDK, ported from C++ to about 1.2 klocs of D: the 
classic Utah Teapot 
(https://en.wikipedia.org/wiki/Utah_teapot), updated with 
mobile touch controls.  This app also demonstrates calling 
Java functions from your D code through JNI, though most of 
it is written in D.


There are two builds of ldc, a cross-compiler that you can 
use from a linux/x64 shell to compile to Android/ARM, and a 
native compiler that you can run on your Android device 
itself.  As I pointed out last year, not only is ldc a 
large mixed D/C++ codebase that just worked on ARM, but it 
is possible to build arbitrarily large Android apps on your 
Android device itself, a first for any mobile platform:


http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org

This is the way the next generation of coders will get into 
coding, by tinkering with their Android devices like we did 
with Macs and PCs decades ago, and D is one the few 
languages that is already there.


I will write up instructions on how to write an Android app 
in D _on_ your Android device by using ldc and the Termux 
app, and get ldc into the Termux packages, a package 
repository for Android:


https://play.google.com/store/apps/details?id=com.termux=en


Hello,

Thanks for the post. I have tried to run apk on 2 devices:
1. LG-E440 phone with Android 4.1.2
2. Orange Pi Lite (development board with Allwinner H3 CPU) 
Android 4.4.2


On both devices there was only gray rectangle with "Teapot" 
notification at the bottom for about a sec and then in upper 
left corner the FPS info (around 60 on both devices), but 
without any graphic. I have tried taping, dragging etc.


Are Android versions a problem or it could be something else?

Thanks in advance.


I'd guess that's the issue, as I haven't tested against those 
older versions of Android and this app links against Android 
API 21, ie 5.0 Lollipop:


https://github.com/joakim-noah/android/blob/master/samples/Teapot/build-apk#L17

I'm pretty sure it'd work for your older Android versions if 
built slightly differently, as I used to support back to 
Android API 9 until a couple months ago:


https://gist.github.com/joakim-noah/f475b0be37b3834b4e50d68996b6ee1d#file-ldc_1-1-0_android_arm-L3438

It can be still made to so but I set API 21 as the minimum, 
because anything older has been declining for some time now:


http://blog.davidecoppola.com/2016/12/android-version-distribution-history-visualization-2012-2016/


Just FYI, I have the same issue with Android 6.0.1.


Hmm, is that the 64-bit Xiaomi device you mentioned in the 
github issues just now?


Yep

My guess there would be that it's because ldc only supports 
32-bit Android/ARM devices right now, and 64-bit devices like 
Xiaomi probably don't run 32-bit native Android libraries in 
their apps, though I don't know that for sure.  I just tried 
installing the teapot app on another 32-bit 6.0.1 phone that 
I'd never tried before, worked fine.


Running 32-bit apps on 64-bit Android, shouldn't be an issue as 
far I know. See:

https://stackoverflow.com/questions/30782848/how-to-use-32-bit-native-libraries-on-64-bit-android-device

This is not an issue for Java, because the Android runtime 
compiles Java bytecode to native code _after_ the app is 
downloaded, but other languages have to provide pre-compiled 
libraries for each CPU architecture.  Not a big deal as there 
are only really two in wide deployment, 32-bit and 64-bit ARM, 
with the vast majority 32-bit right now.


Perhaps you can help us get on 64-bit ARM, as you mentioned in 
the github issues.


Yes, ultimately I'm interested in writing a Vulkan library that 
runs on both 32 and 64-bit Linux, Windows and Android, so I'm 
interested in helping with the AArch64 support too, though my 
compiler-foo is pretty slim. As mentioned in the GH issue [0], 
what do I need to bootstrap LDC on Android?


[0]: https://github.com/joakim-noah/android/issues/10



Re: D IDE Coedit, version 3 update 2 released

2017-06-02 Thread Basile B. via Digitalmars-d-announce

On Friday, 2 June 2017 at 10:03:25 UTC, Basile B. wrote:

On Friday, 2 June 2017 at 07:24:02 UTC, Basile B. wrote:

Times change.


Sorry but i've forgotten to remove a SLOC written for debugging:

https://github.com/BBasile/Coedit/commit/5fc8ea57b34e91e31e901559e40f8ddd74cec873#diff-3fccc6fc5d25b2ff883979f6bfcd04adR2624

Gotta update everything (Sh*t).


Done. Unfortunately anyone who's updated during the last 4 hours 
has to reinstall.
If not what will happen is that you'll get an exception after 
pressing ENTER inside a DDOC comment and if an option is 
activated to auto insert leading */+s.





Re: D for Android beta

2017-06-02 Thread Joakim via Digitalmars-d-announce
On Friday, 2 June 2017 at 09:39:46 UTC, Petar Kirov [ZombineDev] 
wrote:

On Friday, 2 June 2017 at 08:58:01 UTC, Joakim wrote:

On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote:

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
The beta release of ldc 1.3, the llvm-based D compiler, is 
now out:


https://github.com/joakim-noah/android/releases

It is accompanied by a non-trivial sample app from the 
Android NDK, ported from C++ to about 1.2 klocs of D: the 
classic Utah Teapot 
(https://en.wikipedia.org/wiki/Utah_teapot), updated with 
mobile touch controls.  This app also demonstrates calling 
Java functions from your D code through JNI, though most of 
it is written in D.


There are two builds of ldc, a cross-compiler that you can 
use from a linux/x64 shell to compile to Android/ARM, and a 
native compiler that you can run on your Android device 
itself.  As I pointed out last year, not only is ldc a large 
mixed D/C++ codebase that just worked on ARM, but it is 
possible to build arbitrarily large Android apps on your 
Android device itself, a first for any mobile platform:


http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org

This is the way the next generation of coders will get into 
coding, by tinkering with their Android devices like we did 
with Macs and PCs decades ago, and D is one the few 
languages that is already there.


I will write up instructions on how to write an Android app 
in D _on_ your Android device by using ldc and the Termux 
app, and get ldc into the Termux packages, a package 
repository for Android:


https://play.google.com/store/apps/details?id=com.termux=en


Hello,

Thanks for the post. I have tried to run apk on 2 devices:
1. LG-E440 phone with Android 4.1.2
2. Orange Pi Lite (development board with Allwinner H3 CPU) 
Android 4.4.2


On both devices there was only gray rectangle with "Teapot" 
notification at the bottom for about a sec and then in upper 
left corner the FPS info (around 60 on both devices), but 
without any graphic. I have tried taping, dragging etc.


Are Android versions a problem or it could be something else?

Thanks in advance.


I'd guess that's the issue, as I haven't tested against those 
older versions of Android and this app links against Android 
API 21, ie 5.0 Lollipop:


https://github.com/joakim-noah/android/blob/master/samples/Teapot/build-apk#L17

I'm pretty sure it'd work for your older Android versions if 
built slightly differently, as I used to support back to 
Android API 9 until a couple months ago:


https://gist.github.com/joakim-noah/f475b0be37b3834b4e50d68996b6ee1d#file-ldc_1-1-0_android_arm-L3438

It can be still made to so but I set API 21 as the minimum, 
because anything older has been declining for some time now:


http://blog.davidecoppola.com/2016/12/android-version-distribution-history-visualization-2012-2016/


Just FYI, I have the same issue with Android 6.0.1.


Hmm, is that the 64-bit Xiaomi device you mentioned in the github 
issues just now?  My guess there would be that it's because ldc 
only supports 32-bit Android/ARM devices right now, and 64-bit 
devices like Xiaomi probably don't run 32-bit native Android 
libraries in their apps, though I don't know that for sure.  I 
just tried installing the teapot app on another 32-bit 6.0.1 
phone that I'd never tried before, worked fine.


This is not an issue for Java, because the Android runtime 
compiles Java bytecode to native code _after_ the app is 
downloaded, but other languages have to provide pre-compiled 
libraries for each CPU architecture.  Not a big deal as there are 
only really two in wide deployment, 32-bit and 64-bit ARM, with 
the vast majority 32-bit right now.


Perhaps you can help us get on 64-bit ARM, as you mentioned in 
the github issues.


Re: D IDE Coedit, version 3 update 2 released

2017-06-02 Thread Basile B. via Digitalmars-d-announce

On Friday, 2 June 2017 at 07:24:02 UTC, Basile B. wrote:
Very small update. The Changes won't be noticeable unless 
you're an hardcore user like me.


https://github.com/BBasile/Coedit/releases/tag/3_update_2
https://github.com/BBasile/Coedit


off topic:
==
I've recently discovered that CE downloads for linux are now 
more important than Windows's one. For example if you look at 
the  "3_gold" count on this page: 
http://www.somsubhra.com/github-release-stats/?username=BBasile=Coedit,

there are about 1000 dls for linux vs 500 for Windows !

Times change.


Sorry but i've forgotten to remove a SLOC written for debugging:

https://github.com/BBasile/Coedit/commit/5fc8ea57b34e91e31e901559e40f8ddd74cec873#diff-3fccc6fc5d25b2ff883979f6bfcd04adR2624

Gotta update everything (Sh*t).


Re: D for Android beta

2017-06-02 Thread Joakim via Digitalmars-d-announce

On Friday, 2 June 2017 at 08:58:01 UTC, Joakim wrote:

On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote:

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
The beta release of ldc 1.3, the llvm-based D compiler, is 
now out:


https://github.com/joakim-noah/android/releases

It is accompanied by a non-trivial sample app from the 
Android NDK, ported from C++ to about 1.2 klocs of D: the 
classic Utah Teapot 
(https://en.wikipedia.org/wiki/Utah_teapot), updated with 
mobile touch controls.  This app also demonstrates calling 
Java functions from your D code through JNI, though most of 
it is written in D.


There are two builds of ldc, a cross-compiler that you can 
use from a linux/x64 shell to compile to Android/ARM, and a 
native compiler that you can run on your Android device 
itself.  As I pointed out last year, not only is ldc a large 
mixed D/C++ codebase that just worked on ARM, but it is 
possible to build arbitrarily large Android apps on your 
Android device itself, a first for any mobile platform:


http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org

This is the way the next generation of coders will get into 
coding, by tinkering with their Android devices like we did 
with Macs and PCs decades ago, and D is one the few languages 
that is already there.


I will write up instructions on how to write an Android app 
in D _on_ your Android device by using ldc and the Termux 
app, and get ldc into the Termux packages, a package 
repository for Android:


https://play.google.com/store/apps/details?id=com.termux=en


Hello,

Thanks for the post. I have tried to run apk on 2 devices:
1. LG-E440 phone with Android 4.1.2
2. Orange Pi Lite (development board with Allwinner H3 CPU) 
Android 4.4.2


On both devices there was only gray rectangle with "Teapot" 
notification at the bottom for about a sec and then in upper 
left corner the FPS info (around 60 on both devices), but 
without any graphic. I have tried taping, dragging etc.


Are Android versions a problem or it could be something else?

Thanks in advance.


I'd guess that's the issue, as I haven't tested against those 
older versions of Android and this app links against Android 
API 21, ie 5.0 Lollipop:


https://github.com/joakim-noah/android/blob/master/samples/Teapot/build-apk#L17

I'm pretty sure it'd work for your older Android versions if 
built slightly differently, as I used to support back to 
Android API 9 until a couple months ago:


https://gist.github.com/joakim-noah/f475b0be37b3834b4e50d68996b6ee1d#file-ldc_1-1-0_android_arm-L3438

It can be still made to so but I set API 21 as the minimum, 
because anything older has been declining for some time now:


http://blog.davidecoppola.com/2016/12/android-version-distribution-history-visualization-2012-2016/


I investigated this a little, as I remembered that I have an old 
Android 4.4 Kitkat tablet lying around.  I am able to reproduce 
the grey screen, with no teapot.


I tried recompiling and linking the native D portion of the app 
against API 9, but noticed that the resulting native D library 
was exactly the same, with the same SHA hash.  Then I remembered 
that I built the small Java portion of the app against API 21 
also.  My guess is that is what is causing the problem, since the 
Java source has to do a bit of setup so that both the Java and D 
code can share the UI:


https://github.com/joakim-noah/android/blob/master/samples/Teapot/src/com/sample/teapot/TeapotNativeActivity.java

This is needed because this sample app demonstrates using JNI to 
call the Java functions showUI and updateFPS, to send the 
framerate from D to the Java functions to display at the top left.


I will note the Android 5.0 requirement on the release, thanks 
for reporting.


Re: Release D 2.074.1

2017-06-02 Thread Joseph Rushton Wakeling via Digitalmars-d-announce

On Thursday, 1 June 2017 at 21:04:00 UTC, Martin Nowak wrote:

Glad to announce D 2.074.1.

http://dlang.org/download.html

This point release fixes a few issues over 2.074.0, see the 
changelog for more details.


http://dlang.org/changelog/2.074.1.html


Great news, thanks Martin.  I'll update the snap packages over 
the weekend. :-)


Re: D for Android beta

2017-06-02 Thread via Digitalmars-d-announce

On Friday, 2 June 2017 at 08:58:01 UTC, Joakim wrote:

On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote:

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
The beta release of ldc 1.3, the llvm-based D compiler, is 
now out:


https://github.com/joakim-noah/android/releases

It is accompanied by a non-trivial sample app from the 
Android NDK, ported from C++ to about 1.2 klocs of D: the 
classic Utah Teapot 
(https://en.wikipedia.org/wiki/Utah_teapot), updated with 
mobile touch controls.  This app also demonstrates calling 
Java functions from your D code through JNI, though most of 
it is written in D.


There are two builds of ldc, a cross-compiler that you can 
use from a linux/x64 shell to compile to Android/ARM, and a 
native compiler that you can run on your Android device 
itself.  As I pointed out last year, not only is ldc a large 
mixed D/C++ codebase that just worked on ARM, but it is 
possible to build arbitrarily large Android apps on your 
Android device itself, a first for any mobile platform:


http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org

This is the way the next generation of coders will get into 
coding, by tinkering with their Android devices like we did 
with Macs and PCs decades ago, and D is one the few languages 
that is already there.


I will write up instructions on how to write an Android app 
in D _on_ your Android device by using ldc and the Termux 
app, and get ldc into the Termux packages, a package 
repository for Android:


https://play.google.com/store/apps/details?id=com.termux=en


Hello,

Thanks for the post. I have tried to run apk on 2 devices:
1. LG-E440 phone with Android 4.1.2
2. Orange Pi Lite (development board with Allwinner H3 CPU) 
Android 4.4.2


On both devices there was only gray rectangle with "Teapot" 
notification at the bottom for about a sec and then in upper 
left corner the FPS info (around 60 on both devices), but 
without any graphic. I have tried taping, dragging etc.


Are Android versions a problem or it could be something else?

Thanks in advance.


I'd guess that's the issue, as I haven't tested against those 
older versions of Android and this app links against Android 
API 21, ie 5.0 Lollipop:


https://github.com/joakim-noah/android/blob/master/samples/Teapot/build-apk#L17

I'm pretty sure it'd work for your older Android versions if 
built slightly differently, as I used to support back to 
Android API 9 until a couple months ago:


https://gist.github.com/joakim-noah/f475b0be37b3834b4e50d68996b6ee1d#file-ldc_1-1-0_android_arm-L3438

It can be still made to so but I set API 21 as the minimum, 
because anything older has been declining for some time now:


http://blog.davidecoppola.com/2016/12/android-version-distribution-history-visualization-2012-2016/


Just FYI, I have the same issue with Android 6.0.1.


Re: D for Android beta

2017-06-02 Thread Joakim via Digitalmars-d-announce

On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote:

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
The beta release of ldc 1.3, the llvm-based D compiler, is now 
out:


https://github.com/joakim-noah/android/releases

It is accompanied by a non-trivial sample app from the Android 
NDK, ported from C++ to about 1.2 klocs of D: the classic Utah 
Teapot (https://en.wikipedia.org/wiki/Utah_teapot), updated 
with mobile touch controls.  This app also demonstrates 
calling Java functions from your D code through JNI, though 
most of it is written in D.


There are two builds of ldc, a cross-compiler that you can use 
from a linux/x64 shell to compile to Android/ARM, and a native 
compiler that you can run on your Android device itself.  As I 
pointed out last year, not only is ldc a large mixed D/C++ 
codebase that just worked on ARM, but it is possible to build 
arbitrarily large Android apps on your Android device itself, 
a first for any mobile platform:


http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org

This is the way the next generation of coders will get into 
coding, by tinkering with their Android devices like we did 
with Macs and PCs decades ago, and D is one the few languages 
that is already there.


I will write up instructions on how to write an Android app in 
D _on_ your Android device by using ldc and the Termux app, 
and get ldc into the Termux packages, a package repository for 
Android:


https://play.google.com/store/apps/details?id=com.termux=en


Hello,

Thanks for the post. I have tried to run apk on 2 devices:
1. LG-E440 phone with Android 4.1.2
2. Orange Pi Lite (development board with Allwinner H3 CPU) 
Android 4.4.2


On both devices there was only gray rectangle with "Teapot" 
notification at the bottom for about a sec and then in upper 
left corner the FPS info (around 60 on both devices), but 
without any graphic. I have tried taping, dragging etc.


Are Android versions a problem or it could be something else?

Thanks in advance.


I'd guess that's the issue, as I haven't tested against those 
older versions of Android and this app links against Android API 
21, ie 5.0 Lollipop:


https://github.com/joakim-noah/android/blob/master/samples/Teapot/build-apk#L17

I'm pretty sure it'd work for your older Android versions if 
built slightly differently, as I used to support back to Android 
API 9 until a couple months ago:


https://gist.github.com/joakim-noah/f475b0be37b3834b4e50d68996b6ee1d#file-ldc_1-1-0_android_arm-L3438

It can be still made to so but I set API 21 as the minimum, 
because anything older has been declining for some time now:


http://blog.davidecoppola.com/2016/12/android-version-distribution-history-visualization-2012-2016/


Re: D for Android beta

2017-06-02 Thread Dušan Pavkov via Digitalmars-d-announce

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
The beta release of ldc 1.3, the llvm-based D compiler, is now 
out:


https://github.com/joakim-noah/android/releases

It is accompanied by a non-trivial sample app from the Android 
NDK, ported from C++ to about 1.2 klocs of D: the classic Utah 
Teapot (https://en.wikipedia.org/wiki/Utah_teapot), updated 
with mobile touch controls.  This app also demonstrates calling 
Java functions from your D code through JNI, though most of it 
is written in D.


There are two builds of ldc, a cross-compiler that you can use 
from a linux/x64 shell to compile to Android/ARM, and a native 
compiler that you can run on your Android device itself.  As I 
pointed out last year, not only is ldc a large mixed D/C++ 
codebase that just worked on ARM, but it is possible to build 
arbitrarily large Android apps on your Android device itself, a 
first for any mobile platform:


http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org

This is the way the next generation of coders will get into 
coding, by tinkering with their Android devices like we did 
with Macs and PCs decades ago, and D is one the few languages 
that is already there.


I will write up instructions on how to write an Android app in 
D _on_ your Android device by using ldc and the Termux app, and 
get ldc into the Termux packages, a package repository for 
Android:


https://play.google.com/store/apps/details?id=com.termux=en


Hello,

Thanks for the post. I have tried to run apk on 2 devices:
1. LG-E440 phone with Android 4.1.2
2. Orange Pi Lite (development board with Allwinner H3 CPU) 
Android 4.4.2


On both devices there was only gray rectangle with "Teapot" 
notification at the bottom for about a sec and then in upper left 
corner the FPS info (around 60 on both devices), but without any 
graphic. I have tried taping, dragging etc.


Are Android versions a problem or it could be something else?

Thanks in advance.




Re: D for Android beta

2017-06-02 Thread Martin Tschierschke via Digitalmars-d-announce

On Thursday, 1 June 2017 at 19:45:17 UTC, Ali Çehreli wrote:

Very exciting! :)

+1!


On 06/01/2017 12:31 PM, Joakim wrote:

> I will write up instructions on how to write an Android app
in D _on_
> your Android device

I hope it will be detailed enough for people who are very new 
to programming on the Android.


Me too :D
mt.




D IDE Coedit, version 3 update 2 released

2017-06-02 Thread Basile B. via Digitalmars-d-announce
Very small update. The Changes won't be noticeable unless you're 
an hardcore user like me.


https://github.com/BBasile/Coedit/releases/tag/3_update_2
https://github.com/BBasile/Coedit


off topic:
==
I've recently discovered that CE downloads for linux are now more 
important than Windows's one. For example if you look at the  
"3_gold" count on this page: 
http://www.somsubhra.com/github-release-stats/?username=BBasile=Coedit,

there are about 1000 dls for linux vs 500 for Windows !

Times change.


Re: D for Android beta

2017-06-02 Thread Guillaume Piolat via Digitalmars-d-announce

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
It is accompanied by a non-trivial sample app from the Android 
NDK, ported from C++ to about 1.2 klocs of D: the classic Utah 
Teapot (https://en.wikipedia.org/wiki/Utah_teapot), updated 
with mobile touch controls.  This app also demonstrates calling 
Java functions from your D code through JNI, though most of it 
is written in D.




Fantastic news, congrats!