<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on A Random Walk</title>
    <link>https://rrampage.github.io/post/</link>
    <description>Recent content in Posts on A Random Walk</description>
    <generator>Hugo -- 0.144.2</generator>
    <language>en</language>
    <lastBuildDate>Fri, 13 Jun 2025 19:08:50 +0530</lastBuildDate>
    <atom:link href="https://rrampage.github.io/post/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>strace tips for better debugging</title>
      <link>https://rrampage.github.io/2025/06/13/strace-tips-for-better-debugging/</link>
      <pubDate>Fri, 13 Jun 2025 19:08:50 +0530</pubDate>
      <guid>https://rrampage.github.io/2025/06/13/strace-tips-for-better-debugging/</guid>
      <description>&lt;p&gt;Recently, I have been building software without libc to better understand Linux syscalls and internals better. So far, I have built a &lt;a href=&#34;https://gist.github.com/rrampage/5046b60ca2d040bcffb49ee38e86041f&#34;&gt;minimal shell&lt;/a&gt;, &lt;a href=&#34;https://gist.github.com/rrampage/2a781662645dc2fcba45784eb584cbdc&#34;&gt;terminal Snake game&lt;/a&gt;, pure ARM64 assembly &lt;a href=&#34;https://gist.github.com/rrampage/d31e75647a77badb3586ebae1e414cb6&#34;&gt;HTTP server&lt;/a&gt; and &lt;a href=&#34;https://gist.github.com/rrampage/43c56d4a56f8f73320d17ff7b3a49be6&#34;&gt;threads implementation&lt;/a&gt;. I have been using &lt;a href=&#34;https://man7.org/linux/man-pages/man1/strace.1.html&#34;&gt;&lt;code&gt;strace&lt;/code&gt;&lt;/a&gt; extensively while debugging.&lt;/p&gt;
&lt;h2 id=&#34;useful-options-and-flags&#34;&gt;Useful options and flags&lt;/h2&gt;
&lt;p&gt;I use a version of the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;strace -fintrCDTYyy -o strace.log -v -s128 ./binary
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This looks like an alphabet soup of options! Here&amp;rsquo;s what they do and how they are useful:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-f&lt;/code&gt;: Follow child processes/threads. This is especially useful when dealing with spawning processes or threads as otherwise, strace will only trace the parent process.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-v&lt;/code&gt;: Print unabbreviated versions of environment, stat, termios and other structs in  syscalls. I found this invaluable in conjunction with &lt;code&gt;-s&lt;/code&gt; when doing assembly programming to check if the structs were being initialized correctly and if certain arguments were being sent in little/big endian format&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-s NUM&lt;/code&gt;: Specify the maximum string size to print. Useful for large structs&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-o&lt;/code&gt;: Save strace output to a log file. It is always better to do this to investigate the output of the original process and strace separately without each cluttering the other&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-yy&lt;/code&gt;: Print all available information associated with file descriptors. This is great for expanding the file descriptor to either its full path in case of a file or TCP address in case of sockets&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-Y&lt;/code&gt;: Print command names for PIDs. I found this useful when building the shell to check if the correct program is being executed&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-t&lt;/code&gt;: Print current timestamp in log&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-T&lt;/code&gt;: Show time spent in syscalls. Useful for some basic profiling although strace heavily slows down the process.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-r&lt;/code&gt;: Print a relative timestamp upon entry to each system call&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-n&lt;/code&gt;: Print syscall number. Great to quickly find out syscall numbers on new architectures.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-i&lt;/code&gt;: Print instruction pointer at the time of syscall. Found this useful when debugging assembly code to check rough location of errors.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-C&lt;/code&gt;: Print summary of syscall count, time, errors at the end of regular output&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;print-stack-traces&#34;&gt;Print stack traces&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;-k&lt;/code&gt; or &lt;code&gt;--stack-trace&lt;/code&gt; prints the stacktrace along with the syscall. This is useful if your program is compiled with with &lt;code&gt;-g&lt;/code&gt;. &lt;a href=&#34;https://shane.ai/posts/backtraces-with-strace/&#34;&gt;This post&lt;/a&gt; is a good read on using strace to show backtraces for a Golang program compiled with &lt;code&gt;GODEBUG&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bash - Oops I deleted my bin dir challenge</title>
      <link>https://rrampage.github.io/2025/05/20/bash-oops-i-deleted-my-bin-dir-challenge/</link>
      <pubDate>Tue, 20 May 2025 14:44:24 +0530</pubDate>
      <guid>https://rrampage.github.io/2025/05/20/bash-oops-i-deleted-my-bin-dir-challenge/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://oops.cmdchallenge.com&#34;&gt;Oops I deleted my bin dir&lt;/a&gt; is a fun set of challenges to investigate a &amp;ldquo;rogue&amp;rdquo; process which has been deleting files on the system. It has deleted all programs from the &lt;code&gt;bin&lt;/code&gt; directories like &lt;code&gt;ps&lt;/code&gt;, &lt;code&gt;htop&lt;/code&gt;, &lt;code&gt;lsof&lt;/code&gt;. All we have left is a shell prompt&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;bash-built-ins&#34;&gt;Bash built-ins&lt;/h2&gt;
