HNHacker News
TopNewBestAskShowJobs

EvenThisAcronym

132 karma · joined March 4, 2014

submissionscomments
EvenThisAcronym··on Ask HN: Your favorite syntactic sugar from any language?
Hands down, it's D's shorthand array operations.

    int[] a = [1, 2, 3];
    int[] b = a[] * 3;
    assert(b == [3, 6, 9]);

    a[] += 2;
    assert(a == [3, 4, 5]);

    int[] c = a[] + b[];
    assert(c == [6, 10, 14]);
This of course works with D's slicing syntax so you can do stuff like a[0..1] *= 3.
EvenThisAcronym··on Ask HN: Your favorite syntactic sugar from any language?
D has also had them since the early 2000s.
EvenThisAcronym··on Std.variant is everything cool about D
I'm the author of the article, so feel free to ask me anything, or give me your thoughts on the article.
EvenThisAcronym··on D on embedded Linux (ARM)
I'm really glad you mentioned the concurrency problem from day 18, because this was one of those personal "eureka!" moments I had while learning D. I had no idea that concurrency could be so simple, and this is not even having any special built-in support aside from thread-local data by default. This is all in _user_ code.

By that same token, std.parallelism.parallel was one of those things where I just looked at it and thought "man, you can actually _do_ something like that?"

EvenThisAcronym··on Why hasn't D started to replace C++
>because it's slow

Where do people get this from? D compiles down to the same machine code that every other compiled language does and it has similar language semantics to C++. In some cases D is _faster_ because its richer type and effect systems allow for more opportunities for optimization.

EvenThisAcronym··on Why hasn't D started to replace C++
>and till fairly recently it wasn't a community project, but a one-man work

All of D except the backend was open-sourced in 2011, I'm pretty sure. Even before that, Walter Bright accepted patch submissions.

EvenThisAcronym··on Vectorflow by Netflix: A lightweight Neural Network library written in D
D's syntax isn't quite as nice as, say, Haskell (which strongly depends on preference anyway), but it has all the necessary tools to write strongly pure, referentially-transparent functions. There's the `pure` and `immutable` keywords that let the compiler statically verify the above properties.
EvenThisAcronym··on D Language accepted for inclusion in GCC
>Nothrow and Pure are not part of the type signature of functions

Actually they are. Take a look at this example:

void main() {

    int delegate(int) @safe nothrow @nogc pure f;
    //This looks like something bad is happening, but the delegate literal 
    //actually has the proper attributes inferred so it Just Works
    f = delegate(int) { return 0; };

    int delegate(int) g;
    f = g; //Fails, as it should
}
EvenThisAcronym··on Faster Command Line Tools in D
I find that kind of ironic. I know there's a lot of people that love Go and it's a solid language, but I personally see it as the ultimate blub language.
EvenThisAcronym··on One of the best performances in ‘Rogue One’ is by an actor who died in 1994
I saw this in theatre and instantly knew something was off with his face. It was such a disturbing feeling, made my brain question whether everyone else in the movie was CG as well and it took awhile before I was able to see the other actors as "real" again. The uncanny valley is deep and extremely disturbing.
EvenThisAcronym··on Introducing DC's New Chinese Super-Man, Kenan Kong
I'm surprised the author didn't mention the connection between Kong (孔) and Confucius, as Confucius' family name was also 孔.
EvenThisAcronym··on What happens when millennials run the workplace
I am a Millennial and I think Millennials are terrible (and I am not excluding myself). With few exceptions, I have not met anyone from my demographic who is not spoiled by their parents, entitled and has not made poor financial and/or life decisions. Of course there are Millennials that exist outside this stereotype, but I think our reputation has mostly been earned, not fabricated.
EvenThisAcronym··on A MOS6502 assembler impleme​nted as a Rust macro
Ah, I see. I'm assuming then that Rust generics are not generative templates like C++/D, but closer to Java/C#.
EvenThisAcronym··on An Exhibition That Proves Video Games Can Be Art
As I understand it gaming enthusiasts regard games as being intrinsically art, with no need to "prove" that they can be. Every game from Pong to Call of Duty is a work of art. This whole discussion around whether games are art or not seems to be coming from outside the gaming community, and should not really be attributed much importance.
EvenThisAcronym··on A MOS6502 assembler impleme​nted as a Rust macro
> That's why we get so many complaints from C++ and D developers that you can't do certain things. But Rust sticks with its strongly-typed generics, because Rust has always tried hard to strike a balance between code expressivity and maintainability.

