January 06, 2013
On 01/05/2013 11:34 AM, Maxim Fomin wrote:
> On Friday, 4 January 2013 at 19:15:03 UTC, Ali Çehreli wrote:

>> >>> There is no semantic difference between
>> >>>
>> >>> S s = S(2); foo(s)
>> >>>
>> >>> and
>> >>>
>> >>> foo(S(2));

>> Still, there is no semantic difference.

> Why do you think there is no semantic difference?

I took the example with an assumed scope around the first line:

    { S s = S(2); foo(s); }

That's why all I see is that an S object is constructed and passed to foo(). Same as the following:

    foo(S(2));

>> Constructors and functions do not affect objects alone. However
>> frowned upon, a function that is called on an S may have side-effects
>> that are beyond the object itself. If foo() does s.bar() and S.bar has
>> a side-effect, I wouldn't care about the changes on the rvalue object
>> itself.
>
> Even if one particular function makes some side effects and does not
> care by taking ref parameter that changes may be discarded, it is a
> source of bugs in general, when taking argument by ref means that passed
> object must be modified and changes need to be preserved.

I agree that perhaps a number of my bugs have been avoided by that. I still find it too intrusive of the language when it assumes that the changes to the object are important as well.

Yet, the language has no interest in e.g. the return values that may not be consumed completely:

    vector<int> v = makeVector();
    cout << vector[0];
    // Oops! Have I forgotten vector[1] or did I simply not care?

I see it the same issue with ref parameters. foo() may call s.nonConstFunc(), which may have two effects: A side-effect and a modification to the object. Why would I not be allowed to not care about the latter similar to how I did not care about vector[1]? That's my point.

Again though, perhaps this rule has protected me more than it brought inconveniences.

Ali

January 06, 2013
On 1/5/13 5:22 PM, Philippe Sigaud wrote:
> Andrei, would that be possible to give us access to the .css that gives
> the mobi file its global appearance? I'd like D-related mobi/epub that I
> create to have the same look-and-feel.

https://github.com/D-Programming-Language/d-programming-language.org/blob/master/ebook.css

https://github.com/D-Programming-Language/d-programming-language.org/blob/master/ebook.ddoc

See also the makefile.


Andrei
January 06, 2013
On Thu, 03 Jan 2013 23:32:45 -0500
Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:

> On 1/3/13 11:26 PM, Rob T wrote:
> 
> > I like the idea of the e-book but we need an up-to-date copy and it should be available free of charge. If the D community needs funding, a method of making donations is a much better and more acceptable route to take.
> 
> This is a misunderstanding and I confess I'm mildly miffed by it. The e-book is generated from the online documentation. $0.99 is the smallest price Amazon would allow any self-publication to be on their site.

It's an ebook version of the content on dlang.org, right? That should be free. If Amazon won't allow it to be free then it shouldn't be on Amazon. End of story.

If you want people to be able to read it on a Kindle, then use something that doesn't require going through Amazon. If it's not possible to provide a document that's free to view on Kindle (I don't know whether that's the case), then it's the users own damn problem for buying a device that won't allow them to view free/freely-available content. But the bottom line is, we should not, and should never have released an electronic copy of the website content in a for-cost form. I was opposed to to it from the beginning.

> Some people (negligible as a source of income, but not few; the
> book makes it at times on top 100 bestseller list in its category) do
> find value in having the content on their Kindle, and are willing to
> pay one dollar for it, so there is value in having it there. To
> construe that as an awkward attempt to make money is quite a bit of a
> stretch.
> 

It's not about whether anyone's trying to make money. It's about the ethics *AND THE PUBLIC IMAGE* of selling copies of our own free-on-the-web documentation. One dollar, one cent, half a cent, it's irrelevent.

If a platform or website won't allow free content to be free, then said content doesn't belong on that platform/website, period. That's all there is to it.

