DConf: three talk abstracts missing

2017-04-30 Thread Joakim via Digitalmars-d
For those thinking about watching the talks on the livestream, maybe these can be filled in? http://dconf.org/2017/talks/buclaw.html http://dconf.org/2017/talks/panel.html http://dconf.org/2017/talks/alexandrescu.html

Re: [OT] Algorithm question

2017-04-30 Thread H. S. Teoh via Digitalmars-d
On Mon, May 01, 2017 at 05:03:17AM +, Jack Stouffer via Digitalmars-d wrote: > On Monday, 1 May 2017 at 04:15:35 UTC, H. S. Teoh wrote: > > 2) "Turtle walk": > > I'd just like to point out that this algorithm doesn't satisfy > > > such that elements that satisfy P(x) have equal probability

Re: [OT] Algorithm question

2017-04-30 Thread Jack Stouffer via Digitalmars-d
On Monday, 1 May 2017 at 04:15:35 UTC, H. S. Teoh wrote: 2) "Turtle walk": I'd just like to point out that this algorithm doesn't satisfy such that elements that satisfy P(x) have equal probability of being chosen as the first element found in A will be chosen, and then each subsequent

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-30 Thread Andrei Alexandrescu via Digitalmars-d
On 4/30/17 8:43 PM, Stanislav Blinov wrote: On Sunday, 30 April 2017 at 21:43:26 UTC, Andrei Alexandrescu wrote: On 04/27/2017 07:35 PM, Stanislav Blinov wrote: IAllocator is too high level an interface, it doesn't carry any information as to what type of memory it can allocate (so we can only

[OT] Algorithm question

2017-04-30 Thread H. S. Teoh via Digitalmars-d
I'm been thinking about the following problem, and thought I'd pick the brains of the bright people around these parts... Given a set A of n elements (let's say it's a random-access range of size n, where n is relatively large), and a predicate P(x) that specifies some subset of A of elements

[Issue 16044] __traits(allMembers) returns empty tuple for subpackages

2017-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16044 Alexey Kulentsov changed: What|Removed |Added CC||criman...@gmail.com

Re: DMD VS2017 Support

2017-04-30 Thread evilrat via Digitalmars-d
On Sunday, 30 April 2017 at 16:05:10 UTC, Igor wrote: I should also mention that compiling using DUB works. It only doesn't work from VS. Check your VisualD settings and make sure it has DMD path set up. See under Tools>Options>Projects and solutions>Visual D Settings

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-30 Thread Stanislav Blinov via Digitalmars-d
On Monday, 1 May 2017 at 00:43:22 UTC, Stanislav Blinov wrote: block_ = allocator_.allocate(T.sizeof); Obviously, should be Block.sizeof, and AllocatorInterface!AllocTraits allocator_; should be AllocatorInterface!traits allocator_

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-30 Thread Stanislav Blinov via Digitalmars-d
On Sunday, 30 April 2017 at 21:43:26 UTC, Andrei Alexandrescu wrote: On 04/27/2017 07:35 PM, Stanislav Blinov wrote: IAllocator is too high level an interface, it doesn't carry any information as to what type of memory it can allocate (so we can only assume unshared), and does or does it not

Re: alias this on module

2017-04-30 Thread Jonathan Marler via Digitalmars-d
On Sunday, 30 April 2017 at 23:44:32 UTC, Steven Schveighoffer wrote: On 4/30/17 7:35 PM, Jonathan Marler wrote: Any reason why "alias this" doesn't work at the module level? If I recall correctly, a module is really just a "class" under the hood, but when I tried to use it I got: Error:

Re: alias this on module

2017-04-30 Thread Steven Schveighoffer via Digitalmars-d
On 4/30/17 7:35 PM, Jonathan Marler wrote: Any reason why "alias this" doesn't work at the module level? If I recall correctly, a module is really just a "class" under the hood, but when I tried to use it I got: Error: alias this can only be a member of aggregate, not module public import

