<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>David Mohl</title>
    <description>A microblog about technology, programming and the industry. :wq
</description>
    <link>https://dvcrn.github.io/</link>
    <atom:link href="https://dvcrn.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 07 Dec 2021 07:50:01 +0000</pubDate>
    <lastBuildDate>Tue, 07 Dec 2021 07:50:01 +0000</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>Hello (Neo)Vim, good to see you again!</title>
        <description>&lt;p&gt;It’s weird that I am writing about editors so much but trying a new editor every few months kind of
became a tradition.  It spices things up and allows me to learn something new that I maybe didn’t know yet before. Or just discover a new tool that improves my workflow.&lt;/p&gt;

&lt;p&gt;When I wrote about spacemacs, I thought spacemacs would be the thing that I would use for everything. Then I ported it to atom with &lt;a href=&quot;https://github.com/dvcrn/proton&quot;&gt;proton&lt;/a&gt; and thought that would be the tool I would be using for everything since I could just implement features on the spot that it didn’t have yet. So what happened that I am writing about editors again?&lt;/p&gt;

&lt;p&gt;As a VIM fan, I like micro optimizations. One thing in my workflow that I couldn’t stand was hammering &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;j&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;j&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;j&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;j&lt;/code&gt; to go down instead of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4j&lt;/code&gt;. I knew this keybinding was a lot faster, I just couldn’t get to teach myself to actually use it. After a bit of research I couldn’t find anything that helps me inside atom or emacs - but I found &lt;a href=&quot;https://github.com/wikitopian/hardmode&quot;&gt;hardmode for vim&lt;/a&gt;. It was a bit overkill since it disables all &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hjkl&lt;/code&gt; keys but a good start. Then I found &lt;a href=&quot;https://github.com/takac/vim-hardtime&quot;&gt;hardtime&lt;/a&gt; and it was like my prayers have been answered 🙏. It allows me to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hjkl&lt;/code&gt; exactly x times - and I can specify how much x is! Only problem - I need to use raw VIM.&lt;/p&gt;

&lt;h2 id=&quot;hello-neovim-again&quot;&gt;Hello NeoVim (again)&lt;/h2&gt;
&lt;p&gt;Instead of vim though I grabbed NeoVim as my weapon of choice. Stuffed in my old config file just… to realize that things are not working the way I want them to. Plugins were outdated, keybindings were ‘meh’ and my &lt;a href=&quot;https://github.com/dvcrn/dotfiles/blob/master/vim/.vimrc&quot;&gt;old vimrc&lt;/a&gt; a complete mess. How were I ever able to work with this??&lt;/p&gt;

&lt;p&gt;It had to go and something new had to be in it’s place, so I opened up a new vim pane and started hacking on my new vimrc with the goal that everything I use should be heavily optimized, consistent and use NeoVims async features if possible. No more &lt;a href=&quot;https://github.com/scrooloose/syntastic&quot;&gt;syntastic&lt;/a&gt; lags on linting - &lt;a href=&quot;https://github.com/benekastah/neomake&quot;&gt;neomake&lt;/a&gt; runs completely async!&lt;/p&gt;

&lt;p&gt;I replaced vundle with the async &lt;a href=&quot;https://github.com/junegunn/vim-plug&quot;&gt;vim-plug&lt;/a&gt; and re-added crucial packages that I needed - but something was still missing. I can’t just assign random leader keybindings after having such a blast with the spacemacs mnemonic. After changing the leader to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;SPC&amp;gt;&lt;/code&gt; and re-arranging the keybindings a bit I was quite surprised to see what I ended up doing - &lt;a href=&quot;https://github.com/dvcrn/dotfiles/blob/master/vim/nvim/keybindings.vim#L70-L112&quot;&gt;re-creating mnemonic keybindings in vim&lt;/a&gt;! I also went the extra steps and moved everything related into a package of some sorts. A bit of sourcing here and there and suddenly &lt;a href=&quot;https://github.com/dvcrn/dotfiles/blob/master/vim/nvim/.nvimrc#L79-L104&quot;&gt;I had “layers”&lt;/a&gt;! Just like in proton or spacemacs!&lt;/p&gt;

&lt;h2 id=&quot;quality-plugins-ahead&quot;&gt;Quality plugins ahead&lt;/h2&gt;

&lt;p&gt;What eventually got me really into vim were probably the amazing plugins of &lt;a href=&quot;https://github.com/junegunn/&quot;&gt;junegunn&lt;/a&gt;, the guy that wrote vim-plug. I am absolutely impressed about the quality of these and didn’t have this much fun with vim for a long time. Stuff like &lt;a href=&quot;https://github.com/junegunn/fzf&quot;&gt;fzf&lt;/a&gt; makes almost every command feel consistent.&lt;/p&gt;

&lt;p&gt;He even wrote a color scheme using the official colors of probably my favorite city on the planet - &lt;a href=&quot;https://github.com/junegunn/seoul256.vim&quot;&gt;Seoul&lt;/a&gt;. Just look how pretty it is:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/neovim-1.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In all seriousness, his plugin collection is amazing and I can highly recommend you to check it out if you are using vim. He might be the next tpope!&lt;/p&gt;

&lt;h2 id=&quot;tldr&quot;&gt;tl;dr&lt;/h2&gt;

&lt;p&gt;hardtime for vim made me go back into vim territory and NeoVim made me stay.&lt;/p&gt;

&lt;p&gt;If you are a gvim guy like me, check out &lt;a href=&quot;https://github.com/equalsraf/neovim-qt&quot;&gt;neovim-qt&lt;/a&gt;. It is a lot faster performance wise and more stable than &lt;a href=&quot;https://github.com/rogual/neovim-dot-app&quot;&gt;Neovim.app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also my &lt;a href=&quot;https://github.com/dvcrn/dotfiles/tree/master/vim/nvim&quot;&gt;nvim dotfiles&lt;/a&gt; are a great starting point to get into vim. Everything is written very decoupled so you could just use whatever modules / packages you want and not source the rest.&lt;/p&gt;

