<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.6.2">Jekyll</generator><link href="https://randre03.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://randre03.github.io/" rel="alternate" type="text/html" /><updated>2018-01-14T17:37:29+00:00</updated><id>https://randre03.github.io/</id><title type="html">randre03.github.io</title><subtitle>Random musings by a wannabe developer.</subtitle><entry><title type="html">Speed up Navigagtion by Lines in Vim/Evil-mode</title><link href="https://randre03.github.io/simple-vim-nav-by-line/" rel="alternate" type="text/html" title="Speed up Navigagtion by Lines in Vim/Evil-mode" /><published>2018-01-05T00:00:00+00:00</published><updated>2018-01-05T00:00:00+00:00</updated><id>https://randre03.github.io/simple-vim-nav-by-line</id><content type="html" xml:base="https://randre03.github.io/simple-vim-nav-by-line/">&lt;p&gt;tldr:
Assume you want to quickly jump down 30 lines. You could reach to press ‘3’ then ‘0’ followed by ‘j’ &amp;lt;30j&amp;gt;. However, I prefer to hit ‘3’, ‘3’ then ‘j’ followed immediately by ‘3’ and ‘k’ &amp;lt;33j3k&amp;gt;. It’s 2 more keystrokes, but I can make them faster than I can reach up for ‘3’ then ‘0’ and get back to home row.&lt;/p&gt;

&lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt;
&lt;p&gt;If you’ve read more than one or two posts on this blog, you know I love modal editing, starting first with vim and now using emacs with Evil-mode. To increase my speed navigating through code, my line numbering scheme shows relative numbering for all lines accept for the current line (which is the actual line of source code). This allows me to quickly determine the number of rows I am from the code I want to move to.&lt;/p&gt;

&lt;h2 id=&quot;problem&quot;&gt;Problem&lt;/h2&gt;
&lt;p&gt;If you have to move more than 9 lines of code (in either direction) you need to input two numbers before telling evil-mode which direction to go (‘j’ for down, ‘k’ to go up). I’ve never fully adopted touch-typing, so my hands fly all around the keyboard, but I do always find my way back to the home row. Navigating 20, 30, 40 lines is difficult for me. I have to reach for the ‘3’ and then find the ‘0’ and get back to the home row.&lt;/p&gt;

&lt;h2 id=&quot;solution-warning---this-might-be-a-little-controversial&quot;&gt;Solution (Warning - this might be a little controversial)&lt;/h2&gt;
&lt;p&gt;Assume I want to move to code 20 lines below. What I’ve started doing is hitting ‘2’, ‘2’, ‘j’, ‘2’, ‘k’ &amp;lt;22j2k&amp;gt;. This means I can leave my left hand on the ‘2’ key for all these actions. Same with ‘1’ or ‘3’ etc. This can clearly be extended to moving to lines above your current line, just hit the necessary number twice key followed by ‘k’, the number once again and ‘j’ (example, move up 30 lines &amp;lt;33k3j&amp;gt;).&lt;/p&gt;

&lt;p&gt;Typically, vim purists are all about using the fewest keystrokes. I embrace this (I enjoy modal editing for the efficiency of keystrokes), but for me, this saves me time.&lt;/p&gt;</content><author><name></name></author><category term="emacs" /><category term="vim" /><summary type="html">tldr: Assume you want to quickly jump down 30 lines. You could reach to press ‘3’ then ‘0’ followed by ‘j’ &amp;lt;30j&amp;gt;. However, I prefer to hit ‘3’, ‘3’ then ‘j’ followed immediately by ‘3’ and ‘k’ &amp;lt;33j3k&amp;gt;. It’s 2 more keystrokes, but I can make them faster than I can reach up for ‘3’ then ‘0’ and get back to home row.</summary></entry><entry><title type="html">Johnny Winn “Polyglot in the Code An Elixir/Ruby Mashup”</title><link href="https://randre03.github.io/Johnny-Winn-Ruby-Conf-2013/" rel="alternate" type="text/html" title="Johnny Winn &quot;Polyglot in the Code An Elixir/Ruby Mashup&quot;" /><published>2017-12-29T00:00:00+00:00</published><updated>2017-12-29T00:00:00+00:00</updated><id>https://randre03.github.io/Johnny-Winn-Ruby-Conf-2013</id><content type="html" xml:base="https://randre03.github.io/Johnny-Winn-Ruby-Conf-2013/">&lt;p&gt;tldr&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;This talk is a bit dated, but the lessons about using what you already know to learn something you want to know are timeless&lt;/li&gt;
  &lt;li&gt;Johnny does a good job walking through a large swath of the elixir universe as of 2013 in a short amount of time&lt;/li&gt;
  &lt;li&gt;Johnny’s talk can be found &lt;a href=&quot;https://confreaks.tv/videos/rubyconf2013-the-polyglot-in-the-code-an-elixir-ruby-mashup&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Video is just over 32 minutes long.&lt;/p&gt;

