Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Microsoft Open Source

Microsoft Open-Sources Windows Calculator (betanews.com) 292

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.
This discussion has been archived. No new comments can be posted.

Microsoft Open-Sources Windows Calculator

Comments Filter:
  • by Anonymous Coward on Wednesday March 06, 2019 @02:03PM (#58226590)

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

    • Re: (Score:3, Funny)

      Soon, my beautiful sig.... soon.
    • by J053 ( 673094 )

      No need. Linux already has bc(1).

  • by Anonymous Coward on Wednesday March 06, 2019 @02:06PM (#58226622)

    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.

    • Indeed, I can't think of what I'd add. The benefit of a widget like calc.exe is that it starts *immediately*. It's a sub second start for sub-minute work. If I need anything more than what it provides, I'm firing up a spread sheet or some advanced number-crunching program that takes longer to start, but I'm OK with that because I'm going to be spending 15 minutes or more with it.

    • by MBGMorden ( 803437 ) on Wednesday March 06, 2019 @02:23PM (#58226782)

      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 . . .

  • Finally!!! (Score:3, Funny)

    by Anonymous Coward on Wednesday March 06, 2019 @02:06PM (#58226626)

    We've been waiting years for this!

    • by sycodon ( 149926 ) on Wednesday March 06, 2019 @02:19PM (#58226740)

      Next to be released....Clippy!

      • Funny you say that. My 1 and only idea as to how to "improve" calculator.exe was to have it running in some state, in the background, and any time one starts typing (while not focused on any windows) numbers followed by mathematical signs, it should spit out the answer on the screen. Basically keep the program part that does the calculations, but don't improve the interface, remove the interface.
        • Most of us probably are not calculating numbers anywhere near as often as you. I'd find this distracting.

          • It could also get really annoying really fast if you just wanted to type an equation without the answer. Just think how aggravating it would be if you just wanted to type 2 + 2 and it automatically appended = 4 every time. You would then have to compensate by deleting the extra text just like you have to fight with autocomplete on smartphones.
      • And Reversi too! Yes! All of this plus Reversi!!!

      • emacs has tetris and pacman built in, I don't think expecting clippy to be in there is really asking that much of them.

  • by gavron ( 1300111 ) on Wednesday March 06, 2019 @02:06PM (#58226628)

    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

    • Re: (Score:2, Interesting)

      by Anonymous Coward

      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.

      • If ReactOS ever implements UWP, then sure. But it will be a long time before anyone would try adding that to the scope of the project.

  • WOW! (Score:5, Funny)

    by LaminatorX ( 410794 ) <sabotage.praecantator@com> on Wednesday March 06, 2019 @02:07PM (#58226638) Homepage

    What's next, Minesweeper?

  • Can someone now put the 1/x button back where it is easily accessible and make the programmer version allow floating point numbers? I get really annoyed when I'm dealing with hex values that are whole numbers, where 1 represents 2^(-8), and I can get the integer value from the hex, but then have to copy the value to the scientific calculator to convert to the floating point value...

    • by Gabest ( 852807 )
      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?
      • by kackle ( 910159 )
        I copied the old calculator to my new machine; now I have the best of both worlds.

        By the way, I only JUST learned about its "digit grouping" feature; it is helpful for these aging eyes.
      • I've seen what programmers do with floating point arithmetic. This was the only safe option.

    • > make the programmer version allow floating point numbers?

      Agreed. In the mean-time here are 3 different solutions (shamelessly stolen from this thread [microsoft.com]) 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-

      • by vinsci ( 537958 )
        GNU bc version 1.07.1 surprisingly gives three different answers.

        > bc -l
        obase=16
        scale=40
        0.456+0.0
        .74B
        0.456*1.0
        .74BC
        0.456/1.0
        .74BC6A7EF9DB22D0E5604189374BC6A7EF

        • 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.45

  • Wow! (Score:5, Funny)

    by OneHundredAndTen ( 1523865 ) on Wednesday March 06, 2019 @02:17PM (#58226722)
    I will forever remember where I was and what I was doing when I learned about such momentous, earth-shattering news.
  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Wednesday March 06, 2019 @02:22PM (#58226774)
    Comment removed based on user account deletion
  • We had the old file manager, early DOS versions and now the calculator. Eventually Microsoft will probably go the Red Hat route and Make the full switch to open source. They already kind of are with Edge soon being based on Chromium.
    • They already kind of are with Edge soon being based on Chromium.

      You see that as a trend toward being more open and not a repeat of what they did with Java?

  • by Gabest ( 852807 ) on Wednesday March 06, 2019 @02:26PM (#58226796)
    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.
  • by mykepredko ( 40154 ) on Wednesday March 06, 2019 @02:29PM (#58226820) Homepage

    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.

    • 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.
    • by kackle ( 910159 )
      I figured it was 'Write/improve stuff for us so we can put it in the next OS version we sell.'
    • 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.

      I'm sure there is, because otherwise, why bother? I think this is just them dipping their toes into the water, to see how interacting with the open source community on an app that ships with Windows will work. So they want to start with something innocuous.

      Unfortunately, they've chosen an app that's so innocuous that they may be disappointed in the response. They may take from the experience that it's not worth open sourcing stuff, because no one contributes anyway.

      • by Dutch Gun ( 899105 ) on Wednesday March 06, 2019 @10:03PM (#58229202)

        "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... [microsoft.com]

    • 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.

      There was just some story where people were complaining about how long it took to launch the Windows 10 calculator. Maybe Microsoft is just hoping that someone will fix it so that it launches in a reasonable time. Alternately, the calculator in Windows 7 still pops up rapidly, maybe they want to break that.

  • This means I'll be able to get a version that doesn't beg me to rate it on the windows store
  • Solitaire was probably the most use bundled application of Windows until they ladened it with microtractions.

  • by jabberw0k ( 62554 ) on Wednesday March 06, 2019 @02:49PM (#58226964) Homepage Journal
    For a moment there we almost had a revelation on what really goes on in Redmond
  • Check the source. (Score:5, Interesting)

    by Anonymous Coward on Wednesday March 06, 2019 @02:50PM (#58226966)

    What makes it so slow?

  • I'm hoping it will soon get an RPN mode.
  • Dear Microsoft,

    good thing you did not wait 26 more days to make this announcement.

  • Can't wait for a snazzy new calculator to come out... ! Come on MS, pretty much every programming course teaches you to make a calculator within the first few weeks!
  • If they are serious about building out its functionality, it would be nice if it had added graphing and calculus features added to it to mimic a TI-83 or TI-89. This could be a benefit to students who have to share calculators in school and can't afford one for home use (or those times you just don't have one on you). Having it shipped and supported right inside Windows would be a great benefit for students.
  • 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.
    • The difference isn't even noticeable on a decent computer. Otherwise, I might care.

    • by Ksevio ( 865461 )
      Yep, I downloaded the Windows 7 calculator on Windows 10. Not only is the interface faster, but the programmer mode exists and is very useful.
    • by ljw1004 ( 764174 )

      The old windows7 calculator was a win32 app. That started up almost instantly. (you say it's Windows Forms, but I think that's wrong. Windows Forms is a .NET layer on top of the win32 "user32.dll" API for displaying dialogs/buttons/windows. I think calculator used the win32 API directly, as do many C/C++ win32 apps. There are two different C++ layers on top of user32.dll which calc might have used... I'm not sure.)

      The new windows10 calculator is a modern store app, also known as WinRT, formerly called Metro

  • by quonset ( 4839537 ) on Wednesday March 06, 2019 @03:55PM (#58227390)

    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?

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

      Then you just experienced it working. Just because it's a long word doesn't mean it has to have a fancy definition.

  • Most of Bill Gates wealth is built on luck timing and greed. The EU should have forced MS to fully document their file format.

  • by Suren Enfiajyan ( 4600031 ) on Wednesday March 06, 2019 @04:49PM (#58227698)
    • by ffkom ( 3519199 )
      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.
    • by ffkom ( 3519199 )
      Ah, btw., they have a sentence about this in their README.md:
      "This project collects usage data and sends it to Microsoft"
      (followed by some unapt attempt of justification).
  • Terry Gilliam did some insider flighing in The Adventures of Baron Munchausen (1988)—mainly Robin Williams's head flying around on a Roman dinner plate (about as useful as the source code to Windows calculator).

    Robin's expression is slightly on the mirthful side in this one, even by his own standards. Anything to do with Uma Thurman's brief nude scene, in her filmic debut?

    Google's calculator, with it's magic unit conversions, is a different beast, whose source code would have some actual value.

  • I'm curious whether any improvements made to the open source code would be back-ported into Windows?

    I often use the date calculation feature in calc.exe. Sometimes I inadvertently click on the "Calculate" button instead of "=" when doing an arithmetic calculation, however, and once clicked, I can't go back to using the numeric functions without closing and reopening the program.

  • I'd love it if Microsoft Open Source Caligari TrueSpace. It's about the only product they own I want. Hasn't been supported since 2008, would be lovely to have the code.
  • Related info here...

    The Win10 calculator has an awful UI. It's huge -- much bigger than it needs to be. As others here have noted, it also starts slowly, since it's a Windows Store app and not a normal Win32 program. As others here have also noted, it may not work at all if your network's firewall blocks Windows Store access. (Or you remove the Windows Store from Windows.)

    So, replace the darn thing. There are lots of other Windows calculator programs out there. (My favorite is Moffset FreeCalc: http:/ [moffsoft.com]

Avoid strange women and temporary variables.

Working...