&lt;p&gt;Do I now use vim for everyting? Nah, probably not. proton is still my main weapon. These days I’m on a VIM streak with the goal to master the more advanced text navigation commands but most of time time proton (if the atom-shell wouldn’t suck so much battery….).&lt;/p&gt;

&lt;p&gt;Let me know your thoughts &lt;a href=&quot;https://twitter.com/davicorn&quot;&gt;on twitter&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Fri, 22 Jan 2016 10:30:23 +0000</pubDate>
        <link>https://dvcrn.github.io/elixir/clojure/clojurescript/2016/01/22/hello-neo-vim.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/elixir/clojure/clojurescript/2016/01/22/hello-neo-vim.html</guid>
        
        
        <category>elixir</category>
        
        <category>clojure</category>
        
        <category>clojurescript</category>
        
      </item>
    
      <item>
        <title>Sweet, sweet Elixir - the language of my dreams?</title>
        <description>&lt;p&gt;I like learning new languages, I think that’s no secret. It’s a fun task that teaches you new interesting takes on existing problems. A language can make your programmers life very easy but could also turn it into a living hell. In fact, I am always on the hunt to find the &lt;em&gt;perfect&lt;/em&gt; language for me. That thing that I &lt;strong&gt;want&lt;/strong&gt; to use for everything.&lt;/p&gt;

&lt;h3 id=&quot;meet-clojurescript&quot;&gt;Meet ClojureScript&lt;/h3&gt;

&lt;p&gt;Lately I’ve been doing a lot of clojure. I am glad that I finally arrived at a point where I don’t have to look into the documentation just to find out how to append something to a vector. Clojure is &lt;strong&gt;extremely well&lt;/strong&gt; designed. I learned a lot just by listening to talks (especially the rich hickey ones!) and reading about the languages’ core concepts and the reasons behind them. But above all, Clojure is just fun to use and ClojureScript is even more fun! I love using it and even wrote a &lt;a href=&quot;https://github.com/dvcrn/markright&quot;&gt;MarkDown editor&lt;/a&gt; in it.  Lately clojurescript ended up becoming the magic that fueles my &lt;a href=&quot;https://github.com/dvcrn/proton&quot;&gt;entire main editor&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What’s amazing about ClojureScript is that it can literally go everywhere javascript can go and man can javascript go to places these days. I even started to build freaking &lt;a href=&quot;https://dvcrn.github.io/clojurescript/react/2015/11/19/my-cljs-talk.html&quot;&gt;native apps&lt;/a&gt; with it! Imagine I would tell that to someone a few years back:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;A: Oh that app looks cool. How did you build it?
B: Ah I’m using clojurescript to control the native view properties.
A: cloj… what? 
B: Yeah, it cross compiles to javascript.
A: Javascript? native?
B: Javascript is then using react native to bridge into ObjC
A: 😮
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I like clojurescript to that degree that I start to feel bothered if someone asks me to write raw javascript these days. I like it that much.&lt;/p&gt;

&lt;h3 id=&quot;clojure&quot;&gt;Clojure&lt;/h3&gt;

&lt;p&gt;The only thing I am not 100% happy with right now is… well… clojure! I tried a few times to use it on the serverside but it just never felt completely right to me. I ended up searching all these little building blocks like migrations, database connections, router and templating, and proceeded to stack them together… somehow.&lt;/p&gt;

&lt;p&gt;Then there was the big problem of libraries getting abandoned. Here’s a example: When I wrote my first server it took me ages to find &lt;a href=&quot;https://github.com/budu/lobos&quot;&gt;lobos&lt;/a&gt; - the migration library everyone told me to use. Shortly after, it turned inactive and communication around it died. Suddenly noone wanted to use lobos. A few questions here and there and people told me to &lt;em&gt;just&lt;/em&gt; write SQL files and pipe them with clojure into the db.&lt;/p&gt;

&lt;p&gt;Clojure people feel to me like these people that like to build stuff raw and by themselves. To have full control over every aspect and if a building block doesn’t exist yet - it will just get written on the spot.
My server eventually worked and that is what counts, right? But I wasn’t happy maintaining it. All these lego bricks felt glued together in a not stable way.&lt;/p&gt;

&lt;p&gt;So I kept going on my way, sometimes using clojure, but most of the times django for my server stuff. I kept adding things to my &lt;em&gt;you-should-check-that-out-list&lt;/em&gt; including Go, Rust, and a few frameworks here and there, just waiting for me to have some more free time.&lt;/p&gt;

&lt;p&gt;A few days ago I wanted to start a new side project - an app to be specific. My fingers were itching to do a real world app in clojurescript but needed something for the server. I started mocking things up with django but then took a short look at my list. On first place was something called &lt;em&gt;elixir&lt;/em&gt;. “Elixir, huh?”, I thought and opened the website&lt;/p&gt;

&lt;h3 id=&quot;hello-elixir&quot;&gt;Hello Elixir&lt;/h3&gt;

&lt;p&gt;When I first checked out Elixir I didn’t think of much. Looks like ruby and feels like ruby with a bit of clojure sugar sprinkled in. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;|&amp;gt;&lt;/code&gt; operator is obviously taken straight out it. Atoms are no longer state containers but now what I would call… a keyword? In any way, being a functional language inspired by clojure and coming directly &lt;em&gt;from&lt;/em&gt; clojure I felt home right away.&lt;/p&gt;

&lt;p&gt;I downloaded &lt;a href=&quot;http://www.phoenixframework.org&quot;&gt;phoenix&lt;/a&gt;, figured out &lt;a href=&quot;https://github.com/elixir-lang/ecto&quot;&gt;ecto&lt;/a&gt;, hacked my API server together and went on with my app. That was until I had to implement a image upload and resize service to s3.&lt;/p&gt;

&lt;p&gt;My django instinct told me to find the &lt;a href=&quot;http://celeryproject.org&quot;&gt;celery&lt;/a&gt; of the elixir world but what came next completely changed my way I looked at the language.&lt;/p&gt;