&lt;p&gt;In the challenge, the shell we are using is &lt;code&gt;bash&lt;/code&gt;. Bash has many &amp;ldquo;built-ins&amp;rdquo; which are commands we can run without having to spawn a process and execute a binary i.e they are part of bash itself.&lt;/p&gt;
&lt;p&gt;The most useful one right now is &lt;code&gt;help&lt;/code&gt; which lists all the bash built-ins and their arguments.
Typing &lt;code&gt;help BUILTIN_NAME&lt;/code&gt; will give more details about that built-in command.&lt;/p&gt;

&lt;details&gt;
  &lt;summary&gt;&lt;h3&gt;List of built-ins&lt;/h3&gt;&lt;/summary&gt;
  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;job_spec &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                   &lt;span class=&#34;nb&#34;&gt;history&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-c&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d offset&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; or &lt;span class=&#34;nb&#34;&gt;history&lt;/span&gt; -anrw &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;filename&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; or &lt;span class=&#34;nb&#34;&gt;history&lt;/span&gt; -ps&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;1/218&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;((&lt;/span&gt; expression &lt;span class=&#34;o&#34;&gt;))&lt;/span&gt;                                                               &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;elif&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;... &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; COM&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; . filename &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arguments&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                         &lt;span class=&#34;nb&#34;&gt;jobs&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-lnprs&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;jobspec ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; or &lt;span class=&#34;nb&#34;&gt;jobs&lt;/span&gt; -x &lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;args&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; :                                                                              &lt;span class=&#34;nb&#34;&gt;kill&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-s sigspec &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; -n signum &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; -sigspec&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; pid &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jobspec ... or &lt;span class=&#34;nb&#34;&gt;kill&lt;/span&gt; -l &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;sigs&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; arg... &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                     &lt;span class=&#34;nb&#34;&gt;let&lt;/span&gt; arg &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arg ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; expression &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;                                                               &lt;span class=&#34;nb&#34;&gt;local&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;option&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; name&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;value&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;alias&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;value&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ... &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                 &lt;span class=&#34;nb&#34;&gt;logout&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;bg&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;job_spec ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                              mapfile &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d delim&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-n count&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-O origin&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-s count&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-u fd&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-C callb&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;bind&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-lpsvPSVX&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-m keymap&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-f filename&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-q name&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-u name&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-r keyseq&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&amp;gt;  &lt;span class=&#34;nb&#34;&gt;popd&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+N &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; -N&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;break&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                      &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-v var&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; format &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arguments&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;builtin&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;shell-builtin &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arg ...&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;                                              &lt;span class=&#34;nb&#34;&gt;pushd&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+N &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; -N &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; dir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;caller&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;expr&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                  &lt;span class=&#34;nb&#34;&gt;pwd&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-LP&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;case&lt;/span&gt; WORD in &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;PATTERN &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; PATTERN&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;...&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; COMMANDS &lt;span class=&#34;p&#34;&gt;;;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;... &lt;span class=&#34;k&#34;&gt;esac&lt;/span&gt;                     &lt;span class=&#34;nb&#34;&gt;read&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-ers&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a array&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d delim&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-i text&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-n nchars&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-N nchars&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p pro&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-L&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-P &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-e&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-@&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;dir&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                   readarray &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d delim&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-n count&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-O origin&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-s count&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-u fd&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-C cal&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-pVv&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arg ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                               &lt;span class=&#34;nb&#34;&gt;readonly&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-aAf&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;value&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; or &lt;span class=&#34;nb&#34;&gt;readonly&lt;/span&gt; -p
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;compgen&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-abcdefgjksuv&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-o option&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-A action&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-G globpat&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-W wordlist&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&amp;gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;complete&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-abcdefgjksuv&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-pr&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-DEI&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-o option&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-A action&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-G globpat&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&amp;gt;  &lt;span class=&#34;k&#34;&gt;select&lt;/span&gt; NAME &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;in WORDS ... &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; compopt &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-o&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;+o option&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-DEI&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                       &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-abefhkmnptuvxBCHP&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-o option-name&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arg ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;continue&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                   &lt;span class=&#34;nb&#34;&gt;shift&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; coproc &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;NAME&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;redirections&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                           &lt;span class=&#34;nb&#34;&gt;shopt&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-pqsu&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-o&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;optname ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;declare&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-aAfFgiIlnrtux&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;value&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                               &lt;span class=&#34;nb&#34;&gt;source&lt;/span&gt; filename &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arguments&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;dirs&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-clpv&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;+N&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-N&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                         &lt;span class=&#34;nb&#34;&gt;suspend&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-f&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;disown&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-h&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-ar&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;jobspec ... &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; pid ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                      &lt;span class=&#34;nb&#34;&gt;test&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;expr&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-neE&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arg ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                          &lt;span class=&#34;nb&#34;&gt;time&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; pipeline
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;enable&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-dnps&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-f filename&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                   &lt;span class=&#34;nb&#34;&gt;times&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;eval&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arg ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                 &lt;span class=&#34;nb&#34;&gt;trap&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-lp&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt;arg&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; signal_spec ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-cl&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a name&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;argument ...&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;redirection ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                &lt;span class=&#34;nb&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                       &lt;span class=&#34;nb&#34;&gt;type&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-afptP&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; name &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-fn&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;value&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; or &lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt; -p                                   &lt;span class=&#34;nb&#34;&gt;typeset&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-aAfFgiIlnrtux&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; name&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;value&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;false&lt;/span&gt;                                                                          &lt;span class=&#34;nb&#34;&gt;ulimit&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-SHabcdefiklmnpqrstuvxPT&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;limit&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;fc&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-e ename&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-lnr&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;first&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;last&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; or &lt;span class=&#34;nb&#34;&gt;fc&lt;/span&gt; -s &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;pat&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;rep&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;command&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;               &lt;span class=&#34;nb&#34;&gt;umask&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-S&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;mode&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;fg&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;job_spec&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                                  &lt;span class=&#34;nb&#34;&gt;unalias&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; name &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; NAME &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;in WORDS ... &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;                                   &lt;span class=&#34;nb&#34;&gt;unset&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-f&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-v&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-n&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;((&lt;/span&gt; exp1&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; exp2&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; exp3 &lt;span class=&#34;o&#34;&gt;))&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;                                  &lt;span class=&#34;k&#34;&gt;until&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; name &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; COMMANDS &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt; or name &lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; COMMANDS &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;                         variables - Names and meanings of some shell variables
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;getopts&lt;/span&gt; optstring name &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;arg ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                               &lt;span class=&#34;nb&#34;&gt;wait&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-fn&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p var&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;id ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;hash&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-lr&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p pathname&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-dt&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;name ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                      &lt;span class=&#34;k&#34;&gt;while&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; COMMANDS&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;nb&#34;&gt;help&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-dms&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;pattern ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;                                                      &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; COMMANDS &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;

