Synook

Some obscure (or not) letters and diacritics I have come across

  • The diaeresis mark: “ä”. In English, unambiguously indicates a vowel is pronounced separately from the one before it: Noël (no-el, not nol), coöperate (co-operate, not coop-erate), mediëval (medi-eval, not me-die-val), etc. Quite rare except on loanwords. Not like the German umlaut at all.

  • The macron: “ā”. Represents a lengthened vowel sound in transcriptions of some other languages, for example Japanese in Hepburn romanisation: Tokyo is actually Tōkyō, or とうきょう “Toukyou”.

  • The cedilla: “ç”. In French (among others), represents a “c” pronounced like an “s”: “façade”.

  • The eszett: “ß”. Represents a double s-like sound, i.e. “ss” (or “sz”). Originally because there was another letter in the alphabet for a “long s”, “ſ”. “ß” is thus a ligature of “ſs” (originally “ſʒ” (“sz”, hence eszett) but apparently our fonts messed it up back in the day). It is not pronounced like the letter “b”. And related to that…

  • The long s: “ſ”. A former letter in English that was used in place of “s” for non-terminal letters, such as in this cover page for Paradiſe Loſt. The title is not pronounced “Paradife Loft”. And related to that…

  • The thorn: “þ”. Another former letter in English that was pronounced like “th”, as in “þe”, “the”. In some fonts this character came to appear like “y”, leading to words like “ye”, pronounced “the”. So the “ye” in a phrase like “ye old times”, is not actually pronounced “ye”…

A small game from long ago

A long long time ago in high school, we used the TI-83 Plus as our calculators. These were “graphical” calculators that had small LCD monochrome screens and which could be programmed using the TI-BASIC scripting language. The display itself had various modes, but the default and easiest to access was the 24×7 (I think?) character text console. Being bored at times like I was, I ended up writing various non-school related programs for the calculator, including several games.

The programs themselves did not last long, in part because by default files were stored in RAM and deleted if the calculator was power cycled (the default “on/off” did not clear the RAM, but taking the batteries out would). Eventually we were upgraded to the amazing (or so it seemed) TI-89, which was much more powerful and capable of symbolic equation-solving—thus known as a “CAS” (Computer Algebra System) calculator (and thus, banned in many assessment environments) (but, it still stored programs in RAM by default). This was the end of my TI-83+ programs—though I did write some for the TI-89, which can be found here.

Read more...

What happened to aspektas.com, you ask?

It’s gone. It was old (the codebase had barely been updated since 2007), hard to maintain and eventually broke. And that was the end.

All the article content from the site has been imported onto this one, so it is still available, for what it’s worth—I really wrote some pretty strange stuff back in the day! The URL structure has not been retained though so it may be hard to find some stuff. Have a browse if you feel like it.

As for what it looked like, before memories of the site are lost to time…

Screenshot of Aspektas blog

Update: as a bonus, here is what the site used to look like in some of its previous iterations, in chronological order.

Read more...

Python iter()

A seemingly little-known use for the Python iter() built-in: it can be used to tidy up code that would otherwise need a separate statement for assignment.

with open('text') as f:
    for b in iter(lambda: f.read(1), ''):
        something(b)

instead of:

with open('text') as f:
    while True:
        b = f.read(1)
        if b == '': break
        something(b)

A small extension to this idea can be constructed to allow for arbitrary exit conditions, as opposed to just equality to a single value:

def until(f, sentinel):
    while True:
        v = f()
        if sentinel(v): break
        yield v

with open('text') as f:
    for b in until(lambda: f.read(1), lambda c: c in ('', '\n')):
        something(b)

A switch to Ghost

As may be evident, this blog is undergoing some more change. In particular, I have switched to another CMS yet again, this time Ghost. So I have had to redo the theme, and now fix up my content. More to come on the transition once that is done…

Orbiting

Orbiting Earth is just moving sideways so fast that you move away from Earth as fast as you fall back towards it. Just getting up there is easy, but it isn’t enough — you’d just fall straight back down. It’s the sideways speed which is so hard to reach.

You could do this in our atmosphere as well, if the atmosphere wasn’t slowing you down so much.

A card problem

I was recently party to a very simple, but nonetheless interesting card game. In the game, four players begin the game holding one suit of cards each from a single deck. Then, for thirteen rounds (until the players have run out of cards) every player discards one of their cards simultaneously into the centre, with the player who discards the highest-value card winning the round. If two or more players discard cards of the same face value, then the round is a draw. The winner of the most rounds at the end then wins the game.

While this game is pretty simple and at first glance largely up to luck, it did make me wonder whether there were any strategies that could increase a player’s chance of winning. It would seem so, especially since the starting hands are constant. Therefore, it would be interesting to find both the optimal strategy assuming everyone else plays randomly (i.e. equal probability to play any remaining card), as well as the optimal strategy assuming everyone else plays optimally.

Functional Python

Ever tried to learn Haskell? Confused? Know Python? How about trying to write some functional code in Python? And no, I don’t even mean just using functional principles in Python as the docs describe, I mean actually writing Python like you write Haskell.

Read more...

The book of Synook

“Why are you burying that notebook in the ground?”

“I want to start a religion.”

Comic Neue

Comic Sans wasn’t designed to be the world’s most ubiquitous casual typeface. Comic Neue aspires to be the casual script choice for everyone including the typographically savvy.

Actually looks pretty decent! Especially relative to Comic Sans.