Updates from February, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • Dark Liquid 5:34 pm on February 24, 2009 Permalink | Reply
    Tags: liquid, ,   

    Accessing Context in Liquid Drops 

    Have you ever thought it would be nice to be able to access the context from within a custom Liquid::Drop when using the Liquid template system?

    Turns out, you can.

    On Drops there is a method ‘context=’ which gets set by the parser when it comes across a Drop object. From within the drop, all you need to do is access the @context variable and you’re away.

    Why this isn’t advertised more is beyond me, or maybe I’m just an idiot and missed it, but I couldn’t see how to do this at all until I decided to sit down and essentially try and write it myself and delved into the code in Liquid that deals with processing variables. Turns out it’s already there and it works a charm. Nice for writing Drops that behave differently in different contexts, depending on register settings and the like.

    Anyway, I thought it was useful, hope this helps someone else before they pull all their hair out.

     
    • Mike Larkin 3:37 pm on July 28, 2009 Permalink

      I was halfway bald when I found this. Thank you!!

    • Dark Liquid 3:41 pm on July 28, 2009 Permalink

      No problem, I know how you feel. Lack of documentation is the bane of my existence!

  • Dark Liquid 6:58 am on February 23, 2009 Permalink | Reply
    Tags: , dreams,   

    Dream 

    Normally, I don’t dream, or more accurately, I never remember my dreams. But last night, that changed.

    I had a really bizarre dream, the specifics of which I can’t remember but generally it involved a christmas party at my home (which wasn’t the flat but some kind of 70s style semi-detached house) and someone we invited ended up breaching our trust when Dru and I went out to get something by inviting tons of people we didn’t know, making a huge mess and pimping out our bedroom to these horny strangers she invited.

    I was so incredibly angry in the dream because I knew regardless of what she said, Dru and I would be the one to clean things up, plus we had a bunch of strangers in our home we didn’t trust.

    I kicked people out and yelled at everyone, then her Dad came to back her up and threatened me, not in a physical way, but a kind of warning of ‘you really want to do this?’ mode. I did want to do it, and somehow we ended up in a paint-fight (weirdos had been painting crap all over the bedroom walls while they were having sex on Dru and I’s bed).

    Eventually the dream ended up with me killing the kill and her Dad, setting it up to look like her Dad and sexually assaulted her (by faking evidence) and then burying the body of the girl and dumping the body of her Dad in a lake somewhere, as if he’d deliberately drowned himself for shame of “what he’d done”.

    After that, there was much cleaning and hunting down stolen items that strangers had taken when we kicked them out.

    It was all very odd and very disturbing, especially since I have only ever been as angry as I was in the dream once in real life, and then I had three people to hold be back when I wanted to go kill someone with rage. Maybe that’s the root of the dream – the fear of my own rage. I don’t really get angry any more, frustrated and annoyed sure, but angry isn’t something that really happens to me much any more and when it does, I hate it and feel really bad and sick about it. Maybe my brains just cleaning up some old issues I have while doing it’s nightly defrag and maintenance?

     
    • Devo 8:48 am on February 23, 2009 Permalink

      Woah, that is messed up. o.o

  • Dark Liquid 10:54 am on February 4, 2009 Permalink | Reply
    Tags: memes   

    25 Things Meme (reposted from facebook) 

    Well, the meme bug has bitten again! But this time it’s 25 things instead of seven. Here we go…

    1) I’m an avid Linux user and have been since Redhat 4.2, which I think was released in ’96
    2) I can bring my arms from in front of me to behind me without parting my hands
    3) I did beastly things as a child, such as turning lawnmowers upside down and throwing frogs at the whirring blades.
    4) I also used to make elaborate snail races and obstacle courses. How did I make the snails compete? Salt for the track markings.
    5) I find extreme amounts of fictional gore hilarious
    6) I’ve been playing roleplays for quite a long time too. I play D&D mostly but find I enjoy White Wolf’s offerings much more and rather enjoy Shadowrun too.
    7) I’m incredibly lazy, though I prefer to think of myself as ‘efficient’, littlest effort, maximum gain and all that. 8) I can’t remember a thing. People, places, events, what I was talking about in the middle of a conversation. I’m terrible, what am I writing about again?
    9) I’m normally very hard to rile up, being the embodiment of calm.
    10) During a rather nasty incident, I kicked and door and damaged the hinges in blind rage while trying to get to someone so I could kill them. Two people needed to hold me back.
    11) The same incident involved me and some others running away from home, but it lasted all of an hour or so before one my fellow runaways got hungry. It turns out people at gas stations get concerned about a bunch of children turning up at 3am.
    12) I’m messy and my desk looks like a landslide of paper.
    13) Ironically, despite my messiness I really like minimalism.
    14) I can digest metal and glass
    15) I have 2 more ribs than most people.
    16) I once cracked my head open on a rocking horse when I was a kid and still have the scar.
    17) My long hair and beard are mostly the result of the aforementioned laziness rather than a concerted effort to look this way.
    18) I have size 13.5 feet, quite narrow and can’t wear anything but boots because anything else always seems to cut up my feet.
    19) When I don’t wash I think my armpits sometimes smell like ham and pineapple pizza.
    20) I love meat. I love it so much I once tried making a meat-shake. Word of advice – don’t try that, ever, you will not enjoy it. It comes out much the way it goes in – through the mouth and lumpy.
    21) While on a caffeine high, I once swung a shopping trolley around my head while sprinting down the road.
    22) I think I’m an incredibly boring person and always find these lists incredibly difficult to populate.
    23) I hate travelling or going anywhere. I don’t really feel much benefit from paying to go somewhere and see something, I nearly always happier to see pictures on the computer for free.
    24) Before I got into computing, I wanted to be a psychologist but a teacher told me not to bother because it was a saturated job market. So I went into IT. Doh!
    25) I basically don’t watch TV, listen to radio or even go outside that often. I have adblocker installed on my browsers so I basically have no exposure to adverts at all. It really freaks me out seeing them because to me, adverts are really rare. Saying that, I also seem to have adblock in my head, so my brain rapidly tunes them out anyway.

    Right, I’m not going to tag many people (the ‘rules’ state you should tag 25) because anyone I know who would actually carry this on will read this eventually and do so anyway. In fact, when thinking about tagging people I was amazed I actually had 25+ friends on facebook, especially since I deliberately try and keep my list of friends on here sparse. Amazing.

     
    • Devo 8:42 am on February 22, 2009 Permalink

      3) I don’t actually remember seeing any such acts of wanton destruction of amphibious life. :P

      4) Now that, I do remember. You sick fuck! XD

      5) *happy sigh* Y’know, I wish I had Angel Cop on DVD.

      7) Bro, you are the embodiment of sloth.

      10+11) I remember it well. It was a daft plan, though, one we didn’t really have any hope of accomplishing. Still, got us out of the house and gave us a taste for adventure. X3

      20) ROFLMAO XD

      22) If you’re that boring a person, you wouldn’t have as large a circle of friends as you do. :)

  • Dark Liquid 1:23 pm on February 1, 2009 Permalink | Reply
    Tags: phew,   

    EVE 

    Well, I avoided joining my friends in consigning my soul to oblivion today. Today, I was sufficiently bored that I decided I’d try out EVE-Online, a game that until now I’ve avoided like the plague because I know it will consume my soul.

    I used to be a massive Frontier: Elite II junkie on the Amiga and spent unhealthy amounts of time on that game. I suspected EVE would do the same, so I made sure to avoid it because I rather like my life as it stands and that will rapidly evapourate to be replaced by all-consuming obsession.

    I lucked out though. Running on Linux with a dual-screen set-up has always been a bit of an arse when it comes to games, especially when you are also running compiz. Combined all together, the app wouldn’t run at a reasonable resolution, neither their Linux client, which is actually just the windows one with a crippled version of cedega bundled, nor their Windows version through WINE. The game constantly insisted it had to run at my full desktop resolution (3360×1050) regardless of whether or not I ran it in window mode, in fake fullscreen-in-a-window mode or anything else, making it somewhat unplayable – I couldn’t even log in because due to it’s stupid resolution screwup I couldn’t see the login box to enter stuff into and click login.

    Oh well, I am saved at least until I get bored enough to try it again and it happens to be fixed.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel