Friday, July 29, 2011

Right, I have lost all respect for Microsoft

After recently reformatting the Windows NT box (I tend to every year or two), I did install Visual C++ 2010 Express Edition out of my ISO for the whole show. Well, finally I got around to opening a project file (after generating it with premake4 ofc). Running off the default settings, I went ahead and compiled, then I ende dup standing here "WTF, where is the button to clean gone?"

Then I clicked on the thing to enable "Expert" settings and was elightened. I don't know if it is just beause it's the Express Edition rather than the Professional Edition or something, but I just lost my last tread of respect for Microsoft—I used to think they knew how to make development tools.


Eh, that reminds me, if anyone holds there breath waiting on C99 support in the C-aware portion, you'll die.

Monday, July 25, 2011

the Canadian Phenomenon

Somehow, whenever my brain gets so heavily infused with thoughts about this one particular girl in Canada, my coding aptitutde seems to increase... algorithms fall into place. It's almost like hack mode with a smile, and I can't explain it :-S.


Sigh, another slice of the universe that makes no sense yet \o/
Great way to start off the work day: a headache and occasional spells of vertigo. Oi. If this impacts my coding, I shalt be pissed.

Sunday, July 24, 2011

Corky - the parrot

Before dinner, ma came in and gave the dogs some lettuce, well for one reason or another, Corky decided to leap on my pillow and basically roost himself on my shoulder :-/.



Hmm, bash_completion REALLY slows down the shell


On dixie, I generally used zsh, but have been using bash on alice, since that's what I use at work. On the other hand, while zsh is _so_ big, I could never expect it to be fast, on alice, I find that opening a new shell takes irksomely long.

Tests: (avg m:ss reported by GNU time -v)

	-bash:
		no profile, no completion	= avg 0:00.01
		with profile, no completion	= avg 0.00.10
		no profile, with completion	= avg 0:01.16
		with profile, with completion	= avg 0.01.27
	-dash:
		no profile                  	= avg 0.00.00 # to fast to be timed?; highest was 0:00.03
		with profile                	= avg 0.00.08


Ok, so maybe an Atom based netbook isn't as powerful as a server with multiple quad core Xeons but that is still a rather big difference. No wonder though—on alice, /etc/bash_completion is 1700 lines and /etc/bash_completion.d contains over 25,000 lines of scripts to source.

My shell profile only adds like 700 lines of code when run on Linux. Although zsh really made me appreciate context-sensitive tab completion, the only interest I have with it in bash, is pretty much for git.

Hmmm...

Ugh, thanks for the leap...

Hooked up Alice to the big screen after getting off the couch tonight. Want to wrapping up some stuff—I kind of miss having a working pager in my panel. So I blocked off the door to keep Corky from coming in and pissing on the bed before I got done. Well guess what? The Parental Unit comes barreling in, complaining about the door being shut off.


I may have gotten a solid WTF!? Leap out of that, but at least I can laydown and __NOT__ have a wet fucking pillow!!!!!! I am thinking of making a door-barricade the SOP.

This is a deplate of my Viki notes file on XRandR


1.1 Querying information



This was taken  with my ASUS 1015PE Netbook (Alice) hooked up to my LG
wide screen at home on 2011-07-23.



$ xrandr -q

Screen 0: minimum 320 x 200, current 2944 x 1080, maximum 4096 x 4096

LVDS1 connected 1024x600+1920+0 (normal left inverted right x axis y axis) 220mm x 129mm

   1024x600       60.0*+

   800x600        60.3     56.2 

   640x480        59.9 

VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm

   1920x1080      60.0*+

   1680x1050      60.0 

   1280x1024      75.0     60.0 

   1152x864       75.0 

   1024x768       75.1     60.0 

   800x600        75.0     60.3 

   640x480        75.0     60.0 

   720x400        70.1 

$




LVDS1 is Alice’s display. VGA1 is the monitor hooked up to the VGA
port on the side.