&lt;p&gt;You see - I didn’t read the entire documentation on elixir-lang (which I should have done). I wanted to get a feel for the language first before going into all the little details. When I asked on the elixir slack for the idiomatic way of implementing a worker I got pointed to the &lt;a href=&quot;http://elixir-lang.org/getting-started/processes.html&quot;&gt;processes&lt;/a&gt;, &lt;a href=&quot;http://elixir-lang.org/getting-started/mix-otp/agent.html&quot;&gt;agents&lt;/a&gt; and &lt;a href=&quot;http://elixir-lang.org/getting-started/mix-otp/genserver.html&quot;&gt;genserver&lt;/a&gt; guides.&lt;/p&gt;

&lt;p&gt;I knew that elixir is running inside the erlang VM but I never used erlang before and all I knew about it was from hearing about it.&lt;/p&gt;

&lt;h3 id=&quot;mind--&quot;&gt;Mind = 💥&lt;/h3&gt;

&lt;p&gt;To summarise it very short: The concurrency handling of elixir is just effing amazing. Without any troubles and at any time you can spin up subprocesses, pass stuff to them, link them together and build your little network.&lt;/p&gt;

&lt;p&gt;Processes are completely isolated and very well managed. I never had the feeling that using processes will now lock me into a big  headache network of synchronisation, orchestration and possible chaos. And even if something goes wrong - elixir and erlang actually &lt;em&gt;encourage&lt;/em&gt; you to let things fail! No try/catch blocks and exception handling. You just let the process fail and the supervisor will take care of troubleshooting and restart that thing - just like that!&lt;/p&gt;

&lt;p&gt;Here’s an example that really shows how powerful this is: State management! The recommended way of storing state in elixir is… a process! You have a process that holds your piece of state and reacts to defined messages passed to it: e.g. &lt;em&gt;store&lt;/em&gt; and &lt;em&gt;retrieve&lt;/em&gt;. I mean… what?!&lt;/p&gt;

&lt;p&gt;If you now connect another node to your mesh network, that node could immediately send messages to the same state management process if it knows it’s identifier (e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:kwstore1&lt;/code&gt;). Just like that you suddenly have state management - but synchronised on multiple machines… I mean… what?!?!&lt;/p&gt;

&lt;h3 id=&quot;the-joy-of-concurrency-and-even-more---&quot;&gt;The joy of concurrency and even more 😮 = 💥&lt;/h3&gt;

&lt;p&gt;Elixir doesn’t care if you have 1 node or a thousand. It directly works with all of them right away.&lt;/p&gt;

&lt;p&gt;Let’s go back to my image upload and resize example: In django I would take the image, push it to s3, push a message into amqp / redis, tell the user “success” and let a worker process the resizing before marking the image as “processed” in a db. 3 components: Web server, queue server, worker.&lt;/p&gt;

&lt;p&gt;Now elixir. I take the image, put it on the disk and push the original to s3. I tell the user “success” but at the &lt;em&gt;same time&lt;/em&gt; spin up a child process with the reference to image on the disk. The user gets his “success” but the child process lives on! It does it’s resizing stuff, uploads to s3, updates the db and if something goes wrong like a timeout from s3, then so what? It just crashes, the supervisor restarts the process and it tries again. All while the user is already gone! Without a queue! Without a worker! Out of the box!&lt;/p&gt;

&lt;p&gt;To give that more context, on heroku with django I would have to scale up another worker process (costs $), add a amqp server (even more $) and let everything run at the same time. On heroku with elixir I can literally have all of that inside a free dyno! I could even spin up 50 worker processes and it could still run inside the same free dyno without a cent extra if I am nice with memory.&lt;/p&gt;

&lt;p&gt;And you know actually how easy it is to spawn a simple child process?&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;spawn fn -&amp;gt;
	IO.puts “Hello from Child”
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But I’m just scratching the surface of this amazing language. Phoenix for example has built in support for websockets, you know what this means when it comes to elixir? You could connect to server1, I could connect to server98934 which is part of the same mesh and we could &lt;strong&gt;still&lt;/strong&gt; chat with each other without any extra work!&lt;/p&gt;

&lt;p&gt;Elixir made it damn appealing to use concurrency programming. I never fear that I will break something essential because it is just this well done. It is designed that it actually encourages you to use these features more often - because seriously, why wouldn’t you?&lt;/p&gt;

&lt;h3 id=&quot;scripted-elixir&quot;&gt;Scripted Elixir&lt;/h3&gt;

&lt;p&gt;Amazing syntax, functional programming, REPL driven development, unbeatable concurrency model - how could you make this language even more attractive? I will tell you how:&lt;/p&gt;

&lt;p&gt;Elixir has 2 ways of executing your code: Pre-compiled and scripted. Pre-compiled means that once you are ready to run your app you tell elixir (or mix) to compile everything down and execute it. But what could &lt;em&gt;scripted&lt;/em&gt; mean?&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[i] λ elixir -e ‘IO.puts “Hello World”’
Hello World
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;…that’s what it means! Elixir comes with a &lt;a href=&quot;http://elixir-lang.org/getting-started/modules.html#scripted-mode&quot;&gt;scripted mode&lt;/a&gt; that compiles your code on the spot in memory before executing it! No slow spinning up java to execute your clojure code or compile it into javascript. Executing elixir in scripted mode takes 1 second at max and doesn’t require you to have anything set up. No project, no mix - nothing.&lt;/p&gt;

&lt;h3 id=&quot;the-language-of-my-dreams&quot;&gt;The language of my dreams?&lt;/h3&gt;

