A person's clojurescript technology stack

Source: Internet
Author: User
Tags diff clojurescript

Title Leaf
Links: https://zhuanlan.zhihu.com/p/24425284
Source: Know
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

Today (yesterday), sharing the topic of Clojurescript, is a true burden. I have a bad voice, previously shared React, but compared to the online is always a lot worse, this sharing is also tense, the venue of the Keynote did not in accordance with the expected high place, there is no next page preview, watching the big screen convergence did not do well. But really in the mind still disturbed, asked the classmate is very sharp, a few in the idea, about Redux also has the depth of the transfer of properties, as well as the global state problem, in fact, I did not think clearly, I have their own plans, but there is not enough to persuade others of the scheme.

In fact, my role is to repeat the program of the foreign community, and then add my own understanding to strengthen the interpretation of the technology. After all, it is not good to pass a layer of relaying. Questions related to the question, in fact David Nolen have proposed the program, the global state and similar to the GRAPHQL problem. I'm not thoroughly understand, it's true. There is a chance to go to Youtube and brush up on the video about Clojurescript at the conference.

I am confident that functional programming is right, first of all abroad has been practiced, and secondly I use it to feel reliable. The mainstream front-end does not look at the Clojure conference video, in fact few channel reports can be informed of the report. I saw the reason why I dug React and Haskell, so I know. Obviously, foreign countries are not uncommon. But in the Chinese technical community there is little voice in this area, let alone the pain of the egg to write Clojurescript code. But I need to. I have previously promoted React results in the face of so much anticipation of complexity, I urgently need an explanation, I needed to find my fulcrum and direction. Maintain peace and prevent your own world view from collapsing.

My worldview is really fragile, just like many people who go to work in big cities from small towns, the whole process is the process of disintegration and reconstruction of the world view. By the time of programming, from the very beginning of CSS, to the writing of code, to the discovery of programming paradigms, to the history of digging functional programming, I spent a great amount of effort to avoid crashing. I'm not much of a JavaScript programmer, but a long time to mingle with Clojure, Haskell, Elixir circles. According to my judgment, the future of these languages will be more and more important, as to whether to enter the top 10 of the language list, I do not care, influence is all aspects, such as Haskell's research seemingly rambling, has actually affected the C # Swift Coffeescript and so on language design.

Know about D2 a classmate mentioned that I am very lonely, in fact, I think this is so. Although not necessarily the right direction, but I really go well far away, really have a feeling of loneliness. Usually I met Clojure problem to go to the English community to ask Clojurescript maintainers, this is normal, but I use the Stack Editor all over the world I am afraid that only I am using, and then the maintainer said your things are strange, and our usual is not the same so can not help you ... So I was told by a small language developer that my stuff is rare ... In addition to the Stack Editor, Respo is similar, RESPO's function is not comprehensive, of course, others are not willing to use the production environment. Although there are a few characteristics of novelty, but the result is still my own use.

I also built a team to maintain my project on GitHub, open dozens of warehouses, and the result is that I am a man turtle fast heap code. Respo, Cumulo, Cirru are some of the most serious. Of course the introduction has been quite a lot. I am not the front-end of their positioning, but these years in the back-end and design direction I can say progress micro-tree, has no confidence, even if the young, just programming on the pit can drag me for a long time. Look at the whole history, it seems that it should be so, we all see the light in front, but walk in front of the person will be filled with near the pit, the result tired slow down, the newcomer to overtake to the front. I'm doing some messy stuff, and there's a lot of people behind me who do a lot more than I do, and that's what I'm looking for.

Lisp in the domestic lack of sound, the famous probably Chih Common Lisp, Wang Yin Scheme, other rarely seen in the community. Clojure Community of course we have Lo sister, but they live in England. As for other friends in the group, the front circle should be heard very rarely. But Lisp is very important, Song Hong said, look at a country's present and future, depends on his history, the exact words of course is not accurate, I want to say that for programming, there are also historical factors. Object-oriented half a century, functional programming half a century, if only in the face of JavaScript these years of news, it is a narrow point. JavaScript is perhaps the most rapid development of the ecology so far, it is quite exaggerated. However, in the face of real-world problems, it is still necessary to seek to rely on, programming theory and engineering experience is an important source of knowledge, that is, more than half a century of computer theory and engineering research.

Where's Clojure? What I care about most is that the various functions of Clojure are well thought-out, and I mean the core of the language itself, what features the language adheres to, and what compromises are made. Of course this does not mean that Clojure is not a problem, but compared to static type language coding cost and strict, compared to the rambling script language, Clojure in which maintained a very subtle state. Similar languages are of course, but in the front-end use domain, Clojurescript is a relatively complete and ecologically sound language in addition to JavaScript. TypeScript is not compared because it is a static type. Clojure also strives to find balance between functional programming and operational side-effects, both by using functional programming to enhance the reliability of the program and by considering how it is handled in the actual operating state.


