Re: Variant is just a class

2018-09-06 Thread Josphe Brigmo via Digitalmars-d
On Thursday, 6 September 2018 at 20:25:18 UTC, Neia Neutuladh wrote: On Thursday, 6 September 2018 at 10:18:43 UTC, Josphe Brigmo wrote: Variants can hold an arbitrary set of types. I imagine that it is effectively just a type id and an object pointer!? It's a typeid and a static array

Re: LDC 1.12.0-beta1

2018-09-06 Thread Joakim via Digitalmars-d-announce
On Wednesday, 5 September 2018 at 05:15:45 UTC, Joakim wrote: I'll add native beta builds for Android in a couple days. The native Android builds are up at the above github release link. I think this is the last time I'll put beta builds out, too much of a PITA to rebuild llvm each time.

Re: linking trouble

2018-09-06 Thread Mike Parker via Digitalmars-d-learn
On Friday, 7 September 2018 at 02:44:24 UTC, hridyansh thakur wrote: On Thursday, 6 September 2018 at 16:59:43 UTC, rikki cattermole wrote: On 07/09/2018 4:03 AM, hridyansh thakur wrote: [...] That definition isn't complete. Missing at the very least ``();`` to make it a function

Re: This is why I don't use D.

2018-09-06 Thread H. S. Teoh via Digitalmars-d
On Thu, Sep 06, 2018 at 04:32:09PM +, Everlast via Digitalmars-d wrote: > On Thursday, 6 September 2018 at 15:28:56 UTC, Patrick Schluter wrote: [...] > > What annoys people is not that there are broken packages in the > > list, but that there is no way to know beforehand if one is choosing >

[Issue 19195] Support pragma to specify linker directives

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

Re: DIP Draft Reviews

2018-09-06 Thread Nicholas Wilson via Digitalmars-d-announce
On Thursday, 6 September 2018 at 03:19:33 UTC, Mike Parker wrote: I'm not going to start another Community Review until I get some space in the latter end of the queue. But soon I'll be asking for Draft Review feedback on the next candidate. Right now that's likely to be 'Named arguments

Re: DIP Draft Reviews

2018-09-06 Thread Nicholas Wilson via Digitalmars-d-announce
On Thursday, 6 September 2018 at 05:25:11 UTC, Mike Parker wrote: I've got three DIPs in the Post-Community stage right now [2]. DIP 1015 will move to Final Review before yours if its author is ready when I am, then yours will go before 1017. I'm a bit worried about 1017 going in to final,

[Issue 19195] Support pragma to specify linker directives

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19195 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/aa391954552990ee8895d74fcfc42df3ac2d1386 Fixes Issue 19195 - Support pragma to specify linker

Re: DIP25/DIP1000: My thoughts round 2

2018-09-06 Thread Chris M. via Digitalmars-d
On Sunday, 2 September 2018 at 05:14:58 UTC, Chris M. wrote: Hopefully that was coherent. Again this is me for me to get my thoughts out there, but also I'm interested in what other people think about this. Somewhat related, I was reading through this thread on why we can't do ref variables

Re: linking trouble

2018-09-06 Thread hridyansh thakur via Digitalmars-d-learn
On Thursday, 6 September 2018 at 16:59:43 UTC, rikki cattermole wrote: On 07/09/2018 4:03 AM, hridyansh thakur wrote: [...] That definition isn't complete. Missing at the very least ``();`` to make it a function declaration. [...] So what is the errors you're getting? And what are the

Re: Java also has chained exceptions, done manually

2018-09-06 Thread Neia Neutuladh via Digitalmars-d
On Thursday, 6 September 2018 at 23:34:20 UTC, Andrei Alexandrescu wrote: On 9/6/18 1:13 PM, Neia Neutuladh wrote: The actual structure of the exceptions: `primary` has children `scope 2` and `scope 1`; `scope 2` has child `cause 2`; `scope 1` has child `cause 1`. A tree. No, it's a list.

[Issue 18388] std.experimental.logger slow performance

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18388 --- Comment #10 from Arun Chandrasekaran --- s/_logger.tracef/printf/ 06-09-2018 18:25:51 vaalaham ~/code/d/std-log-benchmark $ time ./std-log-benchmark 8 100 > /dev/null real0m0.495s user0m1.254s sys 0m2.100s 06-09-2018 19:02:22

