Re: My Android project nearing beta

2020-01-10 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 8 January 2020 at 14:23:49 UTC, Chris wrote: Btw, how will D for Android handle multi-threading / coroutines? So again I haven't actually tested, but based on the implementation right now you can have D threads and Java threads, but they shouldn't mix. I think I can fix that

Re: My Android project nearing beta

2020-01-08 Thread Chris via Digitalmars-d-announce
On Wednesday, 8 January 2020 at 14:13:58 UTC, Adam D. Ruppe wrote: 2. The new JVM default language for Android is Kotlin. How will you handle that? Doesn't affect anything as far as I can tell, except possibly slightly awkward syntax when compared side by side with stuff like kotlin

Re: My Android project nearing beta

2020-01-08 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 8 January 2020 at 12:10:15 UTC, Chris wrote: 1. How does it fare performance wise with JNI? In the Android docs they advise you not to use the JNI bridge very often as it very costly. I don't know. I don't even have a plan to actually test it at this point. Worth remembering

Re: My Android project nearing beta

2020-01-08 Thread Chris via Digitalmars-d-announce
On Monday, 16 December 2019 at 21:37:51 UTC, Adam D. Ruppe wrote: I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me

Re: My Android project nearing beta

2020-01-06 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 6 January 2020 at 17:40:47 UTC, Laeeth Isharc wrote: I haven't tried, but: https://github.com/linkedin/dexmaker Yes, indeed, that is a possibility. I might work on this... honestly probably after several months given the length of my to do list right now.

Re: My Android project nearing beta

2020-01-06 Thread Laeeth Isharc via Digitalmars-d-announce
On Monday, 6 January 2020 at 14:37:54 UTC, Adam D. Ruppe wrote: On Sunday, 5 January 2020 at 03:56:37 UTC, visitor wrote: Not a single line of java! so i got kinda excited for creating a class 100% in D as well, but. https://developer.android.com/training/articles/perf-jni.html

Re: My Android project nearing beta

2020-01-06 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 6 January 2020 at 17:18:46 UTC, visitor wrote: hum ... indeed most of the native samples in android are using java helper classes Yeah, the NativeActivity is I think the only one that doesn't (and that's just because Google provides a pre-built helper java class). But I'm

Re: My Android project nearing beta

2020-01-06 Thread visitor via Digitalmars-d-announce
On Monday, 6 January 2020 at 14:37:54 UTC, Adam D. Ruppe wrote: gah, there goes that idea. So I guess that means the lambda callbacks for ui classes must be implemented in Java too. alas. but still most things work anyway so still fun. hum ... indeed most of the native samples in android

Re: My Android project nearing beta

2020-01-06 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 5 January 2020 at 03:56:37 UTC, visitor wrote: Not a single line of java! so i got kinda excited for creating a class 100% in D as well, but. https://developer.android.com/training/articles/perf-jni.html "DefineClass is not implemented. Android does not use Java bytecodes

Re: My Android project nearing beta

2020-01-04 Thread H. S. Teoh via Digitalmars-d-announce
On Sun, Jan 05, 2020 at 03:56:37AM +, visitor via Digitalmars-d-announce wrote: > On Saturday, 4 January 2020 at 16:59:13 UTC, visitor wrote: > > On Thursday, 2 January 2020 at 20:36:46 UTC, Adam D. Ruppe wrote: > > > > > > Getting there. I think I have a plan for making new Java classes > >

Re: My Android project nearing beta

2020-01-04 Thread visitor via Digitalmars-d-announce
On Saturday, 4 January 2020 at 16:59:13 UTC, visitor wrote: On Thursday, 2 January 2020 at 20:36:46 UTC, Adam D. Ruppe wrote: Getting there. I think I have a plan for making new Java classes from D too that I'll play with when I get more time... Your createJVM() setup works fine on my

Re: My Android project nearing beta

2020-01-04 Thread visitor via Digitalmars-d-announce
On Thursday, 2 January 2020 at 20:36:46 UTC, Adam D. Ruppe wrote: Getting there. I think I have a plan for making new Java classes from D too that I'll play with when I get more time... !!! You tried very hard to blow up the whole thing ! Sorry, nope ! still running fine :) i didn't try

Re: My Android project nearing beta

