Update to Spwords; also, on this blog.

I did something weird. I rewrote and updated my old game from 2012, Spwords. Play it here! By the way, it’s open source too.

It was a couple of years ago that I started this rewrite in the Elm programming language. When I made it originally it was without using any of the fancy Javascript frameworks people use these days. My web programming (or really, all of it) was still pretty unsophisticated. I had a collection of utilities back then that tried to imitate the classic OOP style from Actionscript 3 that I was used to with my Flash experience, even. Nowadays I’d much rather have referential transparency than inheritance.

I always liked the little silly game, and knowing the many ways it could be improved, I wanted to try remaking it in a language I actually enjoy writing, as an exercise. I learned a lot in the process!

I remember that back-then fellow tigger Lou Acresti wanted to help me make it playable online (BTW, his Flog game that he submitted to the same compo is amazing), and we tried for a bit, but it was a bit too difficult for me at that time, praise him for his patience. Now, this new version has no online features, in fact it’s barely any better than the old patched together version. It does have difficulty levels, though! Also more commentary variation. And a different color scheme, and better typography. I wanted to at least add sound, and Spanish support (another aborted addition I at some point worked on, for the old version), but didn’t get around to it in the end. So I’m just releasing it now in this slightly underwhelming state, because otherwise I’ll just keep procrastinating on it for who knows how many more years, and it looks sort of cute as a portfolio piece.

On the subject of Elm, I’ve also been using it for an update to this dated WordPress blog that won’t even look right on a smartphone. Part of why I haven’t been writing at all is that it’s not very motivating to add content in its current state. I don’t even feel like showing it. So, I’m using elm-pages to make a static version of it (WIP code’s online). I ran into some limitations in elm-pages v2, obstructing my goal of reproducing most functionality of the current blog, so I’m chipping away at the design while waiting for v3 to have an official release. No promises on when I’ll release it, though.

New portfolio design.

Since I do so much different kinds of work, I wanted to have a portfolio that let me exhibit that variety as a strength, but without having the reader wade through a lot of chaff they’re not interested in. For that reason I came up with this new design, which has a short self-introduction littered with tappable keywords that bring up a list of related works. I’m using Elm and elm-ui for it, both of which are great. The source code I also put up on Github.

It took me a while to get it to this stage of completeness, so I just put it up, but there is at least one serious bug remaining. When watching it on certain smartphone browsers, rotating the device causes the layout to glitch out—text displays in an incorrect size, things get positioned strangely, etc. I hope to get it fixed quick…

An unlikely update to Flower Pattern.

Although I released it in 2012, over seven years ago now, Flower pattern is actually still one of my favorite digital things I’ve made. It’s simple, feels good to play around with for a bit, and it’s impactful to show to people. It’s not the deepest, it just looks cool.  So the fact that because of evolving technologies it’s sort of aging poorly is not something I’m happy with. For one, back then I didn’t own a smartphone, so it was poorly tested on them, and actually looks really cramped. Higher pixel density displays also became the norm since then, and my toy looks blurry on them. Then some DOM API changes means that on touch devices there’s issues with touch events…

Change all of that to the past tense now, cause I just fixed it! It’s looking much better now, in time for my upcoming portfolio update. Check it out at the same address as before: http://agj.cl/ip/fp

As I set out to do this, I was afraid that the code would be an undecipherable mess, but it was all actually fairly well structured. I long abandoned the actionscript 3-informed OOP style that I used in it, but all in all it was fairly painless to work with. So given that, I decided to throw the code up on Github with an open source license. It’s a really dated coding style, with mock-class hierarchy and using old javascript libraries and all, but I guess parts of it can be useful to someone, like the drawing code. Anyway, no harm with it being open for people to check out and maybe copy.

Front page is multilingual.

It’s six months later and I finally did what I intended to do with the agj.cl front page. It’s the same barebones design, but programmed in Elm and with language switching. I’m happy with what I learned about Elm in the process, and I’ll definitely continue using the language in future projects. It’s a joy getting front-end stuff done in a functional way.

Oh, and it’s old news already, but the Valdivia Film Festival was really fun. My friend Kiyohara Yui from Tokyo U. of the Arts was there to show the film she made (Our house) as her graduation project in university. I also met another Japanese filmmaker, the super young Yamanaka Youko, who brought Amiko—a small but exhuberant made-with-friends indie film. I got acquainted with her actually because she and Yui knew eachother from other film festivals they ended up touring together, starting with the Japanese Pia. And as it turns out, in Valdivia they didn’t have an interpreter ready for their two Japanese guests, so I (on the two’s request) filled that role. It was tough but interesting.

Front page design update.

I kept the previous design (archived here,) it turns out, for a whole eight years. I modified it slightly over that time, changing the words, the links, and the colors. Its main conceit (the text getting increasingly obscured with time) never changed, and while cute, is not very helpful to the visitor. I decided to change it to be simpler and nicer. My website in general has always reflected my contrary attitude somewhat, but I guess the front page should just do its job of introducing who I am and link to some relevant places, to anyone nice enough to want to know. Yes, I am aware of how obvious the previous statement is.

The new page is a completely static HTML+CSS design optimized for mobile devices. My original plan was to give it a tiny bit of interactivity in the form of language selection, which I wanted to make my first Elm miniproject. But I ended up going to the Valdivia International Film Festival and had to hurry it up a bit, since I wanted something presentable in case anyone would take my card. (I might write about the festival later.)

