Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-23 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 04/21/2017 01:20 PM, Vasudev Ram wrote: Hi list, I hope the question is self-evident from the message subject. If not, it means: what are D developers generally called (to indicate that they develop in D)? "Suave, awesome, ultra-attractive programmer with an impeccably fine taste in langua

Re: Move construction from !is(T == typeof(this))

2017-04-23 Thread rikki cattermole via Digitalmars-d
There is[0] but idk how close it is to std:move and the likes. [0] http://dlang.org/phobos/std_algorithm_mutation.html#.move

Move construction from !is(T == typeof(this))

2017-04-23 Thread Manu via Digitalmars-d
Are there any known solutions to perform efficient move construction in D? D's pretty good at doing moves at all the right times, but with a serious limitation compared to C++ that the type must be an exact match. Consider this C++; really bad example, but just to illustrate: struct X { std::str

Re: Default-valued nothrow @nogc std.conv:to

2017-04-23 Thread crimaniak via Digitalmars-d
On Saturday, 22 April 2017 at 12:14:26 UTC, Nordlöw wrote: Have anyone tried to implement a variant of `std.conv.to` that can be `nothrow @nogc` if the exception handling is replaced by an extra second parameter (`defaultValue`) returned iff the call to `to` throws? There is common ifThrown t

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread Jon Degenhardt via Digitalmars-d
On Sunday, 23 April 2017 at 12:03:47 UTC, Andrei Alexandrescu wrote: On 4/22/17 4:52 PM, Joakim wrote: Why is this still up for review? Mostly out of a sense of conformity. We asked Michael to give no special treatment of DIPs originating from us, and this one was open, so he put it up for r

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread deadalnix via Digitalmars-d
On Sunday, 23 April 2017 at 19:25:09 UTC, Andrej Mitrovic wrote: With this syntax, the import is executed only if the declared name (process) is actually looked up. I don't believe the workaround with the `from` template fixes this. Not sure what DMD does, but SDC sure would do it only if us

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread Andrej Mitrovic via Digitalmars-d
On Sunday, 23 April 2017 at 16:39:35 UTC, deadalnix wrote: It's just one per module. Templates are only instantiated once per new set of arguments. There may be some gain here, but I doubt this is worth adding a new language feature. Ah, good point. Though there's still merit to this DIP such

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-23 Thread timmyjose via Digitalmars-d
On Saturday, 22 April 2017 at 08:30:03 UTC, Russel Winder wrote: Terms such as Pythonista, Rubyist, Rustacean, Gopher, etc. are terms of tribalism and exclusion. They are attempts to ensure people claiming membership of the tribe reject being polyglot by pressuring them to eschew all other lang

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-23 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 04/23/2017 07:55 AM, Guillaume Piolat wrote: On Saturday, 22 April 2017 at 08:30:03 UTC, Russel Winder wrote: Terms such as Pythonista, Rubyist, Rustacean, Gopher, etc. are terms of tribalism and exclusion. They are attempts to ensure people claiming membership of the tribe reject being polyg

Re: Address of UFCS call implicity converts to Delegate

2017-04-23 Thread Basile B. via Digitalmars-d
On Sunday, 23 April 2017 at 17:07:51 UTC, Jonathan Marler wrote: On Sunday, 23 April 2017 at 17:00:59 UTC, Basile B. wrote: 2/ Why not just a member function ? For the same reason that UFCS exists. You can't add "member functions" to external library types. Good point. I have to say that t

Re: Address of UFCS call implicity converts to Delegate

2017-04-23 Thread Jonathan Marler via Digitalmars-d
On Sunday, 23 April 2017 at 17:00:59 UTC, Basile B. wrote: 2/ Why not just a member function ? For the same reason that UFCS exists. You can't add "member functions" to external library types.

Re: Address of UFCS call implicity converts to Delegate

2017-04-23 Thread Basile B. via Digitalmars-d
On Sunday, 23 April 2017 at 16:32:06 UTC, Jonathan Marler wrote: This feels like a natural extension to existing semantics. It doesn't require new syntax and serves as a solution to some issues when working with delegates. Say some API wants a delegate like this: void delegate(string arg) W

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread Arturg via Digitalmars-d
On Sunday, 23 April 2017 at 12:03:47 UTC, Andrei Alexandrescu wrote: On 4/22/17 4:52 PM, Joakim wrote: On Saturday, 22 April 2017 at 11:54:08 UTC, Mike Parker wrote: DIP 1005 is titled "Dependency-Carrying Declarations". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1005.md All review-rel

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread deadalnix via Digitalmars-d
On Saturday, 22 April 2017 at 11:54:08 UTC, Mike Parker wrote: Destroy! I'm not per se against going there but there are 2 points that needs to be considered. The first one is the "self important lookup" which obviate the need for this DIP to some extent. Second, if we are going to proceed

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread deadalnix via Digitalmars-d
On Sunday, 23 April 2017 at 12:34:34 UTC, Andrej Mitrovic wrote: On Sunday, 23 April 2017 at 12:03:47 UTC, Andrei Alexandrescu wrote: Mostly out of a sense of conformity. We asked Michael to give no special treatment of DIPs originating from us, and this one was open, so he put it up for review