2020-01-02 Thread Adam D. Ruppe via Digitalmars-d-announce
On Thursday, 2 January 2020 at 20:26:05 UTC, visitor wrote: i see you updated everything ! wow !! :)) yea, the setup program should now download the runtime binaries for you and set up ldc2.conf fairly automatically (I haven't tested on Windows yet though and of course it will static assert

Re: My Android project nearing beta

2020-01-02 Thread visitor via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 18:15:32 UTC, Adam D. Ruppe wrote: i see you updated everything ! wow !! :)) just a note : i had to add a sourceSets instruction ``` android { ... defaultConfig { ... } sourceSets { main { // let gradle pack the shared

Re: My Android project nearing beta

2020-01-01 Thread suncarpet via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 16:48:40 UTC, Adam D. Ruppe wrote: Another big update here in my blog this week: http://dpldocs.info/this-week-in-d/Blog.Posted_2019_12_30.html I have to wonder if you sleep. Thank you for your work.

Re: My Android project nearing beta

2020-01-01 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 17:35:28 UTC, Adam D. Ruppe wrote: bindings generator oh one thing I forgot to mention on this is that right now it generates interfaces, but doesn't list them; each class is just class Foo : IJavaObject {} instead of class foo : ActualParent, IWhateverElse

Re: My Android project nearing beta

2020-01-01 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 17:16:19 UTC, visitor wrote: so to reply : i fortunately had a bit of (very recent) understanding about D/Android setup and stumbling upon the link crash without main() i figured that the main() hack was part of the missing files ... i went, like that, by guess

Re: My Android project nearing beta

2020-01-01 Thread bachmeier via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 17:35:28 UTC, Adam D. Ruppe wrote: On Wednesday, 1 January 2020 at 17:12:01 UTC, bachmeier wrote: A question that comes to mind with respect to your JNI work: Is this specific to Android, or could we use it, for instance, as a way to call Java functions from R,

Re: My Android project nearing beta

2020-01-01 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 17:12:01 UTC, bachmeier wrote: A question that comes to mind with respect to your JNI work: Is this specific to Android, or could we use it, for instance, as a way to call Java functions from R, where we use D as a bridge to simplify things? That should be

Re: My Android project nearing beta

2020-01-01 Thread visitor via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 16:48:07 UTC, Adam D. Ruppe wrote: On Wednesday, 1 January 2020 at 12:44:30 UTC, visitor wrote: i managed to run the test app on my phone via Android Studio :)) Nice! I just realized that I forgot to commit some of the files so cool that you got it working

Re: My Android project nearing beta

2020-01-01 Thread bachmeier via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 16:48:40 UTC, Adam D. Ruppe wrote: Another big update here in my blog this week: http://dpldocs.info/this-week-in-d/Blog.Posted_2019_12_30.html A question that comes to mind with respect to your JNI work: Is this specific to Android, or could we use it, for

Re: My Android project nearing beta

2020-01-01 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 1 January 2020 at 12:44:30 UTC, visitor wrote: i managed to run the test app on my phone via Android Studio :)) Nice! I just realized that I forgot to commit some of the files so cool that you got it working despite me :)

Re: My Android project nearing beta

2020-01-01 Thread visitor via Digitalmars-d-announce
On Monday, 16 December 2019 at 21:37:51 UTC, Adam D. Ruppe wrote: I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me

Re: My Android project nearing beta

2019-12-31 Thread Andre Pany via Digitalmars-d-announce
On Tuesday, 31 December 2019 at 03:59:58 UTC, Adam D. Ruppe wrote: On Wednesday, 18 December 2019 at 15:53:14 UTC, kinke wrote: Heh, it looks like the Wiki page (https://wiki.dlang.org/Cross-compiling_with_LDC - I've added an exemplary Android section there as well, using `-gcc` to specify

Re: My Android project nearing beta

2019-12-30 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 18 December 2019 at 15:53:14 UTC, kinke wrote: Heh, it looks like the Wiki page (https://wiki.dlang.org/Cross-compiling_with_LDC - I've added an exemplary Android section there as well, using `-gcc` to specify the NDK's preconfigured clang) needs some overhaul then if not even

Re: My Android project nearing beta

2019-12-19 Thread Adam D. Ruppe via Digitalmars-d-announce
On Thursday, 19 December 2019 at 11:48:21 UTC, Andre Pany wrote: I wonder whether D could be enhanced in future to make the CRTP idiom a little bit nicer: It is also possible to do a mixin for most the same result. But yeah if the language were to change there's some fun things. The two I

Re: My Android project nearing beta

2019-12-19 Thread Andre Pany via Digitalmars-d-announce
On Wednesday, 18 December 2019 at 19:57:43 UTC, Adam D. Ruppe wrote: On Tuesday, 17 December 2019 at 18:29:32 UTC, H. S. Teoh wrote: Runtime initialization is now working, and you can create a Java VM I now have this tested and working on Windows and Linux. - Method overloading; This is

Re: My Android project nearing beta

2019-12-18 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 18:29:32 UTC, H. S. Teoh wrote: Runtime initialization is now working, and you can create a Java VM I now have this tested and working on Windows and Linux. - Method overloading; This is fixed in the newest commit too. ```D import arsd.jni; final class