&lt;h2 id=&#34;challenge-1---print-the-current-working-directory&#34;&gt;Challenge 1 - print the current working directory&lt;/h2&gt;
&lt;details&gt;
  &lt;summary&gt;
    
    
    &lt;h3&gt;Solution&lt;/h3&gt;
  &lt;/summary&gt;
  &lt;div&gt;
    
The `pwd` built-in shows the *p*resent *w*orking *d*irectory


  &lt;/div&gt;
&lt;/details&gt;
&lt;h2 id=&#34;challenge-2---list-all-files-in-the-current-working-directory&#34;&gt;Challenge 2 - List all files in the current working directory&lt;/h2&gt;
&lt;p&gt;We can not use &lt;code&gt;ls&lt;/code&gt; as it is gone&amp;hellip; Which built-in can help us?&lt;/p&gt;</description>
    </item>
    <item>
      <title>HTML toggle headings using Details Summary element and some CSS</title>
      <link>https://rrampage.github.io/2025/03/06/html-toggle-headings-using-details-summary-element-and-some-css/</link>
      <pubDate>Thu, 06 Mar 2025 14:40:15 +0530</pubDate>
      <guid>https://rrampage.github.io/2025/03/06/html-toggle-headings-using-details-summary-element-and-some-css/</guid>
      <description>&lt;h2 id=&#34;overview-of-the-html-details-tag&#34;&gt;Overview of the HTML &lt;code&gt;details&lt;/code&gt; tag&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details&#34;&gt;&lt;code&gt;details&lt;/code&gt; tag&lt;/a&gt; creates a toggleable element which we can use to hide sensitive information like spoilers. It has a &lt;code&gt;summary&lt;/code&gt; attribute which is visible to the reader and a button which they can click to show then content.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Spoilers!&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Lot of sensitive information!
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;creating-toggle-headings-using-summary-and-html-heading-tags&#34;&gt;Creating Toggle Headings using &lt;code&gt;summary&lt;/code&gt; and HTML heading tags&lt;/h2&gt;
&lt;p&gt;Since &lt;code&gt;summary&lt;/code&gt; is an HTML element, we can nest other HTML elements in it. If we want to create something like Notion&amp;rsquo;s toggle headings (&lt;code&gt;/toggleh1&lt;/code&gt;), we can do something like&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Spoilers!&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;h3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Spoilers
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This shows the &lt;code&gt;&amp;lt;h3&amp;gt;&lt;/code&gt; header but below the taggle i.e not inline. See &lt;a href=&#34;https://jsfiddle.net/3ht4n0jm/&#34;&gt;this fiddle&lt;/a&gt; for the minimal example. Searching for this led me to this &lt;a href=&#34;https://css-tricks.com/two-issues-styling-the-details-element-and-how-to-solve-them/&#34;&gt;article&lt;/a&gt; which suggested this CSS fix to the problem&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;display&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;inline&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This CSS snippet inlines all children of the &lt;code&gt;details summary&lt;/code&gt; element.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the &lt;a href=&#34;https://jsfiddle.net/0yjpcLef/&#34;&gt;fix&lt;/a&gt; in action!&lt;/p&gt;
&lt;h2 id=&#34;using-the-details-element-in-hugo-markdown&#34;&gt;Using the &lt;code&gt;details&lt;/code&gt; element in Hugo markdown&lt;/h2&gt;
&lt;p&gt;Since version 0.140, Hugo has supported &lt;code&gt;details&lt;/code&gt; as a &lt;a href=&#34;https://gohugo.io/shortcodes/details/&#34;&gt;shortcode&lt;/a&gt;. We can put arbitrary HTML in the summary e.g&lt;/p&gt;</description>
    </item>
    <item>
      <title>An APL a day! - Caesar Salad</title>
      <link>https://rrampage.github.io/2025/02/24/an-apl-a-day-caesar-salad/</link>
      <pubDate>Mon, 24 Feb 2025 02:15:00 +0530</pubDate>
      <guid>https://rrampage.github.io/2025/02/24/an-apl-a-day-caesar-salad/</guid>
      <description>&lt;p&gt;Today&amp;rsquo;s problem - &lt;a href=&#34;https://apl.quest/psets/2023.html?goto=P3_Caesar_Salad&#34;&gt;Caesar Salad&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A Caesar cipher, also known as a shift cipher, is one of the simplest encryption techniques. In a Caesar cipher, each letter in the plaintext is replaced by a letter some fixed number of positions away in the alphabet, effectively &amp;ldquo;shifting&amp;rdquo; the alphabet.&lt;/p&gt;
