41 thoughts on “GlassCalc Feedback

  1. I have downloaded the calculated. But when I am trying to access it, the calculator is not opening. Instead the following error is displayed

    GlassCalc has encountered a problem and needs to close. We are sorry for the inconvenience.

    • Is there any other information with the error message?

      First, make sure you have the .NET Framework 3.5 installed. Open explorer and go to “C:WindowsMicrosoft.NETFramework”. If you see a folder named “3.5”, it is installed. If not, download and install the .NET Framework package from Microsoft. If that doesn’t fix it, there’s a small chance you may need the Visual C++ 2008 package (only 4MB) as well. Also, make sure Windows Update is on and that you have the latest updates installed.

      If it still crashes, could you tell me which OS you are on? (XP, Vista, 7, etc…) I do not have a Vista machine to test this on, so I may have overlooked something there, but I was able to run GlassCalc on another XP and Windows 7 machine.

  2. Hi! First off, I love the program. I work in a lab at the University of Augsburg (in Germany), and I’ve been looking for a calculator computer program for a while that could replaced by old HP (it died :( ). This is definitely the best I’ve found, so great job! The only additional suggestion I can think of so far is to give the user the possibility to add additional constants. I work in physics, so I always need values like the speed of light, Planck’s constant, etc., but I could understand if other users wouldn’t. You could just define variables to serve that purpose, but then you can’t easily define functions using those variables. Let me know what you think. Anyway, keep up the great work, and thanks!

    Cameron

    • Thanks!
      I’ll see what I can do about additional constants. At the moment, the constants are hard-coded into the program because, well, they’re constants. I considered user-defined constants when I started writing GlassCalc, but there wasn’t really any distinction between variables and constants, so I took it out. I could probably put additional constants in an external file to be loaded when the program starts though.

      • Yeah, that would be great to have them in a external file. It just seems to me (I could be wrong here) that different users would have different constants they need to keep handy, and it would allow them to customize the calculator. Don’t get me wrong though; it’s a great program as it is right now, and I’ll good use of my copy. Thanks again!

  3. Great! This is just what I needed Joel. Thanks so much for changing the program (and for making it in general).

    Cameron

  4. Hi! Really liked the idea of aplication. Some suggestions:
    1) Don’t know was or wasn’t you inspired by Soulver app for MacOs, but they have some great ideas. I really liked two of them:
    a) two-pane interface with instant calculations (catch onKeyPressed() events). Two-pane interface can be seen here: http://www.acqualia.com/soulver/. (it is just much faster than with words)
    b) operations with percentages. Like 10%*250000 = 25000 or 120 + 5% = 126. It really helps in day-to-day usage. Much more than mod() function, which is % sign at the moment.
    2) I think, that delimiters between groups of digits in answers are must have. 1 000 000 000 is so-o-o easier to read than 1000000000.
    3) Maybe some settings for font size and antialiasing. On WinXP app looks off the way with its Vista-like style.
    4) Another idea is introduction of some special constants like M for 1e6, B for 1e9 and k for 1e3. I.e., divide 2 billion for 750 millions like this: 2B/75M. It’s easy to replace this letters with appropriate number of zeroes. If you register this letters as usual constants than 1000/1k yields 1 000 000 instead of 1 because of the same proirity for division and multiplication.
    5) Maybe minimize to tray and ability to show up with global hotkey. It’s convenient to have calculator at hand from time to time. Now I use Launchy for that case, but its calculator abilities could be better.

    Thanks for your attention! And for your software!

    • Thanks for the ideas! I’d actually never heard of Soulver before, but it gives me a few new ideas. I think I could probably add “x mod y”, then provide an option to change % to percentage. It’s probably more natural for non-programmers for x to be multiplication instead of *, so I’ll try adding an option to change that as well. It might be a bit tricky making sure x is handled as an operator, not a variable though.
      #2 makes perfect sense. I’ll definitely add an option to show thousands separators (and probably remove them when you go to select the result).
      For #3, since I have access to a couple XP computers right now, I’ll take a look and see if there’s anything I can fix up there.
      As for point #4, if I added a special type of constant with higher priority, that would solve the problem and keep the ability to define your own scale factors.
      #5 is a great idea as well! I’m not sure how to do either of those right now, but then again, I wasn’t sure how make any of this program work when I started. :)

      • Wow, thanks for a quick response! Maybe Soulver just shows x instead of * when you press Shift + 8. Don’t have a Mac, so can’t check.

        What about two-pane and multi-line and immediate calculation mode?

        Concerning others, I believe it’s not too difficult to implement all this stuff, because you are using high-level .NET-programming. Most of it should be intrinsic fucntions of appropriate classes.

      • At this point, changing the layout of the program would be pretty difficult and involved, so I don’t think I’m going to try the two-pane layout right now. Maybe later though. I am thinking about hiding the “Input” label on the left, and putting an immediate result on the right for simple calculations. If I do that (and I will try), I want to perform the evaluation on a separate thread so the UI doesn’t freeze if it encounters a difficult calculation. Synchronizing multiple threads in WPF is difficult at best, so it’s a definite maybe. :)

        I also just started working on a project to automatically generate user CSS patches for websites that forget about certain browsers, for instance, when Twitter uses -moz-border-radius and -webkit-border-radius, but not border-radius, so only Firefox, Chrome, and Safari get nice round corners. (Yes, there are other browsers!) Once I’m done with that, I’ll resume work on GlassCalc.

  5. Joel,

    Thank you for the free calc and more importantly the bonus free laugh. The terms and conditions are worthy of a mention, it’s the only one I’ve actualy read! Let’s face it we all usualy just blindly click through the legal stuff. You’ve brightened my day, thanks!

    • Hehe, you’re welcome. I figured something short, simple, and best of all, entertaining stood a better chance of actually getting read. Looks like it served its purpose! :)

  6. have fun with custom functions i made:

    Finance:
    mortgage_monthly_pay(loan,interest,months)=loan*(interest/1200)/(1-1/(1+interest/1200)^months)

    Boolean:
    isOdd(x) = x%2
    isEven(x) = !(x%2)

    Vectors R3: (x,y,z),(u,v,w)
    vec_size(x,y,z) = sqrt(x^2+y^2+z^2)
    vec_scalp(x,y,z,u,v,w)=x*u+y*v+z*w
    vec_crssp_x(x,y,z,u,v,w)=y*w-z*v
    vec_crssp_y(x,y,z,u,v,w)=-x*w+z*u
    vec_crssp_z(x,y,z,u,v,w)=x*v-y*u
    vec_angle(x,y,z,u,v,w)=acos((x*u+y*v+z*w)/(sqrt(x^2+y^2+z^2)*sqrt(u^2+v^2+w^2)))

  7. Hey, I love the new UI. Great job the the full glass. Is that something more native to WPF, or can that be incorporated into a standard .NET application?

  8. Ugh, I wish I had seen what I saw BEFORE I posted my comment, but oh well…

    When I switched to the full glass UI, it cropped off the text on the menus. In other words, the: File, Options, and Help strings are clipped from the bottom up about 1/4 of their total height.

    Thought you should know. I’m running win 7 64-bit, just for your info.

  9. That’s strange. I’m also running Win 7 x64, and there’s no problems here. Could you post a screenshot? Are there any other settings, like OS text size, that you’ve changed?

    The full glass thing is pretty alien to WPF, and even .NET. It’s actually done through unmanaged Win32 API calls (which are not all that fun). If you want, I could write a post about how it works.

  10. Here’s a screenshot: http://img375.imageshack.us/img375/873/gcss.png

    Have you heard of uxtheme? It allows you to skin windows 7 flawlessly. I’m running it with a modified shell, which could be causing the problem. However, there is no cut off using it without the Glass UI.

    And yes, I would like to know about those API calls. I have a few in my program which block the use of the caret in a textbox.

  11. Hmm… now that I look at it, it’s also cut off on the main as well… It looks like you could fix it with setting the height a little larger on the menu titles… Also if you get rid of the rectangles that are drawn when they’re clicked, since that looks a little hokey anyway, but that’s just my opinion.

    The reason I didn’t see it on the non-glass UI was because it’s not as obvious. Anyway, thanks for the quick reply. I’m sorry for MY late reply as I actually forgot I commented here until I looked at my e-mail and saw your response.

  12. Yeah, I’m not a big fan of the darkened rectangles with the glass UI either, but then I saw how complicated the default control template for a menu item in WPF was, and I didn’t really want to figure out how to change it. :(

    Anyways, I’ll see if there’s a way to make the height of the menu dependent on the text size instead of being hard-coded like it is now.

    This site helped me the most when I was figuring out the API stuff:
    http://blogs.msdn.com/b/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx
    And, you’ll be using a lot of PInvoke, so this should help a lot too:
    http://pinvoke.net/

  13. Thanks for the links, I really appreciate it.

    I was curious about your programming experience and why you’re so attached to this project, if you don’t mind my prying.

  14. I’m a self-taught programmer. I started learning with Game Maker 6 before I picked up a book on C++ and started learning that. I was also part of a FIRST Robotics Competition team for 3 years, where I was one of our few (and sometimes, the only) programmers. All the robot code was done in C, except the third year, where we got new control systems and everything was done in LabView. I started learning C#, PHP, and JavaScript around the same time, and by now, I’ve become fairly proficient with most of those languages. (except, maybe C++, as I rarely use it)

    As for why I’m attached to this project, I guess it’s because this is one of the few large projects I’ve completed that could be useful to people who are not me. :)

  15. Just a heads up: Version 1.28 should fix the text cutoff glitch, and it adds support for using things like 1M for 1 million (as requested by Elrickbk). You can use the same feature to use % for percentages.

    I’ve put up a page of tips and tricks which explains how to set that up, and a roadmap which I’ll update with my progress on various features.

    @Eli, thanks for the functions! I’m planning on making it easier to import/export specific functions. Then I’m going to add a page on this site where you can upload those function packages and share them.

    • Returned from vacation and chcecked new version — thanks for the nice additions! Scale factors and thousands formatting works as intended.

      As for percentages:
      1) I used help from tips&tricks and placed % in scale factors sections but GlassCalc still responds with ‘Unexpected operator’ for ‘100%’ input.
      2) If you use scale factors, will such expressions as ‘300 – 5%’ work properly? I think that answer in that case (and this is main point in using percentages) should be 285.

  16. Did you restart GlassCalc after adding the % scale factor? GlassCalc currently updates when the text editor closes, but for some programs like Notepad++, it doesn’t seem to catch it all the time. Since that isn’t very consistent, I’m going to make GlassCalc check the modified time of the file instead and show a message when it has loaded the updated settings.

    As for #2, no it won’t. It will evaluate that as 300 - 0.05. You’d have to use 300 * 95% instead. Doing that would be difficult as it would effectively change the addition and subtraction operators into multiplication. I have no idea how to manage order of operations in that case either. In 100 + 100 - 5%, is that “100 + (100 – 5 percent of 100) = 195” or “(100 + 100) – 5 percent of 200 = 190”?

    • 1) Yep, I did. I’ll try it once more to be sure.

      2) I believe that “smth – 5%” should be interpreted as “take all that on the left and multiply by 100% – 5%”. This way “100 + 100 – 5%” would mean “(100 + 100)*(100%-5%)”. It should be not too difficult to make this with regexes.

  17. Parenthesis grouping makes it a little more difficult, but I have a couple helper functions for that. I’m pretty much rewriting the parser to make it more flexible and to move it into another thread so the UI doesn’t hang up while evaluating, so it will probably be a while before the next version. I’ll try to add better support for percentages though.

  18. Sure. I’m a little swamped with schoolwork right now, but I could probably work on that Thursday or Friday.

    I’m planning on rewriting parts of GlassCalc, particularly separating the parser from the UI thread, adding a much more useful function reference, and completely redoing the the way the defaults can be extended using some sort of package system. This will include a way to add new default functions, and since C# can compile things on the fly, you’ll be able to write new functions in either GlassCalc’s syntax or C#.

  19. I’ve implemented phi, invphi, and a few more new functions as well. Going to fix up a couple more formatting bugs before I release it though.

  20. Thanks. The program is already available as a single installer file, but since it uses a COM component (MTParser) to evaluate things, the actual program has to be multiple files and it has to be installed.

    I’ll take your feedback into account as I make version 2. I’ll be using my own parser, so while the program probably won’t be just one .exe, it should run without needing to be installed.

  21. Hello!
    GlassCalc is a wonderful piece of software! I rally like it – it made me use spreadsheet less often – because of the “1-click-copy-whole-equation”.

    Only one (1) problem though (I am not sure You are developing it still?), as I am from Europe and I like the casual, non-engineer-or-programmer comma style as a decimal separator (instead of dot) – Is it possible to use comma as a separator?

    Yours Faithfully,
    Michał Walczak

    • Thanks!

      Because commas are used to separate arguments to functions, there isn’t a nice way to use commas as the decimal separator. pow(1.5, 2) is unambiguously the power function with arguments 1.5 and 2. With a comma for a decimal, that becomes pow(1,5, 2). Is this the power function with arguments 1,5 and 2, arguments 1 and 5,2 or argumens 1, 5 and 2?

      I am not actively developing GlassCalc at the moment because any extra features I would like to add are not possible with the way the program currently works. I have started working on a rewrite of the entire program which will be much more powerful, but I haven’t made much progress on it recently because of some other projects I’m working on.

  22. Fantastic just what I’ve been looking for (a looong time) to avoid opening excel constantly. From a purely functional perspective I’d really like the option to save the on screen window position rather than it popup in the centre of the screen on launch, also minimize to taskbar or a hotkey function would be very useful. Looking forward to the rewrite.

Leave a Reply

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