Re: workspace-d 2.7.2 & code-d 0.10.14

2016-09-13 Thread WebFreak001 via Digitalmars-d-announce
On Sunday, 11 September 2016 at 23:46:18 UTC, Joel wrote: On Sunday, 11 September 2016 at 08:43:53 UTC, WebFreak001 wrote: On Sunday, 11 September 2016 at 06:01:45 UTC, Joel wrote: I just get this: Debug adapter process has terminated unexpectedly can you run `gdb --interpreter=mi2` from the

Re: small promotion for Dlang and Mir

2016-09-13 Thread Ilya Yaroshenko via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 14:43:11 UTC, bachmeier wrote: On Tuesday, 13 September 2016 at 14:14:01 UTC, Ilya Yaroshenko wrote: [...] How stable is Mir? I have recently stripped my library for embedding R inside D down to the minimum amount and created an R package to do the

Re: small promotion for Dlang and Mir

2016-09-13 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 14:14:01 UTC, Ilya Yaroshenko wrote: 1. findRoot. D implementation is significantly better then 98% of others for the problem because the problem behaves like pathological. Thanks to ieeeMean 2. logmdigamma 3. logmdigammaInverse Damn, I didn't even realize

Re: iPhone vs Android

2016-09-13 Thread Kagamin via Digitalmars-d
On Tuesday, 13 September 2016 at 10:04:43 UTC, Andrei Alexandrescu wrote: Do you have a citation? The number I know is 3x from Emery Berger's (old) work. -- Andrei IIRC there was a thread about GC here where somebody posted a bunch of links to resources and benchmarks.

Re: Confusion over what types have value vs reference semantics

2016-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 13, 2016 15:27:07 Neurone via Digitalmars-d-learn wrote: > On Sunday, 11 September 2016 at 16:14:59 UTC, Mike Parker wrote: > > On Sunday, 11 September 2016 at 16:10:04 UTC, Mike Parker wrote: > >> And here, no memory is allocated. barSlice.ptr is the same as > >> bar.ptr and

Re: GC of const/immutable reference graphs