In what sense are Rust macros "strongly-typed"? D and C++ templates are also strongly typed, just like the rest of the language.

EvenThisAcronym··on The Chinese character system is a brake on development
Chinese sentence structure is in many cases identical or very similar to English, and follows the same general word order, Subject-Verb-Object.
EvenThisAcronym··on What did Jesus really look like?
Perhaps you should do some research on the subject before making such an ignorant statement.
EvenThisAcronym··on D 2.069.0 released, compiler automatically ported from C++ to D
People often say this because D has many features that allow it to be almost as flexible as the various scripting languages while still being compiled and statically typed. I don't bother with bash/cmd nowadays as D can easily fill that role, with the bonus of my small little scripts having all the power and scalability that D offers.

Also check out https://github.com/Abscissa/scriptlike

EvenThisAcronym··on D 2.069.0 released, compiler automatically ported from C++ to D
D is what you get if C married Python and the resulting baby was adopted and raised by Lisp and C#.
EvenThisAcronym··on D 2.069.0 released, compiler automatically ported from C++ to D
I have not tried it myself but there seem to be ways to get a stack trace on Linux.

http://vibed.org/docs#handling-segmentation-faults

EvenThisAcronym··on Template Comparison – D vs. C++
Yes, this page is quite dated. It dates from the time of D1 (though much of it is still correct).
EvenThisAcronym··on Java 8’s new Optional type doesn't solve anything
Where did this myth that Option types are the "solution" to nullable references come from? That's got it perfectly backwards. The solution to nullable references is to remove them from the language; Option is just a means for languages that have already done this to encode nullability into the type of a value add necessary, as it should be. And people claiming that a language needs pattern matching or it doesn't solve the problem?! It makes me worry that those advocating these ideas are just part of the latest cargo cult and don't really understand the underlying principles or why these are good ideas in the first place.
EvenThisAcronym··on Fastest JSON parser in the world is a D project?
The repo owner is accepting pull requests for the benchmarks so at least it's fixable.
EvenThisAcronym··on Fastest JSON parser in the world is a D project?
I never use anything else anymore for personal projects, unless I absolutely have to due to missing a certain library. A well-known phenomenon in the D community is that it "spoils" you such that when you have to use another language all you can think about is how much easier it would be to do your task in D, and how you miss certain features from D (such as the phenomenally better template syntax compared to C++). I've experienced this many times, such as when writing a large-ish Python script, or when working on a mobile game in C# + Unity. I really wish I could use D at work.
EvenThisAcronym··on Java 8: Removing null checks with Optional
"How to remove null checks and then add them back again as a library feature."

The difference being, of course, that having an Optional type forces you to check if it's null or not before getting at the underlying object.

EvenThisAcronym··on The student who discovered water on Mars says it was a 'lucky accident'
You should know by now that all of HN is a parody of itself.
EvenThisAcronym··on Crystal 0.8.0
Compare this to https://news.ycombinator.com/item?id=10023413 or https://news.ycombinator.com/item?id=10187596 and tell me that HN doesn't have a severe Rust/Javascript bias.
EvenThisAcronym··on Moving forward with work on the D language and foundation
I started learning D in 2012, coming from a Java/C++ background. One thing that I've learned over the past 3 years is that D is one of those languages that completely changes your perspective on some aspect of language design (for D, that's metaprogramming and range-based algorithms). D can proudly take its place among the Lisps, the Haskells, the Smalltalks, as one of those fundamental paradigm shifts that makes you think differently about everyday problems.
EvenThisAcronym··on Ellen Pao: The Trolls Are Winning the Battle for the Internet
>...and in Canada, we do not claim to have free speech and defined in America. Hate speech is not tolerated here...

One of the worst aspects of our country IMO. I wish we had millions of people willing to defend the basic right to say what you want.

EvenThisAcronym··on JavaScript GameBoy Advance Emulator
I highly recommend http://jsemu.github.io/gba/launcher.html#fire_emblem
← PreviousPage 2 of 3Next →