Elm is a rather new language that compiles down into javascript, and which I’ve been learning recently. It’s been a pleasant and enlightening experience. I first considered learning the specific configuration of React plus whatever frameworks are needed to be able to develop for the web in a “fully” functional programming environment. But the overhead of learning all of that to, in the end, just having a sham of a functional environment, made me turn my attention to Elm, which was a language I’d been eyeing for some time. Basically, using just javascript, very little of any complexity can be made for the web, thus needing a bunch of libraries/frameworks of dubious compatibility and ease of use, laid on top of the shaky foundation that is the javascript standards. On the other hand, Elm has been made from the ground up to address the current landscape of the web, with a purely functional design. An easy tradeoff for me: I’d much rather learn a well-designed new functional language than be forced to hold my breath while navigating javascript’s murky waters.

Portfolio renewed.

I just finished going in and heavily reworking the innards of my portfolio page. It’s not completely new —the design is the same, in fact, and it’s regrettably still using PHP under the hood,— but it now works properly on smartphones, for one. I of course also added a few newer projects, and pruned some others.

Copy&Paste JS.

Particularly when making small web pages, or userscripts, I don’t want to be importing huge libraries, or having to deal with cumbersome workflows that involve preprocessing. And so I find myself making little utility functions that fit my coding style, which end up being the same ones over and over. Sometimes I copy-and-paste them straight from an older project, or rewrite them altogether. At some point I decided to just collect them in a single location for easy managing and retrieval, and I might as well share that, so I made Copy&Paste JS. This was back in 2015, and I’ve had the repository up on Github for some time, but I wanted to make it both easy to browse and manageable, something that took me a lot of work to figure out (plus of course a long hiatus.) Right now it’s just listing utilities in ES2015-compliant (for modern platforms) and ES5-compliant (for backward-compatibility) formats, the latter mostly auto-generated from the former, and with no documentation or examples of use. I did take enough care to fully spec test every utility, and I plan on turning these specs into code that works as both documentation and tests, in addition to explaining what each one does in a brief paragraph. For now, at least they’re available and fully tested.

const partial = (f, args1) => (…args2) => f.apply(null, args1.concat(args2));

For instance, this little snippet is not difficult to write on the spot, but one might not get it right the first try. Having it there, tested and ready to use is pretty convenient. What this one is useful for is to ‘prepare’ a function by passing it a few arguments in advance. It returns a new function that will take the rest of the necessary arguments. Like in this example:

[1, 2, 3, 4, 5].map(partial(Math.pow, [2]));   //=> [2, 4, 8, 16, 32]

require-textify.

I’m not sure why I didn’t post about this in 2016, when I made it, since I did post about two other packages I published on npm that one time. This one’s a small Browserify plugin to require() files as UTF-8 strings, rather than as javascript code. There are a few alternatives out there, particularly stringify, but for my use case at that moment I needed something more versatile than just selecting based on extension. My implementation is simple and works, using glob patterns for selection. I certainly could have chosen a better name for it, though…

See require-textify‘s Github repository.

Virtual reality workshop at K-Arts.

One of the cooler things I was involved in during my studies at Tokyo University of the Arts was the two-week virtual reality workshop in Seoul I was invited in, last February—the “VR Cubic Workshop.” Students from three universities corresponding to three countries (Korea National University of Arts, Communication University of China, and ours) studied the technology and created content for the HTC Vive using Unity. Teams were split according to university, and given the task of creating a VR space inspired by a historical figure representative of their country. In our case, we chose Sen no Rikyu, a master of the tea ceremony that cemented most of its traditions during the 16th century. We based our space on one of his designs, the Taian, a two-tatami-small tea room that embodies the rustic simplicity of wabi-cha. While the video above shows a demonstration of our project, The tea room, I also edited a video (below) with the closing presentation for the workshop, which was held in Seoul with all of the students and professors. In it you can see demonstrations of the whole three projects. […]

A few of the things I found myself involved in while in Japan.

One unexpected thing during my stay in Japan was becoming a performer. Friend and seminar-peer Hiramoto Mizuki needed people to carry out her Sushi performance, which involves humans taking on the appearance of the popular traditional Japanese dish in the streets of the crowded night-life district Roppongi, as part of the Roppongi Art Night festival. So I became the rice to her tuna. I was actually part of the (huge) camera crew half of the time as well. I don’t normally enjoy performing in public, but the experience was actually pretty fun. She made a video out of the copious material her little army of camerapeople got for her, and made it her graduation project. The video’s spoken in Japanese, but if interested just skip to the performances.

Another performing experience was for a series of videos promoting a student art competition called the “21th [sic] Campus Genius Award.” They were going for a Hollywood aesthetic, and thus needed ‘foreigners.’ I’m awful in it, but here you can watch the whole slick sci-fi movie-inspired little series. The company in charge of the web and promotion was TNYU, which is run by former students of the program I studied, so that’s how I ended up there. I actually appeared in a different video ad, did some translation work, and did (terrible) voice work for them after that.

I was also asked by another friend from my seminar to develop her website in three short days, since she apparently needed it to apply for an art residence (she happily succeeded.) I just made a static site, since there was not enough time, and she made the design. Other than that, I made a little web flyer for a friend’s party (she’s a dancer and often participates in such things,) which marks one of the few chances I’ve gotten to do actual, standard graphic design these days.