Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Basile B. via Digitalmars-d
On Thursday, 25 August 2016 at 22:37:13 UTC, kinke wrote: On Thursday, 25 August 2016 at 18:15:47 UTC, Basile B. wrote: From my perspective, the problem with this example isn't missed optimization potential. It's the code itself. Why waste implementation efforts for such optimizations, if that

[Issue 15703] @safe code should not allow certain types of array casts

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15703 Walter Bright changed: What|Removed |Added Keywords||pull --- Comment

Re: yet another event loop

2016-08-25 Thread Bill Hicks via Digitalmars-d-announce
On Wednesday, 24 August 2016 at 18:03:39 UTC, Eugene Wissner wrote: https://github.com/caraus-ecms/tanya Ok there are not so many event loops in D and here an another one and its name is "tanya". Could you change the name to something more recognizable to help with D's popularity?

Re: Silicon Valley D Meetup August 25, 2016 - Fireside Chat with Andrei Alexandrescu

2016-08-25 Thread Ali Çehreli via Digitalmars-d-announce
https://hangouts.google.com/hangouts/_/mzzn5vtm4fd5diil6sx56eq244e?authuser=1=en Ali On 08/24/2016 12:17 PM, Ali Çehreli wrote: We will post a Google Hangouts link here at the start at 19:00 (7pm) Pacific time: http://www.meetup.com/D-Lang-Silicon-Valley/events/232970396/ Please try to

[Issue 16424] No "DUB" component for bug reports

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16424 greensunn...@gmail.com changed: What|Removed |Added CC||greensunn...@gmail.com --- Comment

[Issue 16431] rdmd is slower than DUB

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16431 --- Comment #2 from greensunn...@gmail.com --- > I don't think this is much of a surprise. rdmd detects dependencies. dub > doesn't seem to do that. Well, it still seems unnecessary to me to run the full-blown CTFE compiler twice on a file. I gave

Re: Minor updates: gen-package-version v1.0.4 and sdlang-d v0.9.6

2016-08-25 Thread Nick Sabalausky via Digitalmars-d-announce
On 08/25/2016 06:37 PM, Chris Wright wrote: On Tue, 23 Aug 2016 12:19:12 -0400, Nick Sabalausky wrote: Couple very minor updates: Please, for the love of potatoes, tell people what the project is for! Oops, right, I did forget that this time, didn't I. Posted too hastily!

[Issue 15660] break "immutable" with pure function and mutable reference params

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15660 Walter Bright changed: What|Removed |Added CC|

[Issue 14238] DIP25: escape checks can be circumvented with delegate

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14238 Walter Bright changed: What|Removed |Added Keywords||pull --

Possible range idiom that I find useful, especially in @nogc

2016-08-25 Thread Tofu Ninja via Digitalmars-d
So this is a small thing but I find it definitely useful in my own ranges and wished the ranges in phobos did this. A lot of ranges in phobos take an alias to a function and somehow use that to generate the output range, for example map. But it can be annoying when your map function needs

[Issue 16365] cannot allow calling function pointer from delegate in @safe code

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16365 Walter Bright changed: What|Removed |Added Keywords||pull --- Comment

[Issue 16365] cannot allow calling function pointer from delegate in @safe code

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16365 --- Comment #4 from Walter Bright --- Related PR: https://github.com/dlang/dmd/pull/5860 --

[Issue 16365] cannot allow calling function pointer from delegate in @safe code

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16365 Walter Bright changed: What|Removed |Added Hardware|x86_64 |All See

[Issue 11176] array.ptr in @safe code may point past end of array

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11176 Walter Bright changed: What|Removed |Added See Also|

Re: Minor updates: gen-package-version v1.0.4 and sdlang-d v0.9.6

2016-08-25 Thread Chris Wright via Digitalmars-d-announce
On Tue, 23 Aug 2016 12:19:12 -0400, Nick Sabalausky wrote: > Couple very minor updates: Please, for the love of potatoes, tell people what the project is for! gen-package-version creates a package version string for D projects. Add a hook to your dub.json and then you can show off what version

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread kinke via Digitalmars-d
On Thursday, 25 August 2016 at 18:15:47 UTC, Basile B. wrote: The problem here that the example is bad with too agressive optimizations because the CALLs are eliminated despite of no inlining. [...] int use(const(Foo) foo) { return foo.foo() + foo.foo(); } From my perspective, the