1.2 Positioning monitors




       
  • xrandr –output M1 –left-of M2 :: M1 is left of M2
  •    
  • xrandr –output M1 –right-of M2 :: M1 is right of M2
  • xrandr –output M1 –above M2 :: M1 is above M2
  • xrandr –output M1 –below M2 :: M1 is below M2
  • xrandr –output M1 –same-as M2 :: M1 and M2 mirror each other.



Where M1 and M2 are the short names given from xrandr -q. I assume that



    $ xrandr --output M1 --left-of M2 --output M2 --right-of M1




Is permitted, +/- using two xrandr commands for it, as well as being
redundant.





1.3 Setting monitor resolutions




    $ xrandr --output NAME --mode SIZExSIZE




Sets the monitor NAME to the given mode.





1.4 Turning monitors on and off





1.4.1 On




    $ xrandr --output WHICH --mode 1024x768






1.4.2 Off




    $ xrandr --output WHICH --off




Rapid fire shell coding :-)

Well, since Friday night, I have been pretty steadily working on my ~/.sh infrastructure. I started by hooking up alice to sal1600's monitor (22"), keyboard, and rat. Since I rather distaste how the GNOME/Ubuntu has been acting late: I also took the libtery of adding my xmonad.hs file to git, then ditching GNOME for a pure XMonad session. As I use programs that need a system tray to really be useful enough to me (e.g. pidgin), I'm using fbpanel: good old staple.

For a little while I experimented with making the inactive windows transparent, this works pretty great, but rather interfers with my custom xterm wrapper script that sets my terminals ocupacy: the propteries set by transset-df get lost :-(. Looked at some other terminal emulators supporting transparency, besides gnome-terminal and rxvt-unicode. Sakura seems to be the best bet, and evilvte almost excellence (better to compile from source then using the .deb). In the end, I just switched off the fancy effects, since most of the time I am using a terminal or reading text anyway.

Next up was figuring out how to use XRandR to manually configure my displays. Better still, I wanted to extend my ~/.sh and X session infrastructure to auto-magically configure itself to Do What I Want when I launch a session when hooked up to an external monitor. For architecture and convience, it can also be run as a shell script, thus supporting a sort of hot plugging. So right now, if I hook up to say my 22" widescreen and let alice do it's magic configuration: after I login, I will be working off the big screen, so I can ignore the 10.1" little one :-). This isn't without a few warts though, namely if I go hotpluggy with it, fbpanel needs to be restarted in order to render on the new primary display (I just switch off the netbooks display), and pidgin becomes confused on where to render notifications (oi) with how it's setup in the default Ubuntux way. Oh, and hardware issue being that the touch pad makes the cursor jiggly should I close the lid lol. The performance is also noticably slower on 1980x1080 but works very snappy. I really am inpressed with this sweet little ASUS.


I then pretty much went about refactoring bits and pieces of my `sh services environment`, going so far as to create a GNUmakefile that I can use to help set things up whenever rigging a clone on a new install. Being lazy, I also finally moved ~/sw/sh from Dropbox to git. Generally I use bin for local binaries, sh for portable scripts, and sh.local for things specific to the system. Usually odds and ends that reflect a very specific setup.

Over a dozen commits later, I like the result pretty well. The only problem is, the difference between the 20" screen at work and this 22" screen, I now have so much screen realestate that I don't know what to do with it LOL. In Windows, most of it just goes to waste for want of XMonad.

Wow, I really don't like the new Blogger editor; although I must admit it does really look better—just feels to much like a file in Google Documents, and overly white lol.

Hmm, me likes using my little blogit script, and getting to write my posts in Vi IMproved :-).

Tuesday, July 19, 2011

Never tru$t family

My financial matters are subject to my income, or should we say, fairly fixed income as I make a Salary. Things are pretty much silced in such a way that I have a savings buffer, an income buffer, and a budget allocation that keeps a tab on the expenses and prevents there being nothing left for a rainy day, when the budget isn't applicable. If my expense calculations weren't done the way I do it, I would probably be bankrupt within two years, thanks to my mother's way of doing it.

