Unicode Emoji Combinations

Playing around with emoji over the weekend, I found out that the Unicode consortium did some pretty neat tricks here and there:

  • Country flags are encoded in such a way that adding a new country doesn’t require them to update a standard. They defined 26 Regional Indicator Symbols, one for each letter of the English alphabet. Creating a flag is just a matter of looking up the 2-letter ISO3166 country code (e.g. BE), mapping each letter to the Regional Indicator Symbol (e.g. 🇧,🇪), and concatenating them (e.g. 🇧🇪).
  • Skin tones have recently been added to the standard simply by providing 5 Fitzpatrick Emoji Modifiers (🏻 🏼 🏽 🏾 🏿), corresponding to different categories of the Fitzpatrick Scale. You take an emoji 👩, append a skin tone 🏽, and you get 👩🏽.
  • Combined emoji such as 👪 are actually just combinations of simpler emoji such as 👨👩👦 with zero-width joiner characters between them. A slightly longer one: 👩+❤+💋+👨=👩‍❤️‍💋‍👨

Have a look at this bin to see the emoji combinations live.

header

Optimizing Static Sites

As an excuse to play around with some web stuff, I pretended my website was getting so much traffic it was costing me an arm and leg to host it, and that my users complained it was too slow for them. Because my website is statically generated, optimizing it was pretty low hanging fruit, so I set out to do a few tweaks to optimize it, and wrote them down here for future reference.

Continue reading post

header

Simple Infinite Scrolling

While looking at the demo site of Twenty Fifteen (the theme I use for this blog), I noticed it used infinite scrolling, where more articles get automatically loaded when you reach the end of the page. It looked like a neat thing to have, but since I didn’t actually use WordPress, I couldn’t use the plugins that provide infinite scrolling. Writing it myself seemed like more effort than it was worth, so I dismissed it at the time. However, I later realized that I could actually do it with just a few lines of client-side JavaScript, and didn’t need any changes or support from the backend (or, in my case, static site generator) or the theme.

Continue reading post

header

More Fun with Monad Do-notation in Scheme

In a previous post, I played around with monad do-notation in Scheme (well, Racket) to have a nicer syntax to play with asynchronous callbacks. This do-notation is actually quite fun to use with other monads as well. What’s interesting is that the same notation gets entirely different meanings and forms depending on which monad you use it with.

There are many interesting monads, and this post shows only a couple of simple ones in action in Scheme (for which you can find the code here). If you want a much better description and in-depth of these monads (and more), I highly recommend you read the awesome Learn You a Haskell for Great Good!

Continue reading post

header

Flattening Callback Chains with Monad Do-Notation

A few unrelated topics on my reading list made me want to randomly experiment with a few things. I wanted to understand monads a bit better, see how they applied to callback-based asynchronous programming, and play around with macro programming in a Lisp dialect. This is a partial log of the theoretical-and-probably-not-directly-applicable-but-nevertheless-fun rabbit hole I dived into.

Continue reading post

header

Down Memory Lane: The Little Professor

Ah, Christmas holidays: that time of the year when we visit our friends and relatives, and reminisce all night about “when we were young”. This year turned out no different for me. While visiting my parents, I took a trip in between dinner courses to their attic to dig for childhood memories, and I found this little gem buried below layers of dust:

Continue reading on bookwidgets.com

header

Fun Classroom Activity: Bingo

“Bingo!” Who doesn’t like the thrill of finding the last item on your list, jumping out of your chair, and shouting you won? Bingo is an incredibly fun game to play in group, is very easy to play, and can help rehearse anything from language vocabulary to math and historical facts. Everyone can play the game together, regardless of level. And best of all, you can create your own, customized Bingo cards for iPad in only a few minutes using the Bingo widget.

Continue reading on bookwidgets.com