&lt;p&gt;Write a function that:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;takes a single integer left argument representing the size of the shift
takes a character vector right argument representing the plaintext message
returns a result with the same shape as the right argument representing the encrypted message
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Use &#39; &#39;,⎕A as the alphabet
You can assume that the plaintext message will contain only characters found in the alphabet.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hint: The rotate function ⌽ could be helpful in solving this problem.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-apl&#34; data-lang=&#34;apl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;caesar&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;HELLO WORLDS&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;LIPPSD&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;SVPHW&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;m&#34;&gt;¯4&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;caesar&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;HELLO WORLDS&amp;#39;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;⍝ negative shifts are okay&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;DAHHKWSKNH&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;O&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;caesar&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;HELLO WORLDS&amp;#39;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;⍝ no shift is okay&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;HELLO&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;WORLDS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;m&#34;&gt;27&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;caesar&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;HELLO WORLDS&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;HELLO&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;WORLDS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;m&#34;&gt;¯10&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;caesar&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;⍝ returns an empty vector&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;solution&#34;&gt;Solution&lt;/h2&gt;

&lt;details&gt;
  &lt;summary&gt;&lt;h3&gt;See the solution&lt;/h3&gt;&lt;/summary&gt;
  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-apl&#34; data-lang=&#34;apl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;⍺&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;⌽&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;⎕A&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;⎕A&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;⍸&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;⍵&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Breaking it down:&lt;/p&gt;</description>
    </item>
    <item>
      <title>An APL a day! - Put It In Reverse</title>
      <link>https://rrampage.github.io/2025/02/21/an-apl-a-day-put-it-in-reverse/</link>
      <pubDate>Fri, 21 Feb 2025 16:13:02 +0530</pubDate>
      <guid>https://rrampage.github.io/2025/02/21/an-apl-a-day-put-it-in-reverse/</guid>
      <description>&lt;p&gt;Without much ado, today&amp;rsquo;s problem - &lt;a href=&#34;https://apl.quest/psets/2023.html?goto=P2_Put_It_In_Reverse&#34;&gt;Put it in Reverse&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The find function X⍷Y identifies the beginnings of occurrences of array X in array Y.&lt;/p&gt;