Re: [GSoC] std.experimental.xml is now a PR!

2016-08-25 Thread Lurker via Digitalmars-d-announce
On Wednesday, 24 August 2016 at 09:31:44 UTC, Lodovico Giaretta wrote: Hi! I'm pleased to announce that my GSoC project, a replacement for the outdated std.xml, is now a Phobos PR! [1] It is an (almost complete) mirror of my repository [2], which is also available on DUB [3]. I would like

[Issue 16431] rdmd is slower than DUB

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16431 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #1 from

Re: Usability of D on windows?

2016-08-25 Thread John Burton via Digitalmars-d
On Thursday, 25 August 2016 at 20:47:28 UTC, David Nadlinger wrote: On Thursday, 25 August 2016 at 20:31:59 UTC, John Burton wrote: I'll try to get a self contained report tomorrow. Please do – the -deps switch is certainly not the most well-tested part of LDC. It mostly inherits this part

Re: std.functional.compose compilation error

2016-08-25 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 25 August 2016 at 14:30:00 UTC, Meta wrote: On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi wrote: Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3

[Issue 16431] New: rdmd is slower than DUB

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16431 Issue ID: 16431 Summary: rdmd is slower than DUB Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1

Re: Usability of D on windows?

2016-08-25 Thread David Nadlinger via Digitalmars-d
On Thursday, 25 August 2016 at 20:31:59 UTC, John Burton wrote: I'll try to get a self contained report tomorrow. Please do – the -deps switch is certainly not the most well-tested part of LDC. It mostly inherits this part of the code from DMD, but there might be a subtle, unintentional

Re: Judy Arrays

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 20:42:42 UTC, Illuminati wrote: http://judy.sourceforge.net/downloads/10minutes.htm Would be nice to have such an implementation. Supposedly one of the best all around data structures in existence? Maybe D could be used to make them work with arbitrary

Judy Arrays

2016-08-25 Thread Illuminati via Digitalmars-d-learn
http://judy.sourceforge.net/downloads/10minutes.htm Would be nice to have such an implementation. Supposedly one of the best all around data structures in existence? Maybe D could be used to make them work with arbitrary cache-sizes? Anyone up for the challenge?

Re: Nogc Associative Array?

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 20:11:32 UTC, Laeeth Isharc wrote: On Thursday, 25 August 2016 at 18:14:42 UTC, Illuminati wrote: Does D have a non-gc based associative array? If not, what would be a good way to go about creating one? See EMSI containers in code.dlang.org Thanks.

Re: Usability of D on windows?

2016-08-25 Thread John Burton via Digitalmars-d
On Thursday, 25 August 2016 at 11:52:51 UTC, Kagamin wrote: On Thursday, 25 August 2016 at 09:57:28 UTC, John Burrton wrote: I'll try to find a small test case that crashes the compiler in visual D and check out what version I'm using etc, and submit a bug report if I am able. Did you try to

Re: union mutability

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 19:43:49 Jack Applegame via Digitalmars-d-learn wrote: > Also I hate Rebindable. Yeah, well, without a language change, it's the best that we have for dealing with the problem that it's designed to solve. D just isn't designed with the idea that there's any

[Issue 16365] cannot allow calling function pointer from delegate in @safe code

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16365 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/3eece2fe875d35db428229b1121eda13e85b3883 partial solution for Issue 16365 - cannot allow calling

Re: Nogc Associative Array?

2016-08-25 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 25 August 2016 at 18:14:42 UTC, Illuminati wrote: Does D have a non-gc based associative array? If not, what would be a good way to go about creating one? See EMSI containers in code.dlang.org

Re: Minor updates: gen-package-version v1.0.4 and sdlang-d v0.9.6

2016-08-25 Thread Seb via Digitalmars-d-announce
On Thursday, 25 August 2016 at 18:05:13 UTC, Nick Sabalausky wrote: On 08/24/2016 11:16 AM, Martin Nowak wrote: [...] I have nothing against it, I think it would be a fine optional feature for dub. I won't be putting together a PR for it though, and I don't think there's all that much of a

