Slashdot Mirror


Microsoft Open-Sources Windows Calculator (betanews.com)

Microsoft said today it has made the source code for its Windows calculator available on GitHub. The company said it hopes to work with contributors to improve the user experience of Windows calculator. In a statement, Dave Grochocki and Howard Wolosky of Microsoft said: Today, we're excited to announce that we are open sourcing Windows Calculator on GitHub under the MIT License. This includes the source code, build system, unit tests, and product roadmap. Our goal is to build an even better user experience in partnership with the community. We are encouraging your fresh perspectives and increased participation to help define the future of Calculator. As developers, if you would like to know how different parts of the Calculator app work, easily integrate Calculator logic or UI into your own applications, or contribute directly to something that ships in Windows, now you can. Calculator will continue to go through all usual testing, compliance, security, quality processes, and Insider flighting, just as we do for our other applications.

44 of 292 comments (clear)

  1. Port to Linux by Anonymous Coward · · Score: 5, Funny

    I hope this program gets ported to Linux now that it's open source.

    1. Re:Port to Linux by MBGMorden · · Score: 2, Funny

      I think your sarcasm detector may need the battery changed.

      --
      "People who think they know everything are very annoying to those of us who do."-Mark Twain
    2. Re:Port to Linux by jellomizer · · Score: 5, Funny

      I see this as a rather lame attempt to seem Open Source Friendly by Microsoft. It is like saying you are supporting the homeless in your city, but making sure the dumpster for your cafeteria is unlocked.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    3. Re:Port to Linux by Killall+-9+Bash · · Score: 3, Funny

      Soon, my beautiful sig.... soon.

      --
      "Prediction: within 10 years, Windows will be a Linux distribution." Me, 7-6-2016
    4. Re: Port to Linux by Anonymous Coward · · Score: 3, Insightful

      >_ Why did you pay $5 for a calculator on your phone?

      Good thing you ask. Not the OP but let me take this very easy answer.

      A long time ago there was an excellent distro called Mandriva. The people there they were so good they were not only the best distribution, compatible with everything, but they provided the best infrastructure to allow many explorations for the various needs of a lot of use cases. Well, without further digression, let's say they weren't able to make money.

      I now happen to use an excellent Android calculator. It's so good it just made me forget or even think about purchasing a real device. I should pay the guy -- the product is so well done it makes me feel guilty for not paying and fear that the coder might go broke -- just like Mandriva.

      Sometimes not paying just because you can is not the most rational decision. Welcome to the sharing economy.

  2. Because they want it to be better! by Anonymous Coward · · Score: 4, Insightful

    Sure. This isn't 100% PR.

    If there was ever any piece of software that is done and needs no more work, it was this one.

    1. Re:Because they want it to be better! by MBGMorden · · Score: 4, Insightful

      What baffles me is why they don't fix Notepad. I mean there are a TON of good other really basic text editors out there (Win32pad is my favorite for a direct replacement), but really all they'd need to do to make that program significantly more useful would be to make it handle Unix line-breaks correctly, and have some indicator (eg, a status bar) of cursor position within the file.

      There are other things that would be nice, but those fixes would literally take any decent programmer less than an hour to implement. I'm half convinced they lost the source code to the Notepad back in the Win95 days . . .

      --
      "People who think they know everything are very annoying to those of us who do."-Mark Twain
    2. Re:Because they want it to be better! by darkain · · Score: 2

      You mean like this? https://www.theverge.com/2018/...

    3. Re:Because they want it to be better! by JackieBrown · · Score: 5, Informative

      I use notepad to remove formatting from text copied somewhere else.

      That and if I don't have time to wait for a word processor to open.

    4. Re:Because they want it to be better! by thereddaikon · · Score: 2

      Same here. I use it to sanitize text. If they started adding features then i could no longer use it for that. If I need more functionality in a text editor then I will use one of the countless alternatives available.

    5. Re: Because they want it to be better! by Comboman · · Score: 2, Informative

      Wordpad is not a text editor, it's a very basic word processor which uses Rich-Text-Format (though it can save in TXT by stripping out the extra formatting). When looking for "more" in a text editor, it's usually features like syntax highlighting, macros, CR-LF conversion, etc.

      --
      Support Right To Repair Legislation.
    6. Re:Because they want it to be better! by EvilSS · · Score: 3, Informative
      --
      I browse on +1 so AC's need not respond, I won't see it.
    7. Re:Because they want it to be better! by SurenEnfiajyan · · Score: 2

      Yeah, but it hadn't recognized UNIX line endings for ages.

    8. Re:Because they want it to be better! by baker_tony · · Score: 2

      Try pressing Ctrl+Alt+V instead of just Ctrl+V
      Then select "Unformatted text".
      Obviously depends on the program, but I do Ctrl+Alt+V dozens of time per day, to KEEP formatting, because by default (in office) I have changed my options to remove all formatting and just paste text by default.

    9. Re:Because they want it to be better! by PrimaryConsult · · Score: 2, Insightful

      Oh man, status bar *and* word wrap at the same time?!? Not even sarcasm here, I never thought they would ever have bothered with it, yet the either-or choice annoyed me to no end (quick notes i wanted word wrapped, but config files I wanted line numbers). What next, having cake and eating it too?

  3. Finally!!! by Anonymous Coward · · Score: 3, Funny

    We've been waiting years for this!

    1. Re:Finally!!! by sycodon · · Score: 4, Funny

      Next to be released....Clippy!

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
  4. Windows 95 calculator??? by gavron · · Score: 4, Insightful

    There are plenty of open-source calculators from HP-11C style RPN
    apps for Android and IOS, to a variety of callable interface ones on
    Linux, MacOS, and whatever.

    Microsoft's 24 year old calculator isn't worth the code it was stolen on.

    E

    1. Re: Windows 95 calculator??? by itsme1234 · · Score: 2

      Or again maybe not:

      >>>>> 10*(1-0.9)
      0.9999999999999998

    2. Re:Windows 95 calculator??? by Anonymous Coward · · Score: 2, Interesting

      I took a peek at the code and this is not 24 year old code. It's using the latest C++ whizz-bang features. I happen to not be a fan of that. But the code does appear clean and well written. I think this would be nice for ReactOS to have.

  5. WOW! by LaminatorX · · Score: 4, Funny

    What's next, Minesweeper?

    1. Re:WOW! by AlanObject · · Score: 4, Funny

      No they have to get the Windows 3 clock out of the way first.

  6. Link was at the very end of the article by thegreatbob · · Score: 3, Informative
    --
    There is no XUL, only WebExtensions...
    1. Re:Link was at the very end of the article by Anonymous Coward · · Score: 5, Informative

      I found this interesting, from the readme:

      This project collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. Telemetry is disabled in development builds by default, and can be enabled with the SEND_TELEMETRY build flag.

      The OS's built-in calculator app collects telemetry? Really??

    2. Re:Link was at the very end of the article by thegreatbob · · Score: 2

      I would have been more surprised if it did not. Win10 seems to be one of the most heavily instrumented pieces of software ever produced. I wonder if they'll be getting some interesting telemetry in the near future.

      --
      There is no XUL, only WebExtensions...
    3. Re:Link was at the very end of the article by SurenEnfiajyan · · Score: 3, Informative

      And here is the flag https://github.com/Microsoft/c...

  7. Wow! by OneHundredAndTen · · Score: 4, Funny

    I will forever remember where I was and what I was doing when I learned about such momentous, earth-shattering news.

  8. im sure it was a warm reception by nimbius · · Score: 5, Insightful

    microsoft: we are committed to open source, here is some software we released as "opened source"
    internet: yeah this license isnt really open source
    microsoft: We have heard the feedback and are continuing our awesome open source initiative.
    internet: its cool. since you spent 40 years trying to force people to use your crappy software, we came up with other open source tools that all either do the same thing, or do it much better than yours.
    microsoft: Here is calculator. It is a small but advanced tool you can use
    internet: Linux has about 34 different calculators already. and they run in windows too.
    microsoft: Yes yes, you are welcome. finally, A calculator that is open source. now if youll excuse me, ive only got 2 plays left on my zune copy of mmm-bop and id like to enjoy them.

    --
    Good people go to bed earlier.
  9. Re:Minor Requests by Anonymous Coward · · Score: 3, Funny

    This male dominated industry never ceases to amaze me with their constant "pull requests".

  10. Too bad it's the new one by Gabest · · Score: 2

    The old blue-ish type could use decimals and switch to hex in a single interface, without losing the numbers. I don't understand why they had to separate it into multiple modes. Very annoying.

  11. Re:Minor Requests by Gabest · · Score: 2

    Haha, exactly my problem. As a programmer, I stopped using it when they only allowed integers in "programmer" mode. How can they be so retarded?

  12. Thin edge of wedge? by mykepredko · · Score: 5, Interesting

    While I agree with the general consensus that releasing the source to calculator is underwhelming, I'm wondering if there is more to the plan here.

    Maybe Microsoft has a long term goal of making more apps open-source, to help with the support workload or to develop more Microsoft developers and maybe find some UI designers with fresh approaches.

    1. Re:Thin edge of wedge? by kackle · · Score: 2

      I figured it was 'Write/improve stuff for us so we can put it in the next OS version we sell.'

    2. Re:Thin edge of wedge? by Dutch+Gun · · Score: 3, Informative

      "Dipping their toes?" Wow, where have you been? They've already released THOUSANDS of open source projects, including some massive ones, like .NET core.

      https://opensource.microsoft.c...

      --
      Irony: Agile development has too much intertia to be abandoned now.
  13. Insider fighting? by jabberw0k · · Score: 2

    For a moment there we almost had a revelation on what really goes on in Redmond

  14. Check the source. by Anonymous Coward · · Score: 5, Interesting

    What makes it so slow?

  15. Yeah they have a plan by aepervius · · Score: 2

    The same plan as when their game division say "they will start again supporting pc gaming". Lip service, but in reality do nothing of worth. With the calculator it is so comical as to give me tears of laugh. There are so many OS project which do better with more functionality, and heck there isn't anything in windows calculator a 1st year student could not slap in a week in java.

    --
    C. Sagan : A demon haunted world:
    http://www.amazon.com/gp/product/0345409469/
    visit randi.org
  16. I'm hoping it will soon get an RPN mode.

  17. Re:Minor Requests by UnknownSoldier · · Score: 2

    > make the programmer version allow floating point numbers?

    Agreed. In the mean-time here are 3 different solutions (shamelessly stolen from this thread) to show a floating-point in hex:

    1. Use Windows Calc
    2. Use Javascript
    3. Use Unix bc

    1. Using Windows Calculator press the following hotkeys: (Note: This worked in Windows 7, I'm not sure if it still works in Windows 10. Who knows if MS fucked up the hotkeys...)

    a) Integer portion:

            Alt-2 (enter number) Ctrl-L Ctrl-P Ctrl-R - Ctrl-R ; Ctrl-C Alt-3 F6 Ctrl-V F5

    Explanation of what those cryptic hotkeys do:

            Alt-2 (switch to Scientific mode) ... enter number or do calculations ...
            Ctrl-L (equivalent to MC button)
            Ctrl-P (equivalent to M+ button)
            Ctrl-R (equivalent to MR button)
            -
            Ctrl-R
            ; (equivalent to Int button)
            Ctrl-C
            Alt-3 (switch to Programmer mode)
            F6 (equivalent to DEC button)
            Ctrl-V
            F5 (equivalent to hex button

    b) Fractional portion:

          Alt-2 Ctrl-R - Ctrl-R ; = * 2 y 32 = ; Ctrl-C Alt-3 F6 Ctrl-V F5

    Exampe: 123.456 will show two outputs: 7B, and 74BC 6A7E

    2. Use Javascript. Open up any browser and start the developer console (Windows Chrome press Ctrl-Shift-I)

            var n = 123.456;
            console.log( n.toString(16) );

    Will display: 7b.74bc6a7ef9dc

    3. Use the Un*x arbitrary precision calculator: bc -l.

    bc -l
    obase=16; scale=40;

    123.456 / 1.0
    7B.74BC6A7EF9DB22D0E5604189374BC6A7EF

    Notes
      a) make sure you load the math library with -L.
      b) You have to use the stupid divide by 1.0 trick to force the full output because bc only defaults to the precision of the input numbers.

    Sad that MS can't even implement a basic programmer calculator after all these years. LOL.

  18. Windows 10 calculator is slow compared to 7 by Stonent1 · · Score: 2

    In Windows 7, Start > Run > Calc and calculator loads instantly and you can start using it. That's when the calculator appeared to be written using Windows Forms. When they switched to Modern UI or WPF in Windows 10, when you open it, Start > Run > Calc. wait...wait...wait... and then it's open. Nearly every application that they switched from 7 to 10 in this way has a loading lag that wasn't there before.

  19. Pardon my French by quonset · · Score: 2

    Jesus fucking Christ! Why the hell does one need to have an "improved" experience when using a calculator? It is just about the simplest piece of software one uses. The only thing it needs to do is perform mathematical calculations.

    Does everything need to be an "experience"? How about just working?

  20. #ifdef SEND_TELEMETRY by SurenEnfiajyan · · Score: 3, Informative
    1. Re:#ifdef SEND_TELEMETRY by ffkom · · Score: 2

      It would not be a genuine Microsoft product if it did not contain malicious code. It's like a signet proving this is the real Windows calculator, not some cheap rip-off.

  21. Re:Minor Requests by UnknownSoldier · · Score: 2

    Yeah bc is wonky; it has a bug / feature where it only uses the precision of the input. Dividing by 1.0 forces full precision. These seem to be the general heuristics:

    Addition: precision = min( lhs, rhs )
    Multiplication: precision = lhs + rhs - 1, but doesn't seem consistent
    Division: precision specified by scale

    Given this input ...

    bc -l
    obase=16;scale=40;

    0.456 + 0.
    0.456 + 0.0
    0.456 + 0.00
    0.456 + 0.000
    0.456 + 0.0000
    0.456 + 0.00000
    0.456 + 0.000000

    0.456 * 1.
    0.456 * 1.0
    0.456 * 1.00
    0.456 * 1.000
    0.456 * 1.0000
    0.456 * 1.00000
    0.456 * 1.000000

    ... produces these (inconsistent) results:
    .74B
    .74B
    .74B
    .74B
    .74BC
    .74BC6
    .74BC6 -- WTF? Should be 0.74BC6A

    .74B
    .74BC
    .74BC6
    .74BC6 -- WTF? 3*3 digit precision is 5 digits???
    .74BC6A -- WTF? 3*4 digit precision is 6 digits???
    .74BC6A7 -- WTF? 3*5 digit precision is 7 digits???
    .74BC6A7E -- WTF? 3*6 digit precision is 8 digits???

    --
    Slashdot: Too fucking lazy to fixing their shitty LAMENESS filter so people can't actually post SHORT code snippets.