GlassCalc 1.24


I uploaded version 1.24 about a week ago, but now that finals are out of the way, here’s a bit about the latest version of GlassCalc.

GlassCalc now automatically sizes the left pane to fit its contents. It also automatically hides the left pane if you make the window very small. If you liked the previous behavior, you can switch it back by unchecking Resize left pane automatically and Hide left pane when window is small in the settings window.

Unit conversions!

The biggest change in version 1.24 is support for unit conversions. If you use something like in to cm (or in:cm) after an expression, GlassCalc will insert the appropriate conversion factor. You can also place unit conversions in the middle of expressions, so sqrt(8 ft^2 to in^2) in to cm is valid. Note that GlassCalc doesn’t care what types of units you use as long as each conversion is valid. For instance, you could evaluate 1 weeks:fortnights in:cm.

Important bit about unit conversions!

GlassCalc supports unit conversions, but it doesn’t come with a unit converter out of the box! GlassCalc requires GNU Units to do its unit conversions. The upside of this is that GlassCalc can convert to and from just about any unit you can imagine. The downside is, you have to install another program. Thankfully, this is very easy to do if you follow my handy guide to installing Units! GlassCalc does not yet support all of the features of GNU Units, namely the special syntax required for non-linear conversions (like temperatures). Since temperature conversions are common (and simple), GlassCalc will handle conversions between Fahrenheit, Celsius, and Kelvin itself. You can use the units fahrenheit, celsius, and kelvin or the abbreviations tempF, tempC, and tempK.

What’s next?

I plan on attempting to port MTParser, the math parser used by GlassCalc, to .NET. If I’m successful, GlassCalc won’t need to mess with DLL registration, and I won’t need to package Visual C++ libraries with it. This means GlassCalc will become a much smaller download, and it won’t require installation, so it can be run as a portable app on any computer with .NET 4.0 installed. It will also make it much easier for me to write plugins for the parser, which may eventually lead to things like high precision math for slower, but much more accurate results. Hopefully, sin(pi) will actually be 0, not 1.22460635382238E-16!

Downloads are on the main GlassCalc page.

10 thoughts on “GlassCalc 1.24

  1. Hi, I love the program, just looked it up today. This would have been handy when I was taking my pre-calc and plane trigonometry classes.

    I also enjoy writing utility programs in .NET, but I use C# – less time consuming.

    I was trying to find a place to post my program, do you have any suggestions? I don’t necessarily want to post the source, I would just like to see what people think of it.

    Anyway, great program. I can see you put a lot of time and effort into it.

    • Thank you!

      Actually, GlassCalc is written entirely in C#, though I used WPF to build the interface. I’m quite a fan of C#.

      If you’re looking for a place to host your programs, I don’t know of any good ones (which is why I built my own site). If you already have a place to host them though, there are a quite a number of free software sites around, for example: Freeware Home and Freeware Files. Some will host your files, but others want you to host them.

      • I just got done getting a site on wordpress, I didn’t realize it was free haha. I will also check out those sites you mentioned.

        Would you mind if I picked your brain about the tools you use on your projects? Like, what program do you use to compile and write your code and what books have you read that helped you the most?

        I was also curious about the checking for updates option you have. I have another more robust program that I’ve developed which kind of requires that sort of support, or at least will.

  2. Sure. I use Visual Studio 2010 for C# and Netbeans/Notepad++ for web development, JavaScript, etc… When I was first learning to program, I picked up Wiley’s Teach Yourself C++, but now that I mostly know what I’m doing, I generally just use Google. :)

    The update system is pretty simple, but that’s not going to stop this from being a long description… There are a few more robust update frameworks out there, but I didn’t need anything that fancy, so I wrote my own. I have an XML file on my site (here) that holds the version number of the latest version, the download link, an info link, and the md5 hash of the installer. I use a WebRequest to download the XML file and an XmlReader to parse it. Then I compare the version on the web to the current version and show the updater dialog if it is newer. I run the whole thing using a BackgroundWorker to keep it from freezing the UI.

    If an update is needed and you click Install, I use a WebClient to download the installer using the URL from the XML file I downloaded earlier. Once it finishes, I use a MD5CryptoServiceProvider to make sure the installer downloaded fully and unmodified before running it.

    • When the installer passes verification and executes does it ask you to close the program or upon hash verification it closes automatically?

      I also use VS 2010 Beta 2. I’ll have to check out the book you mentioned for reference as I also generally just use google to find what I need.

      The more robust program which i’ve implemented a theme engine for, uses xml files to store information. I never thought of using them to verify the version, that’s a good idea. It’s so simple, haha.

      I really appreciate you taking the time to humor me. :)

      • No problem. After it does the hash verification, a message appears below the progress bar telling you to click OK to continue and the OK button becomes clickable. When you click OK, it runs the installer and automatically closes the program.

  3. Ok, I have another question. It’s about your license.

    Do you have to pay for anything, like a copywrite in order for that license to hold ground?

  4. I want to put my program out there under a freeware license, but I don’t know how to do that haha.

    I’ve been looking up licenses for about an hour now, but I can’t find much information on it. I would like to just create my own. I read up on some copywrite law and programs are protected under the standard copywrite law.

    I just wish I knew if creating my own freeware license is allowed.

  5. You shouldn’t have to pay anything. Copyright law varies by country, but in most countries, unless you explicitly state that your work is in the public domain, you automatically have copyright over anything you make.

    The license I wrote is mostly a joke, though it does state that GlassCalc is free software and that you use it at your own risk. Creating your own license should be fine, but if you really want to avoid leaving loopholes, I would suggest using or basing your license off an existing one.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.