[Issue 13242] imported aliases should be analyzed lazily

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13242 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #6 from

Re: DConf 2016 offical presentation template

2016-04-21 Thread Craig Dillabaugh via Digitalmars-d
On Friday, 22 April 2016 at 01:53:02 UTC, Adam D. Ruppe wrote: On Friday, 22 April 2016 at 00:35:21 UTC, Mithun Hunsur wrote: supporting the presentation rather than _being_ the presentation). Powerpoints have a bad habit of damaging presentations rather than supporting them... I hate

Re: DConf 2016 offical presentation template

2016-04-21 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 22 April 2016 at 00:35:21 UTC, Mithun Hunsur wrote: supporting the presentation rather than _being_ the presentation). Powerpoints have a bad habit of damaging presentations rather than supporting them... I hate slides. Focus on making interesting content and consider doing a

Re: GC allocation

2016-04-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 21 April 2016 at 22:59:58 UTC, Alex wrote: Ok... I make slices of them, carefully avoiding to make copies... Yeah, that shouldn't make a difference.. Huh? I think, this is the place, where I lack some background... So, I bind my delegates via Can you post any more of your

Re: aliasing/referencing expressions in with statements

2016-04-21 Thread Yuxuan Shui via Digitalmars-d-learn
On Thursday, 21 April 2016 at 23:05:38 UTC, deed wrote: Often I find myself wanting to alias an expression, such as verbose fields, possibly nested. AFAIK, the with statement makes it easier, but not as good as it could have been. What I'd like to express is for example something like this:

Re: DConf 2016 offical presentation template

2016-04-21 Thread welkam via Digitalmars-d
On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could. Ill just leave this here

Re: DConf 2016 offical presentation template

2016-04-21 Thread Mithun Hunsur via Digitalmars-d
On Thursday, 21 April 2016 at 22:37:06 UTC, Walter Bright wrote: On 4/20/2016 12:53 AM, Benjamin Thaut wrote: Is there a official presentation template for Dconf 2016? If not it would be greate if someone could create one. Many programmers (me included) are not good with picking colors and

[Issue 15897] private base functions not callable from base class module without type change

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15897 --- Comment #5 from Walter Bright --- (In reply to Steven Schveighoffer from comment #4) > private void create(Animal animal) { import std.stdio; writeln("ufcs"); } > > class Animal > { > void create() { import

Re: Changelog entries as folder or in wiki

2016-04-21 Thread Seb via Digitalmars-d
On Thursday, 21 April 2016 at 03:09:43 UTC, Vladimir Panteleev wrote: On Wednesday, 20 April 2016 at 23:51:41 UTC, Seb wrote: Honestly I prefer 1) - the changelog entry can be approved & checked during the code review on Github and the reviewers can check that such an addition is provided in

aliasing/referencing expressions in with statements

2016-04-21 Thread deed via Digitalmars-d-learn
Often I find myself wanting to alias an expression, such as verbose fields, possibly nested. AFAIK, the with statement makes it easier, but not as good as it could have been. What I'd like to express is for example something like this: with( a = instanceA.verboseFieldA.verboseFieldB, b

Re: GC allocation

2016-04-21 Thread Alex via Digitalmars-d-learn
On Thursday, 21 April 2016 at 19:54:10 UTC, via Digitalmars-d-learn wrote: I'm on mobile so I will be brief now and expand later On Thu, Apr 21, 2016 at 07:37:59PM +, QAston via Digitalmars-d-learn wrote: Just like classes - when closure expression is executed. Heap closures are

Re: GC allocation

2016-04-21 Thread Alex via Digitalmars-d-learn
On Thursday, 21 April 2016 at 19:37:59 UTC, QAston wrote: On Thursday, 21 April 2016 at 17:27:09 UTC, Alex wrote: Ok. So, does this mean, that they just allocate on creation/binding them? If so, there is no problem and there are no questions any more. Just like classes - when closure

Re: DConf 2016 offical presentation template