&lt;p&gt;I know it is too early to judge but I really like Elixir. I didn’t have this much fun programming on the server since I initially discovered django. Pair Elixir on the server with clojurescript on the client and you have the stack of my dreams - powerful and fun programming on the client and server at the same time (let’s call it &lt;em&gt;dave-stack&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;I will continue my journey with Elixir. If you didn’t check it out - I highly urge you to do so. It could very easily become the next ruby in a very short time.&lt;/p&gt;
</description>
        <pubDate>Fri, 22 Jan 2016 10:30:23 +0000</pubDate>
        <link>https://dvcrn.github.io/elixir/clojure/clojurescript/2016/01/22/sweet-sweet-elixir.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/elixir/clojure/clojurescript/2016/01/22/sweet-sweet-elixir.html</guid>
        
        
        <category>elixir</category>
        
        <category>clojure</category>
        
        <category>clojurescript</category>
        
      </item>
    
      <item>
        <title>Spacemacs for atom - a few weeks later</title>
        <description>&lt;p&gt;I recently &lt;a href=&quot;/clojurescript/2015/11/27/spacemacs-for-atom.html&quot;&gt;wrote&lt;/a&gt; about my attempt to bring spacemacs style editing to atom. A lot of stuff happened that I wanna tell you about!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/dvcrn/proton/master/plugin/resources/showcase.gif&quot; alt=&quot;showcase&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;in-review&quot;&gt;In review&lt;/h3&gt;
&lt;p&gt;Since the last post, &lt;a href=&quot;https://github.com/dvcrn/proton&quot;&gt;proton&lt;/a&gt; acquired 72 stars, 13 watches and 4 forks. We now have 3 people that actively contribute changes.&lt;/p&gt;

&lt;p&gt;Proton became a good amount more stable, removed a lot of the ugly hacks it had in the beginning and added some really cool stuff on top. Let me give you a short overview:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;We started creating a better default experience. The goal is that you just install proton, it reads your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.proton&lt;/code&gt; and bam! You have a superb editor experience. Since 0.1.2 we ship a better theme, a better font, better default settings and put a lot more power into the dotfile.&lt;/li&gt;
  &lt;li&gt;Step by step we are trying to allow users to toggle the entire atom experience from within &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.proton&lt;/code&gt; or through the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;spc&amp;gt; t&lt;/code&gt; menu. We created the base for pulling stuff like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;spc&amp;gt; t n&lt;/code&gt; for relative line numbers off (which by the way is in a third party package and not part of atoms core) or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;spc&amp;gt; t t&lt;/code&gt; to disable the tab-bar (which &lt;strong&gt;is&lt;/strong&gt; a core package).&lt;/li&gt;
  &lt;li&gt;You can swap-out components more easily. Say you like &lt;a href=&quot;http://nuclide.io/&quot;&gt;nuclide&lt;/a&gt; and you want to use their quick-open tool instead of the default one. Now all you have to do is swap &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;proton.core.quickOpenProvider&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:nuclide&lt;/code&gt; and proton will replace it. Following this, adding different providers like swapping the file-tree with something else in the future will be no problem.&lt;/li&gt;
  &lt;li&gt;We have context aware shortcuts and modes &lt;a href=&quot;https://github.com/dvcrn/proton/pull/27&quot;&gt;on the way&lt;/a&gt;! This means that your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;spc&amp;gt;&lt;/code&gt; menu could change depending on what file you are editing. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;spc&amp;gt; m =&lt;/code&gt; in python could execute yapf while in javascript, it could use js-beautify. This would make proton a truly dynamic experience.&lt;/li&gt;
  &lt;li&gt;We added a handful new &lt;a href=&quot;https://github.com/dvcrn/proton/tree/master/src/cljs/proton/layers&quot;&gt;layers&lt;/a&gt; with more being added over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The crazy thing is that proton already bypassed &lt;a href=&quot;https://github.com/dvcrn/sublimious&quot;&gt;sublimious&lt;/a&gt; in popularity, functionality and features.&lt;/p&gt;

&lt;h3 id=&quot;live-reloading-inside-atom&quot;&gt;Live reloading inside Atom&lt;/h3&gt;
&lt;p&gt;Thanks to the amazing &lt;a href=&quot;https://github.com/thheller&quot;&gt;thheller&lt;/a&gt; we now even have full support for hot code reloading while developing proton. It goes even this far that we might even be one of the onlys plugin out there that was able to pull this off with full REPL integration! Even the guys at the &lt;a href=&quot;http://discuss.atom.io&quot;&gt;atom forums&lt;/a&gt; couldn’t do that 😁&lt;/p&gt;

&lt;p&gt;With this new and even more stable build process, creating plugins in atom has never been this fun and easy! (&lt;a href=&quot;https://github.com/dvcrn/ajom&quot;&gt;ajom&lt;/a&gt; has been updated with the latest changes.)&lt;/p&gt;

&lt;h3 id=&quot;the-future&quot;&gt;The future&lt;/h3&gt;
&lt;p&gt;I am very impressed to see how proton is doing. As assumed, clojurescript is making atom such a powerful tool with a lot of unused potential. With &lt;a href=&quot;https://github.com/dvcrn/proton/pull/27&quot;&gt;modes-ish&lt;/a&gt; stuff on the way, we could even see something similar to emacs’s modes in the future. Just imagine that, composing modes inside atom! (Just wondering when the atom API will become limiting…)&lt;/p&gt;

&lt;p&gt;Proton is on a steady way to become your central gateway when interacting with atom. Leveraging clojure goodies and now even support for live reloading and REPL development - developing a atom extension has never been this fun.&lt;/p&gt;

&lt;p&gt;Now just to hope that more people adopt this and we might see more high quality and faster developed extensions on the way.&lt;/p&gt;

&lt;p&gt;Spacemacs, we are coming for you!&lt;/p&gt;
</description>
        <pubDate>Thu, 10 Dec 2015 11:59:23 +0000</pubDate>
        <link>https://dvcrn.github.io/clojurescript/2015/12/10/proton-a-few-weeks-later.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/clojurescript/2015/12/10/proton-a-few-weeks-later.html</guid>
        
        
        <category>clojurescript</category>
        
      </item>
    
      <item>
        <title>Spacemacs for Atom</title>
        <description>&lt;p&gt;If you read my last posts you might notice that I really like editors. Something about finding better and better tools is very interesting and fun. Plus using a new tool for a couple of weeks is keeping things fresh even when you work on the same codebase.&lt;/p&gt;

&lt;p&gt;The problem is that since I started using &lt;a href=&quot;http://dvcrn.github.io/2015/10/13/my_dream_editor.html&quot;&gt;spacemacs&lt;/a&gt;, I can’t really use anything else. It just… doesn’t work. The shortcuts are too awkward, get overriden by third party plugins and all the manual config orchestration is just a pain.&lt;/p&gt;

&lt;p&gt;When I went back to Sublime Text for a little, I ended up writing &lt;a href=&quot;https://github.com/dvcrn/sublimious&quot;&gt;sublimious&lt;/a&gt;, a plugin which ports a big chunk of the spacemacs toolset into Sublime Text:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://i.imgur.com/MqsB6Pt.gif&quot; alt=&quot;sublimious&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It works &lt;strong&gt;really REALLY good&lt;/strong&gt;! But eventually I ran into problems implementing more things. Stuff like relative line numbers is close to impossible to do without a big performance hit or awkward behavior. Or the gutter still only being able to hold 1 element in it. What’s up with that?&lt;/p&gt;

&lt;p&gt;Performance wise it is crazy fast but let’s face it: Sublime Text is dead even if the community doesn’t want to admit it. Waiting until John Skinner to come along and commit a new feature once a year is just taking too long.&lt;/p&gt;

&lt;h3 id=&quot;my-first-time-with-atom&quot;&gt;My first time with Atom?&lt;/h3&gt;

&lt;p&gt;Now I am a little bit biased towards atom. I looked at it multiple times but it felt too slow, too in-performant and most of the plugins were just trash-level (sorry if I insulted some of my readers but they are just… not good!).&lt;/p&gt;

&lt;p&gt;All the problems I have about plugins overwriting keybindings are here stronger than anywhere else. A plugin can literally change every little aspect of the editor. This is a really great thing, don’t get me wrong! But at the same time you need to take double care of what you are installing.&lt;/p&gt;

&lt;p&gt;Github also did a lot of weird design decicions that I can’t follow. Here are a few:&lt;/p&gt;

&lt;h5 id=&quot;emoji-as-commit-messages&quot;&gt;Emoji as commit messages&lt;/h5&gt;
&lt;p&gt;I tried to nibble my way through the codebase and recent changes a bit but emojis… man. I mean, it’s cool that you have fun with it but for outsiders it’s unnecessary confusing. 🎨 is probably style related, I get that, but what the heck is 📝? 🔥?&lt;/p&gt;

&lt;p&gt;Plus using emojis is not a substitute for a commit message. It’s like me commiting with the word “style.”&lt;/p&gt;

&lt;h5 id=&quot;coffeescript&quot;&gt;Coffeescript&lt;/h5&gt;

&lt;p&gt;I used to like coffeescript a lot but reading through the atom sourcecode made me realise why I will probably not touch it again.&lt;/p&gt;

&lt;p&gt;Take this snippet for example:&lt;/p&gt;

&lt;div class=&quot;language-coffee highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;vi&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;eventElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dispatchEvent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CustomEvent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;bubbles&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;cancelable&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What is it doing? Why do some of the arguments have colons? Where does the object start and where does it end? The constructor is getting 3 arguments, right? Right?&lt;/p&gt;

&lt;p&gt;I literally had to run this through a coffeescript parser to understand what it’s doing:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;eventElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dispatchEvent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;CustomEvent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;bubbles&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;cancelable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h5 id=&quot;confusing-objects-everywhere&quot;&gt;confusing objects everywhere&lt;/h5&gt;

&lt;p&gt;I’m a big functional guy and everywhere I go in the atom sourcecode, I am dealing with objects after objects. I can’t count how many &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;@element&lt;/code&gt; assignments and reads I saw. Some things are getting assigned at the top of an object, used at the bottom and changed 3x until it reached that spot.&lt;/p&gt;

&lt;h5 id=&quot;cson&quot;&gt;cson&lt;/h5&gt;
&lt;p&gt;For some reason someone decided that coffeescript is so great that we should also start writing json in it! Because… commas are evil or something?&lt;/p&gt;

&lt;p&gt;I quickly ran away from it&lt;/p&gt;

&lt;h3 id=&quot;atom-meet-clojurescript&quot;&gt;Atom, meet clojurescript&lt;/h3&gt;

&lt;p&gt;Now, since then and now I got a lot better in clojurescript so I decided to give it another go. I created a little &lt;a href=&quot;https://github.com/dvcrn/ajom&quot;&gt;lein template&lt;/a&gt; for creating atom plugins in clojurescript and hacked a bit here and there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turns out this works really well!&lt;/strong&gt; Clojurescript and atom are like… emacs and elisp! You have all the power of clojurescript combined with all the customisation options atom gives you. You still have to deal with some quirks like passing objects around but still - this is making the idea of having a central configuration system so much more possible!&lt;/p&gt;

&lt;p&gt;Our clojurescript plugin could literally change how every other package reacts: how it is set up, what keybindings it uses, what options it needs and more. We could even change how other plugins look inside the editor by manipulating it’s DOM representation.&lt;/p&gt;

&lt;p&gt;Short said, in the last few days I started porting a bit of functionality from sublimious to atom.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/proton-demo.gif&quot; alt=&quot;demo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For sublimious, I did &lt;strong&gt;a lot of hacking&lt;/strong&gt;. I basically collected all the configuration and flushed it into real files that are then getting re-loaded by sublimetext. For atom, I don’t need to do that.&lt;/p&gt;

&lt;p&gt;How do I set a editor config? Like this!&lt;/p&gt;

&lt;div class=&quot;language-clj highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set-config!&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;.set&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;How do I wipe the existing user config so it doesn’t conflict with our new one? One line.&lt;/p&gt;

&lt;div class=&quot;language-clj highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;atom-env/unset-config!&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;atom-env/get-all-settings&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The only hack I had to implement is the ability to install packages from within a package. That’s currently not possible. Here’s how I did it anyway:&lt;/p&gt;

&lt;div class=&quot;language-clj highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install-package&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;package-name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;is-installed?&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;package-name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;do&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;.execSync&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;child-process&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;get-apm-path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; install &quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;package-name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot; --no-colors&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/Error&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(I’m just calling apm through node!)&lt;/p&gt;

&lt;h3 id=&quot;is-it-ready&quot;&gt;Is it ready?&lt;/h3&gt;

&lt;p&gt;Not even close to but I am already a lot more happy with it than with sublimious before. It feels more… powerful! Maybe cljs+atom can really be a alternative to emacs at some point. Let me dream 😊&lt;/p&gt;

&lt;p&gt;In the meantime, if you want to help, please check it out &lt;a href=&quot;https://github.com/dvcrn/proton&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Fri, 27 Nov 2015 18:24:23 +0000</pubDate>
        <link>https://dvcrn.github.io/clojurescript/2015/11/27/spacemacs-for-atom.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/clojurescript/2015/11/27/spacemacs-for-atom.html</guid>
        
        
        <category>clojurescript</category>
        
      </item>
    
      <item>
        <title>Demand driven iOS apps with om and react native</title>
        <description>&lt;p&gt;I recently talked a lot about om and react native. Since people seemed quite interested in this topic, I decided to hold a little presentation at the last Tokyo iOS meetup in November.&lt;/p&gt;

&lt;p&gt;People were a bit overwhelmed (many never saw clojurescript before) but the general feedback was quite good. I am sure I convinced at least 1 person to give it a spin!&lt;/p&gt;

&lt;p&gt;In any way, here is my talk from that iOS meetup. Slides are available &lt;a href=&quot;http://www.slideshare.net/dvcrn/demand-driven-applications-with-omnext-and-react-native-55185632&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;video-wrapper&quot;&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/oJ8t8Hc9XaE&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;This was also the first time we decided to record things so excuse the mediocore quality. I experimented by putting a external microphone on the table next to me but didn’t realise that the macbook fan blowed straight into it. Still slightly better than the in-camera mic but still room for improvements.&lt;/p&gt;

&lt;p&gt;I for my part am very excited about clojurescript on native and super happy to be part of this still young but growing community. Clojurescript will come for you - if you want it or not. Better start learning it now! 😈&lt;/p&gt;
</description>
        <pubDate>Thu, 19 Nov 2015 11:01:23 +0000</pubDate>
        <link>https://dvcrn.github.io/clojurescript/react/2015/11/19/my-cljs-talk.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/clojurescript/react/2015/11/19/my-cljs-talk.html</guid>
        
        
        <category>clojurescript</category>
        
        <category>react</category>
        
      </item>
    
      <item>
        <title>Going native with om.next</title>
        <description>&lt;p&gt;I mentioned already earlier that I believe &lt;a href=&quot;https://github.com/omcljs/om&quot;&gt;om.next&lt;/a&gt; will be the future. Not particular om itself but the idea it implements: demand driven applications. The component declares what data it needs and the server is just there for delivering it. Components don’t want to coordinate 20 ajax requests just to gather all the data they need to operate. Components also don’t need all of the data your API provides in most cases, so why even the need to download all of it?&lt;/p&gt;

&lt;p&gt;These concepts make sense as the next iteration of server / client architectures but you know where they fit even better? &lt;strong&gt;Mobile Apps!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Especially when load time is critical and data volume limited, downloading big chunks of REST json data can get very annoying. We can’t just pump all the jsons our website uses into an app and expect it to be as performant as the web counterpart.&lt;/p&gt;

&lt;p&gt;So, wouldn’t it be amazing if our app just says &lt;em&gt;“I need the list of available books, but only the title and the image url and nothing else”&lt;/em&gt; and it will get exactly that and nothing more?&lt;/p&gt;

&lt;p&gt;With &lt;a href=&quot;https://github.com/omcljs/om&quot;&gt;next&lt;/a&gt; around the corner I decided to give it a try with react native. &lt;a href=&quot;http://cljsrn.org/&quot;&gt;cljsrn&lt;/a&gt; is already bundling a good amount of resources around the topic clojurescript and react native and &lt;a href=&quot;https://github.com/dmotz/natal&quot;&gt;natal&lt;/a&gt; and &lt;a href=&quot;http://cljsrn.org/ambly.html&quot;&gt;ambly&lt;/a&gt; already work great for legacy om, so let’s make it work for om.next!&lt;/p&gt;

&lt;h3 id=&quot;a-stoney-path&quot;&gt;A stoney path&lt;/h3&gt;

&lt;p&gt;After poking a bit around with next and natal, I quickly ran into a deadend because of it’s dependency to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gdom&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ReactDOM&lt;/code&gt;. Instead of calling &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;React.render&lt;/code&gt;, om.next relies on React 0.14 which splits the rendering logic from the component. Here we’re calling &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ReactDOM.render&lt;/code&gt; instead, which, well, relies on a DOM.&lt;/p&gt;

&lt;p&gt;Luckily after a short chat with &lt;a href=&quot;https://github.com/swannodette&quot;&gt;@dnolen&lt;/a&gt; he promptly stripped out &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ReactDOM&lt;/code&gt; (and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gdom&lt;/code&gt; as well) and added functionality that allows us to pass a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:root-render&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:root-unmount&lt;/code&gt; function into the reconciler. Whatever we specify here will get used to render and unmount components.&lt;/p&gt;

&lt;p&gt;Reading through the &lt;a href=&quot;https://github.com/facebook/react-native/tree/master/Libraries/ReactNative&quot;&gt;react native source&lt;/a&gt; made it clear that 0.14 has not been adapted yet and the rendering and unmounting logic is still inside &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;React&lt;/code&gt;. To plug this into om.next, all we have to do is&lt;/p&gt;

&lt;div class=&quot;language-cljs highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;no&quot;&gt;:root-render&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;.render&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;%1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;%2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:root-unmount&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;.unmountComponentAtNode&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)})&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;…where js/React is the required react-native library.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Another thing that becomes clear is that React Native doesn’t render components into DOM references. Instead, it &lt;a href=&quot;https://github.com/facebook/react-native/blob/master/Libraries/ReactNative/ReactNative.js#L74-L80&quot;&gt;uses a number&lt;/a&gt; that references back to a component. With the first one being &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1&lt;/code&gt;, we know exactly what where we have to add our root to:&lt;/p&gt;

