Not Dead Yet

2013

Yep. I’m still working on GlassCalc 2. Here’s what’s new:

It won’t be called GlassCalc

I don’t know what it will be called yet, but glass is no longer prominent in the UI, so I don’t think it should be prominent in the name. Please tell me if you have ideas.

I know what it’s going to look like

Here’s a mockup of the new UI. (You’ll need to use Opera 15+ or Chrome to get anything other than a garbled mess.) In general, all of GlassCalc’s features are there, just in different places.

New UI stuff:

  • Clicking the deg/rad button in the upper-right toggles between degree and radian modes.
  • The “decimal” dropdown in the upper-right changes the default output format. You’ll be able to choose from decimal, scientific, fraction, hexadecimal, octal and binary.
  • The interface is now broken into tabs.
  • Menu gets you to all of the settings that you shouldn’t need to change often.
  • Calculate is the main view. It should be pretty obvious what this one is for. The new layout is inspired by Soulver, and anything that can be evaluated without changing variables will be done as you type.
  • Copy displays the calculator history as plain text, so you can easily copy any section of it.
  • Graph lets you graph functions. This one might not make it into the initial release.

Things that are the same, but different:

  • The input box at the bottom is gone. The calculator history itself will be editable.
  • The variables panel only shows user-defined variables and functions now. Built-in functions and constants will be found in a help window, which I haven’t designed yet.

How much is done?

  • The UI design
  • Most of the parser (I’m using Irony now)

How much isn’t done?

A lot. Don’t expect it to be done soon.

  • A few parser features, like unit conversion
  • The interpreter
  • The extensions system
  • An initial command line UI
  • The Windows UI

Currently, a Windows 8 UI isn’t possible because the Windows 8 API lacks a few features used in Irony. It might be possible to write replacements for those features, or modify Irony so it doesn’t depend on them though.

Also, since nothing in the parser/interpreter should be Windows-specific, it might be possible to get this running on Mono. I won’t be making UIs for Linux or Mac, but the command line version should run. I plan on making everything open source once it’s mostly functional, and I certainly won’t stop anyone from making UIs for other OSes.

New UI for MotioninJoy

2013

If you use MotioninJoy to connect Playstation 3 controllers to your computer as gamepads, then you are probably well aware that the configuration utility is far from pretty or user-friendly. I just finished rewriting the UI to not suck. Check it out at the link below, then come back here to tell me all the things I broke so I can fix them.

MotioninJoy UIRewritten, offline UI for the Playstation 3 gamepad tool, MotioninJoy

%AppData%: Use it.

2012

Dear developers of cross-platform software, I love your software, but there is one thing about Windows you need to learn:

On Linux, application data goes in folders in your home directory. These folders are named after an application and preceded by a period. On Linux, folder names which start with periods are hidden. I don’t see hidden folders, so I don’t see all the config files. I am happy.

On Windows, application data goes in the %AppData% folder, or for large data files, the %LocalAppData% folder. These folders are hidden by default. Config files don’t clutter up my home directory. I am happy.

Here’s the problem: on Windows, application data does not go in the home directory in folders named after applications and preceded by periods. On Windows, folder names which start with periods are not hidden by default. Furthermore, the home directory is not the appropriate place for config files. I see lots of dot-folders cluttering up my home directory. I am unhappy.

In my crusade to put things where they are supposed to go, I have learned a couple things:

  • Some applications have config files which let you change where they put their config files. Others use environment variables. I will list the modifications necessary to fix certain applications below. If you have a fix for an application I haven’t listed, please tell me in the comments and I’ll add it.
  • Some applications are beyond help. In this case, you can hide the files yourself from a command prompt with the following command:
    attrib +S +H "file or folder to hide"

Android SDK

Set an environment variable named ANDROID_SDK_HOME with the value C:\Users\USERNAME\AppData\Local and move the .android folder from your home directory to the local appdata directory. If there are any .ini files in the .android\avd folder, open those and check for any paths that need to be updated.

Netbeans

The newest version of Netbeans finally uses AppData! For older versions, open C:\Program Files\Netbeans\etc\netbeans.conf in a text editor with admin rights (the actual directory may depend on your version of Netbeans). Change the value of netbeans_default_userdir and add a -J-Duser.home property to netbeans_default_options like so:

# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/AppData/Roaming/Netbeans"
 
# Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Duser.home=C:/Users/USERNAME/AppData/Roaming/Netbeans"
# Note that a default -Xmx is selected for you automatically.
. . .

State of the Chaos

2012

It’s been quite a while since I posted anything, so I thought I’d give you an update on what I’m working on. School is still a major time sink, so I don’t know when any of these things will be finished.

This Website

Wait, WordPress 3.3.1 is out already? My ancient custom theme only works on an ancient version of WordPress, so it’s about time for a new one. I have a design in mind, but I haven’t started building it yet.

Opera Extensions

The latest Opera 12.00 snapshots have a vastly improved Tabs and Windows API. Tab Vault was made when said API sucked (as of Opera 11.62, it still does). I’ve rewritten much of the backend code to be able to take advantage of the new features. Now I’m waiting for the bugs in the new API to get fixed.

Transcriptions

I’m currently about 2/3 done transcribing βίος-δ (Bios-delta) from Guilty Crown. I may attempt to transcribe the piano version of Light My Fire from Shakugan no Shana Final next, though the only available audio clips I have are from the show with people talking over the song. (If anyone can help me find all the episodes and times where the song is played, that would be most helpful!)

