Live data from Hacker News

Microsoft takes .NET open source and cross-platform

news.microsoft.com

931–937 of 937 posts

Re: Microsoft takes .NET open source and cross-platform

#931
post #718
post #661

Earlier quoted context omitted.

or these PureScript examples https://gist.github.com/spion/982350f4b3d3464b1870 using the Canvas monad to pre-create a scene and then render it; the DOM monad to construct DOM elements.

So how are errors handled?

You have the option of two monads, Maybe and Either. Usually errors are handled with the Either monad. An operation may either return a result or an error. Together with do syntax the Either monad gives you multiple choices in handling errors.

You can handle every single error explicitly (as in Go) using pattern matching

  eitherResultOrError = operation1 arg

  case eitherResultOrError of
    Left error -> handle error
    Right result -> handle' result
Its also possible to chain multiple operations then check the error later. If an error occurs, the next operations in the chain will not execute.

  let eitherResultOrError = do
    x  handle error
    Right result -> handle' result
Or simply use `orElse` to return a default value in case of errors.

For IO operations and other monadic actions, its best to use EitherT, ErrorT or MaybeT, which are monads that can add error handling to any other monad. To understand how these work, its probably best to implement MaybeT. Basically, they add another wrapper to other monads to redefine what the bind operator (`>>=`) does

Re: Microsoft takes .NET open source and cross-platform

#932

Earlier quoted context omitted.

> I treat companies like I treat people I would say this is a really bad strategy. According to unwritten HN rules, I should now start explaining why I think there are differences between a company and a person, and why they should be treated differently thereof. But I won't. :)

Why? Do you disagree with the concept of voting with your wallet? How else can you get companies to listen to your needs? And my needs as a developer and a user are simple - I need my privacy, an open web and a healthy open-source ecosystem. And I'll vote with my wallet and I'll bitch against any company that has a problem with that - and I'll also encourage alternatives that cater to my needs. The world would be a m…

> Do you disagree with the concept of voting with your wallet?

That concept is fantastically distopian. The concept "voting with your wallet" is practically abject propaganda. We have a word for this already and it's not "voting:" it's "purchasing" or "bribery."

>How else can you get companies to listen to your needs?

With words. The very thing you are using right here.

Re: Microsoft takes .NET open source and cross-platform

#933

Earlier quoted context omitted.

I'm just a low level drone here at MS, and I obviously am not involved in any important decisions, but I'd like to add that all the above things happened back when the current generation that works here was growing up. We were all on Slashdot, being outraged and angry 13 year olds. Except now my generation works here, and I think the changes (such as all the ones announced today!) are a good sign of that. At least si…

Patent threats and lawsuits against Android OEMs. Locking down computers using UEFI Secure Boot and taking control away from the owners of the machine. Sabotaging the office document standard process at ISO. Corruption in cases where governments explored switching to alternative operating systems. Supporting software patents. All these happened within last 5 years (and continue to happen).

> Locking down computers using UEFI Secure Boot and taking control away from the owners of the machine.

Microsoft requires that x86 UEFI machines be unlockable by end users.

In comparison, Apple has locked down various aspects of their desktop machines for years.

Re: Microsoft takes .NET open source and cross-platform

#934
post #830

Earlier quoted context omitted.

Microsoft still has an absolute monopoly in desktop OS: http://goo.gl/oBY93k . And microsoft never had a monopoly on mobile (smartphones + dumbphones) So, what exactly has been changed the last 20 years? In my country (Belgium and my work also sells computers / laptops), practicly all laptops / notebooks / desktops are Windows (we have a sister company which is a computer store)...

The mobile OS is the big change. So where as Microsoft still has control of the desktop OS, the desktop OS is a much smaller share of the whole OS market. I'm coincidentally in Belgium too :) Any chance you work for CoolBlue then?

No, i work for an smb in Belgium andere freelance 2. You work for coolblue perhaps?

Re: Microsoft takes .NET open source and cross-platform

#935

Earlier quoted context omitted.

https://nplusonemag.com/issue-19/essays/chat-wars/ http://www.catb.org/~esr/halloween/ > I think you have it backwards. It's the new vision of computers (walled gardens, all the interesting logic hidden away in data centers, content consumption appliances instead of real computers) that is pale and sickly. Yes, these new trends are worrisome. But it's not the first time! I firmly believe that we'd all be better off i…

The first link is an interesting tale of technical gamesmanship, but I don't see much bad about Microsoft in there. Other than the author's manager's empty threat to sue him, which is more of an individual case. I haven't heard of Microsoft suing employees are frequently as, say, Amazon actually does. As for the Halloween documents, come on, 1) you're going to cite ESR, really? and 2) that boils down to "they said so…

1a) I've cited ESR, really!

1b and 2b) I think you've made my point. So are we going to tell the rest of the world, or let them dangle?

Re: Microsoft takes .NET open source and cross-platform

#937
post #126

Earlier quoted context omitted.

System.Console isn't something that most apps rely on. It's handy for printing something out in a tiny one-file test app, but generally not relied upon for bigger apps.

Are servers / daemons not a common usecase? Most, if not all, of the apps I write on a daily basis do not have GUI.

Is this on a UNIX? If so, yes, it's common to write to stdout/stderr there. Not in Windows, though - anything which is long-running tends to be a Windows Service and there's no point writing to System.Console from there because no-one will see it!

I haven't done much .NET on UNIX but if I was doing so, I'd probably want something a bit more UNIX-friendly than System.Console, though I know it does have the ability to deal with different streams.

Post reply on HN