&lt;div class=&quot;language-cljs highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;om/add-root!&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reconciler&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my-component&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;wrapping-up&quot;&gt;Wrapping up&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/om.next-native.png&quot; alt=&quot;showcase&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The full code looks something like this:&lt;/p&gt;

&lt;div class=&quot;language-cljs highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;;; Need to set js/React first so that Om can load&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;set!&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;js/require&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;react-native/Libraries/react-native/react-native.js&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ns&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;future-next.core&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:require&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;om.next&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:as&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;om&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:refer-macros&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;defui&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;;; Reset js/React back as the form above loads in an different React&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;set!&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;js/require&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;react-native/Libraries/react-native/react-native.js&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;;; Setup some methods to help create React Native elements&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;opts&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React.createElement&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React.View&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;clj-&amp;gt;js&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;opts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;opts&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React.createElement&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React.Text&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;clj-&amp;gt;js&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;opts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;


&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;;; Set up our Om UI&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;defonce&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;app-state&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;atom&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:app/msg&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello om.next!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;defui&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WidgetComponent&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;om/IQuery&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:app/msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:keys&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;app/msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;om/props&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;view&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:style&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:flexDirection&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;column&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:margin&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
 
 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:keys&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:as&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;state&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;if-let&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;st&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:value&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:value&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:not-found&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
 
 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reconciler&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;om/reconciler&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:state&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;app-state&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:parser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;om/parser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:read&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:root-render&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;.render&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;%1&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;%2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:root-unmount&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;.unmountComponentAtNode&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/React&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)})&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
 
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;om/add-root!&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reconciler&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WidgetComponent&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;defn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;:export&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;.requestAnimationFrame&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;js/window&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/dmotz/natal/pull/18&quot;&gt;I submitted a PR&lt;/a&gt; to natal and once that’s merged in, all you have to do is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;natal init&lt;/code&gt; :)&lt;/p&gt;