&lt;p&gt;In this problem, you&amp;rsquo;re asked to return a result that identifies the endings of occurrences of array X in array Y. To keep things simple, X and Y will be at most rank 1, meaning they&amp;rsquo;ll either be vectors or scalars.&lt;/p&gt;
&lt;p&gt;Write a function that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;takes a scalar or vector left argument&lt;/li&gt;
&lt;li&gt;takes a scalar or vector right argument&lt;/li&gt;
&lt;li&gt;returns a Boolean result that is the same shape as the right argument where 1&amp;rsquo;s mark the ends of occurrences of the left argument in the right argument&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples:&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-apl&#34; data-lang=&#34;apl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s1&#34;&gt;&amp;#39;abra&amp;#39;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;findEnd&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;abracadabra&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s1&#34;&gt;&amp;#39;issi&amp;#39;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;findEnd&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Mississippi&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s1&#34;&gt;&amp;#39;bb&amp;#39;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;findEnd&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;bbb bbb&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;42&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;findEnd&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;42&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;m&#34;&gt;42&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;findEnd&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;42&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;42&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;findEnd&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;42&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s1&#34;&gt;&amp;#39;are&amp;#39;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;aquatic&amp;#39;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;findEnd&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;ducks&amp;#39;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;are&amp;#39;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;aquatic&amp;#39;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;avians&amp;#39;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;solution&#34;&gt;Solution&lt;/h2&gt;

&lt;details&gt;
  &lt;summary&gt;See the solution&lt;/summary&gt;
  &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-apl&#34; data-lang=&#34;apl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;⌽&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;⌽&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;⍺&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;⍷⌽&lt;/span&gt;&lt;span class=&#34;bp&#34;&gt;⍵&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;We use ⍷ to find beginning of reversed array &lt;code&gt;⌽⍺&lt;/code&gt; in &lt;code&gt;⌽⍵&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;We reverse this to get the ending of ⍺ in ⍵&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Taking example &lt;code&gt;&#39;abra&#39; {⌽(⌽⍺)⍷⌽⍵} &#39;abracadabra&#39;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>An APL a day! - Elimination Sort</title>
      <link>https://rrampage.github.io/2025/02/20/an-apl-a-day-elimination-sort/</link>
      <pubDate>Thu, 20 Feb 2025 22:38:33 +0530</pubDate>
      <guid>https://rrampage.github.io/2025/02/20/an-apl-a-day-elimination-sort/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve started dabbling with APL. It has been a lot of fun solving the &lt;a href=&#34;https://challenge.dyalog.com/&#34;&gt;current batch of challenges&lt;/a&gt;. &lt;a href=&#34;https://web.archive.org/web/20250210194607/https://challenge.dyalog.com/?goto=welcome&#34;&gt;Archive&lt;/a&gt;. I loved how each challenge focuses on a small set of operators and makes us use them in various (devious!) combinations to solve the problems. I&amp;rsquo;m going through some of the older challenges to learn about more operators.&lt;/p&gt;
&lt;p&gt;The past challenges can be found at &lt;a href=&#34;https://apl.quest/&#34;&gt;APL Quest&lt;/a&gt;. Today, we&amp;rsquo;ll be solving the first problem from the 2023 challenge. Use &lt;a href=&#34;https://tryapl.org/&#34;&gt;tryapl.org&lt;/a&gt; as an online interactive REPL.&lt;/p&gt;
&lt;h1 id=&#34;elimination-sort&#34;&gt;&lt;a href=&#34;https://apl.quest/psets/2023.html?goto=P1_Elimination_Sort&#34;&gt;Elimination Sort&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;An &amp;ldquo;Elimination Sort&amp;rdquo; is a somewhat farcical sorting algorithm which starts with the leftmost element and keeps subsequent elements that are at least as large as the previous kept element, discarding all other elements. For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-apl&#34; data-lang=&#34;apl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;EliminationSort&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;7&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;6&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;7&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;10&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Write a function that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;takes a non-empty numeric vector right argument&lt;/li&gt;
&lt;li&gt;returns an &amp;ldquo;Elimination-sorted&amp;rdquo; vector of the right argument&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hint: The progressive-maxima idiomatic phrase ⌈, the greater or equal function ≥, and the replicate function / could be helpful in solving this problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Re-learning Lua</title>
      <link>https://rrampage.github.io/2021/12/04/relearning-lua/</link>
      <pubDate>Sat, 04 Dec 2021 00:00:00 +0530</pubDate>
      <guid>https://rrampage.github.io/2021/12/04/relearning-lua/</guid>
      <description>Lua Basics</description>
    </item>
    <item>
      <title>S3 Game</title>
      <link>https://rrampage.github.io/2020/06/04/s3-game/</link>
      <pubDate>Thu, 04 Jun 2020 16:09:34 +0000</pubDate>
      <guid>https://rrampage.github.io/2020/06/04/s3-game/</guid>
      <description>Level up your S3 skills by playing this game!</description>
    </item>
    <item>
      <title>NPM and Node tips to make your dev machine (slightly) safer</title>
      <link>https://rrampage.github.io/2020/05/28/npm-and-node-tips-to-make-your-dev-machine-slightly-safer/</link>
      <pubDate>Thu, 28 May 2020 10:42:07 +0000</pubDate>
      <guid>https://rrampage.github.io/2020/05/28/npm-and-node-tips-to-make-your-dev-machine-slightly-safer/</guid>
      <description>&lt;p&gt;NPM is used as a convenient cross-platform package manager for &lt;a href=&#34;https://hackernoon.com/the-best-of-npm-install-g-9ab9d749eeb1&#34;&gt;a lot of developer tools&lt;/a&gt;. For many tools, the defacto way to install is &lt;strong&gt;&lt;code&gt;npm install -g $TOOL&lt;/code&gt;&lt;/strong&gt;. But installing anything via npm allows it to run untrusted code on your machine.&lt;/p&gt;
