Transcription: Affections
Posted in (Transcriptions) by Joel on Feb 01, 2012Here's another transcription: The song is Affections from the Broken Blade (ブレイク ブレイド, a.k.a. Break Blade) soundtrack, a beautiful, classically styled piano piece. I hope you like 4 against 3.
Transcriptions: Inevitabilis, I hope so
Posted in (Transcriptions) by Joel on Nov 02, 2011Time for two more transcriptions:
The first is Inevitabilis from Puella Magi Madoka Magica, Mahou Shoujo Madoka Magika, 魔法少女まどか☆マギカ or whatever the heck else you want to call it. I uploaded this one about a week ago, but I never got around to posting about it. The second is I hope so... from Kami-sama no Memo-chou (神様のメモ帳). Here are the links:
GlassCalc 2 Update
Posted in (GlassCalc, Programming) by Joel on Sep 20, 2011As great as Mathieu Jacques's MTParser is, it only supports double-precision floating point numbers and it only works with .NET through a COM interface, which means I have less control over the parser and I have to register the dll. Therefore, GlassCalc 2 will feature a new parser which I am writing from the ground up. I call this new parser GCParser. I am awesome at naming things.
Here is a fairly technical description of how GCParser will work:
Design Goals of GCParser
- The parser will operate on objects deriving from GCObject. This is a completely generic class, and in fact, the only function a GCObject must have converts the object to a string so it can be displayed.
- GCParser will have two types of GCObject out-of-the-metaphorical-box: numbers and arrays. Arrays are lists of GCObjects. This means GCParser will support vector operations, and since you can make arrays of arrays, probably matrix operations too.
- The syntax for arrays should be familiar to anyone who has programmed in C or JavaScript.
a = [1, 2, 3]is a 3-element array.a[0]retrieves the first element of the array. - GCObjects can have properties and functions. For instance, arrays will have x, y, and z properties to make 3d vector operations easy.
[1, 2, 3].xwill return1. Also,[2, 3, 1].sort()would return[1, 2, 3]. - GCParser will be able to operate on multiple types at once. For instance, when executing
2 * [3, 4]the parser would search for a Multiply function taking two arguments of types GCNumber and GCArray. This expression would evaluate to[6, 8]. If no function was found, the parser would throw a type error. - GCParser will be extensible. Extensions will be able to define not only constants and functions, but new GCObject types as well. For instance, a complex numbers extension could define a GCComplexNumber class, functions for operating on complex numbers, and a constant i. Since the parser will only create numbers and arrays normally, the extension would also need to define a constructor function,
Complex(real, imag), to make complex numbers. If the extension defined functions for adding/multiplying numbers and complex numbers together, the expression1 + 2iwould also work. The parser would interpret this as(number: 1) + ((number: 2) * (complex: 0 + i)). - I haven't figured out how this would work yet, but I want GCParser to support expressions like
[1, 2, 3].sort((a,b) => b<a). This would send a predicate function to the sort function telling it how to sort—in this case, sort descending. Likewise,Sum(n => 0.5^n, 1, 50)would sum 0.5n from n = 1 to 50. - Parsing occurs in three stages: tokenization, parsing and evaluation. Tokenization takes the expression and figures out what all the individual parts mean. It also generates a structure which the syntax highlighter can use instead of the convoluted regular expression system GlassCalc currently uses. Parsing takes the tokenized expression and converts it into a binary tree of operations. Evaluation traverses the tree, running each operation until it gets a final result. Parsing and evaluation will not run on the UI thread, so the program won't freeze up if you run a long calculation.
Things That Are Not Design Goals of GCParser
- Be really fast.
tl;dr Version
- GlassCalc 2 will have a new parser. It will be magic, rainbows and unicorns. It will calculate just about anything.
- If it can't calculate something, you can probably write an extension so it can.
So, when will it be done? Eventually. I have the tokenizer mostly complete. I am waiting for .NET 4.5 to be released before I start work on the UI, as I will make use of its new asynchronous stuff.
Transcription: Melancholy
Posted in (Transcriptions) by Joel on Aug 12, 2011Here. Have another transcription. This one is Melancholy (メランコリー) from the soundtrack to Yumekui Merry (夢喰いメリー).
Okay, so the anime was pretty terrible at the end, but at least the soundtrack was pretty good. Here's the link:
GlassCalc 1.35
Posted in (GlassCalc, Programming) by Joel on Jul 20, 2011It has been far too long since I last updated GlassCalc. There's a new version with some bug fixes. Check the GlassCalc page for download links.
This update fixes some bugs caused by GlassCalc applying exponential formatting to hexadecimal numbers containing "e". It also fixes a formatting bug where a thousands separator would appear next to a negative sign (ex: -100 was displayed as - 100) and a syntax highlighting bug where a variable ending with the name of a constant would be highlighted partially as a variable and partially as a constant.
Also, here's a status update on GlassCalc 2: I've decided that MTParser isn't capable of all the things I would like to do with GlassCalc, and none of the free parser libraries I've encountered are either, so I am now writing my own parser (MTParser is excellent, but its existence as a COM component makes installing GlassCalc a pain and it doesn't support lists or higher precision math). The primary goals of the new parser are:
- Support all of the GlassCalc's current syntax without tons of regex magic.
- Allow for basing syntax highlighting off of the parsed expression instead of using even more regex magic.
- Add support for lists (what you math people might call n-dimensional vectors) and possibly lists of lists (which could be used to perform matrix math).
- Possibly add support for high-precision math.
So far, I have a system that tokenizes an expression character-by-character as you type it—that is, it splits the expression up into numbers, operators, symbols, and so on. The cool thing about doing this character-by-character is that by the time you hit Enter to evaluate, part of the parsing work is already done. In fact, I can use this already-finished part to speed up syntax highlighting and to show you the result of simple calculations before you even hit enter without reparsing every time you add a character. Of course, if you start messing with the middle of your expression, I have to reparse everything.
I am also experimenting with different GUI designs. I may post some mock-ups here later to see what you think.
Also, once I have made a little more progress, I'm going to put GlassCalc 2 up on Github. That's right, GlassCalc 2 is going to be open source. The only thing keeping me from open-sourcing GlassCalc was figuring out what MTParser's license would and wouldn't let me do with regards to distributing MTParser's source/binaries. Now that I'm not using MTParser, there aren't any problems with going open source.
Transcriptions: Memories, A Distant Promise
Posted in (Transcriptions) by Joel on Jun 08, 2011I have two more transcriptions for you. The first is a bonus track from the Shadow of the Colossus soundtrack, Memories (記憶). The second is A Distant Promise (遠い約束) from Myth: The Xenogears Orchestral Album. The download links are on my sheet music page, as are links to the songs on Youtube.
Shadow of the Colossus: Memories
Please tell me what you think! Comments, suggestions on what to transcribe next, etc. are all welcome!
Transcription Updates
Posted in (Transcriptions) by Joel on Mar 24, 2011I just updated a couple of my transcriptions to fix errors. Here are the changes:
Ga-rei Zero - Compassion: Changed the fermata in ms. 13 to a tenuto, since this note should only be held slightly longer than the others.
Shakugan no Shana S - Junko's Disappearance Scene: Added a rallentando at the end of ms. 15. The song slows a bit for the last two notes of this measure.
Missing Images in Logitech SetPoint
Posted in (Stuff) by Joel on Mar 11, 2011If 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.
Ce qui fut sauve
Posted in (Transcriptions) by Joel on Feb 26, 2011I said in my last transcriptions post that I'd probably transcribe the version of Ce qui fut sauve from the Shakugan no Shana movie. Well, here it is. It's not much different than the version that appears at the end of the OVA though.
As always, please tell me what you think! Comments, suggestions on what to transcribe next, etc. are all welcome!
Plans for GlassCalc 2
Posted in (GlassCalc, Programming, Stuff) by Joel on Feb 05, 2011When 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.
