Year review of 2019, on coding and moods

It’s a really rushed year. Things came and I was not prepared. I didn’t get much chance to travel and take ease, but lots of time was spent on coding. Another reason is I have a personal Todolist running small tasks, which are mostly related to coding. So as a result coding ate big part of my spare time.

There were 5 major projects I was working on in 2019, big or small. Other commits belong to the toolchains or tiny apps, or projects running in the company.

Respo Composer

Image for post
Image for post

It was really stupid simple idea first. I was trying to create a UI, like an old tool I tried to edit a DOM tree, to generate simple UI components. Also I can assemble the components into a page. So at last it is mostly a template engine but editing with a UI, as a tree. Mostly part of the work is to build the tree editor, very boring work. Only thrilling part is to see UI generated from by operations on the tree.

The I encountered the problem of handling user events, like clicking, inputting. I thought I could try turning them into actions like in Redux and add code in a really app. But at last it turned out to be a very impractical solution. I would rather write ClojureScript than generating UI from the tree. Plus the ClojureScript is more maintainable.

But I did have some achievements. I had a chance to share that idea to my friends on VueConf Shanghai, despite that the editor is totally a ClojureScript project. And the work on the editor discontinued after that due to some problems on my healthy.

Image for post
Image for post
Editor from a Pad
Image for post
Image for post
Tree editor UI
Image for post
Image for post
Preview of a component created with tree editor
Image for post
Image for post
Overview mode generated from composed templates and mocking data

Cirru Parser in Nim

It was not much barriers for me to finally finished writing a new Cirru parser in Nim.

Image for post
Image for post

I got a Cirru parser running in a new environment, but it seems to be lack of use cases. So I tried to make another scripting language of Cirru, under the project interpreter.nim. I didn’t finish this project as well. It only has very basic features, and a lot has to be done in the future.

Respo Effects

Image for post
Image for post

Respo effects are effects added to Respo components. I have been using Respo for more than 3 years. However unlike React, Respo does not support effects well, which means in Respo there’s barely no manual DOM operations like we do in componentDidUpdate componentDidMount in React. So no animations as well.

I was not planning to make Respo a library like tiny React. I still want Respo to be pure, and consistency. But some animation and some basic inter-operations with the DOM should be viable. Respo effects solved the problem.

Most obvious change you may see is the examples on http://repo.respo-mvc.org/alerts/. Respo effects enabled component-level animation on those reusable components. Yeah, we had that very in React with react-transition-group. But I’m very glad that now I have that in Respo.

Phlox

Image for post
Image for post

It’s still an unfinished project. You may find very simple example on http://repo.quamolit.org/phlox/ demonstrating basic adding/updating/removing of nodes. It’s far from being able to build a useful app. I’m feeling satisfied for now, but not sure what to do next.

Renaissance of Cirru projects

But later I was triggered by a report https://github.com/oprogramador/github-languages showing Cirru is one of the most falling language on GitHub. It’s not wrong. Motivated by the emotions, I wanted to have more chance to show Cirru.

Image for post
Image for post

Calcit Editor is still maintained in 2019 and I use it from day to day. Then one day I came out with an idea that I use .cirru file for saving the snapshots, rather than using .edn . Then GitHub will mark my projects built with Calcit Editor in Cirru, rather than just Clojure.

Image for post
Image for post

The idea was simple, however it took much effect to make it really work. Cirru was not developed for large source files, being a tiny scripting language. The parser and writer are quite slow running in ClojureScript and Node.js . It took quite a while to optimize and even refactored parts of the libraries. And finally I was ready to use Cirru for replacing EDN files.

I searched globally on GitHub and almost 200 projects I created that was possible to be migrated to Cirru EDN storage file. So now you may see on GitHub that the syntax is colored as blue, which means Cirru is the main language, in many of my projects. Cool!

Image for post
Image for post
Cirru is the main language for Calcit Editor now.

And it’s not several projects. It’s 200+ projects marked as Cirru here, check that on https://api.github.com/search/repositories?q=language:Cirru. So Cirru is now roughly 300th language on GitHub counting by repos.

Found Cirru at 296. Data collected weeks ago.

Also there is ongoing work around improving the parser, and maintaining old projects. I spent some time and make http://html.cirru.org/ work again with latest Webpack configs. Besides Cirru HTML, I would get CirruScript maintained as well. It appears to be quite a large project if you count in the packages I released years ago. God, would be much work to maintain.

Image for post
Image for post

One thing I have to think about is: does Cirru really brought me so much benefits as spent so much time on it? I haven’t bought a house, I still write TypeScript for a living, why Cirru? I have an answer for myself privately, but I can’t answer this question if someone else asking. It’s too large being a hobby project. I can only bet on it I guess. And still a lot of interesting and boring things on plan.

Healthy and moods

In June I had some waist pain and meanwhile my stomach felt unsettled. I went to hospital and found that it was infection in intestine. Took me long time to recover. Unfortunately I got cold in October meanwhile got other dilemmas…

When I was attending D2 conference in Hangzhou, meeting friends from Alibaba and other companies. I was very worried about my health condition. Then I found some of others are in worse condition than me. It’s so tragic. Air quality is not good around Shanghai and Hangzhou, many people get sicks. I don’t like it. And I feel afraid of it.

Apart from the burden on health, there were several times I felt I might got chance to find the person with whom I can spent my life. However all turned into illusions. And I just watched them sharing happy times with their lovers on the feeds on internet. It's still like illusions and nightmares I can’t get rid of.

Okay, I give up. I have to go back to my comfort zone and just stay there. And writing code.

On job

On next year

FP, GUI & writing, tiye.me. Chinese Blog: https://segmentfault.com/blog/jiyinyiyong

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store