2013-04-29

[General] Babeling

There are too many methods to communicate.  Depending on the person, I either text, send a Facebook message, message them via Google Talk, sent them an e-mail, and much more rarely, telephone them, write a letter, or start a Skype conversation.  I need to steal time to work on my Streamlines, perhaps after my BrickWorks.

[General] Living with others

Today I was reflecting on my housing situation.  I have an amazing housemate right now, and the contrast between life with a housemate and without is stark.  I think having my housemate has added a lot to my life.  It's strange to remember how life was without one.  It made me realise that this might be one of the reasons why I remember having change-anxiety after moving away from so many other places, but not from my previous apartment.  My favourite memories from the last year there are always when friends were over.  Looking back at other places I've lived, it's almost always about the people for me as well.  Even one of the worst housing situations, with messy men in Waterloo at Quiet Place, I still have fond memories of walking on train tracks and winding down streets, meeting the likes of Runcible Ren.

2013-04-26

[Technology] .htaccess and unsavoury IPs

http://www.htaccess-guide.com/deny-visitors-by-ip-address/
What happens when a small set of Asian IPs try to exploit possible (but absent) vulnerabilities in your website?  Deny their IPs access. :)

2013-04-23

[General] The Legend of Zelda: Symphony of the Goddesses

It's coming back to Toronto.  By the time I know what my situation will be in September, it will probably be too late to buy tickets, but I'm still glad. :)  Maybe I'll at least have completed Skyward Sword by then.

[General] Privacy

So, I read a series of images objecting to CISPA on actor Wil Wheaton's blog, and it reminded that laws can't really guarantee privacy to begin with.  It's probably best just to limit opportunities of exposing yourself by not doing things or by not putting information in a readable form somewhere others have access.

2013-04-22

[Microblog] Transient Treble

One of my favourite artists, Rae Spoon, released a new album last year in January and I did not notice! :O

[Technology] eMusic and Linux

I like emusic.  It's my preferred source for music, in part due to their costs, but largely in part due to their philosophy.  They have occasionally had Linux clients, and was one of the first large music stores to eschew DRM on its tracks.

Recently, they've updated their site and their download client, and now its Windows-only.  When you go to purchase a track now, it asks you to accept an agreement (you can set it to not ask again) which is fine, and then it prompts you to download the eMusic download manager (for Windows).  If you're on Linux, even if you use Wine, eMusic won't let you go further.  It wants the installed download manager to send you to a web page to confirm that it was installed (and for some reason, even with Wine, that does not happen).

The solution for me is to

2013-04-19

[Microblog] Hemlock Grove

This is the worst television series I've ever watched.

Update: it gets better.

2013-04-13

[Microblog] Transient Thought

In Peterborough for iaido, where!

2013-04-12

2013-04-09

[Microblog] Transient Thrill

Mwahaha, new anime has appeared on Netflix, at long last.  Still not as much as on FUNimation's YouTube channel, though.

2013-04-08

[Technology] Testing for memory leakage with Vala and GLib

For my thesis, I implemented my algorithm in Vala, in part because I want practise, as well as because the candy of a high level language can theoretically expedite implementation, while the nature of Vala being compiled down into C helps avoid the penalties of running code in a run time.

Vala manages memory for you mostly using reference counting.  This is mostly invisible.  Running my experiment the other week revealed a large amount of memory leaking.  I shuddered, and realised I'd have to analyse it and create tests for this.

I used the GTest framework and  malloc.h's struct mallinfo and mallinfo () to calculate memory usage before and after various blocks of logic.  (I mostly just encapsulated calls to functions + setup.)  I also occasionally used valgrind and gdb.  My methodology was to start at the highest level functions and measure memory leakage.  Then, if one was detected, I'd create new tests narrowing down the source.  This was sometimes arduous as I started learning how GType and GSlice worked.

First, the first time you use a type in GLib, there's often a bunch of memory allocated that will (as of late apparently) never be freed.  That's fine, because it's a one-time penalty and it's necessary.  To avoid having these allocations cause a test to unduly fail, I ended up with "priming" code before a lot of tests ran, that would simply invoke types for their first time, so nothing new on that account would have to be allocated during the time.