I have posted on Weibo, I think the JavaScript community is actually the process of the game. The original factory competition, Apple has objective-c and Swift and so on, Microsoft has the. Net platform a large number of programming languages, Microsoft is open, although Apple with IOS to overtake again. But Mozilla and Google, as the latter, launched wars in new areas, especially Chrome, which ignited the performance of JavaScript engines and the strategy of a series of WEB platforms. Facebook also wanted to find a breakthrough on the HTML5, though it was a failure, but to React, Webpack, Babel's current influence in the community, has opened up a new battlefield. The user is certainly one aspect, but who attracts and controls the developer, who's right of voice will still be very big. And TypeScript, Dart, Babel to the developers of the scramble, Angular, React to the developers of the fight, some degree can be considered that competition will not eliminate.

In contrast, in particular, before Apple can compete at the language and operating system level, and now because of the particularity of JavaScript, the battlefield is very small, there is almost a melee. ECMAScript need to have a unified standard, but different manufacturers will have different technical points of interest in the appeal. D2 also listened to the Ghost Tao explained again, React Native for a long time not to accept the improved code of one of their features, possibly due to the more in-depth modification. But the interests of the company are the interests of the company. When Google or Microsoft force in their own browser to add a variety of magical features, it is also faced with such embarrassment. Facebook has made the compilation so complicated because everyone feels that JavaScript is a language that needs to be done according to the standard, separating the stage function and various configuration items. Then the community is also a variety of styles of mutual impact, routines can not how much.

So of course, I saw WebAssembly two update three companies to update the blog together, I almost have to fall off the glasses. The attitude is so consistent! I guess they really wanted to do it after all. Like Clojure, a company that controls the core of a language, designs a tool chain in accordance with a particular habit, and takes the time to polish the development experience and migrate the successful experience of VS. WebAssembly not only improve performance, but also as a compilation, and let the sound from the beginning of the Coffeescript 2009, finally see a clear way out, the WEB is the need for a new assembly, rather than JavaScript alone. You can then build your own perfect toolchain, stable grammar and language features, type inference type checking, IDE and various build tools, platform APIs, and more. A better future.

Of course I was in a hurry. Plus three months at the beginning of the time of the unemployed, in addition to summing up the Respo, Quamolit, Cumulo, cirru Several project thinking, I spend a lot of time in the familiar with the clojurescript of thinking, into the job of my JavaScript package or in situ tread The state, anyway the company directly ESlint. So I used clojurescript to build the whole set I React Webpack in the original toss of the hot replacement development environment, including the pure Clojurescript implementation of the React theme function is Respo, as well as encoding from the Sublime Text Moved to Cirru light editor and upgraded the light editor to Stack editor in the second half of the year, which is already a chain of tools that others are completely unfamiliar with.

The title of the article is about my technology stack, the length of the following is a rough introduction:

Respo

    • Home/ http/respo.site/
    • GitHub Team RESPO

I implemented the Virtual DOM scheme with Clojurescript. The overall use of pure render so there is a lack of side effects, such as custom components, but there is a lot of comfort in Virtual DOM operations and hot replacements, but I think the DSL is quite handy. Performance I have done a lot of optimization, the overall will be more than the framework of React and so many times, probably should be at an order of magnitude. I've compiled an explanation of the API and terminology, and I've written a pure clojurescript examples, which can be found on the GitHub page. Other commonly used components, such as UI and router, have been piled up according to my React experience, of course, the volume is too small.

Stack Editor

    • Home https://github.com/cirru/stack-editor

It is actually the Clojure form of the Cirru project, the AST is edited on the DOM, and the backend generates Clojure code. Because it is the editor of the graphical interface, I can use the front-end code to achieve a simple jump to the definition, automatically generate variables. One of the most important ideas in Stack Editor is that the sidebar should show the function name or variable, and it is displayed according to the call stack, thus facilitating the development of specific functions. From the actual use of the effect is really faster than Sublime Text handwriting. I often send videos on Weibo and I'm interested to see them.

Stack Workflow

    • Project https://github.com/mvc-works/stack-workflow

Since Respo and Stack Editor bring in template code, I need a project as a template project, which is actually intended. Through the template code, my development habits are actually stabilized and can be improved incrementally. In fact, in this workflow, the project source code is stored with an. ir file, and the CLJS codes in SRC are compiled. I think this should be beyond the imagination of many people.

Cumulo Workflow

    • Project https://github.com/cumulo/cumulo-workflow
    • Core optimization algorithm https://github.com/cumulo/recollect

Cumulo project related to the sharing of the service end to the front-end data synchronization, the most brutal way is to use the diff directly, of course, I am not completely not optimized the kind of diff, or based on pure functions and cache optimization. So I moved the RESPO Store directly to the server to write. Of course, this is a relatively early stage of the project, performance is far from enough. But with clojurescript service side hot replacement function, development or quite smooth, before I use Webpack service side hot replacement to do the revision code WebSocket constantly open, and in the Clojurescript environment more simple.

There are a few other gadgets, but none of them are as important as the above. I know these projects will be wonderful for others, but it's a good start for me.

A person's clojurescript technology stack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.