&lt;h2 id=&quot;yaetaarc-yet-another-elixir-talk-at-a-ruby-conference&quot;&gt;YAETAARC (Yet Another Elixir Talk At A Ruby Conference)&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Side note:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Recall, 2013, was early days for elixir. Some of the tooling and libraries we now take for granted were not yet avaialble. This was also the time in elixir’s development when elixir users were evangelizing the language to prediminately ruby users. You can see this in Dave Thomas’s talk to Lonestar Ruby in 2013 (see my review &lt;a href=&quot;/conference_talk_review_Dave_Thomas_Lonestar_2013/&quot; target=&quot;blank&quot;&gt;here&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/johnny_rugger&quot; target=&quot;_blank&quot;&gt;Johnny Winn&lt;/a&gt;, co-host of the venerable &lt;a href=&quot;https://www.patreon.com/elixirfountain&quot; target=&quot;_blank&quot;&gt;Elixir Fountain podcast&lt;/a&gt; (his co-host is &lt;a href=&quot;https://twitter.com/doomspork&quot; target=&quot;_blank&quot;&gt;Sean Callan&lt;/a&gt;) presents to a group of ruby coders how he has used the best of elixir and the best of ruby to meet his needs.&lt;/p&gt;

&lt;p&gt;Johnny and his wife have a lot of experience with education and how people learn. He starts the talk with some of these concepts. Such as:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Constructivist_teaching_methods&quot; target=&quot;_blank&quot;&gt;Constructivism&lt;/a&gt;; and&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Instructional_scaffolding&quot; target=&quot;_blank&quot;&gt;Scaffolding&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So why are they valuable? And why is he sharing these things?&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;JW says most of us come to programming to learn and to be challenged.&lt;/li&gt;
  &lt;li&gt;But we need direction.&lt;/li&gt;
  &lt;li&gt;Johnny gives us the following quote:
    &lt;blockquote&gt;
      &lt;p&gt;“Efforts and courage are not enough without purpose and direction.”
-&lt;a href=&quot;https://en.wikipedia.org/wiki/John_F._Kennedy&quot; target=&quot;_blank&quot;&gt;John F. Kennedy&lt;/a&gt;&lt;/p&gt;
    &lt;/blockquote&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;the-analogy&quot;&gt;The Analogy&lt;/h3&gt;
&lt;p&gt;His kids would experiment by cooking (which my kids sort of do)..they would work and not have any idea of what they were doing, &lt;em&gt;but they would not get frustrated&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Lesson&lt;/strong&gt;: We can take advantage of learning by finding something we’re interested in, something we like.&lt;/p&gt;

&lt;p&gt;Knowledge is constructed, not acquired - so we can build up our knowledge
We learn by building on existing knowledge (see ‘scaffolding’)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Reviewer’s Note: This is all well and good, but when are we getting to the code???)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Right on cue, Johnny asks the rhetorical question: what does all this have to do with programming and being polyglot?&lt;/p&gt;

&lt;p&gt;The point is we can use knowledge of one language…to learn another!&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;On the CodeNewbie podcast it was once said:
    &lt;blockquote&gt;
      &lt;p&gt;Learning your first language is hard, learning the second language is harder, and then all others are easier.&lt;/p&gt;
      &lt;ul&gt;
        &lt;li&gt;I think it was &lt;a href=&quot;https://www.codenewbie.org/podcast/learning-to-code-in-the-1960s&quot; target=&quot;_blank&quot;&gt;Mary L Gordon&lt;/a&gt;. Great talk by the way.&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/blockquote&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Side note: if you’d like to learn about how browsers work, CodeNewbie’s interview with &lt;a href=&quot;https://www.codenewbie.org/podcast/how-do-browsers-work&quot; target=&quot;_blank&quot;&gt;Lin Clark&lt;/a&gt; was &lt;em&gt;AMAZING&lt;/em&gt;.&lt;/p&gt;

&lt;h2 id=&quot;back-to-the-talk&quot;&gt;Back to the talk&lt;/h2&gt;
&lt;p&gt;Johnny says he’ll teach us some elixir code and add a touch of ruby to fill in the gaps we don’t know about elixir. (recall the statement above - this was early days).&lt;/p&gt;

&lt;p&gt;Great Point: Elixir and Erlang share data types so no performance cost when calling one from the other!&lt;/p&gt;

&lt;h4 id=&quot;please-note-the-following-section-headings-correspond-to-the-sections-of-the-talk-as-johnny-lays-them-out&quot;&gt;&lt;em&gt;Please Note: The following section headings correspond to the sections of the talk as Johnny lays them out:&lt;/em&gt;&lt;/h4&gt;

