{"@attributes":{"version":"2.0"},"channel":{"title":"suriya on Suriya's site","link":"https:\/\/suriya.cc\/","description":"Recent content in suriya on Suriya's site","generator":"Hugo","language":"en-us","copyright":"This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.","item":[{"title":"recursions","link":"https:\/\/suriya.cc\/tech\/tinkering\/recursions\/","pubDate":"Wed, 04 Mar 2026 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/recursions\/","description":"<p>Recursion is often taught in Computer Science 101 as an elegant, mathematically pure way to solve problems and used widely in leetcode style problems. However, in production environments using mainstream imperative languages (like Python, JavaScript, Java, or C++), it is heavily discouraged. Recursions are usually a footgun in waiting because of some technical<\/p>"},{"title":"(mostly) successful cases of software rewrites with agents in 2026","link":"https:\/\/suriya.cc\/essays\/agents\/","pubDate":"Thu, 26 Feb 2026 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/agents\/","description":"<p>In the past few weeks there have been examples of successful agent usage at a shocking scale. some in production no less.<\/p>"},{"title":"doing performance work?","link":"https:\/\/suriya.cc\/tech\/performance\/debug\/","pubDate":"Sun, 15 Feb 2026 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/performance\/debug\/","description":"<h1 id=\"make-a-release-build\">make a release build!!!!<\/h1>\n<p>so many times, when doing performance profiling, I&rsquo;ve used the debug build and profiled it, because usually there is the DWARF debugging information. making it easy\/fast to build a binary. but the problem with it that, there are ton of developer friendly optimizations that happens, heap layout will be unoptimized, link time optimization is not there<\/p>"},{"title":"when rust \u2260 performance. a lesson in devex.","link":"https:\/\/suriya.cc\/tech\/performance\/oxen-add\/","pubDate":"Mon, 02 Feb 2026 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/performance\/oxen-add\/","description":"<p>I love working at oxen because we strive to be the fastest data versioning tool in the market. Which is why we often do multi terabyte benchmarks on each <a href=\"https:\/\/docs.oxen.ai\/getting-started\/command-line\/local_development\">commands that we support<\/a>\n, (add, commit, etc.)<\/p>"},{"title":"What are your priorities?","link":"https:\/\/suriya.cc\/essays\/priority\/","pubDate":"Mon, 12 Jan 2026 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/priority\/","description":"<p>This is such a front loaded question, because depending on where you are in life or where this question is being pointed at (family, career, etc.) and the timeline given It is going to be wildly different.\nBut it is important to take time to stabilize the ever growing entropy.<\/p>"},{"title":"The future of media","link":"https:\/\/suriya.cc\/essays\/media_future\/","pubDate":"Sat, 03 Jan 2026 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/media_future\/","description":"<p>It is now possible to create content that is, a few order of magnitude more than the total time available to all humans currently alive. and I&rsquo;m confident a major percentage of them can be tailored to be interesting for a person with specific psyche. My opinion is that human attention is going to become more and more valuable, yet it is going to get very difficult to focus on something for extended periods of time. What does this mean for the media ecosystem.<\/p>"},{"title":"qmd for hugo","link":"https:\/\/suriya.cc\/tech\/tinkering\/qmd\/","pubDate":"Mon, 29 Dec 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/qmd\/","description":"<p>I really love just taking notes, run code and having it in my blog.<\/p>\n<p>Quarto is quite cool, I end up committing both the <code>.qmd<\/code> and <code>.md<\/code> files generated from running <code>quarto render<\/code> locally. (haven&rsquo;t gotten to cicd yet.)<\/p>"},{"title":"poor richard's almanack","link":"https:\/\/suriya.cc\/books\/poor_richard\/","pubDate":"Sun, 28 Dec 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/poor_richard\/","description":"<p>I love poor Richard&rsquo;s almanack specifically because the wisdom hidden within the words is malleable and every time I come back to read it I take something new based on my life experiences since then. This book has become part of this meditative 1 - 2 hours I spend every 6 months. and I can definitively say that this is a must read for everyone.<\/p>"},{"title":"my mother's recipe","link":"https:\/\/suriya.cc\/food\/vani\/","pubDate":"Thu, 25 Dec 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/food\/vani\/","description":"<p>There is work underway to convert this into english. just haven&rsquo;t gotten to it yet.<\/p>\n<p>Some of these dishes are so nostalgic even when I read the name.<\/p>"},{"title":"media processing in the cli","link":"https:\/\/suriya.cc\/tech\/tinkering\/image-processing\/","pubDate":"Fri, 12 Dec 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/image-processing\/","description":"<p>convert <code>RW2<\/code> format to <code>jpg<\/code> with imagemagick. while maintaining quality.<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-bash\" data-lang=\"bash\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">for<\/span> f in *.RW2; <span style=\"color:#66d9ef\">do<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> magick <span style=\"color:#e6db74\">&#34;<\/span>$f<span style=\"color:#e6db74\">&#34;<\/span> -quality <span style=\"color:#ae81ff\">85<\/span> <span style=\"color:#e6db74\">&#34;GooglePhotosBackup\/<\/span><span style=\"color:#e6db74\">${<\/span>f%.*<span style=\"color:#e6db74\">}<\/span><span style=\"color:#e6db74\">.jpg&#34;<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> exiftool -tagsFromFile <span style=\"color:#e6db74\">&#34;<\/span>$f<span style=\"color:#e6db74\">&#34;<\/span> -all:all <span style=\"color:#e6db74\">&#34;GooglePhotosBackup\/<\/span><span style=\"color:#e6db74\">${<\/span>f%.*<span style=\"color:#e6db74\">}<\/span><span style=\"color:#e6db74\">.jpg&#34;<\/span> -overwrite_original\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">done<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>convert mp4 into good quality video.<\/p>"},{"title":"hail mary","link":"https:\/\/suriya.cc\/books\/hail_mary\/","pubDate":"Mon, 24 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/hail_mary\/","description":"<p>Overall I loved this book a lot. bought me a new passion for reading fiction.<\/p>\n<h3 id=\"astrophage\">astrophage.<\/h3>\n<p>Astrophage (Greek for &ldquo;star eater&rdquo;), is an interstellar bacteria. sort of like the bacteriophage, but if it could somehow store neutrinos and travel at the speed of light. quite tacky, but leads to a very interesting storyline because they come to the solar system they start consuming the sun and sun starts losing its light. but on one star this does not happen.<\/p>"},{"title":"how big things get done","link":"https:\/\/suriya.cc\/books\/how_big_things_get_done\/","pubDate":"Sun, 16 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/how_big_things_get_done\/","description":"<h4 id=\"the-core-principle-think-slow-act-fast\">the core principle: think slow, act fast<\/h4>\n<ul>\n<li>The vast majority of big projects fail\u2014they are over budget, over time, and under benefits.<\/li>\n<li>The pattern for failure is <strong>&ldquo;Think fast, act slow.&rdquo;<\/strong> A rush to start, followed by endless delays, problems, and cost overruns.<\/li>\n<li>The pattern for success is <strong>&ldquo;Think slow, act fast.&rdquo;<\/strong> A long, careful, iterative planning phase enables a quick, effective, and predictable delivery phase.<\/li>\n<li><strong>Planning is cheap.<\/strong> Delivery is expensive, complex, and risky. Do as much work as possible in planning.<\/li>\n<li>The example of the house renovation in brooklyn which started with just the kitchen, which got delayed by 18 months and $800,000 was pretty telling. It is important to do small experiments before starting something huge. Plan things and define the facts ahead of time.<\/li>\n<\/ul>\n<h4 id=\"on-planning\">on planning<\/h4>\n<ul>\n<li><strong>Ask &ldquo;Why?&rdquo;<\/strong> before anything else. Plan from the <strong>right to the left<\/strong>. First, define the objective and the desired success. Only then should you work backward to figure out the best way to get there. Do not start with a solution.<\/li>\n<li><strong>Take the Outside View.<\/strong> Your project is not unique. It is <strong>&ldquo;one of those.&rdquo;<\/strong> Counter your biases by examining the performance of a broad reference class of similar past projects.<\/li>\n<li>Use <strong>Reference-Class Forecasting.<\/strong> Anchor your budget and schedule in the actual data from comparable projects. This is the single most effective way to improve forecasting accuracy. It accounts for the &ldquo;unknown unknowns&rdquo; that are implicitly present in the data from past projects.<\/li>\n<li><strong>Plan like Pixar.<\/strong> Good planning is not a static, bureaucratic exercise. It is an active process of experimentation (<em>experiri<\/em>). Use simulations, physical models, and digital twins. Build and test prototypes. Create multiple, cheap iterations to learn and discover problems before delivery begins.<\/li>\n<li><strong>Build with Lego.<\/strong> The key to successful, scalable projects is <strong>modularity<\/strong>. Identify the smallest, repeatable core component of your project. Master it, then repeat. This creates a steep, positive learning curve, driving costs down and speed up. Ask: <strong>&ldquo;What&rsquo;s your Lego?&rdquo;<\/strong> Projects with high modularity (solar, wind) have thin-tailed risks. Bespoke, &ldquo;one huge thing&rdquo; projects (nuclear power, high-speed rail) have fat-tailed risks.<\/li>\n<\/ul>\n<h4 id=\"on-people--execution\">on people &amp; execution<\/h4>\n<ul>\n<li><strong>Hire a Masterbuilder.<\/strong> Find a leader with deep, tacit knowledge and a proven track record of delivering similar projects successfully. Then hire their team. Experience is paramount.<\/li>\n<li><strong>Get the team right.<\/strong> A great team will fix a mediocre idea; a mediocre team will ruin a great idea.<\/li>\n<li>Build a <strong>single, determined organism.<\/strong> Align all contracts and incentives toward the shared goal. Create a single team identity and a clear purpose. Foster psychological safety so bad news travels fast.<\/li>\n<\/ul>\n<h4 id=\"on-risk--mindset\">on risk &amp; mindset<\/h4>\n<ul>\n<li><strong>Your biggest risk is you.<\/strong> Human psychology, with its inherent biases (optimism, uniqueness, confirmation bias), is the greatest threat to any project.<\/li>\n<li><strong>Ignorance is not your friend.<\/strong> The idea that underestimating challenges is beneficial because it tricks us into starting difficult projects is a fallacy supported by survivorship bias. Data shows the typical &ldquo;leap in the dark&rdquo; ends in failure.<\/li>\n<li><strong>Watch your downside.<\/strong> Risk can kill you; opportunity cannot. For projects with <strong>fat-tailed distributions<\/strong>, where extreme cost overruns are a real possibility, you must focus on <strong>black swan management<\/strong>: identify what causes tail risks in your reference class and mitigate them to &ldquo;cut the tail.&rdquo; You cannot simply budget for them.<\/li>\n<\/ul>"},{"title":"1d convolution","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/06_1d_convolution\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/06_1d_convolution\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-cpp\" data-lang=\"cpp\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;iostream&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;stdio.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">convolution_1d_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> kernel, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output,\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> input_size, <span style=\"color:#66d9ef\">int<\/span> kernel_size) {\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> i <span style=\"color:#f92672\">=<\/span> blockDim.x <span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> output_size <span style=\"color:#f92672\">=<\/span> input_size <span style=\"color:#f92672\">-<\/span> kernel_size <span style=\"color:#f92672\">+<\/span><span style=\"color:#ae81ff\">1<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (i <span style=\"color:#f92672\">&lt;<\/span> output_size ) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">float<\/span> sum <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">0.0f<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">for<\/span> ( <span style=\"color:#66d9ef\">int<\/span> j <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">0<\/span>; j<span style=\"color:#f92672\">&lt;<\/span>kernel_size; j<span style=\"color:#f92672\">++<\/span>) {\n<\/span><\/span><span style=\"display:flex;\"><span> sum <span style=\"color:#f92672\">+=<\/span> input[i<span style=\"color:#f92672\">+<\/span>j]<span style=\"color:#f92672\">*<\/span>kernel[j];\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> output[i] <span style=\"color:#f92672\">=<\/span> sum;\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, kernel, output are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> kernel, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> input_size, <span style=\"color:#66d9ef\">int<\/span> kernel_size) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> output_size <span style=\"color:#f92672\">=<\/span> input_size <span style=\"color:#f92672\">-<\/span> kernel_size <span style=\"color:#f92672\">+<\/span> <span style=\"color:#ae81ff\">1<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (output_size <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> convolution_1d_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, kernel, output, input_size, kernel_size);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"color inversion","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/04_color_inversion\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/04_color_inversion\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-cpp\" data-lang=\"cpp\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">invert_kernel<\/span>(<span style=\"color:#66d9ef\">unsigned<\/span> <span style=\"color:#66d9ef\">char<\/span><span style=\"color:#f92672\">*<\/span> image, <span style=\"color:#66d9ef\">int<\/span> width, <span style=\"color:#66d9ef\">int<\/span> height) {\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> i <span style=\"color:#f92672\">=<\/span> blockIdx.x <span style=\"color:#f92672\">*<\/span> blockDim.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> image[i<span style=\"color:#f92672\">*<\/span><span style=\"color:#ae81ff\">4<\/span>] <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">255<\/span> <span style=\"color:#f92672\">-<\/span> image[i<span style=\"color:#f92672\">*<\/span><span style=\"color:#ae81ff\">4<\/span>];\n<\/span><\/span><span style=\"display:flex;\"><span> image[i<span style=\"color:#f92672\">*<\/span><span style=\"color:#ae81ff\">4<\/span><span style=\"color:#f92672\">+<\/span><span style=\"color:#ae81ff\">1<\/span>] <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">255<\/span> <span style=\"color:#f92672\">-<\/span> image[i<span style=\"color:#f92672\">*<\/span><span style=\"color:#ae81ff\">4<\/span><span style=\"color:#f92672\">+<\/span><span style=\"color:#ae81ff\">1<\/span>];\n<\/span><\/span><span style=\"display:flex;\"><span> image[i<span style=\"color:#f92672\">*<\/span><span style=\"color:#ae81ff\">4<\/span><span style=\"color:#f92672\">+<\/span><span style=\"color:#ae81ff\">2<\/span>] <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">255<\/span> <span style=\"color:#f92672\">-<\/span> image[i<span style=\"color:#f92672\">*<\/span><span style=\"color:#ae81ff\">4<\/span><span style=\"color:#f92672\">+<\/span><span style=\"color:#ae81ff\">2<\/span>];\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ image_input, image_output are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">unsigned<\/span> <span style=\"color:#66d9ef\">char<\/span><span style=\"color:#f92672\">*<\/span> image, <span style=\"color:#66d9ef\">int<\/span> width, <span style=\"color:#66d9ef\">int<\/span> height) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (width <span style=\"color:#f92672\">*<\/span> height <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> invert_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(image, width, height);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"count 2d array element","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/14_count_2d_array\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/14_count_2d_array\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">count_2d_equal_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N, <span style=\"color:#66d9ef\">int<\/span> M, <span style=\"color:#66d9ef\">int<\/span> K) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> idx <span style=\"color:#f92672\">=<\/span> blockDim.x<span style=\"color:#f92672\">*<\/span>blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> idy <span style=\"color:#f92672\">=<\/span> blockDim.y<span style=\"color:#f92672\">*<\/span>blockIdx.y <span style=\"color:#f92672\">+<\/span> threadIdx.y;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> ((idx<span style=\"color:#f92672\">&lt;<\/span>N <span style=\"color:#f92672\">&amp;&amp;<\/span> idy<span style=\"color:#f92672\">&lt;<\/span>M) <span style=\"color:#f92672\">&amp;&amp;<\/span> input[idx<span style=\"color:#f92672\">*<\/span>M<span style=\"color:#f92672\">+<\/span>idy]<span style=\"color:#f92672\">==<\/span>K) atomicAdd(output,<span style=\"color:#ae81ff\">1<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, output are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N, <span style=\"color:#66d9ef\">int<\/span> M, <span style=\"color:#66d9ef\">int<\/span> K) {\n<\/span><\/span><span style=\"display:flex;\"><span> dim3 <span style=\"color:#a6e22e\">threadsPerBlock<\/span>(<span style=\"color:#ae81ff\">16<\/span>, <span style=\"color:#ae81ff\">16<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span> dim3 <span style=\"color:#a6e22e\">blocksPerGrid<\/span>((N <span style=\"color:#f92672\">+<\/span> threadsPerBlock.x <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock.x,\n<\/span><\/span><span style=\"display:flex;\"><span> (M <span style=\"color:#f92672\">+<\/span> threadsPerBlock.y <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock.y);\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> count_2d_equal_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, output, N, M, K);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"count array element","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/13_count_array\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/13_count_array\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">count_equal_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N, <span style=\"color:#66d9ef\">int<\/span> K) {\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> id<span style=\"color:#f92672\">=<\/span>blockDim.x <span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span>(id<span style=\"color:#f92672\">&lt;<\/span>N <span style=\"color:#f92672\">&amp;&amp;<\/span> input[id]<span style=\"color:#f92672\">==<\/span>K) atomicAdd(output, <span style=\"color:#ae81ff\">1<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, output are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">int<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N, <span style=\"color:#66d9ef\">int<\/span> K) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (N <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> count_equal_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, output, N, K);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"leaky relu","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/09_leaky_relu\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/09_leaky_relu\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">leaky_relu_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> id <span style=\"color:#f92672\">=<\/span> blockDim.x<span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (id<span style=\"color:#f92672\">&lt;<\/span>N) output[id] <span style=\"color:#f92672\">=<\/span> input[id]<span style=\"color:#f92672\">&gt;<\/span><span style=\"color:#ae81ff\">0<\/span><span style=\"color:#f92672\">?<\/span> input[id] <span style=\"color:#f92672\">:<\/span> <span style=\"color:#ae81ff\">0.01<\/span><span style=\"color:#f92672\">*<\/span>input[id];\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, output are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (N <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> leaky_relu_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, output, N);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"matrix addition","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/05_matrix_addition\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/05_matrix_addition\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">matrix_add<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> A, <span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> B, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> C, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> id <span style=\"color:#f92672\">=<\/span> blockDim.x <span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (id<span style=\"color:#f92672\">&lt;<\/span>N) C[id] <span style=\"color:#f92672\">=<\/span> A[id]<span style=\"color:#f92672\">+<\/span>B[id];\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ A, B, C are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> A, <span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> B, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> C, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (N <span style=\"color:#f92672\">*<\/span> N <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> matrix_add<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(A, B, C, N);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"matrix copy","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/11_matrix_copy\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/11_matrix_copy\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;stdio.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;iostream&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">copy_matrix_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> A, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> B, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> idx <span style=\"color:#f92672\">=<\/span> blockDim.x<span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (idx<span style=\"color:#f92672\">&lt;<\/span>N){\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> B[idx] <span style=\"color:#f92672\">=<\/span> A[idx];\n<\/span><\/span><span style=\"display:flex;\"><span> } \n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ A, B are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> A, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> B, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> total <span style=\"color:#f92672\">=<\/span> N <span style=\"color:#f92672\">*<\/span> N;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (total <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span> copy_matrix_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(A, B, total);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>} \n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"matrix multiply","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/02_matrix_multipy\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/02_matrix_multipy\/","description":"<p>The tricky part in this was that, I took some time to intuit that each thread should associate to each value in the output matrix.<\/p>"},{"title":"matrix transpose","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/03_matrix_transpose\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/03_matrix_transpose\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-cpp\" data-lang=\"cpp\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;iostream&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;stdio.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">matrix_transpose_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> rows, <span style=\"color:#66d9ef\">int<\/span> cols) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> i <span style=\"color:#f92672\">=<\/span> blockIdx.x <span style=\"color:#f92672\">*<\/span> blockDim.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> j <span style=\"color:#f92672\">=<\/span> blockIdx.y <span style=\"color:#f92672\">*<\/span> blockDim.y <span style=\"color:#f92672\">+<\/span> threadIdx.y;\n<\/span><\/span><span style=\"display:flex;\"><span> printf(<span style=\"color:#e6db74\">&#34;%d&#34;<\/span>,i);\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (i<span style=\"color:#f92672\">&lt;<\/span>rows <span style=\"color:#f92672\">&amp;&amp;<\/span> j<span style=\"color:#f92672\">&lt;<\/span>cols){\n<\/span><\/span><span style=\"display:flex;\"><span> output[j<span style=\"color:#f92672\">*<\/span>rows<span style=\"color:#f92672\">+<\/span>i] <span style=\"color:#f92672\">=<\/span> input[i<span style=\"color:#f92672\">*<\/span>cols<span style=\"color:#f92672\">+<\/span>j];\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, output are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> rows, <span style=\"color:#66d9ef\">int<\/span> cols) {\n<\/span><\/span><span style=\"display:flex;\"><span> dim3 <span style=\"color:#a6e22e\">threadsPerBlock<\/span>(<span style=\"color:#ae81ff\">16<\/span>, <span style=\"color:#ae81ff\">16<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span> dim3 <span style=\"color:#a6e22e\">blocksPerGrid<\/span>((cols <span style=\"color:#f92672\">+<\/span> threadsPerBlock.x <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock.x,\n<\/span><\/span><span style=\"display:flex;\"><span> (rows <span style=\"color:#f92672\">+<\/span> threadsPerBlock.y <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock.y);\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> matrix_transpose_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, output, rows, cols);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"rainbow table","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/10_rainbow_table\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/10_rainbow_table\/","description":{}},{"title":"relu","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/08_ReLu\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/08_ReLu\/","description":"<p><code>ReLU(x) = max(0,x)<\/code><\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">relu_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> id <span style=\"color:#f92672\">=<\/span> blockDim.x<span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (id<span style=\"color:#f92672\">&lt;<\/span>N) output[id] <span style=\"color:#f92672\">=<\/span> std<span style=\"color:#f92672\">::<\/span>max(<span style=\"color:#ae81ff\">0.0f<\/span>,input[id]);\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, output are device pointers (i.e. pointers to memory on the GPU)\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (N <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> relu_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, output, N);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"reverse array","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/07_reverse_array\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/07_reverse_array\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;iostream&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;stdio.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">reverse_array<\/span>(<span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> i <span style=\"color:#f92672\">=<\/span> blockDim.x <span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (i<span style=\"color:#f92672\">&lt;<\/span>N<span style=\"color:#f92672\">\/<\/span><span style=\"color:#ae81ff\">2<\/span>) { \n<\/span><\/span><span style=\"display:flex;\"><span> std<span style=\"color:#f92672\">::<\/span>swap(input[i],input[N<span style=\"color:#f92672\">-<\/span>i<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">1<\/span>]);\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input is device pointer\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (N <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> reverse_array<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, N);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"silu","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/15_sigmoid_linear_unit\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/15_sigmoid_linear_unit\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-cpp\" data-lang=\"cpp\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">silu_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> id <span style=\"color:#f92672\">=<\/span> blockDim.x <span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (id<span style=\"color:#f92672\">&lt;<\/span>N) output[id] <span style=\"color:#f92672\">=<\/span> input[id]<span style=\"color:#f92672\">*<\/span>(<span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">\/<\/span>(<span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">+<\/span>std<span style=\"color:#f92672\">::<\/span>exp(<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">*<\/span>(input[id]))));\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, output are device pointers\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (N <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> silu_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, output, N);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"simple inference","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/12_simple_inference\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/12_simple_inference\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-python\" data-lang=\"python\"><span style=\"display:flex;\"><span><span style=\"color:#f92672\">import<\/span> torch\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">import<\/span> torch.nn <span style=\"color:#66d9ef\">as<\/span> nn\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"># input, model, and output are on the GPU<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">def<\/span> <span style=\"color:#a6e22e\">solve<\/span>(input: torch<span style=\"color:#f92672\">.<\/span>Tensor, model: nn<span style=\"color:#f92672\">.<\/span>Module, output: torch<span style=\"color:#f92672\">.<\/span>Tensor):\n<\/span><\/span><span style=\"display:flex;\"><span> model<span style=\"color:#f92672\">.<\/span>eval()\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">with<\/span> torch<span style=\"color:#f92672\">.<\/span>no_grad():\n<\/span><\/span><span style=\"display:flex;\"><span> output<span style=\"color:#f92672\">.<\/span>copy_(model(input))\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"swilu","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/16_swish_gated_linear_unit\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/16_swish_gated_linear_unit\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-c++\" data-lang=\"c++\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">#include<\/span> <span style=\"color:#75715e\">&lt;cuda_runtime.h&gt;<\/span><span style=\"color:#75715e\">\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">float<\/span> <span style=\"color:#a6e22e\">silu<\/span>(<span style=\"color:#66d9ef\">float<\/span> x){\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">return<\/span> x<span style=\"color:#f92672\">*<\/span>(<span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">\/<\/span>(<span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">+<\/span>std<span style=\"color:#f92672\">::<\/span>exp(<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">*<\/span>(x))));\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>__global__ <span style=\"color:#66d9ef\">void<\/span> <span style=\"color:#a6e22e\">swiglu_kernel<\/span>(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> halfN) {\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> id <span style=\"color:#f92672\">=<\/span> blockDim.x <span style=\"color:#f92672\">*<\/span> blockIdx.x <span style=\"color:#f92672\">+<\/span> threadIdx.x;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span>(id<span style=\"color:#f92672\">&lt;<\/span>halfN) output[id] <span style=\"color:#f92672\">=<\/span> input[id<span style=\"color:#f92672\">%<\/span>halfN]<span style=\"color:#f92672\">*<\/span>(<span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">\/<\/span>(<span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">+<\/span>std<span style=\"color:#f92672\">::<\/span>exp(<span style=\"color:#f92672\">-<\/span><span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">*<\/span>(input[id<span style=\"color:#f92672\">%<\/span>halfN])))) <span style=\"color:#f92672\">*<\/span> input[id<span style=\"color:#f92672\">%<\/span>halfN <span style=\"color:#f92672\">+<\/span> halfN];\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ input, output are device pointers\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span><span style=\"color:#66d9ef\">extern<\/span> <span style=\"color:#e6db74\">&#34;C&#34;<\/span> <span style=\"color:#66d9ef\">void<\/span> solve(<span style=\"color:#66d9ef\">const<\/span> <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> input, <span style=\"color:#66d9ef\">float<\/span><span style=\"color:#f92672\">*<\/span> output, <span style=\"color:#66d9ef\">int<\/span> N) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> halfN <span style=\"color:#f92672\">=<\/span> N <span style=\"color:#f92672\">\/<\/span> <span style=\"color:#ae81ff\">2<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> threadsPerBlock <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">256<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> blocksPerGrid <span style=\"color:#f92672\">=<\/span> (halfN <span style=\"color:#f92672\">+<\/span> threadsPerBlock <span style=\"color:#f92672\">-<\/span> <span style=\"color:#ae81ff\">1<\/span>) <span style=\"color:#f92672\">\/<\/span> threadsPerBlock;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> swiglu_kernel<span style=\"color:#f92672\">&lt;&lt;&lt;<\/span>blocksPerGrid, threadsPerBlock<span style=\"color:#f92672\">&gt;&gt;&gt;<\/span>(input, output, halfN);\n<\/span><\/span><span style=\"display:flex;\"><span> cudaDeviceSynchronize();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"vector addition","link":"https:\/\/suriya.cc\/tech\/algos\/cuda\/01_vector_addition\/","pubDate":"Wed, 12 Nov 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/cuda\/01_vector_addition\/","description":"<p>The question was<\/p>\n<pre tabindex=\"0\"><code>Implement a program that performs element-wise addition of two vectors containing 32-bit floating point numbers on a GPU. The program should take two input vectors of equal length and produce a single output vector containing their sum.\n\nImplementation Requirements\nExternal libraries are not permitted\nThe solve function signature must remain unchanged\nThe final result must be stored in vector C\n<\/code><\/pre><p>Identifying the thread uniquely is always done like using\n<code>blockIdx.x * blockDim.x + threadIdx.x<\/code><\/p>"},{"title":"functional programming.","link":"https:\/\/suriya.cc\/tech\/practice\/erlang\/functional\/","pubDate":"Sat, 25 Oct 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/erlang\/functional\/","description":"<p>functional programming (FP) has always seemed like a curiosity \u2013 a realm of mathematical purity with little bearing on the practical realities of building robust, scalable software. However, as the complexity of software grows and the demand for concurrent and parallel processing. This post aims to demystify functional programming for the experienced object-oriented programmer and offer a technical bridge from the familiar landscapes of Rust, Python, and C++.<\/p>"},{"title":"phoenix","link":"https:\/\/suriya.cc\/tech\/practice\/erlang\/phoenix\/","pubDate":"Sat, 25 Oct 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/erlang\/phoenix\/","description":{}},{"title":"successful cold emailing","link":"https:\/\/suriya.cc\/general\/cold_email\/","pubDate":"Sat, 25 Oct 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/cold_email\/","description":"<p>cold emailing is very powerful, but doing it effectively is a very difficult task. There are so many things to consider, before sending out an email. This is a collection of successful cold emails I&rsquo;ve found around the web.<\/p>"},{"title":"why accelerate?","link":"https:\/\/suriya.cc\/general\/accelerate\/","pubDate":"Sat, 25 Oct 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/accelerate\/","description":"<h2 id=\"parkinson\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/parkinson%27s_law\">parkinson&rsquo;s law<\/a>\n<\/h2>\n<blockquote>\n<p>&ldquo;work expands so as to fill the time available for its completion&rdquo;<\/p><\/blockquote>\n<p>When Northcote made this observation, this was designed for organisations, but I believe this is a good representation for personal tasks as well.<\/p>"},{"title":"machines of loving grace","link":"https:\/\/suriya.cc\/books\/machines_of_loving_grace\/","pubDate":"Tue, 07 Oct 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/machines_of_loving_grace\/","description":"<ul>\n<li>Amodei focusing on AI comes from a belief that these risks are the primary obstacles to an overwhelmingly positive future. because if AI is as promising as it is, then it is our job to be that much more careful about it.<\/li>\n<li>Most people are underestimating the sheer scale of AI&rsquo;s potential benefits, just as they underestimate the risks. This essay is an attempt to sketch out that positive vision.<\/li>\n<li>He openly admits that these are &ldquo;educated and useful guesses&rdquo; and that the future is inherently unpredictable. The goal is to create a &ldquo;concrete vision&rdquo; to foster discussion, even if the finer details are wrong. and for reasons unknown to me, I&rsquo;m a sucker for these.<\/li>\n<li>Amodei provides four reasons why he and Anthropic have historically focused on risks rather than benefits:\n<ol>\n<li>The development of AI and its benefits are largely inevitable due to market forces. The risks, however, are not predetermined and can be influenced by our actions.<\/li>\n<li><strong>Avoid Propaganda:<\/strong> AI companies risk sounding like propagandists distracting from the downsides when they &ldquo;talk their book.&rdquo;<\/li>\n<li><strong>Avoid Grandiosity:<\/strong> He expresses distaste for the &ldquo;prophet-like&rdquo; tone some AI leaders adopt (wink wink samA), viewing it as dangerous to frame technological goals in religious terms.<\/li>\n<li><strong>Avoid &ldquo;Sci-fi Baggage&rdquo;:<\/strong> He believes the common sci-fi tropes (uploaded minds, cyberpunk aesthetics) make the discussion of AI&rsquo;s upside seem unserious and unrelatable to the general public.<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>From a strategic communication standpoint this essay was interesting. Amodei builds credibility by acknowledging the risks he is known for, which makes his subsequent turn to optimism more powerful and sincere. His reasoning for avoiding &ldquo;propaganda&rdquo; shows a deep understanding of public perception and the importance of intellectual honesty for a company in a field as hyped as AI.<\/p>"},{"title":"elixir","link":"https:\/\/suriya.cc\/tech\/practice\/erlang\/elixir\/","pubDate":"Fri, 03 Oct 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/erlang\/elixir\/","description":"<h2 id=\"tools\">tools<\/h2>\n<h2 id=\"hex\">hex<\/h2>\n<p>is the package manager. similar to pip.<\/p>\n<h3 id=\"mix\">mix<\/h3>\n<p>tooling to build, run, test, and release Erlang applications. kinda like cargo for rust.<\/p>"},{"title":"how and why i taught my toddler to read","link":"https:\/\/suriya.cc\/books\/why_I_taught_my_kid\/","pubDate":"Fri, 03 Oct 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/why_I_taught_my_kid\/","description":"<p>I will start out by saying I&rsquo;m a big fan of ridiculously successful people taking their hobbies\/passtimes to extreme ends. Which is why i really like, Linus torvalds building his scuba diving software or Nathan Myhrvold writing a five volume book set about bread. Something about it is just fascinating to me. Here is a person whose attention is extremely in demand and there are a million on other higher priority stuff that they could do. But they chose this, and decided to spend an insane amount of time mastering\/fixing this niche little problem with the world.<\/p>"},{"title":"poor charlie's almanack (2005)","link":"https:\/\/suriya.cc\/books\/poor_charlie\/","pubDate":"Tue, 30 Sep 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/poor_charlie\/","description":"<p>I used to listen to Charlie Munger&rsquo;s psychology lectures a lot. So I had some idea what the book was going to be about, invert always invert, align incentives, do a simple thing consistently where ideas that I try to apply in my life. One of the things that I like a lot about charlie&rsquo;s view of life is how he focuses on perpetual, voracious learning. Being able to adapt to changing market winds and guiding such a huge investment portfolio at the age of 99 is just something that inspires me in a quite unique way.<\/p>"},{"title":"life has no answers, but inifinite questions","link":"https:\/\/suriya.cc\/essays\/gowsik\/","pubDate":"Sun, 28 Sep 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/gowsik\/","description":"<p>He would have been 27 today.<\/p>\n<p>Been three quite long years since he decided he no longer wanted to do anything with life and took his own.<\/p>"},{"title":"software engineering agents work. but only if you do","link":"https:\/\/suriya.cc\/general\/gpt-code\/","pubDate":"Sat, 13 Sep 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/gpt-code\/","description":"<p>Every week there is a new agent that the twitter micro-cosmos gets fired up about. This week it was agent 3.\nWhich is apparently miles ahead of the competition and is able to plan and execute for up to 200 minutes.<\/p>"},{"title":"rust `move` keyword","link":"https:\/\/suriya.cc\/tech\/practice\/rust\/move\/","pubDate":"Tue, 09 Sep 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/rust\/move\/","description":"<h2 id=\"what-is-move\">what is &ldquo;move&rdquo;<\/h2>\n<p>When you assign a value to a new variable or pass a value to a function, the default behavior for types that don&rsquo;t implement the <code>Copy<\/code> trait is to &ldquo;move&rdquo; ownership of that value. This means the original variable can no longer be used after the move. This prevents double-free errors and other memory safety issues by ensuring there&rsquo;s always only one owner of the data at any given time. This forms the base of the ownership model, which can be represented like below.<\/p>"},{"title":"async rust","link":"https:\/\/suriya.cc\/tech\/practice\/rust\/async-rust\/","pubDate":"Sun, 10 Aug 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/rust\/async-rust\/","description":"<p>Asynchronous programming is a powerful paradigm for building highly concurrent and efficient I\/O-bound applications.<\/p>\n<p>I will dissect the core components of Rust&rsquo;s asynchrony, from the fundamental <code>Future<\/code> trait to the complexities of <code>Pin<\/code> and memory management. We will then unravel the inner workings of Tokio, the most popular async runtime, exploring its scheduler, I\/O handling with <code>mio<\/code>, and how it all comes together to execute our asynchronous code.<\/p>"},{"title":"postgres","link":"https:\/\/suriya.cc\/tech\/tinkering\/postgres\/","pubDate":"Sun, 10 Aug 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/postgres\/","description":"<p>Often in postgres, there are some unique stuff that is there for postgres which slows stuff down or speeds up the query.<\/p>"},{"title":"rust benchmarking","link":"https:\/\/suriya.cc\/tech\/practice\/rust\/benchmarking\/","pubDate":"Wed, 25 Jun 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/rust\/benchmarking\/","description":"<h2 id=\"libraries\">libraries<\/h2>\n<h3 id=\"criterionrs\"><a href=\"https:\/\/github.com\/bheisler\/criterion.rs\">criterion.rs<\/a>\n<\/h3>\n<ul>\n<li>Has really good defaults and seems to work out of the box.<\/li>\n<li>The ecosystem around criterion is really good. purely because criterion has been around for so long<\/li>\n<\/ul>\n<h3 id=\"rust-iai\"><a href=\"https:\/\/github.com\/bheisler\/iai\">rust iai<\/a>\n<\/h3>\n<p>Even though it is supported by a lot of ecosystem tools. It hasn&rsquo;t been in development for the past 4 years. and <a href=\"https:\/\/github.com\/bheisler\">bheisler<\/a>\n is the creator of criterion, so even more reason to use criterion.<\/p>"},{"title":"sweating the details","link":"https:\/\/suriya.cc\/general\/never-complete\/","pubDate":"Sun, 15 Jun 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/never-complete\/","description":"<p>I mentioned this mildly in my <a href=\"https:\/\/suriya.cc\/essays\/shiptalk\">Ship Talk<\/a>\n essay. Caring about what you&rsquo;re delivering. Putting that extra effort to polish your work is painful. Doubly so when the world does not respond kindly to that.<\/p>"},{"title":"the metamorphosis - franz kafka","link":"https:\/\/suriya.cc\/books\/metamorphosis\/","pubDate":"Tue, 01 Apr 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/metamorphosis\/","description":"<p>Reading Kafka is a strange experience. There&rsquo;s an uncomfortable feeling, especially with <em>Metamorphosis<\/em>, that you&rsquo;re being told a story that is both completely impossible and deeply, uncomfortably true.<\/p>"},{"title":"ai media editor","link":"https:\/\/suriya.cc\/general\/ai-media-editor\/","pubDate":"Sat, 29 Mar 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/ai-media-editor\/","description":"<p>The first animation movie, toy story was made in 1995. At that time this was a break through. It involved a lot of proprietary software (Ray tracing, shaders, motion blur) and decades of research and development.\nIn 2025, for the first time a movie made in open source software (blender) received the oscar.<\/p>"},{"title":"the immortal life of henrietta lacks","link":"https:\/\/suriya.cc\/books\/HeLa\/","pubDate":"Sat, 15 Mar 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/HeLa\/","description":"<p>HeLa Cells, as they&rsquo;re called by the science community. Has been through it all, exposed to radiation, injected with virus, exposed in space, treated with chemical burn. All of modern medicine depends on HeLa cells to create the medicine. HeLa cells are what are used to test vaccines, chemicals, and physics to see hwo humans cells would work under certain conditions, HeLa cells are being manufactured around the world in troves.<\/p>"},{"title":"server setup","link":"https:\/\/suriya.cc\/tech\/tinkering\/server\/","pubDate":"Fri, 07 Mar 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/server\/","description":"<h3 id=\"oh-my-zsh\">oh my zsh<\/h3>\n<ul>\n<li>oh-my-zsh has hands down been a godsend for me.<\/li>\n<\/ul>\n<p>for that though we first need to install <code>zsh<\/code><\/p>"},{"title":"mobile dev","link":"https:\/\/suriya.cc\/tech\/tinkering\/mobile_dev\/","pubDate":"Fri, 28 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/mobile_dev\/","description":"<p>Mobile development is probably the most highest abstracted operation possible. because of this there are too many pitfalls that trip up<\/p>"},{"title":"source code","link":"https:\/\/suriya.cc\/books\/source_code\/","pubDate":"Wed, 26 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/source_code\/","description":"<p>Bill Gates starts this story from his roots up until the point he found Microsoft and it became a really serious thing. I like that the book closes right after the founding of Microsoft. Because much has been written about that part of the story<\/p>"},{"title":"react native","link":"https:\/\/suriya.cc\/tech\/tinkering\/react-native\/","pubDate":"Sat, 22 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/react-native\/","description":"<p>I&rsquo;ve worked with React Native before but never professionally.<\/p>\n<p>Recently I&rsquo;ve been getting into building a complete react-native app<\/p>\n<p>And, that is when you see the dark underside of things.<\/p>"},{"title":"almond","link":"https:\/\/suriya.cc\/books\/almond\/","pubDate":"Sat, 15 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/almond\/","description":"<p>the book starts with a tragedy and ends with a mild happiness\/realization.<\/p>\n<p>the protagonist Yunjae is incapable of understanding or expressing emotions because of a problem in his brain.<\/p>"},{"title":"practical deep learning","link":"https:\/\/suriya.cc\/tech\/ML\/practical_deep_learning\/","pubDate":"Sat, 15 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/practical_deep_learning\/","description":"<p>notes from <a href=\"https:\/\/www.fast.ai\/\">fast.ai<\/a>\n Practical Deep Learning course.<\/p>"},{"title":"shiptalk","link":"https:\/\/suriya.cc\/essays\/07_shiptalk\/","pubDate":"Sat, 15 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/07_shiptalk\/","description":"<p>Building a product goes something like this.<\/p>\n<p>You find a problem\n|\n|\nYou&rsquo;re annoyed enough by it\n|\n|\nYou decide you&rsquo;ll bring an end to the problem\n|\n|\nYou toil over the problem so that it gets solved for everyone\n|\n|\nIt becomes a great product.<\/p>"},{"title":"vscode","link":"https:\/\/suriya.cc\/tech\/tinkering\/vscode\/","pubDate":"Sat, 15 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/vscode\/","description":"<h2 id=\"why-switch-from-intellij\">why switch from intellij<\/h2>\n<p>Intellij was my most common IDE but I&rsquo;m so tired of having to be a second citizen for every single plugin. Intellij needs to do a huge platform shift and become more open or be consumed by vscode. The amount of people who start with vscode is insane.<\/p>"},{"title":"karpathy micrograd","link":"https:\/\/suriya.cc\/til\/08-02-2025\/","pubDate":"Sat, 08 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/til\/08-02-2025\/","description":"<p>Went through karpathy&rsquo;s incredible micrograd tutorial.<\/p>\n<p>His explanation and the code was incredibly intuitive.<\/p>\n<p>Autograd libraries build a network graph of a given equation with each operation being a node and then apply chain rule to find the local gradient. This is useful because it enables you to calculate back propagation easily as well as locally.<\/p>"},{"title":"motto","link":"https:\/\/suriya.cc\/motto\/","pubDate":"Fri, 07 Feb 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/motto\/","description":"<p>Be intense about the task.<\/p>\n<p>Don&rsquo;t lose focus on the bigger goal.<\/p>\n<p>Be Fine with being uncomfortable.<\/p>\n<p>All good things take time.<\/p>"},{"title":"Secret of Secrets","link":"https:\/\/suriya.cc\/books\/secrets\/","pubDate":"Sat, 25 Jan 2025 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/secrets\/","description":"<p>dan brown books are special because &ldquo;lost symbol&rdquo; book release was how my wife and i started talking back in high school. so dan brown book releases hold a special place in our hearts. this book is even more special because my wife and i were in new york on the day of the book release and met dan brown at the barnes and nobles in union square, when we are expecting a baby. such a special moment for us.<\/p>"},{"title":"websites that are interesting","link":"https:\/\/suriya.cc\/tech\/websites\/","pubDate":"Tue, 17 Dec 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/websites\/","description":"<h2 id=\"tools\">tools<\/h2>\n<p><a href=\"https:\/\/linkpreview.xyz\/\">https:\/\/linkpreview.xyz\/<\/a>\n<\/p>\n<h2 id=\"weirdnesss\">weirdnesss<\/h2>\n<p><a href=\"https:\/\/cult-escape.com\/cult-test\/\">https:\/\/cult-escape.com\/cult-test\/<\/a>\n\nA site to check if you are in a cult<\/p>\n<p>Site <a href=\"https:\/\/www.languagetransfer.org\/\">https:\/\/www.languagetransfer.org\/<\/a>\n<\/p>\n<p><a href=\"https:\/\/www.window-swap.com\/\">https:\/\/www.window-swap.com\/<\/a>\n<\/p>\n<h3 id=\"games-in-arcane-places\">games in arcane places<\/h3>\n<ul>\n<li><a href=\"https:\/\/eieio.games\/nonsense\/game-11-flappy-bird-finder\/\">https:\/\/eieio.games\/nonsense\/game-11-flappy-bird-finder\/<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.coderelay.io\/fontemon.html\">https:\/\/www.coderelay.io\/fontemon.html<\/a>\n<\/li>\n<li><a href=\"https:\/\/messenger.abeto.co\/\">https:\/\/messenger.abeto.co\/<\/a>\n<\/li>\n<\/ul>\n<h3 id=\"interesting-design-websites\">interesting design websites<\/h3>\n<ul>\n<li><a href=\"https:\/\/iradesign.io\/gallery\/illustrations\">Really good design stuff<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.framer.com\/\">https:\/\/www.framer.com\/<\/a>\n<\/li>\n<li><a href=\"https:\/\/spline.design\/\">https:\/\/spline.design\/<\/a>\n<\/li>\n<li><a href=\"https:\/\/2019.makemepulse.com\/\">https:\/\/2019.makemepulse.com\/<\/a>\n<\/li>\n<li><a href=\"https:\/\/fffuel.co\/\">JS Design generation<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.humaaans.com\/\">Corporate Memphis Humaaans for every situation<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"programming-weirdness\">programming weirdness<\/h2>\n<ul>\n<li><a href=\"https:\/\/k8s.af\/\">https:\/\/k8s.af\/<\/a>\n<\/li>\n<li><a href=\"https:\/\/research.wmz.ninja\/projects\/phd\/index.html\">https:\/\/research.wmz.ninja\/projects\/phd\/index.html<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"ml\">ml<\/h2>\n<ul>\n<li>LLM visualization, <a href=\"https:\/\/bbycroft.net\/llm\">https:\/\/bbycroft.net\/llm<\/a>\n<\/li>\n<li>Model visualizer, <a href=\"https:\/\/netron.app\/\">https:\/\/netron.app\/<\/a>\n<\/li>\n<li><a href=\"https:\/\/chat.lmsys.org\/\">https:\/\/chat.lmsys.org\/<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"scholarly-links\">scholarly links<\/h2>\n<ul>\n<li><a href=\"http:\/\/www.wikicfp.com\">http:\/\/www.wikicfp.com<\/a>\n<\/li>\n<\/ul>"},{"title":"product building and fundamentals","link":"https:\/\/suriya.cc\/essays\/product\/","pubDate":"Tue, 10 Dec 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/product\/","description":"<p>Just like any other tech-pilled software engineer. I&rsquo;ve spent my free hours and days working on side projects in the hope that someday to live Independent to the corporate day job and working on something I own full time.<\/p>"},{"title":"why i build.","link":"https:\/\/suriya.cc\/essays\/why-i-build\/","pubDate":"Tue, 26 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/why-i-build\/","description":"<p>I&rsquo;ve spent all my free time building arcane projects that don&rsquo;t matter.<\/p>\n<p>Despite being tired, or stressed from my day job. I&rsquo;ve always had projects that consume all my free time.<\/p>"},{"title":"suriya's newsletter","link":"https:\/\/suriya.cc\/newsletter\/","pubDate":"Sun, 24 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/newsletter\/","description":{}},{"title":"do not go gentle into that good night","link":"https:\/\/suriya.cc\/poems\/dont-gentle\/","pubDate":"Fri, 15 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/poems\/dont-gentle\/","description":"<p>Do not go gentle into that good night,<br>\nOld age should burn and rave at close of day;<br>\nRage, rage against the dying of the light.<\/p>"},{"title":"if","link":"https:\/\/suriya.cc\/poems\/if\/","pubDate":"Fri, 15 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/poems\/if\/","description":"<pre>\nIf you can keep your head when all about you\n Are losing theirs and blaming it on you, \nIf you can trust yourself when all men doubt you,\n But make allowance for their doubting too; \nIf you can wait and not be tired by waiting,\n Or being lied about, don\u2019t deal in lies,\nOr being hated, don\u2019t give way to hating,\n And yet don\u2019t look too good, nor talk too wise:\n\nIf you can dream\u2014and not make dreams your master; \n If you can think\u2014and not make thoughts your aim; \nIf you can meet with Triumph and Disaster\n And treat those two impostors just the same; \nIf you can bear to hear the truth you\u2019ve spoken\n Twisted by knaves to make a trap for fools,\nOr watch the things you gave your life to, broken,\n And stoop and build \u2019em up with worn-out tools:\n\nIf you can make one heap of all your winnings\n And risk it on one turn of pitch-and-toss,\nAnd lose, and start again at your beginnings\n And never breathe a word about your loss;\nIf you can force your heart and nerve and sinew\n To serve your turn long after they are gone, \nAnd so hold on when there is nothing in you\n Except the Will which says to them: \u2018Hold on!\u2019\n\nIf you can talk with crowds and keep your virtue, \n Or walk with Kings\u2014nor lose the common touch,\nIf neither foes nor loving friends can hurt you,\n If all men count with you, but none too much;\nIf you can fill the unforgiving minute\n With sixty seconds\u2019 worth of distance run, \nYours is the Earth and everything that\u2019s in it, \n And\u2014which is more\u2014you\u2019ll be a Man, my son!\n<\/pre>"},{"title":"still i rise","link":"https:\/\/suriya.cc\/poems\/still-i-rise\/","pubDate":"Fri, 15 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/poems\/still-i-rise\/","description":"<pre>\nYou may write me down in history\nWith your bitter, twisted lies,\nYou may trod me in the very dirt\nBut still, like dust, I'll rise.\n\n\nDoes my sassiness upset you?\nWhy are you beset with gloom?\n\u2019Cause I walk like I've got oil wells\nPumping in my living room.\n\n\nJust like moons and like suns,\nWith the certainty of tides,\nJust like hopes springing high,\nStill I'll rise.\n\n\nDid you want to see me broken?\nBowed head and lowered eyes?\nShoulders falling down like teardrops,\nWeakened by my soulful cries?\n\n\nDoes my haughtiness offend you?\nDon't you take it awful hard\n\u2019Cause I laugh like I've got gold mines\nDiggin\u2019 in my own backyard.\n\n\nYou may shoot me with your words,\nYou may cut me with your eyes,\nYou may kill me with your hatefulness,\nBut still, like air, I\u2019ll rise.\n\n\nDoes my sexiness upset you?\nDoes it come as a surprise\nThat I dance like I've got diamonds\nAt the meeting of my thighs?\n\nOut of the huts of history\u2019s shame\nI rise\nUp from a past that\u2019s rooted in pain\nI rise\nI'm a black ocean, leaping and wide,\nWelling and swelling I bear in the tide.\n\nLeaving behind nights of terror and fear\nI rise\nInto a daybreak that\u2019s wondrously clear\nI rise\nBringing the gifts that my ancestors gave,\nI am the dream and the hope of the slave.\nI rise\nI rise\nI rise.\n<\/pre>"},{"title":"poetry","link":"https:\/\/suriya.cc\/tech\/tinkering\/poetry\/","pubDate":"Thu, 14 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/poetry\/","description":"<p>Python package management is a nightmare. Poetry somewhat solves it.<\/p>\n<h2 id=\"new-project\">new project<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>poetry new &lt;project_name&gt;\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"new-shell\">new shell<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>poetry shell\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"setting-up\">setting up<\/h2>\n<p>pipx first<\/p>"},{"title":"the practice","link":"https:\/\/suriya.cc\/books\/the_practice\/","pubDate":"Wed, 06 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/the_practice\/","description":"<blockquote>\n<p><strong>Shipping<\/strong>, because it doesn&rsquo;t count if you don&rsquo;t share it.<\/p>\n<p><strong>Creative<\/strong>, because you&rsquo;re not a cog in a system<\/p>\n<p><strong>Work<\/strong>, because it is not a hobby.<\/p>"},{"title":"writing","link":"https:\/\/suriya.cc\/essays\/effective_writing\/","pubDate":"Tue, 05 Nov 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/effective_writing\/","description":"<p>I write a lot. and I forget a lot.<\/p>\n<p>Taking a lot of notes is part of how I stay sane and get even part of the things that I want to get done.<\/p>"},{"title":"madurai","link":"https:\/\/suriya.cc\/travel\/madurai\/","pubDate":"Fri, 25 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/travel\/madurai\/","description":"<p>I lived in Madurai till my first grade. So It&rsquo;s a really nostalgic town for me.\nMadurai is a city with a rich 700 years of heritage, and is built around the Meenakshi temple and it&rsquo;s lore.<\/p>"},{"title":"newsletters and blogs that are interesting","link":"https:\/\/suriya.cc\/general\/awesome-newsletters\/","pubDate":"Wed, 16 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/awesome-newsletters\/","description":"<h3 id=\"pg\"><a href=\"https:\/\/paulgraham.com\/articles.html\">pg&rsquo;s essays<\/a>\n<\/h3>\n<ul>\n<li>Incredibly interesting if you are into the startup world and are generally curious about how the world operates.<\/li>\n<li>I highly recommend <a href=\"https:\/\/paulgraham.com\/submarine.html\">The Submarine<\/a>\n and <a href=\"https:\/\/paulgraham.com\/genius.html\">The Bus Ticket Theory of Genius<\/a>\n<\/li>\n<\/ul>\n<h3 id=\"joel-spolsky\"><a href=\"https:\/\/www.joelonsoftware.com\/\">joel spolsky&rsquo;s blog<\/a>\n<\/h3>\n<ul>\n<li>Joel&rsquo;s Essays are super good.<\/li>\n<li>I suggest people start with <a href=\"https:\/\/www.joelonsoftware.com\/2000\/05\/12\/strategy-letter-i-ben-and-jerrys-vs-amazon\/\">Strategy Letter 1<\/a>\n, 2 and 3<\/li>\n<\/ul>\n<h3 id=\"hardcore-software---steven-sinofsky\"><a href=\"https:\/\/hardcoresoftware.learningbyshipping.com\/\">hardcore software - steven sinofsky<\/a>\n<\/h3>\n<ul>\n<li>Steven writes, incredibly well thought essays on software and related things<\/li>\n<li>I was very engrossed with his launching windows series<\/li>\n<\/ul>\n<h3 id=\"ribbon-farm---venkatesh-rao\"><a href=\"https:\/\/ribbonfarm.com\/\">ribbon farm - venkatesh rao<\/a>\n<\/h3>\n<ul>\n<li>Venkatesh Rao Writes really long, deep essays.<\/li>\n<li>I started with <a href=\"https:\/\/www.ribbonfarm.com\/2009\/10\/07\/the-gervais-principle-or-the-office-according-to-the-office\/\">The Gervais Principle, or The Office According to &ldquo;The Office&rdquo;<\/a>\n. Set aside a couple of hours before you start reading this. because it is really long and incredibly engrossing.<\/li>\n<\/ul>\n<h3 id=\"sriram-krishnan\"><a href=\"https:\/\/sriramk.com\/\">sriram krishnan<\/a>\n<\/h3>\n<ul>\n<li>I stumbled upon Sriram Krishnan&rsquo;s blog by reading his <a href=\"https:\/\/sriramk.com\/memos.html\">memo collection<\/a>\n. Took me a day to go through all the memo in his blog. Wish I was taking notes this rigorously back then<\/li>\n<li>I liked the recent <a href=\"https:\/\/sriramk.com\/group-chats-rule-the-world\">group chat<\/a>\n one as well<\/li>\n<\/ul>\n<h3 id=\"nabeel-qureshi\"><a href=\"https:\/\/nabeelqu.substack.com\/\">nabeel qureshi<\/a>\n<\/h3>\n<ul>\n<li>I signed up right after reading <a href=\"https:\/\/nabeelqu.substack.com\/p\/reflections-on-palantir\">Reflections on Palantir<\/a>\n. Spent a good 4 hours just reading random stuff<\/li>\n<\/ul>\n<h3 id=\"shyam-sankar\"><a href=\"https:\/\/www.shyamsankar.com\/\">shyam sankar<\/a>\n<\/h3>\n<ul>\n<li>Palantir&rsquo;s CTO, writes very poignant essays which I really enjoy<\/li>\n<li>I really loved <a href=\"https:\/\/www.shyamsankar.com\/p\/the-case-against-work-life-balance\">The Case Against Work Life Balance<\/a>\n<\/li>\n<\/ul>\n<h3 id=\"thinking-about-things\"><a href=\"https:\/\/thinking-about-things.com\/\">thinking about things<\/a>\n<\/h3>\n<ul>\n<li>Really high quality articles, every alternative day.<\/li>\n<li>This used to be the only sponsored Newsletter I signed up for. Highly Highly recommend<\/li>\n<\/ul>\n<h3 id=\"internal-tech-emails\"><a href=\"https:\/\/www.techemails.com\/\">internal tech emails <\/a>\n<\/h3>\n<ul>\n<li>Internal Tech Emails tingles my gossip brain a lot. ngl, it has provided me with some of the most intricate scoops when talking with people.<\/li>\n<\/ul>\n<h3 id=\"work-chronicles\"><a href=\"https:\/\/workchronicles.substack.com\/\">work chronicles<\/a>\n<\/h3>\n<ul>\n<li>Fun thing that I read almost everyday.<\/li>\n<li>Really love the dedication from the artist<\/li>\n<\/ul>"},{"title":"organizational wisdom","link":"https:\/\/suriya.cc\/essays\/organizational\/","pubDate":"Wed, 16 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/organizational\/","description":"<p>What started with <a href=\"https:\/\/nabeelqu.substack.com\/p\/reflections-on-palantir\">Nabeel Qureshi&rsquo;s Reflections on Palantir<\/a>\n led me into an incredibly deep and rich rabbit hole of companies, intensity, operating them and, a whole host of new (to me) industry operators within the palantir circles such as, <a href=\"https:\/\/marginalrevolution.com\/marginalrevolution\/2022\/02\/context-is-that-which-is-scarce-2.html\">Tyler Cowen<\/a>\n, <a href=\"https:\/\/www.shyamsankar.com\/\">Shyam Sankar<\/a>\n, etc.<\/p>"},{"title":"pittsburgh","link":"https:\/\/suriya.cc\/travel\/pittsburgh\/","pubDate":"Wed, 16 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/travel\/pittsburgh\/","description":"<p>Pittsburgh has the quaint old town vibe with its own special antiquated ecosystems. It definitely has the feeling of a once flourising industrial town, now in its midlife crisis trying to find it&rsquo;s place in the world.\nI stayed in Pittsburgh from Aug 2023 - Dec 2024. Made really close friends here.<\/p>"},{"title":"prime number library for rust","link":"https:\/\/suriya.cc\/tech\/algos\/prime\/","pubDate":"Wed, 16 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/prime\/","description":"<p><a href=\"https:\/\/docs.rs\/primes\/latest\/primes\/\">primes<\/a>\n does not handle numbers &gt; 1000<\/p>\n<p>We need a nice cli that is able to take in arbitrary sized numbers and just chug away.<\/p>"},{"title":"awesome incubators\/collectives for startups","link":"https:\/\/suriya.cc\/general\/awesome-incubators\/","pubDate":"Tue, 15 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/awesome-incubators\/","description":"<h3 id=\"socratics\">socratics<\/h3>\n<p>website: <a href=\"https:\/\/socratica.info\">https:\/\/socratica.info<\/a>\n\ntwitter: <a href=\"https:\/\/x.com\/socraticainfo\">https:\/\/x.com\/socraticainfo<\/a>\n<\/p>\n<p>Open collective for builders, present in Multiple cities in the US and Canada. Really cool demos from their hackathon<\/p>"},{"title":"photogrammetry\/videogrammetry or the dark art of capturing 2d and generating 3d models","link":"https:\/\/suriya.cc\/tech\/ML\/photogrammetry\/","pubDate":"Fri, 11 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/photogrammetry\/","description":"<h1 id=\"capturing\">capturing<\/h1>\n<h2 id=\"questions\">questions:<\/h2>\n<p>Is it possible to go from, photo\/video to high fidelity 3d model, with strong support for texture, without losing a lot of details on noise?<\/p>"},{"title":"leaky abstractions, or how we understand the world","link":"https:\/\/suriya.cc\/essays\/leaky_abstractions\/","pubDate":"Wed, 02 Oct 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/leaky_abstractions\/","description":"<p>Languages are a lossy communication framework. You meant one thing, but your friend understood something else. The same words don&rsquo;t mean the same thing even a few hundred miles apart, etc. It is wildly unfair to try and represent billions of neurons firing together, in sound waves only a few amplitudes higher or lower.<\/p>"},{"title":"inertia","link":"https:\/\/suriya.cc\/essays\/inertia\/","pubDate":"Thu, 12 Sep 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/inertia\/","description":"<p>Inertia is the best way to keep oneself active and consistent.\nAny sort of plan, trumps having intense velocity at the task.<\/p>"},{"title":"atlanta","link":"https:\/\/suriya.cc\/travel\/atlanta\/","pubDate":"Fri, 06 Sep 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/travel\/atlanta\/","description":"<p>Atlanta is what happens if you put too many white collars in the same space.\nDowntown was very immaculate and the roads were slick, not to mention wide.<\/p>"},{"title":"bangalore aka bengaluru","link":"https:\/\/suriya.cc\/travel\/bangalore\/","pubDate":"Fri, 06 Sep 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/travel\/bangalore\/","description":"<p>The earliest memory of Bangalore I remember is the LalBagh. And tangy Grilled chicken (For some odd reason).\nI was in awe of the city. The weather was perfect, the people were nice and the food was amazing.<\/p>"},{"title":"postmortem from building an ai speech coach","link":"https:\/\/suriya.cc\/essays\/speaksharp\/","pubDate":"Sun, 01 Sep 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/speaksharp\/","description":"<h1 id=\"the-problem\">the problem<\/h1>\n<p>International Students have a hard time understanding and integrating with the culture.\nThis is true even if there&rsquo;s a good grasp of the language.<\/p>"},{"title":"llms and unstructured data","link":"https:\/\/suriya.cc\/tech\/tinkering\/structure\/","pubDate":"Sat, 31 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/structure\/","description":"<p>Close on the heels of running a <a href=\"https:\/\/suriya.cc\/tech\/cloud\/batch_processing_llm\">batch processing job over 1M documents<\/a>\n, I was thinking about how LLMs are changing the way we process unstructured data.<\/p>"},{"title":"solutions vs feelings","link":"https:\/\/suriya.cc\/essays\/solution_v_feelings\/","pubDate":"Sat, 31 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/solution_v_feelings\/","description":"<p>A friend of yours is going through a tough breakup.<\/p>\n<p>What should you do?<\/p>\n<p>I typically start offering solutions and ranting on and on about strategies to attack the problem.<\/p>"},{"title":"tell us about the time you most successfully hacked some (non-computer) system to your advantage","link":"https:\/\/suriya.cc\/essays\/hack\/","pubDate":"Tue, 20 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/hack\/","description":"<p>YC is looking for evidence that you are clever. The ability to think out of the box and manipulate large systems to your advantage are critical to gaining an edge on the market when you have no capital advantage (which is usually the case with startups) <a href=\"https:\/\/medium.com\/@zan2434\/y-combinator-applicant-advice-289c58a2ca89\">https:\/\/medium.com\/@zan2434\/y-combinator-applicant-advice-289c58a2ca89<\/a>\n<\/p>"},{"title":"unix","link":"https:\/\/suriya.cc\/tech\/cloud\/unix\/","pubDate":"Mon, 19 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/cloud\/unix\/","description":"<p>If you are on a unix-like environment, ports &lt; 1024 (like 80) will require superuser privileges.<\/p>\n<h2 id=\"disk-mounting-and-unmounting\">disk mounting and unmounting<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>sudo mount -o discard,defaults &lt;diskid&gt; &lt;dir&gt;\n<\/span><\/span><\/code><\/pre><\/div><p>you can get the disk id by<\/p>"},{"title":"zsh","link":"https:\/\/suriya.cc\/tech\/tinkering\/zshrc\/","pubDate":"Mon, 19 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/zshrc\/","description":"<h2 id=\"setting-up-new-zsh-with-oh-my-zsh\">setting up new zsh with oh my zsh<\/h2>\n<p>firs installing zsh involves<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>brew install zsh\n<\/span><\/span><\/code><\/pre><\/div><p>While I don&rsquo;t really trust and run randomly downloaded shell files. This one is quite painless.<\/p>"},{"title":"library of congress information","link":"https:\/\/suriya.cc\/tech\/tinkering\/loc\/","pubDate":"Sat, 17 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/loc\/","description":"<p>Library of Congress is really an incredible repository of content.\nJust scrolling through library of congress is a fascinating mental exercise.<\/p>"},{"title":"vim","link":"https:\/\/suriya.cc\/tech\/cloud\/vi\/","pubDate":"Thu, 15 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/cloud\/vi\/","description":"<p>Vim stuff that I usually use and generally forget<\/p>\n<p>clear file <code>gg<\/code> do go to top of file then, <code>dG<\/code> do delete till the end<\/p>"},{"title":"gossip glomers","link":"https:\/\/suriya.cc\/tech\/algos\/dist_systems\/gg\/","pubDate":"Thu, 08 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/dist_systems\/gg\/","description":"<p>I reused the functions provided at <a href=\"https:\/\/github.com\/jepsen-io\/maelstrom\/tree\/main\/demo\/go\">https:\/\/github.com\/jepsen-io\/maelstrom\/tree\/main\/demo\/go<\/a>\n\nfor interfaces.<\/p>\n<p>repo: <a href=\"https:\/\/github.com\/subygan\/gg\">https:\/\/github.com\/subygan\/gg<\/a>\n<\/p>\n<h2 id=\"1-echo\">1. echo<\/h2>\n<p>This was a gentle intro to maelstrom and it&rsquo;s tools. TBF the message passing using RPC was pretty interesting. Implementing the <code>read()<\/code> and <code>write()<\/code> functions and then handing it off to the maelstrom Node made it work.<\/p>"},{"title":"ml journal","link":"https:\/\/suriya.cc\/tech\/ML\/ML_diary\/","pubDate":"Thu, 08 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/ML_diary\/","description":"<h1 id=\"092723\">09.27.23<\/h1>\n<ul>\n<li>Tried ML model for face classification with,<\/li>\n<\/ul>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-python\" data-lang=\"python\"><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> self<span style=\"color:#f92672\">.<\/span>backbone <span style=\"color:#f92672\">=<\/span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Sequential(\n<\/span><\/span><span style=\"display:flex;\"><span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Conv2d(<span style=\"color:#ae81ff\">3<\/span>,<span style=\"color:#ae81ff\">64<\/span>,kernel_size<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">7<\/span>,stride<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">4<\/span>),\n<\/span><\/span><span style=\"display:flex;\"><span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Conv2d(<span style=\"color:#ae81ff\">64<\/span>,<span style=\"color:#ae81ff\">128<\/span>, kernel_size<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">3<\/span>, stride<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">2<\/span>),\n<\/span><\/span><span style=\"display:flex;\"><span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Conv2d(<span style=\"color:#ae81ff\">128<\/span>,<span style=\"color:#ae81ff\">256<\/span>,kernel_size<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">3<\/span>, stride<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">2<\/span>),\n<\/span><\/span><span style=\"display:flex;\"><span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Conv2d(<span style=\"color:#ae81ff\">256<\/span>, <span style=\"color:#ae81ff\">512<\/span>,kernel_size<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">3<\/span>, stride<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">2<\/span>),\n<\/span><\/span><span style=\"display:flex;\"><span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Conv2d(<span style=\"color:#ae81ff\">512<\/span>, <span style=\"color:#ae81ff\">1024<\/span>,kernel_size<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">3<\/span>, stride<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">2<\/span>),\n<\/span><\/span><span style=\"display:flex;\"><span> )\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> self<span style=\"color:#f92672\">.<\/span>cls_layer <span style=\"color:#f92672\">=<\/span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Sequential(\n<\/span><\/span><span style=\"display:flex;\"><span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Flatten(),\n<\/span><\/span><span style=\"display:flex;\"><span> torch<span style=\"color:#f92672\">.<\/span>nn<span style=\"color:#f92672\">.<\/span>Linear( <span style=\"color:#ae81ff\">4096<\/span>,num_classes),\n<\/span><\/span><span style=\"display:flex;\"><span> )\n<\/span><\/span><\/code><\/pre><\/div><p>This model overfit spectacularly, training accuracy after 20 epochs was 95% validation accuracy was 15%. \ud83e\udd2f<\/p>"},{"title":"terminal","link":"https:\/\/suriya.cc\/tech\/tinkering\/terminal\/","pubDate":"Thu, 08 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/terminal\/","description":"<p><strong>Raw mode<\/strong> in a terminal is receiving the raw bytes from the <code>STDIN<\/code> file.\nterminal usually gets opened in <strong>canonical mode<\/strong> which means input is fed to the program one line at a time, instead of character by character. This can be done by unsetting the <code>ICANON<\/code> flag. There are a lot of these <em>bitflags<\/em><\/p>"},{"title":"right to be forgotten","link":"https:\/\/suriya.cc\/tech\/privacy\/right_to_forget\/","pubDate":"Tue, 06 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/right_to_forget\/","description":"<p>This is a (mostly) search engine specific requirement where individuals are protected from the harm of their past actions.<\/p>\n<h2 id=\"disparity-in-countries\">disparity in countries<\/h2>\n<p>Similar to any privacy issue, these countries are divided in the way these laws are implemented. Especially between developed countries such as United States and the European Union.<\/p>"},{"title":"word embedding models","link":"https:\/\/suriya.cc\/tech\/ML\/word2vec\/","pubDate":"Sun, 04 Aug 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/word2vec\/","description":"<p><strong>My aim for this blog was to keep it as not too technical as possible.<\/strong><\/p>\n<p>Word embeddings is a way to represent words as a vector.\nWhich lets us do all kinds of trickery like how far a word like &ldquo;King&rdquo; is away from &ldquo;Queen&rdquo; and how they are related to each other with.\nVery useful when building applications with semantic understanding.<\/p>"},{"title":"read the docs","link":"https:\/\/suriya.cc\/tech\/tinkering\/read_docs\/","pubDate":"Tue, 23 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/read_docs\/","description":"<p>Failing to read the documentation and understanding the code underneath is the bane of all software bugs and I&rsquo;ve guilty of it on multiple counts<\/p>"},{"title":"shell hacks","link":"https:\/\/suriya.cc\/tech\/tinkering\/shell\/","pubDate":"Tue, 23 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/shell\/","description":"<h2 id=\"number-of-lines-in-a-file\">number of lines in a file<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-sh\" data-lang=\"sh\"><span style=\"display:flex;\"><span>wc -l file.txt\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"split-file-into-multiple-files\">split file into multiple files<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-sh\" data-lang=\"sh\"><span style=\"display:flex;\"><span>split -l <span style=\"color:#ae81ff\">1000<\/span> file.txt\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"append-two-files-into-one\">append two files into one<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-sh\" data-lang=\"sh\"><span style=\"display:flex;\"><span>cat file1.txt file2.txt &gt; file3.txt\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"find-pid-of-port\">find pid of port<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-sh\" data-lang=\"sh\"><span style=\"display:flex;\"><span>sudo lsof -i :&lt;portnumber&gt;\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"privacy problems and attacks in machine learning","link":"https:\/\/suriya.cc\/tech\/privacy\/privacy_ml\/","pubDate":"Fri, 19 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/privacy_ml\/","description":"<h2 id=\"privacy-problems-and-attacks-in-machine-learning\">privacy problems and attacks in machine learning<\/h2>\n<ul>\n<li><strong>Membership inference attacks<\/strong>: These aim to determine if a particular data point was used to train a model. Researchers study how to detect and mitigate such attacks to protect individuals&rsquo; privacy.<\/li>\n<li><strong>Model inversion attacks<\/strong>: These attempt to reconstruct training data from model outputs. Understanding these vulnerabilities helps in developing more robust privacy-preserving techniques.<\/li>\n<li><strong>Data reconstruction in federated learning<\/strong>: This examines how malicious participants could potentially extract private information from other participants during collaborative training.<\/li>\n<li><strong>Model extraction attacks<\/strong>: These involve extracting a model&rsquo;s architecture or parameters, which could be used to launch further attacks or to steal intellectual property.<\/li>\n<li><strong>Data Poisoning in Edge ML<\/strong>: This is a problem where the data that is being used to train the model is poisoned by an attacker. This is a huge problem in edge ML where the data is not curated and is coming from a variety of sources.<\/li>\n<li><strong>Differential privacy techniques<\/strong>: Researchers explore how to add controlled noise to data or model outputs to preserve privacy while maintaining utility.<\/li>\n<li><strong>Secure multi-party computation<\/strong>: This involves developing protocols for multiple parties to jointly compute on private data without revealing individual inputs.\nHomomorphic encryption: This allows computations on encrypted data, potentially enabling privacy-preserving machine learning on sensitive information.\nPrivacy-preserving record linkage: Techniques to securely combine datasets from multiple sources without compromising individual privacy.<\/li>\n<\/ul>\n<h2 id=\"papers-and-other-readings\">papers and other readings<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.cs.cornell.edu\/~shmat\/shmat_oak18.pdf\">Membership Inference Attacks Against Machine Learning Models<\/a>\n<\/p>"},{"title":"my stack","link":"https:\/\/suriya.cc\/tech\/cloud\/my_stack\/","pubDate":"Mon, 15 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/cloud\/my_stack\/","description":"<p>I used to deploy everything in an ec2 instance with docker-compose and nginx. Keeps it clean to apply small updates and also take backups. Where I&rsquo;ll run different postgres containers for different containers, with some volume mapping and a backup container that triggers a backup push.<\/p>"},{"title":"batch processing llm inference","link":"https:\/\/suriya.cc\/tech\/cloud\/batch_processing_llm\/","pubDate":"Sun, 14 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/cloud\/batch_processing_llm\/","description":"<p>I experimented with a lot of models, and as advertised claude3-haiku gave the best results, in terms of quality and cost. At the time of writing 1K input tokens cost $0.00025. Which is mind blowingly cheap, because the next best model was about 8 times costlier not to mention gpt 4o which was about 20 times costlier.<\/p>"},{"title":"git lfs","link":"https:\/\/suriya.cc\/tech\/tinkering\/git\/","pubDate":"Thu, 11 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/git\/","description":"<h2 id=\"global-gitignore\">global gitignore<\/h2>\n<p>I&rsquo;m surprised I only came to know on 2024 that you can have a global gitignore<\/p>\n<p>you can just put this inside <code>~\/.gitignore<\/code><\/p>"},{"title":"sprites.dev","link":"https:\/\/suriya.cc\/tech\/tinkering\/sprites\/","pubDate":"Thu, 11 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/sprites\/","description":"<p>I like to have a standard work environment that I can have multiple zellij is important, installing it with,<\/p>\n<p><code>cargo install zellij<\/code><\/p>"},{"title":"gccissues","link":"https:\/\/suriya.cc\/tech\/bugs\/gcc\/","pubDate":"Sun, 07 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/bugs\/gcc\/","description":"<p>A simple way to include all available libraries in cpp in most OSs is to just add <code>#include &lt;bits\/stdc++.h&gt;<\/code>.\nThis is generall good practice as it includes all the libraries and increases the compilation time.<\/p>"},{"title":"chapter 1 exercises","link":"https:\/\/suriya.cc\/tech\/algos\/problems\/cp4\/00_ch1_ex\/","pubDate":"Sat, 06 Jul 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/problems\/cp4\/00_ch1_ex\/","description":"<h3 id=\"exercise-111\">exercise 1.1.1<\/h3>\n<p>Counter example: <code>{0,0},{0,-1},{0,-2},{0,4},{0,-4},{4,4}<\/code>\nGreedy value: 6 + 1 + 4 = 11\nCorrect value: 4 + 4 + 1 = 9<\/p>"},{"title":"coffee","link":"https:\/\/suriya.cc\/food\/coffee\/","pubDate":"Sat, 22 Jun 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/food\/coffee\/","description":"<p>I&rsquo;ve been getting <del>into<\/del> addicted to Coffee since last year. Currently, I&rsquo;m at 4 shots of espresso per day right now.<\/p>"},{"title":"dune","link":"https:\/\/suriya.cc\/books\/dune\/","pubDate":"Sat, 22 Jun 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/dune\/","description":"<p>Dune was such a surprising read for me. I got interested in it after the movies, and I was blown away by the storyline.<\/p>"},{"title":"dune - the messiah","link":"https:\/\/suriya.cc\/books\/dune_messiah\/","pubDate":"Sat, 22 Jun 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/dune_messiah\/","description":"<p>The growth of Paul into a sort of Genghis Khan style oppressive ruler was interesting.<\/p>\n<p><strong>Most times rulers are prisoners to their subjects as much as the subjects are to them<\/strong>\nPaul being helpless to control his army conquering and killing innocent people was interesting. It showed shades similar to the vikings&rsquo; Ragnar Story. There is requirement for the ruler to die for the hoarde to be controlled in some sense. I had a hunch that, Paul would die as a partially unloved dictator.<\/p>"},{"title":"a backend engineer writes frontend","link":"https:\/\/suriya.cc\/tech\/bugs\/frontend\/","pubDate":"Mon, 06 May 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/bugs\/frontend\/","description":"<p>My friend Limin and I, were playing around with some LLM agents and realized that these agents could be a very good way to learn a language as they have a much better grip on the language and are able to provide great feedbacks.<\/p>"},{"title":"streaming diarizer","link":"https:\/\/suriya.cc\/tech\/ML\/streaming_diarizer\/","pubDate":"Sat, 20 Apr 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/streaming_diarizer\/","description":"<p><a href=\"https:\/\/github.com\/subygan\/SpeechStream\">repo<\/a>\n<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/NVIDIA\/NeMo\/blob\/main\/tutorials\/speaker_tasks\/Speaker_Diarization_Training.ipynb\">Nemo Speaker diarization training<\/a>\n<\/li>\n<li><a href=\"https:\/\/github.com\/NVIDIA\/NeMo\/blob\/main\/tutorials\/tools\/Multispeaker_Simulator.ipynb\">MultiSpeaker Simulation<\/a>\n<\/li>\n<\/ul>\n<h3 id=\"data-sets\">data sets<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.openslr.org\/12\">LibriSpeech<\/a>\n<\/li>\n<li><a href=\"https:\/\/github.com\/joonson\/voxconverse\">VoxConverse<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"resources\">resources<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/ufal\/whisper_streaming\">Whisper Streaming<\/a>\n<\/li>\n<li><a href=\"https:\/\/ieeexplore.ieee.org\/abstract\/document\/10446050\">Diarist<\/a>\n<\/li>\n<\/ul>"},{"title":"allegory of the cave","link":"https:\/\/suriya.cc\/books\/allegory_of_the_cave\/","pubDate":"Mon, 01 Apr 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/allegory_of_the_cave\/","description":"<p><a href=\"https:\/\/scholar.harvard.edu\/files\/seyer\/files\/plato_republic_514b-518d_allegory-of-the-cave.pdf\">material<\/a>\n<\/p>\n<p>Usually reading translated text is a little confusing, because I feel like I&rsquo;m hearing the translator&rsquo;s voice instead of the author&rsquo;s voice, or in this case Plato.\nAnd this gets doubly confusion when the author is from 429 B.C.E.<\/p>"},{"title":"llm code generation notes","link":"https:\/\/suriya.cc\/tech\/ML\/code_llm\/","pubDate":"Tue, 19 Mar 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/code_llm\/","description":"<p>This is going to be binary analysis with LLM type thing\nThe idea is to see, if LLMs are able to understand the &ldquo;language&rdquo; of binaries and are able to retrieve the underlying vulnerability.<\/p>"},{"title":"wav file shenanigans","link":"https:\/\/suriya.cc\/tech\/bugs\/wav_file\/","pubDate":"Tue, 19 Mar 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/bugs\/wav_file\/","description":"<p>Reading input from users is difficult.\nI faced this issue with<\/p>\n<p>Python&rsquo;s default <code>wave<\/code> library throws this error on specific wave file.<\/p>"},{"title":"flutter gimmicks","link":"https:\/\/suriya.cc\/tech\/practice\/flutter\/flutter_gimmicks\/","pubDate":"Fri, 08 Mar 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/flutter\/flutter_gimmicks\/","description":"<p>Flutter comes with super complex build system that ties in all the language runtimes with dart and the native rendering engine. So, naturally there is a tradeoff between having to build all these things and being slow or reusing builds and being fast but occassionally wrong.\nFlutter I think, errs on the latter. So, most times when you feel like flutter is not doing something you think it should be doing, it is because the build got messed up.<\/p>"},{"title":"federated learning","link":"https:\/\/suriya.cc\/tech\/ML\/federated_learning\/","pubDate":"Sun, 03 Mar 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/federated_learning\/","description":{}},{"title":"rust cheatsheet","link":"https:\/\/suriya.cc\/tech\/practice\/rust\/cheatsheet\/","pubDate":"Wed, 28 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/rust\/cheatsheet\/","description":"<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-rust\" data-lang=\"rust\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">let<\/span> x; <span style=\"color:#75715e\">\/\/ declare &#34;x&#34;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>x <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">42<\/span>; <span style=\"color:#75715e\">\/\/ assign 42 to &#34;x&#34;, type is inferred\n<\/span><\/span><\/span><\/code><\/pre><\/div><p>or<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-rust\" data-lang=\"rust\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">let<\/span> x <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">42<\/span> <span style=\"color:#75715e\">\/\/assigns variable\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">let<\/span> x: <span style=\"color:#66d9ef\">i32<\/span>; <span style=\"color:#75715e\">\/\/declaring variable &#34;x&#34; of 32 bit integer\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>foobar(x); <span style=\"color:#75715e\">\/\/uninitialised variable assignment\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>x <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">52<\/span>; <span style=\"color:#75715e\">\/\/ assigning 52\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>foobar(x); <span style=\"color:#75715e\">\/\/x will be called\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>x <span style=\"color:#f92672\">=<\/span> x <span style=\"color:#f92672\">+<\/span> <span style=\"color:#ae81ff\">12<\/span>; <span style=\"color:#75715e\">\/\/ x = 64 now\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">let<\/span> _ <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">42<\/span>; <span style=\"color:#75715e\">\/\/ does nothing, since 42 is a constant and _ is a placeholder\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">let<\/span> _ <span style=\"color:#f92672\">=<\/span> get_function(); <span style=\"color:#75715e\">\/\/calls function and throws away the result\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">let<\/span> _x <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">42<\/span>; <span style=\"color:#75715e\">\/\/compiler wont warn about unused variable\n<\/span><\/span><\/span><\/code><\/pre><\/div><p>Just like in all languages elements within objects can be called using a dot.<\/p>"},{"title":"aws","link":"https:\/\/suriya.cc\/tech\/cloud\/aws\/","pubDate":"Sun, 25 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/cloud\/aws\/","description":"<h3 id=\"amazon-linux\">amazon linux<\/h3>\n<p>Does not use <code>apt-get<\/code> and only uses yum.\nreplace all <code>apt-get<\/code> with yum<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>sudo systemctl enable docker.service\n<\/span><\/span><span style=\"display:flex;\"><span>sudo systemctl start docker.service\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":"different types of graphs i come across","link":"https:\/\/suriya.cc\/tech\/ML\/plots\/","pubDate":"Sun, 25 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/plots\/","description":"<h3 id=\"pandas\">pandas<\/h3>"},{"title":"pandas fight","link":"https:\/\/suriya.cc\/tech\/ML\/pandas\/","pubDate":"Sat, 24 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/pandas\/","description":"<p>When a column has NaN it is shown as float value in a column.\nneed to use <code>.fillna(&quot;&quot;)<\/code> to replace the <code>Nan<\/code> with empty string.<\/p>"},{"title":"graphs and llms","link":"https:\/\/suriya.cc\/tech\/ML\/graph_llm\/","pubDate":"Sun, 11 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/graph_llm\/","description":"<p>I&rsquo;ll add the ones with the most fun:utilization first<\/p>\n<h3 id=\"building-graphs-using-llms\">building graphs using llms:<\/h3>\n<p>This strategy comes clearly under the <strong>by LLMs<\/strong> category and the most obvious one as well. Because of their semantic understanding, LLMs can be prompted into providing the triplets of relationship between the entities in a piece of text. Throw a piece of text, and it draws a graph of the relationship between subjects and objects\nThis is a relatively straightforward utilization of an LLM&rsquo;s ability to find pattern in text.\neg. <a href=\"https:\/\/news.ycombinator.com\/item?id=34605772\">GraphGPT<\/a>\nw<\/p>"},{"title":"research papers","link":"https:\/\/suriya.cc\/tech\/ML\/papers\/","pubDate":"Fri, 09 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/papers\/","description":"<ul>\n<li>\n<p>aiaac, AI incidents database.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/arxiv.org\/pdf\/2311.17035.pdf\">Scalable Extraction of Traning Data from (Production) Language Models<\/a>\n<\/p>\n<ul>\n<li>Making LLMs repeat the same word over and over again makes them emit the training data 3.5X better<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"\/\/\">The pain of Building copilots<\/a>\n<\/p>"},{"title":"ml guardrails","link":"https:\/\/suriya.cc\/tech\/ML\/llm_guardrails\/","pubDate":"Tue, 06 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/llm_guardrails\/","description":"<p>The base premise is that, aligning the model for the goal that it was created for is a long tail problem and requires multiple guardrails to control it&rsquo;s output. Without this, the model could possibly go off the rails and create a lot of confusion.<\/p>"},{"title":"research ideas","link":"https:\/\/suriya.cc\/tech\/ML\/Research_ideas\/","pubDate":"Sun, 04 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/Research_ideas\/","description":"<h4 id=\"ai-guardrail-comparison\">ai guardrail comparison<\/h4>\n<ul>\n<li>There are multipel LLM guardrails, evaluating them would be something<\/li>\n<\/ul>\n<h4 id=\"privacy-detector-dataset-and-custom-model\">privacy detector dataset and custom model<\/h4>\n<ul>\n<li>There is no dataset to test a model for it&rsquo;s privacy Capabilities<\/li>\n<li>A custom model implementation that tests this information against an LLM would also be helpful\nw<\/li>\n<\/ul>"},{"title":"\u0baa\u0bc1\u0ba4\u0bbf\u0baf \u0b86\u0ba4\u0bcd\u0ba4\u0bbf\u0b9a\u0bc2\u0b9f\u0bbf","link":"https:\/\/suriya.cc\/poems\/puthiya\/","pubDate":"Sat, 03 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/poems\/puthiya\/","description":"<audio controls preload=\"auto\">\n <source src=\"https:\/\/suriya.cc\/assets\/audio\/pudhiya-aathichoodi.m4a\">\n<\/audio>\n<h3 id=\"\u0b89\u0baf\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0b89\u0baf\u0bbf\u0bb0\u0bcd \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>1. \u0b85\u0b9a\u0bcd\u0b9a\u0bae\u0bcd \u0ba4\u0bb5\u0bbf\u0bb0\u0bcd\n\n2. \u0b86\u0ba3\u0bcd\u0bae\u0bc8 \u0ba4\u0bb5\u0bb1\u0bc7\u0bb2\u0bcd \n\n3. \u0b87\u0bb3\u0bc8\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd \u0b87\u0b95\u0bb4\u0bcd\u0b9a\u0bcd\u0b9a\u0bbf \n\n4. \u0b88\u0b95\u0bc8 \u0ba4\u0bbf\u0bb1\u0ba9\u0bcd \n\n5. \u0b89\u0b9f\u0bb2\u0bbf\u0ba9\u0bc8 \u0b89\u0bb1\u0bc1\u0ba4\u0bbf\u0b9a\u0bc6\u0baf\u0bcd \n\n6. \u0b8a\u0ba3\u0bcd\u0bae\u0bbf\u0b95 \u0bb5\u0bbf\u0bb0\u0bc1\u0bae\u0bcd\u0baa\u0bc1 \n\n7. \u0b8e\u0ba3\u0bcd\u0ba3\u0bc1\u0bb5 \u0ba4\u0bc1\u0baf\u0bb0\u0bcd\u0bb5\u0bc1 \n\n8. \u0b8f\u0bb1\u0bc1\u0baa\u0bcb\u0bb2\u0bcd \u0ba8\u0b9f \n\n9. \u0b90\u0bae\u0bcd\u0baa\u0bca\u0bb1\u0bbf \u0b86\u0b9f\u0bcd\u0b9a\u0bbf\u0b95\u0bca\u0bb3\u0bcd \n\n10. \u0b92\u0bb1\u0bcd\u0bb1\u0bc1\u0bae\u0bc8 \u0bb5\u0bb2\u0bbf\u0bae\u0bc8\u0baf\u0bbe\u0bae\u0bcd \n\n11. \u0b93\u0baf\u0bcd\u0ba4 \u0bb2\u0bca\u0bb4\u0bbf \n\n12. \u0b92\u0bb3\u0b9f\u0ba4\u0b99\u0bcd \u0b95\u0bc1\u0bb1\u0bc8 \n<\/code><\/pre>\n<h3 id=\"\u0b95\u0b95\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0b95\u0b95\u0bb0 \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>13. \u0b95\u0bb1\u0bcd\u0bb1\u0ba4\u0bc1 \u0b92\u0bb4\u0bc1\u0b95\u0bc1\n\n14. \u0b95\u0bbe\u0bb2\u0bae\u0bcd \u0b85\u0bb4\u0bbf\u0baf\u0bc7\u0bb2\u0bcd\n\n15. \u0b95\u0bbf\u0bb3\u0bc8\u0baa\u0bb2 \u0ba4\u0bbe\u0b99\u0bcd\u0b95\u0bc7\u0bb2\u0bcd\n\n16. \u0b95\u0bc0\u0bb4\u0bcb\u0bb0\u0bcd\u0b95\u0bcd\u0b95\u0bc1 \u0b85\u0b9e\u0bcd\u0b9a\u0bc7\u0bb2\u0bcd\n\n17. \u0b95\u0bc1\u0ba9\u0bcd\u0bb1\u0bc6\u0ba9 \u0ba8\u0bbf\u0bae\u0bbf\u0bb0\u0bcd\u0ba8\u0bcd\u0ba4\u0bc1 \u0ba8\u0bbf\u0bb2\u0bcd\n\n18. \u0b95\u0bc2\u0b9f\u0bbf\u0ba4\u0bcd \u0ba4\u0bca\u0bb4\u0bbf\u0bb2\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\n\n19. \u0b95\u0bc6\u0b9f\u0bc1\u0baa\u0bcd\u0baa\u0ba4\u0bc1 \u0b9a\u0bcb\u0bb0\u0bcd\u0bb5\u0bc1\n\n20. \u0b95\u0bc7\u0b9f\u0bcd\u0b9f\u0bbf\u0bb2\u0bc1\u0bae\u0bcd \u0ba4\u0bc1\u0ba3\u0bbf\u0ba8\u0bcd\u0ba4\u0bc1 \u0ba8\u0bbf\u0bb2\u0bcd\n\n21. \u0b95\u0bc8\u0ba4\u0bcd\u0ba4\u0bca\u0bb4\u0bbf\u0bb2\u0bcd \u0baa\u0bcb\u0bb1\u0bcd\u0bb1\u0bc1\n\n22. \u0b95\u0bca\u0b9f\u0bc1\u0bae\u0bc8\u0baf\u0bc8 \u0b8e\u0ba4\u0bbf\u0bb0\u0bcd\u0ba4\u0bcd\u0ba4\u0bc1 \u0ba8\u0bbf\u0bb2\u0bcd\n\n23. \u0b95\u0bcb\u0bb2\u0bcd\u0b95\u0bc8\u0b95\u0bcd \u0b95\u0bca\u0ba3\u0bcd\u0b9f\u0bc1 \u0bb5\u0bbe\u0bb4\u0bcd\n\n24. \u0b95\u0bb5\u0bcd\u0bb5\u0bbf\u0baf\u0ba4\u0bc8 \u0bb5\u0bbf\u0b9f\u0bc7\u0bb2\u0bcd\n<\/code><\/pre>\n<h3 id=\"\u0b9a\u0b95\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0b9a\u0b95\u0bb0 \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>25. \u0b9a\u0bb0\u0bbf\u0ba4\u0bcd\u0ba4\u0bbf\u0bb0\u0ba4\u0bcd \u0ba4\u0bc7\u0bb0\u0bcd\u0b9a\u0bcd\u0b9a\u0bbf\u0b95\u0bca\u0bb3\u0bcd\n\n26. \u0b9a\u0bbe\u0bb5\u0ba4\u0bb1\u0bcd\u0b95\u0bc1 \u0b85\u0b9e\u0bcd\u0b9a\u0bc7\u0bb2\u0bcd\n\n27. \u0b9a\u0bbf\u0ba4\u0bc8\u0baf\u0bbe \u0ba8\u0bc6\u0b9e\u0bcd\u0b9a\u0bc1 \u0b95\u0bca\u0bb3\u0bcd\n\n28. \u0b9a\u0bc0\u0bb1\u0bc1\u0bb5\u0bcb\u0bb0\u0bcd\u0b9a\u0bcd \u0b9a\u0bc0\u0bb1\u0bc1\n\n29. \u0b9a\u0bc1\u0bae\u0bc8\u0baf\u0bbf\u0ba9\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0b87\u0bb3\u0bc8\u0ba4\u0bcd\u0ba4\u0bbf\u0b9f\u0bc7\u0bb2\u0bcd\n\n30. \u0b9a\u0bc2\u0bb0\u0bb0\u0bc8\u0baa\u0bcd \u0baa\u0bcb\u0bb1\u0bcd\u0bb1\u0bc1\n\n31. \u0b9a\u0bc6\u0baf\u0bcd\u0bb5\u0ba4\u0bc1 \u0ba4\u0bc1\u0ba3\u0bbf\u0ba8\u0bcd\u0ba4\u0bc1 \u0b9a\u0bc6\u0baf\u0bcd\n\n32. \u0b9a\u0bc7\u0bb0\u0bcd\u0b95\u0bcd\u0b95\u0bc8 \u0b85\u0bb4\u0bbf\u0baf\u0bc7\u0bb2\u0bcd\n\n33. \u0b9a\u0bc8\u0b95\u0bc8\u0baf\u0bbf\u0bb2\u0bcd \u0baa\u0bca\u0bb0\u0bc1\u0bb3\u0bc1\u0ba3\u0bb0\u0bcd\n\n34. \u0b9a\u0bca\u0bb2\u0bcd\u0bb5\u0ba4\u0bc1 \u0ba4\u0bc6\u0bb3\u0bbf\u0ba8\u0bcd\u0ba4\u0bc1 \u0b9a\u0bca\u0bb2\u0bcd\n\n35. \u0b9a\u0bcb\u0ba4\u0bbf\u0b9f\u0ba8\u0bcd\u0ba4\u0ba9\u0bc8 \u0b87\u0b95\u0bb4\u0bcd\n\n36. \u0b9a\u0bcc\u0bb0\u0bbf\u0baf\u0bae\u0bcd \u0ba4\u0bb5\u0bb1\u0bc7\u0bb2\u0bcd\n<\/code><\/pre>\n<h3 id=\"\u0b9e\u0b95\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0b9e\u0b95\u0bb0 \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>37. \u0b9e\u0bae\u0bb2\u0bbf\u0baa\u0bcb\u0bb2\u0bcd \u0bb5\u0bbe\u0bb4\u0bc7\u0bb2\u0bcd\n\n38. \u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1 \u0baa\u0bcb\u0bb1\u0bcd\u0bb1\u0bc1\n\n39. \u0b9e\u0bbf\u0bae\u0bbf\u0bb0\u0bc6\u0ba9 \u0b87\u0ba9\u0bcd\u0baa\u0bc1\u0bb1\u0bc1\n\n40. \u0b9e\u0bc6\u0b95\u0bbf\u0bb4\u0bcd\u0bb5\u0ba4\u0bc1 \u0b85\u0bb0\u0bc1\u0bb3\u0bbf\u0ba9\u0bcd\n\n41. \u0b9e\u0bc7\u0baf\u0bae\u0bcd \u0b95\u0bbe\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\n<\/code><\/pre>\n<h3 id=\"\u0ba4\u0b95\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0ba4\u0b95\u0bb0 \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>42. \u0ba4\u0ba9\u0bcd\u0bae\u0bc8 \u0b87\u0bb4\u0bb5\u0bc7\u0bb2\u0bcd\n\n43. \u0ba4\u0bbe\u0bb4\u0bcd\u0ba8\u0bcd\u0ba4\u0bc1 \u0ba8\u0b9f\u0bb5\u0bc7\u0bb2\u0bcd\n\n44. \u0ba4\u0bbf\u0bb0\u0bc1\u0bb5\u0bbf\u0ba9\u0bc8 \u0bb5\u0bc6\u0ba9\u0bcd\u0bb1\u0bc1 \u0bb5\u0bbe\u0bb4\u0bcd\n\n45. \u0ba4\u0bc0\u0baf\u0bcb\u0bb0\u0bcd\u0b95\u0bcd\u0b95\u0bc1 \u0b85\u0b9e\u0bcd\u0b9a\u0bc7\u0bb2\u0bcd\n\n46. \u0ba4\u0bc1\u0ba9\u0bcd\u0baa\u0bae\u0bcd \u0bae\u0bb1\u0ba8\u0bcd\u0ba4\u0bbf\u0b9f\u0bc1\n\n47. \u0ba4\u0bc2\u0bb1\u0bcd\u0bb1\u0bc1\u0ba4\u0bb2\u0bcd \u0b92\u0bb4\u0bbf\n\n48. \u0ba4\u0bc6\u0baf\u0bcd\u0bb5\u0bae\u0bcd \u0ba8\u0bc0 \u0b8e\u0ba9\u0bcd\u0bb1\u0bc1 \u0b89\u0ba3\u0bb0\u0bcd\n\n49. \u0ba4\u0bc7\u0b9a\u0ba4\u0bcd\u0ba4\u0bc8\u0b95\u0bcd \u0b95\u0bbe\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\n\n50. \u0ba4\u0bc8\u0baf\u0bb2\u0bc8 \u0b89\u0baf\u0bb0\u0bcd\u0bb5\u0bc1 \u0b9a\u0bc6\u0baf\u0bcd\n\n51. \u0ba4\u0bca\u0ba9\u0bcd\u0bae\u0bc8\u0b95\u0bcd\u0b95\u0bc1 \u0b85\u0b9e\u0bcd\u0b9a\u0bc7\u0bb2\u0bcd\n\n52. \u0ba4\u0bcb\u0bb2\u0bcd\u0bb5\u0bbf\u0baf\u0bbf\u0bb2\u0bcd \u0b95\u0bb2\u0b99\u0bcd\u0b95\u0bc7\u0bb2\u0bcd\n\n53. \u0ba4\u0bb5\u0ba4\u0bcd\u0ba4\u0bbf\u0ba9\u0bc8 \u0ba8\u0bbf\u0ba4\u0bae\u0bcd\u0baa\u0bc1\u0bb0\u0bbf\n<\/code><\/pre>\n<h3 id=\"\u0ba8\u0b95\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0ba8\u0b95\u0bb0 \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>54. \u0ba8\u0ba9\u0bcd\u0bb1\u0bc1 \u0b95\u0bb0\u0bc1\u0ba4\u0bc1\n\n55. \u0ba8\u0bbe\u0bb3\u0bc6\u0bb2\u0bcd\u0bb2\u0bbe\u0bae\u0bcd \u0bb5\u0bbf\u0ba9\u0bc8 \u0b9a\u0bc6\u0baf\u0bcd\n\n56. \u0ba8\u0bbf\u0ba9\u0bc8\u0baa\u0bcd\u0baa\u0ba4\u0bc1 \u0bae\u0bc1\u0b9f\u0bbf\u0baf\u0bc1\u0bae\u0bcd\n\n57. \u0ba8\u0bc0\u0ba4\u0bbf\u0ba8\u0bc2\u0bb2\u0bcd \u0baa\u0baf\u0bbf\u0bb2\u0bcd\n\n58. \u0ba8\u0bc1\u0ba9\u0bbf\u0baf\u0bb3\u0bb5\u0bc1 \u0b9a\u0bc6\u0bb2\u0bcd\n\n59. \u0ba8\u0bc2\u0bb2\u0bbf\u0ba9\u0bc8\u0baa\u0bcd \u0baa\u0b95\u0bc1\u0ba4\u0bcd\u0ba4\u0bc1\u0ba3\u0bb0\u0bcd\n\n60. \u0ba8\u0bc6\u0bb1\u0bcd\u0bb1\u0bbf \u0b9a\u0bc1\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0b9f\u0bc7\u0bb2\u0bcd\n\n61. \u0ba8\u0bc7\u0bb0\u0bcd\u0baa\u0b9f\u0baa\u0bcd \u0baa\u0bc7\u0b9a\u0bc1\n\n62. \u0ba8\u0bc8\u0baf\u0baa\u0bcd \u0baa\u0bc1\u0b9f\u0bc8\n\n63. \u0ba8\u0bca\u0ba8\u0bcd\u0ba4\u0ba4\u0bc1 \u0b9a\u0bbe\u0b95\u0bc1\u0bae\u0bcd\n\n64. \u0ba8\u0bcb\u0bb1\u0bcd\u0baa\u0ba4\u0bc1 \u0b95\u0bc8\u0bb5\u0bbf\u0b9f\u0bc7\u0bb2\u0bcd\n<\/code><\/pre>\n<h3 id=\"\u0baa\u0b95\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0baa\u0b95\u0bb0 \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>65. \u0baa\u0ba3\u0ba4\u0bcd\u0ba4\u0bbf\u0ba9\u0bc8\u0baa\u0bcd \u0baa\u0bc6\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bc1\n\n66. \u0baa\u0bbe\u0b9f\u0bcd\u0b9f\u0bbf\u0ba9\u0bbf\u0bb2\u0bcd \u0b85\u0ba9\u0bcd\u0baa\u0bc1 \u0b9a\u0bc6\u0baf\u0bcd\n\n67. \u0baa\u0bbf\u0ba3\u0ba4\u0bcd\u0ba4\u0bbf\u0ba9\u0bc8\u0baa\u0bcd \u0baa\u0bcb\u0bb1\u0bcd\u0bb1\u0bc7\u0bb2\u0bcd\n\n68. \u0baa\u0bc0\u0bb4\u0bc8\u0b95\u0bcd\u0b95\u0bc1 \u0b87\u0b9f\u0bae\u0bcd \u0b95\u0bca\u0b9f\u0bc7\u0bb2\u0bcd\n\n69. \u0baa\u0bc1\u0ba4\u0bbf\u0baf\u0ba9 \u0bb5\u0bbf\u0bb0\u0bc1\u0bae\u0bcd\u0baa\u0bc1\n\n70. \u0baa\u0bc2\u0bae\u0bbf \u0b87\u0bb4\u0ba8\u0bcd\u0ba4\u0bbf\u0b9f\u0bc7\u0bb2\u0bcd\n\n71. \u0baa\u0bc6\u0bb0\u0bbf\u0ba4\u0bbf\u0ba9\u0bc1\u0bae\u0bcd \u0baa\u0bc6\u0bb0\u0bbf\u0ba4\u0bc1 \u0b95\u0bca\u0bb3\u0bcd\n\n72. \u0baa\u0bc7\u0baf\u0bcd\u0b95\u0bb3\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0b85\u0b9e\u0bcd\u0b9a\u0bc7\u0bb2\u0bcd\n\n73. \u0baa\u0bca\u0baf\u0bcd\u0bae\u0bc8 \u0b87\u0b95\u0bb4\u0bcd\n\n74. \u0baa\u0bcb\u0bb0\u0bcd\u0ba4\u0bcd \u0ba4\u0bca\u0bb4\u0bbf\u0bb2\u0bcd \u0baa\u0bb4\u0b95\u0bc1\n<\/code><\/pre>\n<h3 id=\"\u0bae\u0b95\u0bb0-\u0bb5\u0bb0\u0b95\u0b95\u0bae\">\u0bae\u0b95\u0bb0 \u0bb5\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bae\u0bcd<\/h3>\n<pre><code>75. \u0bae\u0ba8\u0bcd\u0ba4\u0bbf\u0bb0\u0bae\u0bcd \u0bb5\u0bb2\u0bbf\u0bae\u0bc8\n\n76. \u0bae\u0bbe\u0ba9\u0bae\u0bcd \u0baa\u0bcb\u0bb1\u0bcd\u0bb1\u0bc1\n\n77. \u0bae\u0bbf\u0b9f\u0bbf\u0bae\u0bc8\u0baf\u0bbf\u0bb2\u0bcd \u0b85\u0bb4\u0bbf\u0ba8\u0bcd\u0ba4\u0bbf\u0b9f\u0bc7\u0bb2\u0bcd\n\n78. \u0bae\u0bc0\u0bb3\u0bc1\u0bae\u0bbe\u0bb1\u0bc1 \u0b89\u0ba3\u0bb0\u0bcd\u0ba8\u0bcd\u0ba4\u0bc1 \u0b95\u0bca\u0bb3\u0bcd\n\n79. \u0bae\u0bc1\u0ba9\u0bc8\u0baf\u0bbf\u0bb2\u0bc7 \u0bae\u0bc1\u0b95\u0ba4\u0bcd\u0ba4\u0bc1 \u0ba8\u0bbf\u0bb2\u0bcd\n\n80. \u0bae\u0bc2\u0baa\u0bcd\u0baa\u0bbf\u0ba9\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0b87\u0b9f\u0b99\u0bcd\u0b95\u0bca\u0b9f\u0bc7\u0bb2\u0bcd\n\n81. \u0bae\u0bc6\u0bb2\u0bcd\u0bb2\u0ba4\u0bcd \u0ba4\u0bc6\u0bb0\u0bbf\u0ba8\u0bcd\u0ba4\u0bc1 \u0b9a\u0bca\u0bb2\u0bcd\n\n82. \u0bae\u0bc7\u0bb4\u0bbf \u0baa\u0bcb\u0bb1\u0bcd\u0bb1\u0bc1\n\n83. \u0bae\u0bca\u0baf\u0bcd\u0bae\u0bcd\u0baa\u0bc1\u0bb1\u0ba4\u0bcd \u0ba4\u0bb5\u0bae\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\n\n84. \u0bae\u0bcb\u0ba9\u0bae\u0bcd \u0baa\u0bcb\u0bb1\u0bcd\u0bb1\u0bc1\n\n85. \u0bae\u0bcc\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0ba8\u0bcd\u0ba4\u0ba9\u0bc8\u0b95\u0bcd \u0b95\u0bca\u0bb2\u0bcd\n\n86. \u0baf\u0bb5\u0ba9\u0bb0\u0bcd\u0baa\u0bcb\u0bb2\u0bcd \u0bae\u0bc1\u0baf\u0bb1\u0bcd\u0b9a\u0bbf\u0b95\u0bca\u0bb3\u0bcd\n\n87. \u0baf\u0bbe\u0bb5\u0bb0\u0bc8\u0baf\u0bc1\u0bae\u0bcd \u0bae\u0ba4\u0bbf\u0ba4\u0bcd\u0ba4\u0bc1 \u0bb5\u0bbe\u0bb4\u0bcd\n\n88. \u0baf\u0bcc\u0bb5\u0ba9\u0bae\u0bcd \u0b95\u0bbe\u0ba4\u0bcd\u0ba4\u0bb2\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\n\n89. \u0bb0\u0bb8\u0ba4\u0bcd\u0ba4\u0bbf\u0bb2\u0bc7 \u0ba4\u0bc7\u0bb0\u0bcd\u0b9a\u0bcd\u0b9a\u0bbf \u0b95\u0bca\u0bb3\u0bcd\n\n90. \u0bb0\u0bbe\u0b9c\u0bb8\u0bae\u0bcd \u0baa\u0baf\u0bbf\u0bb2\u0bcd\n\n91. \u0bb0\u0bc0\u0ba4\u0bbf \u0ba4\u0bb5\u0bb1\u0bc7\u0bb2\u0bcd\n\n92. \u0bb0\u0bc1\u0b9a\u0bbf\u0baa\u0bb2 \u0bb5\u0bc6\u0ba9\u0bcd\u0bb1\u0bc1\u0ba3\u0bb0\u0bcd\n\n93. \u0bb0\u0bc2\u0baa\u0bae\u0bcd \u0b9a\u0bc6\u0bae\u0bcd\u0bae\u0bc8 \u0b9a\u0bc6\u0baf\u0bcd\n\n94. \u0bb0\u0bc7\u0b95\u0bc8\u0baf\u0bbf\u0bb2\u0bcd \u0b95\u0ba9\u0bbf\u0b95\u0bca\u0bb3\u0bcd\n\n95. \u0bb0\u0bcb\u0ba4\u0ba9\u0bae\u0bcd \u0ba4\u0bb5\u0bbf\u0bb0\u0bcd\n\n96. \u0bb0\u0bcc\u0ba4\u0bcd\u0ba4\u0bbf\u0bb0\u0bae\u0bcd \u0baa\u0bb4\u0b95\u0bc1\n\n97. \u0bb2\u0bb5\u0bae\u0bcd\u0baa\u0bb2 \u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bae\u0bbe\u0bae\u0bcd\n\n98. \u0bb2\u0bbe\u0b95\u0bb5\u0bae\u0bcd \u0baa\u0baf\u0bbf\u0bb1\u0bcd\u0b9a\u0bbf \u0b9a\u0bc6\u0baf\u0bcd\n\n99. \u0bb2\u0bc0\u0bb2\u0bc8 \u0b87\u0bb5\u0bcd\u0bb5\u0bc1\u0bb2\u0b95\u0bc1\n\n100. \u0b89\u0bb1\u0bc1\u0ba4\u0bcd\u0ba4\u0bb0\u0bc8 \u0b87\u0b95\u0bb4\u0bcd\n\n101. \u0b89\u0bb2\u0bcb\u0b95 \u0ba8\u0bc2\u0bb2\u0bcd \u0b95\u0bb1\u0bcd\u0bb1\u0bc1\u0ba3\u0bb0\u0bcd\n\n102. \u0bb2\u0bcc\u0b95\u0bbf\u0b95\u0bae\u0bcd \u0b86\u0bb1\u0bcd\u0bb1\u0bc1\n\n103. \u0bb5\u0bb0\u0bc1\u0bb5\u0ba4\u0bc8 \u0bae\u0b95\u0bbf\u0bb4\u0bcd\u0ba8\u0bcd\u0ba4\u0bc1\u0ba3\u0bcd\n\n104. \u0bb5\u0bbe\u0ba9\u0ba8\u0bc2\u0bb2\u0bcd \u0baa\u0baf\u0bbf\u0bb1\u0bcd\u0b9a\u0bbf\u0b95\u0bca\u0bb3\u0bcd\n\n105. \u0bb5\u0bbf\u0ba4\u0bc8\u0baf\u0bbf\u0ba9\u0bc8\u0ba4\u0bcd \u0ba4\u0bc6\u0bb0\u0bbf\u0ba8\u0bcd\u0ba4\u0bbf\u0b9f\u0bc1\n\n106. \u0bb5\u0bc0\u0bb0\u0bbf\u0baf\u0bae\u0bcd \u0baa\u0bc6\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0bc1\n\n107. \u0bb5\u0bc6\u0b9f\u0bbf\u0baa\u0bcd\u0baa\u0bc1\u0bb1\u0baa\u0bcd \u0baa\u0bc7\u0b9a\u0bc1\n\n108. \u0bb5\u0bc7\u0ba4\u0bae\u0bcd \u0baa\u0bc1\u0ba4\u0bc1\u0bae\u0bc8 \u0b9a\u0bc6\u0baf\u0bcd\n\n109. \u0bb5\u0bc8\u0baf\u0ba4\u0bcd \u0ba4\u0bb2\u0bc8\u0bae\u0bc8\u0b95\u0bca\u0bb3\u0bcd\n\n110. \u0bb5\u0bcc\u0bb5\u0bc1\u0ba4\u0bb2\u0bcd \u0ba8\u0bc0\u0b95\u0bcd\u0b95\u0bc1 \n\n - \u0baa\u0bbe\u0bb0\u0ba4\u0bbf\n<\/code><\/pre>"},{"title":"\u0baa\u0bc2\u0ba4\u0bcd\u0ba4\u0ba4\u0bc1 \u0bae\u0bbe\u0ba9\u0bc1\u0b9f\u0bae\u0bcd","link":"https:\/\/suriya.cc\/poems\/indrilai\/","pubDate":"Sat, 03 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/poems\/indrilai\/","description":"<pre><code>\u0b87\u0ba9\u0bcd\u0bb1\u0bbf\u0bb3\u0bc8\u0baa\u0bcd \u0baa\u0bbe\u0bb1\u0bc1\u0bb5\u0bae\u0bcd \u0b8e\u0ba9\u0bcd\u0bb1\u0bbf\u0bb0\u0bc1\u0ba8\u0bcd\u0ba4\u0bbe\u0bb2\u0bcd \u2013 \u0bb5\u0bb4\u0bbf\n\n\u0b8e\u0ba9\u0bcd\u0ba9\u0bc6\u0ba9\u0bcd\u0ba9 \u0bb5\u0bbe\u0b95\u0bc1\u0bae\u0bcb \u0b93\u0bb0\u0bbf\u0bb0\u0bb5\u0bbf\u0bb2\u0bcd\n\n\u0b9a\u0bc6\u0ba9\u0bcd\u0bb1\u0bbf\u0bb3\u0bc8\u0baa\u0bcd \u0baa\u0bbe\u0bb1\u0bc1\u0b95 \u0bae\u0bc1\u0bb1\u0bcd\u0bb1\u0bbf\u0b9f\u0ba4\u0bcd\u0ba4\u0bc7 \u2013 \u0ba4\u0bae\u0bcd\u0baa\u0bbf\n\n\u0ba4\u0bc7\u0ba9\u0bcd\u0bb5\u0ba8\u0bcd\u0ba4\u0bc1 \u0baa\u0bbe\u0baf\u0bc1\u0bae\u0bcd \u0b89\u0ba9\u0bcd \u0ba8\u0bc6\u0b9e\u0bcd\u0b9a\u0bbf\u0b9f\u0ba4\u0bcd\u0ba4\u0bc7!\n\n\u0b9a\u0bbe\u0ba4\u0ba9\u0bc8\u0baa\u0bcd \u0baa\u0bc2\u0b95\u0bcd\u0b95\u0bb3\u0bc8 \u0b8f\u0ba8\u0bcd\u0ba4\u0bc1\u0bae\u0bc1\u0ba9\u0bcd\u0ba9\u0bc7 \u2013 \u0b87\u0b99\u0bcd\u0b95\u0bc1\n\n\u0ba8\u0bb2\u0bcd\u0bb2\u0b9a\u0bc6\u0b9f\u0bbf \u0b87\u0bb3\u0bc8\u0baa\u0bcd \u0baa\u0bbe\u0bb1\u0bbf\u0b9f\u0bc1\u0bae\u0bcb?\n\n\u0bb5\u0bc7\u0ba4\u0ba9\u0bc8 \u0baf\u0bbe\u0bb5\u0bc1\u0bae\u0bcd \u0bae\u0bb1\u0ba8\u0bcd\u0ba4\u0ba4\u0bc1\u0baa\u0bbe\u0bb0\u0bcd \u2013 \u0b9a\u0bc6\u0b9f\u0bbf\n\n\u0bb5\u0bc6\u0bb1\u0bcd\u0bb1\u0bbf \u0b95\u0bca\u0ba3\u0bcd\u0b9f\u0bc7\u0ba8\u0bcd\u0ba4\u0bbf\u0baf \u0baa\u0bc2\u0bb5\u0bbf\u0ba9\u0bbf\u0bb2\u0bc7\n\n\n \u2013 \u0b9a\u0bbe\u0bb2\u0bc8 \u0b87\u0bb3\u0ba8\u0bcd\u0ba4\u0bbf\u0bb0\u0bc8\u0baf\u0ba9\u0bcd\n<\/code><\/pre>\n<p>This is a favorite poem of mine.\nIt talks about the importance of persistence and untiring efforts.<\/p>"},{"title":"\u0bb5\u0bb0\u0b99\u0bcd \u0b95\u0bc7\u0b9f\u0bcd\u0b9f\u0bb2\u0bcd - \u0baa\u0bbe\u0bb0\u0ba4\u0bbf","link":"https:\/\/suriya.cc\/poems\/thedi\/","pubDate":"Sat, 03 Feb 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/poems\/thedi\/","description":"<h3 id=\"\u0ba4\u0ba4\u0ba4\u0bb0\u0baa-\u0baa\u0b9f\u0bb2\u0b95\u0bb3---\u0baf\u0b95-\u0b9a\u0ba4\u0ba4\">\u0ba4\u0bcb\u0ba4\u0bcd\u0ba4\u0bbf\u0bb0\u0baa\u0bcd \u0baa\u0bbe\u0b9f\u0bb2\u0bcd\u0b95\u0bb3\u0bcd - \u0baf\u0bcb\u0b95 \u0b9a\u0bbf\u0ba4\u0bcd\u0ba4\u0bbf<\/h3>\n<pre><code>\u0ba4\u0bc7\u0b9f\u0bbf\u0b9a\u0bcd \u0b9a\u0bcb\u0bb1\u0bc1\u0ba8\u0bbf\u0ba4\u0ba8\u0bcd \u0ba4\u0bbf\u0ba9\u0bcd\u0bb1\u0bc1 -- \u0baa\u0bb2\n\n\u0b9a\u0bbf\u0ba9\u0bcd\u0ba9\u0b9e\u0bcd \u0b9a\u0bbf\u0bb1\u0bc1\u0b95\u0ba4\u0bc8\u0b95\u0bb3\u0bcd \u0baa\u0bc7\u0b9a\u0bbf -- \u0bae\u0ba9\u0bae\u0bcd\n\n\u0bb5\u0bbe\u0b9f\u0bbf\u0ba4\u0bcd \u0ba4\u0bc1\u0ba9\u0bcd\u0baa\u0bae\u0bbf\u0b95 \u0b89\u0bb4\u0ba9\u0bcd\u0bb1\u0bc1 -- \u0baa\u0bbf\u0bb1\u0bb0\u0bcd\n\n\u0bb5\u0bbe\u0b9f\u0baa\u0bcd \u0baa\u0bb2\u0b9a\u0bc6\u0baf\u0bb2\u0bcd\u0b95\u0bb3\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\u0ba4\u0bc1 -- \u0ba8\u0bb0\u0bc8\n\n\u0b95\u0bc2\u0b9f\u0bbf\u0b95\u0bcd \u0b95\u0bbf\u0bb4\u0baa\u0bcd\u0baa\u0bb0\u0bc1\u0bb5 \u0bae\u0bc6\u0baf\u0bcd\u0ba4\u0bbf -- \u0b95\u0bca\u0b9f\u0bc1\u0b99\u0bcd\n\n\u0b95\u0bc2\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd \u0b95\u0bbf\u0bb0\u0bc8\u0baf\u0bc6\u0ba9\u0baa\u0bcd \u0baa\u0bbf\u0ba9\u0bcd\u0bae\u0bbe\u0baf\u0bc1\u0bae\u0bcd -- \u0baa\u0bb2\n\n\u0bb5\u0bc7\u0b9f\u0bbf\u0b95\u0bcd\u0b95\u0bc8 \u0bae\u0ba9\u0bbf\u0ba4\u0bb0\u0bc8\u0baa\u0bcd \u0baa\u0bcb\u0bb2\u0bc7 -- \u0ba8\u0bbe\u0ba9\u0bcd\n\n\u0bb5\u0bc0\u0bb4\u0bcd\u0bb5\u0bc7 \u0ba9\u0ba9\u0bcd\u0bb1\u0bc1\u0ba8\u0bbf\u0ba9\u0bc8\u0ba4\u0bcd \u0ba4\u0bbe\u0baf\u0bcb?\n\n\n\n\u0ba8\u0bbf\u0ba9\u0bcd\u0ba9\u0bc8\u0b9a\u0bcd \u0b9a\u0bbf\u0bb2\u0bb5\u0bb0\u0b99\u0bcd\u0b95\u0bb3\u0bcd \u0b95\u0bc7\u0b9f\u0bcd\u0baa\u0bc7\u0ba9\u0bcd \u0b85\u0bb5\u0bc8\n\n\u0ba8\u0bc7\u0bb0\u0bc7 \u0b87\u0ba9\u0bcd\u0bb1\u0bc6\u0ba9\u0b95\u0bcd\u0b95\u0bc1\u0ba4\u0bcd \u0ba4\u0bb0\u0bc1\u0bb5\u0bbe\u0baf\u0bcd -- \u0b8e\u0ba9\u0bcd\u0bb1\u0ba9\u0bcd\n\n\u0bae\u0bc1\u0ba9\u0bcd\u0ba9\u0bc8\u0ba4\u0bcd \u0ba4\u0bc0\u0baf\u0bb5\u0bbf\u0ba9\u0bc8\u0baa\u0bcd \u0baa\u0baf\u0ba9\u0bcd\u0b95\u0bb3\u0bcd -- \u0b87\u0ba9\u0bcd\u0ba9\u0bc1\u0bae\u0bcd\n\n\u0bae\u0bc2\u0bb3\u0bbe \u0ba4\u0bb4\u0bbf\u0ba8\u0bcd\u0ba4\u0bbf\u0b9f\u0bc1\u0ba4\u0bb2\u0bcd \u0bb5\u0bc7\u0ba3\u0bcd\u0b9f\u0bc1\u0bae\u0bcd-\u0b87\u0ba9\u0bbf\n\n\u0b8e\u0ba9\u0bcd\u0ba9\u0bc8\u0baa\u0bcd \u0baa\u0bc1\u0ba4\u0bbf\u0baf \u0bb5\u0bc1\u0baf\u0bbf\u0bb0\u0bbe\u0b95\u0bcd\u0b95\u0bbf-\u0b8e\u0ba9\u0b95\u0bcd\n\n\u0b95\u0bc7\u0ba4\u0bc1\u0b99\u0bcd \u0b95\u0bb5\u0bb2\u0bc8\u0baf\u0bb1\u0b9a\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\u0ba4\u0bc1 -- \u0bae\u0ba4\u0bbf\n\n\u0ba4\u0ba9\u0bcd\u0ba9\u0bc8 \u0bae\u0bbf\u0b95\u0ba4\u0bcd\u0ba4\u0bc6\u0bb3\u0bbf\u0bb5\u0bc1 \u0b9a\u0bc6\u0baf\u0bcd\u0ba4\u0bc1 -- \u0b8e\u0ba9\u0bcd\u0bb1\u0bc1\u0bae\u0bcd\n\n\u0b9a\u0ba8\u0bcd\u0ba4\u0bcb\u0bb7\u0b99\u0bcd \u0b95\u0bca\u0ba3\u0bcd\u0b9f\u0bbf\u0bb0\u0bc1\u0b95\u0bcd\u0b95\u0b9a\u0bcd \u0b9a\u0bc6\u0baf\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\n\n\n - \u0baa\u0bbe\u0bb0\u0ba4\u0bbf\n<\/code><\/pre>"},{"title":"prompt engineering","link":"https:\/\/suriya.cc\/tech\/ML\/prompt_engineering\/","pubDate":"Tue, 23 Jan 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/prompt_engineering\/","description":"<h2 id=\"in-context-learning\">in context learning<\/h2>\n<h2 id=\"chain-of-thought\">chain-of-thought<\/h2>\n<p>Broadly three classes of reasoning tasks\n&ldquo;let&rsquo;s think step by step&rdquo; seems to be the key phrase<\/p>"},{"title":"cmu square","link":"https:\/\/suriya.cc\/tech\/privacy\/cmu_square\/","pubDate":"Thu, 18 Jan 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/cmu_square\/","description":"<p>SQUARE (Software Quality Requirements Engineering) is SEI&rsquo;s framework for &ldquo;Improving identification, analysis, specification and management (of software)&rdquo;.<\/p>\n<p>This, Broadly involves 9 steps,<\/p>"},{"title":"data privacy","link":"https:\/\/suriya.cc\/books\/data_privacy\/","pubDate":"Tue, 16 Jan 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/data_privacy\/","description":"<p>These are my notes from Nishant&rsquo;s excellent book, <a href=\"https:\/\/www.oreilly.com\/library\/view\/data-privacy\/9781617298998\/\">Data Privacy: Runbook for Engineers<\/a>\n<\/p>\n<h2 id=\"1-privacy-engineering\">1 privacy engineering<\/h2>\n<ul>\n<li>Data Security is usually tightly coupled with privacy. Data security is a base condition to guarantee privacy.<\/li>\n<li>Data privacy is about how data of users is being accessed and processed.<\/li>\n<li>There are 4 broad process for data privacy that the author describes,\n<ul>\n<li>Data classification<\/li>\n<li>Data inventory<\/li>\n<li>Data deletion<\/li>\n<li>Data obfuscation<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3 id=\"how-data-flows\">how data flows.<\/h3>\n<ul>\n<li>From a Tech leader&rsquo;s standpoint, they need a catalog of data to figure out the tooling to deploy for each case.<\/li>\n<li>Without the catalog the leader would be flying blind.<\/li>\n<\/ul>\n<h3 id=\"why-privacy\">why privacy<\/h3>\n<ul>\n<li>Direct motivators for companies\n<ul>\n<li>Fines are getting bigger and numerous each year.<\/li>\n<li>non-investment in the Early stage cases late-stage headaches\n<ul>\n<li>I liked the Gamebuster example, where IP addresses where being queried by automated scripts and copied in other tables, A clear failure of access control. which led to multiple impacts across the product. My question was, how would a leader be aware of this structure? is getting their hands dirty the only way?<\/li>\n<\/ul>\n<\/li>\n<li>Investigations are usually long and take a lot of the company&rsquo;s and it&rsquo;s leader&rsquo;s valuable time. eg. Bill Gates and his Distraction.\n[personal note,] it was interesting to me that all the Data protection examples are from EU and none from America. Show&rsquo;s the fragmented regulation in the US?<\/li>\n<\/ul>\n<\/li>\n<li>There is a lag between engineering and the law, which means engineering has to be prescient about the future laws and it&rsquo;s consequences.<\/li>\n<li>Regulatory certifications, makes it easier to,\n<ul>\n<li>Have structure and systems<\/li>\n<li>Increase trust in the product<\/li>\n<li>Makes work more efficient, because there are already answers to questions<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Early data tagging makes it easier to maintain privacy in the system. If we continue Facebook&rsquo;s <a href=\"https:\/\/www.vice.com\/en\/article\/akvmke\/facebook-doesnt-know-what-it-does-with-your-data-or-where-it-goes#:~:text=%E2%80%9CWe%E2%80%99ve%20built%20systems%20with%20open%20borders\">ink metaphor<\/a>\n, With ink that is tagged, you could at least make the ink immiscible and trace it and separate it back. So early tagging is very important. because tags can then be filtered.<\/p>"},{"title":"resume","link":"https:\/\/suriya.cc\/resume\/","pubDate":"Tue, 09 Jan 2024 00:00:00 +0000","guid":"https:\/\/suriya.cc\/resume\/","description":"<p><a href=\"https:\/\/suriya.cc\/surya-resume.pdf\">Resume [pdf]<\/a>\n<\/p>\n<p>Email: suriyaganesh097 at gmail.com<\/p>\n<p><a href=\"https:\/\/linkedin.com\/in\/suriya-ganesh\/\">linkedin.com\/in\/suriya-ganesh<\/a>\n<\/p>\n<p><a href=\"https:\/\/github.com\/subygan\">github.com\/subygan<\/a>\n<\/p>\n<p><a href=\"https:\/\/scholar.google.com\/citations?user=G0CscfQAAAAJ&amp;hl=en\">google scholar<\/a>\n<\/p>\n<p><a href=\"https:\/\/orcid.org\/0000-0002-4702-5219\">orcid<\/a>\n<\/p>\n<h3 id=\"employment\">employment<\/h3>\n<p><strong>Software Engineer<\/strong>\n<strong>Oxen.ai<\/strong>\n<strong>May 2025 - present<\/strong><\/p>\n<ul>\n<li>VCS system for large datasets using rust.<\/li>\n<li>Deduplication for large files to increase commit overlap and diff in large blobs and data frames.<\/li>\n<li>My contributions to oxen FOSS cli and server can be found <a href=\"https:\/\/www.google.com\/search?q=oxen&#43;FOSS&#43;cli\">here<\/a>\n<\/li>\n<\/ul>\n<p><strong>Senior Systems Engineer<\/strong>\n<strong>NimbleEdge<\/strong>\n<strong>Jan 2023 - Feb 2024<\/strong><\/p>"},{"title":"purple llama","link":"https:\/\/suriya.cc\/tech\/ML\/purple_llama\/","pubDate":"Mon, 11 Dec 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/purple_llama\/","description":"<p>PurpleLlama is a new framework proposed by Meta to evaluate LLMs for their secure coding ability.<\/p>\n<h2 id=\"cyberseceval\">cyberseceval<\/h2>\n<p>This is the core part of the research paper which has created a <a href=\"https:\/\/github.com\/facebookresearch\/PurpleLlama\/tree\/main\/CybersecurityBenchmarks\">benchmark for LLMs<\/a>\n to test generated code.<\/p>"},{"title":"membership inference attack","link":"https:\/\/suriya.cc\/tech\/ML\/MIA\/","pubDate":"Sat, 09 Dec 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/MIA\/","description":"<p>Membership inference Attack is a way to retrieve back the probability of the original training inputs.<\/p>\n<h3 id=\"notes\">notes<\/h3>\n<ul>\n<li><a href=\"https:\/\/arxiv.org\/pdf\/1610.05820.pdf\">https:\/\/arxiv.org\/pdf\/1610.05820.pdf<\/a>\n<\/li>\n<\/ul>"},{"title":"42. trapping rain water","link":"https:\/\/suriya.cc\/tech\/algos\/problems\/leetcode\/42_trapping_rain\/","pubDate":"Sun, 26 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/problems\/leetcode\/42_trapping_rain\/","description":"<h2 id=\"problem-statement\">problem statement<\/h2>\n<p>Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.<\/p>"},{"title":"min in rotated array","link":"https:\/\/suriya.cc\/tech\/algos\/problems\/leetcode\/154_min_in_rotated_arr\/","pubDate":"Sun, 26 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/problems\/leetcode\/154_min_in_rotated_arr\/","description":"<p>Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,4,4,5,6,7] might become:<\/p>"},{"title":"longest valid parentheses","link":"https:\/\/suriya.cc\/tech\/algos\/problems\/leetcode\/32_longest_parentheses\/","pubDate":"Fri, 24 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/problems\/leetcode\/32_longest_parentheses\/","description":"<p>problem link: <a href=\"https:\/\/leetcode.com\/problems\/longest-valid-parentheses\/\">https:\/\/leetcode.com\/problems\/longest-valid-parentheses\/<\/a>\n<\/p>\n<p>Typically, in the parentheses problem a stack is the obvious choice. I spent too much time, chasing a phantom solution by thinking about this as a DP problem and filling various arrays.<\/p>"},{"title":"intro to llm","link":"https:\/\/suriya.cc\/tech\/ML\/Intro_to_llm\/","pubDate":"Thu, 23 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/Intro_to_llm\/","description":"<p>My notes on Karpathy&rsquo;s <a href=\"https:\/\/youtu.be\/zjkBMFhNj_g\">Intro to LLM talk<\/a>\n<\/p>\n<h3 id=\"llama-2-70b\">llama-2-70b<\/h3>\n<ul>\n<li>comes with <code>run.c<\/code> ~500 lines of c for it to be a self-contained runnable model.<\/li>\n<li>LLM are a lossy compression of the internet.<\/li>\n<li>In the process of trying to predict the next word, The model would have to understand the World that led to the creation of that next word.<\/li>\n<li>What the model does is closer to a dream, than determinism. The model only knows that something of a certain structure has to come there. It is not going to exactly replicate the world. It is dreaming about it and just like every dream the finer details could be hazy.<\/li>\n<li>Reversal curse, knowledge that can be accessed from one angle, cannot be accessed when from another angle. And it is hard to understand why, because even though the equations behind the models are well understood. It is hard to reason within the billions of parameters and figure out why the model came to a certain conclusion.<\/li>\n<\/ul>\n<h3 id=\"assistant-training\">assistant training<\/h3>\n<p>After training the Language model on a number of Epochs over the whole corpus of internet text.<\/p>"},{"title":"ai governance and threat modelling","link":"https:\/\/suriya.cc\/tech\/privacy\/ml_governance\/","pubDate":"Thu, 09 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/ml_governance\/","description":"<h2 id=\"how-are-ml-systems-measured\">how are ml systems measured.<\/h2>\n<p>While training this is the loss and accuracy of the prediction.<\/p>\n<p>For LLMs there are benchmarks like,<\/p>"},{"title":"why accelerate?","link":"https:\/\/suriya.cc\/essays\/01_exceptional\/","pubDate":"Thu, 09 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/01_exceptional\/","description":"<h2 id=\"parkinson\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/parkinson%27s_law\">parkinson&rsquo;s law<\/a>\n<\/h2>\n<blockquote>\n<p>&ldquo;work expands so as to fill the time available for its completion&rdquo;<\/p><\/blockquote>\n<p>When Northcote made this observation, this was designed for organisations, but I believe this is a good representation for personal tasks as well.<\/p>"},{"title":"the little prince - antoine de saint-exup\u00e9ry","link":"https:\/\/suriya.cc\/books\/little_prince\/","pubDate":"Sun, 05 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/little_prince\/","description":"<p>Although a translation, this was a good book.\nMaybe a little too platonic for my taste. But, still I&rsquo;d suggest it as a short read.\nTo me personally, the Prince&rsquo;s Journey through different worlds where there were only one person living and he was the king, and others who were living in their own worlds, constantly working. The prince is incredibly confused about all the vain things that people do.\nIt is interesting the way the flower is portrayed as a naive character which is in constant need of protection, &ldquo;guidance&rdquo; and help. I guess that was the common caricaturization of a woman. Which, looking back is incredibly wrong (to me).<\/p>"},{"title":"to cut a long story short - jeffrey archer","link":"https:\/\/suriya.cc\/books\/long_story_short\/","pubDate":"Sat, 04 Nov 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/long_story_short\/","description":"<p>I&rsquo;ve previously read Jeffrey Archer&rsquo;s other Short story collection, <strong>Twelve Red Herrings<\/strong> and <strong>The Collected Short Stories<\/strong>. This collection lacked the &ldquo;punch&rdquo; factor that &ldquo;Twelve Red Herrings&rdquo;. But, I still enjoyed all the stories.<\/p>"},{"title":"why privacy?","link":"https:\/\/suriya.cc\/tech\/privacy\/why_privacy\/","pubDate":"Tue, 03 Oct 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/why_privacy\/","description":"<p>Fundamental problem has been that, privacy is hard to define.\nPrivacy stretches and shrinks based on context, culture and time.<\/p>"},{"title":"right around the corner, a story of million possibilities","link":"https:\/\/suriya.cc\/essays\/03_right_around_the_corner\/","pubDate":"Thu, 21 Sep 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/03_right_around_the_corner\/","description":"<p>The problem is, uncertainty.<\/p>\n<p>As humans, we&rsquo;ve been fighting with this for a long while. We try to make Everything around predictable. predictability is safe, predictability is iterable, predictability is controllable. This is true for the innovation of fire, as it is, to Settling down at a farm. We wanted to reliably have, fire, food and shelter. This is also the reason why people hate new Changes, &ldquo;new&rdquo; is unknown ergo unpredictable so should be kept away. Because of this, we end up going to the same McDonald&rsquo;s that we go a million times over.<\/p>"},{"title":"browser privacy test","link":"https:\/\/suriya.cc\/tech\/privacy\/browser_privacy\/","pubDate":"Tue, 19 Sep 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/browser_privacy\/","description":"<p>I came across this website which tracks and tests privacy of various browsers. <a href=\"https:\/\/privacytests.org\/\">https:\/\/privacytests.org\/<\/a>\n\nTakeaway IMO:<\/p>\n<p>in desktop browsers<\/p>\n<ul>\n<li>\n<p>Brave, Mullvad and librewolf seems better because of the built in ad protection. but brave clearly has better User experience.<\/p>"},{"title":"privacy articles","link":"https:\/\/suriya.cc\/tech\/privacy\/articles\/","pubDate":"Tue, 19 Sep 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/articles\/","description":"<h2 id=\"blogs\">blogs<\/h2>\n<ul>\n<li><a href=\"https:\/\/blog.ovalerio.net\/archives\/2615\">Privacy best practices<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.scu.edu\/ethics\/focus-areas\/internet-ethics\/resources\/why-we-care-about-privacy\/\">Why we care about privacy<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.ietf.org\/archive\/id\/draft-farrell-tenyearsafter-00.html\">reflections on snowden revealations<\/a>\n<\/li>\n<li><a href=\"https:\/\/martinfowler.com\/articles\/intro-pet.html\">PETs an intro to technologists<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.theprivacywhisperer.com\/p\/privacy-ux-and-privacy-culture\">Privacy UX and privacy culture<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.forbes.com\/sites\/forbestechcouncil\/2022\/02\/22\/whos-good-at-data-privacy\/\">Who&rsquo;s good at data privacy<\/a>\n<\/li>\n<li><a href=\"https:\/\/cacm.acm.org\/magazines\/2023\/3\/270204-metrics-for-success\/abstract\">Metrics for success: How to evaluate Privacy choice in usability<\/a>\n<\/li>\n<li><a href=\"https:\/\/pair.withgoogle.com\/explorables\/federated-learning\/\">How Federated Learning Protects privacy<\/a>\n<\/li>\n<li><a href=\"https:\/\/blog.research.google\/2022\/02\/federated-learning-with-formal.html\">Federated learning with formal privacy guarantees<\/a>\n<\/li>\n<li><a href=\"https:\/\/ico.org.uk\/media\/about-the-ico\/consultations\/4021464\/chapter-5-anonymisation-pets.pdf\">PETs<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.scss.tcd.ie\/doug.leith\/apple_google.pdf\">Mobile Handset Privacy<\/a>\n<\/li>\n<li><a href=\"https:\/\/matrix.org\/blog\/2022\/03\/25\/interoperability-without-sacrificing-privacy-matrix-and-the-dma\/\">Interoperability without sacrificing privacy: Matrix and the DMA<\/a>\n<\/li>\n<li><\/li>\n<\/ul>\n<h2 id=\"tools\">tools<\/h2>\n<ul>\n<li><a href=\"https:\/\/privacytests.org\/\">Browser Privacy Test<\/a>\n<\/li>\n<\/ul>"},{"title":"now","link":"https:\/\/suriya.cc\/now\/","pubDate":"Wed, 13 Sep 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/now\/","description":"<p>I have a long-running ailment called the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Shiny_object_syndrome\">Shiny Object Syndrome<\/a>\n. I come back to this page to remind self what my life&rsquo;s focus is currently. As you can see, I change my mind pretty consistently<\/p>"},{"title":"working at a startup","link":"https:\/\/suriya.cc\/essays\/04_startup_work\/","pubDate":"Wed, 13 Sep 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/04_startup_work\/","description":"<p>I&rsquo;ve been involved with tech startups for the last 5 years. And every moment of my time I believe I&rsquo;ve done very meaningful work.<\/p>"},{"title":"a graduate course in applied cryptography","link":"https:\/\/suriya.cc\/books\/applied_crypto\/","pubDate":"Sun, 04 Jun 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/applied_crypto\/","description":"<h2 id=\"encryption\">encryption<\/h2>\n<p>Shannon cipher assumes a shared secret key that is no smaller than the message being transmitted.<\/p>\n<ul>\n<li><strong>One time pad<\/strong> a Shannon cipher where the keys, messages and ciphertexts are bit strings of the same length<\/li>\n<\/ul>\n<h3 id=\"resources\">resources<\/h3>\n<ul>\n<li><a href=\"https:\/\/crypto.stanford.edu\/~dabo\/cryptobook\/BonehShoup_0_4.pdf\">https:\/\/crypto.stanford.edu\/~dabo\/cryptobook\/BonehShoup_0_4.pdf<\/a>\n<\/li>\n<\/ul>"},{"title":"programmers introduction to mathematics","link":"https:\/\/suriya.cc\/books\/pim\/","pubDate":"Sun, 04 Jun 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/pim\/","description":"<h2 id=\"polynomials\">polynomials<\/h2>\n<p>when we represent the output of a function f(x) in the y axis and the input in the x axis we end up with the curve, depending on the function. The higher the number of curves, the higher the power of the polynomial.<\/p>"},{"title":"quotes","link":"https:\/\/suriya.cc\/quotes\/","pubDate":"Sat, 03 Jun 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/quotes\/","description":"<blockquote>\n<p>Failure is seldom Fatal<\/p>\n<ul>\n<li>Winston Churchill<\/li>\n<\/ul><\/blockquote>\n<blockquote>\n<p>Faithless is he that says farewell when the road darkens.\n\u2014 J.R.R. Tolkien<\/p>"},{"title":"wild list","link":"https:\/\/suriya.cc\/wild_list\/","pubDate":"Sat, 03 Jun 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/wild_list\/","description":"<ul>\n<li>\n<p>Systems Software<\/p>\n<ul>\n<li>Build a functional VM isolate<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Machine Learning<\/p>\n<ul>\n<li>Build a large CNN<\/li>\n<li>Multi Node model training.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>build a Company<\/p>"},{"title":"my inventions - nikola tesla","link":"https:\/\/suriya.cc\/books\/my_inventions\/","pubDate":"Fri, 02 Jun 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/my_inventions\/","description":"<p>This was an incredible book, that lets a peek inside the mind of a genius.\nAlthough typical of tesla, the book was a bit too self-obsessed.<\/p>"},{"title":"straight a","link":"https:\/\/suriya.cc\/books\/straight_a\/","pubDate":"Fri, 02 Jun 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/straight_a\/","description":"<p>I was casually going through my bookshelf and this caught my eye. I&rsquo;m generally skeptical of these self-help books because, It is my strong opinion that self-help books are fundamentally flawed. As, any change in habits require extended stretches of time. but, book as a medium is optimal for batch dumping of ideas. And, I found this focus on straight A student a little tiresome. I mean, being straight A is good, neither is it the gold standard for a student nor is it the only standard.<\/p>"},{"title":"my favorite list of incredibly lit articles","link":"https:\/\/suriya.cc\/lit\/","pubDate":"Tue, 02 May 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/lit\/","description":"<p>Velocity matters the most<\/p>\n<h1 id=\"on-shortification-of-learning\">on shortification of &ldquo;learning&rdquo;<\/h1>\n<p>There are a lot of videos on YouTube\/TikTok etc. that give the appearance of education, but if you look closely they are really just entertainment. This is very convenient for everyone involved : the people watching enjoy thinking they are learning (but actually they are just having fun). The people creating this content also enjoy it because fun has a much larger audience, fame and revenue. But as far as learning goes, this is a trap. This content is an epsilon away from watching the Bachelorette. It&rsquo;s like snacking on those &ldquo;Garden Veggie Straws&rdquo;, which feel like you&rsquo;re eating healthy vegetables until you look at the ingredients.<\/p>"},{"title":"my favorite list of incredibly lit articles","link":"https:\/\/suriya.cc\/vani\/","pubDate":"Tue, 02 May 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/vani\/","description":{}},{"title":"badminton handbook","link":"https:\/\/suriya.cc\/books\/badminton\/","pubDate":"Sun, 23 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/badminton\/","description":"<p>I usually like watching videos or brute force play for picking up skills. But, I wanted a comprehensive read on the topic and here we are. I learnt a lot more than I could&rsquo;ve just by watching a video. Even though explaining some topics are definitely harder in a written medium.<\/p>"},{"title":"cicumventing ad block","link":"https:\/\/suriya.cc\/tech\/privacy\/gtm\/","pubDate":"Sat, 22 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/gtm\/","description":"<p>using a DNS aliasing to circumvent ad blocking tools got me wondering about the feasibility, because theoretically it should be possible.<\/p>"},{"title":"when breath becomes air","link":"https:\/\/suriya.cc\/books\/air\/","pubDate":"Mon, 17 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/air\/","description":"<p>Paul Kalanithi&rsquo;s heart touching story about his struggle to search for a life with meaning, across literature and medicine, finally having a calling in neuroscience only for it to slip away too soon in the form of lung cancer.<\/p>"},{"title":"trust me i'm lying","link":"https:\/\/suriya.cc\/books\/trust_me\/","pubDate":"Sat, 15 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/trust_me\/","description":"<h2 id=\"blogs-make-the-news\">blogs make the news<\/h2>\n<ul>\n<li>Blog mediums such as, twitter, instagram, reddit and others and their operating mediums (users) have an outsized impact on the wider society, the way it thinks and operates.<\/li>\n<li>Bigger news writers pick up signals from these mediums and decide to write articles about it.<\/li>\n<\/ul>\n<h2 id=\"trading-up-the-chain\">trading up the chain<\/h2>\n<ul>\n<li>Ryan exploits the above format, by first baiting smaller blogs who are hungry for anything. And then sending those to bigger authors in bigger publications. Until eventually it makes the SNL or some big shot recording<\/li>\n<\/ul>\n<h2 id=\"the-blog-con\">the blog con<\/h2>\n<ul>\n<li>Blogs are generally incentivized to increase their view count. this is True across youtube, instagram and others.<\/li>\n<li>This makes them more open to create content that is able to sustain its virality thereby making a lot of impressions.<\/li>\n<li>Veritasium&rsquo;s video &ldquo;Clickbait is unreasonably effective&rdquo;. where he discusses his dilemma as a creator trying to educate people with great content vs creating content that would attract the user&rsquo;s attention immediately.<\/li>\n<\/ul>\n<h2 id=\"tactic-1---the-art-of-the-bribe\">tactic 1 - the art of the bribe.<\/h2>\n<ul>\n<li>Bloggers can be bribed into doing a lot of things.<\/li>\n<li>Because they are already looking out for it and find no conflict of interest in it.<\/li>\n<li>You can make famous actors tweet badly about themselves for as little as $35<\/li>\n<\/ul>\n<h2 id=\"tactic-2---tell-them-what-they-want-to-hear\">tactic 2 - tell them what they want to hear<\/h2>\n<ul>\n<li>Bloggers actually <strong>want<\/strong> to publish your story. Because they&rsquo;re usually just playing catchup with their peers.<\/li>\n<li>Tell them what they want to hear and they&rsquo;ll publish it for you. It can be a scoop about a president or anything pretty much.<\/li>\n<li>They&rsquo;re desperate and they will believe whatever you say<\/li>\n<\/ul>\n<h2 id=\"tactic-3---give-em-what-spreads\">tactic 3 - give &rsquo;em what spreads<\/h2>\n<ul>\n<li>Do the heavy lifting for them. Find an angle in the story that would make it viral. Having a lot of pageviews is just a matter of being viral.<\/li>\n<li><\/li>\n<\/ul>\n<h2 id=\"tactic-4---help-them-trick-their-readers\">tactic 4 - help them trick their readers<\/h2>\n<ul>\n<li>less than 50% of readers stay more than 1 second in a page. and that is all it takes.<\/li>\n<li>The news doesn&rsquo;t even have to be true, it could also be a speculation that something might be true.<\/li>\n<li>Utilise the curiosity gap.<\/li>\n<\/ul>\n<h2 id=\"tactic-5---sell-them-something-they-can-sell\">tactic 5 - sell them something they can sell<\/h2>\n<ul>\n<li>Give them something that they will be able to sell to their readers.<\/li>\n<li>Every blogger is trying to sell something, a thought or an idea to their user. help them with it.<\/li>\n<li>Imagine it like an infinite bazaar where readers are buyers who trade their time for content. Then, every blog owner is a shopkeeper who&rsquo;s trying to grab the most attention from the users. It is a fight to the bottom.<\/li>\n<\/ul>\n<h2 id=\"tactic-6---make-it-all-about-the-headline\">tactic 6 - make it all about the headline<\/h2>\n<ul>\n<li>There are many ways, the headline has to be funny, yet curiosity inducing. Should create shock between the people<\/li>\n<li>Youtube thumbnail used to be from the 1\/3, 2\/3 and last part of a video. But now it can be anything. People can be tricked into watching a video without even the thumbnail having no relation to the content. eg. early days, youtube users tend to upload videos with thumbnails of women with small clothes.<\/li>\n<\/ul>\n<h2 id=\"tactic-7---kill-em-with-pageview-kindness\">tactic 7 - kill &rsquo;em with pageview kindness<\/h2>\n<ul>\n<li>If you could bring pageviews to an article, help the author out so that they&rsquo;re able to help you.<\/li>\n<\/ul>\n<h2 id=\"tactic-8---use-them-technology-against-itself\">tactic 8 - use them technology against itself<\/h2>\n<ul>\n<li>Keep iterating over the headlines and the thumbnails<\/li>\n<li>Use analytics to judge what ticks people off about an article.<\/li>\n<li>It is known that the average reader only reads about 800 words of content<\/li>\n<\/ul>\n<h2 id=\"tactic-9---just-make-stuff-up\">tactic 9 - just make stuff up<\/h2>\n<ul>\n<li>In today&rsquo;s fast economy we don&rsquo;t have to validate anything, we can just make random stuff up.<\/li>\n<li>Services like HARO are there, where people are able to source just about anything.<\/li>\n<li>There is a huge amount of confirmation bias going on with journalists<\/li>\n<\/ul>\n<h2 id=\"irin-carmon-the-daily-show-and-me\">irin carmon, the daily show and me<\/h2>\n<ul>\n<li>Blogs generally take words out of context and try to twist them out.<\/li>\n<li>There are many scandals which were just something, that a blogger took out of context and twisted it around.<\/li>\n<li>Irin Carmon, daily show and ryan all faced something similar<\/li>\n<\/ul>\n<h2 id=\"there-are-others\">there are others<\/h2>\n<ul>\n<li>Ryan is not the only guy who&rsquo;s doing media manipulations.<\/li>\n<li>There are definitely others who are definitely better than him.<\/li>\n<\/ul>\n<h2 id=\"slacktivism-is-not-activism\">slacktivism is not activism<\/h2>\n<ul>\n<li>A lot of bloggers tend to raise awareness by being an activist.<\/li>\n<li>But, Ryan has a different take on this that. These bloggers are just acting like they care, but all they want is the pageviews.<\/li>\n<li>They prey on the goodwill of the user.<\/li>\n<\/ul>\n<h2 id=\"just-passing-this-along\">just passing this along<\/h2>\n<ul>\n<li>A lot of blogs usually summarize the content of a post by some bigger publication.<\/li>\n<li>The blogs have to do this because they have to achieve post parity with their peers. By saying that this was from another publication, the responsibility of veracity is also delegated to the original blog.<\/li>\n<li>This way, information travels from one end of the network to the other, while nobody takes responsibility for it.<\/li>\n<li>This makes it easy for people like Ryan to manipulate<\/li>\n<\/ul>\n<h2 id=\"cyberwarfare\">cyberwarfare<\/h2>\n<ul>\n<li>A lot of governments are trying to influence each other through the same principles that Ryan is using.<\/li>\n<\/ul>\n<h2 id=\"the-myth-of-corrections\">the myth of corrections<\/h2>\n<ul>\n<li>Blogs, generally post a nasty article which gets crazy amount of views and then give an update in another article saying that the previous one was unfounded claims. The original blog stays up and receive 10X more views than the updates<\/li>\n<li>This is called iterative journalism and d<\/li>\n<\/ul>\n<h2 id=\"the-twenty-first-century-degradation-ceremony\">the twenty-first-century degradation ceremony<\/h2>\n<ul>\n<li>Papers of old had a subscription based incentive. So, they had to maintain quality. But, with the pageviews incentive nobody has to maintain quality, but gain based on notoriety and quantity.<\/li>\n<li><\/li>\n<\/ul>\n<h2 id=\"welcome-to-unreality\">welcome to unreality<\/h2>\n<ul>\n<li>Real life is mundane and boring.<\/li>\n<li>But, people want something spicy in the news everyday.<\/li>\n<li>Newspeople are just delivering that spiciness, day in and day out. Ethics and morality are out of the window in this system.<\/li>\n<li>People are just taking mundane ideas and making them unreal and riling people up.<\/li>\n<\/ul>\n<h2 id=\"how-to-read-a-blog\">how to read a blog<\/h2>\n<ul>\n<li>Almost always what you&rsquo;re reading on a blog is inaccurate<\/li>\n<li>If a blog references or summarizes another blog always read the original source.<\/li>\n<li>Be on the lookout for weasel words like, &ldquo;We hear that&hellip;&rdquo;, &ldquo;Insider reports&hellip;&rdquo;, &ldquo;Maybe&hellip;&rdquo;, &ldquo;some speculate that&hellip;.&rdquo;, &ldquo;people are of the opinion that&hellip;.&rdquo; and other similar ones.<\/li>\n<li>These are words that absolve the reporters from their responsibility and delegate it to an unknown third party.<\/li>\n<\/ul>\n<p>The book was pretty good and for an outsider like me these are things that I&rsquo;ve been speculating about, but couldn&rsquo;t put my finger on. This was a great read and would definitely suggest it to people<\/p>"},{"title":"build - tony fadell","link":"https:\/\/suriya.cc\/books\/build\/","pubDate":"Thu, 13 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/build\/","description":"<p>Tony Fadell Writes about his lessons from his enrepreneurial and leadership role, shipping multiple successful products. A great book teaching about how companies, leaders and employees think<\/p>"},{"title":"make something wonderful - steve jobs","link":"https:\/\/suriya.cc\/books\/wonderful\/","pubDate":"Tue, 04 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/wonderful\/","description":"<blockquote>\n<p>There\u2019s lots of ways to be, as a person. And some people express their deep appreciation in different ways. But one of the ways that I believe people express their appreciation to the rest of humanity is to make something wonderful and put it out there. - Steve Jobs<\/p>"},{"title":"intellij hacks","link":"https:\/\/suriya.cc\/tech\/tinkering\/intellij\/","pubDate":"Mon, 03 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/intellij\/","description":"<p>live templates is very useful to record oft repeated patterns<\/p>\n<p><code>control + '<\/code> to toggle soft wrap in a file<\/p>"},{"title":"kafka","link":"https:\/\/suriya.cc\/tech\/cloud\/kafka\/","pubDate":"Mon, 03 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/cloud\/kafka\/","description":"<h2 id=\"apache-kafka\">apache kafka<\/h2>\n<p><strong>event streaming platform<\/strong><\/p>\n<ul>\n<li><em>Events?<\/em> - incident of change<\/li>\n<\/ul>\n<h3 id=\"kafka-and-events---keyvalue-pairs\">kafka and events - key\/value pairs<\/h3>\n<p>based on <strong>Distributed commit log<\/strong><\/p>"},{"title":"system design","link":"https:\/\/suriya.cc\/tech\/practice\/sys_design\/","pubDate":"Mon, 03 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/sys_design\/","description":"<h2 id=\"scaling-to-million-users\">scaling to million users<\/h2>\n<ul>\n<li>isolate, process and database<\/li>\n<\/ul>\n<h3 id=\"db-scaling\">db scaling<\/h3>\n<ul>\n<li><strong>Database replication<\/strong> Master(writes,updates), slave(reads) setup for databases helps scale reads in a database\n<ul>\n<li>When a master node goes down, a slave is selected and promoted to become the master\\<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3 id=\"process-scaling\">process scaling<\/h3>\n<p>Scaling process nodes horizontally in a fan out fashion with a <strong>load balancer<\/strong> in front, so that the requests can be distributed between servers. load balancers are able to keep track of the quality of the services. and make decisions on where to send which requests.<\/p>"},{"title":"web","link":"https:\/\/suriya.cc\/tech\/tinkering\/web\/","pubDate":"Mon, 03 Apr 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/web\/","description":"<h3 id=\"no-cache-image\">no cache image<\/h3>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>curl -s -I -X GET https:\/\/i.countdownmail.com\/2212f0.gif\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> HTTP\/2 <span style=\"color:#ae81ff\">200<\/span> \n<\/span><\/span><span style=\"display:flex;\"><span> date: Sat, <span style=\"color:#ae81ff\">08<\/span> Oct <span style=\"color:#ae81ff\">2022<\/span> 07:10:40 GMT\n<\/span><\/span><span style=\"display:flex;\"><span> content-type: image\/gif\n<\/span><\/span><span style=\"display:flex;\"><span> vary: Accept-Encoding\n<\/span><\/span><span style=\"display:flex;\"><span> cache-control: no-cache,no-store,must-revalidate,max-age<span style=\"color:#f92672\">=<\/span>0,proxy-revalidate,no-transform,private\n<\/span><\/span><span style=\"display:flex;\"><span> pragma: no-cache\n<\/span><\/span><span style=\"display:flex;\"><span> expires: -1\n<\/span><\/span><span style=\"display:flex;\"><span> cf-cache-status: BYPASS\n<\/span><\/span><span style=\"display:flex;\"><span> report-to: <span style=\"color:#f92672\">{<\/span><span style=\"color:#e6db74\">&#34;endpoints&#34;<\/span>:<span style=\"color:#f92672\">[{<\/span><span style=\"color:#e6db74\">&#34;url&#34;<\/span>:<span style=\"color:#e6db74\">&#34;https:\\\/\\\/a.nel.cloudflare.com\\\/report\\\/v3?s=ojsVIWtY5FGmXMXpki%2BZhdPypWt9kJuNg1tWhv8q691GSk7n5Y2zuCCtFcFvTP%2FCMdLASEF90CYfW7sTh3rrcdGzwwEHl524UpTYmJrIU9uoFJ%2Br%2FTCOBAiBJeySbcA7UDrt%2Fr3e&#34;<\/span><span style=\"color:#f92672\">}]<\/span>,<span style=\"color:#e6db74\">&#34;group&#34;<\/span>:<span style=\"color:#e6db74\">&#34;cf-nel&#34;<\/span>,<span style=\"color:#e6db74\">&#34;max_age&#34;<\/span>:604800<span style=\"color:#f92672\">}<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> nel: <span style=\"color:#f92672\">{<\/span><span style=\"color:#e6db74\">&#34;success_fraction&#34;<\/span>:0,<span style=\"color:#e6db74\">&#34;report_to&#34;<\/span>:<span style=\"color:#e6db74\">&#34;cf-nel&#34;<\/span>,<span style=\"color:#e6db74\">&#34;max_age&#34;<\/span>:604800<span style=\"color:#f92672\">}<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> server: cloudflare\n<\/span><\/span><span style=\"display:flex;\"><span> cf-ray: 756d0edc3bd13c13-BLR\n<\/span><\/span><span style=\"display:flex;\"><span> alt-svc: h3<span style=\"color:#f92672\">=<\/span><span style=\"color:#e6db74\">&#34;:443&#34;<\/span>; ma<span style=\"color:#f92672\">=<\/span>86400, h3-29<span style=\"color:#f92672\">=<\/span><span style=\"color:#e6db74\">&#34;:443&#34;<\/span>; ma<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">86400<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>Basically, this is a service that creates timer gifs. based on the URL. the <code>cache-control<\/code> part is the most interesting. This is pretty efficient and asks the browser to not cache anything. This ensures that everytime the cache is new<\/p>"},{"title":"the psychology of money","link":"https:\/\/suriya.cc\/books\/psych_money\/","pubDate":"Tue, 28 Mar 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/psych_money\/","description":"<ul>\n<li>Great book on about money and other ideas, I definitely suggest it as a good read.<\/li>\n<li>How we spend money is mostly dependent on our childhood and how we were raised. Children raised during the great depression are more thrifty than children who grow up during times of great increases in wealth. This feels obvious, until we realise that this applies to us as well. Growing from an environment of low resources makes us very efficient with them and vice versa.<\/li>\n<li>Luck and Risk are tightly coupled together in most cases. We call the upside of risk as luck. So, when you luck out, it means there was a possiblity of a downside as well. We generally don&rsquo;t appreciate all the things we are lucky for. Like, how healthy we are or, how we have a loving family and the ability to protect them and the state of society in general. The story of the investment banker who shorted during the great depressions and then went on to lose all of his wealth is telling.<\/li>\n<li><strong>Never Enough<\/strong> - The ability of a truly Rich person, is being able to say What I have is enough and exit the game. Mistaking a streak of luck for unbeatable skill and staking it all in Russian roulette is bound to make you broke. Knowing and having the freedom to quit is a super that is worth striving for. Stories of Madoff and Rajat Gupta.<\/li>\n<li><strong>Compounding is leverage<\/strong> - Humans naturally don&rsquo;t understand compounding. We take it easy. Story of warren buffet with 13% compounding for 50 years vs the other guy investment banker with 30 % compounding for 20 years. It is impossible to for the latter to catch up to the former in a lifetime. Short term setbacks don&rsquo;t matter, what matters is the ability to let compounding do its thing despite everything and trusting in the process. High frequency trading might be great for making a quick buck. But compounding is where the game actually is.<\/li>\n<li><strong>Making wealth vs holding on to that wealth<\/strong> are two completely different skill sets and state of minds. The distinction is important to succeed in the long term. In general success in finance is not about making the one-off great pay up but, <strong>it&rsquo;s all about consistently not screwing up<\/strong> and folding the cards when the game is not in our favour. Warren buffet has been only consistently not picking the failures. and that is what makes him a great investor. He can find stuff to not invest in.<\/li>\n<li>By <strong>having a bigger upside than downside<\/strong> we can make sure that we come out on top, irrespective of the outcomes. But, being consistent about how we make those decisions is hard.<\/li>\n<li>Controlling our own future is the best way to feel free in our lives. There are researches showing that people who are able to call shots in their lives are the happiest. Dying people don&rsquo;t really care about the amount of money in their bank accounts, they only care about all the things they were able to do.<\/li>\n<li><strong>Wealth is what we don&rsquo;t see<\/strong>, We see a person in a ferrari and assume he&rsquo;s wealthy despite having no idea whether its rented or loaned or whatever. Usually wealth of a person is what you don&rsquo;t see, the cars they didn&rsquo;t buy the show-offs they didn&rsquo;t do. Living under your means and having your baselines satisfied is the most important thing in life.<\/li>\n<li><strong>Saving consistently<\/strong> is one of the best predictor of financial success. it&rsquo;s like being on a diet for a healthier body. We might crave to buy that thing that we don&rsquo;t really need but the ability to say no and stick with our saving structure is very important.<\/li>\n<li><strong>Being reasonable is more important than being rational<\/strong> because we are emotional beings and we need to take decisions based on multiple dimensions, in those cases being reasonable is more important than being coldly rational, especially when it comes to family.<\/li>\n<li>History is only a map of what happened in the past not a map of what would happen in the future. Projecting something in the past to the future is a fallacy that a lot of people make and something that is not reasonable. Surprising things happen constantly around us. But, the conundrum is that we are only able to predict something based on past incidents.<\/li>\n<li>Having and <strong>error margin is very important<\/strong>, because predictions carry risk with them and can turn tides quickly. In those case, having a healthy amount of margin of error is important.<\/li>\n<li>The problem with consistent compounding is that we need to create a plan and then stick with it for years. But, we are humans and we change constantly, So will our goals, financial or otherwise. So, it is very important to take time to strategize better and have fallbacks.<\/li>\n<li>When somebody is offering advice for free. be sure you understand their motivations properly. Usually, nothing comes for free and there are a lot of grifters trying to make a quick buck. For examples a company&rsquo;s stock price was supposed to represent it&rsquo;s value in the long term. But, some short term grifters aggregate onto a specific stock and push its value to high in the short term and creating a bubble.<\/li>\n<li>Pessimism is easy because humans are generally risk averse and avoid ruin at all costs. Being optimistic takes a lot more creativity. Be the reason for a little bit more optimism in the world.<\/li>\n<\/ul>"},{"title":"where wizards stay up late","link":"https:\/\/suriya.cc\/books\/wizard\/","pubDate":"Wed, 15 Mar 2023 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/wizard\/","description":"<ul>\n<li>Where wizards stay up late - 2023-03-15 14:28\n<ul>\n<li>An incredible book, looking back at the birth of a technological marvel.<\/li>\n<li>Any idea requires its own faithful followers. Packets in the internet are the building blocks of internet, but it took 4 - 5 years for people from the traditional phone industry to unlearn their ways and see the utility.<\/li>\n<li>Things we assume as just regular reality today was just a spark in someone&rsquo;s mind years ago. This is true for the structure of a typical email to the laws and structures around us.<\/li>\n<\/ul>\n<\/li>\n<\/ul>"},{"title":"hugo notes","link":"https:\/\/suriya.cc\/tech\/tinkering\/hugo\/","pubDate":"Mon, 26 Dec 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/hugo\/","description":"<h3 id=\"making-a-nested-map\">making a nested map<\/h3>\n<p><code>$m := dict (slice &quot;n&quot; &quot;m&quot; &quot;new&quot;) &quot;true&quot;<\/code> creates a nested map with <code>m.n.m.new<\/code> returning &ldquo;true&rdquo;<\/p>"},{"title":"mapreduce","link":"https:\/\/suriya.cc\/tech\/practice\/mapreduce\/","pubDate":"Sat, 24 Dec 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/mapreduce\/","description":"<p>MapReduce is a programming model published in 2004 by google, to process large data in clusters<\/p>\n<p>in general, it involves 2 events<\/p>"},{"title":"language design","link":"https:\/\/suriya.cc\/tech\/practice\/language_design\/","pubDate":"Sat, 10 Dec 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/language_design\/","description":"<h2 id=\"rust-and-ownership\">rust and ownership<\/h2>\n<p>Rust has <strong>no garbage collector<\/strong><\/p>\n<h2 id=\"garbage-collectors\">garbage collectors<\/h2>\n<h2 id=\"scala-and-actor-model\">scala and actor model<\/h2>"},{"title":"bloom filter","link":"https:\/\/suriya.cc\/tech\/algos\/bloom_filter\/","pubDate":"Sat, 12 Nov 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/bloom_filter\/","description":"<p>Bloom filters have nothing to do with flowers (despite the blog emoji \ud83e\udd78). It was conceived by Burton howard Bloom. This is a <em>Space-efficient probablistic data structure<\/em>. In Bloom filter false positives are very much possible, but false-negatives are not possible (i.e.) a query either returns, &ldquo;possibly in set&rdquo; or &ldquo;definitely not&rdquo;. So, when a bloom filter returns &ldquo;no&rdquo; you can believe it, if it returns &ldquo;maybe&rdquo; you cannot. And it is very very efficient.<\/p>"},{"title":"javascript for impatient programmers","link":"https:\/\/suriya.cc\/tech\/practice\/js\/js_for_impatient\/","pubDate":"Sun, 06 Nov 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/js\/js_for_impatient\/","description":"<p>These are my notes from following the excellent book, <a href=\"https:\/\/exploringjs.com\/impatient-js\/index.html\">javascript for impatient programmers<\/a>\n by axel Rauschmayer<\/p>\n<h3 id=\"understanding-let-and-var\">understanding let and var<\/h3>\n<p>The <code>let<\/code> keyword creates a new variable locally. it is <strong>not attached to the global object<\/strong><\/p>"},{"title":"regex","link":"https:\/\/suriya.cc\/tech\/practice\/regex\/","pubDate":"Sun, 06 Nov 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/regex\/","description":"<p>?(?!.<em>]).<\/em>[^(]) - Select all content between the last <code>?<\/code> and the last <code>)<\/code> in a line and excludes if <code>]<\/code> comes between<\/p>"},{"title":"designing data intensive applications notes","link":"https:\/\/suriya.cc\/tech\/practice\/ddia\/","pubDate":"Sun, 23 Oct 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/ddia\/","description":"<h1 id=\"ch-1-reliable-scalable-and-maintainable-applications\">ch-1: reliable, scalable and maintainable applications<\/h1>\n<ul>\n<li>\n<p>reliability, The system should continue to work <strong>correctly<\/strong> even in the face of adversity (hw, sw or human).<\/p>"},{"title":"miscelaneous details about golang","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/misc\/","pubDate":"Mon, 19 Sep 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/misc\/","description":"<h3 id=\"go-get-vs-go-install\"><code>go get<\/code> vs <code>go install<\/code><\/h3>\n<p><code>go get<\/code>, downloads and adds in GOPATH.\n<code>go install<\/code>, add<\/p>\n<h4 id=\"creating-mutex\">creating mutex<\/h4>\n<p>When embedding a mutex in a struct. any functions associated to the mutex should utilize a pointer receiver.<\/p>"},{"title":"aws ses","link":"https:\/\/suriya.cc\/tech\/cloud\/aws_ses\/","pubDate":"Sat, 17 Sep 2022 14:14:11 +0000","guid":"https:\/\/suriya.cc\/tech\/cloud\/aws_ses\/","description":"<p>In Sandbox mode, mail can be sent only to verified emails. We need permission for that specific address.<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/ses\/latest\/dg\/request-production-access.html\">https:\/\/docs.aws.amazon.com\/ses\/latest\/dg\/request-production-access.html<\/a>\n<\/li>\n<\/ul>"},{"title":"pocketbase","link":"https:\/\/suriya.cc\/tech\/tinkering\/pocketbase\/","pubDate":"Thu, 01 Sep 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/pocketbase\/","description":"<p>I&rsquo;ve been looking for an alternative to firebase. Because OSS FTW!!<\/p>\n<p>Pocketbase is an alternative with A bold claim.<\/p>\n<p>But, it really does 2 things very well, AUTH APIs and CRUD APIs over DBs.<\/p>"},{"title":"dbms - cmu db user group","link":"https:\/\/suriya.cc\/tech\/practice\/DB\/","pubDate":"Sat, 30 Jul 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/DB\/","description":"<h3 id=\"sources\">sources<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.youtube.com\/watch?v=oeYBdghaIjc&amp;list=PLSE8ODhjZXjbohkNBWQs_otTrBTrjyohi\">CMU database group<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"relational-model\">relational model<\/h2>\n<p><strong>Relation<\/strong> is unordered set of <strong>tuples<\/strong>. A <strong>tuple<\/strong> is a set of attribute values.<\/p>"},{"title":"product ideas","link":"https:\/\/suriya.cc\/general\/product-ideas\/","pubDate":"Sat, 16 Jul 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/product-ideas\/","description":"<p>Inspiration comes from many places. I love jotting them down here.<\/p>\n<h3 id=\"small-app-ideas\">small app ideas<\/h3>\n<ul>\n<li>virtual bookshelf where you can showcase your books.<\/li>\n<li>link storage and recording as a telegram bot or email etc with the ability to show case in a website<\/li>\n<li>Something with Audio models such as <a href=\"https:\/\/fugatto.github.io\/\">fugatto<\/a>\n\n<ul>\n<li>Isolate tracks<\/li>\n<li>humming -&gt; Song<\/li>\n<li>Unlimited song\/rap\/metallic generation.<\/li>\n<li>Introduce a product<\/li>\n<li>Introduce<\/li>\n<\/ul>\n<\/li>\n<li>Ideas with <a href=\"https:\/\/www.anthropic.com\/news\/model-context-protocol\">Model Context Protocol<\/a>\n enabling LLM Agents with cool tools\n<ul>\n<li>Object storage for models<\/li>\n<li>Memory layer for any agent<\/li>\n<li>Auth layer for agents to authenticate into a page. It is quite obvious how this can even be extended into a secret manager for agents as when these things grow there is a need to manage private and personal data. Maybe credit card information, etc.<\/li>\n<\/ul>\n<\/li>\n<li>Inventory management with Video models. Going from video -&gt; list of inventory. Gemini can do it, tested.<\/li>\n<li>talk with a youtube video\n<ul>\n<li>Simple extension to inject a chat window + summarization<\/li>\n<\/ul>\n<\/li>\n<li>Talking with a document<\/li>\n<li>Unstructured data to structured data<\/li>\n<li>Image or Video cropping with SAM2 or <a href=\"https:\/\/yangchris11.github.io\/samurai\/\">SAMURAI<\/a>\n models.<\/li>\n<li>Video Editing LLM going from a long form video<\/li>\n<li>LLamacoder for any LL\n<ul>\n<li><a href=\"https:\/\/github.com\/nutlope\/llamacoder\">https:\/\/github.com\/nutlope\/llamacoder<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<li>async prompt processing APIs<\/li>\n<li>Python library for overarching batch prompts<\/li>\n<li>Release Youtube chrome Extension<\/li>\n<li>Browser automation for testing, automatically booking tickets etc.<\/li>\n<li>native MP3 player, with a remote library<\/li>\n<\/ul>\n<h2 id=\"problems-i-have\">problems i have<\/h2>\n<ul>\n<li>\n<p>LLM x privacy<\/p>"},{"title":"visualising performance","link":"https:\/\/suriya.cc\/tech\/tinkering\/profiler\/","pubDate":"Wed, 13 Apr 2022 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/profiler\/","description":"<h3 id=\"interesting\">interesting:<\/h3>\n<ul>\n<li>Flame graphs don&rsquo;t show sequentiality. They are not sorted based on time. They are sorted by alphabets. Which means in the flame graphs, if<\/li>\n<\/ul>\n<p>eg.\n<img src=\"https:\/\/suriya.cc\/assets\/images\/flamegraph.png\"\n alt=\"flamegraph image\"\n loading=\"lazy\">\n<\/p>"},{"title":"the future and the story","link":"https:\/\/suriya.cc\/essays\/06_the_future_and_the_story\/","pubDate":"Mon, 11 Apr 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/essays\/06_the_future_and_the_story\/","description":"<p>Companies are valued much higher when they are pursuing something super big, super into the future. eg, facebook =&gt; meta, amazon =&gt; cloud, etc<\/p>"},{"title":"fixing chrome extension issues","link":"https:\/\/suriya.cc\/tech\/bugs\/browser_extension\/","pubDate":"Sat, 12 Feb 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/bugs\/browser_extension\/","description":"<p>Bugs in a browser extension are always frustrating because extensions are usually so brittle. There are so many error handling and other challenges.\nThis is from when I was building one.<\/p>"},{"title":"django issues and quick fixes","link":"https:\/\/suriya.cc\/tech\/tinkering\/django\/","pubDate":"Fri, 04 Feb 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/django\/","description":"<p>CSRF token invalid <code>__URL__<\/code> not in trusted origin<\/p>\n<p>This happens because there is no <code>CSRF_TRUSTED_ORIGINS<\/code> in the settings file. Also make sure that the url <strong>does not have an end slash<\/strong><\/p>"},{"title":"building an extension","link":"https:\/\/suriya.cc\/tech\/tinkering\/browser_extension\/","pubDate":"Wed, 02 Feb 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/browser_extension\/","description":"<p>browser extensions have been an area of interest for a while. I tried building an extension that would help me save stuff in my <a href=\"https:\/\/suriya.cc\/readlog\">readlog<\/a>\n. Sort of simply highlight stuff from within the page.<\/p>"},{"title":"searching for a cross platform framework","link":"https:\/\/suriya.cc\/tech\/tinkering\/search_cross_platform\/","pubDate":"Sat, 29 Jan 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/search_cross_platform\/","description":"<p>This is still a WIP and I&rsquo;ll be updating each one as I discover and play with new stuff.<\/p>\n<h2 id=\"why-cross-platform\">why cross platform?<\/h2>\n<p>There are majorly 2 mobile platforms and 3 desktop platforms. Browsers are acting as a cool layer between this, within the realms of which applications are consistently rendered and usability is not spoilt. This is awesome, because now you don&rsquo;t need 5X the development effort to deliver a software experience But only one. Which means velocity can be much faster. But the problem with this, is that &ldquo;websites&rdquo; are not really perceived as serious applicaitons. And there is very little control over the user experience. Native apps are a better way to deliver applications.<\/p>"},{"title":"surplus intellectual capacity","link":"https:\/\/suriya.cc\/essays\/05_surplus_capacity\/","pubDate":"Sat, 22 Jan 2022 22:15:00 +0000","guid":"https:\/\/suriya.cc\/essays\/05_surplus_capacity\/","description":"<p>When I was around 13 or 14 I used to have this wild vision of the world, where everybody was optimising for the betterment of humanity and not &ldquo;wasting&rdquo; their brains on useless stuff like movie gossips and whatnots. My (idiot) reasoning at the time was that, if only people around me wouldn&rsquo;t bring in non-utilitarian information to me, I would be able to do &ldquo;much&rdquo; more. But in reality it was only my younger self, justifying being lazy and not actively doing stuff and just simply complaining everything around.<\/p>"},{"title":"registering with google and other","link":"https:\/\/suriya.cc\/tech\/tinkering\/seo\/","pubDate":"Thu, 23 Dec 2021 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/seo\/","description":"<p>Without praying at the altar of google, A site doesn&rsquo;t exist in the internet.<\/p>\n<p>A site can be registered by visiting <a href=\"https:\/\/search.google.com\/search-console\">search.google.com<\/a>\n\nBut, before I&rsquo;m handed over the tools for SEO google does a &ldquo;ownership validation&rdquo;. they gave me a secret of sorts. I had to add a TXT Record in my DNS provider. And verify it.<\/p>"},{"title":"installing jekyll for the first time and issues","link":"https:\/\/suriya.cc\/tech\/tinkering\/ruby_v_xcode\/","pubDate":"Tue, 21 Dec 2021 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/ruby_v_xcode\/","description":"<p>I was trying to install jekyll in my local machine and faced this error<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>\/System\/Library\/Frameworks\/Ruby.framework\/Versions\/2.6\/usr\/lib\/ruby\/2.6.0\/mkmf.rb:467:in <span style=\"color:#e6db74\">`<\/span>try_do<span style=\"color:#960050;background-color:#1e0010\">&#39;<\/span>: The compiler failed to generate an executable file. <span style=\"color:#f92672\">(<\/span>RuntimeError<span style=\"color:#f92672\">)<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>You have to install development tools first.\n<\/span><\/span><\/code><\/pre><\/div><p>this was fixed by running<\/p>"},{"title":"local tunnels with cloudflare","link":"https:\/\/suriya.cc\/tech\/tinkering\/local_tunnels\/","pubDate":"Tue, 06 Jul 2021 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/local_tunnels\/","description":"<h1 id=\"exposing-local-services-with-cloudflare-tunnels\">Exposing Local Services with Cloudflare Tunnels<\/h1>\n<p>Cloudflare Tunnels let you expose local services to the internet without opening ports or configuring firewalls. Here&rsquo;s how to set it up.<\/p>"},{"title":"ruby hack","link":"https:\/\/suriya.cc\/tech\/tinkering\/ruby\/","pubDate":"Tue, 06 Jul 2021 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/ruby\/","description":"<p><code>rvm<\/code> is a tool to maintain a Ruby environment.\n<code>rvm --default<\/code> is a shortcut to set the default Ruby environment.\n<code>rvm use<\/code> is a shortcut to set the current Ruby environment.<\/p>"},{"title":"searching for a self-hosted vpn","link":"https:\/\/suriya.cc\/tech\/tinkering\/vpn\/","pubDate":"Tue, 06 Jul 2021 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/vpn\/","description":"<h2 id=\"goals\">goals:<\/h2>\n<ul>\n<li>Find a VPN solution that would be able to maintain an ACL.<\/li>\n<li>No licensing solutions<\/li>\n<\/ul>\n<p>OpenVPN - Not Truly self-hosted, in the sense that you will have to pay for the software in the range of $7 per user. Even if you self host it<\/p>"},{"title":"ostep-1 virtualisation","link":"https:\/\/suriya.cc\/tech\/practice\/ostep\/Virtualisation\/","pubDate":"Thu, 01 Apr 2021 22:15:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/ostep\/Virtualisation\/","description":"<h1 id=\"ch4--processes\">ch4 : processes<\/h1>\n<p><ins>The problem<\/ins>: How to create the illusion of many CPUs when, we only have few.<\/p>\n<p>done by running one process and pausing and running another and so on. This is called <strong>time sharing<\/strong>.<\/p>"},{"title":"arm","link":"https:\/\/suriya.cc\/essays\/arm\/","pubDate":"Fri, 25 Sep 2020 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/arm\/","description":"<p>A history lesson on ARM, The company that is at the epicenter of all tech innovation in the 21st century.<\/p>"},{"title":"the missing innovation","link":"https:\/\/suriya.cc\/essays\/02_missing_innovation\/","pubDate":"Tue, 24 Mar 2020 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/02_missing_innovation\/","description":"<p>Historically, Most innovation has originated from developed nations and trickled down to developing ones, very much following the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Trickle-down_effect\">Trickle down efffect<\/a>\n<\/p>"},{"title":"GPT2","link":"https:\/\/suriya.cc\/tech\/tinkering\/gpt-2\/","pubDate":"Tue, 16 Jul 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/gpt-2\/","description":"<p>It is such a great time to be alive! so many new things and so many innovations in all fields. I was reading about the GPT-2 which was released by OpenAI a few months back, in this blog. GPT-2 is a Natural language synthesiser, that is able to synthesise paragraphs naturally based on the raw input given to it.<\/p>"},{"title":"dogmatic pedagogy","link":"https:\/\/suriya.cc\/essays\/pedagogy\/","pubDate":"Sun, 30 Jun 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/pedagogy\/","description":"<p>I have studied in 6 different schools in india, representing different classes of society. I have studied under the \u2018I barely teach\u2019 history teacher, to the \u2018I don\u2019t know English\u2019 English teacher of out villages to the \u2018I know it all\u2019 chemistry teacher to the \u2018I am a smart\u2019 Math teacher from the cities. Not to mention, the \u2018I never teach\u2019 Electronics Professors to the \u2018I don\u2019t know log(10)\u2019 Math professor. Even though I respect their age. To me, any person who teaches held less value than the ones who did something else.<\/p>"},{"title":"on turing","link":"https:\/\/suriya.cc\/essays\/turing\/","pubDate":"Sun, 12 May 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/turing\/","description":"<p><img src=\"https:\/\/suriya.cc\/assets\/images\/alan_turing_notebook.webp\"\n alt=\"turing\"\n loading=\"lazy\">\n<\/p>\n<p>I was aware that, computers used logic gates and that they operated using binary bits. But, how do the stupid transistors turn into these amazing computers? This was an intriguing question I\u2019ve bee having for a long while. But, considering that I was blindly throwing the wall and hoping that some of them sticks. I had no possibility of dwelling a lot on these things. And I was this ignoramus, blindly typing away google search strings and questions.<\/p>"},{"title":"alternate medicing","link":"https:\/\/suriya.cc\/essays\/alternate-medicine\/","pubDate":"Fri, 15 Mar 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/alternate-medicine\/","description":"<p>I was gasping for air for each breath that I take, I have been enduring the gruelling pain in my chest cavity that has been crushing me slowly for the past two days. My left arm was starting to pain, as if I\u2019m in the end of a 12 hour marathon. Even keeping myself upright was taking up all the oxygen necessary to keep me. I had been sitting in that clinic in the same state (probably worse) for the past two hours. The Homeopath (Whom I don\u2019t trust) was sitting directly in front of me, with bright warm smile, as if nothing serious was happening. She had given me three dosage of her concoction, I felt no better than before. She kept telling me it\u2019s nothing and everything will be alright. I knew that it wasn\u2019t nothing and everything isn\u2019t alright. My parents were there right by me, keeping me comfort, just like any ideal parent. If only, I was able to suck in enough breath to tell them that it wasn\u2019t working. If only.<\/p>"},{"title":"farming","link":"https:\/\/suriya.cc\/essays\/farming-2\/","pubDate":"Sun, 03 Mar 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/farming-2\/","description":"<p>As I\u2019ve explained in <a href=\"https:\/\/suriya.cc\/essays\/farming\">this post<\/a>\n. Farming has high reverence among Indians. Farmers are portrayed as martyrs who give their lives to save their nation. When examined closer into this context. It reveals a deep cognitive decision by the nascent Indian Government of 1950s.<\/p>"},{"title":"farming","link":"https:\/\/suriya.cc\/essays\/farming\/","pubDate":"Mon, 18 Feb 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/farming\/","description":"<p>Ever since my childhood days, I was repeatedly and irrevocably taught that \u201cFarming is the Backbone of India\u201d and I\u2019ve never questioned it. It seemed obvious, everybody needs food ergo nation needs farmers. But as is normal, the public perception of things are erroneous in a plethora of ways.<\/p>"},{"title":"consumers","link":"https:\/\/suriya.cc\/essays\/consumers\/","pubDate":"Wed, 13 Feb 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/consumers\/","description":"<p>Industrialisation has changed the world in many ways. It has increased employment created stacks upon stacks of factories. Created more wealth than ever and most importantly, it has created the most accomplished consumers in the history of humanity.<\/p>"},{"title":"aser 2018, takeaways tamilnadu","link":"https:\/\/suriya.cc\/essays\/aser-2018\/","pubDate":"Tue, 01 Jan 2019 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/aser-2018\/","description":"<p>ASER or the Annual Survey of Education Report is a project by the NGO foundation Pratham. ASER aims at providing insights into the quality of education in India. They\u2019ve been doing this report since 2006. They intend to provide insight into the quality of education in India.<\/p>"},{"title":"dunning kruger effect","link":"https:\/\/suriya.cc\/essays\/dunning-kruger\/","pubDate":"Sat, 08 Sep 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/dunning-kruger\/","description":"<p>We all have witnessed it haven\u2019t we? The most studious boy in the class being nervous about the exam and the less prepared kid being super confident. The most knowledgeable person in the room, staying silent in an argument and the dumb ones making a lot of noise with complete confidence.<\/p>"},{"title":"ignorance on data","link":"https:\/\/suriya.cc\/general\/ignorance-data\/","pubDate":"Sat, 08 Sep 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/general\/ignorance-data\/","description":"<p>Ever since I read Daniel Kahneman\u2019s \u2018Thinking, Fast and Slow\u2019 roughly about a year ago. I have had this penchant for all things that are the folly of the mind. Also, Kahneman\u2019s book was what showed how important Data is, and how they can play tricks on your mind.<\/p>"},{"title":"dictionary","link":"https:\/\/suriya.cc\/tech\/practice\/dictionary\/","pubDate":"Thu, 16 Aug 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/dictionary\/","description":"<p>I have this habit of memorising new words, each time I hear one and I remember the perfect scenario of the words because it helps in remembering them. So generally my head is filled with stupid instances when I heard or read them.<\/p>"},{"title":"villages","link":"https:\/\/suriya.cc\/essays\/villages\/","pubDate":"Tue, 07 Aug 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/villages\/","description":"<p>I often notice that, whenever I first say to my friends that I am from a village, they tend to imagine a neat row of huts near a mountain with the faintly peeking out warm sun and birds and farmlands. If the conversation continues they\u2019ll even mention that, life must be super peaceful there, devoid of the city noise and the pollution and whatnot. While that\u2019s not too far off. It\u2019s not the actual story either, and life is anything but peaceful.<\/p>"},{"title":"villages, a followup","link":"https:\/\/suriya.cc\/essays\/villages-2\/","pubDate":"Tue, 07 Aug 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/villages-2\/","description":"<p>Another huge misconception that I find is that people tend to imagine village people are these truly kind and helping people and that they live in harmony with their people. That it is full of naive people with clear, untainted minds.<\/p>"},{"title":"imperfection, a followup","link":"https:\/\/suriya.cc\/essays\/imperfection-2\/","pubDate":"Wed, 25 Jul 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/imperfection-2\/","description":"<p>As I reflect further on my <a href=\"https:\/\/suriya.cc\/essays\/imperfection\">imperfection ideology<\/a>\n. It seems obvious that, the amorphous nature of the content is bound to be misinterpreted. It could be seen as an escape clause to be lazy and non-agile physically or otherwise. saying that they\u2019re being \u201creal\u201d or that they\u2019re being content with themselves and don\u2019t give a about what others think.<\/p>"},{"title":"calculator","link":"https:\/\/suriya.cc\/tech\/practice\/calc\/","pubDate":"Fri, 20 Jul 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/calc\/","description":"<p>I always used to wonder how people create applications. Like, I\u2019ll install an application and wonder how the production team would\u2019ve discussed days on end to decide on the size of the buttons and their positions. It felt amazing, that people take so much care in these finicky details.<\/p>"},{"title":"imperfection","link":"https:\/\/suriya.cc\/essays\/imperfection\/","pubDate":"Fri, 06 Jul 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/imperfection\/","description":"<p>I wonder.<\/p>\n<p>When\u2019d it become so important for a person to be successful? When did it become more important to live, than to chase perfection? Why do you really need a \u201cPurpose in life\u201d? isn\u2019t the purpose of life is to live and not opulence?<\/p>"},{"title":"social detox","link":"https:\/\/suriya.cc\/essays\/social-detox\/","pubDate":"Fri, 15 Jun 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/social-detox\/","description":"<p>Today marks a year of me staying away from social media of any sorts. It\u2019s been great and I don\u2019t intend on going back. A lot of people are appalled and amused at me being Anti-social media. I\u2019m pretty confident that that from their perspective, I look like a Grinch. I don\u2019t blame them though It\u2019s a fair assumption for people to make. But, There are several layers of reasoning for it.<\/p>"},{"title":"availability heuristic","link":"https:\/\/suriya.cc\/essays\/availability\/","pubDate":"Wed, 23 May 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/availability\/","description":"<p>It\u2019s impressive, how we are completely oblivious to most operations of our brain. We are made to learn about the functions of the physical aspect of the body. Close to everybody knows that there\u2019s a small intestine and a large intestine. Which has as much practical significance as the turd within them. But, ask about the flaws and potholes in which your brain is bedecked with, nobody has a clue. It\u2019s not the fault of the people. But, the nature of the flaw. The flaws are just so perfect that nobody is aware of the flaw.<\/p>"},{"title":"the black swan","link":"https:\/\/suriya.cc\/books\/black_swan\/","pubDate":"Thu, 10 May 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/black_swan\/","description":"<p>Some books are hollow and superfluous that even a rough skimming feels like a waste of time (like \u2018How to win friends and influence people\u2019). Some books are super complicated in their content that it bogs down the author\u2019s voice. It\u2019s the balance between those two, that makes up to a very appreciable and enjoyable non \u2013 fiction reading. The ideas have to be complex, but the explanation simple.<\/p>"},{"title":"peace","link":"https:\/\/suriya.cc\/essays\/peace\/","pubDate":"Mon, 07 May 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/peace\/","description":"<p>In 1985, British musicologist Clive Wearing woke to find that his hippocampus has been sieved out, owing to Herpes Encephalitis. From that day forward, he was in a state of perpetual immediacy. Unable to produce new memories, always present in the sublime present. The historical incarnation of Leonard in the movie Memento. Wearing\u2019s wife recorded her unrequited love and her husband\u2019s struggles in a book named, Forever Today.<\/p>"},{"title":"entropy, displays and disruption","link":"https:\/\/suriya.cc\/tech\/tinkering\/led-cube\/","pubDate":"Sat, 21 Apr 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/led-cube\/","description":"<p>Extremely long back. I saw this random video of an 8x8x8 which had these crazy animations that were mind-boggling to me and I\u2019ve always been wanting to create one of my own. Only problem being I\u2019m just too much of a lazy douche to do anything.<\/p>"},{"title":"entropy, displays and disruption","link":"https:\/\/suriya.cc\/essays\/display\/","pubDate":"Tue, 17 Apr 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/display\/","description":"<p>There is something to be said about the exponentiality of technological advancements, that outdoes any that nature could come up with, by a factor of some millions.<\/p>"},{"title":"Tkinter & datetime","link":"https:\/\/suriya.cc\/tech\/practice\/tkinter\/","pubDate":"Wed, 11 Apr 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/tkinter\/","description":"<p>I thought I\u2019d try to create a time counter using Tkinter and Datetime modules.<\/p>\n<p>The idea was to get an input of the age and then calculate the age, with a live counter showing Hours, minutes and seconds.<\/p>"},{"title":"memoir of stupid things","link":"https:\/\/suriya.cc\/essays\/stupid\/","pubDate":"Fri, 23 Mar 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/stupid\/","description":"<p>For the past couple months I\u2019ve been learning to program. I\u2019m completely clueless in computers because, The last time I actually used a computer was when I was 12 and I only knew how to play a bunch of flash games. Since then I\u2019ve been completely oblivious to everything computers. Now that, the past has come to haunt me. I decided I should get this over with and started reading loads on computers. I was 19 and I still haven\u2019t been in touch with a computer. (If you neglect the occasional movie watching in my father\u2019s laptop. Which we\u2019re not allowed to touch)<\/p>"},{"title":"why blog","link":"https:\/\/suriya.cc\/essays\/why-blog\/","pubDate":"Fri, 23 Mar 2018 00:00:00 +0000","guid":"https:\/\/suriya.cc\/essays\/why-blog\/","description":"<p>I\u2019ve always thought of blogging as this thing that gets you to a vast number of audiences and all the cliche little concepts.<\/p>"},{"title":"todo","link":"https:\/\/suriya.cc\/tech\/algos\/1_todo\/","pubDate":"Fri, 12 Nov 2010 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/1_todo\/","description":"<ul>\n<li>Levenshtein automaton<\/li>\n<li>paxos algorithm\n<ul>\n<li><a href=\"https:\/\/martinfowler.com\/articles\/patterns-of-distributed-systems\/paxos.html\">https:\/\/martinfowler.com\/articles\/patterns-of-distributed-systems\/paxos.html<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>"},{"title":{},"link":"https:\/\/suriya.cc\/books\/scattered_minds\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/books\/scattered_minds\/","description":{}},{"title":{},"link":"https:\/\/suriya.cc\/tech\/algos\/problems\/cp4\/flash_cards\/input\/00_ch1\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/problems\/cp4\/flash_cards\/input\/00_ch1\/","description":"<h1 id=\"bounds\">bounds<\/h1>\n<h2 id=\"n2-bound\">n^2 bound<\/h2>\n<p>~ 10^6 operations<\/p>\n<h2 id=\"10\">10!<\/h2>\n<p>~ 4 * 10^7 operations.<\/p>"},{"title":{},"link":"https:\/\/suriya.cc\/tech\/algos\/README\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/algos\/README\/","description":"<h1 id=\"algorithms\">algorithms<\/h1>\n<p>Safehouse to keep all the algorithms that I learn or come across.<\/p>\n<h2 id=\"project-epigram\">project epigram<\/h2>\n<ul>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> 11\/22 <a href=\"https:\/\/leetcode.com\/problems\/regular-expression-matching\/\">Regex matching<\/a>\n #dynamic_programming<\/li>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> 11\/23 <a href=\"https:\/\/leetcode.com\/problems\/longest-valid-parentheses\/\">Longest Valid Parentheses<\/a>\n #dynamic_programming<\/li>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> 11\/24 <a href=\"https:\/\/leetcode.com\/problems\/trapping-rain-water\/\">Trap Rain Water<\/a>\n #dynamic_programming<\/li>\n<li><input checked=\"\" disabled=\"\" type=\"checkbox\"> 11\/25 <a href=\"https:\/\/leetcode.com\/problems\/find-minimum-in-rotated-sorted-array-ii\/\">Minimum in Rotated Sorted Array II<\/a>\n #binary_search<\/li>\n<li><input disabled=\"\" type=\"checkbox\"> 11\/26 <a href=\"https:\/\/leetcode.com\/problems\/count-of-smaller-numbers-after-self\/\">Count of Smaller Numbers After Self<\/a>\n #binary_search<\/li>\n<li><input disabled=\"\" type=\"checkbox\"> 11\/27 <a href=\"https:\/\/leetcode.com\/problems\/count-of-range-sum\/\">Count of Range Sum<\/a>\n #binary_search<\/li>\n<li><input disabled=\"\" type=\"checkbox\"> 11\/28 <a href=\"https:\/\/leetcode.com\/problems\/minimum-edge-reversals-so-every-node-is-reachable\/\">Minimum Edge Reversals So Every Node is reachable<\/a>\n #depth_first_search<\/li>\n<li><input disabled=\"\" type=\"checkbox\"> 11\/29 <a href=\"https:\/\/leetcode.com\/problems\/minimum-reverse-operations\">Minimum Reverse Operations<\/a>\n #depth_first_search<\/li>\n<li><input disabled=\"\" type=\"checkbox\"> 11\/30 <a href=\"https:\/\/leetcode.com\/problems\/height-of-binary-tree-after-subtree-removal-queries\">Height of binary tree after subtree removal queries<\/a>\n #depth_first_search<\/li>\n<li><input disabled=\"\" type=\"checkbox\"> 11\/31 <a href=\"https:\/\/leetcode.com\/problems\/frog-position-after-t-seconds\">Frog after T seconds<\/a>\n #breadth_first_search<\/li>\n<li><input disabled=\"\" type=\"checkbox\"> 11\/32 <a href=\"https:\/\/leetcode.com\/problems\/divide-nodes-into-the-maximum-number-of-groups\/\">Divide nodes into the maximum number of groups<\/a>\n #breadth_first_search<\/li>\n<\/ul>"},{"title":{},"link":"https:\/\/suriya.cc\/tech\/ML\/broadcasting_rules\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/broadcasting_rules\/","description":{}},{"title":{},"link":"https:\/\/suriya.cc\/tech\/ML\/micrograd\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/ML\/micrograd\/","description":"<!-- ---\nemoji:\ntitle: Micrograd\ndescription: Notes from karpathy's micrograd\ndate: \nlayout:\n--- -->"},{"title":{},"link":"https:\/\/suriya.cc\/tech\/practice\/flutter\/README\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/flutter\/README\/","description":"<h2 id=\"learning-flutter\">learning flutter<\/h2>"},{"title":{},"link":"https:\/\/suriya.cc\/tech\/practice\/github_actions\/README\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/github_actions\/README\/","description":"<h1 id=\"github_action_learn\">github_action_learn<\/h1>\n<p>Learning github actions<\/p>"},{"title":{},"link":"https:\/\/suriya.cc\/tech\/practice\/golang\/README\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/README\/","description":"<h1 id=\"learning-golang\">learning golang<\/h1>\n<p>Resources and stuff captured, while learning golang<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-go\" data-lang=\"go\"><span style=\"display:flex;\"><span><span style=\"color:#f92672\">package<\/span> <span style=\"color:#a6e22e\">main<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">import<\/span> (\n<\/span><\/span><span style=\"display:flex;\"><span>\t<span style=\"color:#e6db74\">&#34;fmt&#34;<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\t<span style=\"color:#e6db74\">&#34;math\/rand&#34;<\/span> \n<\/span><\/span><span style=\"display:flex;\"><span>)\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#960050;background-color:#1e0010\">###<\/span> <span style=\"color:#a6e22e\">Articles<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#a6e22e\">List<\/span> <span style=\"color:#a6e22e\">of<\/span> <span style=\"color:#a6e22e\">articles<\/span> <span style=\"color:#a6e22e\">I<\/span> <span style=\"color:#a6e22e\">found<\/span> <span style=\"color:#a6e22e\">useful<\/span>.\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">-<\/span> [<span style=\"color:#a6e22e\">https<\/span>:<span style=\"color:#75715e\">\/\/nathany.com\/good\/](https:\/\/nathany.com\/good\/)<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">-<\/span> <span style=\"color:#a6e22e\">https<\/span>:<span style=\"color:#75715e\">\/\/jordanorelli.com\/post\/32665860244\/how-to-use-interfaces-in-go<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">-<\/span> <span style=\"color:#a6e22e\">https<\/span>:<span style=\"color:#75715e\">\/\/go.dev\/blog\/error-handling-and-go<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">-<\/span> <span style=\"color:#a6e22e\">https<\/span>:<span style=\"color:#75715e\">\/\/morsmachine.dk\/go-scheduler<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#960050;background-color:#1e0010\">###<\/span> <span style=\"color:#a6e22e\">Other<\/span> <span style=\"color:#a6e22e\">resources<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">-<\/span> <span style=\"color:#a6e22e\">gobyexample<\/span>.<span style=\"color:#a6e22e\">com<\/span>\n<\/span><\/span><\/code><\/pre><\/div>"},{"title":{},"link":"https:\/\/suriya.cc\/tech\/practice\/js\/README\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/js\/README\/","description":"<h1 id=\"js_learn\">js_learn<\/h1>\n<p>Js is necessary, to be a self sufficient &ldquo;developer&rdquo;. To be able to deliver valuable software to people, in a reliable way. I would be documenting about my learnings here.<\/p>"},{"title":{},"link":"https:\/\/suriya.cc\/tech\/practice\/rust\/patterns\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/rust\/patterns\/","description":{}},{"title":{},"link":"https:\/\/suriya.cc\/tech\/privacy\/privacy_law\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/privacy\/privacy_law\/","description":{}},{"title":{},"link":"https:\/\/suriya.cc\/tech\/tinkering\/flexbox\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/flexbox\/","description":{}},{"title":{},"link":"https:\/\/suriya.cc\/tech\/tinkering\/git-diff\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/git-diff\/","description":"<p>git diff only diffs unstaged commits<\/p>\n<p>git add . does not stage empty directories<\/p>\n<p>if you add a new file to the empty directory it does not get tracked<\/p>"},{"title":"about","link":"https:\/\/suriya.cc\/about\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/about\/","description":"<p>Hey!<\/p>\n<p>Wow! you made it here.<\/p>\n<p>I&rsquo;m a software engineer.<\/p>\n<p>I&rsquo;m trying to figure out how to have max impact in the world. i.e. your typical 21st century guy who naively believes he can make the world a better place and have significant impact.<\/p>"},{"title":"benchmarking","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/benchmarking\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/benchmarking\/","description":"<p>Benchmarking tools are built-in with the &ldquo;testing&rdquo; package<\/p>\n<p>These can be done by writing test files of the format &ldquo;<x>_test.go&rdquo;<\/p>"},{"title":"custom user agent for testing","link":"https:\/\/suriya.cc\/tech\/tinkering\/custom_ua\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/tinkering\/custom_ua\/","description":"<p>A <a href=\"https:\/\/en.wikipedia.org\/wiki\/User_agent\">user-agent<\/a>\n is used to recognize the browser and the device the project, <a href=\"https:\/\/developers.whatismybrowser.com\/useragents\/explore\/\">whatismybrowser.com<\/a>\n have a database of user agents it&rsquo;s just a string that says about your browser and device type that is sent as a cookie in every request. You can find your current user agent by googling &ldquo;<a href=\"https:\/\/www.google.com\/search?q=what&#43;is&#43;my&#43;user&#43;agent\">what is my user agent<\/a>\n&rdquo;<\/p>"},{"title":"dart by example","link":"https:\/\/suriya.cc\/tech\/practice\/flutter\/dart_basics\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/flutter\/dart_basics\/","description":"<h2 id=\"main\">main<\/h2>\n<p><code>main()<\/code> is the entrypoint for application<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main() {\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#39;Hello, World&#39;<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div><p>Also, this works<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main() <span style=\"color:#f92672\">=&gt;<\/span> print(<span style=\"color:#e6db74\">&#39;Hello&#39;<\/span>)\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"values\">values<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> print( <span style=\"color:#e6db74\">&#34;1+1=<\/span><span style=\"color:#e6db74\">${<\/span><span style=\"color:#ae81ff\">1<\/span><span style=\"color:#f92672\">+<\/span><span style=\"color:#ae81ff\">1<\/span><span style=\"color:#e6db74\">}<\/span><span style=\"color:#e6db74\">&#34;<\/span> ) <span style=\"color:#75715e\">\/\/prints &#34;1+1=2&#34;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"for\">for<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">for<\/span> (<span style=\"color:#66d9ef\">var<\/span> i <span style=\"color:#f92672\">=<\/span> <span style=\"color:#ae81ff\">0<\/span>; i<span style=\"color:#f92672\">&lt;<\/span><span style=\"color:#ae81ff\">3<\/span>; i<span style=\"color:#f92672\">++<\/span>) {\n<\/span><\/span><span style=\"display:flex;\"><span> print( i )\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> collection <span style=\"color:#f92672\">=<\/span> [<span style=\"color:#ae81ff\">3<\/span>,<span style=\"color:#ae81ff\">4<\/span>,<span style=\"color:#ae81ff\">5<\/span>]\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">for<\/span> (<span style=\"color:#66d9ef\">var<\/span> x <span style=\"color:#66d9ef\">in<\/span> collection) { <span style=\"color:#75715e\">\/\/&lt;&lt;-- This works like python\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> print(x)\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"conditionals\">conditionals<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (<span style=\"color:#ae81ff\">7<\/span><span style=\"color:#f92672\">%<\/span><span style=\"color:#ae81ff\">2<\/span> <span style=\"color:#f92672\">==<\/span> <span style=\"color:#ae81ff\">0<\/span>) {\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#39;7 is even&#39;<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span> ) <span style=\"color:#66d9ef\">else<\/span> {\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#39;7 is odd&#39;<\/span>)\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#75715e\">\/\/ternary operators\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> <span style=\"color:#66d9ef\">var<\/span> isAlive <span style=\"color:#f92672\">=<\/span> <span style=\"color:#66d9ef\">true<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> monday <span style=\"color:#f92672\">=<\/span> isAlive<span style=\"color:#f92672\">?<\/span><span style=\"color:#e6db74\">&#39;doctor&#39;<\/span><span style=\"color:#f92672\">:<\/span> <span style=\"color:#66d9ef\">null<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#960050;background-color:#1e0010\">`<\/span>$moday<span style=\"color:#960050;background-color:#1e0010\">`<\/span>) <span style=\"color:#75715e\">\/\/prints &#34;doctor&#34;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"null-aware-operators\">null aware operators<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> moday <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">&#39;doctor&#39;<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> tuesday;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> next <span style=\"color:#f92672\">=<\/span> tuesday <span style=\"color:#f92672\">??<\/span> monday; <span style=\"color:#75715e\">\/\/Assign monday if tuesday is null\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> wednesday;\n<\/span><\/span><span style=\"display:flex;\"><span> next <span style=\"color:#f92672\">??=<\/span> wednesday; <span style=\"color:#75715e\">\/\/ Assign if not null\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">String<\/span> thursday;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> length <span style=\"color:#f92672\">=<\/span> thursday<span style=\"color:#f92672\">?<\/span>.length; <span style=\"color:#75715e\">\/\/Call function if not null\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"switch\">switch<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">var<\/span> piece <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">&#39;knight&#39;<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">switch<\/span>(piece) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">case<\/span> <span style=\"color:#e6db74\">&#39;queen&#39;<\/span><span style=\"color:#f92672\">:<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">case<\/span> <span style=\"color:#e6db74\">&#39;bishop&#39;<\/span><span style=\"color:#f92672\">:<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#39;diagonal&#39;<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">case<\/span> <span style=\"color:#e6db74\">&#39;knight&#39;<\/span><span style=\"color:#f92672\">:<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#39;L-shape&#39;<\/span>)\n<\/span><\/span><span style=\"display:flex;\"><span>} \n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div><div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">class<\/span> <span style=\"color:#a6e22e\">FoodSpoiledError<\/span> <span style=\"color:#66d9ef\">extends<\/span> StateError {\n<\/span><\/span><span style=\"display:flex;\"><span> FoodSpoiledError (<span style=\"color:#66d9ef\">String<\/span> msg) <span style=\"color:#f92672\">:<\/span> <span style=\"color:#66d9ef\">super<\/span>(msg);\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">class<\/span> <span style=\"color:#a6e22e\">Potato<\/span> {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">int<\/span> age;\n<\/span><\/span><span style=\"display:flex;\"><span> Potato(<span style=\"color:#66d9ef\">this<\/span>.age);\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">String<\/span> peel() {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (age<span style=\"color:#f92672\">&gt;<\/span><span style=\"color:#ae81ff\">4<\/span>) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">throw<\/span> <span style=\"color:#66d9ef\">new<\/span> FoodSpoiledError(<span style=\"color:#e6db74\">&#39;Potato is spoiled&#39;<\/span>)\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">return<\/span> <span style=\"color:#e6db74\">&#34;peeled&#34;<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> p <span style=\"color:#f92672\">=<\/span> Potato(<span style=\"color:#ae81ff\">7<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">try<\/span> {\n<\/span><\/span><span style=\"display:flex;\"><span> p.peel();\n<\/span><\/span><span style=\"display:flex;\"><span> } on FoodSpoiledError <span style=\"color:#66d9ef\">catch<\/span>(_) {\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#34;no&#34;<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">try<\/span> {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">throw<\/span>(<span style=\"color:#e6db74\">&#34;potato&#34;<\/span>); <span style=\"color:#75715e\">\/\/Anything can be thrown as an error;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> <span style=\"color:#66d9ef\">catch<\/span>(_) {\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#34;caught potato&#34;<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#75715e\">\/\/ Exceptions without try catch halt execution\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> p.peel();\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"queue\">queue<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> q <span style=\"color:#f92672\">=<\/span> <span style=\"color:#66d9ef\">new<\/span> Queue.from([<span style=\"color:#ae81ff\">300<\/span>, <span style=\"color:#ae81ff\">200<\/span>, <span style=\"color:#ae81ff\">100<\/span>, <span style=\"color:#ae81ff\">500<\/span>]); <span style=\"color:#75715e\">\/\/Optimised for adding items to the head or tail.\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#75715e\">\/\/Queues implement Iterable\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> print(q.takewhile(i) <span style=\"color:#f92672\">=&gt;<\/span> i <span style=\"color:#f92672\">&gt;<\/span> <span style=\"color:#ae81ff\">100<\/span>)); <span style=\"color:#75715e\">\/\/prints &#34;{300, 200}&#34;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#75715e\">\/\/Consuming a queue\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> <span style=\"color:#66d9ef\">while<\/span> (q.first <span style=\"color:#f92672\">&gt;<\/span> <span style=\"color:#ae81ff\">100<\/span>) {\n<\/span><\/span><span style=\"display:flex;\"><span> q.removeFirst();\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span> print(q); <span style=\"color:#75715e\">\/\/print &#34;{100,500}&#34;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"functions\">functions<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span>yell(str) <span style=\"color:#f92672\">=&gt;<\/span> str.toUpperCase(); <span style=\"color:#75715e\">\/\/Valid function definition\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>List lines(<span style=\"color:#66d9ef\">String<\/span> str) {\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/^^ Return type\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> <span style=\"color:#66d9ef\">return<\/span> str.split(<span style=\"color:#e6db74\">&#39;<\/span><span style=\"color:#ae81ff\">\\n<\/span><span style=\"color:#e6db74\">&#39;<\/span>);\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> poemLines <span style=\"color:#f92672\">=<\/span> lines(poem);\n<\/span><\/span><span style=\"display:flex;\"><span> print(yell(poemLines.first)); <span style=\"color:#75715e\">\/\/POEM\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#75715e\">\/\/Functions are first-class citizens\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> <span style=\"color:#66d9ef\">var<\/span> whisper <span style=\"color:#f92672\">=<\/span> (<span style=\"color:#66d9ef\">String<\/span> str) <span style=\"color:#f92672\">=&gt;<\/span> str.toLowerCase();\n<\/span><\/span><span style=\"display:flex;\"><span> print(poemLines.map(whisper).last; <span style=\"color:#75715e\">\/\/poem\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>poem <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">&#39;poem&#39;<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"optional-parameters\">optional parameters<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">String<\/span> yell(<span style=\"color:#66d9ef\">String<\/span> str, [<span style=\"color:#66d9ef\">bool<\/span> exclaim <span style=\"color:#f92672\">=<\/span> <span style=\"color:#66d9ef\">false<\/span>]) {\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ ^^^^^^^^^^^ ordered optional parameter \n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> <span style=\"color:#66d9ef\">var<\/span> result <span style=\"color:#f92672\">=<\/span> str.toLowerCase();\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (exclaim) result <span style=\"color:#f92672\">=<\/span> result <span style=\"color:#f92672\">+<\/span> <span style=\"color:#e6db74\">&#39;!!!&#39;<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">return<\/span> result\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">String<\/span> whisper (<span style=\"color:#66d9ef\">String<\/span> str, {<span style=\"color:#66d9ef\">bool<\/span> mysteriously:<span style=\"color:#66d9ef\">false<\/span>}) {\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ ^^^^^^^ named optional parameter\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> <span style=\"color:#66d9ef\">var<\/span> result <span style=\"color:#f92672\">=<\/span> str.toLowerCase();\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">if<\/span> (mysteriously) result <span style=\"color:#f92672\">=<\/span> result <span style=\"color:#f92672\">+<\/span> <span style=\"color:#e6db74\">&#39;....&#39;<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">return<\/span> result;\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>main() {\n<\/span><\/span><span style=\"display:flex;\"><span> print (yell(<span style=\"color:#e6db74\">&#39;Hello, World&#39;<\/span>)); <span style=\"color:#75715e\">\/\/ prints &#34;Hello, World&#34;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> print (yell(<span style=\"color:#e6db74\">&#39;Hello, World&#39;<\/span>, <span style=\"color:#66d9ef\">true<\/span>)); <span style=\"color:#75715e\">\/\/ prints &#34;Hello, World!!!&#34;\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span> print (whisper(<span style=\"color:#e6db74\">&#39;Hello, World&#39;<\/span>, mysteriously: <span style=\"color:#66d9ef\">true<\/span>));\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"lexical-scope\">lexical scope<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/variables declared inside loops will have a new version each time.\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">var<\/span> functions <span style=\"color:#f92672\">=<\/span> [];\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#66d9ef\">for<\/span> (<span style=\"color:#66d9ef\">var<\/span> i<span style=\"color:#f92672\">=<\/span><span style=\"color:#ae81ff\">0<\/span>; i<span style=\"color:#f92672\">&lt;<\/span><span style=\"color:#ae81ff\">3<\/span>; i<span style=\"color:#f92672\">++<\/span>) {\n<\/span><\/span><span style=\"display:flex;\"><span> functions.add(() <span style=\"color:#f92672\">=&gt;<\/span> i);\n<\/span><\/span><span style=\"display:flex;\"><span> }\n<\/span><\/span><span style=\"display:flex;\"><span> \n<\/span><\/span><span style=\"display:flex;\"><span> functions.forEach((fn) <span style=\"color:#f92672\">=&gt;<\/span> print(fn())); <span style=\"color:#75715e\">\/\/ prints 0\\n1\\n2\\n\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"typedef\">typedef<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">typedef<\/span> <span style=\"color:#66d9ef\">bool<\/span> Validator(<span style=\"color:#66d9ef\">int<\/span> n); <span style=\"color:#75715e\">\/\/Definition of a function to be used\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>main(){\n<\/span><\/span><span style=\"display:flex;\"><span> Validator validate <span style=\"color:#f92672\">=<\/span> (<span style=\"color:#66d9ef\">int<\/span> n) <span style=\"color:#f92672\">=&gt;<\/span> n<span style=\"color:#f92672\">&gt;<\/span><span style=\"color:#ae81ff\">10<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span> print(<span style=\"color:#e6db74\">&#39;<\/span><span style=\"color:#e6db74\">${<\/span>both(<span style=\"color:#ae81ff\">5<\/span>)<span style=\"color:#e6db74\">}<\/span><span style=\"color:#e6db74\">&#39;<\/span>)\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"unused-variables\">unused variables<\/h2>\n<ul>\n<li>use underscore to silence dartanalyzer<\/li>\n<\/ul>\n<h2 id=\"constants\">constants<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-dart\" data-lang=\"dart\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">import<\/span> <span style=\"color:#960050;background-color:#1e0010\">`<\/span>dart<span style=\"color:#960050;background-color:#1e0010\">:<\/span>math<span style=\"color:#960050;background-color:#1e0010\">`<\/span>;\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">const<\/span> name <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">&#34;greg&#34;<\/span>; <span style=\"color:#75715e\">\/\/Compile time variable\n<\/span><\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\"><\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">const<\/span> Rectangle bounds <span style=\"color:#f92672\">=<\/span> <span style=\"color:#66d9ef\">const<\/span> Rectangle (<span style=\"color:#ae81ff\">0<\/span>,<span style=\"color:#ae81ff\">0<\/span>,<span style=\"color:#ae81ff\">5<\/span>,<span style=\"color:#ae81ff\">5<\/span>); <span style=\"color:#75715e\">\/\/Even objects can be declared compile time\n<\/span><\/span><\/span><\/code><\/pre><\/div><h2 id=\"final\">final<\/h2>\n<p>Final is used when the value is not known at compile time.\nThe values are immutable<\/p>"},{"title":"do the hard things.","link":"https:\/\/suriya.cc\/why\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/why\/","description":"<blockquote>\n<p>Things may come to those who wait, but only the things left by those who hustle - Abraham Lincoln<\/p><\/blockquote>\n<p>Life is short.<\/p>"},{"title":"docker in action","link":"https:\/\/suriya.cc\/tech\/practice\/docker\/docker-in-action\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/docker\/docker-in-action\/","description":"<p>Personal notes from <code>Docker in action<\/code> book<\/p>\n<p>Dockers use Linux namespaces and cgroups, which have been part of Linux since 2007. Docker does not provide the container technology but it makes it simpler to use.\nThe docker containers are isolated with respect to eight aspects.<\/p>"},{"title":"effective go practice","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/Effective_go\/01_intro\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/Effective_go\/01_intro\/","description":"<h2 id=\"formatting\">formatting<\/h2>\n<p>There is no need to align content or comment <code>go fmt<\/code> does that for you.<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-shell\" data-lang=\"shell\"><span style=\"display:flex;\"><span>go fmt &lt;file_path&gt;\n<\/span><\/span><\/code><\/pre><\/div><p>formats the file that is given<\/p>"},{"title":"learning golang 01 - basics","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/01_Intro\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/01_Intro\/","description":"<h2 id=\"intro\">intro<\/h2>\n<ul>\n<li>Every go program is made of packages and &ldquo;main&rdquo; package is run first.<\/li>\n<\/ul>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-go\" data-lang=\"go\"><span style=\"display:flex;\"><span><span style=\"color:#f92672\">package<\/span> <span style=\"color:#a6e22e\">main<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">import<\/span> (\n<\/span><\/span><span style=\"display:flex;\"><span>\t<span style=\"color:#e6db74\">&#34;fmt&#34;<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\t<span style=\"color:#e6db74\">&#34;math\/rand&#34;<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>)\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">func<\/span> <span style=\"color:#a6e22e\">main<\/span>() {\n<\/span><\/span><span style=\"display:flex;\"><span>\t<span style=\"color:#a6e22e\">fmt<\/span>.<span style=\"color:#a6e22e\">Println<\/span>(<span style=\"color:#e6db74\">&#34;My favorite number is&#34;<\/span>, <span style=\"color:#a6e22e\">rand<\/span>.<span style=\"color:#a6e22e\">Intn<\/span>(<span style=\"color:#ae81ff\">10<\/span>))\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div><p>In the above program math\/rand has a file with the first statement <em>package rand<\/em><\/p>"},{"title":"learning golang 02 - ds and algo","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/02_Data_structures\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/02_Data_structures\/","description":"<h1 id=\"arrays\">arrays<\/h1>\n<p>The type <code>[n]T<\/code> creates an array of n values of type T.<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-go\" data-lang=\"go\"><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">var<\/span> <span style=\"color:#a6e22e\">a<\/span> [<span style=\"color:#ae81ff\">10<\/span>]<span style=\"color:#66d9ef\">int<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/Creates an array &#39;a&#39; of int type with size 10<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h3 id=\"slices\">slices<\/h3>\n<p>An array has a fixed size. A slice is dynamically-sized\nThe type <code>[]T<\/code> is a slice of elements with type T\nSlices require high and low point in the array <code>[low:high]<\/code><\/p>"},{"title":"learning golang 03 - functions","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/03_Functions_and_pointers\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/03_Functions_and_pointers\/","description":"<h3 id=\"functions-and-pointers\">functions and pointers<\/h3>\n<p>Functions can receive pointers.\nAny change to the pointer would change the value.<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"><code class=\"language-go\" data-lang=\"go\"><span style=\"display:flex;\"><span><span style=\"color:#f92672\">package<\/span> <span style=\"color:#a6e22e\">main<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#f92672\">import<\/span> <span style=\"color:#e6db74\">&#34;fmt&#34;<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">func<\/span> <span style=\"color:#a6e22e\">change<\/span>(<span style=\"color:#a6e22e\">v<\/span> <span style=\"color:#f92672\">*<\/span><span style=\"color:#66d9ef\">int<\/span>) {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#f92672\">*<\/span><span style=\"color:#a6e22e\">v<\/span> = <span style=\"color:#ae81ff\">10<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#75715e\">\/\/ ^ required, mentioning that the base value is being changed<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span><span style=\"color:#66d9ef\">func<\/span> <span style=\"color:#a6e22e\">main<\/span>() {\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#a6e22e\">a<\/span> <span style=\"color:#f92672\">:=<\/span> <span style=\"color:#ae81ff\">12<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#a6e22e\">change<\/span>(<span style=\"color:#f92672\">&amp;<\/span><span style=\"color:#a6e22e\">a<\/span>)\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#75715e\">\/\/ ^ sending argument as pointer. Throws an error if not.<\/span>\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span> <span style=\"color:#a6e22e\">fmt<\/span>.<span style=\"color:#a6e22e\">Println<\/span>(<span style=\"color:#a6e22e\">a<\/span>)\n<\/span><\/span><span style=\"display:flex;\"><span>\n<\/span><\/span><span style=\"display:flex;\"><span>}\n<\/span><\/span><\/code><\/pre><\/div><h3 id=\"function-closures\">function closures<\/h3>\n<p>A function closure references variable from outside the function. Each closure is left to its own values<\/p>"},{"title":"learning golang 04 - goroutine","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/04_goroutines\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/Go_tour\/04_goroutines\/","description":"<h2 id=\"goroutines\">goroutines<\/h2>\n<p>Goroutine is a lightweight thread managed by the Go runtime.\na &ldquo;thread&rdquo; does not mean virtual thread or even multiple thread. it is like async await. meaning there is one main thread and multiple seperate &ldquo;threads&rdquo; spawned which are technically running in the same thread instead of spawning one for every process. Each of these threads are blocked when a blocking process is run. and repicked when it is done.<\/p>"},{"title":"learning golang using go by example","link":"https:\/\/suriya.cc\/tech\/practice\/golang\/GO_BY_EXAMPLE\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/tech\/practice\/golang\/GO_BY_EXAMPLE\/","description":"<h1 id=\"go-by-example\">go by example.<\/h1>\n<p>Following eli bendersky&rsquo;s gobyexample.com tutorial the idea is to capture only things that were not clear in the go tour.<\/p>"},{"title":"live","link":"https:\/\/suriya.cc\/live\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/live\/","description":"<p>I&rsquo;ll add the list of live stream videos here.<\/p>"},{"title":"page not found","link":"https:\/\/suriya.cc\/404\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/404\/","description":"<style type=\"text\/css\" media=\"screen\">\n .container {\n margin: 10px auto;\n max-width: 600px;\n text-align: center;\n }\n h1 {\n margin: 30px 0;\n font-size: 4em;\n line-height: 1;\n letter-spacing: -1px;\n }\n<\/style>"},{"title":"readlog","link":"https:\/\/suriya.cc\/readlog\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/readlog\/","description":{}},{"title":"recents","link":"https:\/\/suriya.cc\/recents\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/recents\/","description":{}},{"title":"site index","link":"https:\/\/suriya.cc\/toc\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/toc\/","description":{}},{"title":"to learn","link":"https:\/\/suriya.cc\/todo\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/suriya.cc\/todo\/","description":"<p>These are the things that I am interested in learning.<\/p>\n<ul>\n<li><a href=\"https:\/\/research.google\/blog\/introducing-nested-learning-a-new-ml-paradigm-for-continual-learning\/\">Nested Learning<\/a>\n<\/li>\n<li><a href=\"https:\/\/abseil.io\/fast\/hints.html\">Jeff Dean on performance<\/a>\n<\/li>\n<li><a href=\"https:\/\/nonzerosum.games\/\">Non zero sum games<\/a>\n<\/li>\n<\/ul>\n<h1 id=\"courses-and-competitions\">courses and competitions<\/h1>\n<h2 id=\"ml\">ml<\/h2>\n<ul>\n<li><a href=\"https:\/\/karpathy.ai\/zero-to-hero.html\">Karpathy Zero to Hero<\/a>\n<\/li>\n<li><a href=\"https:\/\/charbull.github.io\/wordle-lora-rl\/\">RL on wordle<\/a>\n<\/li>\n<li><a href=\"https:\/\/colab.research.google.com\/github\/openai\/gpt-oss\/blob\/main\/examples\/reinforcement-fine-tuning.ipynb\">RL on 2048<\/a>\n<\/li>\n<li><a href=\"https:\/\/github.com\/karpathy\/nanochat\">nanochat<\/a>\n<\/li>\n<li><a href=\"https:\/\/huggingface.co\/learn\">RL in Huggingface<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"cuda\">cuda<\/h2>\n<ul>\n<li><a href=\"leetgpu.com\">leetgpu<\/a>\n<\/li>\n<li><a href=\"https:\/\/tensara.org\/\">tensara<\/a>\n<\/li>\n<li>[programming massively parallel processors]<\/li>\n<\/ul>\n<h3 id=\"cuda-misc\">cuda misc<\/h3>\n<ul>\n<li><a href=\"http:\/\/siboehm.com\/articles\/22\/CUDA-MMM\">How to Optimize a CUDA Matmul Kernel for cuBLAS-like Performance<\/a>\n<\/li>\n<li><a href=\"http:\/\/cudaforfun.substack.com\/p\/outperforming-cublas-on-h100-a-worklog\">Outperforming cuBLAS on H100: a Worklog<\/a>\n<\/li>\n<li><a href=\"http:\/\/thinkingmachines.ai\/blog\/defeating-nondeterminism-in-llm-inference\/\">Defeating Nondeterminism in LLM Inference:<\/a>\n<\/li>\n<li><a href=\"http:\/\/horace.io\/brrr_intro.html\">Making Deep Learning go Brrrr From First Principles: <\/a>\n<\/li>\n<li><a href=\"http:\/\/kipp.ly\/transformer-inference-arithmetic\/\">Transformer Inference Arithmetic:<\/a>\n<\/li>\n<li><a href=\"http:\/\/fleetwood.dev\/posts\/domain-specific-architectures\">Domain specific architectures for AI inference<\/a>\n<\/li>\n<li><a href=\"http:\/\/anthropic.com\/engineering\/a-postmortem-of-three-recent-issues\">A postmortem of three recent issues:<\/a>\n<\/li>\n<li>[How To Scale Your Model:] (<a href=\"http:\/\/jax-ml.github.io\/scaling-book\/\">http:\/\/jax-ml.github.io\/scaling-book\/<\/a>\n)<\/li>\n<li>[The Ultra-Scale Playbook:] (<a href=\"http:\/\/huggingface.co\/spaces\/nanotron\/ultrascale-playbook\">http:\/\/huggingface.co\/spaces\/nanotron\/ultrascale-playbook<\/a>\n)<\/li>\n<li><a href=\"http:\/\/arxiv.org\/abs\/2401.14489\">The Case for Co-Designing Model Architectures with Hardware:<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"shaders\">shaders<\/h2>\n<ul>\n<li><a href=\"https:\/\/thebookofshaders.com\/\">The book of Shaders<\/a>\n<\/li>\n<\/ul>\n<h2 id=\"others\">others<\/h2>\n<ul>\n<li><a href=\"https:\/\/fathy.fr\/carbonyl\">Forking chrome to render in the terminal<\/a>\n<\/li>\n<li><a href=\"https:\/\/charbull.github.io\/wordle-lora-rl\/\">Wordle-RK Training Language Model to play wordle<\/a>\n<\/li>\n<li><a href=\"https:\/\/nostarch.com\/writing-c-compiler\">Build your own c compiler<\/a>\n<\/li>\n<li><a href=\"https:\/\/beej.us\/guide\/\">Beej&rsquo;s guide to networking<\/a>\n<\/li>\n<li>[Mamba the easy way](<a href=\"https:\/\/jackcook.com\/2024\/02\/23\/ma\">https:\/\/jackcook.com\/2024\/02\/23\/ma<\/a>\n mba.html)<\/li>\n<li><a href=\"https:\/\/build-your-own.org\/redis\/\">Build your own redis<\/a>\n<\/li>\n<li><a href=\"https:\/\/github.com\/jepsen-io\/maelstrom#documentation\">Distributed system from maelstorm<\/a>\n<\/li>\n<li><a href=\"https:\/\/fly.io\/dist-sys\/\">Gossip glomers, fly.io<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.cs.cornell.edu\/courses\/cs6120\/2020fa\/self-guided\/\">Advanced compilers: self-guided online course (cornell)<\/a>\n<\/li>\n<li><a href=\"https:\/\/web.stanford.edu\/class\/cs140\/projects\/pintos\/pintos_1.html\">pintos: a simple operating system<\/a>\n<\/li>\n<li><a href=\"https:\/\/nearthespeedoflight.com\/browser.html\">let&rsquo;s write a browser<\/a>\n<\/li>\n<li><a href=\"https:\/\/wyag.thb.lt\/\">write your own git<\/a>\n<\/li>\n<li><a href=\"https:\/\/explained-from-first-principles.com\/\">Explained from first principles<\/a>\n<\/li>\n<li><a href=\"https:\/\/pimbook.org\/\">Programmer&rsquo;s introduction to Mathematics<\/a>\n<\/li>\n<li><a href=\"https:\/\/cstack.github.io\/db_tutorial\/\">How does a database work, database internals<\/a>\n<\/li>\n<li><a href=\"https:\/\/makefiletutorial.com\/#makefile-cookbook\">makefiles<\/a>\n<\/li>\n<li><a href=\"https:\/\/users.ece.utexas.edu\/~valvano\/Volume1\/E-Book\/\">Embedded system<\/a>\n<\/li>\n<li><a href=\"https:\/\/raytracing.github.io\/\">Ray Tracing<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.nand2tetris.org\/\">Nand2Tetris<\/a>\n<\/li>\n<li><a href=\"http:\/\/crypto.stanford.edu\/~dabo\/cs255\/\">Stanford crypto <\/a>\n\n<ul>\n<li><a href=\"https:\/\/crypto.stanford.edu\/~dabo\/cryptobook\/BonehShoup_0_4.pdf\">associated book<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/gdpr.eu\/tag\/gdpr\/\">GDPR<\/a>\n \u2705<\/li>\n<\/ul>\n<h1 id=\"books-to-read\">books to read<\/h1>\n<ul>\n<li><a href=\"https:\/\/jax-ml.github.io\/scaling-book\/\">How to Scale Your Model<\/a>\n<\/li>\n<li>Harry Potter and the Methods of Rationality\n<ul>\n<li><a href=\"https:\/\/hpmor.com\/\">https:\/\/hpmor.com\/<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<li>Algorithms for decision making\n<ul>\n<li><a href=\"https:\/\/algorithmsbook.com\/files\/dm.pdf\">https:\/\/algorithmsbook.com\/files\/dm.pdf<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<li>Linux insides\n<ul>\n<li><a href=\"https:\/\/0xax.gitbooks.io\/linux-insides\/content\/\">https:\/\/0xax.gitbooks.io\/linux-insides\/content\/<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<li>Google SRE\n<ul>\n<li><a href=\"https:\/\/sre.google\/books\/\">https:\/\/sre.google\/books\/<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<li>compiler books\n<ul>\n<li><a href=\"https:\/\/www3.nd.edu\/~dthain\/compilerbook\/compilerbook.pdf\">https:\/\/www3.nd.edu\/~dthain\/compilerbook\/compilerbook.pdf<\/a>\n<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/jwiegley.github.io\/git-from-the-bottom-up\/\">Git from the ground up<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.bsi.bund.de\/SharedDocs\/Downloads\/EN\/BSI\/Publications\/Brochure\/quantum-safe-cryptography.pdf;jsessionid=0A645BD930E85BDED22DD2597C0A35DD.internet471?__blob=publicationFile&amp;v=4\">post quantum cryptography<\/a>\n<\/li>\n<\/ul>\n<h1 id=\"blogs-to-read\">blogs to read<\/h1>\n<ul>\n<li><a href=\"https:\/\/larrysanger.org\/2010\/12\/baby-reading\/\">Larry Sanger on baby reading<\/a>\n<\/li>\n<li><a href=\"https:\/\/socialskillswisdom.com\/\">How to win friends and influence people unabridged<\/a>\n<\/li>\n<li><a href=\"https:\/\/jack-vanlightly.com\/blog\/2025\/9\/2\/understanding-apache-fluss\">Understanding Apache Fluss<\/a>\n<\/li>\n<li><a href=\"https:\/\/blakemasters.tumblr.com\/peter-thiels-cs183-startup\">Peter Thiel&rsquo;s CS183<\/a>\n<\/li>\n<li><a href=\"https:\/\/archive.computerhistory.org\/resources\/access\/text\/2022\/07\/102792671-05-01-acc.pdf\">interview with shang Yi Chiang, R&amp;D head at TSMC<\/a>\n<\/li>\n<li><a href=\"https:\/\/martin.kleppmann.com\/2016\/02\/08\/how-to-do-distributed-locking.html\">how to do Distributed locking<\/a>\n<\/li>\n<li><a href=\"https:\/\/queue.acm.org\/detail.cfm?id=2482856\">There&rsquo;s no getting around you&rsquo;re building a distributed system<\/a>\n<\/li>\n<li><a href=\"https:\/\/blog.empathybox.com\/post\/19574936361\/getting-real-about-distributed-system-reliability\">Getting real about distributed system reliability<\/a>\n<\/li>\n<li><a href=\"https:\/\/codecapsule.com\/2014\/02\/12\/coding-for-ssds-part-1-introduction-and-table-of-contents\/\">Coding for SSDs<\/a>\n<\/li>\n<li><a href=\"https:\/\/fasterthanli.me\/articles\/the-http-crash-course-nobody-asked-for\">http crash course nobody asked for<\/a>\n<\/li>\n<li><a href=\"https:\/\/blog.codepen.io\/2022\/08\/03\/379-chris-alex-have-been-running-codepen-for-10-years-what-have-they-learned-heres-the-top-10\/\">lessons from running codepen<\/a>\n<\/li>\n<li><a href=\"http:\/\/xn--rpa.cc\/irl\/term.html\">Everything you ever wanted to know about terminals<\/a>\n<\/li>\n<li><a href=\"https:\/\/github.com\/rqlite\/rqlite\/blob\/master\/DOC\/DESIGN.md\">Rqlite design<\/a>\n<\/li>\n<li><a href=\"https:\/\/reactionwheel.net\/2019\/09\/a-taxonomy-of-moats.html\">Taxonomy of Moats<\/a>\n<\/li>\n<li><a href=\"https:\/\/donellameadows.org\/archives\/leverage-points-places-to-intervene-in-a-system\/\">Leverage Points<\/a>\n<\/li>\n<li><a href=\"https:\/\/abovethecrowd.com\/2012\/11\/13\/all-markets-are-not-created-equal-10-factors-to-consider-when-evaluating-digital-marketplaces\/\">All Markets Are Not Created Equal: 10 Factors To Consider When Evaluating Digital Marketplaces<\/a>\n<\/li>\n<li><a href=\"https:\/\/zackkanter.com\/2019\/03\/13\/what-is-amazon\/\">What is amazon<\/a>\n<\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/events\/pdc-pdc-1992\/pdc-1992-keynote-bill-gates\">Bill gates interview 1992 PDC 1992<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.destroyallsoftware.com\/talks\/the-birth-and-death-of-javascript\">https:\/\/www.destroyallsoftware.com\/talks\/the-birth-and-death-of-javascript<\/a>\n<\/li>\n<li><a href=\"https:\/\/www.edge.org\/adversarial-collaboration-daniel-kahneman\">Adverserial collaboration - Daniel Kahneman<\/a>\n<\/li>\n<\/ul>\n<h1 id=\"to-build\">to build<\/h1>\n<ul>\n<li>RL environment for agents<\/li>\n<li>LMDB rust<\/li>\n<\/ul>\n<h2 id=\"privacy\">privacy<\/h2>\n<ul>\n<li>Science, Privacy, and Freedom: Issues and Proposals for the 1970&rsquo;s. Part I&ndash;The Current Impact of Surveillance on Privacy, Alan F. Westin\nColumbia Law Review, Vol. 66, No. 6 (Jun., 1966), pp. 1003-1050 (48 pages) <a href=\"https:\/\/www.jstor.org\/stable\/1120997\">https:\/\/www.jstor.org\/stable\/1120997<\/a>\n<\/li>\n<\/ul>\n<h1 id=\"games\">games:<\/h1>\n<p><a href=\"https:\/\/flexboxfroggy.com\/\">https:\/\/flexboxfroggy.com\/<\/a>\n<\/p>"}]}}