&lt;p&gt;Here are a few tips to minimize the risk:&lt;/p&gt;
&lt;h2 id=&#34;1-never-run-npm-as-sudoroot&#34;&gt;1. NEVER run npm as sudo/root&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally&#34;&gt;Node&amp;rsquo;s official documentation&lt;/a&gt; recommends not installing global packages as sudo/root. If you have already installed node through &lt;code&gt;nvm&lt;/code&gt; ignore this step. If you use a system installed &lt;code&gt;node&lt;/code&gt; e.g using Ubuntu&amp;rsquo;s apt-get, read through &lt;strong&gt;&lt;a href=&#34;https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md&#34;&gt;this guide&lt;/a&gt;&lt;/strong&gt; for Linux/Mac or &lt;a href=&#34;https://github.com/glenpike/npm-g_nosudo&#34;&gt;npm-g-nosudo&lt;/a&gt; which is a shell script for Linux.&lt;/p&gt;
&lt;h3 id=&#34;if-you-are-lazy-like-me-heres-a-summary-from-the-linked-guide&#34;&gt;If you are lazy (like me), here&amp;rsquo;s a summary from the linked guide:&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;HOME&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/.npm-packages&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm config &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; prefix &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;HOME&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/.npm-packages&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add this to your &lt;code&gt;.bashrc&lt;/code&gt; or &lt;code&gt;.zshrc&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NPM_PACKAGES=&amp;#34;${HOME}/.npm-packages&amp;#34;
export PATH=&amp;#34;$PATH:$NPM_PACKAGES/bin&amp;#34;
# Preserve MANPATH if you already defined it somewhere in your config.
# Otherwise, fall back to `manpath` so we can inherit from `/etc/manpath`.
export MANPATH=&amp;#34;${MANPATH-$(manpath)}:$NPM_PACKAGES/share/man&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;2-installuse-node-using-nvm-or-asdf&#34;&gt;2. Install/Use node using &lt;code&gt;nvm&lt;/code&gt; or &lt;code&gt;asdf&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally&#34;&gt;Node&amp;rsquo;s official documentation&lt;/a&gt; recommends installing node as an unprivileged user using a node version manager.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Webhook to auto-deploy on git push to Github</title>
      <link>https://rrampage.github.io/2020/05/25/webhook-to-auto-deploy-on-git-push-to-github/</link>
      <pubDate>Mon, 25 May 2020 17:32:54 +0000</pubDate>
      <guid>https://rrampage.github.io/2020/05/25/webhook-to-auto-deploy-on-git-push-to-github/</guid>
      <description>Use git push webhook to run CI or auto-deploy</description>
    </item>
    <item>
      <title>Bash function to add TILs</title>
      <link>https://rrampage.github.io/2020/05/23/bash-function-to-add-tils/</link>
      <pubDate>Sat, 23 May 2020 12:42:20 +0000</pubDate>
      <guid>https://rrampage.github.io/2020/05/23/bash-function-to-add-tils/</guid>
      <description>Add TIL to a `til.md` file from the command line</description>
    </item>
    <item>
      <title>Setting display brightness on Linux from the command line</title>
      <link>https://rrampage.github.io/2020/05/19/setting-display-brightness-on-linux-from-the-command-line/</link>
      <pubDate>Tue, 19 May 2020 16:10:26 +0000</pubDate>
      <guid>https://rrampage.github.io/2020/05/19/setting-display-brightness-on-linux-from-the-command-line/</guid>
      <description>Auto-adjust the brightness on display in Linux</description>
    </item>
    <item>
      <title>Easy VPN using Wireguard</title>
      <link>https://rrampage.github.io/2018/12/14/easy-vpn-using-wireguard/</link>
      <pubDate>Fri, 14 Dec 2018 11:48:44 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/12/14/easy-vpn-using-wireguard/</guid>
      <description>Setup a painless VPN using Wireguard</description>
    </item>
    <item>
      <title>Git Tagging Tutorial</title>
      <link>https://rrampage.github.io/2018/11/22/git-tagging-tutorial/</link>
      <pubDate>Thu, 22 Nov 2018 10:44:36 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/11/22/git-tagging-tutorial/</guid>
      <description>How to create tags in your git repo from command line</description>
    </item>
    <item>
      <title>Bash Command Completion - Finding all the cats in your $PATH!</title>
      <link>https://rrampage.github.io/2018/11/15/bash-command-completion-finding-all-the-cats-in-your-path/</link>
      <pubDate>Thu, 15 Nov 2018 09:39:37 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/11/15/bash-command-completion-finding-all-the-cats-in-your-path/</guid>
      <description>How to search for programs on the terminal</description>
    </item>
    <item>
      <title>Command-line productivity tips : Getting help in the terminal</title>
      <link>https://rrampage.github.io/2018/11/11/command-line-productivity-tips-getting-help-in-the-terminal/</link>
      <pubDate>Sun, 11 Nov 2018 17:30:30 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/11/11/command-line-productivity-tips-getting-help-in-the-terminal/</guid>
      <description>What to do when you are stuck in the command-line</description>
    </item>
    <item>
      <title>Git: How to keep your fork updated with remote repository</title>
      <link>https://rrampage.github.io/2018/11/09/git-how-to-keep-your-fork-updated-with-remote-repository/</link>
      <pubDate>Fri, 09 Nov 2018 12:50:54 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/11/09/git-how-to-keep-your-fork-updated-with-remote-repository/</guid>
      <description>How to keep your Git fork updated with changes from remote</description>
    </item>
    <item>
      <title>Ensuring that a shell script runs exactly once</title>
      <link>https://rrampage.github.io/2018/11/06/ensuring-that-a-shell-script-runs-exactly-once/</link>
      <pubDate>Tue, 06 Nov 2018 18:53:23 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/11/06/ensuring-that-a-shell-script-runs-exactly-once/</guid>
      <description>How to ensure that only one instance of a shell script runs at a time</description>
    </item>
    <item>
      <title>Surviving the Linux OOM Killer</title>
      <link>https://rrampage.github.io/2018/10/04/surviving-the-linux-oom-killer/</link>
      <pubDate>Thu, 04 Oct 2018 15:48:41 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/10/04/surviving-the-linux-oom-killer/</guid>
      <description>How OOM Killer frees memory</description>
    </item>
    <item>
      <title>Algorithms: Gray Binary Code</title>
      <link>https://rrampage.github.io/2018/08/18/algorithms-gray-binary-code/</link>
      <pubDate>Sat, 18 Aug 2018 17:52:23 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/08/18/algorithms-gray-binary-code/</guid>
      <description>Gray Binary Code - A different way of ordering numbers</description>
    </item>
    <item>
      <title>100 Days Of Code</title>
      <link>https://rrampage.github.io/2018/08/13/100-days-of-code/</link>
      <pubDate>Mon, 13 Aug 2018 13:40:27 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/08/13/100-days-of-code/</guid>
      <description>My 100 Days Of Code Challenge</description>
    </item>
    <item>
      <title>Algorithms: Generating Combinations</title>
      <link>https://rrampage.github.io/2018/08/12/algorithms-generating-combinations/</link>
      <pubDate>Sun, 12 Aug 2018 20:20:11 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/08/12/algorithms-generating-combinations/</guid>
      <description>Generate combinations of n numbers taken r at a time</description>
    </item>
    <item>
      <title>Awk - A useful little language</title>
      <link>https://rrampage.github.io/2018/05/26/awk-a-useful-little-language/</link>
      <pubDate>Sat, 26 May 2018 13:58:58 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/05/26/awk-a-useful-little-language/</guid>
      <description>Speed up text processing tasks with Awk</description>
    </item>
    <item>
      <title>JVM Primer Part 2 - Debugging memory issues</title>
      <link>https://rrampage.github.io/2018/05/16/jvm-primer-part-2-debugging-memory-issues/</link>
      <pubDate>Wed, 16 May 2018 11:53:42 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/05/16/jvm-primer-part-2-debugging-memory-issues/</guid>
      <description>JVM Primer - Debugging memory issues</description>
    </item>
    <item>
      <title>A Primer on JVM Memory Management and Troubleshooting - 1</title>
      <link>https://rrampage.github.io/2018/05/15/a-primer-on-jvm-memory-management-and-troubleshooting-1/</link>
      <pubDate>Tue, 15 May 2018 14:14:49 +0000</pubDate>
      <guid>https://rrampage.github.io/2018/05/15/a-primer-on-jvm-memory-management-and-troubleshooting-1/</guid>
      <description>&lt;p&gt;This series is a summary of Oracle&amp;rsquo;s &lt;a href=&#34;https://apexapps.oracle.com/pls/apex/f?p=44785:149:105166169953256::NO:RP,149:P149_EVENT_ID:5552&#34;&gt;JVM troubleshooting course&lt;/a&gt; which gives an overview on JVM memory management, Hotspot VM&amp;rsquo;s garbage collection options, various memory errors and how to troubleshoot them.&lt;/p&gt;