&lt;h2 id=&quot;put-the-fun-in-function&quot;&gt;Put the Fun in Function&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;(This section is about the great ‘mix’ build tool)&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Plays a recorded coding demo&lt;/li&gt;
  &lt;li&gt;Mentions the ‘Dot’ when calling an anonymous function (I still hate this thing)&lt;/li&gt;
  &lt;li&gt;All elixir code must be in module&lt;/li&gt;
  &lt;li&gt;Elixir has a repl called &lt;a href=&quot;https://hexdocs.pm/iex/IEx.html&quot; target=&quot;_blank&quot;&gt;iex&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Most everything is inside a “do” block which is a macro&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Reviewer’s Note: Johnny seems to be spending time waiting for his recording to catch-up to where he is&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Moves on to pattern matching (apparently, at the conference Dave Thomas already overviewed this so he leaves that to him)&lt;/li&gt;
  &lt;li&gt;Shows that you can convert from pattern matching in the function args to a guard clause (nice touch)&lt;/li&gt;
  &lt;li&gt;Recursion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;throw-in-a-mix&quot;&gt;Throw in a Mix&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;(This section is about the great ‘mix’ build tool)&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Similar to &lt;a href=&quot;https://leiningen.org/&quot; target=&quot;_blank&quot;&gt;leiningen&lt;/a&gt; for clojure&lt;/li&gt;
  &lt;li&gt;Allows us to know if we’re in dev/test/prod environment&lt;/li&gt;
  &lt;li&gt;This is so early that the web framework he discusses is &lt;a href=&quot;https://github.com/dynamo/dynamo&quot; target=&quot;_blank&quot;&gt;Dynamo&lt;/a&gt; as this was befored &lt;a href=&quot;http://phoenixframework.org/&quot; target=&quot;_blank&quot;&gt;Phoenix&lt;/a&gt;.
    &lt;ul&gt;
      &lt;li&gt;Also mentions an elixir MVC framework called &lt;a href=&quot;http://elixir-web.github.io/weber/&quot; target=&quot;_blank&quot;&gt;Weber&lt;/a&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;remember-the-ecto&quot;&gt;Remember the Ecto&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;(This section is about the elixir mdoule &lt;a href=&quot;https://github.com/elixir-ecto/ecto&quot; target=&quot;_blank&quot;&gt;Ecto&lt;/a&gt; which may or may not be an &lt;a href=&quot;https://en.wikipedia.org/wiki/Object-relational_mapping&quot; target=&quot;_blank&quot;&gt;ORM&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Ecto handles databaseinteraction&lt;/li&gt;
  &lt;li&gt;Has the concepts of:
    &lt;ul&gt;
      &lt;li&gt;Repo,&lt;/li&gt;
      &lt;li&gt;Entity,&lt;/li&gt;
      &lt;li&gt;Queries.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;what-is-missing&quot;&gt;What is missing?&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;(This section is where Johnny points out the functionality that as of 2013 he could not get from elixir as a means to segue to combining with ruby)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Johnny says &lt;a href=&quot;https://hexdocs.pm/ex_unit/ExUnit.html&quot; target=&quot;_blank&quot;&gt;ExUnit&lt;/a&gt; (the elixir testing framework) does not help with &lt;a href=&quot;https://dannorth.net/introducing-bdd/&quot; target=&quot;_blank&quot;&gt;Behavior Driven Development&lt;/a&gt; - which he uses at HashRocket&lt;/li&gt;
  &lt;li&gt;And at the time of this talk Ecto did not handle database migrations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, let’s throw in a touch of Ruby to fill in these gaps …for the things you’re missing, just inject Ruby into your elixir project (says it is easy)&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Reviewer’s Note: at this point in the talk, I start to think that much of what is proposed in this talk was out of necessity in 2013 and no longer necessary to bring in ruby to address these items as elixir now has the necessary library modules.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Johnny creates a Gemfile and adds to the mix project to bundle cucumber, selenium, capybara and rspec&lt;/p&gt;

&lt;p&gt;How do we do data migrations (remember Ecto didn’t do this back then)&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Adds Builders active_record and pg (Postgres)&lt;/li&gt;
  &lt;li&gt;Uses rakefile to perform the migration(s)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After getting ruby integrated, now is time for elixir&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Reviewer Question: What is the delineator between what he’s using ruby for and elixir for?&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Sets up Ecto for managing the model (while using ruby to do the migrations)&lt;/li&gt;
  &lt;li&gt;Dynamo Router: JW notes anyone that has used Sinatra should be familiar with this&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;wrapping-up&quot;&gt;Wrapping Up&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Seems to be having som issues with the display of the presentation, but not too distracting&lt;/li&gt;
  &lt;li&gt;Runs &lt;code class=&quot;highlighter-rouge&quot;&gt;mix test&lt;/code&gt;, ruby is running the test database, then cleans up and ruby gets out of the way&lt;/li&gt;
  &lt;li&gt;Circles back around to the beginning and how we can use constructivism (use what we already know eg. Ruby) to build on what we want to know (elixir).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;kudos-to-johnny&quot;&gt;Kudos to Johnny&lt;/h3&gt;
&lt;p&gt;Johnny does a good job of showing us a real process for integrating ruby into elixir. He does not hide the errors from us, and addresses when things don’t work, and testing&lt;/p&gt;

&lt;h2 id=&quot;fun-or-interesting-things-i-noticed-throughout&quot;&gt;Fun or interesting things I noticed throughout&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Johnny has 7, homeschooled kids!&lt;/li&gt;
  &lt;li&gt;Seems to be spending time waiting for his recording to catch-up to where he is&lt;/li&gt;
  &lt;li&gt;Appears Johnny is using vim (what theme is that? Seriously, if you know please let me know!)&lt;/li&gt;
  &lt;li&gt;JW notes Dynamo was still in flux then, so things could change (they sure did)&lt;/li&gt;
  &lt;li&gt;His presentation template is clearly indicative of who Johnny is (I like to think if have some sense of this after having listened to his podcast so many times)
    &lt;ul&gt;
      &lt;li&gt;There are some cool leaves, that look like waves at bottom of slides and any square outlines are actually not “square”, they are more like rhombuses.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;JW has been developing for better part of 15 yrs, really likes ruby and how you can use it with other languages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;overall-impression&quot;&gt;Overall Impression&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;I personally like Johnny (have never met him or spoken to him directly, but seems like a very cool dude)&lt;/li&gt;
  &lt;li&gt;Watching this talk post 2013/2014 it begins to show its age, however:&lt;/li&gt;
  &lt;li&gt;I think the ability to leverage what you already know to either (i) learn something new, or (ii) fill in the gaps of a new technology is a skill worth knowing and developing.&lt;/li&gt;
