<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Jardim on rfbatista</title><link>https://rfbatista.github.io/jardim/</link><description>Recent content in Jardim on rfbatista</description><generator>Hugo</generator><language>pt-br</language><lastBuildDate>Wed, 07 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://rfbatista.github.io/jardim/index.xml" rel="self" type="application/rss+xml"/><item><title>Agents Memory</title><link>https://rfbatista.github.io/jardim/agents/memory/</link><pubDate>Wed, 07 Oct 2026 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/agents/memory/</guid><description>&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://thilo-hermann.medium.com/stop-mixing-cdm-ontology-and-knowledge-graphs-0d1d154e0c31"&gt;https://thilo-hermann.medium.com/stop-mixing-cdm-ontology-and-knowledge-graphs-0d1d154e0c31&lt;/a&gt;&lt;/p&gt;</description></item><item><title>API Engineering</title><link>https://rfbatista.github.io/jardim/api-egnineering/</link><pubDate>Wed, 07 Oct 2026 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/api-egnineering/</guid><description>&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://medium.com/@gaddamnaveen192/designing-a-notification-system-that-can-handle-10-million-users-cad6b4970b78"&gt;https://medium.com/@gaddamnaveen192/designing-a-notification-system-that-can-handle-10-million-users-cad6b4970b78&lt;/a&gt;&#10;&lt;a href="https://medium.com/javarevisited/how-i-design-apis-as-senior-developer-for-better-results-7209d40e6a29"&gt;https://medium.com/javarevisited/how-i-design-apis-as-senior-developer-for-better-results-7209d40e6a29&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Algorithms</title><link>https://rfbatista.github.io/jardim/algorithms/</link><pubDate>Sat, 13 Sep 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/algorithms/</guid><description>&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/imteekay/algorithms"&gt;https://github.com/imteekay/algorithms&lt;/a&gt;&lt;/p&gt;</description></item><item><title>AWS CDK</title><link>https://rfbatista.github.io/jardim/aws/cdk/</link><pubDate>Fri, 12 Sep 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/aws/cdk/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;npm install -g aws-cdk&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;In a empty folder run: &lt;code&gt;cdk init app --language python&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;pip install -r requirements.txt &lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Actor Model</title><link>https://rfbatista.github.io/jardim/actor_model/</link><pubDate>Sun, 24 Aug 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/actor_model/</guid><description>&lt;h1 id="registry"&gt;Registry&lt;/h1&gt;&#10;&lt;h1 id="node"&gt;Node&lt;/h1&gt;&#10;&lt;h1 id="actor"&gt;Actor&lt;/h1&gt;&#10;&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=PEbQ-s19wKo"&gt;10 Lessons From Implementing The Actor Model • Vagif Abilov • GOTO 2023&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Actor Model</title><link>https://rfbatista.github.io/jardim/go/libs/</link><pubDate>Sun, 24 Aug 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/go/libs/</guid><description>&lt;p&gt;&lt;a href="https://github.com/gorilla/mux"&gt;https://github.com/gorilla/mux&lt;/a&gt;&#10;&lt;a href="https://github.com/hashicorp/go-metrics"&gt;https://github.com/hashicorp/go-metrics&lt;/a&gt;&#10;&lt;a href="https://github.com/asaskevich/govalidator"&gt;https://github.com/asaskevich/govalidator&lt;/a&gt;&lt;/p&gt;&#10;&lt;h1 id="cli"&gt;CLI&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/briandowns/spinner"&gt;https://github.com/briandowns/spinner&lt;/a&gt;&lt;/p&gt;&#10;&lt;h1 id="tests"&gt;Tests&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/onsi/ginkgo"&gt;https://github.com/onsi/ginkgo&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Web Cookies</title><link>https://rfbatista.github.io/jardim/web/cookies/</link><pubDate>Sat, 25 Jan 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/web/cookies/</guid><description>&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/73547776/how-to-redirect-from-one-domain-to-another-and-set-cookies-or-headers-for-the-ot/73599289#73599289"&gt;https://stackoverflow.com/questions/73547776/how-to-redirect-from-one-domain-to-another-and-set-cookies-or-headers-for-the-ot/73599289#73599289&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Container</title><link>https://rfbatista.github.io/jardim/containers/</link><pubDate>Mon, 20 Jan 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/containers/</guid><description>&lt;h1 id="container-runtime"&gt;Container runtime&lt;/h1&gt;&#10;&lt;p&gt;Containers are implemented using &lt;code&gt;Linux Namespaces&lt;/code&gt; and &lt;code&gt;Cgroups&lt;/code&gt;&lt;/p&gt;&#10;&lt;h2 id="sysbox"&gt;&lt;a href="https://github.com/nestybox/sysbox"&gt;Sysbox&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Similar to VM in its capabilities, being possible t&lt;/p&gt;&#10;&lt;h1 id="cgroups"&gt;Cgroups&lt;/h1&gt;&#10;&lt;p&gt;Provide a way to limit the amount of resources, such as CPU and memory&lt;/p&gt;&#10;&lt;h1 id="namespaces"&gt;Namespaces&lt;/h1&gt;&#10;&lt;p&gt;Virtualizes resources like file systems or networking&lt;/p&gt;&#10;&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://www.ianlewis.org/en/container-runtimes-part-1-introduction-container-r"&gt;Container Runtimes Part 1: An Introduction to Container Runtimes&lt;/a&gt;&#10;&lt;a href="https://www.youtube.com/watch?v=sK5i-N34im8"&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>API Managment</title><link>https://rfbatista.github.io/jardim/azure/api-managment/</link><pubDate>Tue, 07 Jan 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/azure/api-managment/</guid><description>&lt;h1 id="load-balancing-azure-openai"&gt;Load balancing Azure OpenAI&lt;/h1&gt;&#10;&lt;p&gt;Normal scenario:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;token and model quota is available&lt;/li&gt;&#10;&lt;li&gt;api return 200&#10;Throttled scenario:&lt;/li&gt;&#10;&lt;li&gt;quota limits is applied&lt;/li&gt;&#10;&lt;li&gt;api managment retry to a different resource&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/developer/python/get-started-app-chat-scaling-with-azure-api-management?tabs=github-codespaces%2Cinitial-deployment"&gt;https://learn.microsoft.com/en-us/azure/developer/python/get-started-app-chat-scaling-with-azure-api-management?tabs=github-codespaces%2Cinitial-deployment&lt;/a&gt;&lt;/p&gt;</description></item><item><title>CosmosDB</title><link>https://rfbatista.github.io/jardim/azure/cosmosdb/</link><pubDate>Tue, 07 Jan 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/azure/cosmosdb/</guid><description>&lt;p&gt;Whats is NoSQL&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;distributed&lt;/li&gt;&#10;&lt;li&gt;schemafree&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;There is a &lt;code&gt;local emulator&lt;/code&gt;&#10;w&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Primary key and secondary key are used to rotate access keys without loosing connection access&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="container"&gt;Container&lt;/h1&gt;&#10;&lt;h1 id="documents"&gt;Documents&lt;/h1&gt;&#10;&lt;p&gt;zip_code&lt;/p&gt;&#10;&lt;h1 id="management"&gt;Management&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Azure portal&lt;/li&gt;&#10;&lt;li&gt;Azure CLI&lt;/li&gt;&#10;&lt;li&gt;PowerShell&lt;/li&gt;&#10;&lt;li&gt;ARM Templates&lt;/li&gt;&#10;&lt;li&gt;Bicep Templates&lt;/li&gt;&#10;&lt;li&gt;Rest API&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="automatic-indexing"&gt;Automatic indexing&lt;/h1&gt;&#10;&lt;p&gt;The hierarchy of a json tree, is flatened as a list of keys and values:&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0"&#10; &gt;&lt;code class="language-" data-lang=""&#10; &gt;/locations/0/contry: Germany&#10;/locations/1/contry: Berlin&#10;/exports: Examples&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;This structure is automatically indexed. But you can finetune with a custom policy&lt;/p&gt;</description></item><item><title>C++: artigos</title><link>https://rfbatista.github.io/jardim/cpp/</link><pubDate>Thu, 02 Jan 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/cpp/</guid><description>&lt;h1 id="artigos"&gt;Artigos&lt;/h1&gt;&#10;&lt;h2 id="filesystem"&gt;Filesystem&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://www.cppstories.com/2024/common-filesystem-cpp20/#1-creating-directories"&gt;https://www.cppstories.com/2024/common-filesystem-cpp20/#1-creating-directories&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Desired resilience properties</title><link>https://rfbatista.github.io/jardim/software-engineering/resiliencia/</link><pubDate>Thu, 02 Jan 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/software-engineering/resiliencia/</guid><description>&lt;h1 id="desired-resilience-properties"&gt;Desired resilience properties&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Fault isolation&lt;/li&gt;&#10;&lt;li&gt;Sufficient capacity&lt;/li&gt;&#10;&lt;li&gt;Timely output&lt;/li&gt;&#10;&lt;li&gt;Correct output&lt;/li&gt;&#10;&lt;li&gt;Redundancy&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="categories-of-failure"&gt;Categories of failure&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Single point of failure&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Excessive load&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Excessive latency&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Misconfiguration bugs&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Automate as much as possible&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;CAOS Engineering&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Fault injection simulator&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Networking Basics</title><link>https://rfbatista.github.io/jardim/network/network-basics/</link><pubDate>Thu, 02 Jan 2025 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/network/network-basics/</guid><description>&lt;p&gt;Two or more computers connected together&#10;DNS (Domain Name System)&lt;/p&gt;&#10;&lt;h1 id="types-of-netwok"&gt;Types of netwok&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;LAN&lt;/li&gt;&#10;&lt;li&gt;WAN&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="topologies"&gt;Topologies&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Ring&lt;/li&gt;&#10;&lt;li&gt;Point-to-point&lt;/li&gt;&#10;&lt;li&gt;Mesh&lt;/li&gt;&#10;&lt;li&gt;Star&lt;/li&gt;&#10;&lt;li&gt;BUS&lt;/li&gt;&#10;&lt;li&gt;Tree&lt;/li&gt;&#10;&lt;li&gt;HYbrid&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="building-blocks"&gt;Building blocks&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Devices (MAC Address)&lt;/li&gt;&#10;&lt;li&gt;Connections - type of connection Ex.: wireless&lt;/li&gt;&#10;&lt;li&gt;Switches - connect various devices&lt;/li&gt;&#10;&lt;li&gt;Routers&lt;/li&gt;&#10;&lt;li&gt;Network servers&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="osi-model"&gt;OSI Model&lt;/h1&gt;&#10;&lt;h1 id="network-services"&gt;Network Services&lt;/h1&gt;&#10;&lt;p&gt;DNS, email, internet chat, printer sharing&amp;hellip;&lt;/p&gt;&#10;&lt;h1 id="ip-addresses"&gt;IP Addresses&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;IPv4&lt;/li&gt;&#10;&lt;li&gt;IPv6&lt;/li&gt;&#10;&lt;li&gt;NAT&#10;public and private&#10;&lt;ul&gt;&#10;&lt;li&gt;network address translation&lt;/li&gt;&#10;&lt;li&gt;private LAN&lt;/li&gt;&#10;&lt;li&gt;public WAN&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="ipv4"&gt;IPv4&lt;/h2&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0"&#10; &gt;&lt;code class="language-" data-lang=""&#10; &gt;192.168.2.14:80&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;192.168.2 = network id&lt;/li&gt;&#10;&lt;li&gt;.14 = host id&lt;/li&gt;&#10;&lt;li&gt;80 = port&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="ipv6"&gt;IPv6&lt;/h2&gt;&#10;&lt;p&gt;Written in hexadecimal&lt;/p&gt;</description></item><item><title>Airflow</title><link>https://rfbatista.github.io/jardim/data-engineering/airflow/</link><pubDate>Wed, 20 Nov 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/data-engineering/airflow/</guid><description>&lt;h1 id="airflow-components"&gt;Airflow Components&lt;/h1&gt;&#10;&lt;p&gt;&lt;img src="https://rfbatista.github.io/jardim/data-engineering/airflow/arch-diag-basic.png" alt="Airflow architecture"&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Scheduler: keep track of dags&lt;/li&gt;&#10;&lt;li&gt;Workers:&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Executors:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Local&lt;/li&gt;&#10;&lt;li&gt;Celery &amp;lt;&amp;ndash; always on&lt;/li&gt;&#10;&lt;li&gt;Kubernetes &amp;lt;&amp;ndash; on demand&lt;/li&gt;&#10;&lt;li&gt;Celery + Kubernetes&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Database&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;pgboucer vs max_connections&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Pipeline design:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;workflows&lt;/li&gt;&#10;&lt;li&gt;tasks&lt;/li&gt;&#10;&lt;li&gt;inputs&lt;/li&gt;&#10;&lt;li&gt;outputs&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Local development:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;spend time setting up your locals&lt;/li&gt;&#10;&lt;li&gt;try to debug in local&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="infrastructure"&gt;Infrastructure&lt;/h1&gt;&#10;&lt;p&gt;Kubernetes&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;use iac&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;ci/cd pipeline&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;scheduler (mount volume)&lt;/li&gt;&#10;&lt;li&gt;scheduler pull github&lt;/li&gt;&#10;&lt;li&gt;scheduler docker image&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Logging&lt;/p&gt;&#10;&lt;p&gt;Monitoring and alerting&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;monitor resources and events&lt;/li&gt;&#10;&lt;li&gt;prometheus and grafana to monitor&lt;/li&gt;&#10;&lt;li&gt;airflow stats&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Resource allocation&lt;/p&gt;</description></item><item><title>Containers from scratch</title><link>https://rfbatista.github.io/jardim/c/containers_scratch/</link><pubDate>Sat, 12 Oct 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/c/containers_scratch/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;namespaces: kernel groups accessed by specific processes. There are different kind of namespaces&lt;/li&gt;&#10;&lt;li&gt;capabilities: set limits to uid 0&lt;/li&gt;&#10;&lt;li&gt;cgroups: mechanism to limit usage of memory, disk, cpu-time and other resources.&lt;/li&gt;&#10;&lt;li&gt;setrlimit: similar mechanism to cgroups but is older and can do somethings cgroups cant.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;need to isntall sudo apt-get install libseccomp-dev&lt;/p&gt;&#10;&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/nathanagez/c_container/tree/master"&gt;https://github.com/nathanagez/c_container/tree/master&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/lucavallin/barco"&gt;https://github.com/lucavallin/barco&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Modules in C</title><link>https://rfbatista.github.io/jardim/c/modules_in_c/</link><pubDate>Sat, 12 Oct 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/c/modules_in_c/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;There are not formal modules in the C language&lt;/li&gt;&#10;&lt;li&gt;Header file contains function and type declarations&lt;/li&gt;&#10;&lt;li&gt;Source file (.c) contains concrete implementations&lt;/li&gt;&#10;&lt;li&gt;Header file provides the interface to a module&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>SQLite</title><link>https://rfbatista.github.io/jardim/databases/sqlite/</link><pubDate>Sun, 06 Oct 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/databases/sqlite/</guid><description>&lt;p&gt;SQLIte is faster than filesystem&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0"&#10; &gt;&lt;code class="language-" data-lang=""&#10; &gt;PRAGMA journal_mode = WAL;&#10;PRAGMA busy_timeout = 5000;&#10;PRAGMA synchronous = NORMAL;&#10;PRAGMA cache_size = 1000000000;&#10;PRAGMA foreign_keys = true;&#10;PRAGMA temp_store = memory;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;&lt;code&gt;PRAGMA journal_mode = WAL;&lt;/code&gt; write and reader don&amp;rsquo;t block&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;PRAGMA synchronous = NORMAL;&lt;/code&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;PRAGMA busy_timeout = 5000;&lt;/code&gt; avoid &lt;code&gt;SQLITE_BUSY&lt;/code&gt; errors to happen&lt;/p&gt;&#10;&lt;p&gt;Use IMMEDIATE transactions so sqlite respest the busy_timeout. It can be configure at pool level in GO &lt;code&gt;mydb.db?_txlock=immediate&lt;/code&gt;&lt;/p&gt;</description></item><item><title>ZIG Guide</title><link>https://rfbatista.github.io/jardim/zig/zig-guide/</link><pubDate>Fri, 26 Jul 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/zig/zig-guide/</guid><description>&lt;p&gt;Variaveis são &lt;em&gt;snake_case&lt;/em&gt; e fuções são &lt;em&gt;camelCase&lt;/em&gt;&lt;/p&gt;&#10;&lt;h1 id="assignment"&gt;Assignment&lt;/h1&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-zig" data-lang="zig"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kr"&gt;const&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="kr"&gt;var&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;identifier&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;const&lt;/code&gt; - indica que o &lt;code&gt;identifier&lt;/code&gt; é uma constante que armazena um valor imutável&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;var&lt;/code&gt; - indica que o &lt;code&gt;identifier&lt;/code&gt; é uma variavel que armazena um valor mutável&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;type&lt;/code&gt; - é uma anotação do tipo do &lt;code&gt;identifier&lt;/code&gt; que pode ser omitido se o &lt;code&gt;value&lt;/code&gt; pode ser inferido&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-zig" data-lang="zig"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;constant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;i32&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// signed 32-bit constant&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;u32&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// unsigned 32-bit variable&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;// @as performs an explicit type coercion&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;inferred_constant&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;@as&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;inferred_variable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;@as&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;u32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;h1 id="array"&gt;Array&lt;/h1&gt;&#10;&lt;p&gt;Array literals podem ser omitidos com o uso de &lt;code&gt;_&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Ways to level up your communication</title><link>https://rfbatista.github.io/jardim/communication/ways-to-levelup/</link><pubDate>Tue, 19 Mar 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/communication/ways-to-levelup/</guid><description>&lt;h1 id="1-organize-your-ideas-beforehand"&gt;1. Organize your ideas beforehand&lt;/h1&gt;&#10;&lt;p&gt;Categorize knowledge that are important for that discussion, so it is easier to retrieve information about&#10;a specific topic and associated facts&lt;/p&gt;&#10;&lt;p&gt;Tools:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Mindmap&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="2-master-bluf-bottom-line-up-front"&gt;2. Master BLUF (Bottom line up front)&lt;/h1&gt;&#10;&lt;p&gt;State the core message first, and follow up with necessary context. That way you reduce friction.&lt;/p&gt;&#10;&lt;h1 id="3-storytelling"&gt;3. Storytelling&lt;/h1&gt;&#10;&lt;p&gt;Give structure for the context detail. Storytelling is best suited for complex journey, justify a timeline or make&#10;an abstract concept more relatable.&lt;/p&gt;</description></item><item><title>Architecture Decision Record</title><link>https://rfbatista.github.io/jardim/software-engineering/architecture-decision/</link><pubDate>Wed, 21 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/software-engineering/architecture-decision/</guid><description>&lt;p&gt;(&lt;a href="https://en.wikipedia.org/wiki/A_Pattern_Language%29[https://en.wikipedia.org/wiki/A_Pattern_Language]"&gt;https://en.wikipedia.org/wiki/A_Pattern_Language)[https://en.wikipedia.org/wiki/A_Pattern_Language]&lt;/a&gt;&#10;(&lt;a href="https://microservices.io/post/misc/2022/01/26/the-microservices-pattern-language.html%29[https://microservices.io/post/misc/2022/01/26/the-microservices-pattern-language.html]"&gt;https://microservices.io/post/misc/2022/01/26/the-microservices-pattern-language.html)[https://microservices.io/post/misc/2022/01/26/the-microservices-pattern-language.html]&lt;/a&gt;&#10;(&lt;a href="https://twitter.com/crichardson/status/1661757842477465608%29[https://twitter.com/crichardson/status/1661757842477465608]"&gt;https://twitter.com/crichardson/status/1661757842477465608)[https://twitter.com/crichardson/status/1661757842477465608]&lt;/a&gt;&lt;/p&gt;</description></item><item><title>The Humble Programmer</title><link>https://rfbatista.github.io/jardim/software-engineering/article-hubble-programmer/</link><pubDate>Wed, 21 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/software-engineering/article-hubble-programmer/</guid><description>&lt;ol&gt;&#10;&lt;li&gt;intellectually manageable programs&lt;/li&gt;&#10;&lt;li&gt;subset of intellectually manageable programs reduce the solution space&lt;/li&gt;&#10;&lt;li&gt;proof of correctness over tests, build on top of a programs designed to be correct and no the other way around&lt;/li&gt;&#10;&lt;li&gt;vital abstraction patterns&lt;/li&gt;&#10;&lt;li&gt;avoid to write smart programs&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;&lt;a href="https://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html"&gt;https://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Tutoring systems</title><link>https://rfbatista.github.io/jardim/research/tutoring-systems/</link><pubDate>Sun, 18 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/research/tutoring-systems/</guid><description>&lt;p&gt;Design and development methods:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;needs assesment&lt;/li&gt;&#10;&lt;li&gt;cognitive task analysis - how domain experts think when solving problems&lt;/li&gt;&#10;&lt;li&gt;initial tutor implementation&lt;/li&gt;&#10;&lt;li&gt;evaluation&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;An intelligent tutor system should enable the student to work to the successful conclusion of problem solving.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Represent student competence as a production set.&lt;/li&gt;&#10;&lt;li&gt;Communicate the goal structure underlying the problem solving.&lt;/li&gt;&#10;&lt;li&gt;Provide instruction in the problem solving context.&lt;/li&gt;&#10;&lt;li&gt;Promote an abstract understanding of the problem-solving knowledge.&lt;/li&gt;&#10;&lt;li&gt;Minimize working memory load.&lt;/li&gt;&#10;&lt;li&gt;Provide immediate feedback on errors.&lt;/li&gt;&#10;&lt;li&gt;Adjust the grain size of instruction with learning.&lt;/li&gt;&#10;&lt;li&gt;Facilitate successive approximations to the target skill&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;4 Components architecture:&lt;/p&gt;</description></item><item><title>Vector Databases</title><link>https://rfbatista.github.io/jardim/databases/vector-database/</link><pubDate>Sun, 18 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/databases/vector-database/</guid><description>&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=5hAGhmHNTQQ"&gt;https://www.youtube.com/watch?v=5hAGhmHNTQQ&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Database from scratch</title><link>https://rfbatista.github.io/jardim/databases/database-from-scratch/</link><pubDate>Tue, 06 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/databases/database-from-scratch/</guid><description>&lt;ol&gt;&#10;&lt;li&gt;Persistence: como não perder dados&lt;/li&gt;&#10;&lt;li&gt;Indexing: como consultar dados&lt;/li&gt;&#10;&lt;li&gt;Concurrency: como lidar com multiplos clientes&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h1 id="persistence"&gt;Persistence&lt;/h1&gt;&#10;&lt;h1 id="indexing"&gt;Indexing&lt;/h1&gt;&#10;&lt;p&gt;Existem dois tipos de queries:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Analytical (OLAP): Geralmente envolvem um grande numéro de dados, com agregação, agrupamento, or joins.&lt;/li&gt;&#10;&lt;li&gt;Transactional (OLTP): consultas que envolvem apenas uma pequena parte dos dados.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="transactional-oltp"&gt;Transactional (OLTP)&lt;/h2&gt;</description></item><item><title>Azure OpenAI</title><link>https://rfbatista.github.io/jardim/azure/openai/</link><pubDate>Sat, 03 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/azure/openai/</guid><description>&lt;h1 id="puorpose-of-quotas"&gt;Puorpose of quotas&lt;/h1&gt;&#10;&lt;p&gt;To regulate the number of requests, the volume of texts tokens, or the amount of computational&#10;power utilized by OpenAI API user&lt;/p&gt;&#10;&lt;h1 id="quota-allocation"&gt;Quota Allocation&lt;/h1&gt;&#10;&lt;p&gt;Subscription receive a quota allocation, determined by geographic region and regions quantified by&#10;token-per-minute (TPM)&lt;/p&gt;&#10;&lt;h1 id="rate-limit"&gt;Rate limit&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;tokens per minute (TPM)&lt;/li&gt;&#10;&lt;li&gt;request per minute (RPM)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="conversion-metric"&gt;Conversion metric&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The RPM ratio is set to 6 RPM for every 1000 TPM available&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="azure-api-management-apim"&gt;Azure API Management (APIM)&lt;/h1&gt;&#10;&lt;h1 id="azure-monitor-and-log-analytics"&gt;Azure Monitor and Log Analytics&lt;/h1&gt;&#10;&lt;h1 id="azure-openai-monitoring-metrics"&gt;Azure OpenAI Monitoring Metrics&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Azure OpenAI requests&lt;/li&gt;&#10;&lt;li&gt;Processed prompt tokes&lt;/li&gt;&#10;&lt;li&gt;Generated completion tokens&lt;/li&gt;&#10;&lt;li&gt;Processed inference tokens&lt;/li&gt;&#10;&lt;li&gt;Processed fine tuned training hours&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=1gB51KnoAn4"&gt;Learn Live: Monitoring Azure OpenAI&lt;/a&gt;&#10;&lt;a href="https://learn.microsoft.com/en-us/azure/ai-services/openai/monitor-openai-reference"&gt;Monitor OpenAI&lt;/a&gt;&#10;&lt;a href="https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/monitor-openai"&gt;Monitor OpenAI&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Database design</title><link>https://rfbatista.github.io/jardim/databases/database-design/</link><pubDate>Sat, 03 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/databases/database-design/</guid><description>&lt;p&gt;(&lt;a href="https://cs-people.bu.edu/mathan/publications/fnt23-athanassoulis.pdf?utm_source=hackernewsletter&amp;amp;utm_medium=email&amp;amp;utm_term=books%29[https://cs-people.bu.edu/mathan/publications/fnt23-athanassoulis.pdf?utm_source=hackernewsletter&amp;amp;utm_medium=email&amp;amp;utm_term=books]"&gt;https://cs-people.bu.edu/mathan/publications/fnt23-athanassoulis.pdf?utm_source=hackernewsletter&amp;utm_medium=email&amp;utm_term=books)[https://cs-people.bu.edu/mathan/publications/fnt23-athanassoulis.pdf?utm_source=hackernewsletter&amp;utm_medium=email&amp;utm_term=books]&lt;/a&gt;&#10;(&lt;a href="https://www.postgresql.org/docs/current/query-path.html%29[https://www.postgresql.org/docs/current/query-path.html]"&gt;https://www.postgresql.org/docs/current/query-path.html)[https://www.postgresql.org/docs/current/query-path.html]&lt;/a&gt;&#10;(&lt;a href="https://ocw.mit.edu/courses/6-830-database-systems-fall-2010/%29[https://ocw.mit.edu/courses/6-830-database-systems-fall-2010/]"&gt;https://ocw.mit.edu/courses/6-830-database-systems-fall-2010/)[https://ocw.mit.edu/courses/6-830-database-systems-fall-2010/]&lt;/a&gt;&#10;(&lt;a href="https://blog.marcua.net/2009/06/03/mit-database-systems-6830-ta-course-notes.html%29[https://blog.marcua.net/2009/06/03/mit-database-systems-6830-ta-course-notes.html]"&gt;https://blog.marcua.net/2009/06/03/mit-database-systems-6830-ta-course-notes.html)[https://blog.marcua.net/2009/06/03/mit-database-systems-6830-ta-course-notes.html]&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Dependency injection system for Go</title><link>https://rfbatista.github.io/jardim/go/go-lib-fx/</link><pubDate>Sat, 03 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/go/go-lib-fx/</guid><description>&lt;h1 id="parameter-object"&gt;Parameter Object&lt;/h1&gt;&#10;&lt;p&gt;São objetos com o propósito de carregar para métodos ou funções como as funções &lt;code&gt;New*&lt;/code&gt; que criam objetos.&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ClientParams&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;struct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;In&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ClientConfig&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;HTTPClient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Client&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;func&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;NewClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ClientParams&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;http&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HTTPClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// ...&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;nil&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;h1 id="result-object"&gt;Result Object&lt;/h1&gt;&#10;&lt;p&gt;Similar ao &lt;strong&gt;Parameter Object&lt;/strong&gt; é utilizado para carregar os resultados de uma função ou método, o objeto é definido&#10;exclusivamente por uma função ou método&lt;/p&gt;</description></item><item><title>Frontend Development</title><link>https://rfbatista.github.io/jardim/frontend/</link><pubDate>Sat, 03 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/frontend/</guid><description>&lt;h1 id="rendering-patterns"&gt;Rendering patterns&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Static rendering - HTML are rendenred at build time, that way you can cache in CDN&lt;/li&gt;&#10;&lt;li&gt;ISR&lt;/li&gt;&#10;&lt;li&gt;SSR&lt;/li&gt;&#10;&lt;li&gt;CSR&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="core-web-vitals"&gt;Core Web Vitals&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;TTFB&lt;/li&gt;&#10;&lt;li&gt;FCP&lt;/li&gt;&#10;&lt;li&gt;TTI&lt;/li&gt;&#10;&lt;li&gt;FID&lt;/li&gt;&#10;&lt;li&gt;CLS&lt;/li&gt;&#10;&lt;li&gt;LCP&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="architecture"&gt;Architecture&lt;/h1&gt;&#10;&lt;p&gt;Application architecture:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;component model&lt;/li&gt;&#10;&lt;li&gt;rendering and loading&lt;/li&gt;&#10;&lt;li&gt;routing and transitions&lt;/li&gt;&#10;&lt;li&gt;data/state management&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="rendering-and-loading"&gt;Rendering and loading&lt;/h2&gt;&#10;&lt;p&gt;Bigger javascript bundle will always means a slower performance&#10;Serverside rendering have a faster FTP&lt;/p&gt;&#10;&lt;p&gt;SSR:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Performance&lt;/li&gt;&#10;&lt;li&gt;SEO&lt;/li&gt;&#10;&lt;li&gt;Data fetching&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Tecniques:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;SSR&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;SSR with hydration&lt;/p&gt;</description></item><item><title>NeuralSearchX: Serving a Multi-billion-parameter Reranker for Multilingual Metasearch at a Low Cost</title><link>https://rfbatista.github.io/jardim/articles/neuralsearchx/</link><pubDate>Sat, 03 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/articles/neuralsearchx/</guid><description>&lt;h2 id="multistage-ranking"&gt;Multistage ranking&lt;/h2&gt;&#10;&lt;h1 id="our-solution"&gt;Our solution&lt;/h1&gt;&#10;&lt;p&gt;A multi-stage metasearcgh engine, stage:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;candidade retrieval step using federated search over web search engines along with sparse and dense retrieval from private collection&lt;/li&gt;&#10;&lt;li&gt;reranking step based on previously selected documents with a neural model, score based on relavancy to a query&lt;/li&gt;&#10;&lt;li&gt;the best documents are sent to a highlighter model, that select s the most relevant sentecences from each document&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="1st-stage-candidates-retrieval"&gt;1st stage candidates retrieval&lt;/h2&gt;&#10;&lt;p&gt;Use sparse and dense retrieval methods (sparce to find exact matches and dense handles semantical meaning)&#10;Before indexing we split the contents of long documents over multiple windows&#10;windows of 150 words with stride of 75 words&lt;/p&gt;</description></item><item><title>Procedural Generation</title><link>https://rfbatista.github.io/jardim/games/procedural-generation/</link><pubDate>Sat, 03 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/games/procedural-generation/</guid><description>&lt;h1 id="procedural-generation"&gt;Procedural Generation&lt;/h1&gt;&#10;&lt;h2 id="evolutionay-computation"&gt;Evolutionay Computation&lt;/h2&gt;&#10;&lt;p&gt;É uma categoria de algoritmos baseados na idéia de uma população baseada em individuos.&#10;Em cada geração (iteração do algoritmos) os individuos são atualizados&#10;Isso acontece em duas operações &lt;code&gt;mutação&lt;/code&gt; e &lt;code&gt;seleção&lt;/code&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;mutação: age em cada individuo aplicando pequenas modificações&lt;/li&gt;&#10;&lt;li&gt;seleção: age em toda população removendo o pior individuo após a aplicação de uma &lt;code&gt;fitness function&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;A &lt;code&gt;fitness function&lt;/code&gt; utilizada para avaliar as soluções e determinar a condição de término do algoritmo.&#10;Esse método funciona bem em aplicações com grande numero de possiveis soluções.&lt;/p&gt;</description></item><item><title>Sistemas distribuidos</title><link>https://rfbatista.github.io/jardim/distributed-system/</link><pubDate>Sat, 03 Feb 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/distributed-system/</guid><description>&lt;p&gt;Fallacies of Distributed Computing&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The network is reliable&lt;/li&gt;&#10;&lt;li&gt;Latency is zero&lt;/li&gt;&#10;&lt;li&gt;Bandwidth is infinite&lt;/li&gt;&#10;&lt;li&gt;The network is secure&lt;/li&gt;&#10;&lt;li&gt;Topology doesn&amp;rsquo;t change&lt;/li&gt;&#10;&lt;li&gt;There is one administrator&lt;/li&gt;&#10;&lt;li&gt;Transport cost is zero&lt;/li&gt;&#10;&lt;li&gt;The network is homogeneous&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;(&lt;a href="https://dancres.github.io/Pages/%29[https://dancres.github.io/Pages/]"&gt;https://dancres.github.io/Pages/)[https://dancres.github.io/Pages/]&lt;/a&gt;&#10;(&lt;a href="https://ferd.ca/a-distributed-systems-reading-list.html?utm_source=hackernewsletter&amp;amp;utm_medium=email&amp;amp;utm_term=code%29[https://ferd.ca/a-distributed-systems-reading-list.html?utm_source=hackernewsletter&amp;amp;utm_medium=email&amp;amp;utm_term=code]"&gt;https://ferd.ca/a-distributed-systems-reading-list.html?utm_source=hackernewsletter&amp;utm_medium=email&amp;utm_term=code)[https://ferd.ca/a-distributed-systems-reading-list.html?utm_source=hackernewsletter&amp;utm_medium=email&amp;utm_term=code]&lt;/a&gt;&#10;(&lt;a href="https://github.com/aphyr/distsys-class%29[https://github.com/aphyr/distsys-class]"&gt;https://github.com/aphyr/distsys-class)[https://github.com/aphyr/distsys-class]&lt;/a&gt;&lt;/p&gt;</description></item><item><title>AWS ECS</title><link>https://rfbatista.github.io/jardim/aws/ecs/</link><pubDate>Sat, 06 Jan 2024 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/aws/ecs/</guid><description>&lt;h1 id="container-registry"&gt;Container registry&lt;/h1&gt;&#10;&lt;p&gt;Amazon ECR privaty registry&lt;/p&gt;&#10;&lt;h1 id="cluster"&gt;Cluster&lt;/h1&gt;&#10;&lt;h2 id="task-definition"&gt;Task definition&lt;/h2&gt;&#10;&lt;p&gt;ECS Cluster have tasks definitions. Taks definitions specifies parameters for application including which containers to run&lt;/p&gt;</description></item><item><title>WebRTC</title><link>https://rfbatista.github.io/jardim/protocols/webrtc/</link><pubDate>Thu, 02 Nov 2023 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/protocols/webrtc/</guid><description>&lt;p&gt;With WebRTC you can stream audio, video (or both) and arbritary data between browsers performing peer-to-peer communication. This is really powerful. In this article I will explain how WebRTC&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;acquiring audio or video&lt;/li&gt;&#10;&lt;li&gt;communicating audio and video&lt;/li&gt;&#10;&lt;li&gt;communicating arbritary data&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="javascript-api"&gt;Javascript API&lt;/h1&gt;&#10;&lt;h2 id="mediastream"&gt;MediaStream&lt;/h2&gt;&#10;&lt;p&gt;Represents a stream of audio and/or video. It allows access to camera and microphone from host device. To get a MediaStream you can call &lt;code&gt;navigator.getUserMedia&lt;/code&gt;&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;constraints&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;video&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;video&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;video&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;onError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;failed&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getUserMedia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;constraints&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onSuccess&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onError&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;With &lt;em&gt;constraints&lt;/em&gt; you can control the content of &lt;em&gt;MediaStream&lt;/em&gt;, like frame rate, type, width and height of the video. To use audiowe have a similar api.&lt;/p&gt;</description></item><item><title>IO Pipes</title><link>https://rfbatista.github.io/jardim/go/io-pipes/</link><pubDate>Sun, 15 Oct 2023 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/go/io-pipes/</guid><description>&lt;p&gt;With io.Pipe we have a convenient way to connect a writer to a reader, really similar to how channels work&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;io&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Pipe&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;h1 id="references"&gt;References&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=LHZ2CAZE6Gs&amp;amp;t=102s&amp;amp;ab_channel=justforfunc%3AProgramminginGo"&gt;justforfunc #19: mastering io.Pipes&lt;/a&gt;&lt;/p&gt;</description></item><item><title>PyTorch</title><link>https://rfbatista.github.io/jardim/ml/pytorch/</link><pubDate>Sun, 15 Oct 2023 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/ml/pytorch/</guid><description>&lt;h1 id="how-models-work-in-pytorch"&gt;How models work in PyTorch&lt;/h1&gt;&#10;&lt;p&gt;&lt;code&gt;nn.Module&lt;/code&gt; - fornece uma base para a criação de modelos personalizados, junto com funcionalidades que ajudam no treinamento.&lt;/p&gt;&#10;&lt;p&gt;Duas funções precisam ser definidas:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;code&gt;__init__&lt;/code&gt; definimos as várias camadas que serão utilizadas&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;forward&lt;/code&gt; definem a sequencias em que as camdas serão utilizadas&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h1 id="camadas-no-pytorch"&gt;Camadas no PyTorch&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;nn.Conv2d&lt;/code&gt; the convolutional layer&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;nn.BatchNorm2d&lt;/code&gt; normalização da saida da camada de covolução&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;nn.ReLU&lt;/code&gt; função de ativação&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;nn.MaxPool2d&lt;/code&gt; aplica max pooling na saída com o tamanho do kernel&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;nn.Dropout&lt;/code&gt; aplica &lt;code&gt;dropout&lt;/code&gt; na saida com uma dada probabilidade&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;nn.Linear&lt;/code&gt; camada totalmente conectada&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;nn.Sequential&lt;/code&gt; não é tecnicamente uma camada mas ajuda na combinação de diferentes operações que são parte da mesma etapa&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="treinamento"&gt;Treinamento&lt;/h1&gt;</description></item><item><title>ResNet</title><link>https://rfbatista.github.io/jardim/ml/res-net/</link><pubDate>Sun, 15 Oct 2023 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/ml/res-net/</guid><description>&lt;h1 id="redes-neurais-residuais-resnet"&gt;Redes Neurais Residuais (ResNet)&lt;/h1&gt;&#10;&lt;p&gt;Com o aumento de camadas nas redes neurais os gradientes da função de perda acabam tendendo 0 dessa formas os pesoas da rede não são atualizados (conhecido como &lt;code&gt;Vanishing Gradient Problem&lt;/code&gt;).&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://rfbatista.github.io/jardim/ml/res-net/1.png" alt="A Residual Block"&gt;&lt;/p&gt;&#10;&lt;h1 id="referencias"&gt;Referencias&lt;/h1&gt;&#10;&lt;p&gt;[1] &lt;a href="https://arxiv.org/pdf/1512.03385v1.pdf"&gt;https://arxiv.org/pdf/1512.03385v1.pdf&lt;/a&gt;&#10;[2] &lt;a href="https://medium.com/@ibtedaazeem/understanding-resnet-architecture-a-deep-dive-into-residual-neural-network-2c792e6537a9"&gt;https://medium.com/@ibtedaazeem/understanding-resnet-architecture-a-deep-dive-into-residual-neural-network-2c792e6537a9&lt;/a&gt;&#10;[3] &lt;a href="https://blog.paperspace.com/writing-resnet-from-scratch-in-pytorch/"&gt;https://blog.paperspace.com/writing-resnet-from-scratch-in-pytorch/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>GO - Strings</title><link>https://rfbatista.github.io/jardim/go/go-string/</link><pubDate>Mon, 11 Sep 2023 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/go/go-string/</guid><description>&lt;p&gt;Uma string é uma sequencia imutavel de bytes.&#10;As strings são convencionalmente interpretadas como sequencias de pontos de código Unicode (&lt;code&gt;runas&lt;/code&gt;) codificadas em UTF-8.&lt;/p&gt;&#10;&lt;p&gt;A função &lt;code&gt;len&lt;/code&gt;devolve o número de bytes não de runas&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-golang" data-lang="golang"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;hello, world&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// 12&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;fmt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Println&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// &amp;#34;104 119&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;O iésimo byte de uma string não corresponde diretamente ao iésimo caracter, pois a codificação &lt;code&gt;UTF-8&lt;/code&gt; de um ponto de código que não seja ASCII exige mais.&lt;/p&gt;</description></item><item><title>Gorrotinas e Canais</title><link>https://rfbatista.github.io/jardim/go/go-gorrotinas-canais/</link><pubDate>Sat, 15 Jul 2023 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/go/go-gorrotinas-canais/</guid><description>&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;go&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;f&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// cria uma nova gorrotina que chama f()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;h1 id="canais"&gt;Canais&lt;/h1&gt;&#10;&lt;p&gt;Os canais sãos os meios de comunicação entre as gorrotinas&#10;Cada canal é um comunicador de um tipo particular&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;ch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;make&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;chan&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// ch é do tipo chan int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;Um canal é uma referência a estrutura criada por make&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;instrução de envio: &lt;code&gt;ch &amp;lt;-x&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;instrução de recpção em uma instrução de atribuição: &lt;code&gt;x = &amp;lt;-ch&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;instrução de recepção com resultado descartado: &lt;code&gt;&amp;lt;-ch&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="para-fechar-um-canal"&gt;Para fechar um canal&lt;/h3&gt;&#10;&lt;p&gt;&lt;code&gt;close(ch)&lt;/code&gt;&lt;/p&gt;</description></item><item><title>GO - Tipos compostos</title><link>https://rfbatista.github.io/jardim/go/go-tipo-compostos/</link><pubDate>Wed, 19 Apr 2023 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/go/go-tipo-compostos/</guid><description>&lt;h1 id="array"&gt;Array&lt;/h1&gt;&#10;&lt;p&gt;Um array é uma sequencia de tamanho fixo de zero ou mais elements&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// com a reticencia o tamano será determinado pela quantidade de inicializadores&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;O tamanho de um array faz parte do seu tipo&lt;/p&gt;&#10;&lt;figure class="highlight"&gt;&#10; &lt;pre tabindex="0" class="chroma"&#10; &gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// erro de compilação: não é permitido atribuir [4]int a [3]int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;Arrays são inflexiveis&lt;/p&gt;&#10;&lt;h1 id="fatias-slices"&gt;Fatias (slices)&lt;/h1&gt;&#10;&lt;p&gt;Uma fatia representa um sequencia de tamanho variavel cujo elementos tem o mesmo tipo.&#10;Uma fatia tem tres elementos:&lt;/p&gt;</description></item><item><title>Links que guardei</title><link>https://rfbatista.github.io/jardim/links/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/links/</guid><description>&lt;h1 id="blogs-and-personal-website"&gt;Blogs and Personal Website&lt;/h1&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://www.noghartt.dev/"&gt;https://www.noghartt.dev/&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://fs.blog/"&gt;https://fs.blog/&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://100r.co/site/home.html"&gt;https://100r.co/site/home.html&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://www.kalzumeus.com/"&gt;https://www.kalzumeus.com/&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://dotink.co/"&gt;https://dotink.co/&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://martin.kleppmann.com/"&gt;https://martin.kleppmann.com/&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://startupnextdoor.com/"&gt;John Washam&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="software-architecture"&gt;Software Architecture&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://www.workingsoftware.dev/fundamental-techniques-for-software-architects/?&amp;amp;aid=recJPFzgkC3jgOpfe&amp;amp;_bhlid=49be9321cfdcd094079855902469e994055bbadd"&gt;27 Fundamental Techniques for Software Architects&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="articles"&gt;Articles&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://bdupras.github.io/filter-tutorial/"&gt;Probabilistic Filters By Example&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://observer.com/2017/07/a-look-into-nasa-coding-philosophy-kennedy-space-center-programming/"&gt;A Look Into NASA’s Coding Philosophy&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://cloud.google.com/blog/products/devops-sre/using-the-four-keys-to-measure-your-devops-performance"&gt;Are you a elit devops performer&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://samwho.dev/turing-machines/#what-does-it-mean-to-be-turing-complete"&gt;What does it mean to be turing complete&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="frontend"&gt;Frontend&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://ui.dev/why-react-query"&gt;Why React Query&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.reddit.com/r/reactjs/comments/1fogphw/next_js_why_or_why_not/"&gt;NextJs why or why not&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="devops"&gt;devops&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://bored-dev.com/posts/building-hashicorp-nomad-cluster-with-raspberry-pi-part-1/"&gt;Building Hashicorp Nomad Cluster With Raspberry Pi. Part 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h1 id="music"&gt;Music&lt;/h1&gt;&#10;&lt;p&gt;&lt;a href="https://www.youtube.com/@spiritual_brother"&gt;https://www.youtube.com/@spiritual_brother&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="youtube-channels"&gt;Youtube Channels&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://www.youtube.com/@distrotube"&gt;https://www.youtube.com/@distrotube&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.youtube.com/@mlopslearners"&gt;https://www.youtube.com/@mlopslearners&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="real-time-applications"&gt;Real-time applications&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=3qGxVYJF3IU"&gt;Building Real-time Apps with Go | Azim Pulat&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="talks"&gt;Talks&lt;/h2&gt;&#10;&lt;p&gt;Scaling Yourself - &lt;a href="https://www.youtube.com/watch?v=FS1mnISoG7U"&gt;https://www.youtube.com/watch?v=FS1mnISoG7U&lt;/a&gt;&#10;&lt;a href="https://www.youtube.com/watch?v=NP9AIUT9nos"&gt;Lone Star Ruby Conference 2010 Real Software Engineering by Glenn Vanderburg&lt;/a&gt;&lt;/p&gt;</description></item><item><title>LLM Inference</title><link>https://rfbatista.github.io/jardim/ml/llm-inference/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/ml/llm-inference/</guid><description>&lt;p&gt;The lifecycle of a model is implemented in the following steps:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Open the model file and read the shapes of the weights, but don&amp;rsquo;t load the&#10;weights yet.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Using the loaded shapes and optional metadata, instantiate a model struct&#10;with &lt;code&gt;Tensor&lt;/code&gt;s, representing the shape and layout of each layer of the NN.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Compile the model struct and it&amp;rsquo;s &lt;code&gt;forward&lt;/code&gt; function into an accelerator&#10;specific executable. The &lt;code&gt;forward&lt;/code&gt; function describes the mathematical&#10;operations corresponding to the model inference.&lt;/p&gt;</description></item><item><title>Para ler</title><link>https://rfbatista.github.io/jardim/para-ler/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rfbatista.github.io/jardim/para-ler/</guid><description>&lt;p&gt;O que é uma &lt;a href="https://nesslabs.com/antilibrary"&gt;antibiblioteca&lt;/a&gt;? De forma&#10;simples, uma antibiblioteca é uma coleção particular de livros ainda não lidos.&#10;Em vez de celebrar tudo o que você já sabe, ela é uma homenagem a tudo o que&#10;você quer explorar.&lt;/p&gt;&#10;&lt;section class="bed"&gt;&#10; &lt;ul&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;Tiny Experiments: How to Live Freely in a Goal-Obsessed World&lt;/span&gt;&lt;span class="d"&gt;Anne-Laure Le Cunff&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;The Penguin Modern Classics Book&lt;/span&gt;&lt;span class="d"&gt;Henry Eliot&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;The Human Animal: A Personal View of the Human Species&lt;/span&gt;&lt;span class="d"&gt;Desmond Morris&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;Reflexos do mundo: Trabalhar e viver&lt;/span&gt;&lt;span class="d"&gt;Fabien Toulmé&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;The Making of Prince of Persia: Journals 1985-1993&lt;/span&gt;&lt;span class="d"&gt;Jordan Mechner&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;A cidade e suas muralhas incertas&lt;/span&gt;&lt;span class="d"&gt;Haruki Murakami&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;Building Scientific Apparatus: A Practical Guide to Design and Construction&lt;/span&gt;&lt;span class="d"&gt;John H. Moore et al.&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;The Origins of Efficiency&lt;/span&gt;&lt;span class="d"&gt;Brian Potter&lt;/span&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;span class="g" title="para ler"&gt;◌&lt;/span&gt;&lt;span class="t"&gt;Maintenance of Everything: Part One&lt;/span&gt;&lt;span class="d"&gt;Stewart Brand&lt;/span&gt;&lt;/li&gt;&#10; &lt;/ul&gt;&#10;&lt;/section&gt;</description></item></channel></rss>