&lt;p&gt;Can you believe that all of this happened in just 1.5 days?&lt;/p&gt;

</description>
        <pubDate>Tue, 27 Oct 2015 12:47:46 +0000</pubDate>
        <link>https://dvcrn.github.io/clojurescript/react/2015/10/27/going-native-with-om-next.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/clojurescript/react/2015/10/27/going-native-with-om-next.html</guid>
        
        
        <category>clojurescript</category>
        
        <category>react</category>
        
      </item>
    
      <item>
        <title>MarkRight - a markdown editor in om+electron</title>
        <description>&lt;p&gt;If you follow clojurescript development you might have already heard about the next iteration of om, &lt;a href=&quot;https://github.com/omcljs/om&quot;&gt;om.next&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;om.next is David Nolens attempt to bring together what big companies like facebook with &lt;a href=&quot;https://facebook.github.io/relay/&quot;&gt;relay&lt;/a&gt; and netflix with &lt;a href=&quot;https://facebook.github.io/relay/&quot;&gt;falcor&lt;/a&gt; are doing at the moment. I will not go into detail but instead of REST, it implements a architecture in which  components clearly declare what kind of data they need to operate. A server / router is then gathering that data and passing it back. Instead of multiple REST endpoints, you’ll end up with 1 graph endpoint that understands the client query.&lt;/p&gt;