2016-04-21 Thread Walter Bright via Digitalmars-d
On 4/20/2016 12:53 AM, Benjamin Thaut wrote: Is there a official presentation template for Dconf 2016? If not it would be greate if someone could create one. Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could. I found

Re: Official dub packages for Debian and Ubuntu

2016-04-21 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Thursday, 21 April 2016 at 20:13:07 UTC, Joseph Rushton Wakeling wrote: On Monday, 18 April 2016 at 21:54:43 UTC, Matthias Klumpp wrote: Unfortunately it FTBFSes... Hopefully we can get the patch for that in as well:

Re: sending shared pointer to struct. message type mismatch

2016-04-21 Thread Ali Çehreli via Digitalmars-d-learn
On 04/21/2016 02:15 PM, Steven Schveighoffer wrote: > I was unaware that a spawned thread > terminating via uncaught exception does nothing. > > It kind of makes sense, but definitely not what many would expect. In case it's useful to others, there is something written about it here:

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Johannes Pfau via Digitalmars-d
Am Thu, 21 Apr 2016 15:34:35 + schrieb Matthias Klumpp : > Hi, and thanks for your detailed explanations! You're welcome :-) > On Thursday, 21 April 2016 at 11:49:13 UTC, Johannes Pfau wrote: > > On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp > > wrote:

Re: sending shared pointer to struct. message type mismatch

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/21/16 1:29 PM, Steven Schveighoffer wrote: I get strange behavior. Not an error/exception, but basically hung process. I tried modifying different things, and passing other types of messages. Seems almost like the call to send is ignored for sending the s message. Nevermind, this is my

Re: Compiling with -profile=gc makes program crash - why?

2016-04-21 Thread Walter Bright via Digitalmars-d
On 4/21/2016 8:47 AM, Ivan Kazmenko wrote: Issue created: https://issues.dlang.org/show_bug.cgi?id=15947 Thank you.

Re: XDG-APP and D

2016-04-21 Thread Karabuta via Digitalmars-d-announce
On Thursday, 21 April 2016 at 18:55:23 UTC, Gerald wrote: For those not familiar, xdg-app is a Linux virtualization system targeted at desktop apps, it's been under pretty heavy development and is available for use in Gnome 3.20. Mathias Clausen recently wrote a blog entry about creating his

Re: Official dub packages for Debian and Ubuntu

2016-04-21 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Monday, 18 April 2016 at 21:54:43 UTC, Matthias Klumpp wrote: Unfortunately it FTBFSes... Hopefully we can get the patch for that in as well: https://github.com/ldc-developers/ldc/commit/cb709bfc0a0a3ee8a730c0a99fa53198b6d75364.patch (I'm working on that) I see you succeeded -- many

[Issue 15949] New: Improve readtext handling of byte order mark (BOM)

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15949 Issue ID: 15949 Summary: Improve readtext handling of byte order mark (BOM) Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: GC allocation

2016-04-21 Thread via Digitalmars-d-learn
I'm on mobile so I will be brief now and expand later On Thu, Apr 21, 2016 at 07:37:59PM +, QAston via Digitalmars-d-learn wrote: > Just like classes - when closure expression is executed. Heap closures are actually allocated on declaration. The compiler looks to see if it will need to be

Re: DConf 2016 offical presentation template

2016-04-21 Thread qznc via Digitalmars-d
On Wednesday, 20 April 2016 at 20:40:03 UTC, qznc wrote: On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could. My advice for

Re: Enabling Only Top-Level Unittests

2016-04-21 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 21 April 2016 at 12:35:42 UTC, Anonymouse wrote: Then dmd -unittest -version=TestDeps if you want them run. This doesn't make things easier. I want to disable the builtin unittests of the modules I've imported. This requires me to add a version(test_MODULE) unittest in each

Re: GC allocation

2016-04-21 Thread QAston via Digitalmars-d-learn
On Thursday, 21 April 2016 at 17:27:09 UTC, Alex wrote: Ok. So, does this mean, that they just allocate on creation/binding them? If so, there is no problem and there are no questions any more. Just like classes - when closure expression is executed. I have an unusual caption... On creation