alias this on module

2017-04-30 Thread Jonathan Marler via Digitalmars-d
Any reason why "alias this" doesn't work at the module level? If I recall correctly, a module is really just a "class" under the hood, but when I tried to use it I got: Error: alias this can only be a member of aggregate, not module

Re: How to correctly generate enums at compile time.

2017-04-30 Thread jkpl via Digitalmars-d-learn
On Sunday, 30 April 2017 at 22:03:02 UTC, Kevin Balbas wrote: On Sunday, 30 April 2017 at 21:31:22 UTC, jkpl wrote: On Sunday, 30 April 2017 at 21:13:07 UTC, Kevin Balbas wrote: On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote: On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote:

Re: How to correctly generate enums at compile time.

2017-04-30 Thread Kevin Balbas via Digitalmars-d-learn
On Sunday, 30 April 2017 at 21:31:22 UTC, jkpl wrote: On Sunday, 30 April 2017 at 21:13:07 UTC, Kevin Balbas wrote: On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote: On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote: Strangely enough, it does work fine in the test snippet, As

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-30 Thread Andrei Alexandrescu via Digitalmars-d
On 04/27/2017 07:35 PM, Stanislav Blinov wrote: IAllocator is too high level an interface, it doesn't carry any information as to what type of memory it can allocate (so we can only assume unshared), and does or does it not use GC (so we can only assume GC). Initially all fresh memory is

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-30 Thread Andrei Alexandrescu via Digitalmars-d
On 04/27/2017 07:12 PM, Moritz Maxeiner wrote: On Thursday, 27 April 2017 at 20:04:32 UTC, Stanislav Blinov wrote: On Thursday, 27 April 2017 at 19:57:52 UTC, Andrei Alexandrescu wrote: https://github.com/dlang/phobos/pull/5355 Andrei And then we'd probably need INoGCAllocator and

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-04-30 Thread Andrei Alexandrescu via Digitalmars-d
On 04/27/2017 04:04 PM, Stanislav Blinov wrote: On Thursday, 27 April 2017 at 19:57:52 UTC, Andrei Alexandrescu wrote: https://github.com/dlang/phobos/pull/5355 Andrei And then we'd probably need INoGCAllocator and ISharedNOGCAllocator... "shared" is a type qualifier essentially changing

Re: How to correctly generate enums at compile time.

2017-04-30 Thread jkpl via Digitalmars-d-learn
On Sunday, 30 April 2017 at 21:13:07 UTC, Kevin Balbas wrote: On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote: On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote: Strangely enough, it does work fine in the test snippet, As well if you import the snippet in another module.

Re: String Comparison Operator

2017-04-30 Thread Xinok via Digitalmars-d-learn
On Sunday, 30 April 2017 at 19:05:18 UTC, bauss wrote: On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote: On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote: Is there a String Comparison Operator in D? Yeah, just the usual comparison operators: "abc" == "abc" "abc" != "ABC" ~

Re: alias can't find symbol or can't use symbol

2017-04-30 Thread Jerry via Digitalmars-d-learn
To me this seems like a bug.

Re: How to correctly generate enums at compile time.

2017-04-30 Thread Kevin Balbas via Digitalmars-d-learn
On Sunday, 30 April 2017 at 20:58:36 UTC, jkpl wrote: On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote: I've got the following code snippet, which almost does what I want. struct TaggedType {} @TaggedType struct Foo {} @TaggedType struct Bar {} string GenerateTypeEnum() {

Re: How to correctly generate enums at compile time.

2017-04-30 Thread jkpl via Digitalmars-d-learn
On Sunday, 30 April 2017 at 20:05:59 UTC, Kevin Balbas wrote: I've got the following code snippet, which almost does what I want. struct TaggedType {} @TaggedType struct Foo {} @TaggedType struct Bar {} string GenerateTypeEnum() { string enumString = "enum TypeEnum {"; foreach

