To weigh clojure-china.org/t/cl…

In 2016, I was not very active in the React community. Although I still carried news and paid close attention to Jordan Walke’s news, I seldom used the new technologies in the React community. With Respo, I’ll be able to React against Vue. I consider myself a member of the ClojureScript community, and I won’t change that for a long time.

Cirru Editor

However, while I write ClojureScript, I don’t use EMACS, or any other IDE that Clojure users prefer. From the very beginning, my passion was Cirru’s solution to edit S-expression directly with web pages, and then rely on the code to generate text programmatically. Clojure has powerful macros that are actually much simpler to implement than JavaScript. So I did, and IT made me look like a loner.

One of the first people the Clojure community agreed with and encouraged me was Shaun, the author of Parinfer. Parinfer is a tool for automatically formatting Clojure code, like Prettier in JavaScript, although Prettier hadn’t been developed yet. Parinfer was also featured on Hacker News when it launched, earning more than 600 likes. Then I noticed that there is a “Acknowledgements” section at the bottom, which includes Cirru:

Cirru Sepal in Clojure has an interesting approach to inferring Clojure parens from indentation and other syntax sugar — $, $ [], $ {} and ,.

That’s the syntax of the early Cirru text, the indented version. Because Parinfer launched early. And then, this year, Shaun gave a speech at Clojure Conj, Inspiring a Future Clojure Editor with Forgotten Lisp UX-Shaun Lebron, So he went over the details of Cirru with me. Although I didn’t get deeply involved due to accidents, I gradually found that Cirru’s exploration direction was recognized and encouraged by him, and was quoted again recently. This time, I felt really flattered.

shadow-cljs

I got really impatient with ClojureScript in the summer and forgot exactly why, just frustrated. After all, it’s been a long time coming, the Webpack ecosystem is getting stronger, and ClojureScript doesn’t even allow me to use a comfortable packaging tool. In particular, you can’t generate file name hashes like Webpack and do Code Splitting. I started a post on a cold mailing list and would have cursed if MY English were good enough. Then I met Thomas Heller, who explained to me that there was a way. I finally asked him for the documents.

At that time, shadow-devTools seemed to be only used by him, although there was documentation, but like Webpack, god knows how to configure it. So I kept asking him how to use it on Slack. I don’t know exactly how it happened, but he just changed the project to shadow-ClJS and started adding the features I needed. ClojureScript to CommonJS, or ES6. Thheller provides a commonJS-compliant solution. However, compile with the JVM’s ClojureScript tool. Better than nothing, I guess.

I was surprised to learn that shadow-clJS actually provides direct installation of NPM modules so I don’t have to configure the JVM. Probably a great source of goodwill. So I started with nPM-Module format code generated by shadow-clJS in Webpack. The new project is a bit of a bummer, but thankfully Thheller is really passionate about it. I opened Issues on GitHub and often found him fixing and adding features overnight. So I don’t have to complain. Gradually, he convinced me that Shadow-ClJS had many features that Webpack could do, such as dynamic loading, Code Splitting, and hot file replacement monitoring. I gradually switched to the development scheme he recommended.

It was summer. It went well. Later, because I was lovelorn and went out to play everywhere, there was a period of time did not often go to see his news. It wasn’t until we accidentally chatted on Slack that he said that he was dealing with the problem of NPM module reference, and he wanted to use Webpack help to do THE PACKAGING of NPM module, but he didn’t have a good solution for several months. I was going to try other packaging tools, and I told him about RequireJS and Browserify, and he thought it was cool and wanted to give it a try. Unfortunately, the problem remained intractable until the end, and I don’t know how he solved it. The official ClojureScript compiler was also dealing with NPM module packaging at that time, but it came up with a good solution. So in the fall, browser-mode ClojureScript can reference NPM modules, and it even provides some proprietary methods in shadow-clJS.

Anyway, after half a year, I’m done with Thheller. If you check NPM info shadow-cljs, the entire shadow-cljs is updated almost every day, except in July and August when he seems to be experiencing some stupid things. From the beginning of the packaging tool, step by step into a variety of Webpack implementation of advanced development programs. I didn’t understand the error, so he added a color and a hint. I thought the JVM was too slow to start cold. He optimized the server mode and said it could be faster, and then he also had a manifest.json file like Webpack for packaging. He himself added a simple and crude CSS hot replacement. During this time, more and more users, and more features have been optimized. For me, experience is catching up with Webpack.

In the beginning, I kept some basic tutorials and demos for easy searching and dissemination, and pressed Thheller for documentation if he couldn’t write. Thheller was too busy to write documentation, but at least he wrote some. I ended up doing a lot of Reddit, so I helped promote shadow-ClJS as well, and added a sneer at Boot-Cljs and Lein-cljsbuild. After the amway crowd grew, someone asked on Reddit what was going on with Shadow-Cljs, and Theller responded. Shaun was also in touch with Thheller, so he joined in. I think boot and Lein have a good chance. As of now, shadow-ClJS is the most JavaScript developer-friendly and full-featured ClojureScript compilation tool available.

Cirru Cumulo Editor

For the first half of the year I was still using the Stack Editor, gradually migrating storage files to ir.edn, doing some generation definitions, finding dependencies, and various optimizations. I suddenly came up with a solution to real-time collaborative editing, such as a list. I generated an ordered ID for each node and supported infinite difference value. Then collaborative editing conflicts could be handled, so I concentrated on implementing bisection-key. Although based on the existing Cumulo synchronization scheme, the whole editor is rewritten, named cumulo-Editor.

