March 04, 2014
On 3/4/14, 10:39 AM, Andrei Alexandrescu wrote:
> On 3/3/14, 8:37 AM, Adam D. Ruppe wrote:
>> As some of you might know, I've been working on a D book over the last
>> few months. It is now available as "coming soon" on the publisher's
>> website:
>>
>> http://www.packtpub.com/discover-advantages-of-programming-in-d-cookbook/book
>>
>
> Announced:
>
> https://www.facebook.com/dlang.org/posts/10202073362529100?stream_ref=10
>
> http://www.reddit.com/r/programming/comments/1zjt9y/d_cookbook_available_for_preordering_from_packt/
>
>
> I get internal server error from Twitter.

The Net is definitely in a bad mood today. My reddit submission shows "1 comment" but there's no comment to see. It also appear in "new" submissions but not in "hot" submissions.


Andrei

March 04, 2014
On Tuesday, 4 March 2014 at 18:58:43 UTC, Andrei Alexandrescu wrote:
> The Net is definitely in a bad mood today. My reddit submission shows "1 comment" but there's no comment to see. It also appear in "new" submissions but not in "hot" submissions.

I don't see it in http://www.reddit.com/r/programming/new/ .
March 04, 2014
On Tuesday, 4 March 2014 at 18:56:50 UTC, Andrei Alexandrescu wrote:
> It's a much harder problem than one might anticipate.

Indeed, I started it last night figuring I could slap something together in 30 minutes to do the job... now I've spent over three hours on it and it still isn't quite right. It almost works (including in CTFE) but rounds some numbers incorrectly (very large and very small especially).

The guys on IRC said to look up the Burger algorithm and do it right, but I kinda wanna just finish it all by myself then maybe take a look at the prior art to see how wrong I was :)
March 04, 2014
On 2014-03-04 19:14:13 +0000, Vladimir Panteleev said:

> On Tuesday, 4 March 2014 at 18:58:43 UTC, Andrei Alexandrescu wrote:
>> The Net is definitely in a bad mood today. My reddit submission shows "1 comment" but there's no comment to see. It also appear in "new" submissions but not in "hot" submissions.
> 
> I don't see it in http://www.reddit.com/r/programming/new/ .

Probably was filtered by some algorithm. Contact moderators.

March 04, 2014
On 3/4/2014 12:04 PM, Adam D. Ruppe wrote:
> On Tuesday, 4 March 2014 at 18:56:50 UTC, Andrei Alexandrescu wrote:
>> It's a much harder problem than one might anticipate.
>
> Indeed, I started it last night figuring I could slap something together in 30
> minutes to do the job... now I've spent over three hours on it and it still
> isn't quite right. It almost works (including in CTFE) but rounds some numbers
> incorrectly (very large and very small especially).

3 hours? Try a week or two.

March 04, 2014
On 3/4/2014 10:57 AM, Andrei Alexandrescu wrote:
> It's a much harder problem than one might anticipate.

It might work better for CTFE to notice that the floating point formatting function is being called, and instead of interpreting that function, do its own workalike. Certainly that'd be a heluva lot faster.

A bugzilla issue for this would be apropos.

March 04, 2014
On 3/4/2014 12:46 PM, Max Klyga wrote:
> On 2014-03-04 19:14:13 +0000, Vladimir Panteleev said:
>
>> On Tuesday, 4 March 2014 at 18:58:43 UTC, Andrei Alexandrescu wrote:
>>> The Net is definitely in a bad mood today. My reddit submission shows "1
>>> comment" but there's no comment to see. It also appear in "new" submissions
>>> but not in "hot" submissions.
>>
>> I don't see it in http://www.reddit.com/r/programming/new/ .
>
> Probably was filtered by some algorithm. Contact moderators.
>

yah, looks like that happened.
March 04, 2014
On Tuesday, 4 March 2014 at 22:29:31 UTC, Walter Bright wrote:
> 3 hours? Try a week or two.

Yeah, I believe it now. Got close with my int version (shifting the fractional portion by the exponent... works great until it overflows adding up the bits). Tried a version with floating point math (cast to int, print that, append . to the string, raise the other to some power of ten, cast to int, call it done) and even that didn't actually work right - the leading zeroes or high exponents weren't right. Haven't even tried parsing them yet!

Yikes. I hate to admit defeat, but this has blown my time budget to pieces. Time to give it up. :(
March 04, 2014
On 3/4/2014 3:04 PM, Adam D. Ruppe wrote:
>
> but I kinda wanna just finish it all by myself then maybe take a look at
> the prior art to see how wrong I was :)

I like to do that too :)

That's what I tried the first time I ever did any parsing (it might have even just been lexing at that point). Wound up with several notebook pages filled with some half-baked bullshit "theory" that made no sense, and then gave up while trying to distill general rules out of it. I'm kind of amazed just how far I managed to dig down that particular rabbit hole.

It was fun, though. And it made learning the proper theory easier since it made so much more sense than my crazy version ;)

March 05, 2014
On 3/4/14, 2:35 PM, Walter Bright wrote:
> On 3/4/2014 12:46 PM, Max Klyga wrote:
>> On 2014-03-04 19:14:13 +0000, Vladimir Panteleev said:
>>
>>> On Tuesday, 4 March 2014 at 18:58:43 UTC, Andrei Alexandrescu wrote:
>>>> The Net is definitely in a bad mood today. My reddit submission
>>>> shows "1
>>>> comment" but there's no comment to see. It also appear in "new"
>>>> submissions
>>>> but not in "hot" submissions.
>>>
>>> I don't see it in http://www.reddit.com/r/programming/new/ .
>>
>> Probably was filtered by some algorithm. Contact moderators.
>>
>
> yah, looks like that happened.

Messaged a moderator. The post has been approved. However the timing is crappy so essentially the opportunity for a broad reach has been wasted.

BTW this is not something that only I can do. Anyone can politely message the moderators and ask what happened. Had that happened earlier (I've had a million meetings today), the impact of the post might have been much higher.

Let me reiterate: there's a lot of good talk about helping D out. Concurrently there are many simple, absolutely trivial tasks that are very easy for anyone to do but add to a lot of overhead if they all fall on the same person. Case in point, I asked for the photos of the keynote speakers on the homepage. This is a good idea because e.g. Scott's mugshot is instant credibility and a good selling points. Nobody found it worth their while to do that, so I ended up doing it myself, too. It would be awesome if there was more attention (thanks eco for the dconf.org pull request!) paid to all things that we can crowdsource.


Thanks,

Andrei