GlassCalc 2

So, it turns out writing a parser is hard. Who knew?  My new plan is to use ANTLR to generate a parser. I now have a mostly-working grammar based on a grammar for Python. It doesn’t yet understand that 2 x y should be evaluated as 2*x*y, but I may insert the multiplication operators before sending the expression to the parser (as I’m already doing in GlassCalc 1.x) because making the parser recognize this seems to require backtracking, which is slow. Given the computing power of modern computers and that the average expression isn’t very long, (compared to say a C++ source code file) this slowdown might not make much a difference.

I am also trying to balance power with ease of use in the new syntax. For example, can the value of a variable be a function? If not, (x + 1)(x + 2) would evaluate to x2 + 3x + 2 as it has in GlassCalc 1.x. If so, it would mean “try to call the result of (x+1) as a function and pass x+2 as the only argument”. At the moment, I’m leaning towards functions not being able to be stored as variable values, as I think the alternative is very powerful, yet very confusing.

Missing Images in Logitech SetPoint

2011

If you use SetPoint and it doesn’t properly update itself, it might show a generic mouse image instead of a picture of your mouse. You can manually get the right picture if you can find the upgrade package for your device though.

First, you need to find your device’s model number. Open %AppData%\Logitech\SetPoint\user.xml in a text editor and you should see a line that looks something like this:

<Device DisplayName="Marathon Mouse M705" Model="16777378" NumberOfButtons="11" ConnectionID="">

The important part here is the Model value. Convert the number into hexadecimal. In my case, it’s 10000a2. (Make sure to change all letters to lowercase) Next download this file (replacing the 10000a2 at the end with your hexadecimal model number): http://logitech-viva.navisite.net/logitech/controldevices/setpoint/devices/2/10000a2.exe

If you’re using an old version of SetPoint, change the “2” after “devices” to a “1”.

Run the executable you just downloaded and SetPoint should now show the correct image for your device.

Plans for GlassCalc 2

2011

When I first started writing GlassCalc, I never imagined how many cool new features I would come up with later. With the way some parts of GlassCalc are written, it’s becoming harder and harder for me to add in some of the things I want to add, so I’ve decided that the next major version of GlassCalc will be a rewrite of much of the code.

I’ve just started planning GlassCalc 2, and there are a few other projects I want to finish up before I even start writing code for it, (in other words, don’t expect it any time soon) but here are some of the features I have planned:

UI Changes

  • Notify of updates with native Win 7 notifications if available. Clicking on notification bubble will open regular update window.
  • Replace separate constants,variables, functions views with a single block containing all three items. Maybe use an accordion style control like Opera 11’s mail panel. This should save some vertical space and not look ugly when it is taller than the window.
  • Replace function references block with a dedicated function reference window. Access it from the help menu. This window could also show the info that is currently in quickref.txt. Functions will be sortable alphabetically, by type, (trig, probability, etc.) or by the extension that added them.
  • When hovering over a variable or custom function, show an “x” button to delete it.
  • Remove “Input” text from input box. Put an “=” button to the right. Text/icon inside this button changes depending on context:
    • If no text input, show “=”
    • If auto-evaluate is on and input is simple, show result of expression. Button should smoothly expand to fit text.
    • If auto-evaluate is on and input is complex (commands, multiple expressions) show “=”
    • If another expression is still being evaluated, show spinner icon
  • Add button to header of the history view that toggles between the view’s regular styling and plain text. This will allow selecting multiple lines at once.
  • Redesign settings window. Most likely, place categories in list on the left like in Visual Studio. Keep window the same size no matter which category is selected.
  • Maybe add a code-completion tooltip that would show all constants, variables or functions starting with what you’ve typed. Could activate automatically or on Ctrl+Space.
  • Add option to display bases as a subscript, like 1001102

Internal Changes

  • Separate parser/evaluator from the UI thread so that GlassCalc will not freeze while performing long calculations.
  • Add an “auto-evaluate” mode which evaluates expressions and displays the results as you type.  Result of auto-evaluation will most likely appear to the right of the input box, though a dimmed result in the history view might work too.
  • Replace slow, unfindable xml config files with an ini settings file at %AppData%\GlassCalc.
  • Add extensions system. Extensions will be able to extend the default constants and functions and add scale factors. The user will be able to turn them on and off individually. Extensions will most likely consist of a single ini file with the extension’s name, author, and all the other info. If an extension requires a complex function that cannot be represented in a single GlassCalc expression, .cs scripts can be linked in. An xml file containing documentation can also be included.

Music Feedback

2010

Due to my sheet music page’s popularity (it has over %60 of the page views on this site!) and because I didn’t set up comments for pages on the main site, this page is for you to tell me what you think about my transcriptions and compositions.  If you like my work, want to suggest a song to transcribe, or just want to tell me something, please leave a comment!

My original compositions can be found here.

And my sheet music and transcriptions are here.

Network Issues Resolved!

2010

Up until yesterday, I could not make or edit long posts.  After talking with the campus network admins here, they discovered a firewall component that was generating false positives and blocking my posts.  With it fixed, I can once again post things!

Here’s an update on the things I’m working on/have planned.  This is most likely in the order they’ll be completed.

  • An Opera Unite service that serves a purpose similar to Firefox’s BarTab extension.
  • Part 2 of my post on extending Aero Glass in a WPF application.
  • Separate the parser/evaluator from the UI thread in GlassCalc
  • Build a WordPress 3.0 compatible theme and rework site navigation.