Re: My Android project nearing beta

2019-12-18 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 18 December 2019 at 15:53:14 UTC, kinke wrote: Heh, it looks like the Wiki page Yeah, I found the wiki pages just generally didn't actually work when I tried them; prolly outdated. But your example there is simpler than I thought it would be. I'm gonna try using this

Re: My Android project nearing beta

2019-12-18 Thread kinke via Digitalmars-d-announce
On Wednesday, 18 December 2019 at 15:04:14 UTC, Adam D. Ruppe wrote: tbh I didn't even know there was a such thing as ldc2.conf. Heh, it looks like the Wiki page (https://wiki.dlang.org/Cross-compiling_with_LDC - I've added an exemplary Android section there as well, using `-gcc` to specify

Re: My Android project nearing beta

2019-12-18 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 18 December 2019 at 12:29:17 UTC, kinke wrote: The android-ldc wrapper is already ~160 lines, and AFAICT, it's a rather cumbersome alternative to simply setting up ldc2.conf appropriately. tbh I didn't even know there was a such thing as ldc2.conf. This indeed might be better

Re: My Android project nearing beta

2019-12-18 Thread kinke via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 23:18:33 UTC, H. S. Teoh wrote: I struggled a bit to get Windows build working, for example, because I didn't know the exact pattern to put in ldc2.conf at first. I tried various combinations that didn't work until I accidentally landed upon

Re: My Android project nearing beta

2019-12-18 Thread kinke via Digitalmars-d-announce
On Wednesday, 18 December 2019 at 00:33:38 UTC, Adam D. Ruppe wrote: On Tuesday, 17 December 2019 at 22:28:32 UTC, kinke wrote: Instead of wrappers around ldc2 and dub, I'd prefer a little generic tool My implementation is pretty generic I'm talking about genericity wrt. *all* targets, not

Re: My Android project nearing beta

2019-12-17 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 22:28:32 UTC, kinke wrote: Instead of wrappers around ldc2 and dub, I'd prefer a little generic tool My implementation is pretty generic - look at the source. All it really does is foreach(target; [x86, x86_64, armv7, aarch64]) dub build -a target; and

Re: My Android project nearing beta

2019-12-17 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 17, 2019 at 10:28:32PM +, kinke via Digitalmars-d-announce wrote: [...] > LDC 1.19 final will probably come with a native Android/AArch64 > package. It's going to contain prebuilt Android/x86_64 > druntime/Phobos too, and the armv7a package will contain the i686 > libs; i.e.,

Re: My Android project nearing beta

2019-12-17 Thread kinke via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 21:08:07 UTC, Adam D. Ruppe wrote: On Tuesday, 17 December 2019 at 20:57:54 UTC, bachmeier wrote: Maybe Docker can help ease the burden for others to test it. oh it isn't that hard... as of now the trickiest thing is the druntime build and ldc comes with a

Re: My Android project nearing beta

2019-12-17 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 20:57:54 UTC, bachmeier wrote: Maybe Docker can help ease the burden for others to test it. oh it isn't that hard... as of now the trickiest thing is the druntime build and ldc comes with a script to help with that. The script just worked on my box for x86,

Re: My Android project nearing beta

2019-12-17 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 18:08:07 UTC, jmh530 wrote: On Tuesday, 17 December 2019 at 17:41:46 UTC, bachmeier wrote: I had no idea that existed. That should really be promoted. There might be a lot of interest. First commit was only 8 days ago [1]. I'm sure there will be a bigger

Re: My Android project nearing beta

2019-12-17 Thread bachmeier via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 20:47:24 UTC, Adam D. Ruppe wrote: On Tuesday, 17 December 2019 at 20:26:39 UTC, aberba wrote: This part is unclear to follow OK, I'll rewrite it with more examples later in the week. It is still a little bit of a pain to set up too so if I can fix that, the

