<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Confessions of a Code Addict: Weekly Code Confessions Digest]]></title><description><![CDATA[Engage with curated insights, commentaries, and links on coding, computer science, and related topics in our 'Weekly Code Confessions Digest'.]]></description><link>https://blog.codingconfessions.com/s/weekly-code-confessions-digest</link><image><url>https://substackcdn.com/image/fetch/$s_!lstI!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe440a724-cff0-437a-8361-d7699406ac22_500x500.png</url><title>Confessions of a Code Addict: Weekly Code Confessions Digest</title><link>https://blog.codingconfessions.com/s/weekly-code-confessions-digest</link></image><generator>Substack</generator><lastBuildDate>Thu, 09 Apr 2026 14:31:56 GMT</lastBuildDate><atom:link href="https://blog.codingconfessions.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Abhinav Upadhyay]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[codeconfessions@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[codeconfessions@substack.com]]></itunes:email><itunes:name><![CDATA[Abhinav Upadhyay]]></itunes:name></itunes:owner><itunes:author><![CDATA[Abhinav Upadhyay]]></itunes:author><googleplay:owner><![CDATA[codeconfessions@substack.com]]></googleplay:owner><googleplay:email><![CDATA[codeconfessions@substack.com]]></googleplay:email><googleplay:author><![CDATA[Abhinav Upadhyay]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Code Confessions Digest #5: News, and Resources from Last Week]]></title><description><![CDATA[In this week's digest: GPU Puzzles, Embeddings, Writing a VM in C, Lua in Rust, Real world OCaml, and Probability for computer scientists]]></description><link>https://blog.codingconfessions.com/p/code-confessions-digest-5</link><guid isPermaLink="false">https://blog.codingconfessions.com/p/code-confessions-digest-5</guid><dc:creator><![CDATA[Abhinav Upadhyay]]></dc:creator><pubDate>Sat, 28 Oct 2023 18:31:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!poxc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey everyone, welcome to Confessions of a Code Addict. Quite a few new people joined us since the last article on <a href="https://codeconfessions.substack.com/p/gpu-computing">GPU computing</a> which has been widely appreciated. I am very grateful that so many people read and liked it. </p><p>This post is something new I&#8217;m trying where I will share a few updates about upcoming things at Confessions of a Code Addict, and some interesting resources that might be of interest to you. </p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!poxc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!poxc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 424w, https://substackcdn.com/image/fetch/$s_!poxc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 848w, https://substackcdn.com/image/fetch/$s_!poxc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 1272w, https://substackcdn.com/image/fetch/$s_!poxc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!poxc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024" width="512" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:512,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!poxc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 424w, https://substackcdn.com/image/fetch/$s_!poxc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 848w, https://substackcdn.com/image/fetch/$s_!poxc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 1272w, https://substackcdn.com/image/fetch/$s_!poxc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764e7acd-2faf-49fa-b7c0-5bafbe7f29c4_1024x1024 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">GPUs</figcaption></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">My regular educational articles are free and open for everyone. However, if you find them valuable, consider becoming a paid subscriber to support my writing.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2>Updates from Confessions of a Code Addict</h2><p>I was completely wiped out mentally after writing the article on GPU computing and it has taken a while for me to get back on the saddle. I&#8217;m currently working on couple of new ideas for articles. </p><ul><li><p>There were few topics related to GPUs which I had to leave out in the last article because of space and time constraints. Those topics were not necessary to understand the fundamentals of GPU computing, but it&#8217;s good to know about them. I&#8217;m tentatively calling the article as &#8220;GPU Computing: The Missing Parts&#8221;. I plan to discuss topics such as:</p><ul><li><p>Advanced grid and thread block layouts</p></li><li><p>Thread block clusters (newly introduced feature in Nvidia H100)</p></li><li><p>Control divergence: How warps execute in the presence of if/else conditions</p></li><li><p>Independent thread scheduling</p></li><li><p>Unified virtual memory between CPUs and GPUs</p></li></ul></li><li><p>Another exciting topic I am working on is concerned with CPython internals. It&#8217;s too soon to disclose the details but many of you have enjoyed the CPython internal articles and this one is going to be very hardcore.</p></li></ul><p>I hope you are as excited about these as I am! Next week is quite busy for me, but I&#8217;m working as hard as I can to get these out for you as soon as possible. Stay tuned!</p><div><hr></div><h2>Resources for the Week</h2><h2>&#128240; Articles</h2><ul><li><p><strong>GPU Puzzles</strong>: Learn GPU Programming by solving these interactive GPU puzzles. This is the perfect next progression after reading the GPU computing article: <a href="https://github.com/srush/GPU-Puzzles">https://github.com/srush/GPU-Puzzles</a></p></li><li><p><strong>Do Language Models really understand Language</strong>: Whether LLMs understand language or not is a hotly debated topic. In this article <span class="mention-wrap" data-attrs="{&quot;name&quot;:&quot;Devansh&quot;,&quot;id&quot;:8101724,&quot;type&quot;:&quot;user&quot;,&quot;url&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f49c53d6-8d45-4cba-a7f9-342282e6fd31_643x644.jpeg&quot;,&quot;uuid&quot;:&quot;8d6d0f6c-eeed-4175-839e-30c308a6fce9&quot;}" data-component-name="MentionToDOM"></span> digs deep into the research in this area and breaks it down for you. Highly recommended read: </p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:137466914,&quot;url&quot;:&quot;https://artificialintelligencemadesimple.substack.com/p/do-language-models-really-understand&quot;,&quot;publication_id&quot;:1315074,&quot;publication_name&quot;:&quot;Artificial Intelligence Made Simple&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77504fa0-0f08-4a38-bbde-becb151d2db8_643x644.png&quot;,&quot;title&quot;:&quot;Do Language Models really understand Language[Breakdowns]&quot;,&quot;truncated_body_text&quot;:&quot;Hey, it&#8217;s Devansh &#128075;&#128075; In my series Breakdowns, I go through complicated literature on Machine Learning to extract the most valuable insights. Expect concise, jargon-free, but still useful analysis aimed at helping you understand the intricacies of Cutting-Edge AI Research and the applications of Deep Learning at the highest level.&quot;,&quot;date&quot;:&quot;2023-10-24T10:43:29.437Z&quot;,&quot;like_count&quot;:69,&quot;comment_count&quot;:7,&quot;bylines&quot;:[{&quot;id&quot;:8101724,&quot;name&quot;:&quot;Devansh&quot;,&quot;handle&quot;:&quot;chocolatemilkcultleader&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f49c53d6-8d45-4cba-a7f9-342282e6fd31_643x644.jpeg&quot;,&quot;bio&quot;:&quot;The best meme-maker in Tech.\nWriter on AI, Software, and the Tech Industry.\nCome say hi, I need more friends&quot;,&quot;profile_set_up_at&quot;:&quot;2021-08-21T20:28:53.612Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:1274217,&quot;user_id&quot;:8101724,&quot;publication_id&quot;:1315074,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:true,&quot;publication&quot;:{&quot;id&quot;:1315074,&quot;name&quot;:&quot;Artificial Intelligence Made Simple&quot;,&quot;subdomain&quot;:&quot;artificialintelligencemadesimple&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Turning complex ideas in AI Research, Machine Learning, Deep Learning, and Data Science into actionable insights. Read in over 160 countries. Sister Publication to Tech Made Simple&quot;,&quot;logo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/77504fa0-0f08-4a38-bbde-becb151d2db8_643x644.png&quot;,&quot;author_id&quot;:8101724,&quot;theme_var_background_pop&quot;:&quot;#009B50&quot;,&quot;created_at&quot;:&quot;2023-01-14T23:37:24.692Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Devansh&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null,&quot;explicit&quot;:false}},{&quot;id&quot;:109622,&quot;user_id&quot;:8101724,&quot;publication_id&quot;:108704,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:108704,&quot;name&quot;:&quot;Technology Made Simple&quot;,&quot;subdomain&quot;:&quot;codinginterviewsmadesimple&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Deep yet digestible insights about Computer Science, Programming Interviews, Software Engineering Careers, Machine Learning, and the Tech Industry for Tech Leaders. Amazing For Coders and Managers. Beneficial to anyone trying to make money in Tech. &quot;,&quot;logo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/8546dc69-af46-4d5d-9a80-b66cb76c833b_644x644.png&quot;,&quot;author_id&quot;:8101724,&quot;theme_var_background_pop&quot;:&quot;#45D800&quot;,&quot;created_at&quot;:&quot;2020-10-07T10:47:41.199Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:&quot;Devansh from Tech Made Simple&quot;,&quot;copyright&quot;:&quot;Devansh&quot;,&quot;founding_plan_name&quot;:&quot;Founding Member&quot;,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;enabled&quot;,&quot;language&quot;:null,&quot;explicit&quot;:false}}],&quot;twitter_screen_name&quot;:&quot;Machine01776819&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://artificialintelligencemadesimple.substack.com/p/do-language-models-really-understand?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!Pfon!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77504fa0-0f08-4a38-bbde-becb151d2db8_643x644.png" loading="lazy"><span class="embedded-post-publication-name">Artificial Intelligence Made Simple</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">Do Language Models really understand Language[Breakdowns]</div></div><div class="embedded-post-body">Hey, it&#8217;s Devansh &#128075;&#128075; In my series Breakdowns, I go through complicated literature on Machine Learning to extract the most valuable insights. Expect concise, jargon-free, but still useful analysis aimed at helping you understand the intricacies of Cutting-Edge AI Research and the applications of Deep Learning at the highest level&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">2 years ago &#183; 69 likes &#183; 7 comments &#183; Devansh</div></a></div><p></p></li></ul>
      <p>
          <a href="https://blog.codingconfessions.com/p/code-confessions-digest-5">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Code Confessions Digest #4: News, and Resources from Last Week]]></title><description><![CDATA[In This Week's Digest: TCP Memory, Cgroups, Memory Allocation, Interpreters, GPU, PostgreSQL, Rust, Kernel Modules, Scala-3, Distributed Systems]]></description><link>https://blog.codingconfessions.com/p/code-confessions-digest-4</link><guid isPermaLink="false">https://blog.codingconfessions.com/p/code-confessions-digest-4</guid><dc:creator><![CDATA[Abhinav Upadhyay]]></dc:creator><pubDate>Tue, 04 Jul 2023 11:36:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GNZM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi and welcome to Confessions of a Code Addict, the newsletter dedicated to programming and computer science. This is the weekly digest edition of the newsletter where I share a selection of some of the most interesting links and resources from last week. Before we start, I would like to share some news on what else is cooking at Confessions of a Code Addict. I&#8217;ve been working on a long-form article on the topic of vector clocks and how they are used in maintaining the consistency of replication in distributed databases. Like all my previous articles, this one will also be accompanied by code, where we will implement replication using vector clocks in a toy distributed databases. So hang on, it&#8217;s coming soon!</p><p>In this week&#8217;s digest:</p><ul><li><p>Unbounded memory usage by TCP for receive buffers, and how we fixed it</p></li><li><p>Cgroups - deep dive into resource management in kubernetes</p></li><li><p>A visual guide to how memory allocation works</p></li><li><p>Squeezing a little more performance out of bytecode interpreters</p></li><li><p>How GPU computing works</p></li><li><p>Making PostgreSQL multi-threaded</p></li><li><p>Train you own minimal GPT language model in Rust</p></li><li><p>Effective Rust</p></li><li><p>The Linux kernel module programming guide</p></li><li><p>Introduction to Scala-3</p></li><li><p>Distributed systems for fun and profit</p></li></ul><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GNZM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GNZM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 424w, https://substackcdn.com/image/fetch/$s_!GNZM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 848w, https://substackcdn.com/image/fetch/$s_!GNZM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 1272w, https://substackcdn.com/image/fetch/$s_!GNZM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GNZM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512" width="512" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:512,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GNZM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 424w, https://substackcdn.com/image/fetch/$s_!GNZM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 848w, https://substackcdn.com/image/fetch/$s_!GNZM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 1272w, https://substackcdn.com/image/fetch/$s_!GNZM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9d112c5-9381-44b8-8f7f-b3e62a45b3ac_512x512 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A cute dog reading a newspaper</figcaption></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">If you enjoy reading Confessions of a Code Addict, please consider becoming a subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h2>&#128240; Articles</h2><h2><a href="https://blog.cloudflare.com/unbounded-memory-usage-by-tcp-for-receive-buffers-and-how-we-fixed-it/">Unbounded memory usage by TCP for receive buffers, and how we fixed it</a></h2><p>Cloudflare engages in intensive engineering work in the fields of networking and systems performance. Their blogs are highly recommended reading for all engineers, regardless of whether they directly work in those areas. By reading their blogs, you can gain valuable insights that can enhance your own work. In a recent article, Cloudflare discusses their process of debugging an issue in the Linux kernel's network stack. They discovered that the kernel was allocating excessive memory for certain TCP sessions, resulting in a significant increase in system-wide memory usage and subsequent performance degradation. This article serves as an invaluable lesson in debugging techniques and system performance analysis. It is a must-read for all engineers!</p><div><hr></div><h2><a href="https://martinheinz.dev/blog/91">Cgroups - Deep Dive into Resource Management in Kubernetes</a></h2><p>Everyone is developing microservices these days and deploying them with the help of Kubernetes. However, how does Kubenetes work? In this article Martin Heinz carefully explains what Cgroups are and how Kubernetes uses them to do resource allocation and management. It shows how are the pod manifests translated into cgroup files. Martin also talks about how the upcoming memory QoS feature is being implemented with the help of cgroups and how you would implement a container aware OOM-killer with cgroups. </p><div><hr></div><h2><a href="https://samwho.dev/memory-allocation/">A Visual Guide to How Memory Allocation Works</a></h2><p>Memory is one of the most fundamental resource that every program works with. Even if you program in a language with automatic memory management, it&#8217;s still important to understand how memory allocators work. At the end of the day, every piece of software is using the memory allocator provided by the operating system. By understanding how these allocators work, you are in a better position to debug performance issues. And if it comes down to replacing the system provided memory allocator with a 3rd party allocator, you will be able to make an informed decision because you can understand their pros and cons. In this article, Sam in his usual visual story telling style explains the working of a simple memory allocator, and gives you enough details that you can go and write your own allocator.</p><h2><a href="https://stefan-marr.de/2023/06/squeezing-a-little-more-performance-out-of-bytecode-interpreters/">Squeezing a Little More Performance Out of Bytecode Interpreters</a></h2><p>Do you dabble in programming languages? I know many programmers who like to play around implementing their own interpreted languages. It&#8217;s a fun exercise, now only you gain a deeper understanding of how programming languages work, but you also learn weird tricks to improve the performance of your interpreter (or compiler). Stefan Marr is a well known researcher working in this area and in this short blog post he gives some tips to squeeze some extra performance in your bytecode interpreter. Do give it a read!</p><h2><a href="https://www.youtube.com/watch?v=3l10o0DYJXg">How GPU Computing Works</a></h2><p>GPUs are at the forefront of all AI applications, they are powering the AI revolution. But, how do they work? A typical undergraduate computer science program covers in deep how CPUs work, but GPUs hardly get any coverage. There is a vast difference between the computing models of CPUs and GPUs. In this 40 minute talk Nvidia engineer Stephen Jones explains how exactly computation in GPU works. </p><div id="youtube2-3l10o0DYJXg" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;3l10o0DYJXg&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/3l10o0DYJXg?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><h2><a href="https://www.postgresql.org/message-id/31cc6df9-53fe-3cd9-af5b-ac0d801163f4%40iki.fi">Making PostgreSQL Multi-threaded</a></h2><p>This is a discussion thread between the PostgreSQL developers on making PostgreSQL multi-threaded. Even though I typically share articles or books with you here, but this discussion is fascinating and very educational. The developers involved in the discussion are highly technical and you can pick up a ton of knowledge just by reading the nuances they point out in making a complex system such as PostgreSQL multi-threaded. </p><h2><a href="https://blog.gopenai.com/train-your-own-minimal-gpt-language-model-in-rust-b53a9177973a">Train your own minimal GPT language model in Rust</a></h2><p>Do you want to understand how the GPT models work? And do you want to train your own small GPT? In this article the author shows how he trained a minimal GPT model in Rust and explains the process involved, check it out!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.codingconfessions.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>&#128218; Books and Courses</h2><h2><a href="https://www.lurklurk.org/effective-rust/">Effective Rust</a></h2><p>In the style of the &#8220;Effective &lt;your favorite programming language&gt;&#8221; book series, such as Effective Java and Effective C++, we now have Effective Rust. These books are well known in the programming circles for giving best practices and techniques for using various language features in order to write idiomatic code. Check it out!</p><h2><a href="https://sysprog21.github.io/lkmpg/">The Linux Kernel Module Programming Guide</a></h2><p>Do you want to become a Linux kernel hacker? This book takes explains how the Linux kernel modules work and how to implement them. Linux kernel modules are pluggable extensions to the kernel which allow us to implement custom behavior and functionality at the kernel level. For example, you can implement device drivers as kernel modules. Check out this book and learn to implement your own kernel modules.</p><h2><a href="https://alvinalexander.com/video-course/intro-scala-3/introduction/">Introduction to Scala-3</a></h2><p>This is a course on the basics of the Scala programming language. Scala is a popular functional programming language which runs on the JVM platform. It has been adopted by companies such as Twitter and LinkedIn, in order to meet the scale of their growing user bases. It comes with many modern features which have been widely appreciated by the programming community and some of these features are now slowly making their way into Java as well. This course is still under development, but check it out and keep an eye on it!</p><h2><a href="http://book.mixu.net/distsys/single-page.html">Distributed Systems for Fun and Profit</a></h2><p>In the microservice world, the use of distributed systems such as Kafka, Cassandra, Redis etc. has become very common. These systems hide massive amount of complexity behind their easy to use APIs. In order to understand the trade-offs involved when configuring these systems and when debugging issues, we need to have a thorough understanding of how such systems work. The field of distributed systems is very wide and deep, and it&#8217;s easy to feel lost when trying to explore it. However, if you ask me for a resource to get started, I will recommend this book. It covers some of the most important topics of distributed systems within 74 pages. </p><div><hr></div><h2>Wrapping Up</h2><p>I hope you enjoyed the articles and other resources from this week. Let me know in the comments if you enjoyed something in particular, or if something bugged you. Also, if you have anything interesting that you would like to share with me, then do so in the comments, I would love to read it. </p><p>If you'd like to stay connected with me through social media, you can find me on <a href="https://twitter.com/abhi9u">Twitter</a>, <a href="https://www.linkedin.com/in/abhinavu/">LinkedIn</a>, and Substack Notes. Given the declining quality of Twitter services, I warmly invite you to join me on Notes. It's a vibrant community that fosters real-time and amicable conversations among readers and writers.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://substack.com/notes&quot;,&quot;text&quot;:&quot;Join me on Notes!&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://substack.com/notes"><span>Join me on Notes!</span></a></p><div><hr></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Confessions of a Code Addict! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/p/code-confessions-digest-4?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.codingconfessions.com/p/code-confessions-digest-4?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>]]></content:encoded></item><item><title><![CDATA[Code Confessions Digest #3: News, and Resources from Last Week]]></title><description><![CDATA[Exploring CLI Tools, Debugging Techniques, Assembly Programming, Deep Learning, Compilers and More!]]></description><link>https://blog.codingconfessions.com/p/code-confessions-digest-3</link><guid isPermaLink="false">https://blog.codingconfessions.com/p/code-confessions-digest-3</guid><dc:creator><![CDATA[Abhinav Upadhyay]]></dc:creator><pubDate>Mon, 26 Jun 2023 12:07:06 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/8f6c8986-bb7e-4cac-b71e-debb62a7c07d_1080x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi and welcome to Confessions of a Code Addict, the newsletter dedicated to coding and computer science. This is the weekly digest edition of the newsletter where I share a selection of some of the most interesting links and resources from last week.</p><p>In this week&#8217;s digest:</p><ul><li><p>CLI tools for interacting with ChatGPT APIs</p></li><li><p>Debugging C and Python code using GDB</p></li><li><p>Rust to Assembly: Understanding inner workings of Rust</p></li><li><p>Learn 64-bit x86 assembly programming by writing a GUI from scratch</p></li><li><p>AI does not help programmers</p></li><li><p>Best Practices for Using <a href="https://codeconfessions.substack.com/p/creating-chatgpt-plugins-using-the">Function Call</a> Feature in OpenAI&#8217;s ChatGPT API</p></li><li><p>An introductory course on deep learning using PyTorch</p></li><li><p>Material from a workshop on vectorization from Cornell University</p></li><li><p>Essentials of Compilation: A book teaching you writing a compiler for your own programming language</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Confessions of a Code Addict! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div></li></ul><div><hr></div><h2>&#128240; Articles</h2><h2><a href="https://simonwillison.net/2023/May/18/cli-tools-for-llms/">llm, ttok and strip-tags&#8212;CLI tools for working with ChatGPT and other LLMs</a></h2><p>If you are a command line aficionado and appreciate the beauty of Unix pipes, then you will love this. Simon Willison has created a set of CLI tools for interacting with ChatGPT (via its APIs). For example, you can use these tools to get a summary of NYTimes' home page with this invocation:</p><pre><code>curl -s https://www.nytimes.com/ \
  | strip-tags .story-wrapper \
  | ttok -t 4000 \
  | llm --system 'summary bullet points'</code></pre><p>He has been adding more similar tools. I will leave the rest of the details to his article. Check it out <a href="https://simonwillison.net/2023/May/18/cli-tools-for-llms/">here</a>.</p><h2><a href="https://developer.nvidia.com/blog/debugging-mixed-python-and-c-language-stack/">Debugging a Mixed Python and C Language Stack</a></h2><p>Many of us are building complex data science stacks comprising tools and frameworks written in multiple languages, such as C, Python, and CUDA. Every now and then, we are bound to run into bugs, but how do we go about debugging such a mixed language stack? This article shows how to do that. It demonstrates how to debug C and Python code from GDB and provides some useful debugging techniques to find out the source of a deadlock among multiple threads of execution. Check it out <a href="https://developer.nvidia.com/blog/debugging-mixed-python-and-c-language-stack/">here</a>.</p><h2><a href="https://gaultier.github.io/blog/x11_x64.html">Learn x86-64 assembly by writing a GUI from scratch</a></h2><p>Do you want to learn x86 assembly programming but find most of the resources on it dry and boring? Then this should excite you. In this long tutorial, the author takes you through the basics of assembly programming for x86 hardware by building an x11-based GUI from scratch. Check it out <a href="https://gaultier.github.io/blog/x11_x64.html">here</a>.</p><h2><a href="https://vim-adventures.com/">Learn vim While Playing a Game</a></h2><p>Do the key bindings of Vim seem unusual to you, and you can&#8217;t quite figure out how to quit Vim (just kidding)? Then check out this online game where you need to use Vim key bindings to cross the levels. As you progress through the levels, you discover and master more and more Vim shortcuts. Find it <a href="https://vim-adventures.com/">here</a>.</p><h2><a href="https://eventhelix.com/rust/">Rust to Assembly: Understanding the Inner Workings of Rust</a></h2><p>Some of the best C programmers I have known have told me that if you want to write better C code, you need to know what assembly code is being generated by the compiler for it. It helps you write more efficient code at the C level because you can guess how the compiler might translate it, and you can guide the compiler to generate more optimal code. Rust is also a systems programming language, and by understanding how the assembly code is being generated for a piece of Rust code, you can learn to write better Rust code. This is a series of short posts that show and explain the assembly code for different Rust features. Check it out <a href="https://eventhelix.com/rust/">here</a>.</p><h2><a href="https://cacm.acm.org/blogs/blog-cacm/273577-ai-does-not-help-programmers/fulltext">AI Does Not Help Programmers</a></h2><p>There is an overwhelming set of people claiming that AI is here to replace programmers and a lot of is being written on this. However, as I have argued in one of <a href="https://codeconfessions.substack.com/p/will-ai-replace-programmers">my articles</a>, AI is really going to empower programmers to work on another level of abstraction for solving bigger problems. <a href="https://en.wikipedia.org/wiki/Bertrand_Meyer">Bertrand Meyer</a> voices a similar opinion in his article in the communications of the <a href="https://www.acm.org/">ACM</a>. Check out the full article <a href="https://cacm.acm.org/blogs/blog-cacm/273577-ai-does-not-help-programmers/fulltext">here</a>.</p><h2><a href="https://codeconfessions.substack.com/p/navigating-sharp-edges-in-openais">Best Practices for Using Function Call Feature in OpenAI&#8217;s ChatGPT API</a></h2><p>And if you missed my latest article from last week, check it out. In this article I provide some guidelines and best-practices to get the best output out of the ChatGPT APIs when using the <a href="https://codeconfessions.substack.com/p/creating-chatgpt-plugins-using-the">function call</a> feature. Find the article linked below.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;6555984e-e166-4228-b167-f74cee3c43f5&quot;,&quot;caption&quot;:&quot;The function call feature in OpenAI's ChatGPT APIs is a powerful tool, enabling us to perform some impressive tasks. If you are not familiar with function calls in the ChatGPT APIs, you may want to refer to my previous article on this topic. In that piece, I provided numerous examples of function calls and a comprehensive tutorial on building a Flask-ba&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;lg&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Some Gotchas with OpenAI's Function Call Feature and How to Handle Them&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:14520974,&quot;name&quot;:&quot;Abhinav Upadhyay&quot;,&quot;bio&quot;:&quot;Software Engineer by training and profession. Building Dr. Pawd - a podcast search engine. Subscribe to Dr. Pawd's newsletter at drpawd.substack.com&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c6dafc3-e0d4-40db-9510-4c57f3bc8e13_1532x1532.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-06-20T20:18:34.346Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01b1d5fd-b301-4b75-8158-54c28b85e19d_1200x628.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://codeconfessions.substack.com/p/navigating-sharp-edges-in-openais&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:129516033,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:7,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Confessions of a Code Addict&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F307131fa-821a-4fbf-b49e-78901102d734_500x500.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.codingconfessions.com/subscribe?"><span>Subscribe now</span></a></p><h2>&#128218; Books and Courses</h2><h2><a href="https://lightning.ai/pages/courses/deep-learning-fundamentals/">Deep Learning Fundamentals</a></h2><p>This is a hands-on course on deep learning by <a href="https://sebastianraschka.com/">Sebastian Raschka</a>, who is a researcher working in this field and has also published multiple books on this topic. The course uses PyTorch, so it&#8217;s also a good introduction to PyTorch. Find it <a href="https://lightning.ai/pages/courses/deep-learning-fundamentals/">here</a>.</p><h2><a href="https://cvw.cac.cornell.edu/vector/default">Introduction to Vectorization</a></h2><p>This is material from a workshop on vectorization at Cornell University. It is not super detailed like a book or a course; however, it does provide a good introduction to the topic. Find it <a href="https://cvw.cac.cornell.edu/vector/default">here</a></p><h2><a href="https://github.com/IUCompilerCourse/Essentials-of-Compilation/releases">Essentials of Compilation (in Python and Racket)</a></h2><p>I do have some readers who are deeply interested in compilers and programming languages. This book is a treat for them. Essentials of Compilation is an open-source book that covers how to compile a programming language down to assembly code. It does this by taking the readers through the steps of building a new programming language and a compiler for the language along with it. By the end of the book, you build a full-fledged compiler for your new language. The book comes in two flavors: one flavor uses the Racket programming language, while the other uses Python. Find the latest release of the book <a href="https://github.com/IUCompilerCourse/Essentials-of-Compilation/releases">here</a>.</p><div><hr></div><h2>Wrapping Up</h2><p>I hope you enjoyed the articles and other resources from this week. Let me know in the comments if you enjoyed something in particular, or if something bugged you. Also, if you have anything interesting that you would like to share with me, then do so in the comments, I would love to read it. As always, thanks for reading Confessions of a Code Addict and do share it with your friends and colleagues.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Confessions of a Code Addict! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/p/code-confessions-digest-3?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.codingconfessions.com/p/code-confessions-digest-3?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Weekly Code Confessions Digest #2: News, and Resources from Last Week]]></title><description><![CDATA[Curated Resources on Topics Around Bloom Filter, Numerical Algorithms, Rust, Numba, OpenAI Function calls, and DeepMind's AlphaDev]]></description><link>https://blog.codingconfessions.com/p/weekly-code-confessions-digest-2</link><guid isPermaLink="false">https://blog.codingconfessions.com/p/weekly-code-confessions-digest-2</guid><dc:creator><![CDATA[Abhinav Upadhyay]]></dc:creator><pubDate>Mon, 19 Jun 2023 13:59:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!saUw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hi and welcome to Confessions of a Code Addict, the newsletter dedicated to coding and computer science. This is the weekly digest edition of the newsletter where I share a selection of some of the most interesting links and resources from last week. Let&#8217;s get started!</p><p>In this week's digest:</p><ul><li><p>Expected Performance of a Bloom Filter</p></li><li><p>Implementing Cosine in C from Scratch (without using any math lib)</p></li><li><p>Build a CI/CD Pipeline for a Serverless Application</p></li><li><p>Designing Modern UIs with Rust</p></li><li><p>JDK 21's Approach to Beginner-Friendly Programming in Java</p></li><li><p>How Understanding CPUs can help Speed Up Numba and NumPy Code</p></li><li><p>Introduction to the Tiny game engine</p></li><li><p>Understanding DeepMind's AlphaDev Breakthrough in Optimizing Sorting Algorithms</p></li><li><p>How to Use the Function Call Feature of OpenAI&#8217;s ChatGPT APIs to Write Your Own Plugins</p></li><li><p>Books and Courses at the end of the article</p></li><li><p>Read till the end of the article to find a bonus tip to improve your productivity</p></li></ul><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!saUw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!saUw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 424w, https://substackcdn.com/image/fetch/$s_!saUw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 848w, https://substackcdn.com/image/fetch/$s_!saUw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 1272w, https://substackcdn.com/image/fetch/$s_!saUw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!saUw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512" width="512" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:512,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!saUw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 424w, https://substackcdn.com/image/fetch/$s_!saUw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 848w, https://substackcdn.com/image/fetch/$s_!saUw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 1272w, https://substackcdn.com/image/fetch/$s_!saUw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd88cf9d-eb55-4846-aeb9-aed623d8a50d_512x512 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A cute dog with eye glasses, reading newspaper </figcaption></figure></div><p> </p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">If you haven&#8217;t already subscribed to Confessions of a Code Addict then please do. It gives me encouragement and support.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><p></p><h2>&#128240; Articles </h2><h2><a href="https://lemire.me/blog/2023/05/26/expected-performance-of-a-bloom-filter/">Expected Performance of a Bloom Filter</a></h2><p>Last week, I shared a link to an <a href="https://save-buffer.github.io/bloom_filter.html">article</a> on optimizing Bloom filters. This week, let's take a look at how to analyze the performance of a Bloom filter. This article is written by <a href="https://lemire.me/blog/about-me/">Daniel Lemire</a>, a professor at Universit&#233; du Qu&#233;bec who is well-known for his work on blazing-fast data structures and libraries such as simdjson. In this article, Daniel explains how a Bloom filter works and how to evaluate the expected performance for the hit and miss cases when doing a lookup in a typical Bloom filter. I hope you enjoy this <a href="https://lemire.me/blog/2023/05/26/expected-performance-of-a-bloom-filter/">article</a>. </p><h2><a href="https://austinhenley.com/blog/cosine.html">Implementing cosine in C from scratch</a></h2><p>This is a high-quality article where the author takes you through the process of implementing the <a href="https://mathworld.wolfram.com/Cosine.html">cosine function</a> in C from scratch. &#8220;From scratch&#8221; means without using the standard math library. This is a fun read where you not only learn how cosine function is actually implemented in software, but also various ways to optimize it. Check it out <a href="https://austinhenley.com/blog/cosine.html">here</a></p><h2><a href="https://www.tailwarden.com/blog/build-a-ci-cd-pipeline-for-a-serverless-application">Build a CI/CD Pipeline for a Serverless Application</a></h2><p>If you are interested in learning how to automate the deployment of your application, then you are in luck. This well-written tutorial shows how to setup a complete CI/CD pipeline in <a href="https://www.jenkins.io/">Jenkins</a> for deploying an AWS Lambda-based application. Check it out <a href="https://www.tailwarden.com/blog/build-a-ci-cd-pipeline-for-a-serverless-application">here</a>.</p><h2><a href="https://www.youtube.com/watch?v=rC4FCS-oMpg">Makepad: Designing modern UIs with Rust</a></h2><p><a href="https://github.com/makepad/makepad">Makepad</a> is a toolkit for building native and web UIs in Rust. If you are a Rust fan and interested in building full-fledged UI-based applications with it, then checkout this <a href="https://www.youtube.com/watch?v=rC4FCS-oMpg">tutorial</a>.</p><h2><a href="https://www.infoq.com/news/2023/05/beginner-friendly-java/">JDK 21&#8217;s Approach to Beginner-Friendly Java Programming</a></h2><p>Lately, Java has been gaining new features at such a rapid rate that sometimes it&#8217;s hard to keep track. One of the latest features coming in the JDK 21 release is the support for implicit classes and enhanced main methods. These changes are designed to make Java more beginner-friendly. This basically means that the canonical &#8220;hello, world&#8221; program in Java can just be written as:</p><pre><code>void main() {
    System.out.println("Hello, World!");
}</code></pre><p>Check out the <a href="https://www.infoq.com/news/2023/05/beginner-friendly-java/">article</a> for full details on this.</p><h2><a href="https://pythonspeed.com/articles/speeding-up-numba/">Understanding CPUs can help speed up Numba and NumPy code</a></h2><p>If you do data science work, then you will appreciate this. Sometimes, due to the scale of the data, the code we write can be quite slow and take a long time to run. Data science is an area where we want to iterate through experiments quickly in order to find the right solution to the problem, and slow code does not help with that. Not only that, once you have the solution, you can't put it into production if it is extremely slow. This is where tools like <a href="https://numba.pydata.org/">Numba</a> come into the picture. Numba is a JIT for optimizing numerical processing code in Python. However, to use it effectively, we need to have a good understanding of how the CPU works so that we can write code that takes full advantage of it. This article takes you through a quick tour of CPU internals and then shows how to use Numba and NumPy to write optimized code. Check it out <a href="https://pythonspeed.com/articles/speeding-up-numba/">here</a>.</p><h2>Tinkering with Tiny</h2><p>Are you interested in coding your own computer game? Well, creating games is one of the most complex projects one can undertake&#8212;it's not for the faint-hearted. However, it's not impossible either if someone is there to guide you through the steps. Tom Halligan has you covered with his latest article, where he gives an introduction to a game engine called <a href="https://minigdx.github.io/tiny/">Tiny</a>. Check out the article linked below, and I hope you have fun with it.</p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:125720340,&quot;url&quot;:&quot;https://tomhalligan.substack.com/p/tinkering-with-tiny&quot;,&quot;publication_id&quot;:1620455,&quot;publication_name&quot;:&quot;Not A Robot&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F864466c1-4e1e-4c9a-a68a-791599a89d0d_512x512.png&quot;,&quot;title&quot;:&quot;Tinkering with Tiny&quot;,&quot;truncated_body_text&quot;:&quot;While browsing Hacker News recently, I came across a post about a new game engine called Tiny. The pitch had me intrigued from the get-go: The virtual console that offers an easy and efficient way to build games and other applications with its Lua programming support, hot reloading, and 256-color maximum.&quot;,&quot;date&quot;:&quot;2023-06-06T01:06:28.773Z&quot;,&quot;like_count&quot;:5,&quot;comment_count&quot;:6,&quot;bylines&quot;:[{&quot;id&quot;:18514016,&quot;name&quot;:&quot;Tom Halligan&quot;,&quot;handle&quot;:&quot;tomhalligan&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/3bd82294-0bd3-4072-b8da-9ec3b2fe19a1_319x319.jpeg&quot;,&quot;bio&quot;:&quot;Software Developer from Liverpool, UK. Interested in how software and technology can improve our lives, support our humanity, and satisfy our curiosity. &quot;,&quot;profile_set_up_at&quot;:&quot;2023-01-03T18:42:34.630Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:1592858,&quot;user_id&quot;:18514016,&quot;publication_id&quot;:1620455,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:false,&quot;publication&quot;:{&quot;id&quot;:1620455,&quot;name&quot;:&quot;Not A Robot&quot;,&quot;subdomain&quot;:&quot;tomhalligan&quot;,&quot;custom_domain&quot;:null,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;Keeping the humanity in a world of digital usurpers&quot;,&quot;logo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/864466c1-4e1e-4c9a-a68a-791599a89d0d_512x512.png&quot;,&quot;author_id&quot;:18514016,&quot;theme_var_background_pop&quot;:&quot;#FF6B00&quot;,&quot;created_at&quot;:&quot;2023-04-27T14:51:15.065Z&quot;,&quot;rss_website_url&quot;:null,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Tom Halligan&quot;,&quot;founding_plan_name&quot;:&quot;Founding Member&quot;,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;enabled&quot;}}],&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:true,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://tomhalligan.substack.com/p/tinkering-with-tiny?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!NkxT!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F864466c1-4e1e-4c9a-a68a-791599a89d0d_512x512.png" loading="lazy"><span class="embedded-post-publication-name">Not A Robot</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">Tinkering with Tiny</div></div><div class="embedded-post-body">While browsing Hacker News recently, I came across a post about a new game engine called Tiny. The pitch had me intrigued from the get-go: The virtual console that offers an easy and efficient way to build games and other applications with its Lua programming support, hot reloading, and 256-color maximum&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">3 years ago &#183; 5 likes &#183; 6 comments &#183; Tom Halligan</div></a></div><h2><a href="https://codeconfessions.substack.com/p/exploring-deepminds-alphadev-breakthrough">Understanding DeepMind's AlphaDev Breakthrough in Optimizing Sorting Algorithms</a></h2><p>A little shameless plug here. I wrote a long-form article explaining the workings of the optimized sorting algorithms that were discovered by the AlphaDev model from DeepMind recently. This has been breaking news, and if you are interested in learning what the fuss is all about, then check out my article (if you haven't already).</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;c5c2417f-b22d-4dee-be7e-187a0ab8f862&quot;,&quot;caption&quot;:&quot;Introduction Last week DeepMind published a paper in Nature showcasing a breakthrough in using deep reinforcement learning to optimize the performance of small sorting algorithms. Their AlphaDev model discovered improved sorting routines by playing a game and managed to surpass previously known human benchmarks for certain sorting tasks. This paper caugh&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;lg&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Understanding DeepMind's AlphaDev Breakthrough in Optimizing Sorting Algorithms&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:14520974,&quot;name&quot;:&quot;Abhinav Upadhyay&quot;,&quot;bio&quot;:&quot;Software Engineer by training and profession. Building Dr. Pawd - a podcast search engine. Subscribe to Dr. Pawd's newsletter at drpawd.substack.com&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c6dafc3-e0d4-40db-9510-4c57f3bc8e13_1532x1532.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-06-10T17:49:22.545Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F44a47e4c-02c7-453e-b7d2-15aaccff5569_1920x1200.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://codeconfessions.substack.com/p/exploring-deepminds-alphadev-breakthrough&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:127078480,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:11,&quot;comment_count&quot;:4,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Confessions of a Code Addict&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7869eb64-b49c-4318-bc58-cc868afb1f27_256x256.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><h2>Using the Function Call Feature of OpenAI&#8217;s ChatGPT APIs to Write Your Own Plugins</h2><p>OpenAI recently introduced a new feature in their ChatGPT APIs (GPT-4 and GPT-3.5). This feature allows the ChatGPT model to accept a list of function calls as part of its input and it can generate a call to one of those functions in order to perform the task assigned to it. This opens up several new possibilities with ChatGPT. In my latest article I shared a tutorial on how to use this function call feature to build a plugin system in a ChatGPT like chat system. In the tutorial we build a toy chat app along with a web browsing and Python interpreter plugin. If this sounds exciting, then check it out.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;1eb86a2a-e963-41b4-8775-44cec614a39c&quot;,&quot;caption&quot;:&quot;Few days back OpenAI announced some major enhancements to the GPT-4 and GPT-3.5 APIs. This included some significant cost reductions, and release of a 16k context window version of the GPT-3.5 model. But the biggest news of all was the introduction of the function call feature to the chat completions end point.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;lg&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Creating ChatGPT Plugins Using the New Function Call Feature&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:14520974,&quot;name&quot;:&quot;Abhinav Upadhyay&quot;,&quot;bio&quot;:&quot;Software Engineer by training and profession. Building Dr. Pawd - a podcast search engine. Subscribe to Dr. Pawd's newsletter at drpawd.substack.com&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c6dafc3-e0d4-40db-9510-4c57f3bc8e13_1532x1532.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2023-06-15T21:25:37.482Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4822976-c931-4723-9ccc-8223d9c63670_1393x354.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://codeconfessions.substack.com/p/creating-chatgpt-plugins-using-the&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:128503842,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:12,&quot;comment_count&quot;:2,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Confessions of a Code Addict&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7869eb64-b49c-4318-bc58-cc868afb1f27_256x256.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thank you for reading so far. Consider subscribing to support Confessions of a Code Addict.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h2>&#128218; Books and Courses</h2><h2><a href="https://fleuret.org/public/lbdl.pdf">The Little Book of Deep Learning</a></h2><p>All of us want to learn deep learning, and why not? All the AI around is being built using it. However, it has become a vast field in itself and requires a lot of background for someone to get started in it. The Little Book of Deep Learning is an accessible introduction to the field. It provides you with enough background on the math, tools, and some of the basic models so that you can dive deeper. The book has been beautifully typeset and is designed so that you can read it on your phone. With just 158 small pages long, it is indeed a little book. Check it out <a href="https://fleuret.org/public/lbdl.pdf">here</a>.</p><h2><a href="https://www.youtube.com/watch?v=BpPEoZW5IiY">Learn Rust Programming</a></h2><p>This is a 13-hour course that teaches Rust from the very beginning and covers all of the Rust syntax and the standard library. The course is from freeCodeCamp. Check it out.</p><div id="youtube2-BpPEoZW5IiY" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;BpPEoZW5IiY&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/BpPEoZW5IiY?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><div><hr></div><h2>Bonus Tip</h2><p>As promised, here is a tip to improve your productivity.</p><p>Do you use Git from the command line? I know many people who prefer using Git from the CLI rather than through a UI. We normally use the <code>git checkout</code> command to switch Git branches on the command line. For example:</p><pre><code>git checkout my-topical-branch</code></pre><p>Then, once we are done working on the branch, we again use the <code>checkout</code> command to switch to the previous branch. However, this gets tedious. For example, I tend to frequently switch between <code>master</code> and my feature branch because sometimes I need to fix bugs. There is a handy shortcut to switch to the previous branch without typing its full name. Here it is:</p><pre><code>git checkout -</code></pre><p>The hyphen tells Git to switch to the previously checked-out branch.</p><p>Here's another bonus tip for you: the same trick works with the <code>cd</code> command. If you say `<code>cd -`</code>, the shell switches to the previous directory you were in. </p><div><hr></div><h2>Wrapping Up</h2><p>I hope you enjoyed the articles and other resources from this week. Let me know in the comments if you enjoyed something in particular, or if something bugged you. Also, if you have anything interesting that you would like to share with me, then do so in the comments, I would love to read it. As always, thanks for reading Confessions of a Code Addict.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Confessions of a Code Addict! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/p/weekly-code-confessions-digest-2?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.codingconfessions.com/p/weekly-code-confessions-digest-2?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Weekly Code Confessions Digest: Exploring Intriguing Articles, Books, and Courses]]></title><description><![CDATA[Curated resources on topics around AI, Data Structures, Networking, and Performance Engineering]]></description><link>https://blog.codingconfessions.com/p/weekly-code-confessions-digest-1</link><guid isPermaLink="false">https://blog.codingconfessions.com/p/weekly-code-confessions-digest-1</guid><dc:creator><![CDATA[Abhinav Upadhyay]]></dc:creator><pubDate>Mon, 05 Jun 2023 18:05:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!G7gC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome to Confessions of a Code Addict, the place where I delve into the world of coding, computer science, and everything in between. I'm thrilled to have you here, and I appreciate your support and subscription.</p><p>As I continue working on a comprehensive long-form article that requires extensive research, I wanted to share some intriguing resources I discovered last week. This post will become a regular feature in my newsletter, providing you with a weekly dose of fascinating content. So, let's dive right in! </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G7gC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G7gC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 424w, https://substackcdn.com/image/fetch/$s_!G7gC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 848w, https://substackcdn.com/image/fetch/$s_!G7gC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 1272w, https://substackcdn.com/image/fetch/$s_!G7gC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G7gC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512" width="512" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/678cf4b9-25b9-48d8-b05e-68d414018be3_512x512&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:512,&quot;width&quot;:512,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G7gC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 424w, https://substackcdn.com/image/fetch/$s_!G7gC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 848w, https://substackcdn.com/image/fetch/$s_!G7gC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 1272w, https://substackcdn.com/image/fetch/$s_!G7gC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F678cf4b9-25b9-48d8-b05e-68d414018be3_512x512 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A robot reading newspaper </figcaption></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">If you are a new reader, please subscribe to Confessions of a Code Addict.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><div><hr></div><h1>Articles</h1><div><hr></div><h2><a href="https://github.blog/2023-05-17-inside-github-working-with-the-llms-behind-github-copilot/">Inside GitHub: Working with the LLMs behind GitHub Copilot</a></h2><p>In this article the folks at GitHub share their experience behind building GitHub Copilot, how they started experimenting with the GPT-3 APIs in the form of a static question and answering system, and iterated upon it to ultimately create an interactive plugin for the IDEs. They talk about how this led to the collaboration with OpenAI. They also share some interesting insights behind the prompt engineering they did for Copilot and also their plans for the future of Copilot. Check it out <a href="https://github.blog/2023-05-17-inside-github-working-with-the-llms-behind-github-copilot/">here</a>. </p><h2><a href="https://www.javaadvent.com/2019/12/measuring-time-from-java-to-kernel-and-back.html">Measuring Time: From Java to Kernel and back</a></h2><p>If you are a Java programmer who is interested in performance tuning and measurements, you will find this article very enlightening. We tend to use things like <code>System.currentTimeMillis()</code> and <code>System.nanoTime()</code> to measure the time taken to execute a block of code. However, these calls themselves can have unreliable latency which can throw off our performance tuning efforts. This article dives deep, starting right from the implementation of these APIs in Java, and going deep into the Linux kernel code in order to determine the source of unreliability. Check out the full article <a href="https://www.javaadvent.com/2019/12/measuring-time-from-java-to-kernel-and-back.html">here</a>.</p><h2><a href="https://martinheinz.dev/blog/97">Real Multithreading is Coming to Python - Learn How You Can Use It Now</a></h2><p>Now, some news for the Python devs out there. If you are a seasoned Python developer, you might know about the fact that Python does not have true concurrency. Even though Python has support for threads, due to the presence of the Global Interpreter Lock (GIL), the Python interpreter allows only one thread to run at any point in time. This means that even if your hardware has multiple CPU cores, they are not being utilized by Python. This has been a long-standing issue for Python developers. Now, there is an effort to mitigate the effects of the GIL. One such effort is discussed in this article. In Python 3.12 (under development), the Python developers have reduced the scope of the GIL to be at the per sub-interpreter level. A sub-interpreter is an instance of the Python interpreter which runs within the main Python interpreter. With this change, each sub-interpreter will have its own GIL, which means we can run multiple sub-interpreters concurrently and utilize multiple CPU cores. This is pretty cool work, read full details in the article <a href="https://martinheinz.dev/blog/97">here</a>.</p><h2><a href="https://austinhenley.com/blog/superoptimizer.html">My first superoptimizer</a></h2><p>Compiler optimization is the most fascinating topic for anyone who is into compilers. One of the optimization techniques is called <a href="https://en.wikipedia.org/wiki/Superoptimization">superoptimization</a>, whose goal is to optimize a given code snippet into its most optimized canonical form. This is a very hard problem and not something that real-world compilers can usually do. This article explores what superoptimization is and also builds a toy implementation. Check out the full article <a href="https://austinhenley.com/blog/superoptimizer.html">here</a> to learn more about it.</p><h2><a href="https://save-buffer.github.io/bloom_filter.html">Modern Bloom Filters: 22x Faster!</a></h2><p>I also have something for the data structure and algorithm fans. Very few people are aware of a fascinating data structure called the bloom filter. It is a probabilistic data structure commonly used in large-scale big data systems to quickly check whether an item exists in a collection or not. Being a probabilistic data structure, it is not 100% accurate. If the bloom filter says an item does not exist in the collection, then that is 100% guaranteed not to exist in the collection. However, if it says that an item <em>might</em> exist, then that might or might not be true (false positive). </p><p>The advantage of using this data structure is that it only takes a fraction of memory to index a large amount of data because instead of storing the entire content in memory, it only stores a digest of the data, which is usually a few bits long. </p><p>You might use it in situations such as when you need to check if a password is part of a large set of compromised passwords or not. This article shows an implementation of a typical bloom filter and then goes on to show certain optimized implementations taking advantage of the hardware, which makes it 22x faster. These techniques were new to me, and I found them intriguing. Check out the article <a href="https://save-buffer.github.io/bloom_filter.html">here</a></p><h2><a href="https://www.fast.ai/posts/2023-05-31-extinction.html">Is Avoiding Extinction from AI Really an Urgent Priority?</a></h2><p>The news about AI experts raising concerns about the possibility of extinction because of AI has been trending this week. However, there is another set of experts who believe that these extinction claims are overhyped, and we have much more important issues to deal with. Seth Lazar, Jeremy Howard, and Arvind Narayanan share their views on this topic in this article. Check it out <a href="https://www.fast.ai/posts/2023-05-31-extinction.html">here</a>.</p><div><hr></div><h1>Courses &amp; Books</h1><div><hr></div><h2><a href="https://book.systemsapproach.org/index.html">Computer Networks: A Systems Approach</a></h2><p>If you are interested in learning about computer networks and protocols in a hands-on fashion, then you will love this book. It is an open-source book that teaches everything about computer networks using the systems approach. The authors define the systems approach as a technique that explores how different system components interact with each other, rather than studying each component in isolation. This is particularly important for computer networks, where each network layer works closely with other layers. This means going beyond a single layer and considering issues that span multiple layers. Congestion control is a prime example of this. The approach prioritizes real-world implementation, exemplified by the Internet as a complex and widely-used network system. Check out the book <a href="https://book.systemsapproach.org/index.html">here</a>.</p><h2><a href="https://www.cs.cmu.edu/~rwh/students/okasaki.pdf">Purely Functional Data Structures</a></h2><p>If you are a fan of functional programming, I have something interesting for you. This book discusses the design and implementation of purely functional data structures. These data structures maintain functional purity by not allowing mutations or modifications in their internal state. In order to maintain this property of immutability, these data structures create a new copy with every operation. The main benefit of these data structures is that due to their immutability, they are well-suited for concurrent and parallel programming, and they are very easy to reason about. However, due to the fact that they need to make a new copy with every operation, they can incur high memory overhead. You can find the PDF version of the book <a href="https://www.cs.cmu.edu/~rwh/students/okasaki.pdf">here</a>.</p><h2><a href="https://ocw.mit.edu/courses/6-172-performance-engineering-of-software-systems-fall-2018/">Performance Engineering of Software Systems</a></h2><p>This is a course from MIT OpenCourseware on the topic of performance engineering. If you are interested in learning about building high-performance and scalable software systems that extract every ounce of performance from the hardware, then you should take this <a href="https://ocw.mit.edu/courses/6-172-performance-engineering-of-software-systems-fall-2018/">course</a>.</p><div><hr></div><h1>Wrapping Up</h1><p>I hope you enjoy some of these articles, books, and courses. Let me know in the comments if you found something particularly interesting in them and also if you have some interesting resources to share with me. </p><p>In another news, I&#8217;m travelling this week due to a family emergency, so my next article, which I&#8217;m very excited about, might be a little delayed. But it will reach your inbox soon. Thank you for reading Confessions of a Code Addict and supporting me.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">If you have not subscribed yet, please subscribe so that you get future posts from me directly in your inbox!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.codingconfessions.com/p/weekly-code-confessions-digest-1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.codingconfessions.com/p/weekly-code-confessions-digest-1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p></p>]]></content:encoded></item></channel></rss>