Over the Bridge

Screaming into the Void

Posts

2020-12-11

New Projects!

I've started two new projects! One of them meshes with my existing stuff; the other is kinda unrelated. Both are programming related.

libliquid

I've started writing a C++ liquid parser/renderer, with an eye on embeddability, performance, and sandboxability.

The repository is hosted on github here.

It's still in the early stages, so likely has more than a few memory bugs, but I've got bindings up and running for C, and Ruby, Perl (both using the C bindings). I've also strapped it to cmake, so there's a semi-legitimate build process involved (though my development builds are still built through a hand-written makefile.

I'm planning to embed it in nginx-xapian, my other open source C/C++ module. So we'll see how it goes. Early indicators are good, though! I've already got it more feature-ful in terms of syntax than Shopify's existing liquid implementation (i.e. we support parentheses and actual operators), if you want them; though you can always implement the strict Shopify version with a single call.

Another cool thing about it is that it allows for multiple dialects, like with the perl liquid module, and almost all the functionality of the language is tied to the dialect, rather than the core implementation. The only tag that exists in the core is {% raw %} (as that's a lexing hint); everything else can be modified by anything using the library; allowing you to very easily add new tags, operators, filters, and other constructs as you load the thing up; though it does come with a fairly comprehensive standard liquid implementation, that includes all the normal greatest hits like {% for %}, {% if %}, and the like; the only thing it doesn't have is stuff that would require external libraries to properly implement, like JSON serializing, and whatnot; but that will eventually be provided with examples.

Performance is good too; I haven't really even done an optimization pass, and it already runs 10x faster than Shopify liquid does, even when called from Ruby with near-identical calls (both parsing and rendering). I think that, combined with the embeddability is going to make this a general win for most projets I want to throw it into; some of which will actually be work-related (though I'll only work on the library in my spare time).

I'm aiming to keep the full implementation under 5KLOC, and there's definitely room for improvement on the way it was done; but I'm hoping, after a few polish passes, it'll actually work nicely both at work, and in hobby projects.

Pre-Confederation Ornithology

My dad has always been majorly involved in birdwatching; being in the executive of a number of non-profit birding organizations around Montreal. Over the years, he's aggregated and transcribed a ton of early Canadain material on ornithology, and has finally decided to publish some of it online. I've helped him create a website for this purpose over here.

Looks familiar, doesn't it?

In addition to helping my dad, also helped me refine the static-site generation framework I wrote for fun, that builds this site. So it's a win-win all around.

2020-10-30

Biking Wrapup

It's been one hell of a biking year!

So, as noted previously, this year was planned to be a big one for me. It's my first year taking biking actually seriously; and my first year with an actual roadbike. And of course, COVID, which changed a ton of stuff, and really encouraged me to get outside to do things, rather than staying indoors.

A lot of stuff happened. In no particular order, here're the greatest hits:

The (Fake) Tour de L'Ile

Given COVID, Tour de L'Ile was cancelled this year, understandably. Back in the winter I had talked about doing it, but obviously with the pandemic, it was always a distinct possibilty that it just wouldn't go ahead. And so I planned to do my own version of it.

The REAL Tour de L'Ile

Like a smart person, I picked a day that was like 33 degreees, with like 80% humidity. I loaded up my bike with only a single water bottle, thinking that I'd just buy more as needed. This was a mistake.

Starting from my apartment, I went north east, through the old port, and then along the water as much as possible all the way to the eastern tip of the island. After taking a small break, I cut west, and went opposite the direction I normally go along the north shore.

I stopped for a mid-ride poutine at LaFleur, just after getting out of Bois-Franc. They only had two sizes, small and large (rather than my usual medium). Obviously, I said 'fuck it', and bought the large. I ate about 2/3rds of it in all its gravy glory, before I had to trash the rest, but it still damn worth it.

From there, I cheated a little, and instead of following Gouin west, and hugging the river, I cut down into DDO to see a friend. By this point, I was really overheating, despite stopping to buy water fairly often. Luckily, my friend had air conditioning, and so we spent a brief (socially distanced) time, catching up and cooling off (and applying another layer of sunscreen).

After the break, I really debated just cutting south, and heading back home from there; but I figured if I'd come this far, I may as well see this mostly through to its conclusion. So from there, I headed west through the edge of the Morgan arboretum, where I nearly had a nervous breakdown because I was feeling so uncomfortable in the heat, and really wondering about whether I should be getting a cab.

From there, I went to St-Anne village, where I got two large bottles of gatoraide, and took another break, downing one, and saving the rest for later. This really made me feel a lot better. Not sure if it was just the tempreature of the liquid, or if I had just sweated out all my sodium, or if it was because at this point, I was heading closer to home, rather than further away from it, or if it was just purely placebo, but at that point, I knew for sure that I could make it home without tapping out.

At that point, I was really hoping nothing would go wrong, and of course; when I was completely exhausted, one of my saddlebags ripped. Which was super shitty, becuase they weren't exactly cheap. I'm still meaning to file a warranty claim on this. Luckily, I was able to tranfer things around, and after a bit of rearranging, I was able to get all my gear into the one remaining saddlebag. Still sucked, though.

After that, I took my normal route back along the southern shore of the island, heading through all the west island neighborhoods, until you hit lachine, and then through lachine all the way back to verdun.

All in all, it was an amazing ride, and I'm really glad I did it. In the end, it was 133km, which was actually less than I thought it'd be. It was really exacerbated by the heat; I'll never ever do a trip that long in weather like that ever again.

Lessons Learned/TLDR: Don't bike for really long periods in crazy hot weather.

The Trip to Tremblant

Just before Montreal closed down for another round of lockdown, my brother and I had planned a trip to Tremblant. We had bandied about starting points, but in the end, my brother drove in from Ottawa at dawn, picked me up in Verdun at 8, and parked the car in St-Jerôme, at the beginning of the P'tit train du nord around 10, on a Friday morning.

TTtT

And so, we took off. And it was beautiful. Fall was here, and not only was it a great temperature for biking, but the trees were decked out in autumn's full riotous glory. The day was sunny, and it was an absolute pleasure to head north at a leisurely pace. The great thing about the trail is that, despite being mostly surrounded by nature, every 15km or so, you have a town that you can stop at, to pick up some refreshments.

We stopped for lunch in Mont-Rolland, only about 20km into our side; and got deux steamés all-dress ack ketchup, frites et un coke. Greasy lunches are always delicious when you're biking. From there, we continued north, and stopped off at Val-David for a brief beer on the terrace at Le Brail Rouland; which was... OK. The beer I had was passable, but nothing special. My brother felt the same way. Still, was refreshing after like 45km.

From there, we pushed through the entire way, all the way to tremblant. It helped that the last 10km or so was a fairly continuous downhill; and in the end we stayed book a small room at the Hotel Mont-Tremblant, and hit the restauarant and bar. On a tip from a friend, I had my firstAperol Spritz (which was... again, OK, but didn't really hit the spot for me), before slugging back a bunch of beer and whiskey, alongside a steak. It was great.

The next day, unfortunately, we found out that my tire must've been punctured with a pinhole leak, because after we took it out of storage in the morning, the front wheel was completely flat.

I, and my brother, tried not-so-successfully to use my kit (and the kit on the nearby maintenance station) to pop the tube out of the tire, but we didn't have much luck (neither of us is particularly experienced at bike maintenance). Luckily, literally right next to our hotel, there was a bicycle shop, so I just popped in and got things fixed up there, and we kicked off.

We made the return trip in good time, and on the way back, I noticed something amazing.

The last 30km back to St-Jerome from around Val-Morin are almost entirely downhill. I didn't notice it so much going one way, because the grade is very slight, but goddamn, you certainly notice it on the way back. I'd never experienced something like this. I literally had a stretch of no joke, 15km or so that I did not pedal once during. Literally 45 minutes of just sitting on my bike and having it go forward. Amazing.

Anyway, we made it back in one piece, but of course, the second we hit the parking lot in St-Jerome, my brother's bike's front tire popped. Literally the most opportune moment for it to happen possible. All in all, we were really lucky with regards to the whole thing; though even had we been unable to patch the tires ourselves, there were enough bike shops around on the path that we'd probably never be too far from getting bike help if we really needed it.

All in all, ~200km over two days. A fantastic ride. Highly recommended for anyone looking to get out of the city.

A Century Ride

This one was certainly the biggest ride that I've done. In the end, I did 183km; a round trip from Montreal's Sud-Ouest to Grandby and back.

Century Ride

This almost broke me. I did it with a friend, who was more experienced at this kind of thing (who only told me afterwards that it was the first time he'd ever gone that far either). We met up at basically dawn; when it the sun was just above the horizon, and headed off. It actually only took us about 3.5 hours or so to get there; but by the time we got there, I was completely starving. To remedy this, me and my riding buddy went to the McDonald's; and I proceeded to slug down two large sprites, and four McDoubles. I figure I'd earned it, given that I'd probably just burned like 2000 calories getting there.

The way back was an absolutely brutal slog.

It took us like 7 hours. We took a ton of breaks, but man it was brutal. Still; we had a great time, apart from the fact that we took the wrong route out of Grandby (the one towards St-Jean-sur-Richilieu, rather than Chambly), and had to backtrack briefly. Even then, it was still quite a positive experience; I don't regret anything about the trip. But I think I'll only do one of these a year. Any more would probably kill me.

Next Year

This year, according to my app, I've biked 2586km. I'm not sure if that's good or bad, but honestly it doesn't even feel like so much. I could definitely do more.

Next year, here's hoping that I'll be able to able to do 200km, or 240km. My goal is to eventually make my way to a double-century (320km), but first let's just see if I can do a double-metric century first.