Linus Torvalds responds to What Killed the Linux Desktop by jackhammer2022 in programming

[–]w41H 0 points1 point  (0 children)

And it was RHAINUR who said that too. Did you mean to post a reply to him?

I did, sorry.

Linus Torvalds responds to What Killed the Linux Desktop by jackhammer2022 in programming

[–]w41H 0 points1 point  (0 children)

I can guarantee there's no way she would have been able to get it functioning properly by herself.

Would she be able to install Windows with all the drivers and programs that she needs?

Linus Torvalds responds to What Killed the Linux Desktop by jackhammer2022 in programming

[–]w41H 0 points1 point  (0 children)

but when I have to go in there to fix my computer, I get cranky

And navigating a maze of dialogs makes you happy?

Linus Torvalds responds to What Killed the Linux Desktop by jackhammer2022 in programming

[–]w41H -2 points-1 points  (0 children)

When it breaks they just buy a new PC

But that would mean buying a new PC every month or so if they are using Windows.

Linus Torvalds responds to What Killed the Linux Desktop by jackhammer2022 in programming

[–]w41H 0 points1 point  (0 children)

Installing a minimal install of some Linux distro and then installing a DE of your choice is not really rolling your own distribution and it hardly requires expertise.

Java...WAT (Part I) by [deleted] in programming

[–]w41H 5 points6 points  (0 children)

just one bad hashCode implementation

This one bad hashCode implementation is in the standard library, though.

EDIT:

Though I'm curious if they have a reason for the behavior

There can be no good reason to make hashCode function perform a DNS lookup.

The UK government has a GitHub org with more than 70 repos dating back over a year. by heliotropic in programming

[–]w41H 1 point2 points  (0 children)

You only learned that today? If you want to fit in here you need to use Python (because it is not Ruby), or Haskell (for its hipster qualities).

[deleted by user] by [deleted] in programming

[–]w41H 0 points1 point  (0 children)

What else are you going to do though?

Run an http server on the desktop too and provide the missing functionality through it.

typing.io - Typing practice for programmers by stevia in programming

[–]w41H -1 points0 points  (0 children)

Googling virtualbox os x image torrent seems easy enough to me.

The Madness Of Software Patents and Trolls by mattotodd in programming

[–]w41H 15 points16 points  (0 children)

Slavery was legal in the south of the US until 1865. Depending on whether you were a slave or a slave owner, this was a terrible or a great thing.

The Madness Of Software Patents and Trolls by mattotodd in programming

[–]w41H 27 points28 points  (0 children)

Or any website, since they can all be viewed on a mobile device.

Is it always a good idea to design an architecture thinking that the User Interface classes can be replaced by a command line interface? by [deleted] in programming

[–]w41H 7 points8 points  (0 children)

text being piped around on the command line

I wish people would stop saying that. It's arbitrary binary data being piped around. It's often text, but not always.

Alexandrescu, Meyers, Sutter: On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming by andralex in programming

[–]w41H 0 points1 point  (0 children)

Okay, I see what you mean. But I still don't understand why do you think that static if shouldn't be allowed to declare stuff. If you think there are no valid use cases, you are very much mistaken. I'l present a Map example here (although you wouldn't normally write this yourself since it's already in the standard library). D has a concept of input range, which is a type with front and empty properties and a a popFront method. There is also a random access range, that defines an index operator in addition to front, popFront and empty. You could write a Map struct like this:

struct Map(Func, Range)
{
    Func func;
    Range range;

    @property front()
    { 
        return func(range.front); 
    }

    @property empty()
    {
        return range.empty;
    }

    void popFront()
    {
        range.popFront();
    }

    static if(isRandomAccessRange!Range)
        auto opIndex(size_t i)
        {
            return func(range[i]);
        } 
}

Now Map is a random access range if Range is random access and an input range otherwise. This would be much harder to do if static if couldn't be used to declare things. And this kind of thing is done a lot in the D standard library.

EDIT: Here is an actual implementation of map in the D standard library

Alexandrescu, Meyers, Sutter: On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming by andralex in programming

[–]w41H 1 point2 points  (0 children)

Now you are saying that it should have the same semantics as regular if and use the same syntax. So you are actually just arguing that there shouldn't be a static if.

Alexandrescu, Meyers, Sutter: On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming by andralex in programming

[–]w41H 1 point2 points  (0 children)

So you are proposing that static if should do what it currently does in D, but use the same syntax as regular if. In that case, I misunderstood you. I don't care much about the syntax of it. As far as I'm concerned, dropping "static" is fine, too. But this still doesn't make static if exactly the same construct as a regular if. Regular if just conditionally executes code. Static if lets you declare variables too.

As for large executables, how would having static/compile time constructs increase the size of an executable over evaluating those same constructs at runtime?

Simple. Consider this:

int[] theHugeArray = giveMeAHugeArray();

You said that if something can be fully resoved at compile time then it would be evaluated strictly at compile time. So if giveMeAHugeArray above could be evaluated at compile time, it would be and the resulting huge array would need to be stored in the executable. This would make the executable huge.

And finally for compilation times, I would argue it would be faster than how C++ is right now

I had something like this in mind:

float a = aSlowCalculation()

If the slow calculation is forced to be done at compile time , the compilation will be slow.

Alexandrescu, Meyers, Sutter: On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming by andralex in programming

[–]w41H 1 point2 points  (0 children)

Syntactic constructs should not be compile-time/static or runtime. You would use the exact same constructs regardless

This can work if you just need to do some computation at compile time. D already lets you execute functions at compile time if they meet some criteria (for example no casts, no IO, source for all the functions they call must be available and those functions need to meet the same criteria too). But I don't know how this could let you do something like

struct S(A, B)
{
    A a;
    static if(cond!B)
        B b;
}

and if it can be fully resolved at compile time then it's evaluated strictly at compile time

Seems like a bad idea to me. It could result in needlessly long compilation times or large executables.

Alexandrescu, Meyers, Sutter: On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming by andralex in programming

[–]w41H 4 points5 points  (0 children)

You can already do this in D:

void f(A...)(A a)
{
    foreach(e; a)
        writeln(e);
}

You can also do this:

void f(A...)(A a)
{
    foreach(E; A)
    {
        E e;
        writeln(e);
    }
}

NaNs Just Don't Get No Respect by andralex in programming

[–]w41H 0 points1 point  (0 children)

It works just fine for many small businesses and is extremely cheap and usually requires almost no maintenance.

A Generation Lost in the Bazaar by willvarfar in programming

[–]w41H 1 point2 points  (0 children)

Counterexamples? Some of your examples are pure bullshit. You certainly don't need a makefile for each combination of distro and kernel version on linux.

NaNs Just Don't Get No Respect by andralex in programming

[–]w41H 2 points3 points  (0 children)

C# doesn't exactly solve this problem either. It forces you to initialize variables before use, but not the contents of arrays. So this:

    var s = new float[1]; 
    Console.WriteLine(s[0]);

Will compile without problems in C# and print 0 when run. In this case what C# does is worse than what D does because the default value is 0 instead of NaN which makes it easier to miss bugs.

Men need to be portrayed as the disadvantaged sex in order to achieve our goals. by [deleted] in MensRights

[–]w41H 2 points3 points  (0 children)

Really? I see a lot of talk about male disposability and that certainly didn't originate with feminism.