Re: union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Thursday, 25 August 2016 at 19:19:49 UTC, Jonathan M Davis wrote: Why? I don't know exactly what that PR is supposed to do, but std.datetime uses immutable time zone objects, and if that PR made it so that you couldn't have an immutable instance of a class, then it would have failed the

Re: union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
Also I hate Rebindable.

Re: union mutability

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 18:27:25 Jack Applegame via Digitalmars-d-learn wrote: > On Thursday, 25 August 2016 at 17:01:40 UTC, Meta wrote: > > This should be fixed pretty soon: > > https://github.com/dlang/dmd/pull/5940 > > Bye-bye immutable classes. :'( Why? I don't know exactly what that

[Issue 5172] ModuleInfo's flags not correct WRT class static ctor/dtor when compiled with -lib

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5172 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread kinke via Digitalmars-d
On Thursday, 25 August 2016 at 18:09:14 UTC, Cecil Ward wrote: On Thursday, 25 August 2016 at 18:07:14 UTC, Cecil Ward wrote: On Thursday, 25 August 2016 at 17:22:27 UTC, kinke wrote: [...] I think that here the optimisation is only because LDC can “see” the text of the method. When

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cecil Ward via Digitalmars-d
On Thursday, 25 August 2016 at 18:17:21 UTC, Cecil Ward wrote: On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: * special values of objects such zero, and one, so that that (x ⊛ zero) ≡ x, and that (zero ⊛ x) ≡ x (Should of course read (x ⊛ zero) ≡ zero, and that (one

Re: union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Thursday, 25 August 2016 at 17:01:40 UTC, Meta wrote: This should be fixed pretty soon: https://github.com/dlang/dmd/pull/5940 Bye-bye immutable classes. :'(

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread ag0aep6g via Digitalmars-d
On 08/25/2016 08:15 PM, Basile B. wrote: Here's a better code to illustrate the idea: °° interface Foo { int foo() const; } int use(const(Foo) foo) { return foo.foo() + foo.foo(); } °° And I'd expect this asm for a 'const optimization' in

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Basile B. via Digitalmars-d
On Thursday, 25 August 2016 at 17:22:27 UTC, kinke wrote: I found it hard to believe LDC generates such crappy code when Yes that's right, there was an error in my script! What I've posted is actually the asm without -O. Sure, Foo.foo() and use() could return a constant, but otherwise it

Re: nested enum

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 01:37:05 UTC, Mike Parker wrote: On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote: How can I create nested enum like structures? instead of Enum.X_Y I would like to access like Enum.X.Y Yet I want it to behave exactly as an enum. I just want to

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cecil Ward via Digitalmars-d
On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: ... A useful phrase I saw today: “declaration of intent given by the programmer to the compiler”. Particular dream wish-list items of mine: some kind of mechanism that could express possible operator properties, classes

Re: C# 7 Features - Tuples

2016-08-25 Thread rumbu via Digitalmars-d
On Thursday, 25 August 2016 at 14:43:35 UTC, Dominikus Dittes Scherkl wrote: But I dislike the named tuple members. Why not declare them at the calling site? (int, int, int, string) fn() { return (3, 2, 1, "meins"); } int x, y, z; string s; (x, y, z, s) = fn(); This is possible: "

Re: std.functional.compose compilation error

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 17:50:44 bachmeier via Digitalmars-d-learn wrote: > On Thursday, 25 August 2016 at 17:49:26 UTC, bachmeier wrote: > > On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis > > > > wrote: > >> Yes. Because the module is compose, within that file, compose > >>

Nogc Associative Array?

2016-08-25 Thread Illuminati via Digitalmars-d-learn
Does D have a non-gc based associative array? If not, what would be a good way to go about creating one?

Re: C# 7 Features - Tuples

2016-08-25 Thread Timon Gehr via Digitalmars-d
On 25.08.2016 16:43, Dominikus Dittes Scherkl wrote: On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote: https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/ came across the new c# features today. I really liked the syntax for Tuples (and deconstructors), would be

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cecil Ward via Digitalmars-d
On Thursday, 25 August 2016 at 17:22:27 UTC, kinke wrote: I found it hard to believe LDC generates such crappy code when optimizing. These are my results using LDC master on Win64 (`ldc2 -O -release -output-s`): struct Foo { immutable _u = 8; int foo() const { return 8 *

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cecil Ward via Digitalmars-d
On Thursday, 25 August 2016 at 18:07:14 UTC, Cecil Ward wrote: On Thursday, 25 August 2016 at 17:22:27 UTC, kinke wrote: [...] I think that here the optimisation is only because LDC can “see” the text of the method. When expansion is not possible, that would be the real test. (Assuming

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cecil Ward via Digitalmars-d
On Thursday, 25 August 2016 at 14:42:28 UTC, Basile B. wrote: On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: [...] I'll add * create temporaries based on the const function attribute. I don't know why but I believed that it was already the case. After disassembling a short

Re: Minor updates: gen-package-version v1.0.4 and sdlang-d v0.9.6

2016-08-25 Thread Nick Sabalausky via Digitalmars-d-announce
On 08/24/2016 11:16 AM, Martin Nowak wrote: On Tuesday, 23 August 2016 at 16:19:12 UTC, Nick Sabalausky wrote: gen-package-version v1.0.4: What's your stance on including that functionality into dub? I have nothing against it, I think it would be a fine optional feature for dub. I won't

Re: Do you like bounded integrals?

2016-08-25 Thread Andrei Alexandrescu via Digitalmars-d
Update: I've taken a shot at adding bounds, see https://github.com/dlang/phobos/pull/4613/commits/bbdcea723e3dd98a979ae3f06a6786645647a778. Here are a few notes: * The Hook API works nicely with built-in or custom hooks, so no change there was necessary. * The constructor got quite a bit

Re: std.functional.compose compilation error

2016-08-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 August 2016 at 17:49:26 UTC, bachmeier wrote: On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis wrote: Yes. Because the module is compose, within that file, compose will refer to the module, not anything you import. The selective import essentially creates a local

Re: std.functional.compose compilation error

2016-08-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis wrote: Yes. Because the module is compose, within that file, compose will refer to the module, not anything you import. The selective import essentially creates a local alias like alias compose = std.functional.compose; as part

[Issue 16430] Show a warning when a semicolon is used after a struct or enum definition

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16430 --- Comment #4 from ag0ae...@gmail.com --- (In reply to Steven Schveighoffer from comment #3) > (In reply to ag0aep6g from comment #2) > > I'd suggest warning on every empty DeclDef and not only on those behind > > structs/enums. > > for(;;)

Re: 16MB static arrays again...

2016-08-25 Thread Tomer Filiba via Digitalmars-d
On Wednesday, 24 August 2016 at 18:16:01 UTC, Walter Bright wrote: On 8/24/2016 3:35 AM, Tomer Filiba wrote: ... Our configuration is a struct of several static hash tables (allocated in-place, not via GC). So the entire configuration is contiguous in memory ... If I understand you

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread kinke via Digitalmars-d
I found it hard to believe LDC generates such crappy code when optimizing. These are my results using LDC master on Win64 (`ldc2 -O -release -output-s`): struct Foo { immutable _u = 8; int foo() const { return 8 * _u; } } int use(ref const(Foo) foo) { return

[Issue 16430] Show a warning when a semicolon is used after a struct or enum definition

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

Re: union mutability

2016-08-25 Thread Meta via Digitalmars-d-learn
On Thursday, 25 August 2016 at 15:22:23 UTC, Jack Applegame wrote: Code: union A { immutable int f; } union B { immutable int f; int e; } void main() { A a = A(1); //a = A(2); // a.f is immutable, fails to compile as expected B b = B(1); b = B(2); //

[Issue 16430] Show a warning when a semicolon is used after a struct or enum definition

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16430 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #2 from

Re: union mutability

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 15:22:23 Jack Applegame via Digitalmars-d-learn wrote: > Code: > > union A { > immutable int f; > } > > union B { > immutable int f; > int e; > } > > void main() { > A a = A(1); > //a = A(2); // a.f is immutable, fails to compile as expected >

[Issue 16430] Show a warning when a semicolon is used after a struct or enum definition

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16430 b2.t...@gmx.com changed: What|Removed |Added CC||b2.t...@gmx.com --- Comment #1 from

Re: C# 7 Features - Tuples

2016-08-25 Thread jmh530 via Digitalmars-d
On Thursday, 25 August 2016 at 15:50:09 UTC, Seb wrote: https://dlang.org/deprecate.html#Using%20the%20result%20of%20a%20comma%20expression https://github.com/dlang/dmd/pull/5737 However working out the rules and changes for a Tuple syntax would be a great topic for a DIP:

Re: Avoid zombie processes with std.process

2016-08-25 Thread FreeSlave via Digitalmars-d
On Thursday, 25 August 2016 at 14:53:30 UTC, Shachar Shemesh wrote: On 25/08/16 11:46, FreeSlave wrote: On Thursday, 25 August 2016 at 07:32:29 UTC, Shachar Shemesh wrote: On 24/08/16 14:04, FreeSlave wrote: Are there plans on adding something like spawnProcessDetached that would start

Re: nested enum

2016-08-25 Thread Seb via Digitalmars-d-learn
On Thursday, 25 August 2016 at 11:09:43 UTC, Cauterite wrote: On Thursday, 25 August 2016 at 10:36:21 UTC, Daniel Kozak wrote: Btw, tehre is no need for extra semicolon (`;`) after enum and struct definition Thanks. This forum insists on reminding me every time I write code here. Warning

[Issue 16430] New: Show a warning when a semicolon is used after a struct or enum definition

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16430 Issue ID: 16430 Summary: Show a warning when a semicolon is used after a struct or enum definition Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 16428] Better error message for pattern matching of value template parameters

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16428 Andrei Alexandrescu changed: What|Removed |Added Summary|Cannot pattern match value |Better error

Re: C# 7 Features - Tuples

2016-08-25 Thread Seb via Digitalmars-d
On Thursday, 25 August 2016 at 15:02:06 UTC, Steven Schveighoffer wrote: On 8/25/16 10:43 AM, Dominikus Dittes Scherkl wrote: On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote: https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/ came across the new c# features

[Issue 16428] Better error message for pattern matching of value template parameters

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16428 --- Comment #3 from Andrei Alexandrescu --- The error message should be better. Currently: static assert(is(A!(int, 42) == A!(T, x), __isexp_id52, T, x)) is false Proposed: static assert(is(A!(int, 42) == A!(T, x), T, x)) is

[Issue 16429] New: Sorted multimap data structure based on std.container.rbtree

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16429 Issue ID: 16429 Summary: Sorted multimap data structure based on std.container.rbtree Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW

union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
Code: union A { immutable int f; } union B { immutable int f; int e; } void main() { A a = A(1); //a = A(2); // a.f is immutable, fails to compile as expected B b = B(1); b = B(2); // compiles!!! } It turns out that if the union contains at least one

[Issue 16428] Cannot pattern match value template parameter

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16428 John Colvin changed: What|Removed |Added CC|

Re: std.functional.compose compilation error

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 14:30:00 Meta via Digitalmars-d-learn wrote: > On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi wrote: > > Hello, > > > > Trying to compile this example from Chuck Allison: > > --- > > import std.stdio; > > import

Re: Pattern matching value template parameters

2016-08-25 Thread Andrei Alexandrescu via Digitalmars-d
On 08/25/2016 10:56 AM, Meta wrote: On Thursday, 25 August 2016 at 14:53:46 UTC, Meta wrote: On Thursday, 25 August 2016 at 14:35:06 UTC, Andrei Alexandrescu wrote: Does anyone have a workaround for https://issues.dlang.org/show_bug.cgi?id=16428? Thanks! -- Andrei I don't get that error

Re: C# 7 Features - Tuples

2016-08-25 Thread Steven Schveighoffer via Digitalmars-d
On 8/25/16 10:43 AM, Dominikus Dittes Scherkl wrote: On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote: https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/ came across the new c# features today. I really liked the syntax for Tuples (and deconstructors), would be

Re: Pattern matching value template parameters

2016-08-25 Thread Meta via Digitalmars-d
On Thursday, 25 August 2016 at 14:53:46 UTC, Meta wrote: On Thursday, 25 August 2016 at 14:35:06 UTC, Andrei Alexandrescu wrote: Does anyone have a workaround for https://issues.dlang.org/show_bug.cgi?id=16428? Thanks! -- Andrei I don't get that error message, surprisingly. For your example

Re: Pattern matching value template parameters

2016-08-25 Thread Meta via Digitalmars-d
On Thursday, 25 August 2016 at 14:35:06 UTC, Andrei Alexandrescu wrote: Does anyone have a workaround for https://issues.dlang.org/show_bug.cgi?id=16428? Thanks! -- Andrei I don't get that error message, surprisingly. For your example code from that bug report, I get this error message using

Re: Avoid zombie processes with std.process

2016-08-25 Thread Shachar Shemesh via Digitalmars-d
On 25/08/16 11:46, FreeSlave wrote: On Thursday, 25 August 2016 at 07:32:29 UTC, Shachar Shemesh wrote: On 24/08/16 14:04, FreeSlave wrote: Are there plans on adding something like spawnProcessDetached that would start processes completely independent from parent? I.e. in other process group

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Basile B. via Digitalmars-d
On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: I'm wondering if there are more opportunities in D for increased optimization in compilers that have not been mined yet. I'm specifically interested in the possibilities of D over and above what is possible in C and C++ because of

Re: C# 7 Features - Tuples

2016-08-25 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote: https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/ came across the new c# features today. I really liked the syntax for Tuples (and deconstructors), would be great to have a similar syntax in D :) Pretty

Re: std.functional.compose compilation error

2016-08-25 Thread Meta via Digitalmars-d-learn
On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi wrote: Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3 = (double x) => x/3.0; auto sq = (double x) => x*x;

Re: Functions cannot be interpreted while being compiled

2016-08-25 Thread Andrei Alexandrescu via Digitalmars-d
On 08/25/2016 02:10 AM, Walter Bright wrote: On 8/24/2016 10:51 PM, ketmar wrote: p.s. i just thought that Andrei hits this somewhere in his own code, so i asked for a sample. It's fine if Andrei produces a sample, and it can be compared with the existing stuff in the test suite to see if it

Pattern matching value template parameters

2016-08-25 Thread Andrei Alexandrescu via Digitalmars-d
Does anyone have a workaround for https://issues.dlang.org/show_bug.cgi?id=16428? Thanks! -- Andrei

[Issue 16428] New: Cannot pattern match value template parameter

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16428 Issue ID: 16428 Summary: Cannot pattern match value template parameter Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: Silicon Valley D Meetup August 25, 2016 - Fireside Chat with Andrei Alexandrescu

2016-08-25 Thread Luís Marques via Digitalmars-d-announce
On Wednesday, 24 August 2016 at 19:17:19 UTC, Ali Çehreli wrote: We will post a Google Hangouts link here at the start at 19:00 (7pm) Pacific time: http://www.meetup.com/D-Lang-Silicon-Valley/events/232970396/ Please try to come in person for free food and maybe a free copy of the book

std.functional.compose compilation error

2016-08-25 Thread Antonio Corbi via Digitalmars-d-learn
Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3 = (double x) => x/3.0; auto sq = (double x) => x*x; auto pls1 = (double x) => x+1.0; alias

Re: C# 7 Features - Tuples

2016-08-25 Thread Suliman via Digitalmars-d
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote: https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/ came across the new c# features today. I really liked the syntax for Tuples (and deconstructors), would be great to have a similar syntax in D :) Yeah, it's

C# 7 Features - Tuples

2016-08-25 Thread dom via Digitalmars-d
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/ came across the new c# features today. I really liked the syntax for Tuples (and deconstructors), would be great to have a similar syntax in D :)

Re: yet another event loop

2016-08-25 Thread Eugene Wissner via Digitalmars-d-announce
On Thursday, 25 August 2016 at 00:24:59 UTC, mogu wrote: On Wednesday, 24 August 2016 at 18:03:39 UTC, Eugene Wissner wrote: https://github.com/caraus-ecms/tanya Ok there are not so many event loops in D and here an another one and its name is "tanya". ... Nice works, thanks. Hey,

Re: Simple GEdit .lang & github color scheme

2016-08-25 Thread Matthias Klumpp via Digitalmars-d-announce
On Wednesday, 24 August 2016 at 14:38:48 UTC, floare wrote: Dead link (dlang gedit color highlighting) http://reign-studios.com/d-downloads/d.lang.tar.gz Would you mind uploading on github for instance ? Also, if someone would simply update this with GNOMEs default color scheme, I could

[Issue 16291] phobosinit fails to register encodings on individual tests

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16291 --- Comment #27 from Steven Schveighoffer --- (In reply to Sobirari Muhomori from comment #26) > So all this is because encoding is a part of an unknown module cycle? It's a known module cycle (cycle is printed when it's

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Andrea Fontana via Digitalmars-d
On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: * Non-return-function marking, first in GCC and then in C itself. (iirc. And in C++?) Maybe it could be implemented as int blah() out(result) { assert(0); } body { } instead of marking the function itself.

[Issue 16427] alias to typecons.Rebindable depends on lexical order

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16427 ag0ae...@gmail.com changed: What|Removed |Added Keywords||rejects-valid CC|

Re: The unittests are failing (individually)

2016-08-25 Thread Seb via Digitalmars-d
On Thursday, 25 August 2016 at 12:03:08 UTC, John Colvin wrote: Try this: git clone https://github.com/dlang/dmd cd dmd make -f posix.mak -j cd .. git clone https://github.com/dlang/druntime cd druntime make -f posix.mak -j cd .. git clone https://github.com/dlang/phobos cd phobos for fn in

[Issue 16227] std.numeric unit tests fail when run in isolation

2016-08-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16227 --- Comment #4 from greensunn...@gmail.com --- Just for completeness this also affects std.algorithm.sorting and has been reported by Andrei in the NG: http://forum.dlang.org/post/nol5h2$lj$1...@digitalmars.com And a bit later by John:

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cauterite via Digitalmars-d
On Thursday, 25 August 2016 at 12:27:20 UTC, Cecil Ward wrote: When I said GCC/LLVM I meant GDC(GNU D Compiler)/LDC(LLVM D Compiler). I might have caused some confusion there.

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cecil Ward via Digitalmars-d
On Thursday, 25 August 2016 at 11:55:08 UTC, Cauterite wrote: On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: * the GCC "__builtin_expect()" Instead of adding individual micro-optimisation features like this, I'd be more interested in the potential for profile-guided

The unittests are failing (individually)

2016-08-25 Thread John Colvin via Digitalmars-d
Try this: git clone https://github.com/dlang/dmd cd dmd make -f posix.mak -j cd .. git clone https://github.com/dlang/druntime cd druntime make -f posix.mak -j cd .. git clone https://github.com/dlang/phobos cd phobos for fn in `find std -name \*.d`; do make -f posix.mak "${fn%.d}.test" ;

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cauterite via Digitalmars-d
On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: * the GCC "__builtin_expect()" Instead of adding individual micro-optimisation features like this, I'd be more interested in the potential for profile-guided optimisation (which *ideally* can make these micro-optimisation

Re: Usability of D on windows?

2016-08-25 Thread Kagamin via Digitalmars-d
On Thursday, 25 August 2016 at 09:57:28 UTC, John Burrton wrote: I'll try to find a small test case that crashes the compiler in visual D and check out what version I'm using etc, and submit a bug report if I am able. Did you try to get error messages from LDC? IIRC it will print colored

Re: Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cauterite via Digitalmars-d
On Thursday, 25 August 2016 at 11:16:52 UTC, Cecil Ward wrote: I long for the day we ditch signalling NaNs — they would surely prevent `-ffast-math` from being effective. I have a couple more ideas, here's one of them: - if a function is pure and called with constexpr parameters, the

Optimisation possibilities: current, future and enhancements

2016-08-25 Thread Cecil Ward via Digitalmars-d
I'm wondering if there are more opportunities in D for increased optimization in compilers that have not been mined yet. I'm specifically interested in the possibilities of D over and above what is possible in C and C++ because of the characteristics of D or because of our freedom to change

  1   2   >