Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread psychoticRabbit via Digitalmars-d

On Tuesday, 20 February 2018 at 06:40:25 UTC, Tobias Müller wrote:
It's no wonder that D has so few contributors if they are 
actively scared away.


C'mon... was it really that scary?

If you want more people to contribute, make it as easy for them 
as possible.


and 'easy as possible' is already done for them - just use this 
forum as I do, from this website.


what is a nntp client anyway?

I think I recall using one back in the 90's...but that was so 
long ao...




Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Tobias Müller via Digitalmars-d
Nick Sabalausky (Abscissa)  wrote:
> On 02/19/2018 03:52 AM, Manu wrote:
>> On 18 Feb. 2018 10:25 pm, "Walter Bright via Digitalmars-d" <
>> digitalmars-d@puremagic.com> wrote:
>> 
>> On 2/18/2018 7:52 PM, Nick Sabalausky (Abscissa) wrote:
>> 
>>> Well, it's also the world's most inconsistant and statndards-disregarding.
>>> We're talking 1990's MS-level behavior here. It's *always* causing trouble
>>> for something or another.
>>> 
>> 
>> And the great thing about NNTP is that the user gets to choose the client.
>> Not the server. If you don't like the way your client behaves, use another
>> one.
>> 
>> 
>> Except in this case it's you that doesn't like the way my mail client
>> behaves.
>> 
> 
> Because your mail client is BROKEN.
> 
>> I don't want to install software, I'll continue using Gmail, undoubtedly
>> the world's most popular mail client...
> 
> Then petition *Google* to fix their shitty fucking software. You've 
> already been told it has fuck all to do with NNTP.
> 
> Seriously, why the fuck would ANYONE think that by relying on Google 
> software they're somehow NOT being dragged along by the ear on Google's 
> every whim and misstep. Christ, we've already been through all this SAME 
> EXACT shit in the 90's with Microsoft, let's try actually *learning* 
> from it and move on.

It's no wonder that D has so few contributors if they are actively scared
away.

If you want more people to contribute, make it as easy for them as
possible. I really don't understand why this cannot be solved on the
server. Replying to all adresses in the Reply-To: header isn't what I would
call broken anyway. Is he even using NNTP? Or maybe the mailing list
Interface?



Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread psychoticRabbit via Digitalmars-d

On Monday, 19 February 2018 at 02:23:02 UTC, Walter Bright wrote:


This one isn't double size. But google does insert some weird 
fields:




Almost certainly, that 'wierd' stuff is related to googles 
insidious need to track and record EVERYTHING *you* do, so it can 
build an even better profile of you (usually without you even 
knowing it does so), and then, having achieved this objective, it 
switches to it primary objective : to throw even more targeted 
advertising at you.


The human race has become nothing more than fodder for targetted 
advertising.


See... that's the mistake Microsoft made in the 80s and 90s - 
they just didn't understood the psychology of the gift economy, 
and how to manipulate it, and profit from it.


That's the only reason why we're discussing Google mail instead 
of Microsoft mail.




Re: Status of @nogc with the runtime

2018-02-19 Thread Soren via Digitalmars-d
Thank you for this status report, much appreciated, and exactly 
the kind of thing I hope for.  Don’t be discouraged by the time 
it has taken, it will be worth it.  Good work!


Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Nick Sabalausky (Abscissa) via Digitalmars-d

On 02/19/2018 03:52 AM, Manu wrote:

On 18 Feb. 2018 10:25 pm, "Walter Bright via Digitalmars-d" <
digitalmars-d@puremagic.com> wrote:

On 2/18/2018 7:52 PM, Nick Sabalausky (Abscissa) wrote:


Well, it's also the world's most inconsistant and statndards-disregarding.
We're talking 1990's MS-level behavior here. It's *always* causing trouble
for something or another.



And the great thing about NNTP is that the user gets to choose the client.
Not the server. If you don't like the way your client behaves, use another
one.


Except in this case it's you that doesn't like the way my mail client
behaves.



Because your mail client is BROKEN.


I don't want to install software, I'll continue using Gmail, undoubtedly
the world's most popular mail client...


Then petition *Google* to fix their shitty fucking software. You've 
already been told it has fuck all to do with NNTP.


