Re: Got a post for the D Blog?

2016-11-01 Thread bachmeier via Digitalmars-d-announce

On Tuesday, 1 November 2016 at 06:36:15 UTC, Stefan Koch wrote:

On Tuesday, 1 November 2016 at 06:23:29 UTC, Mike Parker wrote:
On Monday, 31 October 2016 at 20:29:13 UTC, Jacob Carlborg 
wrote:




Would it be interesting to have a blog post about implement 
support for Objective-C in D? That would be very technical 
and quite low level.


Absolutely!


I could write something about the CTFE engine.
And how I plan to beat the llvm jit :)


I'd be very interested in such a post. And it would provide some 
good publicity for D.


Re: Release D 2.072.0

2016-11-01 Thread Andrei Alexandrescu via Digitalmars-d-announce

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



Re: Release D 2.072.0

2016-11-01 Thread Johan Engelen via Digitalmars-d-announce

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. :(


-Johan



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

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

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.


great, thanks))


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

2016-11-01 Thread Steven Schveighoffer via Digitalmars-d-announce

On 10/29/16 8:55 PM, rikki cattermole wrote:

On 30/10/2016 10:47 AM, Mergul wrote:

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!
}



Don't compare against null using =, compare using is.

if (state.savedState !is null) {


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


Re: Release vibe.d 0.7.30

2016-11-01 Thread Sönke Ludwig via Digitalmars-d-announce

Am 01.11.2016 um 14:29 schrieb John Colvin:

On Tuesday, 1 November 2016 at 12:47:13 UTC, Jacob Carlborg wrote:

On 2016-11-01 12:20, Saurabh Das wrote:


How can I find out more information about the 'runApplication' change?
What does "slowly fading out" mean?


I think it should say something like: "slowly fading out the default
main". Instead of having vibe.d define the main function and having a
shared module constructor with all the setup, you can define your own
main function with all the setup and then call runApplication, which
basically contains the same logic as the main function defined by vibe.d.


Is "phasing" the word that's being looked for here? I.e. "slowly phasing
out the default main".


Yes that sounds better. I'll change it and complete that partial sentence.


Re: Release vibe.d 0.7.30

2016-11-01 Thread Sönke Ludwig via Digitalmars-d-announce

Am 01.11.2016 um 12:20 schrieb Saurabh Das:

On Tuesday, 1 November 2016 at 09:09:05 UTC, Saurabh Das wrote:

On Monday, 31 October 2016 at 20:30:22 UTC, Sönke Ludwig wrote:

[...]


I'm going to try this out today! :)


How can I find out more information about the 'runApplication' change?
What does "slowly fading out" mean?


A summary would be:

runApplication does the same as runEventLoop, plus performing command 
line finalization and privilege lowering. This is the same that 
VibeDefaultMain otherwise does, with the only difference that it is 
invoked with an explicit function call.


Re: Release vibe.d 0.7.30

2016-11-01 Thread John Colvin via Digitalmars-d-announce

On Tuesday, 1 November 2016 at 12:47:13 UTC, Jacob Carlborg wrote:

On 2016-11-01 12:20, Saurabh Das wrote:

How can I find out more information about the 'runApplication' 
change?

What does "slowly fading out" mean?


I think it should say something like: "slowly fading out the 
default main". Instead of having vibe.d define the main 
function and having a shared module constructor with all the 
setup, you can define your own main function with all the setup 
and then call runApplication, which basically contains the same 
logic as the main function defined by vibe.d.


Is "phasing" the word that's being looked for here? I.e. "slowly 
phasing out the default main".


Re: Release vibe.d 0.7.30

2016-11-01 Thread Jacob Carlborg via Digitalmars-d-announce

On 2016-11-01 13:47, Jacob Carlborg wrote:

On 2016-11-01 12:20, Saurabh Das wrote:


How can I find out more information about the 'runApplication' change?
What does "slowly fading out" mean?


I think it should say something like: "slowly fading out the default
main". Instead of having vibe.d define the main function and having a
shared module constructor with all the setup, you can define your own
main function with all the setup and then call runApplication, which
basically contains the same logic as the main function defined by vibe.d.


For reference, here's the commit that introduced the change: 
https://github.com/rejectedsoftware/vibe.d/commit/f7ba59a6c80dc85882654138087bad579480cadf


--
/Jacob Carlborg


Re: Release vibe.d 0.7.30

2016-11-01 Thread Jacob Carlborg via Digitalmars-d-announce

On 2016-11-01 12:20, Saurabh Das wrote:


How can I find out more information about the 'runApplication' change?
What does "slowly fading out" mean?


I think it should say something like: "slowly fading out the default 
main". Instead of having vibe.d define the main function and having a 
shared module constructor with all the setup, you can define your own 
main function with all the setup and then call runApplication, which 
basically contains the same logic as the main function defined by vibe.d.


--
/Jacob Carlborg


Re: Release D 2.072.0

2016-11-01 Thread Nick Treleaven via Digitalmars-d-announce

On Monday, 31 October 2016 at 07:27:50 UTC, Ali Çehreli wrote:
Is the only valid remaining use for the comma operator the 
'for' loop iteration?


for ( ; ; ++i, ++j) {
// ...
}

Are there other uses?


The changelog shows it can be used for an expression statement:

  // This is okay, the result is not used.
  if (!mc)
mc = new MyContainerClass, mc.append(new Entry);

I've made a pull to improve the comma examples, e.g. adding 
brackets (mc = ...), mc.append and removing unnecessary 
statements:


https://github.com/dlang/dlang.org/pull/1502

Would be good if someone could review and merge.


Re: Got a post for the D Blog?

2016-11-01 Thread qznc via Digitalmars-d-announce

On Monday, 31 October 2016 at 03:51:16 UTC, Mike Parker wrote:
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.


[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/


I take that as a compliment. Thanks! The rest of you, take that 
as a challenge. ;)


What I would like to read about would be LuaD [4] or ctRegex [5], 
because they are great demos of CTFE.


The auto-tester would be worth an article as well. Not about the 
implementation details, but about its features and the PR 
workflow.


Also, some embedded D use like kernel or freestanding stuff.

None of these are "I fixed something in D" though. Hm, Taking a 
look through the recent 072 changelog, I found two items which 
could be worth a story:


* std.range.padLeft and std.range.padRight were added (if someone 
can write comedy and wants to take some jabs at the Javascript 
leftPad story)
* std.range.generate fixed to be a proper range (I remember some 
heated discussion about the semantics of front)



[4] http://jakobovrum.github.io/LuaD/
[5] https://dlang.org/phobos/std_regex.html#.ctRegex


Re: Release vibe.d 0.7.30

2016-11-01 Thread Saurabh Das via Digitalmars-d-announce

On Tuesday, 1 November 2016 at 09:09:05 UTC, Saurabh Das wrote:

On Monday, 31 October 2016 at 20:30:22 UTC, Sönke Ludwig wrote:

[...]


I'm going to try this out today! :)


How can I find out more information about the 'runApplication' 
change? What does "slowly fading out" mean?


Re: Release vibe.d 0.7.30

2016-11-01 Thread Saurabh Das via Digitalmars-d-announce

On Monday, 31 October 2016 at 20:30:22 UTC, Sönke Ludwig wrote:

Main changes over 0.7.29:

  - Compiles on the latest DMD version (2.068.x-2.072.0)
  - Added a new authorization framework for the web/REST 
interface

generators
  - Extended the serialization framework with more hooks and 
traits,
enabling the use of custom UDAs - vibe-sdlang [1] is an 
SDLang

serialization module that became possible this way
  - opDispatch has been removed from Bson/Json
  - Optional support for using diet-ng [2] has been added and is
enabled by default for new projects - for existing 
projects, add

diet-ng as a dependency or add it to dub.selections.json
  - The HTTP client can now be used on Unix socket destinations
  - Added table support for the Markdown compiler

[...]


I'm going to try this out today! :)


Re: Got a post for the D Blog?

2016-11-01 Thread Stefan Koch via Digitalmars-d-announce

On Tuesday, 1 November 2016 at 06:23:29 UTC, Mike Parker wrote:
On Monday, 31 October 2016 at 20:29:13 UTC, Jacob Carlborg 
wrote:




Would it be interesting to have a blog post about implement 
support for Objective-C in D? That would be very technical and 
quite low level.


Absolutely!


I could write something about the CTFE engine.
And how I plan to beat the llvm jit :)


Re: Got a post for the D Blog?

2016-11-01 Thread Mike Parker via Digitalmars-d-announce

On Monday, 31 October 2016 at 20:29:13 UTC, Jacob Carlborg wrote:



Would it be interesting to have a blog post about implement 
support for Objective-C in D? That would be very technical and 
quite low level.


Absolutely!