2016-09-13 Thread Stefan Koch via Digitalmars-d
On Tuesday, 13 September 2016 at 15:27:23 UTC, John Colvin wrote: For the following, lifetimeEnd(x) is the time of freeing of x. Given a reference graph and an const/immutable node n, all nodes reachable via n (let's call them Q(n)) must also be const/immutable, as per the rules of D's type

[Issue 16491] Forward referencing and static/shared static module constructors break initialisation

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16491 --- Comment #1 from Sobirari Muhomori --- Can't the name be immutable? immutable string someOtherClassName = SomeOtherClass.stringof; --

Re: Confusion over what types have value vs reference semantics

2016-09-13 Thread Neurone via Digitalmars-d-learn
On Sunday, 11 September 2016 at 16:14:59 UTC, Mike Parker wrote: On Sunday, 11 September 2016 at 16:10:04 UTC, Mike Parker wrote: And here, no memory is allocated. barSlice.ptr is the same as bar.ptr and barSlice.length is the same as bar.length. However, if you append a new element:

GC of const/immutable reference graphs

2016-09-13 Thread John Colvin via Digitalmars-d
For the following, lifetimeEnd(x) is the time of freeing of x. Given a reference graph and an const/immutable node n, all nodes reachable via n (let's call them Q(n)) must also be const/immutable, as per the rules of D's type system. In order to avoid dangling pointers: For all q in Q(n),

Re: iPhone vs Android

2016-09-13 Thread Kagamin via Digitalmars-d
On Tuesday, 13 September 2016 at 10:04:43 UTC, Andrei Alexandrescu wrote: Do you have a citation? The number I know is 3x from Emery Berger's (old) work. -- Andrei http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ http://www-cs.canisius.edu/~hertzm/gcmalloc-oopsla-2005.pdf Probably

Re: small promotion for Dlang and Mir

2016-09-13 Thread bachmeier via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 14:14:01 UTC, Ilya Yaroshenko wrote: Also you can help Mir in - 5 second: star the project https://github.com/libmir/mir - 1 hour+: - opt1: Write an article or about ndslice or mir.glas [6] (upcoming BLAS implementation in D) - opt2: Add small

Re: colour lib needs reviewers

2016-09-13 Thread John Colvin via Digitalmars-d
On Tuesday, 13 September 2016 at 09:31:53 UTC, Manu wrote: On 13 September 2016 at 17:47, John Colvin via Digitalmars-d wrote: On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Also can I swizzle channels directly? I could add something like: auto

Re: How to check member function for being @disable?

2016-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 13, 2016 04:58:38 Uranuz via Digitalmars-d-learn wrote: > In my code I iterate in CT over class methods marked as @property > and I have a probleme that one of methods is @disable. So I just > want to skip @disable members. I found possible solution, but > it's interesting to

Re: How to check member function for being @disable?

2016-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 13, 2016 08:28:10 Jonathan M Davis via Digitalmars-d- learn wrote: > On Tuesday, September 13, 2016 04:58:38 Uranuz via Digitalmars-d-learn wrote: > > In my code I iterate in CT over class methods marked as @property > > and I have a probleme that one of methods is @disable.

[Issue 16491] Forward referencing and static/shared static module constructors break initialisation

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16491 --- Comment #2 from Ethan Watson --- It is purely for illustrative/example purposes. The data I'm using cannot be immutable. --

Re: small promotion for Dlang and Mir

2016-09-13 Thread Ilya Yaroshenko via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 15:19:07 UTC, jmh530 wrote: On Tuesday, 13 September 2016 at 14:14:01 UTC, Ilya Yaroshenko wrote: 1. findRoot. D implementation is significantly better then 98% of others for the problem because the problem behaves like pathological. Thanks to ieeeMean 2.

Re: Beta D 2.071.2-b4

2016-09-13 Thread Johan Engelen via Digitalmars-d-announce
On Tuesday, 13 September 2016 at 14:00:26 UTC, Martin Nowak wrote: On Monday, 12 September 2016 at 07:47:19 UTC, Martin Nowak wrote: This comes with a different fix for Issue 15907 than 2.071.2-b3. There will be another beta tomorrow or so to include at least one more fix (for Issue 16460)

Re: How to check member function for being @disable?

2016-09-13 Thread Uranuz via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 15:32:57 UTC, Jonathan M Davis wrote: On Tuesday, September 13, 2016 08:28:10 Jonathan M Davis via Digitalmars-d- learn wrote: On Tuesday, September 13, 2016 04:58:38 Uranuz via Digitalmars-d-learn wrote: > In my code I iterate in CT over class methods marked

Re: How to check member function for being @disable?

2016-09-13 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 17:52:48 UTC, Jonathan M Davis wrote: It's really intended for disabling features that would normally be there. I don't know why it would ever make sense to @disable a normal function. Consider the case of `alias this` or a mixin template. You might make a

Re: iPhone vs Android

2016-09-13 Thread deadalnix via Digitalmars-d
On Tuesday, 13 September 2016 at 11:59:46 UTC, Shachar Shemesh wrote: On 13/09/16 02:21, deadalnix wrote: RC itself is not panacea, it doesn't work well with exceptions, generate a huge amount of code bloat, I will need explanation to those two. Assuming we have RAII, why doesn't RC work

Re: iPhone vs Android

2016-09-13 Thread Steven Schveighoffer via Digitalmars-d
On 9/13/16 2:24 PM, deadalnix wrote: This is why ObjC exeption handling and ARC never worked well together. This is why C++ exception are dog slow and this is why Swift is nothrow by default. Swift doesn't support exceptions AFAIK. It supports weird error handling that looks similar to

Re: Copy a struct and its context

2016-09-13 Thread Yuxuan Shui via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 01:32:19 UTC, Steven Schveighoffer wrote: On 9/12/16 4:11 PM, Ali Çehreli wrote: On 09/10/2016 10:44 PM, Yuxuan Shui wrote: I recently noticed nested struct capture its context by reference (which, BTW, is not mentioned at all here:

Re: colour lib needs reviewers

2016-09-13 Thread Random D user via Digitalmars-d
On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: Can you describe what you perceive to be hard? Well, I just skimmed through the docs and I didn't look at the code, so that sense it was an "honest" view for phobos proposal. Also I was trying to convey that based on the docs it

Re: iPhone vs Android

2016-09-13 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 13 September 2016 at 18:04:19 UTC, Jonathan M Davis wrote: On Tuesday, September 13, 2016 17:48:38 Laeeth Isharc via Digitalmars-d wrote: On Tuesday, 13 September 2016 at 11:59:46 UTC, Shachar Shemesh wrote: > On 13/09/16 02:21, deadalnix wrote: >> I stay convinced that an hybrid

Discarding all forum drafts at once

2016-09-13 Thread Nordlöw via Digitalmars-d-learn
I have lots of unsent drafts I would like to discard all at once. Is this possible somehow?

Re: colour lib needs reviewers

2016-09-13 Thread Random D user via Digitalmars-d
On Tuesday, 13 September 2016 at 02:00:44 UTC, Manu wrote: On 13 September 2016 at 07:00, Marco Leise via Digitalmars-d wrote: Am Tue, 13 Sep 2016 00:37:22 +1000 schrieb Manu via Digitalmars-d : Alright, but hybrid gamma is really not

Re: iPhone vs Android

2016-09-13 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 13 September 2016 at 11:59:46 UTC, Shachar Shemesh wrote: On 13/09/16 02:21, deadalnix wrote: I stay convinced that an hybrid approach is inevitable and am surprised why few are going there (hello PHP, here right). Here's my worries about the hybrid approach. The GC run time

Re: iPhone vs Android

2016-09-13 Thread deadalnix via Digitalmars-d
On Tuesday, 13 September 2016 at 10:04:43 UTC, Andrei Alexandrescu wrote: On 9/13/16 3:53 AM, Kagamin wrote: The rule of thumb is that for efficient operation an advanced GC consumes twice the used memory. Do you have a citation? The number I know is 3x from Emery Berger's (old) work. --

Re: iPhone vs Android

2016-09-13 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 13, 2016 17:48:38 Laeeth Isharc via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 11:59:46 UTC, Shachar Shemesh > > wrote: > > On 13/09/16 02:21, deadalnix wrote: > >> I stay convinced that an hybrid approach is inevitable and am > >> surprised > >> why few are

Re: iPhone vs Android

2016-09-13 Thread Andrei Alexandrescu via Digitalmars-d
On 9/13/16 1:51 PM, deadalnix wrote: On Tuesday, 13 September 2016 at 10:04:43 UTC, Andrei Alexandrescu wrote: On 9/13/16 3:53 AM, Kagamin wrote: The rule of thumb is that for efficient operation an advanced GC consumes twice the used memory. Do you have a citation? The number I know is 3x

Re: colour lib needs reviewers

2016-09-13 Thread Marco Leise via Digitalmars-d
Am Tue, 13 Sep 2016 12:00:44 +1000 schrieb Manu via Digitalmars-d : > What is the worth of storing alpha data if it's uniform 0xFF anyway? > It sounds like you mean rgbx, not rgba (ie, 32bit, but no alpha). > There should only be an alpha channel if there's actually

Re: How to check member function for being @disable?

2016-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 13, 2016 17:29:26 Uranuz via Digitalmars-d-learn wrote: > OK. Seems that there is nothing that I could do more about my > example code.. So the best way to be sure if something is > assignable property is to try assign to it and test whether it > compiles. The question was

Re: iPhone vs Android

2016-09-13 Thread Marco Leise via Digitalmars-d
Am Tue, 13 Sep 2016 18:16:27 + schrieb Laeeth Isharc : > Thanks you for the clear explanation. So if you don't have GC > allocations within RC structures and pick one or the other, then > the concern does not apply? That's right. Often such structures

UFCS for local symbols

2016-09-13 Thread Yuxuan Shui via Digitalmars-d
When I tried to use UFCS to call a nested function, I was surprised that it didn't work. Then I looked up the document, and found out this is actually by design. However, I found the reason listed in the document very unconvincing. I will copy the example here: int front(int[] arr) { return

Re: iPhone vs Android

2016-09-13 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 13, 2016 03:58:50 Walter Bright via Digitalmars-d wrote: > On 9/12/2016 4:21 PM, deadalnix wrote: > > I stay convinced that an hybrid approach is inevitable and am surprised > > why few are going there (hello PHP, here is a thing you get right). > > Interestingly, Warp (the C

Re: iPhone vs Android

2016-09-13 Thread Andrei Alexandrescu via Digitalmars-d
On 9/13/16 11:58 AM, Kagamin wrote: On Tuesday, 13 September 2016 at 10:04:43 UTC, Andrei Alexandrescu wrote: Do you have a citation? The number I know is 3x from Emery Berger's (old) work. -- Andrei http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ This suggests the ratio is 4x

Re: How to check member function for being @disable?

2016-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 13, 2016 17:59:09 Adam D. Ruppe via Digitalmars-d-learn wrote: > On Tuesday, 13 September 2016 at 17:52:48 UTC, Jonathan M Davis > > wrote: > > It's really intended for disabling features that would normally > > be there. I don't know why it would ever make sense to @disable

Re: GC of const/immutable reference graphs

2016-09-13 Thread Steven Schveighoffer via Digitalmars-d
On 9/13/16 11:27 AM, John Colvin wrote: For the following, lifetimeEnd(x) is the time of freeing of x. Given a reference graph and an const/immutable node n, all nodes reachable via n (let's call them Q(n)) must also be const/immutable, as per the rules of D's type system. In order to avoid

Re: iPhone vs Android

2016-09-13 Thread jmh530 via Digitalmars-d
On Tuesday, 13 September 2016 at 18:04:19 UTC, Jonathan M Davis wrote: As I understand it, [snnip] If you ever write a book, I would pre-order it.

Flycheck DMD Coverage and Dscanner Support

2016-09-13 Thread Nordlöw via Digitalmars-d-announce
I've added experimental support in Flycheck for highlighting all lines that have zero coverage at https://github.com/nordlow/elisp/blob/master/mine/flycheck-d-all.el Source is an extension of unittest add-ons in https://github.com/flycheck/flycheck-d-unittest. I've also had Flycheck-support

Critque of Rust's collection types

2016-09-13 Thread Walter Bright via Digitalmars-d
http://ticki.github.io/blog/horrible/ Some worthwhile insights into what makes a good collection type.

Can vibe d leverage existing web technologies?

2016-09-13 Thread Intersteller via Digitalmars-d-learn
vibe.d does not have much lateral support as the most commons web technologies do. Can vibe.d leverage pre-existing techs such as php, ruby/rails, etc? Starting from scratch and having to build a robust and secure framework is really not the way to go.

Re: iPhone vs Android

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/13/2016 4:59 AM, Shachar Shemesh wrote: Here's my worries about the hybrid approach. The GC run time is proportional not to the amount of memory you manage with the GC, but to the amount of memory that might hold a pointer to a GC managed memory. In other words, if most of my memory is RC

Re: iPhone vs Android

2016-09-13 Thread H. S. Teoh via Digitalmars-d
On Tue, Sep 13, 2016 at 03:19:54PM -0700, Jonathan M Davis via Digitalmars-d wrote: [...] > But none of the code that's marked @nogc can throw an exception unless > you're either dealing with pre-allocated exceptions (in which case, > they're less informative), I don't see why pre-allocated

Re: iPhone vs Android

2016-09-13 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 13 September 2016 at 19:30:16 UTC, Marco Leise wrote: Am Tue, 13 Sep 2016 18:16:27 + schrieb Laeeth Isharc : Thanks you for the clear explanation. So if you don't have GC allocations within RC structures and pick one or the other, then the

Re: iPhone vs Android

2016-09-13 Thread Lurker via Digitalmars-d
On Tuesday, 13 September 2016 at 22:19:54 UTC, Jonathan M Davis wrote: So, I really think that we need to find a way to make it so that exceptions aren't GC allocated normally anymore - or at least have a way to reasonably and easily not be GC allocated - but the problem is @nogc, not the

Re: iPhone vs Android

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/13/2016 4:13 PM, H. S. Teoh via Digitalmars-d wrote: There's nothing about the 'throw' keyword that requires GC allocation. It's just that `throw new Exception(...)` has become a standard incantation. The exception object itself can, for example, be emplaced onto a static buffer as I

Re: Copy a struct and its context

2016-09-13 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 01:32:19 UTC, Steven Schveighoffer wrote: On 9/12/16 4:11 PM, Ali Çehreli wrote: On 09/10/2016 10:44 PM, Yuxuan Shui wrote: I recently noticed nested struct capture its context by reference (which, BTW, is not mentioned at all here:

Re: iPhone vs Android

2016-09-13 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 13, 2016 18:50:20 jmh530 via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 18:04:19 UTC, Jonathan M Davis > > wrote: > > As I understand it, [snnip] > > If you ever write a book, I would pre-order it. LOL. It's on my unfinished projects list, so I intend to

Re: colour lib needs reviewers

2016-09-13 Thread Basile B. via Digitalmars-d
On Tuesday, 13 September 2016 at 02:00:44 UTC, Manu wrote: What is the worth of storing alpha data if it's uniform 0xFF anyway? He he, that's the big problem with classic image formats. When a graphic is described in term of vector, fill, stroke, gradient, layer, etc (not to name SVG)

Re: Copy a struct and its context

2016-09-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/13/16 3:42 PM, Yuxuan Shui wrote: On Tuesday, 13 September 2016 at 01:32:19 UTC, Steven Schveighoffer wrote: On 9/12/16 4:11 PM, Ali Çehreli wrote: On 09/10/2016 10:44 PM, Yuxuan Shui wrote: I recently noticed nested struct capture its context by reference (which, BTW, is not mentioned

Re: pure functions

2016-09-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/13/16 4:08 PM, Patrick Schluter wrote: On Tuesday, 13 September 2016 at 06:59:10 UTC, Jonathan M Davis wrote: On Tuesday, September 13, 2016 03:33:04 Ivy Encarnacion via Digitalmars-d- learn wrote: A pure function cannot call any function that is not pure [...] I've read that a lot but

Re: pure functions

2016-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, September 13, 2016 20:08:22 Patrick Schluter via Digitalmars-d- learn wrote: > On Tuesday, 13 September 2016 at 06:59:10 UTC, Jonathan M Davis > > wrote: > > On Tuesday, September 13, 2016 03:33:04 Ivy Encarnacion via > > > > Digitalmars-d- learn wrote: > > A pure function cannot call

Re: Virtual Methods hurting performance in the DMD frontend

2016-09-13 Thread Stefan Koch via Digitalmars-d
On Monday, 12 September 2016 at 08:03:45 UTC, Stefan Koch wrote: On Sunday, 11 September 2016 at 21:48:56 UTC, Stefan Koch wrote: Those are indirect class I meant indirect calls! @Jacob Yes that is my indented solution. Having a type-field in root-object. A Small update on this. When dmd

Re: pure functions

2016-09-13 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 06:59:10 UTC, Jonathan M Davis wrote: On Tuesday, September 13, 2016 03:33:04 Ivy Encarnacion via Digitalmars-d- learn wrote: A pure function cannot call any function that is not pure [...] I've read that a lot but it's not true. A pure function can call

[Issue 16486] Compiler see template alias like a separate type in template function definition

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16486 --- Comment #4 from Sky Thirteenth --- (In reply to Steven Schveighoffer from comment #3) > The issue is that the compiler doesn't replace the alias until AFTER > instantiation. > > It should be able to see that: > >

[Issue 15088] timer_t should be void*, not int

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15088 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/2c910837f8f3f6a247e252780be2bf2d67df7e03 Bug 15088: timer_t should be void* on glibc

[Issue 15088] timer_t should be void*, not int

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15088 David Nadlinger changed: What|Removed |Added Status|NEW |RESOLVED

Re: Copy a struct and its context

2016-09-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/13/16 4:11 PM, Yuxuan Shui wrote: On Tuesday, 13 September 2016 at 20:00:40 UTC, Steven Schveighoffer wrote: Not familiar with C++ lambda. You can always "specify" how to capture the data by directly declaring it: auto foo() { int x; static struct S { int x; }

Re: Copy a struct and its context

2016-09-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/13/16 5:01 PM, Yuxuan Shui wrote: For example, a common use case might be I want to capture everything by value. In stead of adding all the fields by hand and passing them to the constructor, I want the compiler to do it for me. i.e. I wish I could (borrowing C++ syntax): struct A[=] {

[Issue 16486] Compiler see template alias like a separate type in template function definition

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16486 --- Comment #6 from Sky Thirteenth --- (In reply to ag0aep6g from comment #5) > (In reply to Sky Thirteenth from comment #4) > > it can be pretty useful feature. > > Sure. I don't think anyone disputes that it could be a

Re: iPhone vs Android

2016-09-13 Thread deadalnix via Digitalmars-d
On Tuesday, 13 September 2016 at 22:19:54 UTC, Jonathan M Davis wrote: The big problem with exceptions being allocated by the GC isn't really the GC but @nogc. No the problem IS @nogc . Allocating with the GC is absolutely not a problem is you deallocate properly. What is a problem is when

Re: Copy a struct and its context

2016-09-13 Thread Yuxuan Shui via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 20:36:22 UTC, Steven Schveighoffer wrote: On 9/13/16 4:11 PM, Yuxuan Shui wrote: On Tuesday, 13 September 2016 at 20:00:40 UTC, Steven Schveighoffer wrote: Not familiar with C++ lambda. You can always "specify" how to capture the data by directly declaring it:

Re: Copy a struct and its context

2016-09-13 Thread Yuxuan Shui via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 20:00:40 UTC, Steven Schveighoffer wrote: On 9/13/16 3:42 PM, Yuxuan Shui wrote: [...] There's nothing in the language to prevent this optimization. [...] Again, could be clearer. But the fact that both the function and the struct affect the same data

Re: Discarding all forum drafts at once

2016-09-13 Thread Basile B. via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 18:15:56 UTC, Nordlöw wrote: I have lots of unsent drafts I would like to discard all at once. Is this possible somehow? Delete the cookies.

[Issue 16486] Compiler see template alias like a separate type in template function definition

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16486 --- Comment #5 from ag0ae...@gmail.com --- (In reply to Sky Thirteenth from comment #4) > it can be pretty useful feature. Sure. I don't think anyone disputes that it could be a useful feature. So we keep the issue open as an enhancement request.

Re: iPhone vs Android

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/13/2016 10:44 AM, Jonathan M Davis via Digitalmars-d wrote: Folks have posted here before about taking that approach with games and the like that they've written. In a number cases, simply being careful about specific pieces of code and avoiding the GC in those cases was enough to get the

Re: iPhone vs Android

2016-09-13 Thread jmh530 via Digitalmars-d
On Tuesday, 13 September 2016 at 20:19:40 UTC, Jonathan M Davis wrote: LOL. It's on my unfinished projects list, so I intend to complete it at some point, but unfortunately, it's been on the backburner for a while. Still, it's funny that you say that considering how many typos were in that

Re: iPhone vs Android

2016-09-13 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, September 13, 2016 14:43:09 Walter Bright via Digitalmars-d wrote: > Case in point, exceptions. Currently exceptions are fairly wedded to being > GC allocated. Some people have opined that this is a major problem, and it > is if the app is throwing a lot of exceptions. But exceptions

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 00:56, John Colvin via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 09:31:53 UTC, Manu wrote: >> >> On 13 September 2016 at 17:47, John Colvin via Digitalmars-d >> wrote: >>> >>> On Tuesday, 13 September

zip: why isn't requireSameLength the default?

2016-09-13 Thread Timothee Cour via Digitalmars-d-learn
in zip: why isn't requireSameLength the default? This is the most common case and would fit with the goal of being safe by default.

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 04:34, Marco Leise via Digitalmars-d wrote: > Am Tue, 13 Sep 2016 12:00:44 +1000 > schrieb Manu via Digitalmars-d : > >> What is the worth of storing alpha data if it's uniform 0xFF anyway? >> It sounds like you

Re: iPhone vs Android

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/13/2016 11:24 AM, deadalnix wrote: No you don't, as how often the GC kicks in depend of the rate at which you produce garbage, which is going to be very low with an hybrid approach. Also, if you only use GC for exceptions, there isn't going to be much memory it needs to scan.

Re: iPhone vs Android

2016-09-13 Thread Andrei Alexandrescu via Digitalmars-d
On 09/13/2016 05:43 PM, Walter Bright wrote: The all-or-nothing approach to using the GC is as wrong as any programming methodology is. That's a bit much. There's currently nothing that would prevent any handler code from saving a reference to the thrown exception. Statically allocating them

Status of static control flow? static foreach?

2016-09-13 Thread Tofu Ninja via Digitalmars-d
Sorry, I have not kept up in the forums for a while. Was just curious on what the current status of static control flow was for D. The only one I have heard about was static foreach, what happend, are we going to get it? We have static if, are we going to get other static control flow like

Re: iPhone vs Android

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/13/2016 6:09 PM, Andrei Alexandrescu wrote: On 09/13/2016 05:43 PM, Walter Bright wrote: There's currently nothing that would prevent any handler code from saving a reference to the thrown exception. Statically allocating them would break that. Didn't we reach the agreement to closely

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 04:10, Random D user via Digitalmars-d wrote: > > In general, I think basics should be dead simple (even over simplified for > the very basic case) I think they are: import std.experimental.color; RGB8 color("red"); I don't think i's

Re: Critque of Rust's collection types

2016-09-13 Thread Basile B. via Digitalmars-d
On Wednesday, 14 September 2016 at 00:36:39 UTC, Walter Bright wrote: On 9/13/2016 4:47 PM, Walter Bright wrote: http://ticki.github.io/blog/horrible/ Some worthwhile insights into what makes a good collection type. https://news.ycombinator.com/item?id=12488233 Of particular interest is

Re: Should debug{} allow GC?

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 10:37, Walter Bright via Digitalmars-d wrote: > On 9/12/2016 6:26 PM, Manu via Digitalmars-d wrote: >> >> I'm concerned this would undermind @nogc... If this is supplied in the >> std library, people will use it, and then you get to a place

[Issue 16492] New: support @nogc in debug{} blocks

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16492 Issue ID: 16492 Summary: support @nogc in debug{} blocks Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

[Issue 16466] Alignment of reals inside structs on 32 bit OSX should be 16, not 8

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16466 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16466] Alignment of reals inside structs on 32 bit OSX should be 16, not 8

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16466 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e4935fb9f3b779792ee8c0d300db8e83358b27a6 fix Issue 16466 - Alignment of reals inside structs on 32 bit

Re: Critque of Rust's collection types

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/13/2016 4:47 PM, Walter Bright wrote: http://ticki.github.io/blog/horrible/ Some worthwhile insights into what makes a good collection type. https://news.ycombinator.com/item?id=12488233 Of particular interest is the advocacy of collision attack resistance. Is anyone interested in

Re: Should debug{} allow GC?

2016-09-13 Thread Walter Bright via Digitalmars-d
On 9/12/2016 6:26 PM, Manu via Digitalmars-d wrote: I'm concerned this would undermind @nogc... If this is supplied in the std library, people will use it, and then you get to a place where you can't rely on @nogc anymore. debug{} blocks sound much safer to me. Yeah, I agree. Do you wanna

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 14 September 2016 at 04:25, Random D user via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 02:00:44 UTC, Manu wrote: >> >> On 13 September 2016 at 07:00, Marco Leise via Digitalmars-d >> wrote: >>> >>> Am Tue, 13 Sep 2016

Re: Can vibe d leverage existing web technologies?

2016-09-13 Thread Brad Anderson via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 23:45:18 UTC, Intersteller wrote: vibe.d does not have much lateral support as the most commons web technologies do. Can vibe.d leverage pre-existing techs such as php, ruby/rails, etc? Starting from scratch and having to build a robust and secure framework is

[Issue 16031] [REG2.071] stale DW.ref.name EH symbol used with -lib and -fPIC

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16031 Martin Nowak changed: What|Removed |Added Keywords||EH, pull CC|

[Issue 16243] wrong C++ argument passing with empty struct and 6 integers

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16243 --- Comment #10 from Joakim --- I ran into this on Android/ARM too, with ldc. As the linked ldc comment and Jacob note, this is an incompatibility in the way clang and gcc work with empty structs on every platform, whether

Re: Release D 2.071.0

2016-09-13 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 2 May 2016 at 16:47:13 UTC, Márcio Martins wrote: Since this release is not critical for us, despite including many great changes, we will also stick to DMD 2.070.2 and hope for a fix in a future release, if at all possible. There is an issue by now

Re: iPhone vs Android

2016-09-13 Thread Shachar Shemesh via Digitalmars-d
On 14/09/16 02:59, Walter Bright wrote: Memory allocated with malloc() is unknown to the GC. This works fine unless a reference to the GC memory is inserted into malloc'd data, which is why there's an API to the GC to let it know about such things. But if you do want to allow it, then my

ddoc latex/formulas?

2016-09-13 Thread Manu via Digitalmars-d
Can we produce formulas, or latex in ddoc? Are there any examples in phobos I can refer to?

Re: colour lib needs reviewers

2016-09-13 Thread Manu via Digitalmars-d
On 13 September 2016 at 17:47, John Colvin via Digitalmars-d wrote: > On Tuesday, 13 September 2016 at 01:05:56 UTC, Manu wrote: >>> >>> Also can I swizzle channels directly? >> >> >> I could add something like: >> auto brg = c.swizzle!"brg"; >> >> The result would

Fiber Concurrency Showcase

2016-09-13 Thread Nordlöw via Digitalmars-d-learn
I would like to experiment with Fibers/Coroutines in D/vibe.d. I'm missing a code example in std.concurrency that highlights an example of using Fibers for massive concurrency. Could anybody show me such a code example or link to a more descriptive tutorial?

Re: iPhone vs Android

2016-09-13 Thread Andrei Alexandrescu via Digitalmars-d
On 9/13/16 3:53 AM, Kagamin wrote: The rule of thumb is that for efficient operation an advanced GC consumes twice the used memory. Do you have a citation? The number I know is 3x from Emery Berger's (old) work. -- Andrei

Re: Fiber Concurrency Showcase

2016-09-13 Thread Marc Schütz via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 10:02:28 UTC, Andrea Fontana wrote: On Tuesday, 13 September 2016 at 09:46:46 UTC, Nordlöw wrote: I would like to experiment with Fibers/Coroutines in D/vibe.d. I'm missing a code example in std.concurrency that highlights an example of using Fibers for

Phobos request: function to get the available disk space

2016-09-13 Thread Johan Engelen via Digitalmars-d
Hope I can motivated someone to work on adding a function to Phobos that returns the available disk space (on a given path): https://issues.dlang.org/show_bug.cgi?id=16487 (I needed this for file cache management in LDC, and was surprised I had to write my own.) I think it'd be a valuable

Re: Binary heap: obtain a _reference_ to the front of the heap

2016-09-13 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 13 September 2016 at 08:19:04 UTC, Johan Engelen wrote: In the binary heap documentation, I read that `BinaryHeap.front()` "Returns a copy of the front of the heap". [1] Is there no function to access the front of the heap without a copy? (micro-optimization) Thanks, Johan

Re: iPhone vs Android

2016-09-13 Thread Paulo Pinto via Digitalmars-d
On Monday, 12 September 2016 at 22:57:23 UTC, Andrei Alexandrescu wrote: An interesting article written for laypeople: http://www.theverge.com/2016/9/12/12886058/iphone-7-specs-competition One quote that may be of relevance to us: "As to the iPhone’s memory, this is more of a philosophical

[Issue 16487] Add function to obtain the available disk space

2016-09-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16487 --- Comment #5 from Johan Engelen --- (In reply to b2.temp from comment #4) > 2. returns -1 on failure. ulong.max: No way !!! The return type is _unsigned_. Throwing an exception is also a possibility. --

Re: iPhone vs Android

2016-09-13 Thread angel via Digitalmars-d
I think the conclusions about iOS vs. Android OS-level memory collection are not applicable to D GC discussion. An OS collects all the memory pages allocated for a process upon exit - no heap scan, no RC. It more resembles a one huge free() call. The discussion is mainly about eager vs.

  1   2   >