HNHacker News
TopNewBestAskShowJobs

he_the_great

39 karma · joined June 17, 2009

submissionscomments
he_the_great··on John Carmack: Functional programming in C++ (2012)
And the same thing in D:

    struct Square
    {
        int sideLength;
    }

    struct Rectangle {
        int length;
        int width;
    }

    import std.variant;
    alias Shape = Algebraic!(Square, Rectangle);

    import std.typecons;
    auto to_shape(Tuple!(int, int) shape) pure nothrow
    {
        if (shape[0] == shape[1]) return Shape(Square(shape[0]));
        else return Shape(Rectangle(shape.expand));
    }

    void main() {
        auto unknowns = [
            tuple(5, 4),
            tuple(3, 2),
            tuple(4, 4)
        ];

        import std.stdio;
        import std.algorithm;
        writeln(unknowns.map!(to_shape));
    }
[Rectangle(5, 4), Rectangle(3, 2), Square(4)]
he_the_great··on Scott Meyers: The Last Thing D Needs [video]
Well, the examples were the content of the talk. He didn't need the examples at all, but they demonstrate a severity of the problem. And to that point the talk needed to be slow so that one can try and answer the question, if the answer was just given it is harder to see the difficulty presented.

I also must confess, I didn't watch the video. I was there, so there is a good chance the presentation doesn't translate well to video in terms of speed of content.

he_the_great··on Scott Meyers: The Last Thing D Needs [video]
3:55 "It is important to have some information on someone's perspective when they speak, because obviously that is going to color the opinions that they have."
he_the_great··on Scott Meyers: The Last Thing D Needs [video]
He did provide the design behind "these gotchas." It is at 43:40

As for the specific examples which he brings up, those also get the specific goal stated as to why C++ has that strange condition.

Essentially, I don't know what you are complaining about.

he_the_great··on How I Came to Write D
This page lists some: http://wiki.dlang.org/Current_D_Use

Work is happening with ARM, but it needs more pre-early adopters. http://wiki.dlang.org/GDC/Cross_Compiler

he_the_great··on Facebook Open Sources flint, a C++ linter written in D
This is likely what they are looking at. Start with a program everyone uses, but isn't critical production system, evaluate the language and get people familiar with the language. Follow it up with some more rewrites and eventually give up on the old C++.
he_the_great··on Facebook Open Sources flint, a C++ linter written in D
I wouldn't want to reach for lint to handle formatting, that is what indent is for. That is to say, lint should not complain that the if should contain a space before the (.
he_the_great··on So you want to write your own language?
If someone wants to build a language and "A programming language is the semantics" doesn't it really make sense to tell them what the semantics should look like?
he_the_great··on Benchmarking D vs Go vs Erlang vs C for MQTT broker
So he should have run the D program with dmd -run :D
he_the_great··on Facebook puts bounties on bugs in the D programming language implementation
The history of many of the languages has been the same in regards to generics. C++ didn't have them, then templates where added. C# 1 didn't have them, but were quickly added (correctly) in 2. D didn't have them, later they were added. It is very common for a new language to avoid generics in the beginning, but it seems most come to agree, it was a mistake.
he_the_great··on Toyota's firmware: Bad design and its consequences
> It takes power steering with it though,

That is what sucks about cars with power steering, they don't get any of the benefit a car built with no power steering does.

he_the_great··on Toyota's firmware: Bad design and its consequences
It's called a parking break now. Only useful when the car isn't moving :)
he_the_great··on Facebook is using D in production starting today
There is caching of the newsgroup messages, but I don't know about the generated page.
he_the_great··on Facebook is using D in production starting today
> systems language => for building systems, many parts, many interconnections

So... every language?

he_the_great··on Facebook is using D in production starting today
No that is D and it is with CTFE. Also joking... mostly.
he_the_great··on Facebook is using D in production starting today
I think there is a lot of truth to the statement, but not to the extreme. There are implementation issues for many claimed features, some because large and in your face, some edge cases, others due to language design.

The situation is better and greatly improving. Many things have a work around. It is just one of the problems with a language full of tools and little full-time man power. Java and Go are rather simple languages so there aren't as many features to boast (e.g. not supporting shared libraries is a feature of Go, yet "broken" in D [lots of good work in git HEAD])

he_the_great··on Facebook is using D in production starting today
The problem is by deciding that they can use "systems language" (which they dropped) because "system" means "a set of connected things or parts forming a complex whole" results in every language falling under "systems language."

Others have been using it to distinguish languages suitable for writing operating systems/drivers years before Go introduced this confusion.

he_the_great··on Facebook is using D in production starting today
Much of the initial design come from improving the language grammar and syntax. That limited improvement didn't last long, but it was an initial motivator (Walter being a compiler writer and C++ being horrible language to parse).

The D community has greatly pushed D away from this initial improvement. In C++ there is a separation of the developer tools and the library writer tools. I think that separation still exists in D, but it is in an area even library writers don't/can't reach for in C++.

Ultimately D doesn't force a fundamental change, but as one learns to use the language, the result is a fundamental change.

he_the_great··on Facebook is using D in production starting today
Yes, but from what I've learn of the original developers, "replace C++ for their needs" means, "we are using C++ currently, we don't want to, so we're making a language which incorporates a core which helps our tasks (goroutines). To do this we will fix up some issues we have with C."
he_the_great··on Facebook is using D in production starting today
That's a little adventurous. std.algorithm is known to only have one function which allocates.

The rest of Phobos is being looked at, but to this point I don't think it has been combed thoroughly enough to say "almost entire."

he_the_great··on Complex networks in D
As bsaul hints at, isn't Google, it is the people behind Go. Google didn't say, let us make a new language. Instead employees ask management if they could work on a language. Given this perspective it is easy to see why supporting D wasn't chosen.

Even so, D is making good progress and has a good community to keep it alive for a long time to come.

he_the_great··on Complex networks in D
D provides some very appetizing features for meta and generic programming. You can get some insight from questions like this: http://stackoverflow.com/questions/7300298/metaprogramming-i...
he_the_great··on DMD 2.063 released with 260 bugfixes and enhancements
It is going to live a long life. It is making it over the bad PR it has had in the past... by being awesome.
he_the_great··on DMD 2.063 released with 260 bugfixes and enhancements
They first need to steal unittest blocks. Then they can improve on it so that D can steal those improvements :)
he_the_great··on Using D Alongside A Game Engine
What they don't want you to know is that there are some hidden tricks in the talk.

Live update to a running engine.

Annotation of variables which would get a GUI for modification or profiling tracking.

he_the_great··on D-style Mixins in C#
See Template Mixins. http://dlang.org/template-mixin.html
he_the_great··on Vibe.d - Asynchronous I/O that doesn't get in your way (Dlang)
Original Announcement: http://forum.dlang.org/post/jncc7h$3161$1@digitalmars.com
he_the_great··on Go: Severe memory problems on 32bit Linux
> Without a large community behind them, they will slowly fade away like D did.

This is a rather strange assessment. The history of "successful" languages has been a mixture of "cool jump onboard" and "who can stay alive the longest to get a community." D is in the latter camp.

It seems to me, unreasonable to expect a language to be coming out the gate with guns blazing. People expect Nukes now!

he_the_great··on Go: Severe memory problems on 32bit Linux
std.concurrency "is a low-level messaging API." The language provides low-level concurrency primitives. It is possible a higher level library providing "goroutines" might be made, though there is not effort or plan.
he_the_great··on Merging In The GNU D Language Compiler To GCC
Nope, not even. SML apparently did so, and probably others.
← PreviousPage 2 of 2