Archive for the ‘General’ Category

(on Technorati ,

Refactoring an Emacs theme

I’m gradually working on a custom theme for emacs, and I wanted to make it easier to update and read. (It’s not quite ready to share, but I look forward to doing just that when it is.) Surprising no-one, the theme format on emacs is not incredibly … “clean.” It’s basically a command that passes in a huge list of lists (of lists… this is lisp, after all). That command is custom-theme-set-faces.

 'my-cool-theme                         ;theme name

FACE is the symbol for a particular element, for example default for default text or error which is used for error messages. Easy. SPEC, however is a bit more complicated. SPEC is a list of DISPLAY ATTS pairs, each list of attributes pertaining to its paired display. If this were CSS, I think it would be similar to including the @media selector for each rule.

(DISPLAY can simply be default to apply to all displays, but I haven’t seen this used much and am trying to follow suit.)

So now we have this.

 'my-cool-theme                         ;theme name

ATTS is property list, where you can specify the width, height, etc. for the font face, on that display.

So plugging in some actual values, we have the following:

 'my-cool-theme                         ;theme name
   ;; error face, using default DISPLAY (simpler)
   (error ( (default (:foreground "red" :background "black")) ) )

   ;; default face using DISPLAY specified by a a list of conditions (less simpler)
   ;; In this case, a color terminal that supports at least 89 colors.
   (default ( ( ((class color) (min-colors 89)) (:foreground "white" :background "black")) ) )

I was working with a bunch of lines that basically looked like the second case. There was some substitution, but it was still painful to see all that repetition.

    ((class '((class color) (min-colors 89))))
  ;; ...
  `(default ((,class (:foreground "white" :background "black"))))
  ;; ...

I wanted to remove the DISPLAY component completely and just add it later using code. This would mean a cleaner and easier to maintain theme. The excellent emacs-doom-themes has a very elegant solution, but I didn’t quite understand all the elisp and thought I could roll a simpler version myself as a good learning experience.

Lots of fumbling around elisp ensued, but I now have something I’m happy with.

;; the simple-faces are bound to a list `two-fifteen-simple-faces'
(default (:background ,bg1 :foreground ,fg1))
(error   (:foreground "red" :background "black"))
;; ...

;; Add the display to the simple-faces
(while two-fifteen-simple-faces
      ((simple-face (car two-fifteen-simple-faces))
       (fname (car simple-face))
       (fattrs (cadr simple-face)))
    (setq two-fifteen-simple-faces (cdr two-fifteen-simple-faces))
    (setq built-faces (append
                       `((,fname ((,class ,fattrs))))))))

;; apply custom-theme-set-faces to built-faces
(apply #'custom-theme-set-faces 'two-fifteen built-faces)

Next up is making a palette with re-usable colours, which I’ve started w/the bg1 and fg1.

Here are some functions and modes I’m finding extremely helpful when working on the theme:

  • describe-face : Describe the face at the point (cursor)
  • list-faces-display : List faces in use on display
  • rainbow-mode : Display colour values using the actual colour
  • list-colors-display : visually browse colours names and codes
  • align-regexp : Align attribute blocks of the theme to make it easier to read
  • sort-lines : Sort sections alphabetically
  • Iedit and narrow-to-region : Refactoring
  • Keyboard macros, OF COURSE. : start ( C-x ( ), stop ( C-x ) ), run ( C-x e )

There are moments where I do something and a big fat grin creeps onto my face, appreciating what I just did using Emacs. You know what I’m talking about! ๐Ÿ™‚

Oh right, here’s a picture of what the theme currently looks like. It’s called two-fifteen. 2019-08-05_emacs_two_fifteen_theme.png

Happy Mother’s Day 2012!

It was Mother’s Day! I love cooking, so I made something special for my mom. Actually, me and 2 of my sisters were the kitchen workers today. I made a salad. So I know my mom likes this shrimp and avocado salad that is served at the restaurant where I went to culinary school. Fine. I’ll make that. Again. At home. For her. ๐Ÿ™‚

This is how it turned out:

This was a sample plate I did. I changed the plating a bit… moved the tomatoes face-down on the cucumbers.. and added a full steamed prawn. But it looked something like this.

It was good! If I were to do it again, I’d play around with the plating some more… and I’d make the balsamic reduction thicker (when I tried to spell “Mom” in cursive on my mom’s plate, it gradually expanded until you couldn’t read it…. >.< ). But it turned out pretty good. But the chive oil… oh man… is it ever perdy. Put it in a custard cup in some good light: sexy.

That other thing in the photo is dry whole wheat pasta – another experiment. ^_^

Happy Mother’s Day!


After hurting my shoulder, I had to take a 2 month break from culinary school. Hopefully, I’m fit for the kitchen again, because I go back to school tomorrow. Better start doing more cooking!

Last night, I had company coming that I knew liked dessert. There wasn’t going to be many of us, so I decided to make crรจme brรปlรฉe, a classic French dessert.

Turned out good, but I guess I could have caramelized them a bit more.

Then I had the dilemma of what to do with the egg whites. I’ve seen a few Australian cooking shows recently, and pavlova is something that is always mentioned and held in high regard. So I decided to try it.

I guess it turned out okay. No weeping at the top, but the bottom had a bit of syrup weeping out. I’m thinking it may have been slightly undercooked. It deflated a bit as it was cooling, but that’s normal, apparently.

All pavlova recipes I found on the Internet called for an insane amount of sugar, so I found the most reasonable one and cut it back a bit. Even after cutting the sugar in the recipe, I still found it cloyingly sweet. So for a sauce, I made a tart raspberry and mango coulis. The combination was actually quite good. It should also be served with fresh fruit and some kind of creamy sauce… pastry cream or whipped cream or something. Since we were already having crรจme brรปlรฉ, making a creamy accompaniment wasn’t really appealing to me. Was thinking fried bananas might be nice. Next time.

Back to School with Cheesecake

Recently, I’ve been busy for a variety of reasons. The most significant reason? I’ve gone back to school! ๐Ÿ˜ฎ

Shocking, I know. But it’s probably not what you expect. Since April 11th, I’ve been going to culinary school in downtown Vancouver. It’s an 11 block program (each block consists of 4 weeks, so… 44 weeks) – I should be done in February 2012. In addition, I just completed a 4-month stage (unpaid internship) at a hotel. I would go there after class (or before class, depending on the class) about 3 times a week. Lots of getting up early, and some getting home late. It can be tough work. I’ve been physically exhausted. Heck, I’m exhausted, right now. And you know what? I love it. There is something really satisfying about cooking. You produce something you can be proud of in relatively short period of time… and the kitchen can be an exhilarating place to be. I’ve always liked a bit of adrenaline in my life and I guess I didn’t find that in an office environment.

Anyway, I haven’t been taking photos at school. And I should be. So today I took some photos. I’m currently in block 7: baking and pastry. Here are some cheesecakes I decorated today. My partner and I had finished pretty much everything, so we had lots of time to play around. ๐Ÿ™‚

whipped cream rosettes with orange segments and strawberry. Probably should have left the orange bits off the rosettes, but oh well.

rosettes on top of kiwi slices, with strawberry on top of orange segments.

The cheescakes turned out really well. No burning, no cracks (thanks to a sour cream topping), and quite level and smooth. Clean!

Spent way too much time on this, but had a lot of fun doing it. Marzipan pumpkin and chocolate "Booo" leaning on rosettes, Messy spider is 2 strawberries covered in chocolate with marzipan eyes and chocolate disc legs. All on chocolate webbing.

The cheesecakes go for $18. It’s a good deal considering how much cream cheese is in them… each about 750g? But whoever gets that halloween one will have a bunch of chocolate shrapnel when they attempt to cut it. Hah! ๐Ÿ™‚

Attacked and almost robbed

Last night, at about midnight, I was attacked while approaching my parked car at a bus exchange in North Vancouver. I was returning from downtown and was on my way home. I had just got off the bus, walked over to my car, put my bags in my trunk and was unlocking the driver side door when I saw a man approaching me in the parking lot. I didn’t think much of it, I thought he wanted to ask me a question or something. So I just stood there and waited for him to approach me. He yelled something, which I didn’t understand until he said it a few more times, “Give me your shit!” I was totally taken aback. Was this really happening? Is he serious? I noticed he was holding something threateningly in his left hand, thought it might be a chain or something. It was dark and hard to see… and I still couldn’t believe this was happening.

My door was open, but I didn’t let on to that. I lowered my key and tried to talk him out of it, saying it couldn’t end well and stepped cautiously towards him. I may have had my hands up and open. Obviously, he wasn’t a rational person. Even if I did pop my trunk and give him all my stuff, I had no insurance he would leave me alone. I suppose that’s when I decided I would have to defend myself as best I could and find help. He swung his weapon at my head a few times, some of which I managed to block with my arm and sweatshirt. I charged him, knocked him back a bit and retreated to the bus exchange looking for help.

I was being pursued, but I didn’t have have to try very hard to keep a safe distance. As I jogged through the bus exchange, there was a young couple there (waiting for their bus, presumably), no buses, and no authorities. I didn’t really want to bring this lunatic into them, and felt a sense of regret. They cast concerned glances at me and asked if I was alright. The assailant was still a safe distance behind me, ranting and stomping on. That’s when I noticed blood on my hands. I was bleeding? I was aware of a different sensation on left side of my face, but it didn’t hurt. I may have actually said that aloud, both shocked and annoyed, “I’m bleeding?!”

Then I actually got a bit of luck. Nearby, I noticed the police had set up a roadblock, so I ran over there and got help. The assailant was surprisingly cooperative, dropping his weapon, lying down on the ground and putting his hands on his head. I later found out it was a studded belt – I guess he was swinging the clasp at me? He was taken away, would be put in jail for the night (minimum) and be charged with assault and robbery. I was interviewed, the young couple were interviewed, and I got a ride home from the officer. After I was home, I was finally able to see what I looked like.

After cleaning up and sleeping, it looks a bit better. Bit of a shiner, though. ๐Ÿ˜›

Aside from being a little shaken, a couple cuts and welts, I’m okay. I was not robbed. Nobody else got hurt. And I’m thankful that things turned out the way they did, as it could have been much worse. ๐Ÿ™‚

UPDATE 2011/09/04:
The shiner keeps developing. It’s so… colorful! ^_^

Japan Disaster

As you no doubt already know, Japan has been devastated by a monstrous natural disaster. On Thursday March 11th, at 2:46pm, Japan experienced a massive magnitude 9.0 earthquake originating just a few hundred kilometers north-east of Tokyo. The quake caused a giant tsunami which actually caused much more damage than the original earthquake. I’ve been constantly glued to the news.

An effort to summarize some key events follows…

At this time:

  • Over 3000 confirmed dead, many more expected (upwards of 10,000)
  • Thousands still missing
  • Complete cities destroyed, thousands made homeless.
  • A nuclear power plant in Fukushima was damaged from the quake. People near the plant were evacuated and fears of a meltdown are growing as the plant grows more unstable.
  • Aftershocks are expected to continue for months, most recent one was magnitude 6.1.
  • To provide power to the eastern part of the country, all Kanto regions have cycling blackout periods, which apparently also affects hospitals.
  • Food and gas are running out and being rationed. A friend of mine, in an area largely unaffected by the quake and tsunami, says it takes 2-3 hours to get to a gas station.
  • In the areas hit hardest, it has become colder and snow is expected, lowering chances for trapped survivors.

Vivid Images at 1 (source of image above), 2, 3, 4

News Coverage: BBC Live. BBC has been my primary source for the above information.

If you are able, you may want to consider donating to relief efforts. Donate to the Canadian Red Cross. Or, take a look at some other well known charities listed at the CBC.

Japan is special to me. Having lived there for a year, I fondly consider Japan to be a second home. I have many friends and acquaintances in Japan. Fortunately, everyone I’ve contacted, so far, is safe. I still can’t believe the destruction. My heart goes out to all of Japan….

I encourage you to leave links to images, videos, news updates, and corrections in the comments.

Beware of Snoctopus Man

Snoctopus Man says this blog is not dead. …It’s just on holiday.

Mother’s Day Lunch and Knife 4 Life

I made a late lunch for my mom on Mother’s Day.

Yup. There’s that omelet again! My mom wasn’t here when I made it last weekend, so naturally, I had to make it again. ๐Ÿ™‚

I stuffed these with a lot of onion and mushroom. Not a bad thing, at all, but it certainly prevented them from being sealed. ๐Ÿ™‚

And I think I’ve finally found the right pans. It’s funny, I kept trying to do it on non-stick pans, and low heat. Well, it works much better on buttered steel pans, over high heat. (Bit-a-butter-makes-it-better?) Plus, it’s way quicker! You just have to be careful not to burn it, or overcook it.

Also on the weekend, I got myself a new chef’s knife. I will have this knife for the rest of my life. Using it is an absolute pleasure.


Yes, I’m alive. And I’m well. It’s been a long time since I posted anything…. I have 6 posts categorized as drafts, so it’s not like I’ve completely ignored blogging. ^_^ But wow, it’s been a while. This post will basically be some pictures, since it’s not hard to put together. I took some casual cooking classes, a while back, in November. It was lots of fun, met some great people, and learned quite a bit. My interest in cooking, food, and the kitchen has only increased. But cooking… I’m still just starting.

On Friday night, I had the house to myself and made myself a nice meal: inside round steak on top of spinach, red pepper, asparagus, green beans, carrot, mushroom. Cooked and paired with some cheap pinot noir. ๐Ÿ™‚

Still practicing cooking meat. I like medium-rare. As I get more confident, I’ll buy nicer cuts of meat. ๐Ÿ™‚ And the great thing about steak? It’s super quick and easy!!

Saturday afternoon, I made a French-style omelette for myself and two homestay students. In hindsight, this was slightly overcooked and the pan I chose was not the best for the job… but at least it wasn’t browned and I know better for next time.

I’ve attempted this elusive French omelette a few times, but I don’t normally put that much effort into the rest of the plate. I had some fresh spinach from the night earlier, and I thought tomatoes and lightly fried zuchini would go well with everything. Sprinkled a bit of olive oil, white balsamic vinegar, grated cheddar and mozzarella….. Inside the omelette was sautรฉed onion, mushroom, red pepper, garlic, spinach, and melted cheese.

There was certainly a lot of work put into this single dish, but man did I enjoy it. Everything. The preparation, the cooking, and the eating. ๐Ÿ™‚

Gourmet couch candy

I’ve really been enjoying these shows: Good Eats, Chef at Home (though I hate the theme music), and Posh Nosh.

Happy Halloween!

Did this FlipNote animation on the bus, yesterday.

The pumpkins, this year:

unlit jackolanterns

lit up jackolanterns

I did the one on the left (least effort!). ^.^ And it should resemble the pumpkin in the FlipNote animation, above. ๐Ÿ™‚

Happy Halloween!