&lt;/ul&gt;</content><author><name></name></author><category term="conference" /><category term="elixir" /><category term="ruby" /><summary type="html">tldr This talk is a bit dated, but the lessons about using what you already know to learn something you want to know are timeless Johnny does a good job walking through a large swath of the elixir universe as of 2013 in a short amount of time Johnny’s talk can be found here</summary></entry><entry><title type="html">Dave Thomas “Power of Erlang, Beauty of Ruby”</title><link href="https://randre03.github.io/conference_talk_review_Dave_Thomas_Lonestar_2013/" rel="alternate" type="text/html" title="Dave Thomas &quot;Power of Erlang, Beauty of Ruby&quot;" /><published>2017-12-28T00:00:00+00:00</published><updated>2017-12-28T00:00:00+00:00</updated><id>https://randre03.github.io/conference_talk_review_Dave_Thomas_Lonestar_2013</id><content type="html" xml:base="https://randre03.github.io/conference_talk_review_Dave_Thomas_Lonestar_2013/">&lt;p&gt;tldr&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;The future is functional&lt;/li&gt;
  &lt;li&gt;Elixir is a functional language built on top of Erlang&lt;/li&gt;
  &lt;li&gt;Elixir (thanks to Erlang and OTP) has already “solved” concurrency&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://confreaks.tv/videos/lonestarruby2013-elixir-power-of-erlang-joy-of-ruby&quot; target=&quot;_blank&quot;&gt;Dave’s talk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Warning to the future watcher: Unfortunately, the video sound is terrible!&lt;/em&gt;
video is a little under 40 minutes.&lt;/p&gt;

&lt;p&gt;Dave Thomas gave the talk titled “Power of Erlang, Beauty of Ruby” at the 2013 Lonestar Ruby Conference.&lt;/p&gt;

&lt;p&gt;He loves Ruby but says ‘We all must keep eye on what is going on or risk falling out of date.’ So… if he’s an avowed Rubyist, why talk about Elixir at Ruby conf?&lt;/p&gt;

&lt;p&gt;Dave says he has been looking for “this” for 10 years. The ‘this’ is the &lt;a href=&quot;https://elixir-lang.org/&quot; target=&quot;_blank&quot;&gt;Elixir Programming Language&lt;/a&gt;. Why has he been looking for it for a decade?&lt;/p&gt;

&lt;p&gt;Dave believes the “Future is functional and concurrent”. His rationale for this is a familiar line of reasoning:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Moore’s law is running up against the laws of physics&lt;/li&gt;
  &lt;li&gt;The Intel i7 processor on his machine (as of 2013) had roughly 1 Billion transistors&lt;/li&gt;
  &lt;li&gt;So many processors cannot be working on same thing at the same time, so you need threading/parallelism&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s been well-established that the human mind can handle a sufficiently-complex, single-threaded programming model. Once more than one thread of execution is possible, we enter an unfamiliar realm.&lt;/p&gt;

&lt;p&gt;So, if the way forward is not more processing power on a single chip, but parallel processing, and parallel processing is &lt;strong&gt;HARD&lt;/strong&gt;.
Software (and functional programming) will be the way to “solve” Moore’s law&lt;/p&gt;

&lt;p&gt;Dave’s Elixir introduction is:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;Elixir is Functional |&amp;gt; Concurrent |&amp;gt; Pragmattic |&amp;gt; Fun&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Dave gives us a very fast overview of some if the language’s primitives and core semantics:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Describes pattern matching through &lt;code class=&quot;highlighter-rouge&quot;&gt;a = 1&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Makes the case for pattern matching&lt;/li&gt;
  &lt;li&gt;All compiled elixir code must go in a module (and this is how Erlang manages code)&lt;/li&gt;
  &lt;li&gt;Erlang’s vaunted abilities for hotswapping code is done at the module level&lt;/li&gt;
  &lt;li&gt;He shows us how elixir code is simply a series of expressions which allows for hygenic metaprogramming (eg. it won’t overwrite any local values - I think)&lt;/li&gt;
  &lt;li&gt;Everything has &lt;a href=&quot;https://en.wikipedia.org/wiki/Scope_(computer_science){:target=&amp;quot;_blank&amp;quot;}&quot;&gt;lexical scoping&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;You can see that for an untyped language, error messages are very good (even back in v 0.10.1)&lt;/li&gt;
  &lt;li&gt;Shows elixir comes with it’s own testing framework - ExUnit
    &lt;ul&gt;
      &lt;li&gt;Show how great the ExUnit framework reports results of the test (after realizing he needs to use &lt;code class=&quot;highlighter-rouge&quot;&gt;==&lt;/code&gt; and not &lt;code class=&quot;highlighter-rouge&quot;&gt;=&lt;/code&gt; in ExUnit)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;tiptoeing-into-the-elixir-is-a-functional-ruby-holy-war&quot;&gt;Tiptoeing into the Elixir-is-a-functional-ruby holy war&lt;/h3&gt;