Address of UFCS call implicity converts to Delegate

2017-04-23 Thread Jonathan Marler via Digitalmars-d
This feels like a natural extension to existing semantics. It doesn't require new syntax and serves as a solution to some issues when working with delegates. Say some API wants a delegate like this: void delegate(string arg) With this feature, you could take a function like this: void myCoolF

[OT] Re: DConf 2017 Berlin - bicycles

2017-04-23 Thread Bastiaan Veelo via Digitalmars-d
On Saturday, 22 April 2017 at 01:41:25 UTC, Walter Bright wrote: Many times I idly thought about rigging a sail on my bike. Not a bad idea: https://www.youtube.com/watch?v=AdfE4-hjrWA

Re: Compare boost::hana to D

2017-04-23 Thread Steven Schveighoffer via Digitalmars-d
On 4/23/17 12:22 AM, Jesse Phillips wrote: On Friday, 21 April 2017 at 13:10:43 UTC, Adam D. Ruppe wrote: On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote: [2] https://epi.github.io/2017/03/18/less_fun.html BTW in your D foreach, you could also have done `switch` void trigg

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread Jacob Carlborg via Digitalmars-d
On 2017-04-23 14:03, Andrei Alexandrescu wrote: Mostly out of a sense of conformity. We asked Michael to give no special treatment of DIPs originating from us, and this one was open, so he put it up for review. It is likely it will end up rejected in favor of https://github.com/dlang/druntime/pu

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread Andrej Mitrovic via Digitalmars-d
On Sunday, 23 April 2017 at 12:03:47 UTC, Andrei Alexandrescu wrote: Mostly out of a sense of conformity. We asked Michael to give no special treatment of DIPs originating from us, and this one was open, so he put it up for review. It is likely it will end up rejected in favor of https://githu

Re: DIP 1005 - Preliminary Review Round 1

2017-04-23 Thread Andrei Alexandrescu via Digitalmars-d
On 4/22/17 4:52 PM, Joakim wrote: On Saturday, 22 April 2017 at 11:54:08 UTC, Mike Parker wrote: DIP 1005 is titled "Dependency-Carrying Declarations". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1005.md All review-related feedback on and discussion of the DIP should occur in this threa

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-23 Thread Guillaume Piolat via Digitalmars-d
On Saturday, 22 April 2017 at 08:30:03 UTC, Russel Winder wrote: Terms such as Pythonista, Rubyist, Rustacean, Gopher, etc. are terms of tribalism and exclusion. They are attempts to ensure people claiming membership of the tribe reject being polyglot by pressuring them to eschew all other lang

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-23 Thread Idan Arye via Digitalmars-d
On Saturday, 22 April 2017 at 08:30:03 UTC, Russel Winder wrote: Terms such as Pythonista, Rubyist, Rustacean, Gopher, etc. are terms of tribalism and exclusion. They are attempts to ensure people claiming membership of the tribe reject being polyglot by pressuring them to eschew all other lang

Re: [OT] do we have lint for bash?

2017-04-23 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 23 April 2017 at 10:07:30 UTC, cym13 wrote: On Sunday, 23 April 2017 at 09:51:36 UTC, Kagamin wrote: https://abload.de/img/tmpliy6q.png I guess you're looking for something like http://www.shellcheck.net/ However I don't see how an automated tool could have found the error in yo

Re: [OT] do we have lint for bash?

2017-04-23 Thread cym13 via Digitalmars-d
On Sunday, 23 April 2017 at 09:51:36 UTC, Kagamin wrote: https://abload.de/img/tmpliy6q.png I guess you're looking for something like http://www.shellcheck.net/ However I don't see how an automated tool could have found the error in your screenshot as passing multiple arguments to rm is a

[OT] do we have lint for bash?

2017-04-23 Thread Kagamin via Digitalmars-d
https://abload.de/img/tmpliy6q.png

template auto switch_(Any& a) { return [&a](auto ...cases_) { auto cases = hana::make_tuple(cases_...); auto default_ = hana::find_if(cases, [](auto const& c) { return hana:

2017-04-23 Thread Amit yadav via Digitalmars-d
template auto switch_(Any& a) { return [&a](auto ...cases_) { auto cases = hana::make_tuple(cases_...); auto default_ = hana::find_if(cases, [](auto const& c) { return hana::first(c) == hana::type_c; }); // ... }; }