October 16, 2017
On Monday, 16 October 2017 at 15:22:30 UTC, Manu wrote:
> On 15 Oct. 2017 11:50 pm, "Walter Bright via Digitalmars-d" < digitalmars-d@puremagic.com> wrote:
>
> On 10/15/2017 10:09 PM, Manu wrote:
>
>> Haha, incidentally, I've just moved to LA, and I'm failing to convince myself I won't die if I try and drive here ;) .. I'm still chickening out.
>>
>
> LA? Cool!
>
> (Don't watch "To Live and Die in LA")
>
> Or just get a used "Yank Tank" and you'll be fine.
>
>
> Hah. That would violate every principle I hold ;)
> And besides, I'm pretty sure I'm only allowed to have an all-electric in
> Southern California!

You hold principles ?
October 16, 2017
On Sun, Oct 15, 2017 at 10:09:04PM -0700, Manu via Digitalmars-d wrote:
>    On 15 Oct. 2017 6:40 pm, "Walter Bright via Digitalmars-d"
>    <[1]digitalmars-d@puremagic.com> wrote:
[...]
>      I don't want to even try 1 based. All my learned behaviors with
>      arrays would just produce corrupt code.
> 
>      It's why I don't dare try driving in England.
> 
>    Haha, incidentally, I've just moved to LA, and I'm failing to
>    convince myself I won't die if I try and drive here ;) .. I'm still
>    chickening out.
[...]

I've driven in LA before, even though I don't live there.  It's not half as bad as people make it sound.  You just have to know the driving culture of the place and act accordingly, that is, be assertive and clear exactly what your intention is, and do not hesitate once you make a decision.  Or, in more practical terms, know what you want, and *take* it.  LA drivers know how to read the cues -- as long as you follow through with what they think you will do.  It's when you waver and send mixed signals that it gets dangerous.  They hate it when you look like you're unsure, and it tends to make them angry and more aggressive.

Of course, this does not preclude safety considerations; in fact, it means that you have to be absolutely sure what you want (and the safety of what you want) before you even begin, lest you find yourself in a dangerous situation with no safe way out.


T

-- 
What do you call optometrist jokes? Vitreous humor.
October 16, 2017
On 16 October 2017 at 10:56, H. S. Teoh via Digitalmars-d < digitalmars-d@puremagic.com> wrote:

> On Sun, Oct 15, 2017 at 10:09:04PM -0700, Manu via Digitalmars-d wrote:
> >    On 15 Oct. 2017 6:40 pm, "Walter Bright via Digitalmars-d"
> >    <[1]digitalmars-d@puremagic.com> wrote:
> [...]
> >      I don't want to even try 1 based. All my learned behaviors with
> >      arrays would just produce corrupt code.
> >
> >      It's why I don't dare try driving in England.
> >
> >    Haha, incidentally, I've just moved to LA, and I'm failing to
> >    convince myself I won't die if I try and drive here ;) .. I'm still
> >    chickening out.
> [...]
>
> I've driven in LA before, even though I don't live there.  It's not half as bad as people make it sound.  You just have to know the driving culture of the place and act accordingly, that is, be assertive and clear exactly what your intention is, and do not hesitate once you make a decision.  Or, in more practical terms, know what you want, and *take* it.  LA drivers know how to read the cues -- as long as you follow through with what they think you will do.  It's when you waver and send mixed signals that it gets dangerous.  They hate it when you look like you're unsure, and it tends to make them angry and more aggressive.
>
> Of course, this does not preclude safety considerations; in fact, it means that you have to be absolutely sure what you want (and the safety of what you want) before you even begin, lest you find yourself in a dangerous situation with no safe way out.
>

That... and they drive on the wrong side of the road! ;)


October 16, 2017
On Mon, Oct 16, 2017 at 11:42:56AM -0700, Manu wrote:
[...]
>    That... and they drive on the wrong side of the road! ;)
[...]

Ah!  Well, that is a different story, then. :D  My hometown also drives on the wrong side of the road (I learnt driving after I left), and I'm also still chickening out, in spite of having driven in LA.  :P  Well, that, and over there there are no driving laws -- the so-called "laws" are in practice only rarely-heeded recommendations.  You find 3 lanes of moving cars on a 2-lane road, and people parallel-park leaving only 2 inches between cars.  Nope, not for me. :D