&lt;p&gt;In this post (part 1), we will have a look at how JVM manages memory and its different garbage collectors.&lt;/p&gt;
&lt;p&gt;You can find Part 2 &lt;a href=&#34;https://dev.to/rrampage/jvm-primer-part-2---debugging-performance-issues-1od&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;jvm-memory-management-overview&#34;&gt;JVM Memory Management Overview&lt;/h3&gt;
&lt;p&gt;The JVM provides automatic memory management to free the programmer from manually managing memory. New objects are allocated on heap memory. A &lt;strong&gt;root set&lt;/strong&gt; consists of pointers to external memory, static variables, threads, &lt;a href=&#34;https://en.wikipedia.org/wiki/Java_Native_Interface&#34;&gt;JNI&lt;/a&gt; references and internal JVM structures. Objects directly reachable from the root set must be kept in heap. Objects reachable from any of the reachable objects must also be in heap. This group of objects are the only ones which can be used by a program. The unreachable objects (garbage) are removed using a process called &lt;strong&gt;garbage collection (GC)&lt;/strong&gt;. Reachable objects are &lt;strong&gt;compacted&lt;/strong&gt; i.e moved to contiguous space in heap. This is important as otherwise, the heap will become &lt;a href=&#34;https://en.wikipedia.org/wiki/Fragmentation_(computing)&#34;&gt;fragmented&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Snake case to camel case and back using regular expressions and Python</title>
      <link>https://rrampage.github.io/2018/05/09/snake-case-to-camel-case-and-back-using-regular-expressions-and-python/</link>
      <pubDate>Wed, 09 May 2018 00:10:00 +0530</pubDate>
      <guid>https://rrampage.github.io/2018/05/09/snake-case-to-camel-case-and-back-using-regular-expressions-and-python/</guid>
      <description>Convert back and forth between snake and camel case using Python and the re module</description>
    </item>
    <item>
      <title>Cargo refused to build my project - A Rust debugging story!</title>
      <link>https://rrampage.github.io/2018/05/09/cargo-refused-to-build-my-project-a-rust-debugging-story/</link>
      <pubDate>Wed, 09 May 2018 00:00:00 +0530</pubDate>
      <guid>https://rrampage.github.io/2018/05/09/cargo-refused-to-build-my-project-a-rust-debugging-story/</guid>
      <description>An afternoon of debugging!</description>
    </item>
    <item>
      <title>Disk Space Debugging Checklist</title>
      <link>https://rrampage.github.io/2018/05/04/disk-space-debugging-checklist/</link>
      <pubDate>Fri, 04 May 2018 00:00:00 +0530</pubDate>
      <guid>https://rrampage.github.io/2018/05/04/disk-space-debugging-checklist/</guid>
      <description>Checklist for debugging disk issues on Linux servers</description>
    </item>
    <item>
      <title>Markdown (and some Hugo) Tutorial</title>
      <link>https://rrampage.github.io/2017/08/20/markdown-and-some-hugo-tutorial/</link>
      <pubDate>Sun, 20 Aug 2017 00:00:00 +0000</pubDate>
      <guid>https://rrampage.github.io/2017/08/20/markdown-and-some-hugo-tutorial/</guid>
      <description>&lt;h1 id=&#34;markdown-basics&#34;&gt;Markdown Basics&lt;/h1&gt;