Second, after reading about how to use valgrind on GLib applications, I started to learn about GSlice.  GLib encourages the use of the GSlice memory allocator instead of g_malloc () or malloc ().  The idea seems to be that it will reserve a large contiguous block of memory for you to play with, that won't be released back to the system any time soon.  That way, if you would normally allocate and deallocate space many times quickly, you save on the cost of actually reallocating it, since you never really let it go.  That sounds great; but for the purpose of testing, I really want to measure only the memory the system is actually using, not how much I am prudently reserving.  To work around that, I set an environment variable G_SLICE=always-malloc.

Third, I encountered what may be a bug in Vala's code generation.  Bug 684182.  When using asynchronous methods, the generated C code that calls g_simple_async_result_new () passes a brand new GObject to it a a source without ever unref'ing it, so every time you run an async method, you lose 32 bytes.  Also, there is occasionally an additional 16 bytes lost in relation to running them, but I haven't narrowed down where that came from.  The 32 bytes are relatively negligible for my purposes, but it was still resulting in failed tests.  Consequently, I now define a margin that memory leakage can fall within for a test that will only result in a warning and no failure.  My margin is 32 bytes * # of async method calls + a possible 16 bytes.

Fourth, I discovered an actual issue with some of my code.  I ran into a reference cycle in my code.  Referring back to the ever-useful Vala referencing handling page helped me understand what I needed to do for that.  I made sure that the appropriate references had the "weak" modifier attached, and all was well there.  For a given use case, this reduced memory consumption from 681kB to 546kB. (Both with the TreeSet fix below.)

Fifth, the most significant issue I encountered wasn't a problem with my own code but a memory leak in libgee before version 0.8.5.  The current stable libgee in Fedora 18 is only 0.8.1.  It has a memory leak in TreeSet where the free method for the TreeSet's members is never called so all elements added to a TreeSet are leaked.  That is incredibly expensive as I use TreeSets a great deal.  Upgrading to 0.8.5 resolved this, and reduced memory consumption from 26,402kB to 546kB!  (Both have the "weak" fix above.)

So, now I have a nice set of reproducible test cases for memory usage to help prevent memory leaks in the future.  Vala does a really nice job of managing memory via references, so it's almost no problem at all.  While the biggest win comes from dealing with a memory leak in code that isn't even mine, the tests helped me locate it, and if the leak had not been fixed in the last couple of months, I would have been able to fix it myself, and now I'll know if any new leaks are created.  I'll probably trust the GSlice allocator in actually running my experiment, and be grateful for its purported benefits (rather than using always-malloc all the time), since there is no actual memory leaked.  Finally, it's nice to have a better understanding of memory usage in Vala and GLib.  I feel like it's generally important to be well-informed about how memory is being handled, and that's something I haven't had the time to educate myself on for Vala until now.

2013-04-07

2013-04-03

[Microblog] Transient Triumph

Methodically approaching problems can be so productive.  Once I noticed that several people were perplexed with a row of broken computers, I went and followed the cables back to a power bar which was not on.  Someone suggested it was broken.  I followed the bar to the socket on the wall, and noticed it was a centimetre out of the socket.  I pushed it the rest of the way in and the machines came to life.  Ta-da!

2013-04-02

[Technology] Changing cursor size in GNOME 3

So, googling around, I was told there should be an option in GNOME Tweak Tool, but I don't see that right now, so poking around some more, I found a useful dconf key, and from the command line, I set it like this:

$ dconf write /org/gnome/desktop/interface/cursor-size 48

I'm doing this because I am using a double monitor but the one monitor is big enough that I keep losing my cursor!

2013-04-01

[Microblog] Burning

My lips are burning after eating a bag of potatoes crisps coated in sodium chloride and acetic acid.  It's weird how tastes change.

Labels