Re: Adding a float with all four elements of a float4

2016-04-21 Thread Marco Leise via Digitalmars-d-learn
Am Thu, 21 Apr 2016 00:14:53 + schrieb Straivers : > Hi, > > I want to make a utility wrapper around a core.simd.float4, and > have been trying to make the following code work, but have been > met with no success. > > auto add(float rhs) > { > return

XDG-APP and D

2016-04-21 Thread Gerald via Digitalmars-d-announce
For those not familiar, xdg-app is a Linux virtualization system targeted at desktop apps, it's been under pretty heavy development and is available for use in Gnome 3.20. Mathias Clausen recently wrote a blog entry about creating his first xdg-app and the application he chose to play with

Re: Computer Vision Library in D

2016-04-21 Thread Relja Ljubobratovic via Digitalmars-d-announce
On Thursday, 21 April 2016 at 16:13:31 UTC, Bill Baxter wrote: Fortran has some linear algebra functions in the standard library. :-) Java and many other modern languages are pretty much actively hostile to doing numerical computation, so including a linear algebra package in the standard

Re: sending shared pointer to struct. message type mismatch

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/21/16 1:33 PM, ag0aep6g wrote: This creates a `shared(S!(M, 2))*`, which is not exactly the same as `shared(S!(M, 2)*)`. The pointer is not shared in the former, but it is shared in the latter. I was going to suggest either sending a `shared(TS*)` or receiving a `shared(T)*`. But it looks

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Marco Leise via Digitalmars-d
> > You can only install headers for one library version with this > > approach! A versioned approach is nicer > > /usr/include/d/libfoo/1.0.0 but requires explicit compiler > > support and it's unlikely this will happen (or explicit dub > > support and you compile everything through dub). >

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Marco Leise via Digitalmars-d
Am Thu, 21 Apr 2016 15:34:35 + schrieb Matthias Klumpp : > That doesn't seem to be the case for LDC on Debian... It installs > Phobos into /usr/include/d/std, which makes GDC go crazy as soon > as LDC is installed too. See also:

Re: sending shared pointer to struct. message type mismatch

2016-04-21 Thread jacob via Digitalmars-d-learn
On Thursday, 21 April 2016 at 17:33:32 UTC, ag0aep6g wrote: On 21.04.2016 19:10, jacob wrote: I was going to suggest either sending a `shared(TS*)` or receiving a `shared(T)*`. But it looks like you can't send a shared pointer. When I tried, it got turned into a unshared-pointer-to-shared on

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Marco Leise via Digitalmars-d
Am Thu, 21 Apr 2016 01:01:01 + schrieb Matthias Klumpp : > Hello! > Me bringing dub to Debian (and subsequently Ubuntu) has sparked > quite some interest in getting more D applications shipped in > Linux distributions. Having been in a similar situation years ago, I

Re: sending shared pointer to struct. message type mismatch