&lt;p&gt;While still in early alpha, I was looking for an excuse to play around with it - or at least a excuse to use it in the most simple case possible. After scratching my head for a bit I came up with a &lt;strong&gt;markdown editor&lt;/strong&gt;. But why the hell would I want to write a markdown editor?&lt;/p&gt;

&lt;p&gt;When I have to write markdown, I’m missing a perfect live preview. I know, there are options out there that give you that either webbased or stuff that just let’s you preview what you wrote. The most popular probably being &lt;a href=&quot;http://25.io/mou/&quot;&gt;mou&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But I don’t like mou and it looks like they seem to charge for it soon. On top of that, I was eyeballing githubs &lt;a href=&quot;https://github.com/atom/electron&quot;&gt;electron&lt;/a&gt; (the thing that atom uses) for a while and wanted to give it a try.&lt;/p&gt;

&lt;h2 id=&quot;meet-markright&quot;&gt;Meet MarkRight&lt;/h2&gt;

&lt;p&gt;So I played a bit electron and om, created a pull request to &lt;a href=&quot;https://github.com/karad/lein_template_descjop/&quot;&gt;descjop&lt;/a&gt; on the way and eventually came up with &lt;strong&gt;MarkRight&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/dvcrn/dmedit/master/resources/markright-banner.png&quot; alt=&quot;markright banner&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Markright is like the most simple editor you can imagine but it is this simplicity that I love! It is literally powered by 2 (or 3 if you count root) om / react components and all they do is piping your input text in real-time through &lt;a href=&quot;https://github.com/chjj/marked&quot;&gt;marked&lt;/a&gt;. It was fun to give &lt;a href=&quot;https://codemirror.net/&quot;&gt;codemirror&lt;/a&gt; a spin as well!&lt;/p&gt;

&lt;p&gt;I was really surprised how easy it was to just plug these different components together. The open source community did an amazing job with building and maintaining these cool toys!&lt;/p&gt;

&lt;p&gt;Anyway, here’s how it looks:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/markright.png&quot; alt=&quot;screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There’s not much to it yet. You can save files, open files and - well - write markdown. There’s a lot of things to do but if you like the idea, please feel free to &lt;a href=&quot;https://github.com/dvcrn/markright&quot;&gt;contribute at github&lt;/a&gt; :)&lt;/p&gt;

</description>
        <pubDate>Thu, 22 Oct 2015 10:43:17 +0000</pubDate>
        <link>https://dvcrn.github.io/2015/10/22/my-markdown-editor.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/2015/10/22/my-markdown-editor.html</guid>
        
        
      </item>
    
      <item>
        <title>My Dream Editor</title>
        <description>&lt;p&gt;Today, let’s talk about editors. Why? Because currently there are more editors than anything else. Microsoft decided to launch an editor, github decided to launch an editor - heck, even facebook suddenly invests into editors. We have closed source ones, open source ones, big full powered IDEs and of course the old school family.&lt;/p&gt;

&lt;p&gt;The good thing, I actually like playing with editors. Sometimes I feel like just opening a new tool and test it out. Because of that I discovered SublimeText from NetBeans / PHPStorm. Because of that I also switched from SublimeText to VIM and later back to intellij. I love to constantly improve my workflow and find new ways to get even more productive.&lt;/p&gt;

