GlassCalc 1.25

2010

GlassCalc version 1.25 fixes a crash when you check for updates while GlassCalc is already checking for updates. It also reads an “extensions.ini” file, which currently allows you to define extra constants, but may be expanded to let you extend GlassCalc in other ways in the future.

User-defined Constants

To add your own constants to GlassCalc, go to the More Settings menu and open the Extensions tab. You will see two sections: Global Extensions and User Extensions. Global extensions are system-wide and reside in GlassCalc’s program files directory. This means modifying them on Vista/Win 7 requires elevation. (I have not tested this on XP, so please tell me if it gives you trouble) User extensions apply only to your user profile and reside in GlassCalc’s application data directory. For normal cases, I suggest you use only user extensions. If both extensions files are present, user settings will override global ones.

To create the extensions settings file, click Create extensions.ini. The settings file will be created with the default settings and opened. (If you don’t have file associations for .ini files, you should get an Open With dialog. Pick a text editor.) Constant definitions go after the line with [Constants]. Everything on a line after a semicolon is ignored. Each line can contain one definition in the form “name = value”, where “name” contains only letters, numbers, and underscores and doesn’t start with a number. “value” can be any number (exponential notation is supported) or any numeric field, constant, or property defined in mscorlib.dll. (If you are not a .NET programmer, you can safely ignore that last bit.) If the value is not defined in System, you must provide the full namespace as well.

Here is an example file showing some of the ways constants can be defined:

;Stuff after a semicolon is a comment.
[Constants]
euler = 0.577215664901532860606512090082 ;Euler's constant
planck = 6.6260689633e-34 ;Planck's constant using exponential notation
pi = Math.PI ;pi using .NET's built in constant

GlassCalc should update its constants list when you close your text editor. If it does not, try clicking Edit extensions.ini from the settings menu and closing your text editor again. If all else fails, restart GlassCalc and it will pick up the updated settings. If you defined a new constant with the same name as an already present variable, you will need to restart GlassCalc for the changes to take effect.

If any of this isn’t clear or isn’t working, don’t hesitate to ask in the comments section below!

Downloads are on the main GlassCalc page.

GlassCalc 1.24

2010

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.

Transcription: Bruine Assassine

2010

I just finished transcribing Bruine Assassine, the only piano solo from the So Ra No Wo To original soundtrack. You can download the sheet music from my sheet music page. You can also listen to the original track on YouTube here. Here’s the link to the sheet music again, this time all by itself and with a little line under it for extra emphasis.

Please tell me what you think! Comments, suggestions on what to transcribe next, etc. are all welcome!

GlassCalc 1.23

2010

I uploaded this a while ago, so I figured I should write a bit about what’s new in version 1.23. Most importantly, I reworked a lot of startup code, so GlassCalc should start up much faster than before. As a result of a change in the way settings are handled, is you will lose your saved variables, functions, and history when you upgrade. If you don’t want to lose them, you can export them before upgrading and import them afterwards. This is explained in greater detail on the main GlassCalc page.

This version also fixes the factorial function so it works on big numbers. It also now supports the factorial operator. For example, 5! now means 5 factorial. I also added a “clear all” command which clears user functions, variables, and saved history all at once.

The installer package is a bit bigger this time, because I added the .NET 4.0 web installer. The setup program should now make sure you have .NET 4.0 and (after asking you) automatically install it if needed. The upgrade installer does not include this, so it links you to the .NET download page instead.

GlassCalc 1.24 should be coming sometime soon. It will feature a little better handling of the size of the left pane, hiding the left pane when the window is very small, and basic support for unit conversions using Units.

Downtime and Stuff

2010

After about three weeks of downtime, my site is finally back up! My host moved everything to bigger and better servers, but my account was lost in the transfer. Good thing I keep nightly backups of my database! Some things may be broken for a while as I get everything working back the way it was.

Also, with the release of the .NET Framework 4.0, I have a new version of GlassCalc for you to try. It has a few bug fixes, a bunch of new features, and a pretty substantial improvement in startup performance. Download it here or click “Check for Updates” from GlassCalc’s help menu.

GlassCalc 1.22

2010

Version 1.22 fixes a number of bugs I introduced in versions 1.20 and 1.21 and some others I didn’t catch before. Syntax highlighting is fixed for exponential notation, the input box scrolls to fit its contents again, and I fixed a bug that kept you from defining functions if the function reference pane was hidden. I also improved the way equations are sent to the solve algorithm, so it should work on larger numbers now. Numbers are now no longer rounded to 15 decimal places when displayed, so you can work with very small numbers more easily.

I also added a number of new operators: ++ -- += -= *= /= ^= and %=. These are really just shortcut notations that let you do things like “x = x+1” by only typing “x++“, or “x = x*5” with “x *= 5” . All these operators except ^= behave like they do in C and C++. Since the ^ operator is for powers, ^= is assignment by power instead of assignment by bitwise XOR. Also, the increment (++) and decrement (–) operators cannot be used in the middle of expressions like they can in C. They must be by themselves, like “x++“, not in the middle of an expression like “(x++)^2“.

As with version 1.20, GlassCalc is now running on the .NET Framework 4.0. Microsoft has not yet released the .NET Framework 4.0, so you probably don’t have it. If you’re feeling adventurous, you can download the .NET 4 Release Candidate.

I’d love to hear what you think! If you have a suggestion, find a bug, or just use GlassCalc, please leave a comment!

System Requirements

  • Windows (Tested on 7, untested on earlier versions)
  • .NET Framework 4 RC
  • Visual C++ 2005 libraries (included in regular installer)

GlassCalc 1.21

2010

Version 1.21 improves startup performance a bit by loading some things in separate threads and not loading other things until they are needed. It also adds syntax highlighting for constants and the ability to evaluate multiple expressions at once. This means you can do things like “x = 0“, then keep executing “x = x+1; x^2” to print the squares of successive numbers.

As with version 1.20, GlassCalc is now running on the .NET Framework 4.0. Microsoft has not yet released the .NET Framework 4.0, so you probably don’t have it. If you’re feeling adventurous, you can download the .NET 4 Release Candidate.

System Requirements

  • Windows (Tested on 7, untested on earlier versions)
  • .NET Framework 4 RC
  • Visual C++ 2005 libraries (included in regular installer)