September 02, 2013
On 2 September 2013 03:23, deadalnix <deadalnix@gmail.com> wrote:

> On Sunday, 1 September 2013 at 16:37:19 UTC, Manu wrote:
>
>> Can anyone offer me ANY benefits? It legitimately blows my mind... O_O
>>
>
> You don't need to keep declarations in sync, and you don't need to track down implementations.
>

Now *this* sounds like a job for IDE assistance to me.
But I still barely see this as an inconvenience when compared to not being
able to read a class definition.


September 02, 2013
On 2 September 2013 04:00, bearophile <bearophileHUGS@lycos.com> wrote:

> Manu:
>
>
>  Seriously, how do you quickly read and understand the API through the
>> noise?
>>
>
> The noise increases if you have to repeat the class name for each method :-)
>

Except that you can _read the class definition_.

Look, I'm just giving an account of the collective experience from our
weekend. None of us could find anything easily in each others classes, or
quickly get a reasonable overview of it's design and how it worked.
This leads to needless conversations, asking the other person about it, and
all those questions that I should be able to understand at a glance.
This WILL affect productivity in the office.

The reason was that functions were polluting the class declaration. 9 times out of 10, when I look at a class declaration, I want to know what it is, what it has, and what it can do.


September 02, 2013
On 2 September 2013 04:33, Walter Bright <newshound2@digitalmars.com> wrote:

> On 9/1/2013 9:37 AM, Manu wrote:
>
>> I'm amazed at the resistance to this (a few no's, any yes's at all?).
>>
>
> Andrei and I talked about this a while back, and we both think it is a good idea. But there always seem to be more important things, and it's notable that lack of this does not seem to have slowed down C# or Java.


Both of which have VERY mature dev tools and environments, which mitigate
the problem a little bit.
It also doesn't mean that I like it when using those languages, I just know
that I can't possibly influence it's change.

There are a few distinctions to D though that I think add weight to the
situation compared to C#/Java:
D probably appeals more to ex-C++ users (I'm not aware of any sensis, but
D's main offering at least to me, is an evolution from C++). We are used to
being able to gather a quick summary of a class at a glance.
D (or perhaps just me) makes extensive use of local functions. If the outer
function is at the leftmost tab level, it's easy to recognise if you're
reading the code from a local function or not. If the outer function is
already a few tab levels deep, I frequently find myself becoming unsure of
what/where I'm actually reading.


September 02, 2013
Nick Sabalausky:

> This isn't Python, nobody *has* to indent it.

In Phobos not/badly indented code is going to receive a patch to
fix it and indent it correctly.
In my code I try to respect indentations as much as in Python. I
am not happy to read D code written by other people that has
no/bad indentations.

---------------

Manu:

> Except that you can _read the class definition_.

That's not the right way/place to read the class definition.

(You have a habit coming from C++, but if you want to program in D
you have to rewire your brain a little, to adapt yourself to the
D style).

---------------

Walter:

>> Andrei and I talked about this a while back, and we both think it is a good idea.

Why do you think it's a good idea? Why you don't think tools or
ddoc output is the right place for that?

Where do I find an automatic tool to convert the Manu-style class
code back the less noisy original D-style? :-)

---------------

Manu:

> We are used to
> being able to gather a quick summary of a class at a glance.

I think you have to get used to the D style a little more.


> D (or perhaps just me) makes extensive use of local functions. If the outer
> function is at the leftmost tab level, it's easy to recognise if you're
> reading the code from a local function or not. If the outer function is
> already a few tab levels deep, I frequently find myself becoming unsure of what/where I'm actually reading.

Break methods in smaller functions with less indenting. When
indenting starts to be hard to tell apart, then it's often a sign
that you have too many.