&lt;p&gt;You can write regular &lt;a href=&#34;http://markdowntutorial.com/&#34;&gt;markdown&lt;/a&gt; here and Jekyll will automatically convert it to a nice webpage.  I strongly encourage you to &lt;a href=&#34;http://markdowntutorial.com/&#34;&gt;take 5 minutes to learn how to write in markdown&lt;/a&gt; - it&amp;rsquo;ll teach you how to transform regular text into bold/italics/headings/tables/etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Here is some bold text&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;here-is-a-secondary-heading&#34;&gt;Here is a secondary heading&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s a useless table:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Number&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Next number&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Previous number&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Five&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Six&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Four&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Ten&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Eleven&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Nine&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Seven&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Eight&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Six&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Two&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Three&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;One&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;How about a yummy crepe?&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;http://s3-media3.fl.yelpcdn.com/bphoto/cQ1Yoa75m2yUFFbY2xwuqw/348s.jpg&#34; alt=&#34;Crepe&#34;  /&gt;
&lt;/p&gt;
&lt;h1 id=&#34;code-and-syntax-highlighting&#34;&gt;Code and Syntax highlighting&lt;/h1&gt;
&lt;p&gt;The following are two code samples using syntax highlighting.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hello World</title>
      <link>https://rrampage.github.io/2014/03/03/hello-world/</link>
      <pubDate>Mon, 03 Mar 2014 22:38:33 +0530</pubDate>
      <guid>https://rrampage.github.io/2014/03/03/hello-world/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hello World!&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