#General #Microblog friends life #Technology gnome music google iaido guelph fedora vegan bugs food school linux technology #GNOME #School jodo gxml #Budo blogger #Photos work nature web happy vala art firefox Flesherton android anime internet open source stress travel home kendo kosmokaryote writing birthday dad science animals computers environment future security canada cookies development german photos programming reading sick sleep snow video winter GUADEC cell phones css fun language learning me people phone picasaweb ta time christmas evolution love movies vegetarianism Toronto gsoc identity society speech vancouver vlogbrothers #Vegan adventure ai birds dreams git google+ gseta happiness libgdata new zealand night responsibility skedge stars tea wind mobile Nintendo baking cake consumerism fedora 17 memories netflix nlp photography quote tablet uoguelph Josh Ritter books bug communication design facebook family humanity javascript magic meaning memory money organisation pidgin rain recipes speechdispatcher sushi tv weather Spain TAing animalia cat chocolate cold cycling death encryption film flight genderguesser halloween health knowledge languages liv mail new years nightmares politics productivity psychology swords the legend of zelda ubuntu video games web development xml xorg youtube Thanksgiving The Frames acer bc blogging busy conversation cooking duolingo emacs emusic fedora 18 galaxy nexus gay rights gitorious gmail japan libxml2 martial arts materialism nerdfighteria privacy rhythmbox software sound space university upgrade valentines wahoo walking Con-G Europe John Green Scott Pilgrim age animal welfare apple autumn bash brain brave breath of fire II calm camera canada day change clothing comments confidence conservation creativity culture dance dataloss djaqua e-mail errors feminism gdom germany goals google reader gtk humour intelligence japanese laundry law light math morning mozilla nostalgia ottawa peterborough pets philosophy pie quality research sei do kai shopping spring style summer value village vday vonage water web design website x11 #Life New York alone anime north anxiety argument blog budo buffy business cats computer science concert data loss diy duplicity eating economy education energy english exercise failure fedora 19 file systems flowers freedom french games gdata greyhound growth habits heat history house html ice cream im information joy koryu laptop living lost microsoft moon moving muffins mystery news nz pain photo php physics pirates pizza play poverty preupgrade progress purple python reality reflection religion rss self serialisation sharing skating social sun synergy tachi uchi testing themes thesis thinking thoughts transit turtles veggie challenge velociraptors violin weekend weird yum zellers API Air Canada Empathy Hank Green Hugo Jane Austen Lord of the Rings Nexus One OCUS Sudbury Trick or Eat arboretum audible autonomous automobiles backup beauty bike blogs browsers camping cancer canoeing celebration charity chrome colour community content copyright corporations crafts decay decor depression depth disaster drawing emotion epic equality experience faery fest farmer's market fedora 12 fedora 16 fedora 20 fedora 22 fedup feelings fireworks friend gender ghetto ghosts glib gnome blog gnome shell google talk green hair hobocore hungry icarus interest introspection java jobs last exile luks macbook mail-notification mario meat in vitro mind mom mood moon festival motivation mtp ninjas oh the humanity pagans pants papers past performance perl phones picnics pitivi plastic pride pumpkin pumpkin pie quiet thrill rae spoon receipts rogers rpm seminar sewing simple simplicity sleep deprivation smells soy milk speech dispatcher sports stories story telling strange streamlines swimming telephone temperature texting thrift stores time management time travel tragedy truth understanding united states urban ecosystems usb veganism voice volunteering webschwerver wild wireless working world yojimbo zoology Avatar: The Last Airbender Blassreiter CIS*2750 CIS*6890 Czech Republic Diablo Dresden Codak Dunedin Dutch Blitz Electric Networked Vehicle Elliott Brood Ender's Game France Fringe GNOME 3 Grimes HTC Hayao Miyazaki Mario Kart Montréal Network Manager Newfoundland Ontario Ouran Host Club Richard SVC Samsung Samurai Champloo Santa Claus Studio Ghibli TCAF US academics adb aeroport algonquin amusing animal agriculture apartment automation awkward bad movies banana bats battery beard belladonna beta bicycle book branding breakfast brno bus buses buy nothing day cabin calgary candy cards cars catastrophe celebrate celtic chat cheap cheese childhood china chinese calendar cities clarity clean cleaning clock comics compassion compiler computer conspiracy theorists consumption context convention cookie cool cornerstone cosplay cottage country court creation cthulhu cupcakes curiosity cute dancing dark themes dbus definition democracy despair dinosaurs discomfort dns dodgeball dragon dress dust dystopia earth earth day efficiency eggs elections email enhanced history ethics evil exhausted expectations exploring ext3 ext4 fail fair trade fall fashion favourite feedly ferry focus formal free friendship fruit fudge full moon furniture gaelic game boards garden gardening gee generosity genetics gimp gir gobject good google hangouts google wave government grading gratitude green roofs groups gsec guerilla gardening haircut hakama help homosexuality honesty howl hp human rights humanitarianism humility hypocrisy ice images imaqua instant messaging integration internet explorer jabber jazz jelly bean jokes kernel keyboard knife labs last exile: fam the silver wing laurena lazy letters library libxml livejournal lizzie bennet loneliness loss lovely lyrics maps maturity meditation melancholy metadata microbes microfinancing microwaves moon cake morality mother music concert muso jikiden eishin ryu myth namespaces nasa nerdfighter neural networks nintendo 3ds normal normality notes obsolescence oceans open open souce open standards panasonic paper parties patches peanut butter perception personal perspectives philanthropy plants pleasant politeness potluck preparation problems ptp pulseaudio quidditch racism recreate redundancy relationships relax repairs resizing richard's room roomba roses rsync running sad sadness salsa samurai sanity scary schwarting seasons self-esteem self-navigating car selinux semiformal senility sensitivity sentimental sheep ships silicon motion sleeping in sms social justice software engineering solitude solutions songs soup speed ssh star wars strangers stupid success sunset surreality survival skills suspense sustainability sweet sympathy symphony tardigrades tasks teaching technical communication and research methods test tests thought thrift tim tams time and space tired tools tracker tradition tranquillity transience trees trust tumblr twitter update usability utopia via vihart vlog waffles warmth waste waterloo wave web comic webkit wii wiki winter is coming wizard wonder woods words xmpp yoga youth zoo #Wishlist 1. is anyone reading this? 1602 1984 2. you win a prize! 2014 24fps 3. gimme a call to collect 404 All My Children Andy Griffith Argentina Armstrong House Avatar: The Legend of Korra BarTab Beach House Boston Boston Summit Businesses C CIS*6050 Cambridge Christopher Plummer Claymore Creatures Darker than Black David Attenborough Dear Wendy Docking Station Dollhouse Earthbound England Excalibur February Fergus Final Fantasy IX GError GSA Go Google Play Music Hunger Games I believe in a thing called love I'm a wizard IRC Ikea Ireland JRR Tolkien King Arthur MIT Mac OS X Madrid March Massachusetts Matlock McGuinty Melodies of Life Merlin Michael Cera Mother Mother Mr. Tumnus Narnia Neil Gaiman New York Philharmonic Nick and Norah's Infinite Playlist Nintendorks Norns North Korea NotesFromNewYork Olympic OpenShot Orphen Orson Scott Card Oscars PEAP Pete Peterson Planet Fedora Porco Rosso Questionable Content R ROM Rent S SIM Wireless Sauble Beach Selenium Shakespeare Snakes and Lattes Splatoon Star Trek Steve Grand Stranger Things ThanksLiving The Darkness The Devil is a Part-Timer The Fifth Estate The Guild The Hobbit The Stand Tianjin Tim Hortons Tolkien UK UX VPN Will Grayson Will Grayson Wolves in the Wall WordPerfect Xiki abrt absolutism abuse academia accessibility active activism activity addiction adreama adrift adulthood advertisement advertising air airport express airship ajax al gore alarm clock aldiko alice in wonderland alien alistair summerlee amateur amazon ambience ambition amy winfrey anaconda and imperfection angle angry birds anhosting animation anon anonymity ant apache apology appearances appreciation aqualab arcade architecture arduino arrogance ask assassins assignments association analysis astrid asus eee top asynchronous ati attitude attribution aural abuse authentication authenticity automake automarker avatars awesome b43 backtrack3 backyard bounty bad bagel bandwidth banjo banks barbarians barefoot baseball bathroom beaches beautiful bed bees beetles being belief bellaqua benedict cumberbatch berlin bertrand russell bill gates biofabrication biology biometrics bit rot bitcoin black and white blame blockbuster bloomberg blue board games bohemian bold bon thé place bonds border boredom botany boxing day boy brain scoop brickworks broadcom broccoli browsing bubbles bubbly buildings bunnies burn bus stops butterflies buttons c# c++ cafe calendaring calligraphy camel camera obscura cameras canopy capitalism captivity careless caring cast causality cbc cedar row cello censorship certainty cgi chalk challenger changing locks chaos theory charm cherry blossoms chickadee chickens chivalry choir chopsticks chores christchurch christianity chudan church cijf cinnamon classes clif clorox clorox green works cloud cloud atlas clubs cname coca cola codeine codeviz coincidence coins color comfort commons communism competence competition competitive coughing completeness compliments conference configuration conflicted confusion consciousness consent conservatives conservativism console construction contagion contest contributing convenience corpses cough suppressants coughing coupons courageous crashes crates crayons crazy creative commons criminals crisps criticism crosscanada crowd crtc cry crying cryptic cryptozoology csh cuddles cult currency current tv curse customer service customisation cvs daily grind data data mining databases dating david bowie dconf debate debug symbols debugging delicious design patterns desktop desktop summit destiny detachment dftba diet difficult digimon digital receipts disabilities disappointment discordianism dispute dissection kit distraction diyode dnf doctor who doctors documentation dokuwiki doubt doughnut dpkg drab drano drano prevention dream dreaming drinking drm drowning dryers dtwydt ducks dvds dying dynamic typing ease easter easy ebony jewelwing ebooks ecards economics editors eeetop el paso elder neglect electronic receipts elements elitism ellen page embarrassment emily graslie emptiness empty enchant end of enterprising environmental science symposium eog epiphany eplugin equipment essentialism ether euphoria evoaqua experiment experimenting expertise extensions extortion facades faith falafel familiarity fan fancy fantasy fascism faun favicon fears fedora 11 feed me feedback festival fibonacci fiction fiddler crab field guide field identification figment figures of speech file formats finances fire fish fitness fixing flac flash light flesherton fling flexibility flour flow flying fonts footprints forceps forgottotagit fork fortunate fortune found fragaria frameworks fraud fred penner free time freezing french fries fresh friday friend's wedding frog fspot funding funerals funny fury fuse gargoyles gdb geek geeks gf3 gi gifts gio gjs glass globalnewtgames glory gloves glue gluten gm gmo gnome keyring gnome software gnome-control-center go ninja go go transit goat gods goodbye goodfella's google books google wallet gp2x gqe grad graffiti grammar graphing graphviz grass green beaver grey county groceries growing up gtest gtg guts gypsies habit hal halls hard hard drive hard drives hardship hardware harry potter hdtv heart heart break heaven 17 hemlock grove hewlett packard hijinx hiking hoaxes hobbies holidays homelessness homework honey badgers honour horatio hornblower horror hostels hosting hot house of cards hp lovecraft hugs humblebundle humbleness hunting hyperlinking hyrule i am a carpet ibm thinkpad x41 icalendar ice cream sandwich ice rain icthyology ignorant ill image image editing imagination impermanence inadequacy inaturalist inconvenience independence india individuals industry infinity ingrid michaelson inhumanity injuries ink innovation insects instagram installation intel intellectual property interactivity interlocutor internet tv invertabrates io irish irony isolation it it is indigo james bond jedi jikiden joke journalism journey judgement julian assange julie thiel justice kata kayak keys ki-ai killme kim taylor kinder kindness kirby kitchen kiva knights knots kodak koodo kung fu labels landau sacamoto late laundromat led legend lending lenovo lessons letstrace letter writing liberalism liberals libnotify libreoffice librpm lifehacker lilo limericks limits linksys liquid lists live wallpapers livecd liveusb loans local local food local install login london losher lots of hugs mac mini machine learning machine vision madness mae magic school bus magical maintainership majesty malaria malls mantis shrimp marine life marketing marking massages matrices maturation may seminar meat media medicine mel's diner memory leaks mental health meow mercy metacity metaphor methodology mezzo forte micropayments mild mild weather military milk mindhacks minimalism misanthropy miscellany misery misfortune missed the boat missing mlp modelling moisture mold molly parker monitors monologue more cats mosquitoes moss mother's day mounting mouse moxies muffin muffinfilms mundane murder museum mushishi mushroom soup mushrooms musicals mutual funds my slumbering heart mysql nameservers nanowrimo national treasure natural language processing naturalism nausicaa navigating necessity neighbours nervous netgear network new new users newspaper hat next year ninja turtles nodelist nointernet noise noisy nominate non-root norse noses not really dying notebooks notification-daemon novels november fair nuclear war numbers numix obama obligation obliviousness obscure ocz ogg oggenc olap olive omote open formats open music openness openoffice optimisation optimism orcas orchestra oreo oreos org-mode origami oscar otr overheat owen sound package management packagekit packing paint shedding pan pancakes panda parallelism paranoia passport patents patience pattern recognition pdo peace peaceful pen pence pender penguins penmanship perfection pet rocks physical piano pickman's model picnik pidgin plugins pikmin pintsize pipelight pirate festival pizza hut plagiarism planning plans playground playlists plumbing plushies podcast poem poetry points pokemon pomplamoose positions posse post posters postmodernism potatoes potlucks power ppc practise prejudice premier pressure pretty pride and prejudice priorities private processes professionalism projects promise protest proud purchases qt quarantine rad radeon railroad randall munroe raop rats reagan recursion recycling redhat reductionism refactoring refrigerators regret relativism release renew renfrew repetition report resolutions resolve resumes reuse reuters reviews revolution rhino rhps ricola risk road trips roar robots rockwood rot rover rtm ruby day ryu safety sanctuary sand satisfaction savages scary movies scheduling schneier scholarships scooters scp screenshots script seals search secret world of arrietty secrets seitei self-interest self-respect self-sufficiency self-worth semesters senescence sessions setbuilder settlers of catan sftp shame sheepo pistachio sheila patek shell shells sherlock holmes shipping shogun shotwell shoulder bag sigh sim city simafort simpsons sincerity singing sjr skill skunks sky slackware slashdot sliver small smiling snails snowboarding soccer social dance social media socis soft solemn someonesmotherwantstoadoptme song sony sophistication sorbet sorrow sparklers speed river spell spellchecking spelling spies spilt milk splendid splendor splinter spoilers sql squaresville sr ssd sshd stanley park starry night starving steampunk storage strawberries strength structured information struggle stuff stylus suburi sucks sugar super mario super mario land 3d superiority superstition surprise surreal sushi surrender swings systemd systems tabs tachi uchi no kurai tail coats tameshigiri tarot taxes tears technocracy teddy bears tedtalk term termcap terror the duke the fault in our stars the hulk the human league the irregular at magic high school the onion theatre theory thingsidon'twanttodo tim berners-lee tim mcgraw timber timbre timeliness tin tin toaster todo toilets tolerance tonight toomuch touch screen touchpack tour tourniquet toys trac trailer translation travel buddy treestyle view trex triumf triumph trivia trouble tweak twist tx2500 tx2617 typing ugly logos umbrellas un dinaru underwold unemployment universe unlimited blade works updates upgrades uploading urban agriculture urban ecology urchins user experience vagrancy vagrant vague but exciting valadoc validation values vampires vanilla ice variety vegetables velvet burger verb version control vi vinegar violence voip vpnc vulnerable waf wandering wanting war warm weapons web hosting webcomic webcomics webfonts werewolves whales what a wonderful town whatsbetter whic are also lazer powered white spot wifi wii u wikisource will williams wings wisdom wishes wizardry wolf wonderland wordplay world cup world water day writing voice xenophobia xephyr xinput xkcd xpath yahoo yay yyz z-index

Blog Archive

About Me

My photo

I am aeronautical, vanship-style.  I am olympic and mythical.  I rest on my laurels.