← Back to articles

Taking a break! And other thoughts

2023-06-04 · 8 min read

I've been on a hiatus for the last couple of weeks (it was originally intended to be one week) and just wanted to write about what I've been doing!

Mostly I've been working on my own programming projects. You know how my About Me states that I like working on multiple projects at once and finishing none of them? This is me in action!

Arson & Marrow

I'm just about done on Arson, a programming language... around arson. (I hope it was self-explanatory enough.) Right now, I'm trying to get classes to work, which introduces a new level of complexity because I need to figure out a good abstraction for describing classes (with their attributes and methods) and instances. Another thing is getting PEMDAS to work - I was trying out if statements like if (x < 5 and y > 5) and realized that boolean conditions are very ambiguous because you can have x < (5 and y) or you can have x < 5 (moral of the story: use parentheses! Who am I to enforce boolean algebra).

I was going to work on it when I arrived at South Station in Boston for AngelHacks, but I found out the hard way that Boston transportation all stops at 12AM in the morning, so I was left fending for myself. (I don't want to talk about how I somehow ended up in Waltham MA for a good quarter of the night.)

Oh, speaking of AngelHacks! It was decently fun, but I don't think I enjoyed it as much as some other events I've attended. Not sure why, asking myself the same question right now. I guess it felt more competitive than necessary, and there wasn't a fun enough workshop to make up for it, although I'm sure there's more to it. On the bright side, I made a new group of friends and we went out for fish ice cream! (I know! Fish ice cream! I legit was so confused until I realized it was just ice cream with a fish-shaped cone.)

Anyways, back to Arson. Just did some Googling and it turns out you can use the shunting yard algorithm to solve the PEMDAS problem! I'm thinking about how to implement it right now...

Update: implemented the shunting yard algorithm! Had to apply it to a tree structure which was a bit tough. Now I have to get it working with parentheses. Another thing - I decided not to work on classes because I am on a bit of a time crunch - I have a reading project on The Shining due and I'm planning on building a two-player socket based game for it! Although it'll be a bit gory (not to spoil the plot).

I've actually been writing it with Marrow! I came across a really good guide on writing your own text editor similar to Vim and ended up writing about a 1000 lines of C going through the guide. I'm quite rusty with C, especially memory management (that reminds me, I need to go and install valgrind! Because I forget to free memory all the time), so it was really fascinating to go through this guide and learn about various flags (i.e., flags needed to enable raw mode in a terminal rather than your classic cooked/canonical mode) and functions (especially memory ones like memcpy, snprintf, and so on). It was whole lot of fun, and I'm thinking on adding the following features:

  • Syntax highlighting for other programming languages besides C. The way the guide does syntax highlighting is quite frankly horrendous, but I can't think of a quicker way to do it without generating tokens for each language to categorize each term. I'll start by modularizing the syntax highlighting code and then adding a couple of languages that I use often, like Python and JavaScript.
  • A tree viewer. This should be relatively easy using dirent.h (not supported in Windows though) and adapting the code currently being used to track keystrokes to track moving through the file tree.
  • Tab system. I already use iTerm so I suppose I could just use Command + number to open a new tab, but I think it would be cool to have a tab system directly in Marrow where I can switch between editor views to edit different files. Split view can come later, if I'm so inclined.
  • Terminal emulator? Not sure if I'm using the correct term. Vim uses libvterm, so I want to do a little more research into that.

Might share a Asciinema recording of it in action soon!

Markright

I've written an insane amount of (spaghetti) code to revamp Markright! It is back up and running, and I've added a couple of new features, notably a recursive filesystem.

Other small things

I have a couple of other things that I've been working on in private! I'll be sharing them when I'm ready, but I'm thinking of building websites for local organizations (I look at some of these websites and I absolutely can't stand it). Raco's Agency (mascot story for another time) is soon going to be doing that, in addition to presenting Start WebDev, an extremely long guide I've been working on for the last couple of months on getting started with full stack web development. (Completely free and open source, of course!)

I've also been learning about WebGL! Kai presented a workshop at AngelHacks on it and I really want to learn more. The struggle right now is learning the bare minimum about matrices (on my TODO: ask calc teacher? If we're going to be forced into doing math for the last two weeks of the school year I might as well do fun math) and then figuring out how to abstract WebGL so I can learn how to write a voxel engine which I have wanted to do forever. (My brain is exploding.)

Last by not least, my school runs a 101 fair every year for incoming soon-to-be freshmen and it's time to get some new signups for Hack Club! It's going to be the coolest booth around.

Oh, did I say that was the last thing? It isn't. Hackmon is in its beginning stages and I have a lot of unpushed code on my computer, but I'm super excited about it! It's going to be Pokemon + code together. Super excited about it.

Dance Dance Revolution clone?!

Okay, so I was just about done writing this blog post, but I was jamming out last night to some tunes and thought about building my own version of Dance Dance Revolution. I mean, in essence it's quite simple - four buttons to a bluetooth microcontroller (ESP8266) → signal to computer → mapped to arrow keys → with web interface.

The hard part is getting durable materials. I'd really like to have a nice metal controller under my feet and not a fabric pad. Materials engineering. There are three options for detecting a user's feet movement:

  • Springs. Push down and two copper plates make connection?
  • Photoresistors? Not accurate enough
  • IR sensors? Also not accurate enough.

I could design a PCB board to work with this through Hack Club's OnBoard maybe? Or I could try building the web game first :)

(Also, VR hurts my eyes so I'd stick to something like Dance Dance Revolution in the meantime than Beat Saber. Although I think Moon Rider is pretty cool.)

What I've been thinking about

Okay, so I was considering redesigning my blog the other day and I came pretty close to it. Then I took a look at my blog, thought about how unique it was, and then left it alone again. I guess the purpose of a blog is to be a useful place for me to distill my thoughts - and this blog does do that, albeit a couple of UX changes that I would make.

I had an epiphany the other day that kind of reframed my mindset around managing screen time in terms of what I do. I don't have social media, but I do check Hacker News and YouTube way too often. I also check Slack and Discord way too often, but I realized the difference between Hacker News and Slack, YouTube and Discord - the latter enables me to live my best life - I get to talk to amazing people, help organize amazing events, and participate in amazing events. The former, on the other hand, is just a time sink. I don't get anything out of it. And I should be living my life! Not someone else's. This mindset shift has been very successful so far (probably because it reframes my mindset and identity)!

Copilot is being annoying, so I'll stop writing now.