2016-04-21 Thread ag0aep6g via Digitalmars-d-learn
On 21.04.2016 19:10, jacob wrote: private void runner(T)() { shared(T*) s = receiveOnly!(shared(T*))(); This tries to receive a `shared(S!(M, 2)*)`. writeln(s.x.length); writeln(s.x[0]); send(thisTid, true); Aside: Should be `ownerTid` here, no? } int main(string[]

Re: sending shared pointer to struct. message type mismatch

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/21/16 1:10 PM, jacob wrote: import std.stdio; import std.concurrency; shared struct S(T, uint M) { T[M] x; } shared struct M { int x; } private void runner(T)() { shared(T*) s = receiveOnly!(shared(T*))(); writeln(s.x.length); writeln(s.x[0]); send(thisTid,

Re: GC allocation

2016-04-21 Thread Alex via Digitalmars-d-learn
On Thursday, 21 April 2016 at 15:44:56 UTC, QAston wrote: Closure (delegate type) objects have to allocate because they're reference types and have state. For stateful reference types to be safe they have to be put on the GC allocated heap. Ok. So, does this mean, that they just allocate on

Live streaming of DConf 2016: confirmed

2016-04-21 Thread Dicebot via Digitalmars-d-announce
Have just got a confirmation that there will both live stream and high quality recording for later publishing during DConf 2016 @ Berlin - not being able to attend is not a reason to not participate! ;) I will also forward any questions asked online to speakers (if time allows). To make sure

sending shared pointer to struct. message type mismatch

2016-04-21 Thread jacob via Digitalmars-d-learn
Hello! I try to send shared pointer to struct: [code] import std.stdio; import std.concurrency; shared struct S(T, uint M) { T[M] x; } shared struct M { int x; } private void runner(T)() { shared(T*) s = receiveOnly!(shared(T*))(); writeln(s.x.length);

Re: DlangUI on Android

2016-04-21 Thread Dmitry via Digitalmars-d-announce
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote: I've implemented initial support of Android in DlangUI. It's great! Thank you! And congrats with it!

Re: Instantiate!(Template, args) in Phobos?

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/21/16 10:47 AM, Nick Treleaven wrote: Hi, There doesn't seem to be something like this in Phobos: alias Instantiate(alias Template, T...) = Template!T; Here's an example of why I need it: alias staticEx(string msg, string file = __FILE__, size_t line = __LINE__) =

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-21 Thread rcorre via Digitalmars-d-learn
On Thursday, 21 April 2016 at 12:57:36 UTC, Rene Zwanenburg wrote: On Thursday, 21 April 2016 at 11:54:27 UTC, rcorre wrote: Thanks for the tip. Here's the linking code it shows: cc d.o -o d -m64 -L/usr/lib -L/usr/lib32 -Xlinker --export-dynamic -Xlinker -Bstatic -lphobos2 -Xlinker

[Issue 15706] std.conv.to!int - wrong line number in exception

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15706 Ivan Kazmenko changed: What|Removed |Added See Also||https://issues.dlang.org/sh

Re: Computer Vision Library in D

2016-04-21 Thread Bill Baxter via Digitalmars-d-announce
On Wed, Apr 20, 2016 at 9:26 PM, rikki cattermole via Digitalmars-d-announce wrote: > On 20/04/2016 7:46 PM, Relja Ljubobratovic wrote: > >> On Wednesday, 20 April 2016 at 06:14:58 UTC, rikki cattermole wrote: >> >>> I was thinking std.math.linalg kinda

[Issue 15948] wrong line numbers in stack traces

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15948 Ivan Kazmenko changed: What|Removed |Added See Also||https://issues.dlang.org/sh

[Issue 15948] wrong line numbers in stack traces

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15948 --- Comment #1 from Ivan Kazmenko --- Perhaps my older report, https://issues.dlang.org/show_bug.cgi?id=15706, has the same root cause. This issue is more general since the example does not use any imports at all. --

Re: VariantPointer

2016-04-21 Thread Lass Safin via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 20:07:31 UTC, Nordlöw wrote: On Wednesday, 20 April 2016 at 16:08:32 UTC, Lass Safin wrote: core.memory.GC.setAttr can set attributes for a block of memory, with which you can set the attribute NO_SCAN, which as it implies, forces that no scan be done in the

[Issue 15948] New: wrong line numbers in stack traces

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15948 Issue ID: 15948 Summary: wrong line numbers in stack traces Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority:

[Issue 15947] [REG 2.069.0?] simple multithreaded program + "-profile=gc" = crash

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15947 --- Comment #3 from Ivan Kazmenko --- (In reply to Vladimir Panteleev from comment #2) > Issue 14511? The details are different, but perhaps the cause is the same. I was hesitant to put this as a comment for 14511 because "-profile"

Re: LDC now supports Windows MSVC x86/x64 as first class targets

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-announce
On Monday, 28 March 2016 at 05:56:07 UTC, Joakim wrote: On Monday, 28 March 2016 at 05:52:34 UTC, Corey Lubin wrote: On Saturday, 19 March 2016 at 13:23:48 UTC, kinke wrote: [...] Truly great news. Thank you Rainer, if you're reading this. (I don't think you ever take a break, do you? :])

Re: Using D in Android App

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-learn
On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote: Is it difficult to create a D business like app and connect it to android through java for the interface? I'd rather create all the complex stuff in D and either use it natively through java(I need a UI). If it is workable, can the

[Issue 14511] Profiler does not work with multithreaded programs

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14511 Ivan Kazmenko changed: What|Removed |Added CC||ga...@mail.ru See

[Issue 15947] [REG 2.069.0?] simple multithreaded program + "-profile=gc" = crash

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15947 Ivan Kazmenko changed: What|Removed |Added See Also||https://issues.dlang.org/sh

[Issue 15947] [REG 2.069.0?] simple multithreaded program + "-profile=gc" = crash

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15947 Vladimir Panteleev changed: What|Removed |Added CC|

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Matthias Klumpp via Digitalmars-d
On Thursday, 21 April 2016 at 09:07:57 UTC, Johan Engelen wrote: On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp wrote: The question here is also, which compiler should be the default (which IMHO would be the most complete, most bug-free actively maintained one ^^). Is

Re: Compiling with -profile=gc makes program crash - why?

2016-04-21 Thread Ivan Kazmenko via Digitalmars-d
On Thursday, 21 April 2016 at 10:57:12 UTC, Ivan Kazmenko wrote: Humm, when I searched whether it should work, I only found a reassuring post by Walter[1] almost a year ago. The issue tracker does not seem to contain an entry either. Perhaps I should create one, then. [1]

Re: DlangUI on Android

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-announce
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote: Hello, I've implemented initial support of Android in DlangUI. Forgot to add that DerelictFT patch is required for DlangUI/Android. (Freetype library has name libft2.so on Android) PR is submitted, but not yet integrated

[Issue 15947] [REG 2.069.0?] simple multithreaded program + "-profile=gc" = crash

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15947 --- Comment #1 from Ivan Kazmenko --- Interestingly, a modified version does not crash: -prfail2.d- import std.concurrency; void someWork () {auto x = [1];} void main () {spawn (); someWork ();} - I was curious if this

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Matthias Klumpp via Digitalmars-d
On Thursday, 21 April 2016 at 11:58:23 UTC, Kagamin wrote: On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp wrote: [...] Many D users are enthusiasts and push the compiler to its limits, they are usually stuck with DMD (even DMD HEAD sometimes) as it provides the latest fixes. It

[Issue 15947] New: [REG 2.069.0?] simple multithreaded program + "-profile=gc" = crash

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15947 Issue ID: 15947 Summary: [REG 2.069.0?] simple multithreaded program + "-profile=gc" = crash Product: D Version: D2 Hardware: All OS: Windows Status:

Re: GC allocation

2016-04-21 Thread QAston via Digitalmars-d-learn
On Thursday, 21 April 2016 at 15:22:15 UTC, Alex wrote: Hi all! timing my program with valgrind/cachegrind and using -vgc option of the compiler found the message: "using closure causes GC allocation" The question is: does the usage of the closure causes the GC allocation on every usage of

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Matthias Klumpp via Digitalmars-d
Hi, and thanks for your detailed explanations! On Thursday, 21 April 2016 at 11:49:13 UTC, Johannes Pfau wrote: On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp wrote: [...] You currently can't install druntime or phobos headers in this directory, as each compiler will have

GC allocation

2016-04-21 Thread Alex via Digitalmars-d-learn
Hi all! timing my program with valgrind/cachegrind and using -vgc option of the compiler found the message: "using closure causes GC allocation" The question is: does the usage of the closure causes the GC allocation on every usage of the closure or only on creation/assigning of it? If the

Re: DlangUI on Android

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-announce
On Thursday, 21 April 2016 at 14:48:40 UTC, ANtlord wrote: On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote: Hello, I've implemented initial support of Android in DlangUI. Am I sleeping? Can we develop UI applications for Android on D? It's great! Yes, and the same code may

[Issue 15946] New: Exception collected during unwinding

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15946 Issue ID: 15946 Summary: Exception collected during unwinding Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

[Issue 11176] array.ptr in @safe code

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11176 --- Comment #16 from Nick Treleaven --- > it should be safe to allow comparing a .ptr with another pointer, so long as > .ptr is not dereferenced I think I've pushed this point enough. Instead I expect it is acceptable

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-21 Thread Thiez via Digitalmars-d
On Thursday, 21 April 2016 at 13:42:50 UTC, Era Scarecrow wrote: On Thursday, 21 April 2016 at 09:15:05 UTC, Thiez wrote: On Thursday, 21 April 2016 at 04:07:52 UTC, Era Scarecrow wrote: I'd say either you specify the amount of retries, or give some amount that would be acceptable for some

Instantiate!(Template, args) in Phobos?

2016-04-21 Thread Nick Treleaven via Digitalmars-d-learn
Hi, There doesn't seem to be something like this in Phobos: alias Instantiate(alias Template, T...) = Template!T; Here's an example of why I need it: alias staticEx(string msg, string file = __FILE__, size_t line = __LINE__) = Instantiate!(.staticEx!(Exception, msg), file, line);

Re: DlangUI on Android

2016-04-21 Thread ANtlord via Digitalmars-d-announce
On Thursday, 21 April 2016 at 13:28:18 UTC, Vadim Lopatin wrote: Hello, I've implemented initial support of Android in DlangUI. Am I sleeping? Can we develop UI applications for Android on D? It's great!

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-21 Thread Alex Parrill via Digitalmars-d
On Thursday, 21 April 2016 at 13:42:50 UTC, Era Scarecrow wrote: On Thursday, 21 April 2016 at 09:15:05 UTC, Thiez wrote: On Thursday, 21 April 2016 at 04:07:52 UTC, Era Scarecrow wrote: I'd say either you specify the amount of retries, or give some amount that would be acceptable for some

Re: final switch and straight integers

2016-04-21 Thread Marc Schütz via Digitalmars-d
On Thursday, 21 April 2016 at 12:45:34 UTC, Steven Schveighoffer wrote: On 4/19/16 6:04 PM, Stefan Koch wrote: On Tuesday, 19 April 2016 at 14:53:18 UTC, Steven Schveighoffer wrote: or we should do away with requiring handling all enum cases. Are you suggesting getting rid of final switch

Re: std.experimental.allocator unittest failures on Win32

2016-04-21 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 20 April 2016 at 13:43:59 UTC, Vladimir Panteleev wrote: Hi, When I attempt to run the Phobos tests on my machine, I get the following: [...] Should anyone run into this, these disappeared after updating snn.lib.

[Issue 15945] New: sizeof on an invalid type seems to compile.

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15945 Issue ID: 15945 Summary: sizeof on an invalid type seems to compile. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-21 Thread Era Scarecrow via Digitalmars-d
On Thursday, 21 April 2016 at 09:15:05 UTC, Thiez wrote: On Thursday, 21 April 2016 at 04:07:52 UTC, Era Scarecrow wrote: I'd say either you specify the amount of retries, or give some amount that would be acceptable for some background program to retry for. Say, 30 seconds. Would that

Re: Compiling with -profile=gc makes program crash - why?

2016-04-21 Thread jmh530 via Digitalmars-d
On Thursday, 21 April 2016 at 09:23:26 UTC, tcak wrote: You are using "spawn". So it is a multithreaded program. -profile=gc doesn't work with multithreadd programs. Always creates problems. Then it would probably help if that is mentioned on this page somewhere.

DlangUI on Android

2016-04-21 Thread Vadim Lopatin via Digitalmars-d-announce
Hello, I've implemented initial support of Android in DlangUI. Only armv7a architecture is supported so far. You can downlowd sample APK: https://sourceforge.net/projects/crengine/files/DlangUI/ How to add support of Android to your DlangUI project.

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-21 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 21 April 2016 at 11:54:27 UTC, rcorre wrote: Thanks for the tip. Here's the linking code it shows: cc d.o -o d -m64 -L/usr/lib -L/usr/lib32 -Xlinker --export-dynamic -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl /usr/bin/ld: d.o: relocation R_X86_64_32

[Issue 15941] [REG v2.069] rbtree no longer supports classes

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15941 Steven Schveighoffer changed: What|Removed |Added CC|

Re: DConf 2016 offical presentation template

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d
On 4/20/16 3:53 AM, Benjamin Thaut wrote: Is there a official presentation template for Dconf 2016? If not it would be greate if someone could create one. Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could. Kind

Re: final switch and straight integers

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d
On 4/20/16 4:23 AM, Johan Engelen wrote: On Wednesday, 20 April 2016 at 06:36:01 UTC, bearophile wrote: It's easy to cover all the values in a switch, using ranges. Not as easy as you would think: int i; switch(i) { case 0: .. case 9: break; case 10:

Throw static exception - Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-21 Thread Nick Treleaven via Digitalmars-d
On Wednesday, 20 April 2016 at 19:32:01 UTC, Basile Burg wrote: a system exist to throw @nogc exceptions that would work in this case (the message doesn't have to be customized so it can be static): @nogc @safe void throwStaticEx(T, string file = __FILE__, size_t line = __LINE__)() {

Re: final switch and straight integers

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d
On 4/19/16 6:04 PM, Stefan Koch wrote: On Tuesday, 19 April 2016 at 14:53:18 UTC, Steven Schveighoffer wrote: or we should do away with requiring handling all enum cases. Are you suggesting getting rid of final switch ? No, what I'm suggesting is that final switch behave consistently. For

[Issue 15944] New: Wrong directory separators in dmd.2.0xx.x.windows.zip

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15944 Issue ID: 15944 Summary: Wrong directory separators in dmd.2.0xx.x.windows.zip Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: normal

Re: Enabling Only Top-Level Unittests

2016-04-21 Thread Anonymouse via Digitalmars-d-learn
On Monday, 21 March 2016 at 10:29:36 UTC, Nordlöw wrote: I want to enable unittests only at the top-level of a module compilation. If I have a module top.d that imports dep1.d dep2.d ... which all contain unittests, how do I compile top.d with only the unittests for top.d

Re: Changelog entries as folder or in wiki

2016-04-21 Thread Steven Schveighoffer via Digitalmars-d
On 4/20/16 11:09 PM, Vladimir Panteleev wrote: On Wednesday, 20 April 2016 at 23:51:41 UTC, Seb wrote: Honestly I prefer 1) - the changelog entry can be approved & checked during the code review on Github and the reviewers can check that such an addition is provided in the PR. On a new release

Re: Enabling Only Top-Level Unittests

2016-04-21 Thread Nordlöw via Digitalmars-d-learn
On Monday, 21 March 2016 at 15:25:29 UTC, Adam D. Ruppe wrote: Yes, compiling 33,000 lines from my libs happened in about one second. My experience with slow D builds tends to be that it is caused by CTFE, not by scale. These kinds of modules are very different from the ones I'm working

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Kagamin via Digitalmars-d
On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp wrote: ## How complete are the free compilers? This is an important question, because we would need to know whether we can expect D code to be compiled by any compiler, or whether there are tradeoffs that must be made. This question

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Johannes Pfau via Digitalmars-d
On Thursday, 21 April 2016 at 11:49:13 UTC, Johannes Pfau wrote: I'd love to have some extended compiler support (so you could simply do gdc -use=libfoo:1.0.0 and this would pick up the correct headers and linker flags). But as some DMD maintainers are opposed to this idea it won't happen.

Re: Shallow copy object when type is know

2016-04-21 Thread rumbu via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote: Is there a way to shallow copy an object when the type is known? I cant seem to figure out if there is a standard way. I can't just implement a copy function for the class, I need a generic solution. extern (C) Object

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Johannes Pfau via Digitalmars-d
On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp wrote: ## Where should D source-code / D interfaces be put? If I install a D library or source-only module as a distribution package, where should the sources be put? So far, I have seen: * /usr/include/d * /usr/include/dlang/ *

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-21 Thread rcorre via Digitalmars-d-learn
On Thursday, 21 April 2016 at 09:55:30 UTC, Rene Zwanenburg wrote: On Thursday, 21 April 2016 at 01:20:27 UTC, rcorre wrote: s/compile/link I _can_ compile a D library, but as soon as I try to link anything compiled with DMD it falls over. What is dmd's verbose output? (add -v switch) Some

Re: DConf 2016 offical presentation template

2016-04-21 Thread Antonio Corbi via Digitalmars-d
On Thursday, 21 April 2016 at 00:55:34 UTC, Andrei Alexandrescu wrote: qznc wrote: On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could.

Re: Distributor's whishlist and questions for D

2016-04-21 Thread Johannes Pfau via Digitalmars-d
On Thursday, 21 April 2016 at 08:30:59 UTC, John Colvin wrote: On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp wrote: ## How complete are the free compilers? ## Why is every D compiler shipping an own version of Phobos? The constraints on shipping a shared phobos between them: ABI

Re: Compiling with -profile=gc makes program crash - why?

2016-04-21 Thread Ivan Kazmenko via Digitalmars-d
On Thursday, 21 April 2016 at 09:23:26 UTC, tcak wrote: I'm trying to use DMD option "-profile=gc". You are using "spawn". So it is a multithreaded program. -profile=gc doesn't work with multithreadd programs. Always creates problems. Humm, when I searched whether it should work, I only

Re: about destroy and delete.

2016-04-21 Thread Dsby via Digitalmars-d
On Wednesday, 20 April 2016 at 09:00:41 UTC, Daniel Kozak wrote: On Wednesday, 20 April 2016 at 08:10:15 UTC, Dsby wrote: I see https://dlang.org/deprecate.html#delete ... so, I want to know why don't destroy direct printf ? if you call destroy on struct pointer it is same as assign null to

Re: [PRs] How to update on Github

2016-04-21 Thread Nick Treleaven via Digitalmars-d
On Tuesday, 19 April 2016 at 13:34:24 UTC, John Colvin wrote: On Tuesday, 19 April 2016 at 13:05:35 UTC, tcak wrote: I would recommend making a copy of the whole repository locally before any of that just in case you mess something up, at least while you're not as confident with git. Isn't

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-21 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 21 April 2016 at 01:20:27 UTC, rcorre wrote: s/compile/link I _can_ compile a D library, but as soon as I try to link anything compiled with DMD it falls over. What is dmd's verbose output? (add -v switch) Some of the things it outputs are the location of the config file it

[Issue 15943] wrong code for extern(C++) thread local variables

2016-04-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15943 Sobirari Muhomori changed: What|Removed |Added Keywords||C++ --

Re: Compiling with -profile=gc makes program crash - why?

2016-04-21 Thread tcak via Digitalmars-d
On Wednesday, 20 April 2016 at 22:31:31 UTC, Ivan Kazmenko wrote: On Wednesday, 20 April 2016 at 22:27:36 UTC, Ivan Kazmenko wrote: I'm trying to use DMD option "-profile=gc". With this option, the following simple program crashes with 2.071.0 down to 2.069.0 but still works on 2.068.2. The

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-21 Thread Chris via Digitalmars-d-learn
On Thursday, 21 April 2016 at 01:20:27 UTC, rcorre wrote: s/compile/link I _can_ compile a D library, but as soon as I try to link anything compiled with DMD it falls over. Sorry, I didn't see the code in your first post. I tried it myself (in only have 2.070.2) and it worked fine. Have

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-21 Thread Thiez via Digitalmars-d
On Thursday, 21 April 2016 at 04:07:52 UTC, Era Scarecrow wrote: I'd say either you specify the amount of retries, or give some amount that would be acceptable for some background program to retry for. Say, 30 seconds. Would that actually be more helpful than simply printing an OOM message

  1   2   >