January 06, 2013
On 1/6/13 12:01 AM, Nick Sabalausky wrote:
> On Thu, 03 Jan 2013 23:32:45 -0500
> Andrei Alexandrescu<SeeWebsiteForEmail@erdani.org>  wrote:
>
>> On 1/3/13 11:26 PM, Rob T wrote:
>>
>>> I like the idea of the e-book but we need an up-to-date copy and it
>>> should be available free of charge. If the D community needs
>>> funding, a method of making donations is a much better and more
>>> acceptable route to take.
>>
>> This is a misunderstanding and I confess I'm mildly miffed by it. The
>> e-book is generated from the online documentation. $0.99 is the
>> smallest price Amazon would allow any self-publication to be on their
>> site.
>
> It's an ebook version of the content on dlang.org, right? That should
> be free. If Amazon won't allow it to be free then it shouldn't be on
> Amazon. End of story.

Walter and I discussed this matter for a while and reached a different conclusion. Amazon has good distribution which we found worthwhile. The content is the same as the one freely available on the website, and we're not sketchy about it. The material can be read on the Kindle regardless of provenance.

Andrei


January 06, 2013
On Sun, 06 Jan 2013 00:45:24 -0500
Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:

> On 1/6/13 12:01 AM, Nick Sabalausky wrote:
> > On Thu, 03 Jan 2013 23:32:45 -0500
> > Andrei Alexandrescu<SeeWebsiteForEmail@erdani.org>  wrote:
> >
> >> On 1/3/13 11:26 PM, Rob T wrote:
> >>
> >>> I like the idea of the e-book but we need an up-to-date copy and it should be available free of charge. If the D community needs funding, a method of making donations is a much better and more acceptable route to take.
> >>
> >> This is a misunderstanding and I confess I'm mildly miffed by it. The e-book is generated from the online documentation. $0.99 is the smallest price Amazon would allow any self-publication to be on their site.
> >
> > It's an ebook version of the content on dlang.org, right? That should be free. If Amazon won't allow it to be free then it shouldn't be on Amazon. End of story.
> 
> Walter and I discussed this matter for a while and reached a different conclusion. Amazon has good distribution which we found worthwhile.

Amazon's reach is irrelevant given the bigger issue.

> The content is the same as the one freely available on
> the website,

Which is exactly why it has no business existing in a paid electronic form.

> and we're not sketchy about it.

I'm tempted argue that it's _inherently_ sketchy, HOWEVER that's irrelevant anyway as, sketchy or not, it still creates an appearance of impropriety, which is bad enough for us.

January 06, 2013
On 1/6/13 12:58 AM, Nick Sabalausky wrote:
> On Sun, 06 Jan 2013 00:45:24 -0500
> Andrei Alexandrescu<SeeWebsiteForEmail@erdani.org>  wrote:
>
>> On 1/6/13 12:01 AM, Nick Sabalausky wrote:
>>> On Thu, 03 Jan 2013 23:32:45 -0500
>>> Andrei Alexandrescu<SeeWebsiteForEmail@erdani.org>   wrote:
>>>
>>>> On 1/3/13 11:26 PM, Rob T wrote:
>>>>
>>>>> I like the idea of the e-book but we need an up-to-date copy and
>>>>> it should be available free of charge. If the D community needs
>>>>> funding, a method of making donations is a much better and more
>>>>> acceptable route to take.
>>>>
>>>> This is a misunderstanding and I confess I'm mildly miffed by it.
>>>> The e-book is generated from the online documentation. $0.99 is the
>>>> smallest price Amazon would allow any self-publication to be on
>>>> their site.
>>>
>>> It's an ebook version of the content on dlang.org, right? That
>>> should be free. If Amazon won't allow it to be free then it
>>> shouldn't be on Amazon. End of story.
>>
>> Walter and I discussed this matter for a while and reached a
>> different conclusion. Amazon has good distribution which we found
>> worthwhile.
>
> Amazon's reach is irrelevant given the bigger issue.
>
>> The content is the same as the one freely available on
>> the website,
>
> Which is exactly why it has no business existing in a paid
> electronic form.
>
>> and we're not sketchy about it.
>
> I'm tempted argue that it's _inherently_ sketchy, HOWEVER that's
> irrelevant anyway as, sketchy or not, it still creates an appearance of
> impropriety, which is bad enough for us.

That's not my perception at all, which signals we might have reached irreducible positions. I won't discuss this further.

Andrei
January 06, 2013
On 01/05/2013 04:58 AM, js.mdnq wrote:

> S s = S(2); foo(s) <==> foo(S(2))

For those to be equivalent, there must be a scope around the first one:

{ S s = S(2); foo(s); } <==> foo(S(2))

I think that's what you've been proposing: The compiler could generate a variable on the stack to be passed to the function that takes ref.

It would still have the problem of losing potential modifications to the variable, which both C++ and D try to protect the programmer from.

Ali

January 06, 2013
On Sun, 6 Jan 2013 00:58:11 -0500
Nick Sabalausky <SeeWebsiteToContactMe@semitwist.com> wrote:

> On Sun, 06 Jan 2013 00:45:24 -0500
> Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:
> 
> > On 1/6/13 12:01 AM, Nick Sabalausky wrote:
> > > On Thu, 03 Jan 2013 23:32:45 -0500
> > > Andrei Alexandrescu<SeeWebsiteForEmail@erdani.org>  wrote:
> > >
> > >> On 1/3/13 11:26 PM, Rob T wrote:
> > >>
> > >>> I like the idea of the e-book but we need an up-to-date copy and it should be available free of charge. If the D community needs funding, a method of making donations is a much better and more acceptable route to take.
> > >>
> > >> This is a misunderstanding and I confess I'm mildly miffed by it. The e-book is generated from the online documentation. $0.99 is the smallest price Amazon would allow any self-publication to be on their site.
> > >
> > > It's an ebook version of the content on dlang.org, right? That should be free. If Amazon won't allow it to be free then it shouldn't be on Amazon. End of story.
> > 
> > Walter and I discussed this matter for a while and reached a different conclusion. Amazon has good distribution which we found worthwhile.
> 
> Amazon's reach is irrelevant given the bigger issue.
> 
> > The content is the same as the one freely available on
> > the website,
> 
> Which is exactly why it has no business existing in a paid electronic form.
> 
> > and we're not sketchy about it.
> 
> I'm tempted argue that it's _inherently_ sketchy, HOWEVER that's irrelevant anyway as, sketchy or not, it still creates an appearance of impropriety, which is bad enough for us.
> 

I'll put it another way: We've had public perception troubles in the past. D1's competing std libs. Claims of not being OSS. We should know by now not to do things that invite the wrong public perception.

Last thing we need is for a bunch of slashdotters or some such to notice
"Hey, wait a minute, these D guys are trying to sell copies of their own
website! WTF?!" If that got started, do you really think they're
going to stick around long enough to listen to our explanation of "Why
it's not as bad as it looks"?

Someone wants to read a website/pdf/ebook/whatever of the site on their Kindle, then fine, we can provide our *free* copies and then people can do as they please with them. Problem solved, there's nothing left to argue.

(FWIW, a printed/bound hardcopy would be a different matter as there are
printing and material costs involved. But I'm not saying that would be a
good idea for something like this which needs to stay up-to-date,
of course.)

January 06, 2013
>  Andrei, would that be possible to give us access to the .css that gives
>> the mobi file its global appearance? I'd like D-related mobi/epub that I create to have the same look-and-feel.
>>
>
> https://github.com/D-**Programming-Language/d-** programming-language.org/blob/**master/ebook.css<https://github.com/D-Programming-Language/d-programming-language.org/blob/master/ebook.css>
>
> https://github.com/D-**Programming-Language/d-** programming-language.org/blob/**master/ebook.ddoc<https://github.com/D-Programming-Language/d-programming-language.org/blob/master/ebook.ddoc>
>
> See also the makefile.


Thanks a lot.


January 06, 2013
On 2013-01-06 06:01, Nick Sabalausky wrote:

> It's an ebook version of the content on dlang.org, right? That should
> be free. If Amazon won't allow it to be free then it shouldn't be on
> Amazon. End of story.
>
> If you want people to be able to read it on a Kindle, then use
> something that doesn't require going through Amazon. If it's not
> possible to provide a document that's free to view on Kindle (I don't
> know whether that's the case), then it's the users own damn problem
> for buying a device that won't allow them to view free/freely-available
> content.

It's possible to read arbitrary PDF files on a Kindle.

-- 
/Jacob Carlborg