&lt;p&gt;The annoying thing about testing editors is that well, once you hit VIM you are pretty much in a dead end. From then on each and every editor &lt;strong&gt;has&lt;/strong&gt; to have VIM keybindings. If it doesn’t, you can’t use it. Naturally I spent a ton of time with VIM - the best vim emulation out there. SublimeText and Atom just couldn’t cut it. They add a good amount of sugar into the mix, sugar I really like - but their VIM plugins are just not good enough (yet). So I kept going my way with vim, carefully tweaking my good old &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.vimrc&lt;/code&gt; as days come by.&lt;/p&gt;

&lt;p&gt;To my big surprise, the editor that won me by storm wasn’t vim and it wasn’t neovim either. It was something that made me drop my beloved .vimrc without hesitation, something I thought I would never even touch - emacs. Yeah, emacs made me drop all other editors in the year 2015. Ridiculous, right? So what’s going on?&lt;/p&gt;

&lt;h1 id=&quot;enter-spacemacs&quot;&gt;Enter spacemacs&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/images/spacemacs-python.png&quot; alt=&quot;spacemacs&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/syl20bnr/spacemacs/&quot;&gt;spacemacs&lt;/a&gt; is an amazing pre-configured emacs made for people like me! VIM users!. It uses the power of evil, the arguably best VIM emulation out there and builds a layer of highly productive keybindings on top. Here’s how it works:&lt;/p&gt;

&lt;p&gt;In spacemacs, each command is triggered by the spacebar and follows a very innovative mnemonic. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;spc&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;b&lt;/code&gt; for example is showing you actions on the current buffer. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;spc&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p&lt;/code&gt; executes project commands.&lt;/p&gt;

&lt;p&gt;The really cool thing though comes from it’s layer system. spacemacs has a ton of &lt;a href=&quot;https://github.com/syl20bnr/spacemacs/tree/master/layers&quot;&gt;contributed layers&lt;/a&gt; that &lt;em&gt;just work&lt;/em&gt;. For example without researching anything, I just enabled the react layer and suddenly I had full jsx support, highlighting, linting with eslint and a ton of keybindings! Just like that! Why? Because someone who actually uses react implemented it this way, the way it should be done.&lt;/p&gt;

&lt;p&gt;So many &lt;em&gt;strong&lt;/em&gt; editors give me a ton plugins and what not without actually knowing the ecosystem of the target language / framework just for the sake of supporting as many things as possible.&lt;/p&gt;

&lt;p&gt;And &lt;em&gt;if&lt;/em&gt; the plugin is superb, then the base of the editor is usually weak. Look at VIM: We have so many cool plugins but most of them are a big ugly hack in vimscript that works so-so. Emacs on the other hand is hackable in every little corner. It provides a powerful scripting language in form of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elisp&lt;/code&gt; and has a very active community around it.&lt;/p&gt;

&lt;p&gt;I would even argue that most of the layers that ship &lt;strong&gt;with&lt;/strong&gt; spacemacs out of the box are a good amount better than what I hacked together inside my .vimrc.&lt;/p&gt;

&lt;p&gt;I was so impressed by it that I decided to &lt;a href=&quot;https://github.com/dvcrn/sublimious&quot;&gt;port parts of it to sublimetext&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My lovestory with spacemacs begins. Where were you all my life, you beauty of an editor?&lt;/p&gt;

&lt;h1 id=&quot;what-else&quot;&gt;What else?&lt;/h1&gt;

&lt;p&gt;Here’s my ‘mini ranking’ of editors I like:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/syl20bnr/spacemacs/&quot;&gt;spacemacs&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.jetbrains.com/idea/&quot;&gt;intellij&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;vim&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.sublimetext.com/&quot;&gt;sublimetext&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://atom.io/&quot;&gt;atom&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
        <pubDate>Tue, 13 Oct 2015 07:05:17 +0000</pubDate>
        <link>https://dvcrn.github.io/2015/10/13/my_dream_editor.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/2015/10/13/my_dream_editor.html</guid>
        
        
      </item>
    
      <item>
        <title>A new blog</title>
        <description>&lt;p&gt;I decided to create another simple blog based on jekyll next to my &lt;a href=&quot;https://medium.com/@davidmohl&quot;&gt;medium one&lt;/a&gt;. Why? let me explain.&lt;/p&gt;

&lt;p&gt;Medium is an amazing platform for &lt;strong&gt;writing&lt;/strong&gt;. That’s what works really damn good on it. But writing doesn’t equal blog. Medium is a magazine - a collection of articles and columns from individual writers. When you see a post about ‘How to set up php’ with a big editorial picture and a ton of quotes, don’t you also think that it kind of feels… out of place?&lt;/p&gt;

&lt;p&gt;Medium will be the place where I’ll write thought through stuff. Stuff that could go into a magazine. On jekyll (here) on the other hand, I can write anything that is somehow tech related:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Some guide for a new technology? Here.&lt;/li&gt;
  &lt;li&gt;A article on how to work productively? Medium.&lt;/li&gt;
  &lt;li&gt;A post on workflow thoughts? Medium.&lt;/li&gt;
  &lt;li&gt;Code snippets how to set up one of my projects? Here.&lt;/li&gt;
  &lt;li&gt;My thoughts on a certain technology? Here.&lt;/li&gt;
  &lt;li&gt;Common mistakes companies make? Medium.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;… you get the drill right? And in general, if you subscribe through RSS it doesn’t really matter where the articles come from.&lt;/p&gt;

&lt;p&gt;Now there’s just the problem that I really don’t blog much in general…&lt;/p&gt;
</description>
        <pubDate>Sun, 11 Oct 2015 11:39:46 +0000</pubDate>
        <link>https://dvcrn.github.io/update/2015/10/11/a-new-blog.html</link>
        <guid isPermaLink="true">https://dvcrn.github.io/update/2015/10/11/a-new-blog.html</guid>
        
        
        <category>update</category>
        
      </item>
    
  </channel>
</rss>
