<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>emre şahin's digital garden 🍃 - bits</title>
    <link>https://emresahin.net/series/bits/</link>
    <description>The bits series</description>
    <language>en</language>
    <managingEditor>contact@emresahin.net (Emre Şahin)</managingEditor>
    <lastBuildDate>Tue, 15 Sep 2026 19:46:32 +0000</lastBuildDate>
    <atom:link href="https://emresahin.net/series/bits/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>bits 21</title>
      <published>2025-09-28T18:00:14+00:00</published>
      <updated>2025-09-28T18:00:14+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sun, 28 Sep 2025 18:00:14 +0000</pubDate>
      <link>https://emresahin.net/bits-21/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-21/</guid>
      <description>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini. Gemini proposed this: git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length What I ended up ...</description>
      <category>bits</category>
      <category>programming</category>
      <category>Gemini</category>
      <category>nushell</category>
      <category>git</category>
      <category>regex</category>
      <category>LLM</category>
      <content:encoded><![CDATA[<p>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini.</p>
<p>Gemini proposed this:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length
</code></pre>
<p>What I ended up doing:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -a "{+" "" | str replace -a "+}" "" | str replace -a ' ' "\n" | lines | length
</code></pre>
<p>I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 20</title>
      <published>2025-09-28T17:52:31+00:00</published>
      <updated>2025-09-28T17:52:31+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sun, 28 Sep 2025 17:52:31 +0000</pubDate>
      <link>https://emresahin.net/bits-20/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-20/</guid>
      <description>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini. Gemini proposed this: git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length What I ended up ...</description>
      <category>bits</category>
      <category>programming</category>
      <category>Gemini</category>
      <category>nushell</category>
      <category>git</category>
      <category>regex</category>
      <category>LLM</category>
      <content:encoded><![CDATA[<p>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini.</p>
<p>Gemini proposed this:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length
</code></pre>
<p>What I ended up doing:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -a "{+" "" | str replace -a "+}" "" | str replace -a ' ' "\n" | lines | length
</code></pre>
<p>I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 19</title>
      <published>2025-09-28T17:42:11+00:00</published>
      <updated>2025-09-28T17:42:11+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sun, 28 Sep 2025 17:42:11 +0000</pubDate>
      <link>https://emresahin.net/bits-19/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-19/</guid>
      <description>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini. Gemini proposed this: git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length What I ended up ...</description>
      <category>bits</category>
      <category>programming</category>
      <category>Gemini</category>
      <category>nushell</category>
      <category>git</category>
      <category>regex</category>
      <category>LLM</category>
      <content:encoded><![CDATA[<p>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini.</p>
<p>Gemini proposed this:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length
</code></pre>
<p>What I ended up doing:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -a "{+" "" | str replace -a "+}" "" | str replace -a ' ' "\n" | lines | length
</code></pre>
<p>I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 18</title>
      <published>2025-09-28T17:22:48+00:00</published>
      <updated>2025-09-28T17:22:48+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sun, 28 Sep 2025 17:22:48 +0000</pubDate>
      <link>https://emresahin.net/bits-18/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-18/</guid>
      <description>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini. Gemini proposed this: git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length What I ended up ...</description>
      <category>bits</category>
      <category>programming</category>
      <category>Gemini</category>
      <category>nushell</category>
      <category>git</category>
      <category>regex</category>
      <category>LLM</category>
      <content:encoded><![CDATA[<p>I wanted to get the number of word changes between commits in my blog. I asked for a git-diff-based Nushell pipeline from Gemini.</p>
<p>Gemini proposed this:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length
</code></pre>
<p>What I ended up doing:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -a "{+" "" | str replace -a "+}" "" | str replace -a ' ' "\n" | lines | length
</code></pre>
<p>I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit out as many tokens as possible, but using regular expressions when a simple string replacement may suffice is a good sign that they may be adding more complexity than necessary.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 17</title>
      <published>2025-09-28T17:20:37+00:00</published>
      <updated>2025-09-28T17:20:37+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sun, 28 Sep 2025 17:20:37 +0000</pubDate>
      <link>https://emresahin.net/bits-17/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-17/</guid>
      <description>I wanted to calculate the number of words added between commits in my blog posts. I asked Gemini for a Nushell pipeline based on git diff : It proposed the following: git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length H...</description>
      <category>shell</category>
      <category>productivity</category>
      <category>Gemini</category>
      <category>nushell</category>
      <category>git</category>
      <category>regex</category>
      <category>ai</category>
      <content:encoded><![CDATA[<p>I wanted to calculate the number of words added between commits in my blog posts. I asked Gemini for a Nushell pipeline based on <code>git diff</code>:</p>
<p>It proposed the following:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length
</code></pre>
<p>However, I ended up using this simplified version:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -a "{+" "" | str replace -a "+}" "" | str replace -a ' ' "\n" | lines | length
</code></pre>
<p>I’ve noticed that LLMs often lean toward overly complex solutions. I’m not sure if this is due to being trained to generate as many tokens as possible, but using regular expressions where a simple string replacement would suffice is often a sign of unnecessary complexity.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 16</title>
      <published>2025-09-28T17:15:52+00:00</published>
      <updated>2025-09-28T17:15:52+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sun, 28 Sep 2025 17:15:52 +0000</pubDate>
      <link>https://emresahin.net/bits-16/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-16/</guid>
      <description>I wanted to get the number of word changes between commits in my blogs. I asked for a git diff based nushell pipeline from Gemini: Gemini proposed this: git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length What I ended up...</description>
      <category>bits</category>
      <category>Gemini</category>
      <category>nushell</category>
      <category>git</category>
      <category>regex</category>
      <category>LLM</category>
      <category>workflow</category>
      <content:encoded><![CDATA[<p>I wanted to get the number of word changes between commits in my blogs. I asked for a <code>git diff</code> based nushell pipeline from Gemini:</p>
<p>Gemini proposed this:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -r '\{\+|\+\}' '' | str join " " | str words | length
</code></pre>
<p>What I ended up doing:</p>
<pre><code class="language-nushell">git diff --word-diff=plain -- "*.md" | rg -o '\{\+(.*?)\+\}' | str replace -a "{+" "" | str replace -a "+}" "" | str replace -a ' ' "\n" | lines | length
</code></pre>
<p>I notice LLMs tend to err on the side of complexity. I don’t know if this is due to their training to spit as many tokens as possible, but using regular expressions when a simple single replace may suffice is a good sign that they may be adding more complexity than necessary.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 15</title>
      <published>2025-03-27T09:52:06+00:00</published>
      <updated>2025-03-27T09:52:06+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 27 Mar 2025 09:52:06 +0000</pubDate>
      <link>https://emresahin.net/bits-15/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-15/</guid>
      <description>How to use a Python virtual environment with Nushell: virtualenv .venv overlay use .venv/bin/activate.nu</description>
      <category>bits</category>
      <category>shell</category>
      <category>nushell</category>
      <category>Python</category>
      <category>venv</category>
      <category>virtualenv</category>
      <category>cli</category>
      <content:encoded><![CDATA[<p>How to use a Python virtual environment with Nushell:</p>
<pre><code class="language-nu">virtualenv .venv
overlay use .venv/bin/activate.nu
</code></pre>]]></content:encoded>
    </item>
    <item>
      <title>bits 14</title>
      <published>2025-03-12T10:51:28+00:00</published>
      <updated>2025-03-12T10:51:28+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Wed, 12 Mar 2025 10:51:28 +0000</pubDate>
      <link>https://emresahin.net/bits-14/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-14/</guid>
      <description>There are three key points highlighted in How to Build Good Software : Reusing good software is easy; it is what allows you to build good things quickly; Software is limited not by the amount of resources put into building it, but by how complex it can get before it breaks down; and The main valu...</description>
      <category>project-management</category>
      <category>engineering</category>
      <category>software</category>
      <category>knowledge accumulation</category>
      <category>organizations</category>
      <category>software-design</category>
      <content:encoded><![CDATA[<p>There are three key points highlighted in <a href="https://knowledge.csc.gov.sg/ethos-issue-21/how-to-build-good-software/">How to Build Good Software</a>:</p>
<blockquote>
<ul>
<li>Reusing good software is easy; it is what allows you to build good things quickly;</li>
<li>Software is limited not by the amount of resources put into building it, but by how complex it can get before it breaks down; and</li>
<li>The main value in software is not the code produced, but the knowledge accumulated by the people who produced it.</li>
</ul>
</blockquote>
<p>These points lead me to view software development as more of a social profession than a purely technical one. Good software is a reflection of healthy interactions within an organization. When communication is difficult, it becomes much harder to accumulate knowledge about organizational needs, manage complexity, and effectively reuse software components.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 13</title>
      <published>2024-11-26T17:28:37+00:00</published>
      <updated>2024-11-26T17:28:37+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 26 Nov 2024 17:28:37 +0000</pubDate>
      <link>https://emresahin.net/bits-13/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-13/</guid>
      <description>I needed a Markdown server to preview my Zettelkasten notes on mobile. I tried installing Lanyon , but its installation instructions are outdated, and the project hasn’t been updated in seven years. I also looked at rustmark , but configuring it simply to list Markdown files felt like too much ef...</description>
      <category>publishing</category>
      <category>productivity</category>
      <category>markdown</category>
      <category>dufs</category>
      <category>zettelkasten</category>
      <category>self-hosting</category>
      <category>lanyon</category>
      <category>rustmark</category>
      <category>go</category>
      <content:encoded><![CDATA[<p>I needed a Markdown server to preview my <a href="https://zettelkasten.de/overview/">Zettelkasten</a> notes on mobile. I tried installing <a href="https://github.com/mkaz/lanyon">Lanyon</a>, but its installation instructions are outdated, and the project hasn’t been updated in seven years.</p>
<p>I also looked at <a href="https://docs.rs/crate/rustmark/latest">rustmark</a>, but configuring it simply to list Markdown files felt like too much effort.</p>
<p>Ultimately, I decided to use <a href="https://github.com/sigoden/dufs">dufs</a> and view the files as plain text. It supports basic file operations and WebDAV, which is more than sufficient for my needs.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 12</title>
      <published>2024-08-12T09:50:51+00:00</published>
      <updated>2024-08-12T09:50:51+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Mon, 12 Aug 2024 09:50:51 +0000</pubDate>
      <link>https://emresahin.net/bits-12/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-12/</guid>
      <description>I decided I needed a random colorscheme selector for those moments when you want to change things up but don’t want to make a specific choice. LazyVim already has &lt;leader&gt;uC for selecting a colorscheme, but it can be too mentally taxing as it requires you to manually select one. This script simpl...</description>
      <category>neovim</category>
      <category>productivity</category>
      <category>colorscheme</category>
      <category>random</category>
      <category>neovim</category>
      <category>lua</category>
      <category>vim</category>
      <content:encoded><![CDATA[<p>I decided I needed a random colorscheme selector for those moments when you want to change things up but don’t want to make a specific choice. LazyVim already has <code>&lt;leader&gt;uC</code> for selecting a colorscheme, but it can be too <em>mentally taxing</em> as it requires you to manually <em>select</em> one. This script simply switches to a random one.</p>
<p><code>RandomColorScheme</code> returns the name of a random colorscheme after searching through all available paths. <code>SetRandomColorScheme</code> sets the colorscheme to that choice. The keybinding is mapped to <code>&lt;leader&gt;uR</code>.</p>
<pre><code class="language-lua">function RandomColorScheme()
  local color_schemes = vim.fn.globpath(vim.o.rtp, "colors/*.vim", false, true)
  for i, fullpath in ipairs(color_schemes) do
    color_schemes[i] = fullpath:match(".*/(.*).vim$")
  end

  -- Generate a random index
  local index = math.random(#color_schemes)

  local random_color_scheme = color_schemes[index]

  vim.notify("Random Color Scheme: " .. random_color_scheme)
  -- Select a random color scheme
  return random_color_scheme
end

function SetRandomColorScheme()
  vim.cmd("colorscheme " .. RandomColorScheme())
end

vim.api.nvim_set_keymap("n", "&lt;leader&gt;uR", ":lua SetRandomColorScheme()&lt;CR&gt;", { noremap = true, silent = true })
</code></pre>]]></content:encoded>
    </item>
    <item>
      <title>bits 10</title>
      <published>2024-05-24T21:04:10+00:00</published>
      <updated>2024-05-24T21:04:10+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Fri, 24 May 2024 21:04:10 +0000</pubDate>
      <link>https://emresahin.net/bits-10/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-10/</guid>
      <description>I believe in the value of reducing friction when taking notes. Today, I added a function to my Neovim configuration to create a timestamped file and open it for editing. function CreateTimestampedFile() local zkdir = os.getenv("HOME") .. "/github.com/iesahin/garden/zk/" local timestamp = os.date(...</description>
      <category>tools</category>
      <category>productivity</category>
      <category>neovim</category>
      <category>lazyvim</category>
      <category>zettelkasten</category>
      <category>lua</category>
      <category>note-taking</category>
      <category>workflow</category>
      <content:encoded><![CDATA[<p>I believe in the value of reducing friction when taking notes. Today, I added a function to my Neovim configuration to create a timestamped file and open it for editing.</p>
<pre><code class="language-lua">function CreateTimestampedFile()
  local zkdir = os.getenv("HOME") .. "/github.com/iesahin/garden/zk/"
  local timestamp = os.date("%Y%m%d%H%M%S")
  local filename = zkdir .. "/" .. timestamp .. ".md"
  vim.cmd("edit " .. filename)
end

vim.api.nvim_set_keymap("n", "&lt;leader&gt;F", ":lua CreateTimestampedFile()&lt;CR&gt;", { noremap = true, silent = true })
</code></pre>
<p>Now, I can just hit <code>&lt;leader&gt;F</code> (which is <code>&lt;Space&gt;F</code> in my setup) and immediately start adding a note to my zettelkasten.</p>]]></content:encoded>
    </item>
    <item>
      <title>Bits 9</title>
      <published>2024-05-24T21:02:38+00:00</published>
      <updated>2024-05-24T21:02:38+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Fri, 24 May 2024 21:02:38 +0000</pubDate>
      <link>https://emresahin.net/bits-9/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-9/</guid>
      <description>I have quite a few LazyVim plugins, but this simple keymapping makes my life much easier: vim.keymap.set({ "n", "i" }, "&lt;F2&gt;", '&lt;esc&gt;&lt;esc&gt;yy:r!&lt;c-r&gt;"') I type a command, like ls , on a line and hit &lt;F2&gt; . That line is copied, executed, and the output is read into the buffer just below it. I use i...</description>
      <category>Bits</category>
      <category>Tools</category>
      <category>Neovim</category>
      <category>Shell</category>
      <category>LazyVim</category>
      <category>Productivity</category>
      <category>Workflow</category>
      <content:encoded><![CDATA[<p>I have quite a few LazyVim plugins, but this simple keymapping makes my life much easier:</p>
<pre><code class="language-lua">vim.keymap.set({ "n", "i" }, "&lt;F2&gt;", '&lt;esc&gt;&lt;esc&gt;yy:r!&lt;c-r&gt;"')
</code></pre>
<p>I type a command, like <code>ls</code>, on a line and hit <code>&lt;F2&gt;</code>. That line is copied, executed, and the output is read into the buffer just below it.</p>
<p>I use it for all sorts of tasks, from listing open PRs with <code>gh</code> to fetching website text with <code>w3m</code>. It has significantly improved my workflow, allowing me to use the shell effectively within textual notebooks.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 6</title>
      <published>2024-05-23T16:33:49+00:00</published>
      <updated>2024-05-23T16:33:49+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 23 May 2024 16:33:49 +0000</pubDate>
      <link>https://emresahin.net/bits-6/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-6/</guid>
      <description>We’re using Graphite at work. Today, I configured a tmux shortcut to open a new pane and run gt create , which creates a new branch and commits all staged Git files. bind-key -n S-F12 split-window -h -c "#{pane_current_path}" "gt c" I just hit Shift-F12, and it opens a new pane in the current dir...</description>
      <category>bits</category>
      <category>tmux</category>
      <category>graphite</category>
      <category>cli</category>
      <category>git</category>
      <category>workflow</category>
      <category>productivity</category>
      <content:encoded><![CDATA[<p>We’re using <a href="https://graphite.dev">Graphite</a> at work. Today, I configured a tmux
shortcut to open a new pane and run <code>gt create</code>, which creates a new branch and
commits all staged Git files.</p>
<pre><code>bind-key -n S-F12 split-window -h -c "#{pane_current_path}" "gt c"
</code></pre>
<p>I just hit Shift-F12, and it opens a new pane in the current directory and runs the
command.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 7</title>
      <published>2024-05-23T16:33:49+00:00</published>
      <updated>2024-05-23T16:33:49+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 23 May 2024 16:33:49 +0000</pubDate>
      <link>https://emresahin.net/bits-7/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-7/</guid>
      <description>I noticed it’s not possible to unmap the F1 key in Neovim using vim.api.nvim_del_keymap if it’s not already registered. Instead, you can simply override it with something like: vim.keymap.set({ "n" }, "&lt;F1&gt;", ":Telescope buffers&lt;CR&gt;", { noremap = true, desc = "Find buffer" })</description>
      <category>bits</category>
      <category>neovim</category>
      <category>lua</category>
      <category>keymaps</category>
      <category>telescope</category>
      <category>config</category>
      <content:encoded><![CDATA[<p>I noticed it’s not possible to unmap the <code>F1</code> key in Neovim using
<code>vim.api.nvim_del_keymap</code> if it’s not already registered. Instead, you can
simply override it with something like:</p>
<pre><code class="language-lua">vim.keymap.set({ "n" }, "&lt;F1&gt;", ":Telescope buffers&lt;CR&gt;", { noremap = true, desc = "Find buffer" })
</code></pre>]]></content:encoded>
    </item>
    <item>
      <title>Bits 8</title>
      <published>2024-05-23T16:33:49+00:00</published>
      <updated>2024-05-23T16:33:49+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 23 May 2024 16:33:49 +0000</pubDate>
      <link>https://emresahin.net/bits-8/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-8/</guid>
      <description>Using ENV.fetch("MY_ENV_VAR", default_value) is preferred over ENV["MY_ENV_VAR"] for specifying default values. While it is similar to ENV["MY_ENV_VAR"] || default_value , fetch is more explicit and idiomatic in Ruby.</description>
      <category>Bits</category>
      <category>Ruby</category>
      <category>Environment Variables</category>
      <category>Coding Tips</category>
      <content:encoded><![CDATA[<p>Using <code>ENV.fetch("MY_ENV_VAR", default_value)</code> is preferred over <code>ENV["MY_ENV_VAR"]</code> for specifying default values. While it is similar to <code>ENV["MY_ENV_VAR"] || default_value</code>, <code>fetch</code> is more explicit and idiomatic in Ruby.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 5</title>
      <published>2023-03-14T11:24:00+00:00</published>
      <updated>2023-03-14T11:24:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 14 Mar 2023 11:24:00 +0000</pubDate>
      <link>https://emresahin.net/bits-5/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-5/</guid>
      <description>I found a little tool where you describe a diagram in plain text, and it draws it. It likely uses a ChatGPT-to-Mermaid converter.</description>
      <category>bits</category>
      <category>diagrams</category>
      <category>chatgpt</category>
      <category>mermaid</category>
      <category>tools</category>
      <category>ai</category>
      <content:encoded><![CDATA[<p>I found a <a href="https://diagramify.agiliq.com">little tool</a> where you describe a
diagram in plain text, and it draws it. It likely uses a ChatGPT-to-Mermaid
converter.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 4</title>
      <published>2023-03-14T11:19:00+00:00</published>
      <updated>2023-03-14T11:19:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 14 Mar 2023 11:19:00 +0000</pubDate>
      <link>https://emresahin.net/bits-4/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-4/</guid>
      <description>I want to use channels for Xvc pipelines. A thread will be created for each step and will receive dependency state changes via channels. Note that there may be thousands of dependencies (e.g., files for a step), and creating these channels beforehand is not feasible. The Crossbeam library has Sel...</description>
      <category>bits</category>
      <category>xvc</category>
      <category>Rust</category>
      <category>crossbeam</category>
      <category>select</category>
      <category>channels</category>
      <category>concurrency</category>
      <content:encoded><![CDATA[<p>I want to use channels for Xvc pipelines. A thread will be created for each
step and will receive dependency state changes via channels.</p>
<p>Note that there may be thousands of dependencies (e.g., files for a step), and
creating these channels beforehand is not feasible.</p>
<p>The Crossbeam library has
<a href="https://docs.rs/crossbeam/latest/crossbeam/channel/struct.Select.html#">Select</a>
which allows waiting for an arbitrary number of channels. Now, I need to figure out
how to structure the threads and update their states. A minor task! 😆</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 3</title>
      <published>2023-03-14T11:07:00+00:00</published>
      <updated>2023-03-14T11:07:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 14 Mar 2023 11:07:00 +0000</pubDate>
      <link>https://emresahin.net/bits-3/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-3/</guid>
      <description>I noticed a channel library that predates crossbeam in Rust. It’s called comm , and the code was last updated eight years ago.</description>
      <category>bits</category>
      <category>Rust</category>
      <category>ancient</category>
      <category>comm</category>
      <category>crossbeam</category>
      <category>channels</category>
      <content:encoded><![CDATA[<p>I noticed a channel library that predates
<a href="https://docs.rs/crossbeam/latest/crossbeam/">crossbeam</a> in Rust. It’s called
<a href="https://github.com/mahkoh/comm">comm</a>, and the code was last updated eight years
ago.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 2</title>
      <published>2023-03-14T10:58:00+00:00</published>
      <updated>2023-03-14T10:58:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 14 Mar 2023 10:58:00 +0000</pubDate>
      <link>https://emresahin.net/bits-2/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-2/</guid>
      <description>We are using a vector database for semantic search. Currently, we employ Pinecone for vector search. I noticed there is an open-source vector database called Qdrant (pronounced quadrant) that can replace it. There are other options like pgvector for PostgreSQL.</description>
      <category>bits</category>
      <category>search</category>
      <category>vector database</category>
      <category>qdrant</category>
      <category>pinecone</category>
      <category>ml</category>
      <category>semantic search</category>
      <content:encoded><![CDATA[<p>We are using a vector database for semantic search. Currently, we employ <a href="https://www.pinecone.io">Pinecone</a> for vector search.</p>
<p>I noticed there is an open-source vector database called <a href="https://github.com/qdrant/qdrant">Qdrant</a> (pronounced quadrant) that can replace it.</p>
<p>There are other options like <a href="https://github.com/pgvector/pgvector">pgvector</a> for PostgreSQL.</p>]]></content:encoded>
    </item>
    <item>
      <title>bits 1</title>
      <published>2023-03-14T10:39:00+00:00</published>
      <updated>2023-03-14T10:39:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 14 Mar 2023 10:39:00 +0000</pubDate>
      <link>https://emresahin.net/bits-1/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-1/</guid>
      <description>I began to explore the terrain for a Word plugin for the company I’m working at. Although there is a common format for the manifest file, Outlook and Word add-ins seem to require separate files. I haven’t seen any add-in in AppSource that serves as both a Word and an Excel add-in. Microsoft provi...</description>
      <category>bits</category>
      <category>development</category>
      <category>Microsoft Word</category>
      <category>add-in</category>
      <category>plugin</category>
      <category>API</category>
      <category>office</category>
      <category>javascript</category>
      <content:encoded><![CDATA[<p>I began to explore the terrain for a Word plugin for the company I’m working at.</p>
<ul>
<li>
<p>Although there is a common format for the <a href="https://learn.microsoft.com/en-us/office/dev/add-ins/develop/add-in-manifests?tabs=tabid-1">manifest</a> file, Outlook and Word add-ins seem to require separate files. I haven’t seen any add-in in <a href="https://appsource.microsoft.com/en-US/home?exp=ubp8">AppSource</a> that serves as both a Word and an Excel add-in.</p>
</li>
<li>
<p>Microsoft provides a tool called <a href="https://appsource.microsoft.com/en-us/product/office/WA104380862?corrid=94e8a3b6-7b45-7d61-7efa-2b5fb01abb83&amp;src=office&amp;exp=ubp8">Script Lab</a> that allows you to run arbitrary scripts and test APIs directly within Office.</p>
</li>
<li>
<p>For authentication, it is recommended to open a browser window to your web app using the <a href="https://learn.microsoft.com/en-us/office/dev/add-ins/develop/dialog-api-in-office-add-ins">Dialog API</a>.</p>
</li>
<li>
<p>It is usually not possible to use iframes to obtain authentication tokens from the task pane or sidebar itself. See <a href="https://stackoverflow.com/questions/67802639/outlook-web-addin-iframe-adfs-sites">this</a> answer for more details.</p>
</li>
<li>
<p>It is possible to add elements to the <a href="https://stackoverflow.com/questions/53844320/microsoft-word-add-in-add-to-contextual-menu">right-click menu</a> in Word for add-in commands.</p>
</li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>