Ma overspent her budget for May, so I deducted the overture from her June budget. Well she then blew threw more than a full June budget in rapid order, let along what she was given to work with. That was the first pay cycle in June. Since living with next to nothing for the end of June wasn't good enough for her, I advanced her money out of my savings: by giving her the equal of what she could draw, until my payday this cycle, under the strict terms that in order to rebalance the equation against what she overspent, she would have to draw NO more than that until this pay cycles payday, come hell or high water.

Well guess what the fuck? She has almost spent her entire budget for this pay cheque before the week I even get paid. Which in effect robs my budget in order to appease her. Most of that she pissed away on non-essential matters. Now she is getting pissy that I will not bow down and suck her toes, sprouting monies out of my ass on demand, since she now needs more cash. I say fuck off bitch. Here is an economics tip: if you have 90% health, medkits heal 25%, and it's the start of the level, only a retarded monkey uses the medkit before later. I will not keep advancing her money until such point, that my income is negative. When she has already been drawing on future pay cycles, I really am not inclined to comply! You live with what you can afford, or you live with what credit I extend you.

If you rob Peter to pay Paul, you eventually must pay Paul back. Otherwise you spring load yourself (or in this case, me) into a rolling debtzilla. If you slurp up future budgets, you eventually have to pay it back or find new sources of fundulation to cover your overature. Her budget for food alone is sizable enough that we could eat out almost every fucking day of the month, so I believe that is certainly ENOUGH of a budget for two people to eat on at home.


She even had the balls to suggest I ask my boss if I could take off work early on payday, in order to take her shopping. I told her if she wanted that, to sort it with my team leader herself, or to fuck off. So what if I sometimes work a bit late? That doesn't give her a right to drag me out of work.


So far I see two options: fire her from spending any money of mine and therefore remove her budget totally, or force her very strictly to follow it with the mentality that we can rot in the street naked before she is allowed to extricate more cash, until either she learns Basic Economics, increases her income, or my fixed income goes up.


My tolerance for stupid people goes down rapidly when they are Mean Bitches On Wheels. Some how, I can't help but remember my friend telling me naively, that my mother should be "Nicer" to me if she wants more money. I'm certainly not inclined to extend my mother any more credit.

Saturday, July 16, 2011

The virture of little sleep

I'm glad that I woke up like 0300 - it's 6 hours later and my mother is already raining all over my code.

Grrr!!!

So much for being nice

My mother's puppy, Corky, just showed me the point of being nice to trouble.

So I'm sitting here, writing some code, when Willow starts liking my face/hands; ugh that's hard to type when she goes after my fingers. So after a bit I got up to wash off the dog slobber. While Willow was licking my face, Corky lept on the bed as he usually does in the morning, and curled up to nap.

Being nice since he hadn't done any harm lately, I petted him politely and decided to take a morning leak while I was up. Well guess what? The little son of a bitch decided to do the same, exact thing—only he used my pillow instead of the potty papers. My new official threat is no longer to sit on his head, rather it is if there is ever a zombie apocalypse, he is going to be used as a food source!


If he had pissed on alice (my netbook), he would have officially made THE LIST. Good thing I put it on the stand by the bed, instead of leaving it on the bed, as I usually do....

Thursday, July 14, 2011

Loving it!

Lately, I've been using my netbooks ability to go into suspend and hibernate a lot. To be honest, I've never had much use for it int he past: Dixie was usually on battery whenever it was idle, and under most *nix operating systems, there were problems getting it to resume (FreeBSD 6.0-8.1), or the touchpad would stop working (Linux 2.6). With Alice however it works perfectly, aside from the display will sometimes stay blanked on resume from suspend to RAM (sleep) mode. It has happened once in a few hundred sleeps. That however, I can fix by manually manipulating /sys/power/state to put the system back to sleep, then wake it again. Yes, I don't reboot a lot.

At one point, I had Alice running for nearly two or three weeks non stop, before I finally forgot to plug it in on sleep mode lol. Right now, since there are often longer stretches after work where I don't get back to the system, I will usually put it into hibernate mode and throw it in my backpack. It's actually faster to resume from hibernate, than load a fresh session >_>.


Something that I have also noticed as a side effect of my new shell/x profile setup, is with how I do services, if I boot the system when there is no network available, like at a red light, then when I return home and come out of suspend: the shell scripts will detect that I've gone from no-network to connecting to my wifi, which means launching my "services" profile :-).

