Uncategorized

I’m still alive

Posted in Uncategorized on July 17th, 2009 by Cory – Comments Off

Flu cleared up earlier this week. It did a real number on my lungs but otherwise I’m all set for Comic-Con in a week!

Swine Flu ftl

Posted in Uncategorized on July 3rd, 2009 by Cory – Comments Off

Me at the doctorYesterday I went to to the doctor’s office and was diagnosed with the flu — really sucks, especially since I am away from home visiting family.

The Political Compass

Posted in Uncategorized on May 20th, 2009 by Cory – Comments Off

A couple years ago the µTorrent guys pointed me toward The Political Compass, and I have since had a lot of fun with it.

The Political Compass gives you a series of ideologies to choose from, and uses them to map you on two axes: an economic scale (left/right) and a social scale (authoritarian/libertarian).

Many of the questions in the test forces one to take a deeper view at their own ideologies. I know there were a couple on there that made me question myself. If you take it truthfully — ignoring any political parties that have slighted you, ignoring any political correctness, and simply answering how you actually feel, you might learn something about yourself.

The ideologies proposed are often on a far axis, forcing you to choose between extremes. Some of them are vague, forcing you to think it out. I almost universally have people paste me some of the questions with a big WTF, sometimes even accusing the test of being slanted against them.

It always fascinates me to have other people take it, because by the end most of them realize the guy they had been rooting for — Obama, McCain, Ron Paul, whoever — is actually pretty far from their views. Many Democrats realize they are a good deal farther left than they thought, and most Republicans find they are quite a bit more libertarian than they believed.

The compass is not really a definitive answer for what party you should vote for, I wouldn’t recommend anyone vote solely because of it. But it can offer a starting point point for people, to filter the feel-good politics that try to appeal to everyone from the actual issues that people disagree with.

In a couple cases the people I’ve had take it realized they are actually polar opposites of the guy they voted for, one of them thanking me a few weeks afterward as it had caused him to read up on his choice and notice he had been fooled by those same feel-good politics, saying “I can’t believe I almost voted for that idiot!”

Re-encoding VFR Anime

Posted in Uncategorized on October 21st, 2008 by Cory – Comments Off

So I preordered a Pandora, and for the past week have been re-encoding videos and music for playing on it.  All goes well, until I discovered my favorite anime uses VFR — Variable Frame Rate.  This is usually only seen in anime, which tends to use a low frame rate for slow scenes and a higher frame rate for action sequences and 3D renders.

For whatever reason, all the major video tools are completely dumb when it comes to VFR.  They expect a constant framerate and will completely screw up anything VFR.  This is such a problem that many raw and fansub groups tend to give up and decimate their encodes to a constant 24fps, noticably sacrificing quality.

But there is a light at the end of the tunnel.  After several days of searching and tinkering, I’ve found out how to do it.  Here are the steps I’m using — they are definitely still not optimal (though it does produce a perfect encode) so if you know of anything better, let me know.

  1. If your source is not MKV, you’ll need to convert it.  This can be done using mkvmerge from the MKVToolnix package.
  2. Encode the source like normal.  I use meGUI.
  3. Use the mkv2vfr utility from the Haali Media Splitter package to extract a timecode file from the source MKV.  This is the important step — the timecode file describes the FPS that different segments of your video run at.  The mkvextract program from MKVToolnix has a timecode extraction option that looks cleaner, but seems to produce an incompatible or broken timecode file.
  4. Mux the new video with the timecode file and the audio.  This is also done with mkvmerge.  Make sure you specify the timecode file for the video, not the audio.

Here are the exact commands I used:

# 1. Convert MP4 to MKV
mkvmerge -o "source.mkv" -a 2 -d 1 -S "source.mp4" --track-order 0:1,0:2

# 2. Encode
x264 --crf 26 --ref 8 --mixed-refs --bframes 16 --b-pyramid
     --direct auto --filter 1:1 --subme 7 --trellis 2 --psy-rd 0.6:0
     --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --vbv-maxrate 25000
     --me umh --threads auto --thread-input --aq-mode 0
     --progress --no-psnr --no-ssim --output "output.mkv" "source.avs"

# 3. Extract timecodes
mkv2vfr "source.mkv" "dummy.avi" "timecodes.txt"

# 4. Mux output with timecodes and original audio.
mkvmerge -o "muxed.mkv" --timecodes "1:timecodes.txt"
         -d 1 -A -S "output.mkv" -a 2 -D -S "source.mkv"
         --track-order 0:1,1:2

With source.avs looking like:

DirectShowSource("source.mkv", audio=false)

crop(2, 0, -4, -2)
Lanczos4Resize(800, 432)