Re: String Comparison Operator

2017-04-30 Thread ag0aep6g via Digitalmars-d-learn
On 04/30/2017 09:05 PM, bauss wrote: On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote: [...] ~ is for string concatenation, i.e.: [...] It's not actually a string concatenation operator, it's an array appending operator. Appending is related but distinct. `~` does concatenation. `~=`

Re: Stack Trace format

2017-04-30 Thread Szabo Bogdan via Digitalmars-d-learn
On Sunday, 30 April 2017 at 20:31:09 UTC, Szabo Bogdan wrote: Hi, I noticed that on different platforms the `object.Throwable.TraceInfo` has different formats. A program compiled on osx with ldc2 has all the TraceInfo empty... Why? I want to parse those strings or somehow iterate trough all

Re: DIP 1007 Preliminary Review Round 1

2017-04-30 Thread Steven Schveighoffer via Digitalmars-d
On 4/28/17 4:31 AM, Olivier FAURE wrote: On Wednesday, 26 April 2017 at 11:26:19 UTC, Steven Schveighoffer wrote: I'm wondering if you actually wrote this? It seems to be quoted. That was a quote from the DIP. (guess I should have used a colon) Ah, OK. Sorry for the confusion, I wasn't sure

Stack Trace format

2017-04-30 Thread Szabo Bogdan via Digitalmars-d-learn
Hi, I noticed that on different platforms the `object.Throwable.TraceInfo` has different formats. A program compiled on osx with ldc2 has all the TraceInfo empty... Why? I want to parse those strings or somehow iterate trough all the stack elements, but if I get a different format on

[Issue 17141] Type Inference Incorrectly Converts Characters to Integers

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

[Issue 17358] [REG 2.074.0] std.stdio.File.lockingTextWriter.put no longer accepts chains of characters

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

How to correctly generate enums at compile time.

2017-04-30 Thread Kevin Balbas via Digitalmars-d-learn
I've got the following code snippet, which almost does what I want. struct TaggedType {} @TaggedType struct Foo {} @TaggedType struct Bar {} string GenerateTypeEnum() { string enumString = "enum TypeEnum {"; foreach (name; __traits(allMembers, mixin(__MODULE__))) { import

Re: CTFE Status 2

2017-04-30 Thread H. S. Teoh via Digitalmars-d
On Sun, Apr 30, 2017 at 01:26:09PM +, Stefan Koch via Digitalmars-d wrote: > On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: > > [ ... ] > > Big news! > The first step to include debug info has been done. > > Yes this means you will be able to step through ctfe code while

Re: DMD VS2017 Support

2017-04-30 Thread Mike B Johnson via Digitalmars-d
On Sunday, 30 April 2017 at 16:52:52 UTC, Igor wrote: On Sunday, 30 April 2017 at 16:31:13 UTC, John Chapman wrote: Here are mine, if it helps: I tried but still the same problem. I also tried reinstalling VisualD after changing sc.ini in DMD but that didn't help either. You are going

Re: protected behaviour on base class member access from another module

2017-04-30 Thread Boris-Barboris via Digitalmars-d-learn
Ok, sorry, look's like that was always the case in C++, so it's too late to question it. I'll just elevate it to package, I guess.

Re: String Comparison Operator

2017-04-30 Thread bauss via Digitalmars-d-learn
On Sunday, 30 April 2017 at 16:15:41 UTC, Xinok wrote: On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote: Is there a String Comparison Operator in D? Yeah, just the usual comparison operators: "abc" == "abc" "abc" != "ABC" ~ is for string concatenation, i.e.: "abc" ~ "def" ==

Re: interfacing Cpp - GCC Dual ABI abi_tag in name mangling