Bye,
bearophile
September 02, 2013
On Sun, Sep 01, 2013 at 05:33:12PM -0700, Walter Bright wrote:
> On 9/1/2013 5:14 PM, H. S. Teoh wrote:
> >But I will say that debugging can and must be improved. Currently, about the only thing usable for dmd -g is to get a stacktrace of a program crash. Nothing else seems to be properly supported (I use gdb). Stepping through statements and setting breakpoints more-or-less works, but I can't get at most variables (keeps complains about being unable to reference 'this' or something similar), sometimes variable values are outright wrong or completely unrelated to the actual value, sometimes variables shown right on the source line being debugged don't exist in the debugger ('no such symbol'). Unable to look into nested structs without hitting odd behaviour. Doesn't understand D naming conventions (or does so poorly).
> 
> I've tried to figure this out many times, and have found the Dwarf format to be completely impenetrable. As far as I can tell, dmd generates correct Dwarf symbolic debug info according to the Dwarf spec.
> 
> gdb relies on very undocumented idiosyncratic combinations of things to work. It appears to be wrapped tightly around exactly what gcc generates.
> 
> I suppose the only way to figure it out is to read the gdb source code. Sigh.
[...]

I feared as much. :-(

My guess is that gdb actually uses a superset of Dwarf, with its own idiosyncratic extensions that only gcc knows about.  I remember in the early days when I was on Solaris, gdb wouldn't understand debugging symbols from the native Sun compiler, and the native debugger wouldn't understand gcc debugging symbols, or only understood a subset of it so certain features are missing.

Which, unfortunately, means that only gdc stands a chance of being usable with gdb. (Which makes it a very good thing indeed that we have Iain on board!)

Maybe we should write our own debugger in D ... ;-) (OK, that may be too
big a chunk to chew off right now. But, one can dream.)


T

-- 
The computer is only a tool. Unfortunately, so is the user. -- Armaphine, K5
September 02, 2013
On Monday, 2 September 2013 at 02:40:12 UTC, Manu wrote:
> On 2 September 2013 03:23, deadalnix <deadalnix@gmail.com> wrote:
>
>> On Sunday, 1 September 2013 at 16:37:19 UTC, Manu wrote:
>>
>>> Can anyone offer me ANY benefits? It legitimately blows my mind... O_O
>>>
>>
>> You don't need to keep declarations in sync, and you don't need to track
>> down implementations.
>>
>
> Now *this* sounds like a job for IDE assistance to me.
> But I still barely see this as an inconvenience when compared to not being
> able to read a class definition.

Well this look like an IDE job to me :D Especially since some
method will be defined in super classes, and so won't be
available anyway by your method of choice.

Not that I don't see any benefit in your approach, there are, but
I think you are biased by C++ on that on.
September 02, 2013
Sorry, if I sound somewhat p*ssed but that's what I just am after
wasting half a day with weird catch-me with D.

Following a friendly advice given to me today I compiled (DMD on
linux) with the -gc switch (rather than simply -g) and ...
debugging is still useless. GDB doesn't grok it.

Being somewhat desperate but still good-willing (or stubborn?) I
want to try GDC. After all the gnu backend is supposed to
properly feed the gnu debugger, right.

This must be A JOKE!