vecs = last.MVAnalyseMulti(refframes=2, idx=1)
last.MVDegrainMulti(vecs, idx=1)

Automatic hyphenation

Posted in Uncategorized on October 20th, 2008 by Cory – Comments Off

I’ve just installed the hyphenator — a really cool script which automatically adds soft hyphens to words, which means I can finally justify text. If you’ve got Javascript turned on, you should see nice hyphenated line wrapping in addition to syntax highlighting on code.

The failure of Freenet

Posted in Uncategorized on May 8th, 2008 by Cory – Comments Off

Freenet 0.7 has just been released, after being in development for years. It’s not exactly new – most users have been on this version for quite a while now. But for those who haven’t used it since 0.5, it might be time to give it a try.

Freenet is an important concept. On it you get complete freedom of speech: the ability to discuss and spread your ideas, with full anonymity and freedom from censorship. Of course, this means that you will probably come across things on it that will go against your beliefs. Maybe some things that truly shock and disgust you. While nothing forces you to actually visit these freesites, you will have to come to terms that this might be cached on your computer even without you visiting them. But this is important to freedom of speech: if people where able to censor anything, the system just wouldn’t work.

So why does Freenet fail? Lack of documentation. I don’t mean ease of use in the interface – I mean for the protocols and network design. A system as important as Freenet — one that people expect unfaltering anonymity and security from — should be rigorously and meticulously documented.

But it’s not. In fact, if you bring it up with the Freenet developers they will gladly tell you this is intentional — that they use security through obscurity to guard against someone finding a way to break the system.

So — do you trust your freedom with the competency of a handful of developers to make a good design? I don’t. I want as many people looking at the system as possible. I want people to really bash on it, to try to break it. This gives me confidence, not worry, because problems will be solved sooner than later.

This would also open up the possibility of more than one client to access the network. If you have two separate clients that implement the same strict protocol and one of them messes up, it’s likely to be caught far sooner than with just one. An immediate example of where this would have helped is with a bug that existed in 0.7’s AES implementation for a very long time, where the data wasn’t being encrypted properly.

The Freenet developers don’t want multiple clients either — again, they worry that one might break the network. This line of thought is incomprehensible to me, because as a developer I would want things that could break my network to be discovered as soon as possible so I could fix the design.

Sure, you could look at the source code. It is Open Source, after all. But what if you don’t know Java? I don’t particularly want to learn Java just so I can review Freenet’s code. As a C++ developer I might be able to read and understand most of it, but I don’t trust myself to review something so important without years of prior Java experience — the chance that I’d miss something is just too great.

I’m back.

Posted in Uncategorized on December 23rd, 2007 by Cory – Be the first to comment

I’ve been visiting family for the past three weeks, for the holidays.  I’m back!

AMD taking a page from Intel’s marketing

Posted in Uncategorized on November 28th, 2007 by Cory – Comments Off

AMD’s new Phenom processor comes with a new instruction set called SSE4a.  For a while I’ve been running under the assumption that this also meant they caught up and added support for SSSE3, and that SSE4a was simply SSE4 with a few new instructions added on.  This was pretty cool to me, because SSE4 has some nice instructions like DPPS that I was looking forward to using.

Turns out it’s not so – SSE4a doesn’t include any of the 54 new instructions in SSE4.  What it does add is 8 new instructions, one of which is similar to but incompatible with a SSE4 instruction.  SSE4 aside, the Phenom still doesn’t even have support for SSSE3.

Although they have improved quite a bit recently, Intel is well known for using anti–consumer tactics in marketing in the past.  The "GHz myth" they started will undoubtedly be fresh in the minds of weary techies for years to come.  I never expected AMD to sink to such underhanded marketing, but it appears they have: SSE4a is named to be nothing more than confusing to potential consumers.

Using proper punctuation marks

Posted in Uncategorized on November 27th, 2007 by Cory – Comments Off

I recently learned that the lovable character between the 0 and the = key on QWERTY keyboards is not a hyphen (U+2010) nor a minus (U+2212), but a hyphen–minus (U+002D).  Not just that, but I learned of the existence of various dashes, such as the figure dash (U+2012), en dash (U+2013), and em dash (U+2014).

Using proper punctuation marks can be especially hard for the simple fact that they don’t exist on my keyboard.  Microsoft Word will automatically replace two hyphens with a dash, but what about the rest of the apps I use?  For now, I’m stuck using the tedious Alt+Numpad formula, or copy–pasting from the Character Map.  I think this auto–correction would be a great thing to integrate into Windows, perhaps into an IME.  Call it the next evolution of input, like how speech recognition was added to Vista.