2013-09-29
[General] Ebony Jewelwing
Labels: #General, #Photos, ebony jewelwing, friends, guelph, inaturalist, insects, naturalism, nature, photo
It actually did go onto my hand, and onto my shoulder, and then onto C's elbow. Hooray for iNaturalist for allowing us to ID it. I made my first observation after having an account for N years for N>3.
2013-09-28
[General] This is still what it means to be cool
A friend recently used the phrase "cool friends" and I was instantly fascinated by what that meant. I've realised that coolness can be relative to your context. In high school, it seemed to clearly mean to me the people that had the most social esteem. But since then, there are other qualities like being confident and independent and indifferent to others opinions, to remain calm under pressure, to be your own person, to have interesting interests.
Am I cool? Some people tell me that, but they're deluded by my additional years of life. I think a bunch of friends are cool. My one friend is exacting and confident independent of people, and has keen interests and is a doctor. Another friend seems really cool, who runs with wolves and canoes and dances, and runs through the wilderness, and, well, is a wolf. Another friend is a philosopher and mines the depths of thought and feeling to interpret reality. I know a few open source developers who are exceedingly competent and fun and they're really cool. I know a hippy who left to travel India and live with poor people and that's super cool, too.
Coolness is weird. It's quite diverse to me now (though there's an obvious common thread) and it's based less on specific interests (OMG YOU SWING A REAL SWORD?!) and it's way less connected to social behaviour. I now have a ridiculous amount of 'friends' on campus, but that really doesn't make me cool. Several people on the list are pretty quiet and maybe a little awkward, but they're definitely cool.
I like how this concept changes between people, and goes beyond the social hierarchy found in public schools. It also isn't dedicated to trend-setting musicians or edge game consoles. I think to me it involves the amount of meaning I can perceive in someone's being, actions, etc. I have more thoughts, but now I sleep.
2013-09-27
[Microblog] Transient Pleasures
2013-09-26
[Microblog] Transient Thought
2013-09-25
[GNOME] Final Report for GXml in the 2013 Google Summer of Code
- the autotools build system has improved
- documentation is more complete and more accurate
- many new examples across most classes, especially for C and JavaScript
- many bugs were flushed out and fixed (e.g. attribute syncing between underlying libxml2 xmlNodes and GXmlElements)
- it has a mailing list (gxml-list@gnome.org)
- new stuff
- document child management, node cloning
- new memory tests
- new error handling model
- new memory handling model (fixing leaks and improving performance!)
- improved API compliance
- bug-fix release (0.3.2) without API breaks
- imminent 0.4.0 with API breaks (pending some updated patches for XPath, Serialization, etc)
Look forward to 0.4.0 imminently, and happy hacking.
GXml's performance versus pure libxml2
One question people have had is the difference in performance between libxml2 and GXml, since GXml currently wraps it. Things should be worse, as there's typically more code for each operation, but how large will the penalty be and will it matter for you?Tests
I created a simple test suite with the four following tasks:- loading a file from disk
- loading a file from memory
- stringifying a document
- saving a document to disk
Environment
I've run it on a Lenovo ThinkPad Twist S230u with the following configuration
- Intel® Core™ i5-3317U CPU @ 1.70GHz × 4
- 4GB RAM, SODIMM DDR3 Synchronous 1333 MHz (0,8 ns)
- 500GB HD @ 5400 RPM (HGST HTS725050A7)
- /home, including test files
- 24GB SSD (Samsung MZMPA024)
- everything outside of /home, including libraries
- Fedora 19, x86_64
- libxml2-2.9.1-1.fc19
- GXml from git HEAD
Test Data
The test data was based on my updateinfo.xml files from yum, in particular the one found at: /var/cache/yum/x86_64/19/updates/gen/updateinfo.xml. It contained 98743 different nodes over 11,136kB. I created smaller and larger versions of it, resulting inname | nodes | size (kB) |
---|---|---|
test3.xml | 22 276 | 2 784 |
test4.xml | 47 707 | 5 568 |
test5.xml | 98 743 | 11 136 |
test6.xml | 197 484 | 22 268 |
test7.xml | 394 966 | 44 536 |
Measurements
Three values were measured. One was time taken to complete a task (like load a file), using g_get_monotonic_time, which reports in microseconds. One was memory used by the task after it completed, using mallinfo, in particular the uordblks field (total allocated space), and one was memory leaks (also using mallinfo, after we freed memory).Procedure
I ran the tests once averaged over 10 trials for each combination of test and file, and then again over 25 trials. Ways the procedure could be improved includes better isolation on the system from other processes, or providing more detail than the averaged scores, so we can detect any exceptional anomalies (e.g. some other process causes a file load to be delayed by hogging I/O).Results
Keep in mind that GXml wraps libxml2 for most functionality, so we don't expect it to be faster than libxml2, rather we want to see what penalty a GObject wrapper (written in Vala) causes.Memory Leaks
GXml was leaking memory like a sieve before the summer. (0.3.2 includes memory leak fixes without the API breaks!), so I wanted to know what memory was left after these tasks from both libxml2 and GXml. Luckily, neither had any in the cases tested. (That does not mean there aren't any! Kudos to those who find them (and more to do who patch them)).Results
data | libxml2 | gxml | diff | ||
---|---|---|---|---|---|
load disk | |||||
memory | |||||
test3.xml | 20814019 | 23667584 | 1,1371 | ||
test4.xml | 42604277 | 48477152 | 1,1378 | ||
test5.xml | 86151738 | 98065217 | 1,1383 | ||
test6.xml | 172261657 | 196126066 | 1,1385 | ||
test7.xml | 344483559 | 392241280 | 1,1386 | ||
time | |||||
test3.xml | 37547 | 56513 | 1,5051 | ||
test4.xml | 66747 | 63797 | 0,9558 | ||
test5.xml | 144234 | 161024 | 1,1164 | ||
test6.xml | 284488 | 287911 | 1,0120 | ||
test7.xml | 561406 | 564904 | 1,0062 | ||
load mem | |||||
memory | |||||
test3.xml | 24988568 | 28866015 | 1,1552 | ||
test4.xml | 51434229 | 59523841 | 1,1573 | ||
test5.xml | 104192043 | 120665588 | 1,1581 | ||
test6.xml | 208356730 | 241330737 | 1,1583 | ||
test7.xml | 343791009 | 391564027 | 1,1390 | ||
time | |||||
test3.xml | 44199 | 53860 | 1,2186 | ||
test4.xml | 84215 | 71695 | 0,8513 | ||
test5.xml | 172920 | 184735 | 1,0683 | ||
test6.xml | 347157 | 359909 | 1,0367 | ||
test7.xml | 572627 | 555519 | 0,9701 | ||
save | |||||
time | |||||
test3.xml | 25610 | 24513 | 0,9572 | ||
test4.xml | 52908 | 49175 | 0,9294 | ||
test5.xml | 96449 | 98308 | 1,0193 | ||
test6.xml | 192197 | 196295 | 1,0213 | ||
test7.xml | 384343 | 395194 | 1,0282 | ||
stringify | |||||
memory | |||||
test3.xml | 2735339 | 3136192 | 1,1465 | ||
test4.xml | 5696496 | 6287776 | 1,1038 | ||
test5.xml | 11394656 | 12592800 | 1,1051 | ||
test6.xml | 22789264 | 25185552 | 1,1051 | ||
time | |||||
test3.xml | 22873 | 26749 | 1,1695 | ||
test4.xml | 46166 | 54537 | 1,1813 | ||
test5.xml | 93205 | 111312 | 1,1943 | ||
test6.xml | 198988 | 235645 | 1,1842 | ||
Discussion
loading documents from diskWhen it comes to loading a file from the disk, we compared xmlReadFile versus gxml_document_new_from_path (which uses xmlParseFile).
Memory usage differences are consistently ~14% higher.
Time-wise, on smaller files, GXml tasks up to 50% longer than using libxml2. I'm not sure why test4.xml is miraculously lower from this run. You can see that the larger the file, smaller the difference, which makes sense, since most of the hardwork is done by libxml2 anyway.
loading documents from memory
With memory, again, we see a consistent increase between ~14-16%.
Time-wise, again GXml oddly performs better on test4.xml. Elsewise, we see the same trend: there is little difference with larger files.
saving to disk
We don't report memory differences because GXml's save functionality cleans up its use of xmlSaveCtxt before it exits, so we can't (easily) see how much we used. Neither leak, so there is nothing to see there.
Time-wise, it seems to take about the same length of time, but GXml may be trending to more. This could be due to tasks like synchronising data that is initially stored just in GXmlNodes and needs to be copied into the xmlDoc of libxml2 to make it to disk.
stringification
Memory-wise, we typically see an increase of ~10-15%. Note that they failed to handle the stringification of the largest file, test7.xml, which requires further investigation. Stringification was done with xmlDocDumpFormatMemory.
Time-wise, the increase was ~16-20%.
Conclusion
Regarding memory usage, if you use GXml for cases such as these, you can expect around a 15% increase in memory usage. That makes sense, as GObjects are used instead of the light C structures libxml2 typically does. One benefit in hwrapping libxml2 is that we don't actually create a GXmlNode for every xmlNode in a document, only the ones we use, so a pure GObject implementation might use more memory.Regarding time usage, the difference for some operations is small, a couple percent, and for others, the difference is larger with smaller files, as big as 50% when loading a smaller file. Larger files in those cases (such as loading documents) see less and less of a penalty.
I feel as though for many common applications, these don't represent a significant penalty (time taken in loading large documents is still a few dozen milliseconds), and can be worth the benefits in using a GObject API.
Going forward
If you're interested in more about GXml's performance, the test suite will be in gxml/tests/performance/. Feel free to submit new tests and test files.Regarding GXml, HEAD will be pushed out in a new feature release including the API changes, fancy new features, and contributions from others, including Daniel Espinosa, Adam Ples, Simon Reimer, and others.
Cheerio!
2013-09-24
[Microblog] TARDIGRADES
Labels: #General, #Microblog, friends, fudge, invertabrates, science, tardigrades, zoology
[Microblog] TED Talk on biofabrication for leather (and food)
Labels: #General, #Microblog, biofabrication, meat in vitro, tedtalk, vegan, video
Andras Forgacs: Leather and meat without killing animals.
I look forward to this future. I appreciate that he doesn't need to elevate ethics as an argument above a mere undercurrent. The video is about 10 minutes long.
2013-09-21
[Microlog] Moon festivals
[General] Justifying confidence
The past two years I've been much bolder. I just try to DFTBA and trust in myself that I'm not quite repulsive to others, letting myself go places I couldn't before. I can express interest in joining in on trips and adventures, and I'm well received after all. Silly me.
The worst instruction to people who lack confidence is "be confident" because authentic states of minds need to be built from something real, they need justification. The best I can suggest is incrementally venture forth and try and don't worry about failing to the point of debilitation, because you've still gained something important if you fail, if you get rejected. You have feedback from the situation (even if it's not explicit or kind) and you can learn and adapt and try again. I think that's how you're supposed to 'find' yourself. I'm not sure you can just sit around thinking about it, actually trying seems the most efficient and effective way to learn. In a sense, nothing is sacred (except perhaps a cow but probably not), and there's enough in the world that if something doesn't work, there's something else you can pursue to fill your life with.
2013-09-17
[Technology] Mozilla removing certificates
[Microblog] Transient Troubles
2013-09-16
[General] Life
Iaido and jodo have been extra fun. We have some new members with the new year, and on Sunday, M and I had to teach since our sensei and sempai were away for a seminar in Peterborough, and we brought cookies.
I also went canoeing on Sunday morning with M, which was great. She's a 'professional' canoeist for a summer camp, a tripper. However, she still let me take the stern and practise my C and J strokes. I subsequently discovered that the section of the "Speed" river that passes my new place is actually the Eramosa river. We went outside the city limits, and we saw a beaver, ducks, and a heron! No turtles, today.
I attended a friend's birthday in Richmond Hill. It was at a pseudofancy restaurant, the type that has a dress code but where the food's just mediocre and the crowd is loud. I prefer Moxie's for that, because they somehow actually feel less pretentious (but then I fell for Moxie's years ago). It made me think about what my ideal birthday gathering would be like; a small group where we can all spend time together in a quiet place with some entertaining games (card, board, video) and fun food.
GSETA has started up again. I hope to not get too sucked in, time-wise, again, but it's been fun seeing friendly faces again.
My legs reached that part after cycling up hills where they start to burn and then suddenly feel cool, like, water has been poured all over them. I wonder what that phenomenon is.
I'm sitting in an Invertebrate Zoology class now with K and M. Right now I'm learning about gas exchange.
2013-09-14
[Microblog] Super annoying
I think web design has to accept at some point that we don't want to be the same person everywhere. I post different things to Blogger, to G+, to Facebook, etc., because I lead different lives in different places.
[Budo] Koryu
Some functional points I have to keep in mind
- start drawing the sword before pushing forward, or I'll die
- draw with my right hand angled upward, instead of holding the sword from the side
- draw towards their seigetsu (or eyes?)
- draw with jo-ha-kyū
- don't twist the saya for a horizontal cut, instead twist the sword at sayabiki
- flow into the cut and don't make rising into it two steps by stopping to flip toes; just make sure the left foot's toes are flipped and my body grounded before the sword hits
- for nukitsuke, cut across the chest
- for kiritsuke, stab behind your ear, but don't waste energy holding the tip up (let it sink back to nipple height, like after nukitsuke), but hold your hands up
- don't shift your left leg forward, but step and pull yourself forward with your right foot
- when doing chiburi, when you rise, bring your left foot up to meet your right, and watch down at teki
- right foot back, and do a slow noto, don't drop until the sword is half sheathed in the saya
- during noto, keep the tsuka aimed at teki
- after rising, take two steps back (left first) before letting your right hand come off the sword, and relaxing
We spent most of the class understanding the various parts by analysing possible variations.
- What happens if you rise forward before you start to draw? You reveal your intent and bring yourself into easy striking range for them.
- Where else other than the chest can you hit
- What happens if you draw towards their eyes with jo-ha-kyū? You make what's about to happen less obvious and threatening.
- What happens if you draw towards their seigetsu? If they try blocking you by grabbing your sword, you have a better chance of folding them in and drawing through them.
- What happens if someone is drawing at you?
- You can try to draw vertically and forward to cut their wrist
- You can draw with your angled to your tsuka from underneath to remove two inches of strikeable meat.
- You can often grab their tsuka and prevent their iaito from leaving their saya.
- You can help them draw their iaito by grabbing a bit from underneath while pressing the sharp end into them
- You can move forward as though you were striking, but use your tsuka to block their sword while you go for their head or face or throat
- You can move forward with your left leg forward, getting off the line, to get inside or outside their forward right leg, and use your hands to catch their tsuka and bicep (anticipating they'll draw)
- You can sit back so they'll miss on nukitsuke (presuming they were cutting at the expected target of you coming forward to cut them) and then slap their sword out of the way
- What happens if someone grabs your tsuka?
- You can adjust the direction you're drawing, perhaps circling your tsuka to break their grip.
- You can also shift backwards to create a new space in which to draw.
- What happens if someone is trying to catch your tsuka when you draw towards them?
- You can draw straight towards their seigetsu, breaking the power in their arms by folding them in
- You can draw the sword around you and to your side, so you can thrust it in
Some of my favourite pieces of advice included, when they're coming in to cut Mae, if you step forward matching their forward foot (they go right, you go left) and get off the line, the point at which you catch their arm and tsuka, it's not about your hands successfully catching it, it's about your arms presenting your hand area to those targets and first meeting and then wrapping into position.
One thing I really like about classes is that Taylor-sensei can go into mechanics of how things work the way they do physiologically. He's a strong man, and he can successfully demonstrate situations in which someone half his size can overpower him through angles and vectors of force.
2013-09-13
2013-09-12
[Microblog] Transient Terror
Richard Schwarting, olympic runner and master key finder.
2013-09-10
[Microblog] Transient Fire
[Microblog] Transient Thought
Labels: #General, #Microblog, broccoli, consumerism, coupons, food, vegetables
Coupons don't work for me. I want a coupon for like, broccoli. They don't have that. That's not a thing. If I wanted febreeze, the deal would be amazing, but instead I want broccoli.- my friend Nicole unwittingly articulating my feelings on coupons
2013-09-09
[Microblog] Transient Thought
"Racism: An adverse reaction to potential threats to your model of the world. Solution is to reconsider your model. e.g. Reconsider what English is."
[General] being oneself
Sometimes I worry too much about what another person I care about thinks. I found this note in my e-mail from a few weeks ago:
"don't worry about what _, _, _ or anyone else thinks. you're so close to just being you and being happy"
I vaguely remember the moment. I read sentimental encouragements like that periodically. I suppose at the time writing one felt useful. I'd like to feel that consistently, though.
But then the whole concept of being anybody at all, even yourself, is a weird one.
[General] Different things for different people at different poitns in different lives
Labels: #General, age, experience, learning, lessons, maturity, timeliness
Friends of mine had two main reactions to Brave. It was either progressive or antiquated, and I think that depended on their prior experience.
I run into things that aren't for me, not any more, or not yet, but I'm trying to remember that they can still be right for someone else, and still be a good thing.
2013-09-08
[General] Epic Spoiler
I saw this on my flight back from Newfoundland last week. I was almost going to watch Oblivion (sci-fi yayness?) but choosing to watch Epic, which I don't think I've even heard about before, was perhaps one of the best choices of my life.
It deals with living things on a small scale. I like lying on the grass and watching things tower above me. I like seeing tree branches layered, and bugs crawling on grass blades. (Hence my recent fascination at Pikmin 3 and the Secret World of Arrietty.)
One thought I had during it is that Epic better captures the spirit of Tolkien's conflict betwen elves and orcs better than the Lord of the Rings does. Of course, that depends on what you find the spirit to be; this seemed like a purer, silkier presentation of the same battle.
I also appreciate that it wasn't a war between nature and technology. I like those, but I've seen a lot of those, and technology gets vilified quite often. So many people hate Facebook (I have my own issues with it) but it's the most practical address book you can have these days.
My one qualm about Epic is that it glorifies beauty over ugliness. This seems super prevalent throughout the history of fantasy. Good things are aesthetically pleasing while bad things are distasteful. At some point I want ugly protagonists, without the quaint message that everyone is beautiful. I want it to be OK to be ugly. I want ugly people to be cast with ugly actors. I want to not read things in terms of ugly and beautiful.
The movement and physics were delightful and my heart sung from the start. I like watching birds (binoculars are coming up after a good camera on my list of future acquisitions), and I like the grace with which these tiny people moved, as well as the appropriately different physics given the scale. The water's behaviour made me grin like an idiot.
Also, as normal, I cried during touching family moments. Sigh.
2013-09-07
[Microblog] Transience
Cycled past a late night showing of Epic in someone's driveway for local kids. Stumbled upon the Guelph Jazz Festival, and entertained gate keepers with colour. Need to find more Wahooligans to celebrate life with.
[General] It's a small world after all
Labels: #General, art, epic, pikmin, secret world of arrietty, small, Studio Ghibli
[General] Sharing home
Thoughts. I often don't think that much in my daily routine. I used to eschew MP3 players because my walking time was some of my prime thinking time. I don't like my thoughts as much as I used to, though.
Flesherton is always grand. Idyllic is my constant word. I really did grow up in a world where you could reasonably be familiar with half the people in your area, and you had one person in common with anybody else. Relating to other people is different now, even just on my University campus, where every year a new influx of people arrive, new undergrads and grad students. So many transient friendships. So precious are the persistent ones.
Coming back to Flesherton, a common topic. I'm glad it's so great, to me. It wouldn't be without some key factors. My best friends' family. Some friends who stayed local. Slow change of businesses. The fast change of others.
I was thinking about scenery and nature and the wild and outdoors. I remember being so mesmerised by the walking paths behind my house, behind my school. Sometimes in Guelph I have a sense that they're too small, too synthetic. You walk them once and there's not much left to enjoy a second time. It's not really true, it's just a desperate attitude clinging for new meaning in the wrong places. Coming back to Flesherton helps remind me of that. 16 years embedded in the area, revisiting the same trees near daily. I find it weird, how little I respect new trees elsewhere.
I regret not taking more friends home to see my world. I suppose I'm a little embarrassed by the state of my childhood home: it's not quite the charming country home I think my friend's would expect. Renovations are a big priority for me. I don't really get insecure or self-conscious about a lot of things; mostly just things tied to my youth, when there wasn't a thing I wasn't insecure about.
However, I still want them to come see. I think my friend P would be charmed by it, given her recent interests. I regret never taking some past visitors on intended walks through the snow buried Flesherton Hills, one of my greatest failures in life (which I suppose means that I'm doing better than I'd have expected). I am amazed at how content I am with my introverted youth, despite being quite different than I am now.
Good bye.
2013-09-05
Labels
Blog Archive
-
▼
2013
(218)
-
▼
September
(28)
- [General] Ebony Jewelwing
- [General] This is still what it means to be cool
- [Microblog] Transient Pleasures
- [Microblog] Transient Thought
- [GNOME] Final Report for GXml in the 2013 Google S...
- [Microblog] TARDIGRADES
- [Microblog] TED Talk on biofabrication for leather...
- [Microlog] Moon festivals
- [General] Justifying confidence
- [Technology] Mozilla removing certificates
- [Microblog] Transient Troubles
- [General] Life
- [Microblog] Transient Magic
- [Microblog] Super annoying
- [Budo] Koryu
- [Microblog] Transient Temperature
- [Microblog] Transient Terror
- [Microblog] Transient Fire
- [Microblog] Transient Thought
- [Microblog] Transient Thought
- [General] being oneself
- [General] Different things for different people at...
- [Photos] new friend
- [General] Epic Spoiler
- [Microblog] Transience
- [General] It's a small world after all
- [General] Sharing home
- [Microblog] Transient Thought
-
▼
September
(28)