Re: RE: Are Gigantic Associative Arrays Now Possible?

2017-03-24 Thread dlangPupil via Digitalmars-d
On Friday, 24 March 2017 at 17:48:35 UTC, H. S. Teoh wrote: (In my case, though, B-trees may not represent much of an improvement, because I'm dealing with high-dimensional data that cannot be easily linearized to take maximum advantage of B-tree locality. So at some level I still need some ki

Re: More exception classes into Phobos?

2017-03-24 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 24 March 2017 at 19:38:14 UTC, H. S. Teoh wrote: Catching an Exception by message? That sounds like horrible code smell to me. Yes, it is. That's why I think exception strings are an antipattern. You should be making new classes, not new strings. But, D lets us have both worlds. C

Re: Parameterized template value parameter

2017-03-24 Thread Nicholas Wilson via Digitalmars-d
On Friday, 24 March 2017 at 21:13:26 UTC, Yuxuan Shui wrote: On Friday, 24 March 2017 at 20:43:18 UTC, Dmitry Olshansky template A(alias str) if(is(typeof(str) : Char[], Char)){ alias Char = typeof(str[0]); // ... } One problem of this is that 'str' is not longer restricted to b

Re: Yet another project with vibe.d

2017-03-24 Thread Jonathan M Davis via Digitalmars-d
On Friday, March 24, 2017 12:23:23 Chris via Digitalmars-d wrote: > I just wanted to say thank you for vibe.d, Sönke and Kai (for the > book). I use vibe.d for all new web projects, and it's great. > Less and less JS, more and more D. It's also very fast. > > The way we use it is that we set up lit

Re: relax disabled Final!T unary operators

2017-03-24 Thread Jonathan M Davis via Digitalmars-d
On Friday, March 24, 2017 11:00:20 H. S. Teoh via Digitalmars-d wrote: > All in all, it seems that Final, as currently implemented, really only > makes sense for class types. It seems to have glaring holes and > inconsistency problems with other types. (Just wait till I try it on a > union... that

Re: Parameterized template value parameter

2017-03-24 Thread Yuxuan Shui via Digitalmars-d
On Friday, 24 March 2017 at 20:43:18 UTC, Dmitry Olshansky wrote: On 3/24/17 12:24 AM, Yuxuan Shui wrote: So I was trying to make my template take a value parameter, whose type is also a parameter to the template. e.g.: template A(Char[] str, Char); But dmd complains about 'Char' being un

Re: Parameterized template value parameter

2017-03-24 Thread Dmitry Olshansky via Digitalmars-d
On 3/24/17 12:24 AM, Yuxuan Shui wrote: So I was trying to make my template take a value parameter, whose type is also a parameter to the template. e.g.: template A(Char[] str, Char); But dmd complains about 'Char' being undefined. I have to write: template A(Char, Char[] str); Which

Re: More exception classes into Phobos?

2017-03-24 Thread H. S. Teoh via Digitalmars-d
On Fri, Mar 24, 2017 at 01:44:02AM +, Adam D. Ruppe via Digitalmars-d wrote: > On Friday, 24 March 2017 at 00:28:16 UTC, Walter Bright wrote: > > The string is what gets printed to the user like: > > > >"your password has to have at least one upper case character in > >it" > > > > In

Re: Learning programming with D - optimizing the entry point / the environment?

2017-03-24 Thread H. S. Teoh via Digitalmars-d
On Thu, Mar 23, 2017 at 06:48:32PM +, Adam D. Ruppe via Digitalmars-d wrote: > On Thursday, 23 March 2017 at 18:25:55 UTC, H. S. Teoh wrote: > > And BTW, that was written for a text console, so the only library > > needed was a terminal control library (which in theory could be > > dispensed wi

Re: Of the use of unpredictableSeed

2017-03-24 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 21, 2017 at 10:11:44PM +, sarn via Digitalmars-d wrote: > On Tuesday, 21 March 2017 at 10:27:27 UTC, Andrei Alexandrescu wrote: > > Thanks Yuxuan, sorry for missing this. Can we have this peer > > reviewed by 1-2 crypto experts? Thanks! -- Andrei > > By API, unpredictableSeed() onl

Re: relax disabled Final!T unary operators

2017-03-24 Thread H. S. Teoh via Digitalmars-d
Another grey area (or more precisely, problematic area) with Final is dynamic arrays. To wit: Final!(int[]) arr; arr.length += 1;// correctly rejected arr.length = 10;// accepted - WAT? arr.ptr++; // correctly rejected arr.ptr =

Re: RE: Are Gigantic Associative Arrays Now Possible?

2017-03-24 Thread H. S. Teoh via Digitalmars-d
On Fri, Mar 24, 2017 at 04:59:00PM +, dlangPupil via Digitalmars-d wrote: [...] > In addition to prevalence of random lookups, certain additional app > conditions and designs might make "gigantic AAs" more useful or > competitive with alternatives: > > 1. Use by programmers who need a data st

Re: RE: Are Gigantic Associative Arrays Now Possible?

2017-03-24 Thread dlangPupil via Digitalmars-d
On Friday, 24 March 2017 at 06:30:25 UTC, H. S. Teoh wrote: You have to keep in mind that one downside of hashtables is that they tend to be unfriendly towards caching hierarchies ... For certain applications, where key lookups are more-or-less random, this is the best you could do, but for

Re: The delang is using merge instead of rebase/squash

2017-03-24 Thread Martin Nowak via Digitalmars-d
On Tuesday, 21 March 2017 at 20:16:00 UTC, Atila Neves wrote: git rebase master my_branch git checkout master git merge --no-ff my_branch Yes, that's about what we aim for, rebase w/ --autosquash though, so that people can `git commit --fixup` new fixup commits to open PRs w/o leaving noise b

Re: Multi-commit PRs vs. multiple single-commit PRs

2017-03-24 Thread Martin Nowak via Digitalmars-d
On Tuesday, 21 March 2017 at 12:49:22 UTC, Vladimir Panteleev wrote: On Tuesday, 21 March 2017 at 11:59:42 UTC, deadalnix wrote: Then it should have been 2 PR or more to begin with. Splitting PR in smaller ones is a good practice in general, This is probably true for many cases, but I don't th

DMD Git master regression: disabled postblits during CTFE

2017-03-24 Thread Nordlöw via Digitalmars-d
The file https://github.com/nordlow/gmp-d/blob/master/src/gmp/z.d in my https://github.com/nordlow/gmp-d package errors during compilation with DMD Git master as z.d(2350,16): Error: struct gmp.z.MpZ is not copyable because it is annotated with @disable Specifically, this happens in the ret

Yet another project with vibe.d

2017-03-24 Thread Chris via Digitalmars-d
I just wanted to say thank you for vibe.d, Sönke and Kai (for the book). I use vibe.d for all new web projects, and it's great. Less and less JS, more and more D. It's also very fast. The way we use it is that we set up little vibe.d servers behind the scenes and redirect to them.

Re: Multi-commit PRs vs. multiple single-commit PRs

2017-03-24 Thread deadalnix via Digitalmars-d
On Friday, 24 March 2017 at 09:27:54 UTC, Vladimir Panteleev wrote: Yep, because of the misuse-worst-case arguments. Simple solutions that guard against such mistakes are welcome. E.g. we could allow squashing if all commits' commit messages except the first one's start with "[SQUASH] " or "fix

Re: Multi-commit PRs vs. multiple single-commit PRs

2017-03-24 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 24 March 2017 at 05:56:57 UTC, Seb wrote: On Friday, 24 March 2017 at 05:10:54 UTC, Vladimir Panteleev wrote: I think that if you do not think that discussing this subject any further is worth your time, then you shouldn't allocate any of your time time towards it. As previously ment