Re: My Android project nearing beta

2019-12-17 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 18:29:32 UTC, H. S. Teoh wrote: Remaining issues (that I'm aware of) are: I also haven't finished supporting all the various Java arguments. Notably arrays are unimplemented right now as well as handling interfaces (if a D function takes a CharSequence but the

Re: My Android project nearing beta

2019-12-17 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 20:26:39 UTC, aberba wrote: This part is unclear to follow OK, I'll rewrite it with more examples later in the week. It is still a little bit of a pain to set up too so if I can fix that, the instructions will be simplified as well.

Re: My Android project nearing beta

2019-12-17 Thread aberba via Digitalmars-d-announce
On Monday, 16 December 2019 at 21:37:51 UTC, Adam D. Ruppe wrote: I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me

Re: My Android project nearing beta

2019-12-17 Thread Murilo via Digitalmars-d-announce
On Monday, 16 December 2019 at 21:37:51 UTC, Adam D. Ruppe wrote: I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me

Re: My Android project nearing beta

2019-12-17 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 17, 2019 at 10:25:26AM -0800, H. S. Teoh wrote: [...] > http://dpldocs.info/this-week-in-d/Blog.Posted_2019_12_09.html [...] And I might add, that since that blog was posted there has been significant progress. Runtime initialization is now working, and you can create a Java VM

Re: My Android project nearing beta

2019-12-17 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Dec 17, 2019 at 06:08:07PM +, jmh530 via Digitalmars-d-announce wrote: > On Tuesday, 17 December 2019 at 17:41:46 UTC, bachmeier wrote: > > [snip] > > > > I had no idea that existed. That should really be promoted. There > > might be a lot of interest. > > First commit was only 8

Re: My Android project nearing beta

2019-12-17 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 17:41:46 UTC, bachmeier wrote: [snip] I had no idea that existed. That should really be promoted. There might be a lot of interest. First commit was only 8 days ago [1]. I'm sure there will be a bigger announcement when it's ready. [1]

Re: My Android project nearing beta

2019-12-17 Thread bachmeier via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 17:24:58 UTC, H. S. Teoh wrote: Especially check out arsd/jni.d, that can be used to almost-seamlessly interoperate D with Java. It's not 100% there yet, but it's pretty danged awesome. I've never imagined D/Java interop would be so nice to use! And this is

Re: My Android project nearing beta

2019-12-17 Thread H. S. Teoh via Digitalmars-d-announce
On Mon, Dec 16, 2019 at 09:37:51PM +, Adam D. Ruppe via Digitalmars-d-announce wrote: > I'm gonna drop the link here without further comment: > > https://github.com/adamdruppe/d_android > > hopefully I've written enough in the repo so anyone who wants to play > with it can... and if not, I

Re: My Android project nearing beta

2019-12-17 Thread GreatSam4sure via Digitalmars-d-announce
On Tuesday, 17 December 2019 at 00:41:01 UTC, Adam D. Ruppe wrote: On Monday, 16 December 2019 at 23:23:08 UTC, GreatSam4sure wrote: I will appreciate a step by step tutorial on how to get things setup and running dlang android app Did the website there help you at all? No sir, that is the

Re: My Android project nearing beta

2019-12-16 Thread Adam D. Ruppe via Digitalmars-d-announce
On Monday, 16 December 2019 at 23:23:08 UTC, GreatSam4sure wrote: I will appreciate a step by step tutorial on how to get things setup and running dlang android app Did the website there help you at all?

Re: My Android project nearing beta

2019-12-16 Thread GreatSam4sure via Digitalmars-d-announce
On Monday, 16 December 2019 at 21:37:51 UTC, Adam D. Ruppe wrote: I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me

Re: My Android project nearing beta

2019-12-16 Thread GreatSam4sure via Digitalmars-d-announce
On Monday, 16 December 2019 at 21:37:51 UTC, Adam D. Ruppe wrote: I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me

Re: My Android project nearing beta

2019-12-16 Thread GreatSam4sure via Digitalmars-d-announce
On Monday, 16 December 2019 at 21:37:51 UTC, Adam D. Ruppe wrote: I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me

My Android project nearing beta

2019-12-16 Thread Adam D. Ruppe via Digitalmars-d-announce
I'm gonna drop the link here without further comment: https://github.com/adamdruppe/d_android hopefully I've written enough in the repo so anyone who wants to play with it can... and if not, I need to fix the docs :) let me know if you find any success or failure playing with it.