Thursday, July 7, 2011

Walmart engineering quality

So awesome that they can't even manufacture 0,5l water bottles that are straight!

Wednesday, July 6, 2011

Winning at simple economics

Generally when I make any kind of important calculations, I do it three ply:


  1. worst case is ...

  2. probable case is more like ...

  3. ideal/best case to hope for is ...



In my present financial calculations towards vacation and future operations, the notes are looking like the probable case is beginning to surpass my original best case by a wide margin, and the worst case was already above minimal requirements with a small margin for error. I'm kind of a pessimistic optimist, or an optimistic pessimist. Never could figure out which.

To top it off, my equations generally anticipate sudden "Expense bulges", courtesy of parental unit, explosions, error, and unforeseen Murphysters. That generally reflects a sum greater than what the worst case looks like, or at least most of the time. Perhaps it's growing up without even an allowance, or being used to things being tight, but I generally succeed at managing my cash flow. Even in a game like Killing Floor, where you need to spend plenty to survive the waves of zombies, I'm a frugal son of a bitch.


All I need fear is Murhpy's CF—or someone could steal my mayo jar!
I think, I just reached a new level of insanity but in a very happy way :-/

Tuesday, July 5, 2011

I should have known this would happen...

A few minutes ago ma came in and told me to turn around, and what did I see? But Willow making her self at home on a pillow. Ma made too much ruckus and she moved but of course, sheepishly had to get back there... so I snuck a pic, hehe.







Ironically this was a NEW pillow I bought a few months ago, until my mothers puppy, Corky, pissed on it. It recently got thrown over there to get it out of the way.

Sunday, July 3, 2011

Hmm, my ~/sw/sh/blogit script really should be adjusted to deal with labelling posts.

IPv4 still in use well into the late 22nd century?

This teaser for the new Aliens: Colonial Marines game, just happens to say it all. not the date and IP address on the computer screen. Happily, command line interfaces are still in use, hehehehe.



Personally, I kind of hope that someday in the far-far future, that the Internet will span the galaxy using some sort of technology much like BattleTech's HyperPluse Generator, instead of becoming a collection of disparate planetary networks.

Using vim, emacs, or your favourite editor to update Blogger and Facebook

I've rigged up a little script that invokes $EDITOR (vim for me) on an HTML file, and then posts the result of the buffer to Blogger like so:

$ google blogger post --title {subject} --src {file name}


And then in turn posts a note like this on my Facebook:

$ fbcmd feednote "Blogger post: {subject}" "I've posted a new journal entry <a href="{url of blogger post here}">here</a>"


Since supplying a file to `google blogger post --src` uses the file name for the --title/subject by default, I've yet to.

I'm too lazy to fully-compatibly figure out Blogger shrinks the first part of a post, down to a unique in the month set of <= 40 characters of text, s/ /-/, and stripping punctuation. Maybe if my mother wasn't on the war path, I would check into googlecl further for a way to modify this behaviour.

edit: check the repo of my ~/ and dot files on github, for a copy of the script. Currently in repo terry as sw/sh/blogit.

tmpfile

Testing to see if `google blogger post --src tmpfile` posts the file contents or the file name to my blog.

Saturday, July 2, 2011

Well, give or take nearly getting into a wreck because ma needed to hit Burger King, today has been a fairly productive day and it's only half done. Was able to get down to the postal facility ~10 minutes away and turn in the application for my passport. With luck I should be able to start booking stuff in a few weeks if financial issues go according to estimates, well, suitably so. It's kind of my nature to plan a triade: worst case, probable, and best case, and operate accordingly between the worst and probable cases. But I am very glad that the passport is about done, even if it took weeks for a Saturday appointment lol.

The sad thing, is I'm enjoying the new A Nightmare on Elm Street, and I can't even remember much of the original! I've had some horrible dreams in my time, usually I enjoy them, but I think I would worry if I woke up with claw marks >_>. So far though, it's quite good, as long as there are no weak stomachs involved, hehehehehe.