&lt;p&gt;Dave says elixir code looks like Ruby code if you squint.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My thoughts&lt;/em&gt;: It’s true, for folks that have seen or used ruby code, you’ll notice familiar syntactical elements throughout elixir; however, syntax and semantics are two different things. I come from a functional programming background, so the idiomatic way of writing elixir code is familiar; however, for folks that have been writing ruby for a while, you will probably get tripped up once or twice because the syntax is familiar, but the semantics and idioms are not. Might make the context switch a bit harder at first.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Where DT shows what I mean&lt;/em&gt;:
He notes the problem of familiar syntax in an unfamiliar language is it can be hard to understand which code to write
-we see this as he is pulling together a test for his fib / map functions&lt;/p&gt;

&lt;p&gt;Dave makes a good point: Because of elixir’s functional semantics, your functions are essentially a specification for the operation you are trying to do, and he shows this with the following examples:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Fibonacci&lt;/li&gt;
  &lt;li&gt;finding List length&lt;/li&gt;
  &lt;li&gt;Elixir has started to change the way he programs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;shows the &lt;code class=&quot;highlighter-rouge&quot;&gt;.&lt;/code&gt; (dot) syntax necessary to call a named lambda function (which I have always cringed when seeing). Can’t we find a way to get rid of this?
Actually he glosses over the ‘dot’ function and need for &lt;code class=&quot;highlighter-rouge&quot;&gt;^&lt;/code&gt; (&lt;a href=&quot;http://elixir-lang.github.io/getting-started/pattern-matching.html#the-pin-operator&quot;&gt;this is called the ‘pin operator’&lt;/a&gt;){:target=”_blank”}&lt;/p&gt;

&lt;h3 id=&quot;kudos-to-dt-for-live-coding---great-job&quot;&gt;Kudos to DT for live coding - great job&lt;/h3&gt;
&lt;p&gt;very nonchalant about a live coding exercise that has stalled out - takes a drink…talks with his audience…awesome stuff&lt;/p&gt;

&lt;p&gt;Towards the end he embarks on an implementation of &lt;code class=&quot;highlighter-rouge&quot;&gt;pmap&lt;/code&gt; (map function that can take advantage of parallel processing)&lt;/p&gt;

&lt;h2 id=&quot;fun-or-interesting-things-i-noticed-throughout&quot;&gt;Fun or interesting things I noticed throughout&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;When he opens up iex (the Elixir repl) you can see he’s running Erlang ER16B and elixir v 0.10.1-dev&lt;/li&gt;
  &lt;li&gt;What is Dave Thomas’s accent? I believe he is from England, but has lived in Texas for a number of years…that might explain it&lt;/li&gt;
  &lt;li&gt;If anyone has seen him throughout the years, his appearance seems to change significantly from time to time&lt;/li&gt;
  &lt;li&gt;Oddly, he makes joke that Gordon Moore (of Intel) looks like ‘the Wendy’s guy’ - isn’t the name of the founder of Wendy’s Dave Thomas???&lt;/li&gt;
  &lt;li&gt;He’s using Sublime Text (although in other places I have seen him using emacs) and also a font that has ligatures (-&amp;gt; looks like an arrow). but later on, there is no ligature of the arrow. strange&lt;/li&gt;
  &lt;li&gt;why does he call the directory BluePeter where he stored examples prepared earlier?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;overall-impression&quot;&gt;Overall Impression&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Not a bad intro by a guy that knows a thing or two about introducing a language&lt;/li&gt;
  &lt;li&gt;The sound is just terrible, but I’d say video is still worth watching&lt;/li&gt;
  &lt;li&gt;If you already know the language, you won’t be exposed to anything new&lt;/li&gt;
&lt;/ul&gt;</content><author><name></name></author><category term="conference" /><category term="elixir" /><category term="ruby" /><summary type="html">tldr The future is functional Elixir is a functional language built on top of Erlang Elixir (thanks to Erlang and OTP) has already “solved” concurrency Dave’s talk</summary></entry><entry><title type="html">Reviews of Conference Talks</title><link href="https://randre03.github.io/Conference-Talk_Reviews/" rel="alternate" type="text/html" title="Reviews of Conference Talks" /><published>2017-12-28T00:00:00+00:00</published><updated>2017-12-28T00:00:00+00:00</updated><id>https://randre03.github.io/Conference-Talk_Reviews</id><content type="html" xml:base="https://randre03.github.io/Conference-Talk_Reviews/">&lt;p&gt;I love a good conference talk and currently I am really into the &lt;a href=&quot;https://elixir-lang.org/&quot; target=&quot;_blank&quot;&gt;Elixir Programming Language&lt;/a&gt;. One thing though is it’s tough to know which talks to watch online:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Some have great presenters, but cover a topic I am not currently interested in&lt;/li&gt;
  &lt;li&gt;Some are about a topic relevent to what I’m interested in or need to learn, but the video is poor quality&lt;/li&gt;
  &lt;li&gt;Some just aren’t that good&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, I thought I would write about some of the conference talks after I watch them. Let you know what it covers, etc. The format of these reviews is more ‘stream-of-consciousness’ than ‘here’s what happened minute by minute record’.&lt;/p&gt;

&lt;p&gt;Here is a link to the first one: &lt;a href=&quot;/conference_talk_review_Dave_Thomas_Lonestar_2013/&quot; target=&quot;_blank&quot;&gt;Dave Thomas’s talk “Power of Erlang, Beauty of Ruby” at 2013 Lonestar Ruby Conference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m hoping to keep these coming…&lt;/p&gt;</content><author><name></name></author><category term="conference" /><category term="announcement" /><summary type="html">I love a good conference talk and currently I am really into the Elixir Programming Language. One thing though is it’s tough to know which talks to watch online: Some have great presenters, but cover a topic I am not currently interested in Some are about a topic relevent to what I’m interested in or need to learn, but the video is poor quality Some just aren’t that good</summary></entry><entry><title type="html">Fix your Shell Prompt in Emacs</title><link href="https://randre03.github.io/terminal_prompt_in_emacs/" rel="alternate" type="text/html" title="Fix your Shell Prompt in Emacs" /><published>2017-12-27T00:00:00+00:00</published><updated>2017-12-27T00:00:00+00:00</updated><id>https://randre03.github.io/terminal_prompt_in_emacs</id><content type="html" xml:base="https://randre03.github.io/terminal_prompt_in_emacs/">&lt;p&gt;tldr
If your shell prompt looks fine in iTerm2, but strange inside emacs shell (specifically, seeing &lt;code class=&quot;highlighter-rouge&quot;&gt;'1337;Remote Host...CurrentDir'&lt;/code&gt; inside ansi-term or multi-term) try deleting your iterm-shell-integration file.
(see applicable links at bottom of this post)&lt;/p&gt;

&lt;h2 id=&quot;the-whole-story&quot;&gt;The whole story&lt;/h2&gt;

&lt;p&gt;I’ve used emacs (spacemacs, specifically) for a number of years now. One day, I fired up a shell inside emacs (I usually use ansi-term) and my prompt was polluted with some strange characters &lt;code class=&quot;highlighter-rouge&quot;&gt;'1337;Remote Host...CurrentDir=...'&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I searched the internet far and wide.
I found how to remove the ‘4m’s and other strange characters. But the issue persisted.&lt;/p&gt;

&lt;p&gt;I grew so frustrated I decided to leave Spacemacs and use vim (I’ve always loved vim and use evil-mode for emacs). After several days of setting up vim and tmux and another several days trying to get my theme to work inside tmux, the whole system felt brittle.&lt;/p&gt;

&lt;p&gt;I went back to emacs and looked at the prompt - the strange symbols seemed to be where the unicode characters show up when viewed inside iTerm2. I found a way to allow emacs to show unicode inside ansi-term.&lt;/p&gt;

&lt;p&gt;Elated, I made that change, fired up emacs, then ansi-term - BAM! my unicode symbols showed correctly, but I still had those lingering ‘1337 and directory info’ showing up.&lt;/p&gt;

&lt;p&gt;I decided there were two courses of action:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;since I don’t use Bash, I could tell emacs’ ansi-term to use /usr/bash for my shell instead of /usr/zsh; or&lt;/li&gt;
  &lt;li&gt;figure out how to use one prompt when the shell is being run by iTerm and a different one run inside emacs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I actually tried both, but:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;I didn’t like having to maintain two alias files - one for zsh and one for bash; and&lt;/li&gt;
  &lt;li&gt;I tried to find how to test if I was inside emacs running a shell or not to input into my .zshrc, but could not find a way to make it work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Frustrated, again, I revised my search terms and held my breath. Finally, I saw something that said the issue could be that I was using iTerm2’s iterm-shell-integration. All I had to do was run &lt;code class=&quot;highlighter-rouge&quot;&gt;rm ~/.iterm2_shell_integration.zsh&lt;/code&gt; and my prompt no longer had any extraneous symbols (actually, i used ‘trash’ instead of ‘rm’ - ‘rm’ is unecesarily dangerous).&lt;/p&gt;

&lt;p&gt;This also explained why one day my prompt was fine and the next day it was messed-up. When you install iterm2 it does not install the shell-integration automatically. One day I must have decided to install it, causing my emacs shell prompt to report strange characters.&lt;/p&gt;

&lt;h3 id=&quot;links&quot;&gt;Links:&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://redd.it/5p3njk&quot; target=&quot;_blank&quot;&gt;my isssue: seeing ‘1337;Remote Host…CurrentDir=…’&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Typical advice for fixing characters in emacs shell prompt:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;http://www.joshstaiger.org/archives/2005/07/fixing_garbage.html&quot; target=&quot;_blank&quot;&gt;color escape codes poluting emacs shell prompt&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/8918910/weird-character-zsh-in-emacs-terminal&quot; target=&quot;_blank&quot;&gt;seeing ‘4m’ in prompt&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://spacemacs.org&quot; target=&quot;_blank&quot;&gt;Spacemacs&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://neovim.io&quot; target=&quot;_blank&quot;&gt;Neovim&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.iterm2.com/documentation-shell-integration.html&quot; target=&quot;_blank&quot;&gt;information about iterm2-shell-integration&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;show unicode in emacs shell
 ```lisp
(defun my-term-use-utf8 ()
  (set-buffer-process-coding-system ‘utf-8-unix ‘utf-8-unix))
(add-hook ‘term-exec-hook ‘my-term-use-utf8)&lt;/li&gt;
&lt;/ul&gt;</content><author><name></name></author><category term="emacs" /><category term="shell" /><summary type="html">tldr If your shell prompt looks fine in iTerm2, but strange inside emacs shell (specifically, seeing '1337;Remote Host...CurrentDir' inside ansi-term or multi-term) try deleting your iterm-shell-integration file. (see applicable links at bottom of this post)</summary></entry><entry><title type="html">In Praise of the FZF Plugin for Vim</title><link href="https://randre03.github.io/in_praise_of_fzf/" rel="alternate" type="text/html" title="In Praise of the FZF Plugin for Vim" /><published>2017-12-27T00:00:00+00:00</published><updated>2017-12-27T00:00:00+00:00</updated><id>https://randre03.github.io/in_praise_of_fzf</id><content type="html" xml:base="https://randre03.github.io/in_praise_of_fzf/">&lt;p&gt;tldr:
The &lt;a href=&quot;https://github.com/junegunn/fzf.vim&quot; target=&quot;_blank&quot;&gt;fzf plugin for vim&lt;/a&gt; is an absolute game-changer. Some things to try:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;:Files: fuzzy-find (very fast) files in your project&lt;/li&gt;
  &lt;li&gt;:GFiles: fuzzy-find the files in your project that are under version control&lt;/li&gt;
  &lt;li&gt;:Buffers: like :ls but you can again use fizzy-find&lt;/li&gt;
  &lt;li&gt;:Lines: search you project by line of code&lt;/li&gt;
  &lt;li&gt;:BLines: like above but limited to current buffer’s contents&lt;/li&gt;
  &lt;li&gt;:Tags: yup, fuzzy-find for ctags&lt;/li&gt;
  &lt;li&gt;:BTags: yup, it’s what you think&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Note: I have switched back to &lt;a href=&quot;http://spacemacs.org/&quot; target=&quot;_blank&quot;&gt;Spacemacs&lt;/a&gt;, but this plugin is still amazing!)&lt;/p&gt;

&lt;p&gt;I can’t quite recall how I came across &lt;a href=&quot;https://github.com/junegunn/fzf&quot; target=&quot;_blank&quot;&gt;fzf&lt;/a&gt; and it’s &lt;a href=&quot;https://github.com/junegunn/fzf.vim&quot; target=&quot;_blank&quot;&gt;vim plugin&lt;/a&gt;. fzf on its own is pretty cool, but the vim-plugin is &lt;em&gt;&lt;strong&gt;AMAZING&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I used to use Emacs (specifically Spacemacs) and there is an amazing set of packages: &lt;a href=&quot;https://github.com/abo-abo/swiper&quot; target=&quot;_blank&quot;&gt;Counsel, Ivy and Swiper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In emacs you need something called a completion engine. This is the interface through-which you interact with emacs (helm and ido are two popular completion packages as well).&lt;/p&gt;

&lt;p&gt;Anyway, one of the killer features of Ivy is when you want to search the contents of a file (buffer) you run the swiper command and ivy shows any and all results. When you first start all lines in your code is shown as you have not yet provided something to search for. As you begin to type, the lines that match your search string begin to whittle-down to what you need.&lt;/p&gt;

&lt;p&gt;I moved away from Spacemacs, but I longed for Ivy, Counsel and Swiper.&lt;/p&gt;

&lt;p&gt;fzf is very close to that same functionality and just like Ivy the plugin is more like an interface I use to interact with vim.&lt;/p&gt;

&lt;p&gt;If I want to find a file in my project - :Files.
If I want to find a file in my project under version control - :GFiles
If I want to change buffers - :Buffers
If I want to search for something in my file like I did using Ivy in Spacemacs: :BLines (or :Lines if I want to search across all files in my project)
If I want to navigate to a different module using the info in my tag file - :Tags (this one has saved me hours upon hours)
I can also do that but for just the keyword in the current buffer - :BTags
can’t remember that keyboard shortcut? :Maps&lt;/p&gt;

&lt;p&gt;Oh yeah…you can create your own commands too!&lt;/p&gt;

&lt;p&gt;fzf is a must-have vim plugin. Actually, the developer &lt;a href=&quot;https://github.com/junegunn&quot; target=&quot;_blank&quot;&gt;junegunn&lt;/a&gt; has other great vim plugins. Use the link to browse his repository. I suggest also reading through his .vimrc to see the plugins (his and others) he is using.&lt;/p&gt;</content><author><name></name></author><category term="vim" /><summary type="html">tldr: The fzf plugin for vim is an absolute game-changer. Some things to try: :Files: fuzzy-find (very fast) files in your project :GFiles: fuzzy-find the files in your project that are under version control :Buffers: like :ls but you can again use fizzy-find :Lines: search you project by line of code :BLines: like above but limited to current buffer’s contents :Tags: yup, fuzzy-find for ctags :BTags: yup, it’s what you think</summary></entry><entry><title type="html">Getting ctags to work with Elixir (in Neovim)</title><link href="https://randre03.github.io/ctags_and_neovim/" rel="alternate" type="text/html" title="Getting ctags to work with Elixir (in Neovim)" /><published>2017-12-26T00:00:00+00:00</published><updated>2017-12-26T00:00:00+00:00</updated><id>https://randre03.github.io/ctags_and_neovim</id><content type="html" xml:base="https://randre03.github.io/ctags_and_neovim/">&lt;p&gt;tldr: If you’re using universal-ctags and want elixir support:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;navigate to, or create, ~/.ctags.d&lt;/li&gt;
  &lt;li&gt;inside, create elixir.ctags file&lt;/li&gt;
  &lt;li&gt;copy and paste the contents of the &lt;a href=&quot;https://github.com/mmorearty/elixir-ctags&quot; target=&quot;_blank&quot;&gt;elixir-ctags&lt;/a&gt; file into &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.ctags.d/elixir.ctags&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;run ctags -R in your project directory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Note: I’ve gone back to Spacemacs, but leaving here in case it’s useful for future me and others.)&lt;/p&gt;

&lt;p&gt;I saw this post: &lt;a href=&quot;http://coderoncode.com/tools/2017/04/16/vim-the-perfect-ide.html&quot; target=&quot;_blank&quot;&gt;‘Vim is the Perfect IDE’&lt;/a&gt; on the CoderOnCode blog.&lt;/p&gt;

&lt;p&gt;CoderOnCode also appears to be an elixir programmer. Lo and behold CoderOnCode has included ctags as part of the tools used for elixir programming.&lt;/p&gt;

&lt;p&gt;For those of you who do not know what a ‘ctags’ is, briefly, ctags (ctags, exuberant-ctags, universal-ctags, etc.) use regexes (regexi?) to parse the files in your code and identify keywords. This process results in a file (default is the cleverly, yet accurately, named ‘tags’). Your editor can then use the contents of this file to display to you the modules, functions, etc. that exist in your codebase.&lt;/p&gt;

&lt;p&gt;This is useful for learning an unfamiliar codebase, navigating through a large code base, etc.&lt;/p&gt;

&lt;p&gt;Concurrent with this I started to learn ruby. I found that out of the box ruby in vim supported the creation of a tags file (vim-gutentags handled this without me realizing it, I think) and I found myself using the tags - it also added some nice chrome to vim-airline.&lt;/p&gt;

&lt;p&gt;With the knowledge that:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;tags are good&lt;/li&gt;
  &lt;li&gt;tags are useful&lt;/li&gt;
  &lt;li&gt;tags work in ruby in vim&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I set off to make this happen in elixir.&lt;/p&gt;

&lt;p&gt;Searching the web far and wide all I could find was a package - &lt;a href=&quot;https://github.com/mmorearty/elixir-ctags&quot; target=&quot;_blank&quot;&gt;elixir-ctags&lt;/a&gt; - with some cryptic instructions, and the exuberant ctags website which appears to have last been updated around the turn of the last millennium.&lt;/p&gt;

&lt;p&gt;It appeared that many, many people struggled to get ctags to work on macOs. But I could not figure out how to get elixir and ctags to work together.&lt;/p&gt;

&lt;p&gt;Finally, I came to the realization that I was using universal-ctags. Looking at the documentation for universal-ctags (readthedocs-style) was impenetrable. It did confirm that exuberant-ctags had out-of-the-box support for Erlang and I assumed, by extension, so did universal-ctags, but nothing on elixir.&lt;/p&gt;

&lt;p&gt;Then I found the following, seemingly written down for posterity, but not with the goal of helping someone. it said that perhaps the most immediate different b/w exuberant and universal-ctags was that universal relies (or pulls from) a directory &lt;code class=&quot;highlighter-rouge&quot;&gt;~/.ctags.d&lt;/code&gt; to find any personal settings (such as the file created as a result of following the directions from elixir-ctags) and that such a file should end in &lt;code class=&quot;highlighter-rouge&quot;&gt;.ctags&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Putting two and two together, crossing my fingers and closing my eyes, I put the elixir-ctags code into a file &lt;code class=&quot;highlighter-rouge&quot;&gt;elixir.ctags&lt;/code&gt; and saved it inside ~/.ctags.d/.&lt;/p&gt;

&lt;p&gt;I changed directories to my current elixir project and ran the following command in the project root &lt;code class=&quot;highlighter-rouge&quot;&gt;ctags -R&lt;/code&gt;. Believe it or not, that worked!&lt;/p&gt;

&lt;p&gt;When I toggled vim-tagbar, I could see my tags listed out nicely in accordance with CoderOnCode settings and I could navigate back and forth to my heart’s content.&lt;/p&gt;</content><author><name></name></author><category term="elixir" /><category term="ctags" /><summary type="html">tldr: If you’re using universal-ctags and want elixir support: navigate to, or create, ~/.ctags.d inside, create elixir.ctags file copy and paste the contents of the elixir-ctags file into ~/.ctags.d/elixir.ctags. run ctags -R in your project directory</summary></entry></feed>