January 04, 2016 Re: Better watch out! D runs on watchOS! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | Joakim <dlang@joakim.fea.st> writes:
> On Monday, 4 January 2016 at 09:26:39 UTC, Dan Olson wrote:
>> Joakim <dlang@joakim.fea.st> writes:
>>
>>> On Thursday, 31 December 2015 at 00:11:34 UTC, Dan Olson wrote:
>>>> [...]
>>>
>>> Sounds good, submit a PR and let's get it in.
>>
>> Was planning to get that PR going then got side tracked by a more difficult ARM exeption unwinding bug. It happens in std.random unittest at LDC -O2 or higher. Does this sound familiar Joakim?
>
> Yep, except tests were failing in three unittest blocks with -O1 too, but I never looked into exactly why:
>
> https://gist.github.com/joakim-noah/63693ead3aa62216e1d9#file-ldc_android_arm-L3139
I must add, I don't think the optimizer or inliner are the cause of this unwinding bug. They are just good at making big functions. I think I could create the same bug at -O0.
|
January 05, 2016 Re: D runs on watchOS! and on Android Wear too! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Olson | On Monday, 28 December 2015 at 01:17:15 UTC, Dan Olson wrote: > A little progress report. More to come later when I get something pushed to github. > > I bought a returned Apple Watch yesterday at discount for $223.99 US and tried to see how much of D would work on it using my iOS fork of LDC. There were a few bumps, like dealing with embedded bitcode (a watchOS requirement). After 4-hours of baby steps, little D programs with incremental druntime support, I was able to download a huge watch app extension with all druntime and phobos unittests and run most of them alphabetically. Everything zipped along fine, only a std.math error, then mysteriously a exit after running std.parallelism test a long time. It was late for me so decided that was enough progress. > > This means all of druntime worked and probably most of phobos. > > The Apple Watch uses a new chip with armv7k, a different ABI, and different exception handling than iOS, so kinda surprised it worked as well as it did. Of course much thanks goes to LLVM with recently added watchOS, tvOS support, and all the LDC contributors that have kept master building with the latest 3.8 LLVM. Fantastic news, Dan. I can confirm that D also runs on Android Wear (Huawei watch) and passes all unit tests. Forgive the slight hijack, but I mention this here as people might see this thread and not the obscure one where I reported this previously. Somebody should do a blog post about this (and how to get it to work step by step - it's easy when you know how, but the set of people that don't and would like to but will get stuck is quite large). I might have a commercial use for this in coming months (both on Android and watchOS). Since it's an internal application the rough edges are of less concern to me than if one expects 100,000+ users. Wrappers for everything would help a lot (and then some tutorials) - I guess the Apple stuff is under way. Joakim has a binding for JNI, but would be nice to wrap so easier to use (and then build Android SDK wrappers on top of that. I saw this project here, but haven't yet tried: https://github.com/Monnoroch/DJni I guess the spirit of what Xamarin do with their stuff might be a model. Could this be a useful Google Summer of Code Project? Or is it too dull for the kinds of people that might be interested. |
January 06, 2016 Re: D runs on watchOS! and on Android Wear too! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laeeth Isharc | On Tuesday, 5 January 2016 at 20:39:02 UTC, Laeeth Isharc wrote: > On Monday, 28 December 2015 at 01:17:15 UTC, Dan Olson wrote: >> [...] > > Fantastic news, Dan. > > I can confirm that D also runs on Android Wear (Huawei watch) and passes all unit tests. Forgive the slight hijack, but I mention this here as people might see this thread and not the obscure one where I reported this previously. > > [...] You two might have to write that post together, since you're the only two reporting running D on watches so far! :) > I might have a commercial use for this in coming months (both on Android and watchOS). Since it's an internal application the rough edges are of less concern to me than if one expects 100,000+ users. > > [...] This should be pretty easy, it won't qualify as a GSoC project on its own. btw, sent you an email, let me know if you didn't get it. |
January 06, 2016 Re: Better watch out! D runs on watchOS! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joakim | Joakim <dlang@joakim.fea.st> writes: > On Thursday, 31 December 2015 at 00:11:34 UTC, Dan Olson wrote: >> On Wednesday, 30 December 2015 at 23:11:06 UTC, Joakim wrote: >>> That sounds like this issue I ran into with ARM EH: >>> >>> https://github.com/ldc-developers/ldc/issues/489#issuecomment-143560075 >>> >>> I was able to work around it by disabling the mentioned llvm optimization pass: >>> >>> https://gist.github.com/joakim-noah/1fb23fba1ba5b7e87e1a#file-android_tls-L42 >>> >>> https://gist.github.com/joakim-noah/63693ead3aa62216e1d9#file-ldc_android_arm-L3133 >> >> Yup, that's exactly it! The approach I took was to leave optimization on, removed the casts, and byte load the data into the uint vars. If the dwarf data is not guaranteed to be aligned to the data type, then I think this is the approach to take. > > Sounds good, submit a PR and let's get it in. https://github.com/ldc-developers/druntime/pull/51 |
January 06, 2016 Re: D runs on watchOS! and on Android Wear too! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laeeth Isharc | Laeeth Isharc <laeethnospam@nospam.laeeth.com> writes: > I can confirm that D also runs on Android Wear (Huawei watch) and passes all unit tests. Forgive the slight hijack, but I mention this here as people might see this thread and not the obscure one where I reported this previously. I think it is a good hijack! > Somebody should do a blog post about this (and how to get it to work step by step - it's easy when you know how, but the set of people that don't and would like to but will get stuck is quite large). For watchOS, soon there will be a binary release of cross compiler with phobos and will have instructions like I have for the iOS release. What is holding me up is I still am trying to decide how to manage multiple releases (iOS, tvOS, and watchOS) since the libraries are all different but the compiler is the same. It doesn't fit the mold but I'd like to have a single bin with multiple libs. > I might have a commercial use for this in coming months (both on Android and watchOS). Since it's an internal application the rough edges are of less concern to me than if one expects 100,000+ users. Laeeth, note that app store approval may be a ways off since they want to use their own LLVM to compile bitcode and I have patches not in official LLVM. If you only need to side load watchOS, then you will soon be good to go. > Wrappers for everything would help a lot (and then some tutorials) - I guess the Apple stuff is under way. The D Objective-C interface is not in LDC yet and I think what is in dmd so far only supports a subset (instance method calls I think). There are other ways, depending on what you need to do, but right know it seems best to do all the UI stuff in Swift or Objective-C and use D for everything else. -- Dan |
January 07, 2016 Re: D runs on watchOS! and on Android Wear too! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dan Olson | On Wednesday, 6 January 2016 at 17:35:07 UTC, Dan Olson wrote: > Laeeth Isharc <laeethnospam@nospam.laeeth.com> writes: > > I think it is a good hijack! Thanks.. > >> Somebody should do a blog post about this (and how to get it to work step by step - it's easy when you know how, but the set of people that don't and would like to but will get stuck is quite large). > > For watchOS, soon there will be a binary release of cross compiler with phobos and will have instructions like I have for the iOS release. > > What is holding me up is I still am trying to decide how to manage multiple releases (iOS, tvOS, and watchOS) since the libraries are all different but the compiler is the same. It doesn't fit the mold but I'd like to have a single bin with multiple libs. Yes can imagine it gets messy quickly yet is a lot of work to integrate. > >> I might have a commercial use for this in coming months (both on Android and watchOS). Since it's an internal application the rough edges are of less concern to me than if one expects 100,000+ users. > > Laeeth, note that app store approval may be a ways off since they want to use their own LLVM to compile bitcode and I have patches not in official LLVM. If you only need to side load watchOS, then you will soon be good to go. Appreciate the colour. Side loading fine for now, and actual use is realistically some way off as I have a lot of other things to do as well. I am in a funny business where the fewer the users I have the better (for x>=1) so my concerns are different from someone making a consumer app. >> Wrappers for everything would help a lot (and then some tutorials) - I guess the Apple stuff is under way. > > The D Objective-C interface is not in LDC yet and I think what is in dmd so far only supports a subset (instance method calls I think). There are other ways, depending on what you need to do, but right know it seems best to do all the UI stuff in Swift or Objective-C and use D for everything else. Yes - I haven't looked at Apple at all as I have too many computers already as it is and don't have a Mac. I wonder if it is possible to implement something like what I understand Corona have done for C# in D: make a common layer for what can be shared so work involved in customisation for each platform is minimised. I guess we are at a point now that the heavy lifting is done where some small success stories can inspire others to have a try and the ecosystem can grow. |
January 07, 2016 Re: D runs on watchOS! and on Android Wear too! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Laeeth Isharc Attachments:
| I'm thinking something like https://www.polymer-project.org/1.0/ written as http://jade-lang.org which compiles to "target" being either android, ios, Web, or native. There is dlangui which already mimics the android ui library to some extent. What do you think? On 07 Jan 2016 07:15, "Laeeth Isharc via Digitalmars-d-announce" < digitalmars-d-announce@puremagic.com> wrote: > On Wednesday, 6 January 2016 at 17:35:07 UTC, Dan Olson wrote: > >> Laeeth Isharc <laeethnospam@nospam.laeeth.com> writes: >> >> I think it is a good hijack! >> > > Thanks.. > >> >> Somebody should do a blog post about this (and how to get it to work step >>> by step - it's easy when you know how, but the set of people that don't and would like to but will get stuck is quite large). >>> >> >> For watchOS, soon there will be a binary release of cross compiler with phobos and will have instructions like I have for the iOS release. >> >> What is holding me up is I still am trying to decide how to manage multiple releases (iOS, tvOS, and watchOS) since the libraries are all different but the compiler is the same. It doesn't fit the mold but I'd like to have a single bin with multiple libs. >> > > Yes can imagine it gets messy quickly yet is a lot of work to integrate. > >> >> I might have a commercial use for this in coming months (both on Android >>> and watchOS). Since it's an internal application the rough edges are of less concern to me than if one expects 100,000+ users. >>> >> >> Laeeth, note that app store approval may be a ways off since they want to use their own LLVM to compile bitcode and I have patches not in official LLVM. If you only need to side load watchOS, then you will soon be good to go. >> > > Appreciate the colour. Side loading fine for now, and actual use is realistically some way off as I have a lot of other things to do as well. I am in a funny business where the fewer the users I have the better (for x>=1) so my concerns are different from someone making a consumer app. > > Wrappers for everything would help a lot (and then some tutorials) - I >>> guess the Apple stuff is under way. >>> >> >> The D Objective-C interface is not in LDC yet and I think what is in dmd so far only supports a subset (instance method calls I think). There are other ways, depending on what you need to do, but right know it seems best to do all the UI stuff in Swift or Objective-C and use D for everything else. >> > > Yes - I haven't looked at Apple at all as I have too many computers already as it is and don't have a Mac. I wonder if it is possible to implement something like what I understand Corona have done for C# in D: make a common layer for what can be shared so work involved in customisation for each platform is minimised. > > I guess we are at a point now that the heavy lifting is done where some small success stories can inspire others to have a try and the ecosystem can grow. > > > |
Copyright © 1999-2021 by the D Language Foundation