Alias this and opDispatch override

2018-09-06 Thread Domain via Digitalmars-d-learn
The following code fail to compile: enum KeyMod : int { LCtrl = 1 << 0, RCtrl = 1 << 1, Ctrl = LCtrl | RCtrl, } struct Flags(E) { public: BitFlags!(E, Yes.unsafe) flags; alias flags this; bool opDispatch(string name)() const if (__traits(hasMember, E, name))

Re: Alias this and opDispatch override

2018-09-06 Thread Domain via Digitalmars-d-learn
On Friday, 7 September 2018 at 02:22:58 UTC, Domain wrote: The following code fail to compile: enum KeyMod : int { LCtrl = 1 << 0, RCtrl = 1 << 1, Ctrl = LCtrl | RCtrl, } struct Flags(E) { public: BitFlags!(E, Yes.unsafe) flags; alias flags this; bool

Re: Static foreach bug?

2018-09-06 Thread Dechcaudron via Digitalmars-d
On Wednesday, 5 September 2018 at 11:39:31 UTC, Jonathan M Davis wrote: Conceptually, what Timon is talking about doing here is to add an attribute to symbols declared within a static foreach where that attribute indicates that the symbol is temporary (or at least scoped to a particular

[Issue 19229] New: formattedWrite destructively iterates over forward ranges

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19229 Issue ID: 19229 Summary: formattedWrite destructively iterates over forward ranges Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

[Issue 19230] New: Please make the forums worse

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19230 Issue ID: 19230 Summary: Please make the forums worse Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread ag0aep6g via Digitalmars-d
On 09/06/2018 12:40 PM, Chris wrote: To avoid this you have to normalize and recompose any decomposed characters. I remember that Mac OS X used (and still uses?) decomposed characters by default, so when you typed 'á' into your cli, it would automatically decompose it to 'a' + acute. `string`

Re: How to understand context type of a delegate?

2018-09-06 Thread Kagamin via Digitalmars-d-learn
Maybe poke into GC and see if it has ClassInfo associated with the allocated block.

Re: Dub registry refresh

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 8:29 PM, rikki cattermole wrote: On 06/09/2018 8:22 PM, Bastiaan Veelo wrote: Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I can expect dub to pick that up. Thanks! It is semi-constant.

Re: This is why I don't use D.

2018-09-06 Thread JN via Digitalmars-d
On Thursday, 6 September 2018 at 01:13:37 UTC, 0xEAB wrote: On Wednesday, 5 September 2018 at 14:39:39 UTC, RhyS wrote: This is the same reason why D with Code-D on Windows was a total disaster. You install VSC+CodeD. It breaks because some dependency library somewhere was not updated for DMD

Variant is just a class

2018-09-06 Thread Josphe Brigmo via Digitalmars-d
Variants can hold an arbitrary set of types. I imagine that it is effectively just a type id and an object pointer!? If so, then it really is just a special type of a class class. Let me explain: I have a class that will "hold/wrap" another class. I could hold them using a variant but

Re: DIP Draft Reviews

2018-09-06 Thread Mike Parker via Digitalmars-d-announce
On Thursday, 6 September 2018 at 10:22:47 UTC, Nicholas Wilson wrote: Put it this way: DIP1017 should not go to formal without change, as it did from draft to community (which I don't think should have happened without at least some acknowledgement or refutation of the points raised in

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Chris via Digitalmars-d
On Thursday, 6 September 2018 at 11:19:14 UTC, Chris wrote: One problem imo is that they mixed the terms up: "Grapheme: A minimally distinctive unit of writing in the context of a particular writing system." In linguistics a grapheme is not a single character like "á" or "g". It may also be

Re: Dub registry refresh

2018-09-06 Thread Bastiaan Veelo via Digitalmars-d
On Thursday, 6 September 2018 at 08:29:03 UTC, rikki cattermole wrote: On 06/09/2018 8:22 PM, Bastiaan Veelo wrote: Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I can expect dub to pick that up. Thanks!

Re: This is why I don't use D.

2018-09-06 Thread Guillaume Piolat via Digitalmars-d
On Wednesday, 5 September 2018 at 07:07:50 UTC, JN wrote: On Wednesday, 5 September 2018 at 06:16:57 UTC, Neia Neutuladh wrote: On Wednesday, 5 September 2018 at 05:44:38 UTC, H. S. Teoh wrote: To me, this strongly suggests the following idea: - add *all* dlang.org packages to our current

Dub registry refresh

2018-09-06 Thread Bastiaan Veelo via Digitalmars-d
Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I can expect dub to pick that up. Thanks!

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Chris via Digitalmars-d
On Thursday, 6 September 2018 at 07:54:09 UTC, Joakim wrote: On Thursday, 6 September 2018 at 07:23:57 UTC, Chris wrote: On Wednesday, 5 September 2018 at 22:00:27 UTC, H. S. Teoh wrote: // Seriously, people need to get over the fantasy that they can just use Unicode without understanding

Bug with writeln?

2018-09-06 Thread Saurabh Das via Digitalmars-d-learn
Is this a bug with writeln? void main() { import std.stdio, std.range, std.algorithm; auto a1 = sort([1,3,5,4,2]); auto a2 = sort([9,8,9]); auto a3 = sort([5,4,5,4]); pragma(msg, typeof(a1)); pragma(msg, typeof(a2)); pragma(msg, typeof(a3)); auto b = [a1, a2,

Re: Dub registry refresh

2018-09-06 Thread Bastiaan Veelo via Digitalmars-d
On Thursday, 6 September 2018 at 08:31:30 UTC, rikki cattermole wrote: Also, you forgot the v in the tag. 0.4.4 isn't valid tagged version name. Ah, thanks. I'll notify Philippe.

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Chris via Digitalmars-d
On Thursday, 6 September 2018 at 08:44:15 UTC, nkm1 wrote: On Wednesday, 5 September 2018 at 07:48:34 UTC, Chris wrote: On Tuesday, 4 September 2018 at 21:36:16 UTC, Walter Bright wrote: Autodecode - I've suffered under that, too. The solution was fairly simple. Append .byCodeUnit to strings

Re: Dub registry refresh

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 8:22 PM, Bastiaan Veelo wrote: Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I can expect dub to pick that up. Thanks! It is semi-constant. However if you care about it showing up sooner,

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread nkm1 via Digitalmars-d
On Wednesday, 5 September 2018 at 07:48:34 UTC, Chris wrote: On Tuesday, 4 September 2018 at 21:36:16 UTC, Walter Bright wrote: Autodecode - I've suffered under that, too. The solution was fairly simple. Append .byCodeUnit to strings that would otherwise autodecode. Annoying, but hardly a

Re: Dub registry refresh

2018-09-06 Thread rikki cattermole via Digitalmars-d
On 06/09/2018 8:39 PM, Bastiaan Veelo wrote: On Thursday, 6 September 2018 at 08:29:03 UTC, rikki cattermole wrote: On 06/09/2018 8:22 PM, Bastiaan Veelo wrote: Hi, How often and when does code.dlang.org look for new releases? Pegged has tagged a new release 14 hours ago, and I wonder when I

Re: DIP Draft Reviews

2018-09-06 Thread Dukc via Digitalmars-d-announce
On Thursday, 6 September 2018 at 07:13:20 UTC, Nicholas Wilson wrote: IMO the DIP author should at least participate in the community review if they expect their DIP to have _any_ chance of success. I disagree. Reviews are mainly for giving feedback, not for deciding the fate of the DIP

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Joakim via Digitalmars-d
On Thursday, 6 September 2018 at 09:35:27 UTC, Chris wrote: On Thursday, 6 September 2018 at 08:44:15 UTC, nkm1 wrote: On Wednesday, 5 September 2018 at 07:48:34 UTC, Chris wrote: On Tuesday, 4 September 2018 at 21:36:16 UTC, Walter Bright wrote: Autodecode - I've suffered under that, too.

Re: This is why I don't use D.

2018-09-06 Thread Laurent Tréguier via Digitalmars-d
On Thursday, 6 September 2018 at 10:35:44 UTC, Guillaume Piolat wrote: +1 talk here assume that we can know what we build compile or not, but with template it doesn't make sense unless the unittest instantiate. And since we can't add unittest magically where there is none, it's not a

Re: Bug with writeln?

2018-09-06 Thread Simen Kjærås via Digitalmars-d-learn
On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das wrote: Is this a bug with writeln? Yup. What happens is writeln destructively iterates over b[i]. Since b[i] is a forward range, this shouldn't be done destructively. Instead, a copy should be made using b[i].save, somewhere deep in

Re: DIP Draft Reviews

2018-09-06 Thread Nicholas Wilson via Digitalmars-d-announce
On Thursday, 6 September 2018 at 09:41:39 UTC, Dukc wrote: I disagree. Reviews are mainly for giving feedback, not for deciding the fate of the DIP -that's what the formal assesment is for. For the draft review yes, but the points against the DIP were raised in draft and it proceeded to

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread ag0aep6g via Digitalmars-d
On 09/06/2018 09:23 AM, Chris wrote: Python 3 gives me this: print(len("á")) 1 Python 3 also gives you this: print(len("á")) 2 (The example might not survive transfer from me to you if Unicode normalization happens along the way.) That's when you enter the 'á' as 'a' followed by U+0301

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Chris via Digitalmars-d
On Thursday, 6 September 2018 at 10:22:22 UTC, ag0aep6g wrote: On 09/06/2018 09:23 AM, Chris wrote: Python 3 gives me this: print(len("á")) 1 Python 3 also gives you this: print(len("á")) 2 (The example might not survive transfer from me to you if Unicode normalization happens along the

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Guillaume Piolat via Digitalmars-d
On Wednesday, 5 September 2018 at 07:48:34 UTC, Chris wrote: import std.array : array; import std.stdio : writefln; import std.uni : byCodePoint, byGrapheme; import std.utf : byCodeUnit; void main() { string first = "á"; writefln("%d", first.length); // prints 2 auto firstCU =

Re: C++ GLM(OpenGL Mathematics) D Equivalent.

2018-09-06 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 4 September 2018 at 19:23:16 UTC, SrMordred wrote: Most C++ game related projects uses GLM as they default math/vector lib (even if not using opengl). In D we have (that I found): gfm.math - https://github.com/d-gamedev-team/gfm dlib.math - https://github.com/gecko0307/dlib Gl3n

[Issue 18946] assert message can throw hijacking the assert failure.

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18946 Nicholas Wilson changed: What|Removed |Added Keywords||safe Hardware|x86

[Issue 19229] formattedWrite destructively iterates over forward ranges

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19229 Simen Kjaeraas changed: What|Removed |Added Keywords||pull --- Comment #1 from Simen Kjaeraas

Re: Bug with writeln?

2018-09-06 Thread Simen Kjærås via Digitalmars-d-learn
On Thursday, 6 September 2018 at 09:06:21 UTC, Simen Kjærås wrote: On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das wrote: Is this a bug with writeln? Yup. What happens is writeln destructively iterates over b[i]. Since b[i] is a forward range, this shouldn't be done

Re: DIP Draft Reviews

2018-09-06 Thread Nicholas Wilson via Digitalmars-d-announce
On Thursday, 6 September 2018 at 10:49:55 UTC, Mike Parker wrote: I always ask DIP authors about unaddressed feedback before moving from one stage to the other, and I did so with DIP 1017 when moving out of Draft Review. It's entirely up to the author whether or not to address it and there is

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Chris via Digitalmars-d
On Thursday, 6 September 2018 at 10:44:45 UTC, Joakim wrote: [snip] You're not being fair here, Chris. I just saw this SO question that I think exemplifies how most programmers react to Unicode: "Trying to understand the subtleties of modern Unicode is making my head hurt. In particular,

Re: LDC 1.12.0-beta1

2018-09-06 Thread Guillaume Piolat via Digitalmars-d-announce
On Tuesday, 4 September 2018 at 22:47:39 UTC, kinke wrote: * LTO working for Win64 targets. Wow! Thank you.

Re: This is why I don't use D.

2018-09-06 Thread Laurent Tréguier via Digitalmars-d
On Thursday, 6 September 2018 at 12:33:21 UTC, Everlast wrote: The problem is that all projects should be maintained. The issue, besides the tooling which can only reduce the problem to manageable levels, is that projects go stale over time. This is obvious! You say though "But we can't

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Chris via Digitalmars-d
On Thursday, 6 September 2018 at 11:43:31 UTC, ag0aep6g wrote: You say that D users shouldn't need a '"Unicode license" before they do anything with strings'. And you say that Python 3 gets it right (or maybe less wrong than D). But here we see that Python requires a similar amount of

[Issue 19196] DMD thinks storage size for pointer or dynamic array isn't always known

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19196 --- Comment #4 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/379446e0f059d25e8da909bf5373f861af5069c5 Improve diagnostic with forward references and tupleof When

Re: This is why I don't use D.

2018-09-06 Thread Steven Schveighoffer via Digitalmars-d
On 9/5/18 4:40 PM, Nick Sabalausky (Abscissa) wrote: On 09/04/2018 09:58 PM, Jonathan M Davis wrote: On Tuesday, September 4, 2018 7:18:17 PM MDT James Blachly via Digitalmars-d wrote: Are you talking about this? https://github.com/clinei/3ddemo which hasn't been updated since February

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 6 September 2018 at 11:01:55 UTC, Guillaume Piolat wrote: Let me break that to you: core developer are language experts. The rest of us are users, that yes it doesn't make us necessarily qualified to design a language. Who?

Re: DIP Draft Reviews

2018-09-06 Thread Dukc via Digitalmars-d-announce
On Thursday, 6 September 2018 at 11:18:25 UTC, Nicholas Wilson wrote: I can understand not requiring authors to respond to all the feedback, but not requiring them to respond to _any_ is just wasting everyone's time, since _all_ of the previous points will be bought up again and the next stage

Re: This is why I don't use D.

2018-09-06 Thread Patrick Schluter via Digitalmars-d
On Thursday, 6 September 2018 at 12:33:21 UTC, Everlast wrote: On Wednesday, 5 September 2018 at 12:32:33 UTC, Andre Pany wrote: On Wednesday, 5 September 2018 at 06:47:00 UTC, Everlast wrote: [...] You showed as a painful issue in our eco system which we can work on, thank you. You do

Re: This is why I don't use D.

2018-09-06 Thread Everlast via Digitalmars-d
On Wednesday, 5 September 2018 at 12:32:33 UTC, Andre Pany wrote: On Wednesday, 5 September 2018 at 06:47:00 UTC, Everlast wrote: On Wednesday, 5 September 2018 at 01:39:04 UTC, Paul Backus wrote: On Wednesday, 5 September 2018 at 00:49:36 UTC, Everlast wrote: [...] If you don't want to use

Re: Meson issue with -L--export-dynamic flag

2018-09-06 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2018-09-03 at 13:19 +, Gerald via Digitalmars-d-learn wrote: > Myself and some others are looking at replacing autotools in > Tilix with meson for the various Linux distros to use when > building and packaging the binary. However we are running into an > issue with meson around the

[Issue 18771] Identical overload sets in different modules have different identities

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18771 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #1 from

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Chris via Digitalmars-d
On Thursday, 6 September 2018 at 11:01:55 UTC, Guillaume Piolat wrote: So Unicode in D works EXACTLY as expected, yet people in this thread act as if the house is on fire. Expected by who? The Unicode expert or the user? D dying because of auto-decoding? Who can possibly think that in

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread aliak via Digitalmars-d
On Wednesday, 5 September 2018 at 22:00:27 UTC, H. S. Teoh wrote: Because grapheme decoding is SLOW, and most of the time you don't even need it anyway. SLOW as in, it will easily add a factor of 3-5 (if not worse!) to your string processing time, which will make your natively-compiled D code

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Daniel Kozak via Digitalmars-d
On Thu, Sep 6, 2018 at 4:45 PM Dukc via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, 6 September 2018 at 14:17:28 UTC, aliak wrote: > > // D > > auto a = "á"; > > auto b = "á"; > > auto c = "\u200B"; > > auto x = a ~ c ~ a; > > auto y = b ~ c ~ b; > > > > writeln(a.length);

Re: Dub support was added to Meson

2018-09-06 Thread Russel Winder via Digitalmars-d-announce
On Thu, 2018-08-16 at 22:44 +, Filipe Laíns via Digitalmars-d-announce wrote: […] Apologies for the delay in replying to this one. > This is obviously bad. Your distro has a package manager, you > should use it, not create a separated language-specific one. If I'm afraid you are onto a

Re: hasAliasing with nested static array bug ?

2018-09-06 Thread SrMordred via Digitalmars-d-learn
On Thursday, 6 September 2018 at 07:37:11 UTC, Simen Kjærås wrote: On Wednesday, 5 September 2018 at 22:35:16 UTC, SrMordred wrote: https://run.dlang.io/is/TOTsL4 Yup, that's a bug. Reduced example: struct S { int*[1] arr; } import std.traits : hasAliasing; static assert(hasAliasing!S);

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Guillaume Piolat via Digitalmars-d
On Thursday, 6 September 2018 at 14:42:14 UTC, Chris wrote: Usually a sign to move on... You have said that at least 10 times in this very thread. Doomsayers are as old as D. It will be doing OK.

[Issue 19205] [REG 2.081] Cannot call superclass ctor after end of switch statement

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19205 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #2 from

Re: This is why I don't use D.

2018-09-06 Thread 0xEAB via Digitalmars-d
On Thursday, 6 September 2018 at 10:55:04 UTC, Laurent Tréguier wrote: Then would it be possible to use code coverage to hint users about packages possibly not building anymore even if they are shown to be buildable ? I see yet another problem here. Having to maintain a high coverage just to

Re: This is why I don't use D.

2018-09-06 Thread Laurent Tréguier via Digitalmars-d
On Thursday, 6 September 2018 at 13:03:09 UTC, 0xEAB wrote: On Thursday, 6 September 2018 at 10:55:04 UTC, Laurent Tréguier wrote: Then would it be possible to use code coverage to hint users about packages possibly not building anymore even if they are shown to be buildable ? I see yet

Java also has chained exceptions, done manually

2018-09-06 Thread Andrei Alexandrescu via Digitalmars-d
In an earlier post, Don Clugston wrote: When I originally implemented this, I discovered that the idea of "chained exceptions" was hopeless naive. The idea was that while processing one exception, if you encounter a second one, and you chain them together. Then you get a third, fourth, etc.

Re: file io

2018-09-06 Thread Arun Chandrasekaran via Digitalmars-d-learn
On Thursday, 6 September 2018 at 16:13:42 UTC, hridyansh thakur wrote: how to read a file line by line in D std.stdio.File.byLine() Refer the doc here: https://dlang.org/library/std/stdio/file.by_line.html An example from the doc: ``` import std.algorithm, std.stdio, std.string; // Count

Re: This is why I don't use D.

2018-09-06 Thread Everlast via Digitalmars-d
On Thursday, 6 September 2018 at 13:08:00 UTC, Laurent Tréguier wrote: On Thursday, 6 September 2018 at 12:33:21 UTC, Everlast wrote: The problem is that all projects should be maintained. The issue, besides the tooling which can only reduce the problem to manageable levels, is that projects

Re: Static foreach bug?

2018-09-06 Thread Jonathan M Davis via Digitalmars-d
On Thursday, September 6, 2018 3:11:14 AM MDT Dechcaudron via Digitalmars-d wrote: > On Wednesday, 5 September 2018 at 11:39:31 UTC, Jonathan M Davis > > wrote: > > Conceptually, what Timon is talking about doing here is to add > > an attribute to symbols declared within a static foreach where >

linking trouble

2018-09-06 Thread hridyansh thakur via Digitalmars-d-learn
i am on windows i have tried DMD LDC and i am getting same linking error with linking my c++ object i am doing by the official tutorial (dlang spec book) here is my app.d code import std.stdio; void main() { //writeln("Edit source/app.d to start your project."); int[] m =

file io

2018-09-06 Thread hridyansh thakur via Digitalmars-d-learn
how to read a file line by line in D

Messing with betterC and string type.

2018-09-06 Thread SrMordred via Digitalmars-d
I'm most of the time exploring the betterC lands and was thinking about custom strings, and how to convert D into D-betterC hmm I wonder... struct String{} alias string = String; string x = "test"; //cannot implicitly convert expression "test" of type string to String ok then... struct

Re: This is why I don't use D.

2018-09-06 Thread Everlast via Digitalmars-d
On Thursday, 6 September 2018 at 15:28:56 UTC, Patrick Schluter wrote: On Thursday, 6 September 2018 at 12:33:21 UTC, Everlast wrote: On Wednesday, 5 September 2018 at 12:32:33 UTC, Andre Pany wrote: On Wednesday, 5 September 2018 at 06:47:00 UTC, Everlast wrote: [...] You showed as a

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread H. S. Teoh via Digitalmars-d
On Thu, Sep 06, 2018 at 02:42:58PM +, Dukc via Digitalmars-d wrote: > On Thursday, 6 September 2018 at 14:17:28 UTC, aliak wrote: > > // D > > auto a = "á"; > > auto b = "á"; > > auto c = "\u200B"; > > auto x = a ~ c ~ a; > > auto y = b ~ c ~ b; > > > > writeln(a.length); // 2 wtf > >

Re: Messing with betterC and string type.

2018-09-06 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 6 September 2018 at 16:24:12 UTC, SrMordred wrote: alias string = String; For the rest of this module, any time you write `string`, the compiler sees `String`. But inside the compiler, it still thinks of its own string, hence the confusing looking error messages. struct

Re: Bug with writeln?

2018-09-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via Digitalmars-d- learn wrote: > Is this a bug with writeln? > > void main() > { > import std.stdio, std.range, std.algorithm; > > auto a1 = sort([1,3,5,4,2]); > auto a2 = sort([9,8,9]); > auto a3 = sort([5,4,5,4]); > >

[Issue 19231] New: Infinite loop in exception chains

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19231 Issue ID: 19231 Summary: Infinite loop in exception chains Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P1

Re: Messing with betterC and string type.

2018-09-06 Thread SrMordred via Digitalmars-d
On Thursday, 6 September 2018 at 16:50:01 UTC, Adam D. Ruppe wrote: this(object.string x) {} Yep, this works. which will work - immutable(char)[] is what object.string actually is (and the compiler will often use that - immutable(char)[], the proper name - and string, the user-friendly

Re: This is why I don't use D.

2018-09-06 Thread Laurent Tréguier via Digitalmars-d
On Thursday, 6 September 2018 at 16:27:38 UTC, Everlast wrote: You totally missed the point. The point with 1 package only was to demonstrate how easy it is to maintain and that it theoretically would have the long longevity. When one has an infinite number of packages then every package(or

Re: file io

2018-09-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/09/2018 4:17 AM, Arun Chandrasekaran wrote: On Thursday, 6 September 2018 at 16:13:42 UTC, hridyansh thakur wrote: how to read a file line by line in D std.stdio.File.byLine() Refer the doc here: https://dlang.org/library/std/stdio/file.by_line.html An example from the doc: ```

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Jonathan M Davis via Digitalmars-d
On Thursday, September 6, 2018 10:44:11 AM MDT H. S. Teoh via Digitalmars-d wrote: > On Thu, Sep 06, 2018 at 02:42:58PM +, Dukc via Digitalmars-d wrote: > > On Thursday, 6 September 2018 at 14:17:28 UTC, aliak wrote: > > > // D > > > auto a = "á"; > > > auto b = "á"; > > > auto c = "\u200B";

[Issue 19185] [ICE] Nested struct segfaults when using variable from outer scope

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

[Issue 19185] [ICE] Nested struct segfaults when using variable from outer scope

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19185 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/9b5a295e8707a17bee8e45e0337935ed568bcff9 Fix Issue 19185 - [ICE] Nested struct segfaults when using

[Issue 19229] formattedWrite destructively iterates over forward ranges

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19229 Jonathan M Davis changed: What|Removed |Added CC||issues.dl...@jmdavisprog.co

Re: Slicing betterC

2018-09-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 6 September 2018 at 17:10:49 UTC, Oleksii wrote: struct Slice(T) { size_t capacity; size_t size; T* memory; } There's no capacity in the slice, that is stored as part of the GC block, which it looks up with the help of RTTI, thus the TypeInfo reference. Slices *just*

Re: Example of using C API from D?

2018-09-06 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2018-09-03 at 11:41 +1200, rikki cattermole via Digitalmars-d-learn wrote: […] > > You won't need to actually fill out any c struct's that you don't need > either. Make them opaque as long as they are referenced via pointer and > not by value. True. And indeed Fontconfig can mostly

Re: linking trouble

2018-09-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/09/2018 4:03 AM, hridyansh thakur wrote: i am on windows i have tried DMD LDC and i am getting same linking error with linking my c++ object i am doing by the official tutorial (dlang spec book) here is my app.d code import std.stdio; void main() { //writeln("Edit source/app.d to

Re: Java also has chained exceptions, done manually

2018-09-06 Thread Neia Neutuladh via Digitalmars-d
On Thursday, 6 September 2018 at 14:39:12 UTC, Andrei Alexandrescu wrote: First off, there's no tree of exceptions simply because... well it's not there. There is on field "next", not two fields "left" and "right". It's a linear list, not a tree. During construction there might be the

Slicing betterC

2018-09-06 Thread Oleksii via Digitalmars-d-learn
Hi the folks, Could you please share your wisdom with me? I wonder why the following code: ``` import core.stdc.stdlib; Foo[] pool; Foo[] foos; auto buff = (Foo*)malloc(Foo.sizeof * 10); pool = buff[0 .. 10]; foos = pool[0 .. 0 ]; // Now let's allocate a Foo: Foo* allocatedFoo; if

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Joakim via Digitalmars-d
On Thursday, 6 September 2018 at 16:44:11 UTC, H. S. Teoh wrote: On Thu, Sep 06, 2018 at 02:42:58PM +, Dukc via Digitalmars-d wrote: On Thursday, 6 September 2018 at 14:17:28 UTC, aliak wrote: > // D > auto a = "á"; > auto b = "á"; > auto c = "\u200B"; > auto x = a ~ c ~ a; > auto y = b ~

Re: Slicing betterC

2018-09-06 Thread Oleksii via Digitalmars-d-learn
On Thursday, 6 September 2018 at 17:10:49 UTC, Oleksii wrote: allocatedFoo = foos[0 .. $ + 1];// <= Error: TypeInfo This line meant to be `allocatedFoo = foos[$]`. Sorry about that.

Re: Bug with writeln?

2018-09-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, September 6, 2018 1:05:03 PM MDT Steven Schveighoffer via Digitalmars-d-learn wrote: > On 9/6/18 2:52 PM, Jonathan M Davis wrote: > > On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via > > > > Digitalmars-d-learn wrote: > >> On 9/6/18 12:55 PM, Jonathan M Davis

[Issue 18388] std.experimental.logger slow performance

2018-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18388 --- Comment #7 from Robert Schadek --- I didn't say anything about api calls. That is not the problem. The problem with the benchmark is that the threads share memory. That means each write will, given you tested on a multicore cpu, invalidates some

Re: This is why I don't use D.

2018-09-06 Thread Jonathan M Davis via Digitalmars-d
On Thursday, September 6, 2018 12:35:06 PM MDT Joakim via Digitalmars-d wrote: > Ah, but would you actually pay for such a service to be set up? > > https://forum.dlang.org/thread/acxedxzzesxkyomrs...@forum.dlang.org > > It's all well and good to hope for such services, but they're > unlikely to

Re: Variant is just a class

2018-09-06 Thread Neia Neutuladh via Digitalmars-d
On Thursday, 6 September 2018 at 10:18:43 UTC, Josphe Brigmo wrote: Variants can hold an arbitrary set of types. I imagine that it is effectively just a type id and an object pointer!? It's a typeid and a static array large enough to hold any basic builtin type: the now-deprecated creal, a

Re: John Regehr on "Use of Assertions"

2018-09-06 Thread Walter Bright via Digitalmars-d
On 9/5/2018 4:55 PM, Timon Gehr wrote: John rather explicitly states the opposite in the article. I believe that his statement: "it’s not an interpretation that is universally useful" is much weaker than saying "the opposite". He did not say it was "never useful". For example, it is not

Re: Dicebot on leaving D: It is anarchy driven development in all its glory.

2018-09-06 Thread Jonathan M Davis via Digitalmars-d
On Thursday, September 6, 2018 1:04:45 PM MDT aliak via Digitalmars-d wrote: > D makes the code-point case default and hence that becomes the > simplest to use. But unfortunately, the only thing I can think of > that requires code point representations is when dealing > specifically with unicode

  1   2   >