I have to clone from github (which I don't like but OK ...) then
I have to f*cking compile gcc!!!! After that I will be allowed to
compile GDC. Great. How about compiling a whole bloody OS before
finally having a D compiler that kind of works?
And, of course (if the GDC wiki doesn't lie) it'll be version
2.062 which probably opens another can of problems ...

But again, I'm good-willing and so I do what I really, really
HATE. But for D I do it: I install a windoze VM and install the
Windoze version. Following the instructions I learn, I'll have to
download 2 Visual Blah related thingies. Of course I'll have to
register first with Microsoft.

Excuse me, but when some Gambas or FreePascal hobby guys can do
*considerably better* (and accordingly have quite many loyal and
happily coding followers), shouldn't it strike us boldly that
something is going terribly wrong on the practical and useability
side of D?!
September 02, 2013
On 2 September 2013 06:02, Walter Bright <newshound2@digitalmars.com> wrote:

> On 9/1/2013 11:01 AM, Peter Alexander wrote:
>
>> Thank you for sharing this experience Manu, I had no idea there were so
>> many
>> issues with D on windows. I primarily use OSX without problems, but have
>> also
>> used it on windows for small projects, but I haven't experienced the
>> issues you
>> describe.
>>
>> Can I just say to some of the others in this thread: comments along the
>> lines of
>> "use vim" or "use a free os" are not helpful. These are legitimate users
>> and
>> their issues are legitimate also, whether you agree with their choice of
>> environment or not.
>>
>
> Yes, I agree.
>

Might I suggest one step further to you Walter, that it might be
worth-while for you to take an interest personally into Visual-D, and maybe
Mago. Since you're probably the primary Windows contributor?
Perhaps try and work with these tools on a daily basis for a while.
Especially try some intensive debugging sessions under Visual-D/VS.
You might find that it may short-circuit a lot of micro-bug reports in the
debugging experience.


September 02, 2013
On 2 September 2013 06:12, Nick Sabalausky < SeeWebsiteToContactMe@semitwist.com> wrote:

> On Sun, 1 Sep 2013 23:28:50 +1000
> Manu <turkeyman@gmail.com> wrote:
>
> > On 1 September 2013 18:05, Daniel Cousens <daniel210x@gmail.com> wrote:
> > >
> > > That and its interface is so tedious, I have no idea how to check if it has already been reported...
> > >
> >
> > No, me either. Absolutely no idea.
>
> TBH, I don't understand the above. There's an obvious search box right at the top of every page, right next to a link to advanced search. What else besides search *could* be used to check if an issue's already reported?
>

Yeah, but you've gotta know what to type, and it's hardly google-quality in terms of it's relevence detection.


September 02, 2013
On 2 September 2013 06:55, Nick Sabalausky < SeeWebsiteToContactMe@semitwist.com> wrote:

> On Mon, 2 Sep 2013 02:37:09 +1000
> Manu <turkeyman@gmail.com> wrote:
> > Do. But the website is slow, and you probably haven't tried to use the
> > internet in Australia recently.
> > Also, our new government intends to set Australia's internet back
> > about 10 years:
> > http://www.youtube.com/watch?v=b-6E5yX1E0U
> > http://www.youtube.com/watch?v=tpN7VCzDTdg
> > http://www.youtube.com/watch?v=zyY-xI6zgfk
> >
> > Quality leadership to be sure...
> > Note: I can only watch these in 320p after about 20-30 seconds buffer
> > time ;)
> >
>
> Genuine question, not sarcasm: Have they decided to stop engaging in thinly-veiled censorship yet? Or at least admit that they censor? ("Oh no, we're not censoring! We're merely 'denying classification' on things that are outlawed without government classification!")


No.
We're the 51st state of America, so we're all about censorship and hiding
information from the people at all costs. We also don't have the American
constitution in our defence, we're more like a lame England acting as
America's patsy; they can more-or-less just do whatever they want, and rely
on the fact that even if some of the public whinge and complain about it,
nobody will actually do anything meaningful to stop it. Our political
representation is truly embarrassing.
We also experience 80% Murdoch media coverage, so if they don't want you to
know about something, you certainly won't hear discussion/debate about it
on the television, and don't talk about it with non-nerds/over-40's,
because they'll just tell you you're a wonky conspiracy theorist.

The current government wants to install a nation-wide internet filtering
system with a classified black-list so they an filter _specifically_ 'child
pornography' from unsuspecting viewers...
I don't know about you, but I've been on the internet a long time, and
while it is (or used to be, google are better at filtering it now)
reasonably common to stumble upon unexpected porn, I've NEVER seen child or
animal abuse in my life. Clearly this isn't the real motivator.
The child abuse department of the federal police are suggesting they give
them the budget instead, and they'll be able to make a much more meaningful
difference... but nobody listens to them.

Meanwhile, people are constantly asking the leaders if they're spying on us
like the NSA and friends. Their preferred response is not to respond at
all. They ignore the question and walk away, every time.
Whee!

Of course, investment in the nation's internet is ridiculous, who would
want to invest that sort of tax-payer money on communications
infrastructure which is just "essentially, a video entertainment system":
https://www.youtube.com/v/DPgJA25Nso4?start=39&end=57
Again though, Murdoch has made it clear that he opposes improving the
nation's internet infrastructure, because people might prefer a $10/month
subscription to online tv services to his own $100/month foxtel
subscriptions.
Would you believe that you can't watch Game of Thrones in Australia unless
you pay at least $80/month for a foxtel (cable tv) subscription? And they
wonder why all the statistics appear to show that Australians are the worst
media pirates on earth...