July 22, 2012
Am 22.07.2012 21:28, schrieb Nick Sabalausky:
> On Sun, 22 Jul 2012 20:24:19 +0200
> Paulo Pinto<pjmlp@progtools.org>  wrote:
>
>> Am 22.07.2012 00:16, schrieb Nick Sabalausky:
>>> On Sat, 21 Jul 2012 23:14:12 +0200
>>> "Stuart"<stugol@gmx.com>   wrote:
>>>> Let me just add, I really *like* the terse syntax of D. Lambdas,
>>>> uniform function call syntax, and so on.
>>>>
>>>
>>> Yea. I used Java in college and ever since then I've been a fan of
>>> non-verbose systax - ie syntax that's the *opposite* of Java ;)
>>>
>>
>> Actually that verbose sintax is quite helpful when dealing with
>> gigantic code bases in big corporation projects like where I work.
>>
>> The type of "programmer clogs" we have in our projects are so low
>> skill, that I have bad dreams what they could do in more powerfull
>> languages.
>>
>> Already C# is highly advanced for some of them!
>>
>
> Yea, I've dealt with far too many such "programmers" myself. I'm
> convinced, no hyperbole, that such people need to be unemployed (I hear
> McDonald's is always looking for mindless drones.) All they ever do is
> fuck things up, get in the way, make 100x more work for the rest of us,
> and collect a salary for THAT. And then get promoted to management
> where they can do even more damage (at least it gets their inept,
> retarded ass out of the fucking codebase).
>

Actually in our case it is because management only wants to pay for cheap developers, to avoid having project costs too high.

When things go wrong, then some of us need to play fireman to bring the
project back into safe waters, but hey at least on the official expenses, the project is still "cheap".

--
Paulo


July 23, 2012
On Sun, 22 Jul 2012 23:15:06 +0200
Paulo Pinto <pjmlp@progtools.org> wrote:

> Am 22.07.2012 21:28, schrieb Nick Sabalausky:
> > On Sun, 22 Jul 2012 20:24:19 +0200
> > Paulo Pinto<pjmlp@progtools.org>  wrote:
> >
> >> Am 22.07.2012 00:16, schrieb Nick Sabalausky:
> >>> On Sat, 21 Jul 2012 23:14:12 +0200
> >>> "Stuart"<stugol@gmx.com>   wrote:
> >>>> Let me just add, I really *like* the terse syntax of D. Lambdas, uniform function call syntax, and so on.
> >>>>
> >>>
> >>> Yea. I used Java in college and ever since then I've been a fan of non-verbose systax - ie syntax that's the *opposite* of Java ;)
> >>>
> >>
> >> Actually that verbose sintax is quite helpful when dealing with gigantic code bases in big corporation projects like where I work.
> >>
> >> The type of "programmer clogs" we have in our projects are so low skill, that I have bad dreams what they could do in more powerfull languages.
> >>
> >> Already C# is highly advanced for some of them!
> >>
> >
> > Yea, I've dealt with far too many such "programmers" myself. I'm convinced, no hyperbole, that such people need to be unemployed (I hear McDonald's is always looking for mindless drones.) All they ever do is fuck things up, get in the way, make 100x more work for the rest of us, and collect a salary for THAT. And then get promoted to management where they can do even more damage (at least it gets their inept, retarded ass out of the fucking codebase).
> >
> 
> Actually in our case it is because management only wants to pay for cheap developers, to avoid having project costs too high.
> 

Perhaps I forgot to mention that 90% of managers belong under the same semitruck tire as the rest of the HR folks and Java/PHP monkeys ;)

Besides, a manager's role is administration, ie shitwork: Their job is to enable the REAL talent to do the REAL work, make sure they have what they need to do it, and then get the fuck out of the way. And maybe keep the sales monkeys in line with a good caning every now and then.

But when a manager either oversteps those boundaries, or get even just gets paid *as* much as the real workers (let alone more), then they belong locked in a cell. What I'm *not* sure about is whether the cell should be the padded or concrete variety...Meh, I suppose I don't care which as long as they're no longer damaging society.

> When things go wrong, then some of us need to play fireman to bring the project back into safe waters, but hey at least on the official expenses, the project is still "cheap".
> 
> --
> Paulo
> 
> 


July 23, 2012
On Sunday, 22 July 2012 at 21:10:08 UTC, Andrei Alexandrescu wrote:
> On 7/22/12 12:32 PM, David Nadlinger wrote:
>> On Sunday, 22 July 2012 at 03:06:28 UTC, Jens Mueller wrote:
>>> Where is argmin defined? I couldn't find it.
>>
>> On the slide before that… ;)
>
> I think argmin is intuitive, popular, and useful enough to warrant a presence in std.algorithm. Would anyone want to do the honors?
>
>
> Thanks,
>
> Andrei

Are you asking for the _actual_ argmin as defined in the paper?

Because I think it would be much better if we provided an overload for the existing minPos/minRange to accept a unary pred:

----
Range minPos(alias pred, Range)(Range range)
  if (is(typeof(unaryFun!pred(range.front))))
{
  ...
}
----
Tuple!(ElementType!(Range), size_t)
minCount(alias pred, Range)(Range range)
  if (is(typeof(unaryFun!pred(range.front))))
{
  ...
}
----

Where pred if the unary weight function. This code would then work as such:

----
auto m = s.minPos!((x) => x.length).front;
----
auto m = s.minCount!((x) => x.length)[1];
----

Both versions require an extra .front/[1], but that's because that's just how the algorithms work.

I actually _just_ rewrote these two methods (they are in my pull requests). I'm on it if you you like the idea of being able to call these functions with a unary predicated (I do): It sure beats writing "(a, b) => pred(a) < pred(b)" when you could just write "a => pred(a)"
July 23, 2012
On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky wrote:
>
> C++ is living in the 70's.