Seriously, why the fuck would ANYONE think that by relying on Google 
software they're somehow NOT being dragged along by the ear on Google's 
every whim and misstep. Christ, we've already been through all this SAME 
EXACT shit in the 90's with Microsoft, let's try actually *learning* 
from it and move on.


Re: Tuple DIP

2018-02-19 Thread Timon Gehr via Digitalmars-d

On 20.02.2018 01:57, Timothee Cour wrote:

On Mon, Feb 19, 2018 at 4:05 PM, Timon Gehr via Digitalmars-d
 wrote:

On 20.02.2018 00:53, Timothee Cour wrote:



Sure! Also, this:

void main(string[] args){
 enforce(args.length==5, "Invalid args");
 auto (infile, colname, repl, outfile) = args[1..5].unpack;
 // ...
}



how does that latter example work?



IFTI. unpack could have the following overload:

auto unpack(size_t n,T)(T[n] args){
return 
mixin("tuple("~iota(n).map!(i=>text("args[",i,"]")).join(",")~")");

}


Re: Tuple DIP

2018-02-19 Thread Timothee Cour via Digitalmars-d
On Mon, Feb 19, 2018 at 4:05 PM, Timon Gehr via Digitalmars-d
 wrote:
> On 20.02.2018 00:53, Timothee Cour wrote:
>>
> Sure! Also, this:
>
> void main(string[] args){
> enforce(args.length==5, "Invalid args");
> auto (infile, colname, repl, outfile) = args[1..5].unpack;
> // ...
> }


how does that latter example work?


Re: Tuple DIP

2018-02-19 Thread Timon Gehr via Digitalmars-d

On 20.02.2018 00:53, Timothee Cour wrote:

great! maybe worth adding to DIP? (even though `unpack` would be
(IIUC) a pure library solution on top of this DIP)
...


Yes. I'll add it to the use cases.


and that would work too I guess?
```
string[4] args=...;
auto (infile, colname, repl, outfile) = args.unpack;
```


Sure! Also, this:

void main(string[] args){
enforce(args.length==5, "Invalid args");
auto (infile, colname, repl, outfile) = args[1..5].unpack;
// ...
}


Re: Tuple DIP

2018-02-19 Thread Timothee Cour via Digitalmars-d
great! maybe worth adding to DIP? (even though `unpack` would be
(IIUC) a pure library solution on top of this DIP)

and that would work too I guess?
```
string[4] args=...;
auto (infile, colname, repl, outfile) = args.unpack;
```


On Mon, Feb 19, 2018 at 3:47 PM, Timon Gehr via Digitalmars-d
 wrote:
> On 20.02.2018 00:43, Timon Gehr wrote:
>>
>>
>> void main(){
>>  auto (infile, colname, repl, outfile) = args[1..$].unpack!4("Invalid
>> args\n");
>> }
>
>
> Actually:
>
> void main(string[] args){
>
> auto (infile, colname, repl, outfile) = args[1..$].unpack!4("Invalid
> args\n");
> }
>


Re: Tuple DIP

2018-02-19 Thread Timon Gehr via Digitalmars-d

On 20.02.2018 00:43, Timon Gehr wrote:


void main(){
     auto (infile, colname, repl, outfile) = 
args[1..$].unpack!4("Invalid args\n");

}


Actually:

void main(string[] args){
auto (infile, colname, repl, outfile) = 
args[1..$].unpack!4("Invalid args\n");

}



Re: Tuple DIP

2018-02-19 Thread Timon Gehr via Digitalmars-d

On 20.02.2018 00:19, timotheecour wrote:

On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple 
ergonomics in D:


https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md


This DIP aims to make code like the following valid D:

...

Would this DIP allow array unpacking?
...


Yes, but would not be built-in.

eg, see this rust snippet from 
https://gist.github.com/anonymous/9cfc3d1b057f7a137ccbfb94bf4bfcef


```
fn main() {
   let (infile, colname, repl, outfile) = 
std::env::args().skip(1).tuples().next().expect("Invalid args\n");

}
```

what would be the D equivalent under this DIP? (just for the array 
unpacking part )






For a suitable implementation of "unpack":

void main(){
auto (infile, colname, repl, outfile) = 
args[1..$].unpack!4("Invalid args\n");

}

Unfortunately, there is no good way to get rid of "4", as D does not 
have backwards type inference.


Re: Tuple DIP

2018-02-19 Thread timotheecour via Digitalmars-d

On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve 
tuple ergonomics in D:


https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md


This DIP aims to make code like the following valid D:

...

Would this DIP allow array unpacking?

eg, see this rust snippet from 
https://gist.github.com/anonymous/9cfc3d1b057f7a137ccbfb94bf4bfcef


```
fn main() {
  let (infile, colname, repl, outfile) = 
std::env::args().skip(1).tuples().next().expect("Invalid args\n");

}
```

what would be the D equivalent under this DIP? (just for the 
array unpacking part )






Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Johan Engelen via Digitalmars-d
_Please_ keep the mail/nntp/... discussion separate or private. 
It's clobbering the topic.


Thanks,
  Johan



Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Johan Engelen via Digitalmars-d
On Sunday, 18 February 2018 at 20:01:39 UTC, Jonathan M Davis 
wrote:
On Sunday, February 18, 2018 19:42:07 Johan Engelen via 
Digitalmars-d wrote:
> There are hundreds of lines I need to molest to make the 
> compiler shut up. I won't type another line of code on my 
> colour library until this noise is gone... I will not 
> maintain it. I am emotionally incapable of assaulting my 
> code with those casts.


Using the `-transition=intpromote` compile flag is no option 
for you?


Since that's a transition flag, it's really only a stop-gap 
solution. So, if his issue is that he doesn't like having the 
casts in his code as opposed to not wanting to deal with 
updating his code right now, the flag really doesn't help.


I thought Manu explicitly mentioned that he'd rather have 
possible code breakage than the deprecation message. I'm assuming 
in his case there will not be any breakage. Using 
`-transition=intpromote` will change to the C semantics and shuts 
up the deprecation messages. With time the semantics of 
`-transition=intpromote` will become the new default and the flag 
is no longer needed. So the flag is very helpful in avoiding 
having to adjust the code.


I'd say that if he's not going to abandon his library, he 
either needs to just grit his teeth and use the explicit casts, 
or he's going to need to refactor the code so that the casts 
are unnecessary.


I don't see how one would refactor `ubyte foo(ubyte a) { return 
-a; }` and improve things.


-Johan





Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Walter Bright via Digitalmars-d

On 2/19/2018 12:52 AM, Manu wrote:
On 18 Feb. 2018 10:25 pm, "Walter Bright via Digitalmars-d" 
mailto:digitalmars-d@puremagic.com>> wrote:


On 2/18/2018 7:52 PM, Nick Sabalausky (Abscissa) wrote:

Well, it's also the world's most inconsistant and
statndards-disregarding. We're talking 1990's MS-level behavior here.
It's *always* causing trouble for something or another.


And the great thing about NNTP is that the user gets to choose the client.
Not the server. If you don't like the way your client behaves, use another 
one.


Except in this case it's you that doesn't like the way my mail client behaves.


You're right, I don't like that your mail client sends me private email for 
every forum reply you make to me. This is NOTHING to do with NNTP or the forum 
software. It's YOUR mail client.


There's nothing I nor anyone here can do about your mail client.


I don't want to install software, I'll continue using Gmail, undoubtedly the 
world's most popular mail client... I feel like this client should be well 
supported by the forum software, and not cause problems in its default settings 
(which it seems to revert to frequently... Maybe they update?)


The D forum software has nothing to do with how you configure YOUR email client.

Note that you can use DFeed itself to interact with the newsgroup. You don't 
have to install anything to do that.


Re: How to run d app as service ?

2018-02-19 Thread Seb via Digitalmars-d

On Monday, 19 February 2018 at 12:29:12 UTC, Jayam wrote:

In production server, we need to run Dlang app as service.


If you are looking for a PaaS (platform as a service), using 
Heroku is pretty easy:


https://tour.dlang.org/tour/en/vibed/deploy-on-heroku

Also as other mentioned, everything else is similar to how you 
would do it with any other compiled language, e.g. Systemd


People nowadays seems to be preferring Docker for deployment, you 
can just COPY the built binary into any container or 
alternatively you can build it in Docker too:



https://github.com/wilzbach/dlang-docker/blob/master/example-app/Dockerfile


Re: How to run d app as service ?

2018-02-19 Thread Jacob Carlborg via Digitalmars-d

On 2018-02-19 13:29, Jayam wrote:

In production server, we need to run Dlang app as service.


If you're referring to running it as a service in the background, I 
highly recommend Systemd if your platform supports. You don't need to to 
any specific with the D application. Just correctly Systemd for your 
application, it should be pretty easy to find by googling, it's not 
anything specific to D.


--
/Jacob Carlborg


Re: How to run d app as service ?

2018-02-19 Thread bauss via Digitalmars-d

On Monday, 19 February 2018 at 12:29:12 UTC, Jayam wrote:

In production server, we need to run Dlang app as service.


What do you mean by running dlang app as a service?

An application written in D?

Same way you would with a C++ application.


Re: How to run d app as service ?

2018-02-19 Thread Nicholas Wilson via Digitalmars-d

On Monday, 19 February 2018 at 12:29:12 UTC, Jayam wrote:

In production server, we need to run Dlang app as service.


Please direct such questions to the learn group. Also I suspect 
you'll need to provide more information than that.


How to run d app as service ?

2018-02-19 Thread Jayam via Digitalmars-d

In production server, we need to run Dlang app as service.


Re: Status of @nogc with the runtime

2018-02-19 Thread Martin Nowak via Digitalmars-d

On Sunday, 18 February 2018 at 22:28:48 UTC, Peter Campbell wrote:
Indeed, very interesting read and exactly the information I was 
looking for! Thanks a lot Martin, I'm excited to see this 
progress. It's good to know it's still being worked on and 
progress is being made.


Yes, it's just crazy how much work and expertise is involved with 
a programming language ecosystem, so things always go much slower 
than intended.


In case someone wants to help, I currently have to divert a lot 
of time into https://github.com/dlang/dub. Package managers are 
suprisingly complex pieces of software. We have some basic 
architecture 
https://github.com/dlang/dub/blob/master/ARCHITECTURE.md and 
would benefit a lot from a few more contributors getting familiar 
with the implementation.


Re: New abstraction: Layout

2018-02-19 Thread Nathan S. via Digitalmars-d
On Saturday, 17 February 2018 at 12:49:07 UTC, Andrei 
Alexandrescu wrote:

On 02/16/2018 10:10 PM, rikki cattermole wrote:
Could use the name for the field as well. At the minimum 
useful for debugging purposes.


That would be tricky because fields are decomposed down to 
primitive types. -- Andrei


That's unfortunate. Not being able to get the names and types 
together is my main dissatisfaction with the current interface.


Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Jonathan M Davis via Digitalmars-d
On Monday, February 19, 2018 00:36:11 Walter Bright via Digitalmars-d wrote:
> On 2/18/2018 11:02 PM, Jonathan M Davis wrote:
> > On Sunday, February 18, 2018 22:17:49 Walter Bright via Digitalmars-d 
wrote:
> >> But that's still the mail client, not the NNTP software.
> >
> > It's a problem with how mailman is configured. Yes, the user can remove
> > the second e-mail address from "To" when replying, but that's easy to
> > miss, and as I understand it, the e-mail client is doing the correct
> > thing when it puts all of the addresses in the "Reply-To" header in
> > "To" when responding. Mailman shouldn't be putting two address in the
> > "Reply-To" field if the first place, and if didn't, then this wouldn't
> > be a problem.
> >
> > And no, that's not a problem with NNTP, but it's a problem with the
> > interface that many of us use to interact with the newsgroup, and it's
> > not a problem with the clients that we're running ourselves to read and
> > send e-mail to the mailing list.
>
> Just to let you know, Thunderbird (what I use to post to NNTP) does not do
> that. Here's what the headers TB generates:
>
> -
> Path:
> digitalmars.com!.POSTED.c-73-83-17-42.hsd1.wa.comcast.net!not-for-mail
> From: Walter Bright 
> Newsgroups: digitalmars.D
> Subject: Re: Annoyance with new integer promotion deprecations
> Date: Sun, 18 Feb 2018 22:17:49 -0800
> Organization: Digital Mars
> Message-ID: 
> References: <20180205192225.ga30...@quickfur.ath.cx>
>   
>   
>   
> Mime-Version: 1.0
> Content-Type: text/plain; charset=utf-8; format=flowed
> Content-Transfer-Encoding: 7bit
> Injection-Date: Mon, 19 Feb 2018 06:17:47 + (UTC)
> Injection-Info: digitalmars.com;
> posting-host="c-73-83-17-42.hsd1.wa.comcast.net:73.83.17.42";
>   logging-data="4945"; mail-complaints-to="use...@digitalmars.com"
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
>   Thunderbird/52.6.0
> In-Reply-To: 
> Content-Language: en-US
> Xref: digitalmars.com digitalmars.D:311870
> ---
>
> Note that the [From:] email address shown is configurable in TB. It
> doesn't have to be a real address.

Well, I don't use NNTP, and when your message arrived from the mailing list,
it had this in its headers:

Reply-To: Walter Bright ,
"digitalmars.D" 

So, regardless of what you send via NNTP, mailman is sending a Reply-To with
your e-mail address in addition to the mailing list address, and that's
what's causing the problem. So, anyone who's using the newsgroup / mailing
list / forum via the mailing list interface is going to have this problem
regardless of what their e-mail client is and regardless of what client or
interface the person sending the message used. The only way someone using
the mailing list wouldn't have a problem would be if their e-mail client
ignored the Reply-To header and used the From header to decide which e-mail
address to reply to, which would be incorrect behavior for an e-mail client.

As long as mailman is sending both addresses in the Reply-To header instead
of just the mailing list's e-mail address, anyone using the mailing list
interface is going to be sending e-mails to both the mailing list and the
person they're replying to unless they manually remove the person's address
from the To field before sending the message.

The only solution that I see is for Brad to adjust mailman's configuration
so that it stops putting the poster's e-mail address in the Reply-To header.

- Jonathan M Davis



Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Manu via Digitalmars-d
On 18 Feb. 2018 10:25 pm, "Walter Bright via Digitalmars-d" <
digitalmars-d@puremagic.com> wrote:

On 2/18/2018 7:52 PM, Nick Sabalausky (Abscissa) wrote:

> Well, it's also the world's most inconsistant and statndards-disregarding.
> We're talking 1990's MS-level behavior here. It's *always* causing trouble
> for something or another.
>

And the great thing about NNTP is that the user gets to choose the client.
Not the server. If you don't like the way your client behaves, use another
one.


Except in this case it's you that doesn't like the way my mail client
behaves.

I don't want to install software, I'll continue using Gmail, undoubtedly
the world's most popular mail client... I feel like this client should be
well supported by the forum software, and not cause problems in its default
settings (which it seems to revert to frequently... Maybe they update?)


Re: Annoyance with new integer promotion deprecations

2018-02-19 Thread Walter Bright via Digitalmars-d

On 2/18/2018 11:02 PM, Jonathan M Davis wrote:

On Sunday, February 18, 2018 22:17:49 Walter Bright via Digitalmars-d wrote:

But that's still the mail client, not the NNTP software.


It's a problem with how mailman is configured. Yes, the user can remove the
second e-mail address from "To" when replying, but that's easy to miss, and
as I understand it, the e-mail client is doing the correct thing when it
puts all of the addresses in the "Reply-To" header in "To" when responding.
Mailman shouldn't be putting two address in the "Reply-To" field if the
first place, and if didn't, then this wouldn't be a problem.

And no, that's not a problem with NNTP, but it's a problem with the
interface that many of us use to interact with the newsgroup, and it's not a
problem with the clients that we're running ourselves to read and send
e-mail to the mailing list.


Just to let you know, Thunderbird (what I use to post to NNTP) does not do that. 
Here's what the headers TB generates:


-
Path: digitalmars.com!.POSTED.c-73-83-17-42.hsd1.wa.comcast.net!not-for-mail
From: Walter Bright 
Newsgroups: digitalmars.D
Subject: Re: Annoyance with new integer promotion deprecations
Date: Sun, 18 Feb 2018 22:17:49 -0800
Organization: Digital Mars
Message-ID: 
References: <20180205192225.ga30...@quickfur.ath.cx>
 
 
 
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 19 Feb 2018 06:17:47 + (UTC)
Injection-Info: digitalmars.com; 
posting-host="c-73-83-17-42.hsd1.wa.comcast.net:73.83.17.42";

logging-data="4945"; mail-complaints-to="use...@digitalmars.com"
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.6.0
In-Reply-To: 
Content-Language: en-US
Xref: digitalmars.com digitalmars.D:311870
---

Note that the [From:] email address shown is configurable in TB. It doesn't have 
to be a real address.