I suppose this is like Walter not daring to write code with 1-based arrays. :D  On that note, though, in D I only rarely actually need to specify explicit indices.  Foreach and generic code alleviates most cases of explicit indexing I'd normally write in C/C++ code, and I wouldn't be surprised if much of my code could actually be ported to 1-based indexing with only minor changes.

But I suppose if you're doing matrix/tensor math, you can't really avoid this.


T

-- 
Democracy: The triumph of popularity over principle. -- C.Bond
October 16, 2017
On Monday, October 16, 2017 11:42:56 Manu via Digitalmars-d wrote:
> That... and they drive on the wrong side of the road! ;)

http://jokes.cc.com/funny-lookin--good/yn3vw9/the-wrong-way

- Jonathan M Davis

October 16, 2017
On 10/16/17 2:42 PM, Manu wrote:

> That... and they drive on the wrong side of the road! ;)

We drive on the right side. Both literally and philosophically :)

Seriously though, driving in LA is nothing compared to an eastern city where everything was determined by horse-cart paths.

I drove a car in England once. The most difficult thing to do was coming back home. There, I was acutely aware of the awkwardness, given that the shifter was on my left and not the right. When I came back, going to make turns, I was second guessing everything!

-Steve
October 16, 2017
On Monday, 16 October 2017 at 18:56:03 UTC, H. S. Teoh wrote:
>
> I suppose this is like Walter not daring to write code with 1-based arrays. :D  On that note, though, in D I only rarely actually need to specify explicit indices.  Foreach and generic code alleviates most cases of explicit indexing I'd normally write in C/C++ code, and I wouldn't be surprised if much of my code could actually be ported to 1-based indexing with only minor changes.
>
> But I suppose if you're doing matrix/tensor math, you can't really avoid this.
>
>

I always thought slicing was a more important difference for 0 or 1-based indexing, rather than loops.

Consider D's A[m..n] vs. Matlab's A[m:n]. Matlab's is easier to explain to someone with a math background because you get A[m] through A[n, instead of A[m] through A[n-1] in Ds. However, D's A[m..n].length = n - m, whereas Matlab's length(A[m:n])= n - m + 1. Thus, you often find yourself adjusting formulae all over the place to account for the extra "+1". Nevertheless, if you have more of a mathematics background, you always need to remember that if you wanted A[m:n] in Matlab, you need A[(m - 1)..n] to get the equivalent in D.

October 17, 2017
On Sunday, 15 October 2017 at 22:09:21 UTC, Walter Bright wrote:
> http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/
>
> Some good information there!

Especially comments:

George Michaelson • a day ago
One of the saddest moments of my career in computer centre helpdesk was talking to a chemical engineering student whose PhD basically evaporated in smoke, as I showed them the 'interesting' experimental results of their model were the outcome of using un-initialized global common in a huge fortran program they'd written.
October 17, 2017
On 10/17/17 4:40 AM, crimaniak wrote:
> On Sunday, 15 October 2017 at 22:09:21 UTC, Walter Bright wrote:
>> http://moreisdifferent.com/2015/07/16/why-physicsts-still-use-fortran/
>>
>> Some good information there!
> 
> Especially comments:
> 
> George Michaelson • a day ago
> One of the saddest moments of my career in computer centre helpdesk was talking to a chemical engineering student whose PhD basically evaporated in smoke, as I showed them the 'interesting' experimental results of their model were the outcome of using un-initialized global common in a huge fortran program they'd written.

Ouch! I had an experience like that once.

I worked at a company that bought a one-man show's company who had an impressive load-balancing software we wanted to incorporate in our system.

About 1-2 years into him working at our company, one of our developers tested it using webbench (all testing had been done by this guy previously), and was getting terrible numbers. But his tests always showed really good numbers.

Turns out he was "timing" his benchmarks by starting a separate thread, then sleeping for 1 second, and then measuring how many requests he handled in that "1 second". But of course, the system was super-loaded, so the sleep was going way longer than 1 second, and his numbers looked great! After we fixed it, the numbers looked horrific and matched webbench.

When this was found out, we kind of moved away from that software, as we were moving our focus to hardware. I can't imagine how that must have felt, though.

-Steve
October 17, 2017
> Arrays (or in physics-speak, matrices)
> multiplied together quite intuitively as:
> C = A*B gives an element-by-element multiplication of A and B, assuming A and B are the same size.

Ehhh?