Re: Ever want to compile D on your Android phone? Well, now you can!

2016-11-02 Thread Joakim via Digitalmars-d-announce

On Saturday, 29 October 2016 at 21:47:35 UTC, Mergul wrote:

On Sunday, 24 January 2016 at 15:12:30 UTC, Joakim wrote:
An alpha release of ldc, the llvm-based D compiler, for 
Android devices is now available.  It is best used with the 
excellent Termux app 
(https://play.google.com/store/apps/details?id=com.termux=en) and a bluetooth keyboard. ;) Updated test runners, that run most tests from the standard library on any Android device, are also available (results have been reported for everything from a TomTom BRIDGE GPS navigation device to a Huawei Watch):


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

You can install a test runner app or run a command-line binary.
 Please report your results in this thread in the ldc forum, 
which requires no registration, with the info and format 
requested there, particularly for Android 4.1 or earlier:


https://forum.dlang.org/thread/bafrkjfwmoyriyhmq...@forum.dlang.org

If you try out the native compiler, take a look at the README 
that comes with it for instructions.


If you have a D/OpenGL app you'd like to port to Android and 
submit to the Play Store, let me know if I can help with that 
process.


I'm trying to build native-activity sample in .d.
I have build cross ldc compiler using your instructions. When I 
have build native activity its work properly on BlueStack, but 
on my phone (android 4.2.1) this always crash and run again. 
Your app test runner work perfect and every test passed.

Application always crash when I'm using android_app.savedState.

if (state.savedState != null) {
// We are starting with a previous saved state; restore 
from it.

engine.state = *cast(saved_state*)state.savedState; //crash!
}

Sorry for bad english.


Hmm, I am unable to reproduce the crash with that sample app on 
my tablet running Marshmallow.  Can you try the prebuilt 
cross-compilers at 
https://github.com/joakim-noah/android/releases and see if the 
problem crops up with those too?


If you are able to reproduce consistently with some compiler, 
please file an issue with more info, such as which ldc version 
you built and what commands you used to build the app, either at 
the github repo for the sample app, 
https://github.com/joakim-noah/android/, or if you can reproduce 
with the pre-built ldc compilers, at the ldc github, 
https://github.com/ldc-developers/ldc/.


Re: Ever want to compile D on your Android phone? Well, now you can!

2016-11-02 Thread Dawid Masiukiewicz via Digitalmars-d-announce
On Tuesday, 1 November 2016 at 13:33:02 UTC, Steven Schveighoffer 
wrote:

android_app.savedState appears to be defined here:

https://github.com/joakim-noah/android/blob/polish/android_native_app_glue.d#L56

It's a void *. So comparing against null with != is identical 
to !is.


There are actually cases where comparing against null with != 
is valid, and what you want exactly (e.g. comparing a string to 
null to check for empty string).


In this case, fixing the comparison is not the answer. What is 
happening is one of several things:


1. I don't know what type `engine` is, so if it's a pointer, 
then dereferencing the state member may be the culprit if 
engine is invalid.
2. If state is a pointer, then you could be crashing at the if 
statement (unlikely).

3. state or state.savedState isn't being properly initialized.
4. Something else (e.g. code generation error). Hope it's not 
this one.


-Steve


I don't know what was bad but I start working on something 
different.
I managed to compile project with SDL. Using SDL c++ code which 
call my D code. It's work.

Used libraries: SDL, Assimp, FreeImage.
http://imgur.com/a/aMs15


Re: SoundTab Theremin software synthesizer

2016-11-02 Thread Karabuta via Digitalmars-d-announce
On Wednesday, 2 November 2016 at 09:35:20 UTC, Vadim Lopatin 
wrote:

On Monday, 31 October 2016 at 22:33:38 UTC, Karabuta wrote:
On Friday, 28 October 2016 at 08:28:41 UTC, Vadim Lopatin 
wrote:

Hello,

I've open sourced my project SoundTab: 
https://github.com/buggins/soundtab/




I've published derelict-wintab (Wacom tablet API) and wasapi 
(windows audio API) libraries used for this project.


+1


Re: Release D 2.072.0

2016-11-02 Thread Jack Stouffer via Digitalmars-d-announce

On Monday, 31 October 2016 at 01:27:08 UTC, Martin Nowak wrote:

Glad to announce D 2.072.0.

http://dlang.org/download.html

This is the release ships with the latest version of dub 
(v1.1.0), comes

with lots of phobos additions and native TLS on OSX.
See the changelog for more details.

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

-Martin


https://www.reddit.com/r/programming/comments/5aru4f/d_version_2072_released_over_200_bugs_fixed/


Re: Release D 2.072.0

2016-11-02 Thread anonymous via Digitalmars-d-announce

On Wednesday, 2 November 2016 at 15:08:26 UTC, anonymous wrote:
On Wednesday, 2 November 2016 at 12:36:45 UTC, Johan Engelen 
wrote:

LDC built with DMD 2.072.0 gives the following error when run:
object.Error@src/rt/minfo.d(356): Cyclic dependency between 
module ddmd.traits and ddmd.cond

ddmd.traits* ->
ddmd.attrib ->
ddmd.cond* ->
ddmd.expression ->
ddmd.traits*

Pretty much all of LDC's D code is DDMD front-end code, master 
is at front-end version 2.071.2. I hope someone can try to 
build DMD 2.071.2 using 2.072.0 and see if a similar issue is 
found.


I confirm, dmd 2.072 can't build dmd 2.071.2, same error, but 
boot since master straping works there's probably something 
that's been fixed in one or two of these ddmd modules, likely a 
static ctor...


Maybe after this:

https://github.com/dlang/dmd/commit/1d0ab8b9c136e46bf449c506ca25d2c8a784f7b9#diff-b4674e7b5d3a44178526afdefc9aa368

ddmd.attribs was removed

https://github.com/dlang/dmd/commit/1d0ab8b9c136e46bf449c506ca25d2c8a784f7b9#diff-b4674e7b5d3a44178526afdefc9aa368L15

and it was also part of the cycle.


Re: Release D 2.072.0

2016-11-02 Thread anonymous via Digitalmars-d-announce
On Wednesday, 2 November 2016 at 12:36:45 UTC, Johan Engelen 
wrote:

LDC built with DMD 2.072.0 gives the following error when run:
object.Error@src/rt/minfo.d(356): Cyclic dependency between 
module ddmd.traits and ddmd.cond

ddmd.traits* ->
ddmd.attrib ->
ddmd.cond* ->
ddmd.expression ->
ddmd.traits*

Pretty much all of LDC's D code is DDMD front-end code, master 
is at front-end version 2.071.2. I hope someone can try to 
build DMD 2.071.2 using 2.072.0 and see if a similar issue is 
found.


I confirm, dmd 2.072 can't build dmd 2.071.2, same error, but 
boot since master straping works there's probably something 
that's been fixed in one or two of these ddmd modules, likely a 
static ctor...


Re: Release D 2.072.0

2016-11-02 Thread Johan Engelen via Digitalmars-d-announce
On Tuesday, 1 November 2016 at 16:40:42 UTC, Andrei Alexandrescu 
wrote:

On 11/01/2016 11:41 AM, Johan Engelen wrote:

On Monday, 31 October 2016 at 01:27:08 UTC, Martin Nowak wrote:

Glad to announce D 2.072.0.


DMD 2.072.0 miscompiles/uncovers a bug in LDC, so I switched 
back to DMD

2.071.2 for CI testing. :(


Is there somebody working on that bug? Thanks. -- Andrei


LDC built with DMD 2.072.0 gives the following error when run:
object.Error@src/rt/minfo.d(356): Cyclic dependency between 
module ddmd.traits and ddmd.cond

ddmd.traits* ->
ddmd.attrib ->
ddmd.cond* ->
ddmd.expression ->
ddmd.traits*

Pretty much all of LDC's D code is DDMD front-end code, master is 
at front-end version 2.071.2. I hope someone can try to build DMD 
2.071.2 using 2.072.0 and see if a similar issue is found.


Re: Got a post for the D Blog?

2016-11-02 Thread Daniel9 via Digitalmars-d-announce

On Monday, 31 October 2016 at 03:51:16 UTC, Mike Parker wrote:
So far, getting content for the blog has, with a few 
exceptions, been a process of sending out emails prompted by 
activity on my radar. This is no problem when it comes to 
project highlights or other fairly broad topics, but it's 
highly inefficient for ginning up technical posts on the 
implementation of specific algorithms, or optimization details, 
or how a D feature prevented a nuclear meltdown.


I want to publish more posts like Andreas's 'Find Was Too Damn 
Slow, So We Fixed It` [1] (which, by the way, is the 
most-viewed post so far, just ahead of Joakim's interview with 
Walter [2]), or Steven's 'How to Write @trusted Code in D' [3], 
but I need help.


If you, or someone you know, have done something interesting 
with an algorithm or optimization in D, or have used a D idiom 
to do things in a way that pleasantly surprised you, please let 
me know. If I think it's something we can work with, I'll help 
you in putting together a guest post, or something like I do 
with the project highlights (where I build a post around 
whatever info you give me).


Also, I need news. If you see or hear any D news anywhere 
outside of the forums -- new projects, research papers, usage 
at a company, a game using D -- please drop me a line. I'll 
either get a post together for it or make sure Adam knows about 
it for 'This Week in D'.


I'm also open to ideas for other types of posts, like project 
highlights, but I'd really like more of the technical stuff. 
Please send any suggestions to aldac...@gmail.com.


Thanks!

[1] 
http://dlang.org/blog/2016/06/16/find-was-too-damn-slow-so-we-fixed-it/
[2] 
http://dlang.org/blog/2016/08/30/ruminations-on-d-an-interview-with-walter-bright/
[3] 
http://dlang.org/blog/2016/09/28/how-to-write-trusted-code-in-d/


It's excellent, thanks)