<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Chris-Lattner on blog.iankulin.com</title><link>https://blog.iankulin.com/tags/chris-lattner/</link><description>Recent content in Chris-Lattner on blog.iankulin.com</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Mon, 22 Aug 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.iankulin.com/tags/chris-lattner/index.xml" rel="self" type="application/rss+xml"/><item><title>Playgrounds are good</title><link>https://blog.iankulin.com/playgrounds-are-good/</link><pubDate>Mon, 22 Aug 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/playgrounds-are-good/</guid><description>&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/img_2778.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;A couple of times (&lt;a href="https://blog.iankulin.com/protocols/"&gt;Protocols&lt;/a&gt; &amp;amp; &lt;a href="https://blog.iankulin.com/named-loops/"&gt;Named Loops&lt;/a&gt;) in the past few days I&amp;rsquo;ve needed to write and run a couple of tiny C or C++ snippets, and I&amp;rsquo;ve acutely felt the lack of Swift Playgrounds for it. It occurred to me that Playgrounds has been instrumental in my enjoyment of learning Swift - it&amp;rsquo;s just a bit magic to grab the closest device and noodle out an idea or to make sure I&amp;rsquo;ve understood a new concept.&lt;/p&gt;
&lt;img src="https://blog.iankulin.com/images/15152540.jpg" width="89" alt=""&gt;
&lt;p&gt;In a &lt;a href="https://podcasts.apple.com/us/podcast/episode-11-chris-lattner/id1505697997?i=1000478871841"&gt;conversation between Chris Lattner and Paul Hudson&lt;/a&gt; I&amp;rsquo;ve listened to recently, they discuss the value of &lt;a href="https://www.apple.com/swift/playgrounds/"&gt;Playgrounds&lt;/a&gt; and the excellent &lt;a href="https://docs.swift.org/swift-book/"&gt;Swift book&lt;/a&gt; in bringing the community along from Objective C. I could not agree more about the value of these two.&lt;/p&gt;
&lt;p&gt;As an alternative, I downloaded &lt;a href="https://apps.apple.com/in/app/c-programming-language/id499545918"&gt;C Language app&lt;/a&gt; for the iPad. This seems like a reasonable editor that uses an online compiler - it worked for my purpose although it wasn&amp;rsquo;t real snappy.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/img_2779.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;A couple of alternatives in the app store mentioned the ability to compile offline - which didn&amp;rsquo;t make sense to me until I pressed build on this one and realised it was using a server somewhere to do that work. So this may well not be the best one for AUD5.&lt;/p&gt;
&lt;p&gt;I was amazed to find heaps of online compilers for things which would have done the job just as well. I&amp;rsquo;ve bookmarked &lt;a href="https://itsourcecode.com/compile-code-run-using-online-compiler-ide-for-free/"&gt;this one&lt;/a&gt; which does all sorts of languages including C and Swift.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://itsourcecode.com/compile-code-run-using-online-compiler-ide-for-free/"&gt;&lt;img src="https://blog.iankulin.com/images/screen-shot-2022-08-13-at-12.19.58-pm.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Chris Lattner</title><link>https://blog.iankulin.com/chris-lattner/</link><pubDate>Wed, 03 Aug 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/chris-lattner/</guid><description>&lt;p&gt;Thank you YouTube algorithm for this recommendation - Chris Lattner, the main author of Swift (amongst other things including LVM) chatting with Lex Fridman. Ignore the clickbait title. There is a good, brief discussion about the tradeoffs in value vs references types which is a topic I&amp;rsquo;ve been thinking a bit about this week.&lt;/p&gt;
&lt;p&gt;Also some interesting comments about how a language delivers it&amp;rsquo;s complexity. Chris gives the funny example of what &amp;ldquo;hello world&amp;rdquo; looks like in Swift vs C++. Here&amp;rsquo;s Swift: &lt;code&gt;Print(&amp;quot;Hello world&amp;quot;)&lt;/code&gt;, here&amp;rsquo;s C++:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c++" data-lang="c++"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#5e81ac;font-style:italic"&gt;#include&lt;/span&gt; &lt;span style="color:#5e81ac;font-style:italic"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span style="color:#5e81ac;font-style:italic"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#81a1c1"&gt;int&lt;/span&gt; &lt;span style="color:#88c0d0"&gt;main&lt;/span&gt;&lt;span style="color:#eceff4"&gt;()&lt;/span&gt; &lt;span style="color:#eceff4"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; std&lt;span style="color:#81a1c1"&gt;::&lt;/span&gt;cout &lt;span style="color:#81a1c1"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;Hello World!&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#81a1c1;font-weight:bold"&gt;return&lt;/span&gt; &lt;span style="color:#b48ead"&gt;0&lt;/span&gt;&lt;span style="color:#eceff4"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#eceff4"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Especially when part of my interest is in exciting kids in programming, that&amp;rsquo;s a stark difference. Swift does go on to do the hard things - it&amp;rsquo;s used for native apps and has some of the great modern language features, but the simple things are easy. I am very happy with the idea of Swift (especially plus Playgrounds) being a smooth introduction to coding. Less so with SwiftUI - that gets complicated quickly when things go wrong.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
 &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/UTFFR61xVbs?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
 &lt;/div&gt;
</description></item></channel></rss>