Precisely what I have been thinking. It's a loose wrapper around
assembly, nothing more. Certainly not the "high-level language"
it's touted as.
July 23, 2012
Am 23.07.2012 14:49, schrieb Stuart:
> On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky wrote:
>>
>> C++ is living in the 70's.
>
> Precisely what I have been thinking. It's a loose wrapper around
> assembly, nothing more. Certainly not the "high-level language"
> it's touted as.

Only due to the lack of modules.

Everything else is a pretty modern language I would say.

Personally as I referred here in multiple threads I don't have any
big issues dealing with C++, but maybe that is just me.

--
Paulo
July 23, 2012
On Monday, 23 July 2012 at 15:56:37 UTC, Paulo Pinto wrote:
> Am 23.07.2012 14:49, schrieb Stuart:
>> On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky wrote:
>>>
>>> C++ is living in the 70's.
>>
>> Precisely what I have been thinking. It's a loose wrapper around
>> assembly, nothing more. Certainly not the "high-level language"
>> it's touted as.
>
> Only due to the lack of modules.
>
> Everything else is a pretty modern language I would say.

Hardly. No RTTI. No GC. No properties. No events. No closures. No extension methods. No interfaces. No writable references.

I can live without a GC; and interfaces can be simulated using pure virtual base classes; but all the others are standard in pretty much any modern language and impossible to reproduce in C++.

Incidentally, it'd be really handy to have anonymous tuples in D. Not many languages let you do that. For example:

   tuple!(int, float) fn() { ... }

   int a;
   float b;
   (a, b) = fn();

   auto (c, d) = fn();

Saves us having to create a struct for every goddamn little function; or using tuples directly, which means we have to refer to variables like .value1 and .value2 instead of something meaningful.
July 23, 2012
On Monday, 23 July 2012 at 20:51:19 UTC, Stuart wrote:
> Incidentally, it'd be really handy to have anonymous tuples in D.

Or perhaps I should've said "named tuples". I dunno what the correct term might be. All I know is, I've only seen it in one or two obscure languages, and I've always wished .NET had it.
July 23, 2012
On Mon, 23 Jul 2012 22:51:19 +0200, Stuart <stugol@gmx.com> wrote:

> Saves us having to create a struct for every goddamn little function; or using tuples directly, which means we have to refer to variables like .value1 and .value2 instead of something meaningful.

You mean like this?

Tuple!(float, "x", float, "y") bar() {
    return typeof(return)( 0.0, 0.0 );
}

auto xCoord = bar().x;


I dislike the typeof(return) in there, as assignment between tuples with
and without named fields works perfectly. Bring me the sky, Walter?

--
Simen
July 23, 2012
On Mon, 23 Jul 2012 22:51:19 +0200
"Stuart" <stugol@gmx.com> wrote:

> On Monday, 23 July 2012 at 15:56:37 UTC, Paulo Pinto wrote:
> > Am 23.07.2012 14:49, schrieb Stuart:
> >> On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky wrote:
> >>>
> >>> C++ is living in the 70's.
> >>
> >> Precisely what I have been thinking. It's a loose wrapper
> >> around
> >> assembly, nothing more. Certainly not the "high-level language"
> >> it's touted as.
> >
> > Only due to the lack of modules.
> >
> > Everything else is a pretty modern language I would say.
> 
> Hardly. No RTTI. No GC. No properties. No events. No closures. No extension methods. No interfaces. No writable references.
> 

Null-terminated strings. Preprocessor. No reflection. Effectively undefined sizes for primitive types. Undefined behavior galore. Neither default initialization nor enforced initialization before variable usage. No reference types (Foo& isn't what I mean). Horrendous type syntax for mixed arrays/ptrs or functions ptrs, etc. No forward references (or at least very limited). And a grammar that forces compilation to be very, very slow.

And a lot more still that's lacking if you don't count C++11 which isn't widely supported yet (ex: foreach, basic type inference).

And the fact that static analysis tools are as super useful as they are is plenty proof alone that the language itself is WAAAY behind the curve.

July 23, 2012
On Mon, 23 Jul 2012 17:19:09 -0400
Nick Sabalausky <SeeWebsiteToContactMe@semitwist.com> wrote:

> On Mon, 23 Jul 2012 22:51:19 +0200
> "Stuart" <stugol@gmx.com> wrote:
> 
> > On Monday, 23 July 2012 at 15:56:37 UTC, Paulo Pinto wrote:
> > > Am 23.07.2012 14:49, schrieb Stuart:
> > >> On Saturday, 21 July 2012 at 22:16:52 UTC, Nick Sabalausky wrote:
> > >>>
> > >>> C++ is living in the 70's.
> > >>
> > >> Precisely what I have been thinking. It's a loose wrapper
> > >> around
> > >> assembly, nothing more. Certainly not the "high-level language"
> > >> it's touted as.
> > >
> > > Only due to the lack of modules.
> > >
> > > Everything else is a pretty modern language I would say.
> > 
> > Hardly. No RTTI. No GC. No properties. No events. No closures. No extension methods. No interfaces. No writable references.
> > 
> 
> Null-terminated strings. Preprocessor. No reflection. Effectively undefined sizes for primitive types. Undefined behavior galore. Neither default initialization nor enforced initialization before variable usage. No reference types (Foo& isn't what I mean). Horrendous type syntax for mixed arrays/ptrs or functions ptrs, etc. No forward references (or at least very limited). And a grammar that forces compilation to be very, very slow.
> 

Speaking of, I understand he had C++ in mind when he wrote this song: https://www.youtube.com/watch?v=DOj3wDlr_BM