2017-04-30 Thread via Digitalmars-d-learn
On Sunday, 30 April 2017 at 11:35:54 UTC, Jacob Carlborg wrote: You can use pragma(mangle, "some mangling"); to set the mangled name of a symbol. that's a quick hack, but sooner or later dmd needs to add some rules for this in the internal cpp mangler, since gcc is the main compiler in

[Issue 17361] latest windows 10 insider preview and dmd no longer runs.

2017-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17361 steven kladitis changed: What|Removed |Added Keywords||performance --

[Issue 17361] New: latest windows 10 insider preview and dmd no longer runs.

2017-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17361 Issue ID: 17361 Summary: latest windows 10 insider preview and dmd no longer runs. Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW

protected behaviour on base class member access from another module

2017-04-30 Thread Boris-Barboris via Digitalmars-d-learn
Hi! I have a base class in module A: module A; ... class GuiElement: GuiComponent { protected { GuiElement _parent; ... } template isGuiElement(T) { enum isGuiElement = is(T: GuiElement); } ... and derived class in module B: module B; ... class Div(uint dim, uint odim):

[Issue 5212] no escape analysis for typesafe variadic function arguments

2017-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5212 Nick Treleaven changed: What|Removed |Added Keywords||safe CC|

Re: DMD VS2017 Support

2017-04-30 Thread Igor via Digitalmars-d
On Sunday, 30 April 2017 at 16:31:13 UTC, John Chapman wrote: Here are mine, if it helps: I tried but still the same problem. I also tried reinstalling VisualD after changing sc.ini in DMD but that didn't help either.

[Issue 17162] std.algorithm.startsWith fails to compile with -dip1000 switch

2017-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17162 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment

[Issue 9999] Integer literal 0 and 1 should prefer integer type in overload resolution

2017-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id= Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment

Re: DMD VS2017 Support

2017-04-30 Thread John Chapman via Digitalmars-d
On Sunday, 30 April 2017 at 16:05:10 UTC, Igor wrote: On Sunday, 30 April 2017 at 15:53:07 UTC, Mike Parker wrote: On Sunday, 30 April 2017 at 14:56:44 UTC, Igor wrote: I tried updating sc.ini to new paths but I still get this error. Can someone offer some advice? Which paths did you set?

Re: String Comparison Operator

2017-04-30 Thread tcak via Digitalmars-d-learn
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote: Is there a String Comparison Operator in D? You normally use double equation marks (==) to do that. auto name = "Jack"; if( name == "Jack" ) writeln("Hi Jack!");

Re: String Comparison Operator

2017-04-30 Thread Xinok via Digitalmars-d-learn
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote: Is there a String Comparison Operator in D? Yeah, just the usual comparison operators: "abc" == "abc" "abc" != "ABC" ~ is for string concatenation, i.e.: "abc" ~ "def" == "abcdef"

Re: DMD VS2017 Support

2017-04-30 Thread Igor via Digitalmars-d
On Sunday, 30 April 2017 at 15:53:07 UTC, Mike Parker wrote: On Sunday, 30 April 2017 at 14:56:44 UTC, Igor wrote: I tried updating sc.ini to new paths but I still get this error. Can someone offer some advice? Which paths did you set? These are the ones I changed:

Re: alias can't find symbol or can't use symbol

2017-04-30 Thread Carl Sturtivant via Digitalmars-d-learn
On Sunday, 30 April 2017 at 02:19:29 UTC, bauss wrote: What exactly did you expect here? 'n' is not in the scope of 'outer'. 'n' is in the scope of 'member'. Of course it works with 'x.n' since 'x' points to the 'member' declared inside 'outer'. I mean it would have worked with classes,

Re: String Comparison Operator

2017-04-30 Thread 無 via Digitalmars-d-learn
On Sunday, 30 April 2017 at 15:31:39 UTC, Jolly James wrote: Is there a String Comparison Operator in D? ~

Re: DMD VS2017 Support

2017-04-30 Thread Mike Parker via Digitalmars-d
On Sunday, 30 April 2017 at 14:56:44 UTC, Igor wrote: I tried updating sc.ini to new paths but I still get this error. Can someone offer some advice? Which paths did you set?

String Comparison Operator

2017-04-30 Thread Jolly James via Digitalmars-d-learn
Is there a String Comparison Operator in D?

Re: DMD VS2017 Support

2017-04-30 Thread Igor via Digitalmars-d
On Saturday, 22 April 2017 at 02:46:30 UTC, Mike Parker wrote: On Saturday, 22 April 2017 at 02:39:41 UTC, evilrat wrote: Also VS 2017 is much more modular now, so its now lighter than ever before. but of course for C++ (and D) you still need Windows SDK. The SDK stuff is installed with

Re: Transitive bit-packing of fields

2017-04-30 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 30 April 2017 at 13:22:49 UTC, Stefan Koch wrote: On Sunday, 30 April 2017 at 11:02:52 UTC, Nordlöw wrote: Have anybody found a way to do transitive packing of bitfields? For instance, in import std.bitmanip : bitfields; struct X { // one bit too many to fit in one byte

Re: CTFE Status 2

2017-04-30 Thread Stefan Koch via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: [ ... ] Big news! The first step to include debug info has been done. Yes this means you will be able to step through ctfe code while the compiler executes it.

Re: Transitive bit-packing of fields

2017-04-30 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 30 April 2017 at 11:02:52 UTC, Nordlöw wrote: Have anybody found a way to do transitive packing of bitfields? For instance, in import std.bitmanip : bitfields; struct X { // one bit too many to fit in one byte mixin(bitfields!(bool, `a`, 1, bool, `b`,

Re: will ddmd in standard library

2017-04-30 Thread Jacob Carlborg via Digitalmars-d
On 2017-04-30 09:29, ANtlord wrote: Hello! I see documentation of pre-release version of standard library. It has section ddmd. Does it mean that we will get std library with ddmd? Does it mean we will get a powerful tool for making analysis tools for D? No, that's just the generated

Re: interfacing Cpp - GCC Dual ABI abi_tag in name mangling

2017-04-30 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-04-29 20:08, سليمان السهمي (Soulaïman Sahmi) wrote: GCC has this attribute called abi_tag that they put on any function that returns std::string or std::list, for the rational behind that read here:https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html . the special thing

Re: Problem with using readln.

2017-04-30 Thread Ivan Kazmenko via Digitalmars-d-learn
On Sunday, 30 April 2017 at 02:07:48 UTC, JV wrote: Hello i'm kinda new to D language and i wanted to make a simple program but somehow my input does no go to my if statements and just continues to ask for the user to input.Kindly help me One way would be: import std.stdio; int x;

Transitive bit-packing of fields

2017-04-30 Thread Nordlöw via Digitalmars-d-learn
Have anybody found a way to do transitive packing of bitfields? For instance, in import std.bitmanip : bitfields; struct X { // one bit too many to fit in one byte mixin(bitfields!(bool, `a`, 1, bool, `b`, 1, ubyte, `c`, 7,

will ddmd in standard library

2017-04-30 Thread ANtlord via Digitalmars-d
Hello! I see documentation of pre-release version of standard library. It has section ddmd. Does it mean that we will get std library with ddmd? Does it mean we will get a powerful tool for making analysis tools for D? And one more question. Standard library be without ddmd very long time.

[Issue 17360] New: std.range.only doesn't allow ref access

2017-04-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17360 Issue ID: 17360 Summary: std.range.only doesn't allow ref access Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority:

Re: Problem with using readln.

2017-04-30 Thread arturg via Digitalmars-d-learn
On Sunday, 30 April 2017 at 05:53:09 UTC, Andrew Edwards wrote: string line; parse!int((line = readln)).writeln; is there a reason you mix normal call and ufc or just some style? you can do this and remove some () (line = readln).parse!int.writeln;