I thought it was a really powerful breakthrough. I tried it at SHLUG’s party and showed it to people with Pad when JSConf came. I felt very proud of myself. I also made a lot of videos of Cumulo Editor during that time. I started out thinking, well, I’ve been out for a long time, so I’ll keep adding features, and maybe I’ll find a trial scenario. However, the actual situation was not as good as I imagined. I spent three weeks with no effect. Although several friends gave me good comments, I did not even have anyone to accompany me to test.

I got worse after my gastroenteritis in August. Hiding troubles to go to Guangzhou, Fujian, get a lot of other enlightening bar, but because of sunburn later hide do not love to see people. Ali went to the back of the interview, in Hangzhou, still want to live in Shanghai. And then opportunity came back to React. However, after several years of React and Vue, I no longer have a good impression of JavaScript. My thinking habits have also switched to Clojure, and I can write code with Cirru Editor much more smoothly than JavaScript. When you make something of your own, even if you go to the big god under the nose, but also have confidence.

The Cumulo Editor now makes it easy to jump to definitions, quickly search and switch functions, copy and cut expressions, and some primitive refactoring. It would have been hard to imagine a DOM editor handling code this easily in many years, but at least I’m working on it on my own, and I can see more improvements in the future.

Respo

Since the editor also relies on Respo, Respo is actually used heavily in my own scenarios. So the middle is being improved all the time. One of the most effective and obvious improvements is the introduction of the defcomp Macro, and the fact that div tags are defined by Macro. A lot of thought went into defining these tags in bulk. I started with Macro debugging. I went to the Lumo author to find out the problem about foo. Core $macros.

Debugging Macro requires some experience, and while it’s not difficult in itself, using ExpandMacro-1 is enough, it can be tricky at first. For example, symbol is evaluated several times, gensym is not realized to avoid variable duplication, or list is accidentally eval. After enough examples, it’s time to get the basics right.

One of Respo’s big early improvements is a simplification of the State Tree scheme, or semi-automatic and semi-manual writing. Switching from a node-location-based state tree to a manually controlled state tree resulted in a large number of respo-dependent projects needing to be updated. Including other Respo changes I made later, such as list->, also caused a lot of work.

Since the summer I have noticed that respO-related code is becoming more and more applicable, and more and more involved in my personal projects. At the same time, my scaffolding is constantly introducing updates from shadow-ClJS, Respo, Cirru, and maintenance costs are getting higher and higher. In the near future, I also plan to see what breakthroughs can be made under the Cumulo project. There are more warehouses to deal with.

ClojureVerse

I have some basic experience in running CNode and React China forums. When I came to Clojure, there was no forum for me. I got the permission to be the moderator of Clojure China forum early, but I never got up. I think there are too few people in China. Later, I saw that there is a ready-made ClojureVerse Discourse system, which is the same as Discourse system in foreign countries, so I needed the moderator’s authority and used it from time to time.

You’ve been around the English-speaking community long enough to get the hang of it. The main place of activity is the Slack group of Clojurians. If you have good English, you can barely get in, but it is difficult to talk about different time zones. Then there’s Reddit/Clojure. Although the appearance is not amazing, but the number of visits is relatively stable. What’s left is to socialize with a few of the community’s core developers on Twitter and basically see what’s going on. The most prolific blogger among them is Mike Fikes, who writes for Plank. I even doubt he’s the main developer of ClojureScript right now, because he does a lot of optimizations. And he has led almost all of the recent improvements to the REPL.

Then there are Google Groups, which are mailing lists. Clojure’s mailing list is fairly active, but ClojureScript’s is much worse. And I don’t want an editor and interface that’s so hard to use. If you have something good, send it to ClojureVerse, Markdown, how happy you are! And Plexus is really nice, answering the questions with great care.

And recently, he felt that there was hope for ClojureVerse to be relaunched. I was also taken him, the forum really active, a lot of big cattle in the community come to visit the door, do not know his contacts what situation. I happened to see an old post about his experience and he seemed to be the organizer of a party in Berlin… Anyway, compared to the domestic real awesome. Well, I feel hopeful.

At the end

ReasonML 3 has really jumped on the bandit lately with Jordan Walke. To my keen sense of smell, ClojureScript’s competitor is on the scene. I originally thought ClojureScript optimized the compiler experience, NPM also fixes the shortcomings, can be a good time to do JavaScript. But with all the new stuff coming out of the front end like WebAssembly, ClojureScript doesn’t really matter. Now Reason 3’s new syntax is really cool and spreads much faster than ClojureScript.

I’m a big fan of FP, ClojureScript isn’t going to catch on, and I’m looking forward to ReasonML development, so ALL I can do is focus on Learning ReasonML. So far Reason React just gives a nice solution at the component level. By the time global state and asynchronous operations are complete, investment is expected. TypeScript is awesome, but how about a language designed by the original React authors that works better with React?

Going back to the ClojureScript community side of things, since I spent two years developing the base components, I definitely expected a superstructure. I will also try to demonstrate the power of ClojureScript to improve development efficiency. Maybe Lisp isn’t really for people with little development experience and therefore little self-discipline or even basic FP theory, but I’ve seen how powerful it is, and I’m going to take it down and give it to others. On the other hand, I got to know a few of the developers in the ClojureScript community well enough to know how capable and thoughtful they are. The JavaScript community, while strong, is fraught with noise and compromise. Wait for the WebAssembly platform language up, don’t fall out genius strange.

Finally, what kind of developer do you want to be, and what community of core developers do you want to be in the future?