<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mathieu Kerjouan</title>
    <description>The latest articles on DEV Community by Mathieu Kerjouan (@niamtokik).</description>
    <link>https://dev.to/niamtokik</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1302415%2Ff02d4ee9-14d9-45ec-966a-6bb53e0e3240.jpeg</url>
      <title>DEV Community: Mathieu Kerjouan</title>
      <link>https://dev.to/niamtokik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/niamtokik"/>
    <language>en</language>
    <item>
      <title>WeekReview#202638</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Mon, 21 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/weekreview202638-2hok</link>
      <guid>https://dev.to/niamtokik/weekreview202638-2hok</guid>
      <description>&lt;p&gt;Linkedin is a mess. While I started to write articles on dev.to, I also started to create scheduled posts on Linkedin. It was working correctly until few days ago, when the "scheduler manager" just disappears. After 2 long hours to search where I could find a similar feature, I just stopped and started to use the "newsletter" feature from them. That's crazy to see how we are dependent of those services, and how they are treating us.&lt;/p&gt;

&lt;p&gt;My feeds were quiet this week. Not a lot of interesting link to show.&lt;/p&gt;

&lt;p&gt;Reflexion about Dart code design. What is the best way to design a module in Dart? It can be designed in many different ways, for example, the class can embed the methods to publish a post for example or delete it. In this case, the object must be instantiated first and then the methods can be called.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Publication&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;Publication&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="kd"&gt;required&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="n"&gt;Publication&lt;/span&gt; &lt;span class="n"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;Publication&lt;/span&gt; &lt;span class="n"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;pub&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Publication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;id:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;pub&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What about using a more functional way of doing that, by using the classes/objects as data-structures and passing them directly to functions outside of the class definition?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Publication&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;Publication&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="kd"&gt;required&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;Publication&lt;/span&gt; &lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Publication&lt;/span&gt; &lt;span class="n"&gt;pub&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pub&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;Publication&lt;/span&gt; &lt;span class="nf"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Publication&lt;/span&gt; &lt;span class="n"&gt;pub&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pub&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;pub&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Publication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;id:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pub&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which method is the best? Well, I'm currently thinking to use the second one. The reason is simple, isolating side effect from the object itself, and function composition. Then, the object created can only be used with accessors, with some part of it in read-only or totally hidden. Anyway, I think it's mostly about coding style.&lt;/p&gt;

&lt;p&gt;After few days of testing, using a mix of the two methods can be the best way. Another important part is how to name the module and how to organize the exported functions. Erlang, I miss you.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://x.com/beniduboss/status/2100561129118265715?s=20" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3ih4a2jwnetpyjdjr9lb.png" alt="See a rumor that Mistral got hacked" width="598" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back in May 2026, I &lt;a href="https://x.com/niamtokik/status/2056966992431649188" rel="noopener noreferrer"&gt;tweeted&lt;/a&gt; about the next threat that will come with OpenClaws and other LLMs used to remote control platforms. ~4 months later, &lt;a href="https://mistral.ai/" rel="noopener noreferrer"&gt;Mistral&lt;/a&gt; has been hacked and it seems this is a serious issue. Unreleased code, entire code base and so on can now be found on tor. This is only the beginning, the next step is to infiltrate all layers, inject code and take control of the code produced by LLMs. Remember Linus Torvald saying "LLMs are just kind of compilers" few months ago? Well, if you can't trust your compiler, you can't trust what it produces, see &lt;a href="https://people.cs.umass.edu/~emery/classes/cmpsci691st/readings/Sec/Reflections-on-Trusting-Trust.pdf" rel="noopener noreferrer"&gt;"Reflections on Trusting Trust"&lt;/a&gt; by Ken Thompson. What the next step after that? Control the servers where those LLMs are executing tasks, and it's only a matter of time. Good luck to all developers and admins who installed this crap on their servers, including laptops, test and dev machines. Oh, and by the way, &lt;a href="https://mistral.ai/news/mistral-x-mozilla/" rel="noopener noreferrer"&gt;Mistral has been integrated in Firefox recently&lt;/a&gt;, have fun and sleep well!&lt;/p&gt;

&lt;h1&gt;
  
  
  Coding
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://dart.dev/blog/google-summer-of-code-2026-results" rel="noopener noreferrer"&gt;&lt;strong&gt;Dart Google Summer of Code 2026 results&lt;/strong&gt;&lt;/a&gt;: a report for the Dart Google Summer of code. &lt;a href="https://github.com/dart-lang/native/tree/main/pkgs/ffigen" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;code&gt;package:ffigen&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt; looks promising and will help to create interface from c++ to dart. The other interesting project was &lt;a href="https://github.com/TheNourhan/Dart-GSoC26" rel="noopener noreferrer"&gt;debugging improvements for pointers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://doc.libsodium.org/advanced/point-arithmetic" rel="noopener noreferrer"&gt;&lt;strong&gt;libsodium/Finite field arithmetic&lt;/strong&gt;&lt;/a&gt;: white searching a good cryptographic library for Dart (yeah, the ones available don't fit my needs), I read the &lt;code&gt;libsodium&lt;/code&gt; documentation, especially the part on valid points.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://docs.pears.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Pear Docs&lt;/strong&gt;&lt;/a&gt;: yet another p2p system. This time, it has been mostly done in javascript, by &lt;a href="https://github.com/holepunchto/" rel="noopener noreferrer"&gt;Holepunch&lt;/a&gt;. Some note on the &lt;a href="https://github.com/Rightbracket/peeroxide/blob/main/libudx/PROTOCOL.md" rel="noopener noreferrer"&gt;protocol&lt;/a&gt; can be also found on github from &lt;a href="https://github.com/holepunchto/libudx/" rel="noopener noreferrer"&gt;libudx&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://c-faq.com/decl/spiral.anderson.html" rel="noopener noreferrer"&gt;&lt;strong&gt;The "Clockwise/Spiral Rule"&lt;/strong&gt;&lt;/a&gt;: did not know this method to mentally parse C.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://cdecl.org/" rel="noopener noreferrer"&gt;&lt;strong&gt;cdecl&lt;/strong&gt;&lt;/a&gt;: an online tool to decipher C language notation, also available as &lt;a href="https://github.com/paul-j-lucas/cdecl" rel="noopener noreferrer"&gt;CLI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://github.com/openbsd/src/commit/d74b165ebc85c9aaf5150f25e6088f52d9fc0f04" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenBSD vmm/vmd SMP support&lt;/strong&gt;&lt;/a&gt;: nice! We will be able to set the number of CPUs for a VM on OpenBSD, thanks to &lt;a href="https://x.com/canadianbryan/status/2101118786497548629?s=20" rel="noopener noreferrer"&gt;Bryan Steele&lt;/a&gt; for the news.&lt;/p&gt;

&lt;h1&gt;
  
  
  System
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://www.phoronix.com/news/Void-Linux-AI-Policy-Orphan" rel="noopener noreferrer"&gt;&lt;strong&gt;Void Linux Maintainer Orphans 100+ Packages Over AI Policy Dispute&lt;/strong&gt;&lt;/a&gt;: the reason why I like &lt;a href="http://www.voidlinux.eu/" rel="noopener noreferrer"&gt;Void Linux&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/jedisct1/turbocrypt" rel="noopener noreferrer"&gt;&lt;strong&gt;turbocrypt&lt;/strong&gt;&lt;/a&gt;: A fast, easy-to-use, and secure command-line tool for encrypting and decrypting files , git repositories and directory trees.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.phoronix.com/news/OpenBSD-GEFS-File-System" rel="noopener noreferrer"&gt;&lt;strong&gt;Crash-Safe &amp;amp; Copy-On-Write GEFS As The "Good Enough File-System" For OpenBSD&lt;/strong&gt;&lt;/a&gt;: more than 10 years ago, HAMMER2 from DragonFlyBSD was planned to be ported to OpenBSD, but it never happened. This filesystem could be a good candidate to replace that. The &lt;a href="https://orib.dev/gefs.pdf" rel="noopener noreferrer"&gt;specifications&lt;/a&gt; are looking good. The snapshot feature is really what is missing on many filesystems, including UFS.&lt;/p&gt;

&lt;h1&gt;
  
  
  Database
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/beh74/pgassistant-community" rel="noopener noreferrer"&gt;&lt;strong&gt;pgassistant project&lt;/strong&gt;&lt;/a&gt;: A PostgreSQL assistant for developers Understand, optimize, and improve your PostgreSQL database with ease.&lt;/p&gt;

&lt;h1&gt;
  
  
  Network
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://blog.quarkslab.com/overview-of-passive-optical-networks-pons-security.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Overview of Passive Optical Networks (PONs) Security&lt;/strong&gt;&lt;/a&gt;: a deep introduction to optical network security, a lot of information there.&lt;/p&gt;

&lt;h1&gt;
  
  
  Mathematics
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://terrytao.wordpress.com/2026/09/07/finite-time-blowup-with-smooth-forcing-term-for-the-incompressible-porous-medium-boussinesq-and-incompressible-euler-equations/comment-page-1/#comment-694321" rel="noopener noreferrer"&gt;&lt;strong&gt;Finite time blowup with smooth forcing term for the incompressible porous medium, Boussinesq, and incompressible Euler equations&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Embedded
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://bret.dk/pi-zero-showdown/" rel="noopener noreferrer"&gt;&lt;strong&gt;The Great Pi Zero Showdown&lt;/strong&gt;&lt;/a&gt;:  if you want to see benchmarks comparing different kind of Pi Zero implementation.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://anonymousplanet.net/guide/" rel="noopener noreferrer"&gt;&lt;strong&gt;The Hitchhiker's Guide to Online Anonymity (and Privacy)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.marginaldeer.com/blog/apk-reverse-engineering-workflow/" rel="noopener noreferrer"&gt;&lt;strong&gt;From APK to Source: Complete Android Reverse Engineering Workflow&lt;/strong&gt;&lt;/a&gt;: a succinct post containing the essential procedure to reverse engineer an android package (apk).&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://robinx0.github.io/blogs/mobile-security/apk-reverse-engineering/" rel="noopener noreferrer"&gt;&lt;strong&gt;Android APK Reverse Engineering: From APK to Source&lt;/strong&gt;&lt;/a&gt;: another post listing the essential procedures to reverse an android package. &lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://blog.quarkslab.com/index.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Quarklabs' blog&lt;/strong&gt;&lt;/a&gt;: lot of interesting articles about modern security (and programming).&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.sophos.com/en-us/blog/uncensored-luciferus-ai-service-advertised-underground" rel="noopener noreferrer"&gt;&lt;strong&gt;Devil’s advocate? Uncensored Luciferus AI service advertised underground&lt;/strong&gt;&lt;/a&gt;: underground actors are selling uncensored LLMs. Good to know.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://v12.sh/blog/webkit" rel="noopener noreferrer"&gt;&lt;strong&gt;The XSS inside your favorite iOS app&lt;/strong&gt;&lt;/a&gt;: XSS can also be found in mobile application via WebView for Android and MKWebView for iOS. Good to know because one of my project is using WebView, hardening this part could be a good idea.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://heif-heist.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;HEIF Heist, One image parser to pwn them all&lt;/strong&gt;&lt;/a&gt;: the story behind &lt;a href="https://github.com/strukturag/libheif" rel="noopener noreferrer"&gt;&lt;code&gt;libheif&lt;/code&gt;&lt;/a&gt; library vulnerability exploitation. Announced by &lt;a href="https://x.com/rootxharsh/status/2100801820960620574?s=20" rel="noopener noreferrer"&gt;Harsh Jaiswal (@rootxharsh)&lt;/a&gt; on X/Twitter.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://hackers-arise.com/browser-forensics-analyzing-suspicious-extensions-with-extanalysis/" rel="noopener noreferrer"&gt;&lt;strong&gt;Browser Forensics: Analyzing Suspicious Extensions with ExtAnalysis&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/cryptography
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://hdevalence.ca/blog/2020-10-04-its-25519am/" rel="noopener noreferrer"&gt;&lt;strong&gt;It's 255:19AM. Do you know what your validation criteria are?&lt;/strong&gt;&lt;/a&gt;: when I was looking for an up to date list of invalid or low-order public keys, I found this post. It seems most of the ed25519 on the market are not compatible with the &lt;a href="https://datatracker.ietf.org/doc/html/rfc8032" rel="noopener noreferrer"&gt;RFC8032&lt;/a&gt; (Edwards-Curve Digital Signature Algorithm (EdDSA)), mostly due to design issue and also because the RFC came after all implementations. That's actually a huge portability problem and a security issue as well. &lt;/p&gt;

&lt;h1&gt;
  
  
  Security/RedTeam
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://hetmehta.com/posts/Bypassing-Modern-WAF/" rel="noopener noreferrer"&gt;&lt;strong&gt;Advanced Techniques for Bypassing Modern Web Application Firewalls&lt;/strong&gt;&lt;/a&gt;: a very long list of attacks for bypassing WAF.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://hetmehta.com/posts/json-interoperability-vulnerabilities/" rel="noopener noreferrer"&gt;&lt;strong&gt;JSON Interoperability Vulnerabilities: A Deep Dive&lt;/strong&gt;&lt;/a&gt;: we tend to think JSON is secure because of its simplicity, portability and its presence everywhere. This article list different kind of vulnerabilities that can be found on JSON serializers. interesting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.accomplish.ai/blog/escaping-dockers-hypervisor/" rel="noopener noreferrer"&gt;&lt;strong&gt;Guesttohost:escapingDocker'shypervisor&lt;/strong&gt;&lt;/a&gt;: docker hypervisor escape on MacOS, due to virtio-fs. ingenious way to get out of a container.&lt;/p&gt;

&lt;h1&gt;
  
  
  Update/Upgrade
&lt;/h1&gt;

&lt;p&gt;🔄 &lt;a href="https://github.com/phoenixframework/phoenix/releases/tag/v1.8.14" rel="noopener noreferrer"&gt;&lt;strong&gt;Phoenix 1.8.14&lt;/strong&gt;&lt;/a&gt;: bug fixes&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://github.com/rabbitmq/rabbitmq-server/releases/tag/v4.3.6" rel="noopener noreferrer"&gt;&lt;strong&gt;RabbitMQ 4.3.6&lt;/strong&gt;&lt;/a&gt;: bug fixes and enhancements.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://github.com/erlang/otp/releases/tag/OTP-29.1" rel="noopener noreferrer"&gt;&lt;strong&gt;Erlang/OTP 29.1&lt;/strong&gt;&lt;/a&gt;: many bug fixes and security issues. No new features.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://undeadly.org/cgi?action=article;sid=20260916093956" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenSMTPD 7.9.0p0 released&lt;/strong&gt;&lt;/a&gt;: bugs fixes and hardening.&lt;/p&gt;

&lt;h1&gt;
  
  
  Embedded
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://www.venture-mfg.com/what-is-biodegradable-pcbs/" rel="noopener noreferrer"&gt;&lt;strong&gt;Biodegradable PCBs – The Future of Sustainable Electronics&lt;/strong&gt;&lt;/a&gt;: good to know, we can now create biodegradable PCBs. Not sure if it's a good thing for the environment (e.g. heavy metals, polymers), but it's a first step.&lt;/p&gt;

&lt;h1&gt;
  
  
  Misc
&lt;/h1&gt;

&lt;p&gt;🌐 &lt;a href="https://bobkonf.de/2027/en/" rel="noopener noreferrer"&gt;&lt;strong&gt;BOB Conf&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://desertant.com/blog/introducing-desert-ant-labs/" rel="noopener noreferrer"&gt;&lt;strong&gt;On-device intelligence for every product&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🏛️ &lt;a href="https://cel.cs.brown.edu/csci-1377-s26/" rel="noopener noreferrer"&gt;&lt;strong&gt;Tools for Thought&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4737265" rel="noopener noreferrer"&gt;&lt;strong&gt;Theory Is All You Need: AI, Human Cognition, and Causal Reasoning&lt;/strong&gt;&lt;/a&gt;: Here a part of the abstract.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Scholars argue that artificial intelligence (AI) can generate genuine novelty and new knowledge and, in turn, that AI and computational models of cognition will replace human decision making under uncertainty. We disagree. We argue that AI’s data-based prediction is different from human theory-based causal logic and reasoning. We highlight problems with the decades-old analogy between computers and minds as input–output devices, using large language models as an example. Human cognition is better conceptualized as a form of theory-based causal reasoning rather than AI’s emphasis on information processing and data-based prediction.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;📝 &lt;a href="https://arstechnica.com/gadgets/2026/09/iran-strikes-on-amazon-data-centers-caused-permanent-loss-of-customer-data/" rel="noopener noreferrer"&gt;&lt;strong&gt;Iran strikes on Amazon data centers caused permanent loss of customer data&lt;/strong&gt;&lt;/a&gt;: the cloud during war becomes foggy.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.phoronix.com/news/Intel-Bug-Bounty-Program-Ends" rel="noopener noreferrer"&gt;&lt;strong&gt;Intel Appears To End Its Bug Bounty Program&lt;/strong&gt;&lt;/a&gt;: if it's the case, why? It could be due to the amount of false-positive bugs found with LLMs, it can have a really huge impact on developers team. Curious to know more about the reason.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz5sdcay7q0vggq6ha5fz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz5sdcay7q0vggq6ha5fz.png" alt="Not quite my frequency" width="679" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo00b41twz19n0lsxirpn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo00b41twz19n0lsxirpn.png" alt="Chad third-party scraper" width="601" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqsc3cnzi1xce1t1dhom6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqsc3cnzi1xce1t1dhom6.png" alt=" " width="598" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx17nww8qzebh1atl8aq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx17nww8qzebh1atl8aq5.png" alt="A matrix timeline" width="548" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftku05s622omvkb1qrwkt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftku05s622omvkb1qrwkt.png" alt=" " width="659" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F99r7ybaxaowwl0vs7rd6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F99r7ybaxaowwl0vs7rd6.png" alt=" " width="679" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6t7o3vgkvlspf0na20n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6t7o3vgkvlspf0na20n.png" alt=" " width="450" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fev23mukedrt55et7frdk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fev23mukedrt55et7frdk.png" alt=" " width="625" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F750ro2yq7ykmwiv0v6br.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F750ro2yq7ykmwiv0v6br.png" alt=" " width="680" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx9s9gcza5e1uxk82w213.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx9s9gcza5e1uxk82w213.png" alt=" " width="675" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2d4zn69b5vmcsh50y5x2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2d4zn69b5vmcsh50y5x2.png" alt=" " width="680" height="614"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@sunira?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Sunira Moses&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/orange-and-green-pumpkins-on-blue-plastic-container-XZ83-3HJei0?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>weekly</category>
      <category>review</category>
    </item>
    <item>
      <title>Q&amp;D: Flutter App and Android-SDK</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Thu, 17 Sep 2026 08:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/qd-flutter-app-and-android-sdk-2ncm</link>
      <guid>https://dev.to/niamtokik/qd-flutter-app-and-android-sdk-2ncm</guid>
      <description>&lt;p&gt;After having upgraded few tools on machine, one of my application was totally unable to run. I got a lot of warnings, especially this one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;Warning: Flutter support for your project's Gradle version (8.14.0) will soon be dropped. Please upgrade your Gradle version to a version of at least 9.1.0 soon.                             
Alternatively, use the flag "--android-skip-build-dependency-validation" to bypass this check
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and finally...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;FAILURE: Build failed with an exception.                                                                                                                                                      

* What went wrong:                                                                                                                                                                            
Execution failed for task ':app:compileFlutterBuildDebug'.                                                                                                                                    
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;A problem occurred starting process &lt;span class="s1"&gt;'command '&lt;/span&gt;/home/user/.local/share/mise/http-tarballs/dd5ae32abcea719e3c351c56a28308b91e2ce97fb5702bf2710c2527dde522af_strip_1/bin/flutter&lt;span class="s1"&gt;''&lt;/span&gt;             
&lt;span class="go"&gt;
* Try:                                                                                                                                                                                        
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Run with &lt;span class="nt"&gt;--stacktrace&lt;/span&gt; option to get the stack trace.
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Run with &lt;span class="nt"&gt;--info&lt;/span&gt; or &lt;span class="nt"&gt;--debug&lt;/span&gt; option to get more log output.
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Run with &lt;span class="nt"&gt;--scan&lt;/span&gt; to get full insights.
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Get more &lt;span class="nb"&gt;help &lt;/span&gt;at https://help.gradle.org.
&lt;span class="go"&gt;
BUILD FAILED in 1s
Running Gradle task 'assembleDebug'...                           1,270ms
Error: Gradle build failed due to Java/Gradle incompatibility.
The Java version used for the build is 25.0.3, which is incompatible with Gradle 8.14.
To fix this, you can either:
  1. Upgrade your project's Gradle version (typically in gradle-wrapper.properties to a version matching the range: compatible Gradle versions for Java 25.0.3 are 9.1.0 or newer).
&lt;/span&gt;&lt;span class="gp"&gt;  2. Use a different Java version for Flutter by running `flutter config --jdk-dir=&amp;lt;path&amp;gt;&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Annoying right? In fact, many other warnings were displayed, but what happened there? The last time, it was working without problem. Let have a look on the android sdk&lt;/p&gt;

&lt;h1&gt;
  
  
  &amp;nbsp;Android SDK Upgrade
&lt;/h1&gt;

&lt;p&gt;The "old" latest version of the android-sdk called &lt;a href="https://developer.android.com/studio/releases/past-releases/as-panda-4-release-notes" rel="noopener noreferrer"&gt;Panda 4&lt;/a&gt; was used, instead of the new latest version called &lt;a href="https://developer.android.com/studio/releases" rel="noopener noreferrer"&gt;Quail 4&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;Downloads
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;wget https://edgedl.me.gvt1.com/android/studio/ide-zips/2026.1.4.7/android-studio-quail4-linux.tar.gz
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;tar &lt;/span&gt;zxf android-studio-quail4-linux.tar.gz
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;android-studio
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls &lt;/span&gt;bin
&lt;span class="go"&gt;appletviewer.policy  game-tools.sh    lldb         studio              studio.svg
brokenPlugins.db     helpers          ltedit.sh    studio64.vmoptions
format.sh            idea.properties  profiler.sh  studio.png
fsnotifier           inspect.sh       restarter    studio.sh
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Android SDK Platforms and Tools Upgrade
&lt;/h1&gt;

&lt;p&gt;The latest android-studio version is now installed, but the SDK Platforms and the SDK Tools needs to be upgraded as well. It can be done via android studio directly in &lt;code&gt;Menu &amp;gt; Tools &amp;gt; SDK Managers&lt;/code&gt;. The versions to upgrade to should be displayed with the installed one as well. If needed, install some latest versions or missing tools.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;./bin/studio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The upgraded versions should have been extracted in the &lt;code&gt;${HOME}/Android&lt;/code&gt; directory. It can also be done using the &lt;code&gt;sdkmanager&lt;/code&gt; tool.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sdkmanager &lt;span class="nt"&gt;--update&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Flutter and Dart upgrade
&lt;/h1&gt;

&lt;p&gt;My development machine is using &lt;code&gt;mise&lt;/code&gt; to have the latest version of flutter and dart. The version of these applications are usually stored in the &lt;code&gt;.tool-versions&lt;/code&gt;. It can be upgraded using the &lt;code&gt;upgrade&lt;/code&gt; subcommand.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/project
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; .tool-versions
&lt;span class="go"&gt;flutter latest
dart latest

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;mise upgrade
&lt;span class="c"&gt;...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Environment Variables
&lt;/h1&gt;

&lt;p&gt;My environment was a mess, because many tools were living together and usually, because you want to do something quick, you put everything in your &lt;code&gt;~/.bashrc&lt;/code&gt;. Here the new conf.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# recreates a full clean path from scratch&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin:/usr/bin:/usr/local/bin
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/sbin:/usr/sbin:/usr/local/sbin:&lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/bin:&lt;span class="nv"&gt;$PATH&lt;/span&gt;

&lt;span class="c"&gt;# enable mise&lt;/span&gt;
&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;~/mise/bin/mise activate bash&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="c"&gt;# set android configuration&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ANDROID_HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/Android/Sdk
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/tools:&lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/tools/bin:&lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/platform-tools:&lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/cmake/4.1.2/bin:&lt;span class="nv"&gt;$PATH&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$ANDROID_HOME&lt;/span&gt;/cmdline-tools/latest/bin:&lt;span class="nv"&gt;$PATH&lt;/span&gt;

&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CHROME_EXECUTABLE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;which chromium&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;EDITOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Flutter and Gradle
&lt;/h1&gt;

&lt;p&gt;Gradle was crying because of an old version unsupported to some new versions installed. To be honest, my android application version is still quite simple, so, I fixed the issue by recreating the &lt;code&gt;android&lt;/code&gt; directory from the flutter project root.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/project
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;android android.old
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter create &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--platforms&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;android
&lt;span class="go"&gt;Recreating project .... 
&lt;/span&gt;&lt;span class="c"&gt;...
&lt;/span&gt;&lt;span class="go"&gt;Resolving dependencies...                                                                                                                                                                     
Downloading packages...                                                                                                                                                                       
Got dependencies.                                                                                                                                                                             
Wrote 26 files.                                                                                                                                                                               

All done!                                                                                                                                                                                     
You can find general documentation for Flutter at: https://docs.flutter.dev/                                                                                                                  
Detailed API documentation is available at: https://api.flutter.dev/                                                                                                                          
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev                                                                                                             

In order to run your application, type:                                                                                                                                                       

&lt;/span&gt;&lt;span class="gp"&gt;  $&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter run                                                                                                                                                                               
&lt;span class="go"&gt;
Your application code is in ./lib/main.dart.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application can now be restarted again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the &lt;a href="https://docs.flutter.dev/reference/flutter-cli" rel="noopener noreferrer"&gt;&lt;code&gt;flutter&lt;/code&gt; command reference&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Another Gradle issue
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;WARNING: A restricted method in java.lang.System has been called                                                                                                                              
WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/home/user/.gradle/wrapper/dists/gradle-9.3.1-all/9ot9r
568e8zfvvd4mn8rbu1j0/gradle-9.3.1/lib/native-platform-0.22-milestone-29.jar)                                                                                                                  
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module                                                                                                 
WARNING: Restricted methods will be blocked in a future release unless native access is enabled 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This one is a bit tricky. On the latest android-studio version, the bundled version of JDK is 25+. Let check that with &lt;code&gt;flutter doctor&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter doctor &lt;span class="nt"&gt;--verbose&lt;/span&gt;
&lt;span class="c"&gt;...
&lt;/span&gt;&lt;span class="go"&gt;[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [248ms]                                                                                                      
    • Android SDK at /home/user/Android/Sdk                                                                                                                                                   
    • Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)                                                                                                                                 
    • Platform android-37.2, build-tools 37.0.0                                                                                                                                               
    • ANDROID_HOME = /home/user/Android/Sdk                                                                                                                                                   
    • Java binary at: /home/user/Downloads/android-studio/jbr/bin/java                                                                                                                        
      This is the JDK bundled with the latest Android Studio installation on this machine.                                                                                                    
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.                                                                                                            
    • Java version OpenJDK Runtime Environment (build 25.0.3+-15898627-b508.16)                                                                                                               
    • All Android licenses accepted.
&lt;/span&gt;&lt;span class="c"&gt;...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Indeed, it looks like it uses OpenJDK25+... Just to confirm, let execute &lt;code&gt;java&lt;/code&gt; directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;~/Downloads/android-studio/jbr/bin/java &lt;span class="nt"&gt;-version&lt;/span&gt;
&lt;span class="go"&gt;openjdk version "25.0.3" 2026-04-21
OpenJDK Runtime Environment (build 25.0.3+-15898627-b508.16)
OpenJDK 64-Bit Server VM (build 25.0.3+-15898627-b508.16, mixed mode)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It seems this version is not supported correctly with flutter applications, requiring JDK 21. To remove temporarily this warning message, instead of adding a flag, one can install an old version of the JDK from the system package manage for example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;openjdk-21-&lt;span class="o"&gt;{&lt;/span&gt;jre,jdk&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, the project can be configured to use this one instead of the latest version available from the android studio.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter config &lt;span class="nt"&gt;--jdk-dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/lib/jvm/java-21-openjdk-amd64
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter doctor &lt;span class="nt"&gt;--verbose&lt;/span&gt;
&lt;span class="c"&gt;...
&lt;/span&gt;&lt;span class="go"&gt;[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [235ms]                                                                                                      
    • Android SDK at /home/user/Android/Sdk                                                                                                                                                   
    • Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)                                                                                                                                 
    • Platform android-37.2, build-tools 37.0.0                                                
    • ANDROID_HOME = /home/user/Android/Sdk                                                    
    • Java binary at: /usr/lib/jvm/java-21-openjdk-amd64/bin/java                                                                                                                             
      This JDK is specified in your Flutter configuration.                                                                                                                                    
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.                                                                                                               
    • Java version OpenJDK Runtime Environment (build 21.0.12.1+1-1-deb13u1-Debian)                                                                                                           
    • All Android licenses accepted.
&lt;/span&gt;&lt;span class="c"&gt;...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks to this &lt;a href="https://startdebugging.net/2026/08/fix-a-restricted-method-in-java-lang-system-has-been-called-in-a-flutter-gradle-build/" rel="noopener noreferrer"&gt;post&lt;/a&gt; from startdebugging.net, it helped me a lot to debug this issue.&lt;/p&gt;

&lt;h1&gt;
  
  
  Storage Issue
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE: Failed to override installation
location]
Error launching application on sdk gphone64 x86 64.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It simply means the virtual machine used for android (the device used by flutter) is full and there is no enough free space available to install the application. This one is kinda easy to fix, in android-studio go to &lt;code&gt;Menu&lt;/code&gt; &amp;gt; &lt;code&gt;Tools&lt;/code&gt; &amp;gt; &lt;code&gt;Devices Manager&lt;/code&gt;, select the device to edit. In the &lt;code&gt;Additional settings&lt;/code&gt; tabs, below the &lt;code&gt;Storage&lt;/code&gt;&amp;nbsp;section, one can expand both the internal or global storage. Note: It will reset the data on the device.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Modern programming is a huge pile of shit. Every time you do a small update/upgrade on one module or package, or on the core language to have the latest security patches, it breaks. That's annoying and explain why most of the applications are not safe. Developers don't really care about security, they wants to deliver quick. To do that, they will bypass all safety. Sadly, nothing changed during the last 10 or 20 years to build a mobile app easily. I've lost half a day to figure out what was the root cause... The good side? It's another confirmation about the whole ecosystem, it's a miracle everything is working correctly.&lt;/p&gt;

&lt;p&gt;As usual, hack it and try to have some fun!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@tin1023565?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Ticka Kao&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/yellow-robot-toy-on-black-table-NGqWbKcjgJ4?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>tooling</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Q&amp;D: PostgreSQL 18 on OpenBSD</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Tue, 15 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/qd-postgresql-18-on-openbsd-1hik</link>
      <guid>https://dev.to/niamtokik/qd-postgresql-18-on-openbsd-1hik</guid>
      <description>&lt;p&gt;If you need the latest version of PostgreSQL on OpenBSD, the &lt;a href="https://www.mail-archive.com/ports%40openbsd.org/msg137080.html" rel="noopener noreferrer"&gt;limits for the semaphores must be increased&lt;/a&gt;. Indeed, let imagine you want to deploy a fresh postgresql database (assuming the &lt;code&gt;/var/postgresql/data&lt;/code&gt; directory was not created or purged).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;doas pkg_add postgresql-server
&lt;span class="c"&gt;...
&lt;/span&gt;&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /var/postgresql
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;doas &lt;span class="nt"&gt;-u&lt;/span&gt; _postgresql initdb &lt;span class="nt"&gt;-D&lt;/span&gt; data
&lt;span class="go"&gt;The files belonging to this database system will be owned by user "_postgresql".                                                                              
This user must also own the server process.          

The database cluster will be initialized with locale "C".                     
The default database encoding has accordingly been set to "SQL_ASCII".         
The default text search configuration will be set to "english".               

Data page checksums are enabled.

fixing permissions on existing directory data ... ok
creating subdirectories ... ok                                                
selecting dynamic shared memory implementation ... posix
selecting default "max_connections" ... 20                           
selecting default "shared_buffers" ... 400kB                                  
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... 2026-09-14 17:44:41.502 UTC [93045] FATAL:  could not create semaphores: No space left on device                                 
2026-09-14 17:44:41.502 UTC [93045] DETAIL:  Failed system call was semget(3810418, 17, 03600).                                                               
2026-09-14 17:44:41.502 UTC [93045] HINT:  This error does *not* mean that you have run out of disk space.  It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded.  You need to raise the respective kernel 
parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its "max_connections" parameter.                                         
        The PostgreSQL documentation contains more information about configuring your system for PostgreSQL.                                                  
child process exited with exit code 1                                          
initdb: removing contents of data directory "data"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An error! To fix it, &lt;code&gt;kern.seminfo.semmni&lt;/code&gt; and &lt;code&gt;kern.seminfo.semmns&lt;/code&gt; need to be modified.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;doas sysctl kern.seminfo.semmni&lt;span class="o"&gt;=&lt;/span&gt;256
&lt;span class="gp"&gt;kern.seminfo.semmni: 10 -&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;256
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;doas sysctl kern.seminfo.semmns&lt;span class="o"&gt;=&lt;/span&gt;2048
&lt;span class="gp"&gt;kern.seminfo.semmns: 60 -&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;2048
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the database can be initialized without issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;doas &lt;span class="nt"&gt;-u&lt;/span&gt; _postgresql initdb &lt;span class="nt"&gt;-D&lt;/span&gt; data                    
The files belonging to this database system will be owned by user &lt;span class="s2"&gt;"_postgresql"&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;                                                                             
This user must also own the server process.                                   

The database cluster will be initialized with locale &lt;span class="s2"&gt;"C"&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;                     
The default database encoding has accordingly been &lt;span class="nb"&gt;set &lt;/span&gt;to &lt;span class="s2"&gt;"SQL_ASCII"&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;        
The default text search configuration will be &lt;span class="nb"&gt;set &lt;/span&gt;to &lt;span class="s2"&gt;"english"&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;               

Data page checksums are enabled.       

fixing permissions on existing directory data ... ok                          
creating subdirectories ... ok         
selecting dynamic shared memory implementation ... posix                      
selecting default &lt;span class="s2"&gt;"max_connections"&lt;/span&gt; ... 100                                   
selecting default &lt;span class="s2"&gt;"shared_buffers"&lt;/span&gt; ... 128MB                                  
selecting default &lt;span class="nb"&gt;time &lt;/span&gt;zone ... UTC    
creating configuration files ... ok    
running bootstrap script ... ok        
performing post-bootstrap initialization ... ok                               
syncing data to disk ... ok            

initdb: warning: enabling &lt;span class="s2"&gt;"trust"&lt;/span&gt; authentication &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="nb"&gt;local &lt;/span&gt;connections        
initdb: hint: You can change this by editing pg_hba.conf or using the option &lt;span class="nt"&gt;-A&lt;/span&gt;, or &lt;span class="nt"&gt;--auth-local&lt;/span&gt; and &lt;span class="nt"&gt;--auth-host&lt;/span&gt;, the next &lt;span class="nb"&gt;time &lt;/span&gt;you run initdb.              

Success. You can now start the database server using:                         

    pg_ctl &lt;span class="nt"&gt;-D&lt;/span&gt; data &lt;span class="nt"&gt;-l&lt;/span&gt; logfile start

&lt;span class="nv"&gt;$ &lt;/span&gt;doas rcctl start postgresql
postgresql&lt;span class="o"&gt;(&lt;/span&gt;ok&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks way better! The new configuration can now be added into &lt;code&gt;/etc/sysctl.conf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"kern.seminfo.semmni=256"&lt;/span&gt; | doas &lt;span class="nb"&gt;tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/sysctl.conf
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"sysctl kern.seminfo.semmns=2048"&lt;/span&gt; | doas &lt;span class="nb"&gt;tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/sysctl.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server should reboot with the good configuration now. You can configure your postgresql server now.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;doas &lt;span class="nt"&gt;-u&lt;/span&gt; _postgresql psql postgres
&lt;span class="go"&gt;psql (18.6)
Type "help" for help.

&lt;/span&gt;&lt;span class="gp"&gt;postgres=#&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Happy hacking and have fun!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@d_seddon?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Dan Seddon&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/leopard-puffer-fish-TbgoCf4F3MM?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>openbsd</category>
      <category>postgres</category>
      <category>database</category>
      <category>systems</category>
    </item>
    <item>
      <title>WeekReview#202637</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Mon, 14 Sep 2026 08:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/weekreview202637-2a56</link>
      <guid>https://dev.to/niamtokik/weekreview202637-2a56</guid>
      <description>&lt;p&gt;Paying for "cheap" virtual machines running my CI/CD pipelines is no fun. You will have the result quick, but you will not learn how to deploy this kind of infrastructure. As sysadmin, it's always nice to see how the tools used few years ago evolved... So, this week was about creating my own local privacy-first building infrastructure for Gitlab CI/CD. Based on the increasing cost of hosting providers due to the "AI revolution", hosting its own infrastructure can have a lot of benefit (and few drawbacks). What's the idea? &lt;/p&gt;

&lt;p&gt;To avoid information leaks like my own public address, the network will route all outgoing connections to a VPN or/and via a proxy. Each servers will be installed with an hardened version of Alpine Linux, and will have gitlab-runner enabled by default with a container manager (e.g. podman). Those servers are old laptops or cheap bare-metal devices (e.g. Intel NUCs, ARM boards). This infrastructure will also offer local isolated cache servers and a way to store artefacts.&lt;/p&gt;

&lt;p&gt;It was not really planned, but it's a nice idea to do that. In fact, I would like to also test this kind of infrastructure with &lt;code&gt;k3s&lt;/code&gt; to see if a kubernetes cluster can run in its own world, without a direct access to internet. Spoiler alert: it is already deployed on two workers, behind an OpenBSD firewall. It's a matter of time before a series of articles will be published here about that.&lt;/p&gt;

&lt;p&gt;This week was kinda busy, working on my application in Dart/Flutter, and most of the links are without comments because they have been barely read... Even more, dev.to is going to make me crazy. When a post is removed from a series, it is not displayed on user's profile. I created an &lt;a href="https://github.com/forem/forem/issues/23829#issuecomment-5630318665" rel="noopener noreferrer"&gt;issue&lt;/a&gt; hoping it will be fixed, but I was so angry about that, I started to work on my own post manager called &lt;a href="https://github.com/niamtokik/publish" rel="noopener noreferrer"&gt;&lt;code&gt;publish&lt;/code&gt;&lt;/a&gt; using only pandoc, Makefiles and shell scripting. I don't understand how a website like dev.to can be a "reference" for developers. Anyway, as usual, nothing is better than what you can do by yourself. A word on &lt;code&gt;publish&lt;/code&gt; project?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;must be highly portable and run everywhere&lt;/li&gt;
&lt;li&gt;must be use simple markdown files&lt;/li&gt;
&lt;li&gt;must publish content in more than one format (e.g. html, pdf, epub, djvu...)&lt;/li&gt;
&lt;li&gt;must be easy to clone/export&lt;/li&gt;
&lt;li&gt;must be easy to backup&lt;/li&gt;
&lt;li&gt;must be easy to migrate&lt;/li&gt;
&lt;li&gt;must be flexible enough to deal with callbacks in any languages&lt;/li&gt;
&lt;li&gt;must generate good old files and directories&lt;/li&gt;
&lt;li&gt;must save its state as local files/directories as well&lt;/li&gt;
&lt;li&gt;all my publications will be firstly created there and then published on substack, medium and dev.to (and in other places as well if possible).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'm really tired of migrating my content every 2 or 3 years, but I know think the best way is to keep everything open, and stay with your data locally.&lt;/p&gt;

&lt;h1&gt;
  
  
  Coding
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://hex.pm/packages/snmpkit" rel="noopener noreferrer"&gt;&lt;strong&gt;snmpkit&lt;/strong&gt;&lt;/a&gt;: A comprehensive SNMP toolkit for Elixir featuring a unified API, pure Elixir implementation, and powerful device simulation.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.21verses.xyz/2026/09/04/Register_allocation_LLVM/" rel="noopener noreferrer"&gt;&lt;strong&gt;Register Allocation in the LLVM Backend&lt;/strong&gt;&lt;/a&gt;: an article on LLVM compiler optimization for registers allocation. In short, this is the algorithms used when the &lt;code&gt;-O&lt;/code&gt; flag is set. It's interesting to see register allocation is not a simple thing. This article focus on CPU though, GPU register allocation is a bit different.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://pub.dev/packages/listen" rel="noopener noreferrer"&gt;&lt;strong&gt;listen project&lt;/strong&gt;&lt;/a&gt;: A package to notify state changes to interested listeners in pure Dart.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://nand2mario.github.io/posts/2026/zsst-voodoo/" rel="noopener noreferrer"&gt;&lt;strong&gt;Recreating Voodoo Graphics and a Late-1990s Gaming PC on an FPGA&lt;/strong&gt;&lt;/a&gt;: another article about the z486 CPU, this time about recreating a graphic card using an FPGA.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/firecow/gitlab-ci-local" rel="noopener noreferrer"&gt;&lt;strong&gt;gitlab-ci-local project&lt;/strong&gt;&lt;/a&gt;: Run gitlab pipelines locally as shell executor or docker executor.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/vereis/ecto_middleware" rel="noopener noreferrer"&gt;&lt;strong&gt;ecto_middleware&lt;/strong&gt;&lt;/a&gt;: Implements the middleware pattern for your Ecto repos, a Plug-like concept for Ecto.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://uecker.codeberg.page/2026-09-05.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Implementation of GCC's Nested Functions (vs. C++ Lambdas)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://arxiv.org/abs/2504.02246" rel="noopener noreferrer"&gt;&lt;strong&gt;C*: Unifying Programming and Verification in C&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🐦 &lt;a href="https://x.com/lemire/status/2098020509426294907" rel="noopener noreferrer"&gt;&lt;strong&gt;A quick overview of atomics in C&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://photonlibos.github.io/blog-20241014/Stackful_Coroutine_Made_Fast.pdf" rel="noopener noreferrer"&gt;&lt;strong&gt;Stackful Coroutine Made Fast&lt;/strong&gt;&lt;/a&gt;: from &lt;a href="https://photonlibos.github.io/" rel="noopener noreferrer"&gt;PhotonLibOS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://david.alvarezrosa.com/posts/optimizing-a-spin-lock/" rel="noopener noreferrer"&gt;&lt;strong&gt;Optimizing a Spin-Lock&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.erlang-solutions.com/blog/how-to-write-a-phoenix-pubsub-adapter-tutorial-example-based-on-eventstore/" rel="noopener noreferrer"&gt;&lt;strong&gt;Implementing a Phoenix PubSub Adapter with EventStore&lt;/strong&gt;&lt;/a&gt;: a quick and short introduction to Phoenix &lt;a href="https://phoenix-pubsub.hexdocs.pm/Phoenix.PubSub.html" rel="noopener noreferrer"&gt;&lt;code&gt;PubSub&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://decompilation.education/" rel="noopener noreferrer"&gt;&lt;strong&gt;Decompilation Book&lt;/strong&gt;&lt;/a&gt;: A good introduction to decompilation (and reverse engineering).&lt;/p&gt;

&lt;h1&gt;
  
  
  System
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://www.phoronix.com/news/Asahi-Linux-Official-M3" rel="noopener noreferrer"&gt;&lt;strong&gt;Asahi Linux Now Officially Supports Apple M3 Macs - With Caveats&lt;/strong&gt;&lt;/a&gt;: Linux on Apple M3 CPU will be great. Looking forward to have the same support on BSDs.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.rabbitmq.com/docs/compare/kafka" rel="noopener noreferrer"&gt;&lt;strong&gt;RabbitMQ vs. Apache Kafka&lt;/strong&gt;&lt;/a&gt;: it reminds me years ago when some of my colleagues were talking about comparing RabbitMQ and Kafka. This article is an up-to-date version of this discussion, with a nice conclusion: RabbitMQ is the better default. In general, both systems are now doing the same, with mostly the same performance. Anyway, a good summary every one working with queueing systems should read. A &lt;a href="https://ulearn-it.vercel.app/topics/rabbitmq-vs-kafka/study" rel="noopener noreferrer"&gt;study&lt;/a&gt; is also available.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://codon.org.uk/~mjg59/blog/p/systemio-conflicts-are-not-firmware-bugs/" rel="noopener noreferrer"&gt;&lt;strong&gt;SystemIO conflicts are not firmware bugs&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/ralsina/grafito" rel="noopener noreferrer"&gt;&lt;strong&gt;grafito project&lt;/strong&gt;&lt;/a&gt;: a simple, self-contained web-based log viewer for journalctl. It provides an intuitive interface to browse and filter system logs directly from your web browser.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://vinix-os.org/#about" rel="noopener noreferrer"&gt;&lt;strong&gt;Vinix OS&lt;/strong&gt;&lt;/a&gt;: Vinix initially is going to support every Apple Silicon Mac (only M1 Macs for now as of Sep 10 2026).&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://eiln.github.io/posts/ane.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Retrospectively Reverse-Engineering Apple's Neural Engine&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://web.archive.org/web/20201002094756/https://www.princeton.edu/~hos/mike/transcripts/thompson.htm" rel="noopener noreferrer"&gt;&lt;strong&gt;Interview with Ken Thompson, 9-6-89&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Network
&lt;/h1&gt;

&lt;p&gt;📑 &lt;a href="https://www.mdpi.com/2624-800X/6/2/72" rel="noopener noreferrer"&gt;&lt;strong&gt;De-Anonymization Techniques in the Tor Network Using an Experimental Testbed&lt;/strong&gt;&lt;/a&gt;: A really interesting publications doing a huge work on de-anonymizing tor network users using open-source tools, in an experimental network. In the end, nothing really new. It's well known if the user is not careful during browsing or when downloading something, it can  lead to information leaks. Whonix mostly fix this issue, even more when it is installed in QubeOS. Here the tools they used in this paper:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/shadow/shadow" rel="noopener noreferrer"&gt;shadow&lt;/a&gt;: Shadow is a discrete-event network simulator that directly executes real application code, enabling you to simulate distributed systems with thousands of network-connected processes in realistic and scalable private network experiments using your laptop, desktop, or server running Linux;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://gitlab.torproject.org/tpo/core/chutney" rel="noopener noreferrer"&gt;chutney&lt;/a&gt;: Tool for testing Tor network&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="//crysp.uwaterloo.ca/software/exptor/"&gt;ExperimenTor&lt;/a&gt;: A Testbed for Safe and Realistic Tor Experimentation &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Database
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://postgresql-anonymizer.readthedocs.io/en/latest/" rel="noopener noreferrer"&gt;&lt;strong&gt;PostgreSQL Anonymizer&lt;/strong&gt;&lt;/a&gt;: The main goal of this extension is to offer anonymization by design. We firmly believe that data masking rules should be written by the people who develop the application because they have the best knowledge of how the data model works. Therefore masking rules must be implemented directly inside the database schema. From &lt;a href="https://www.postgresql.org/about/news/postgresql-anonymizer-32-faster-pseudonymization-3373/" rel="noopener noreferrer"&gt;PostgreSQL News&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/labmiriade/pg_vault_tde" rel="noopener noreferrer"&gt;&lt;strong&gt;&lt;code&gt;pg_vault_tde&lt;/code&gt; project&lt;/strong&gt;&lt;/a&gt;: encrypts every tuple with AES-256-GCM at the Table Access Method layer. Data is encrypted before it reaches the storage manager and decrypted after it leaves. Encryption keys are managed by HashiCorp Vault / OpenBao or a local PKCS#12 wallet and cached in shared memory with automatic rotation. Seen from &lt;a href="https://www.postgresql.org/about/news/pg_vault_tde-v171-transparent-data-encryption-for-postgresql-17-and-18-3376/" rel="noopener noreferrer"&gt;postgresql news&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Storage
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/deuxfleurs-org/garage" rel="noopener noreferrer"&gt;&lt;strong&gt;Garage project&lt;/strong&gt;&lt;/a&gt;: S3-compatible object store for small self-hosted geo-distributed deployments.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://www.pikered.com/en/learn/bypass-remote-debugging-port-restrictions/" rel="noopener noreferrer"&gt;&lt;strong&gt;Activating Chrome DevTools Protocol in Memory: Bypassing –remote-debugging-port Restrictions&lt;/strong&gt;&lt;/a&gt;: shellcode injection on windows using Chrome Developer Tool.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://lina.sh/blog/hijacking-e164-arpa" rel="noopener noreferrer"&gt;&lt;strong&gt;I accidentally logged hundreds of thousands of phone calls to military bases&lt;/strong&gt;&lt;/a&gt;: a good story about hijacking &lt;code&gt;e164.arpa&lt;/code&gt; domains, a project created in the 2000's to associate phone number with DNS.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://calif.io/research/weworm" rel="noopener noreferrer"&gt;&lt;strong&gt;WeWorm, The first zero-click worm to spread through WeChat calls across iOS and Android.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/watch?v=y8Kagu3r3Z4" rel="noopener noreferrer"&gt;&lt;strong&gt;Deanonymizing Monero Transactions in Tor Network&lt;/strong&gt;&lt;/a&gt;: an introduction to deanonymizing monero transactions, but it has been fixed in the latest versions (quick). btw, I liked the fake VPN ads but I also liked the truth behind the private VPN companies giving logs to goverments.&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/watch?v=3wlNemFwbwE" rel="noopener noreferrer"&gt;&lt;strong&gt;The Tor Project Just Gaslit Their Entire User Base&lt;/strong&gt;&lt;/a&gt;: another project lying to their users. Tor browser does not protect against OS fingerprint, that's a shame, but the worst part is... they are saying the opposite in their communication. Don't trust anyone, again.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://blog.quarkslab.com/from-p-code-to-gnn-extract-binary-code-semantics.html" rel="noopener noreferrer"&gt;&lt;strong&gt;From P-Code to GNN: extract binary code semantics&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.praetorian.com/blog/ble-testing-caeruleus/" rel="noopener noreferrer"&gt;&lt;strong&gt;Bluetooth Low Energy Security Testing, Consolidated: Introducing Caeruleus&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/Cryptography
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://pbxscience.com/engineer-factors-rsa-260-ending-a-35-year-cryptographic-challenge/" rel="noopener noreferrer"&gt;&lt;strong&gt;Engineer Factors RSA-260, Ending a 35-Year Cryptographic Challenge&lt;/strong&gt;&lt;/a&gt;: lot of noise here, but RSA-260 (260 bits RSA keys) have been broken. At least... One of them.&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://arxiv.org/abs/2609.05625" rel="noopener noreferrer"&gt;&lt;strong&gt;Computing 256-bit elliptic curve discrete logarithms in 26 days on a fault-tolerant trapped-ion quantum computer with 20,000 qubits&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/OSINT
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/0x6rss/instagram-private-graph" rel="noopener noreferrer"&gt;&lt;strong&gt;Instagram OSINT Relationship Analysis project&lt;/strong&gt;&lt;/a&gt;: Analyze the followers and following accounts that a private (hidden) Instagram account interacts with.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/BlueTeam
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://medium.com/@costin.raiu/mikrotik-ssh-0day-exploitation-in-the-wild-20da4587d9b2" rel="noopener noreferrer"&gt;&lt;strong&gt;MikroTik ssh 0day exploitation in the wild&lt;/strong&gt;&lt;/a&gt;: a short story about a 0 day exploited on Mikrotik  routers via SSH.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/RedTeam
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://hetmehta.com/posts/powershell-for-hackers/" rel="noopener noreferrer"&gt;&lt;strong&gt;PowerShell for Hackers: Exploitation Essentials&lt;/strong&gt;&lt;/a&gt;: not a big fan of powershell, but it's a good introduction for penetration testing.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/NazaninNazari/XSS_Labs" rel="noopener noreferrer"&gt;&lt;strong&gt;XSS Labs project&lt;/strong&gt;&lt;/a&gt;: Hands-on XSS labs for learning, practicing, and understanding Cross-Site Scripting vulnerabilities.&lt;/p&gt;

&lt;h1&gt;
  
  
  Embedded
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://www.digikey.com/en/blog/scheme-it-schematic-drawing?article_name=scheme-it:_schematic_draw" rel="noopener noreferrer"&gt;&lt;strong&gt;Scheme-it: Schematic Drawing, Flow and Block Diagramming Made Easy&lt;/strong&gt;&lt;/a&gt;: a quick introduction to scheme-it to create and design electronic schema. Those schema can then be imported in KiCAD.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.digikey.com/en/maker/blogs/2024/deep-dive-into-pcb-manufacturing-techniques-milling" rel="noopener noreferrer"&gt;&lt;strong&gt;Deep Dive Into PCB Manufacturing Techniques: Milling&lt;/strong&gt;&lt;/a&gt;: a short post on PCB milling.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.digikey.com/en/maker/projects/esp32-audio-project-part-i-internet-radio-with-is-dac/b8378782c8524ab78bc1335a2ddb57cb" rel="noopener noreferrer"&gt;&lt;strong&gt;ESP32 Audio Project - Part I: Internet Radio with I²S DAC&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.mobile-hacker.com/2026/09/07/chameleon-ultra-guide-to-rfid-reading-emulation-and-testing/" rel="noopener noreferrer"&gt;&lt;strong&gt;Chameleon Ultra: Guide to RFID Reading, Emulation and Testing&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://www.crowdsupply.com/htwave/integrive-100" rel="noopener noreferrer"&gt;&lt;strong&gt;A standalone, real-time 2x2 MIMO software-defined radio (SDR) platform for advanced wireless research and rapid prototyping&lt;/strong&gt;&lt;/a&gt;: a standalone, real-time 2x2 MIMO software-defined radio (SDR) platform for advanced wireless research and rapid prototyping. With FPGA-accelerated wireless processing, ultra-low phase noise design, and a proven real-time PHY baseline.&lt;/p&gt;

&lt;h1&gt;
  
  
  Update/Upgrade
&lt;/h1&gt;

&lt;p&gt;🔄 &lt;a href="https://blog.netbsd.org/tnf/entry/netbsd_9_5_released_and" rel="noopener noreferrer"&gt;&lt;strong&gt;NetBSD 9.5&lt;/strong&gt;&lt;/a&gt;: NetBSD 9.5, the fifth (and final) release from the NetBSD 9 stable branch, end-of-support for all NetBSD-9.x. The full announcement can be found on &lt;a href="https://netbsd.org/releases/formal-9/NetBSD-9.5.html" rel="noopener noreferrer"&gt;the release page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://ninenines.eu/articles/cowboy-2.19.0/" rel="noopener noreferrer"&gt;&lt;strong&gt;Cowboy 2.19, Cowlib 2.20, Gun 2.6, Ranch 2.3&lt;/strong&gt;&lt;/a&gt;: this is an important release for all the cowboy-suite libraries. Cowboy is now only support OTP-27+ and will drop support for all versions of Erlang without security patches. The release on Github: &lt;a href="https://github.com/ninenines/cowlib/releases/tag/2.20.0" rel="noopener noreferrer"&gt;cowlib-2.20.0&lt;/a&gt;, &lt;a href="https://github.com/ninenines/ranch/releases/tag/2.3.0" rel="noopener noreferrer"&gt;ranch-2.3.0&lt;/a&gt;,  &lt;a href="https://github.com/ninenines/cowboy/releases/tag/2.19.0" rel="noopener noreferrer"&gt;cowboy-2.19.0&lt;/a&gt; and &lt;a href="https://github.com/ninenines/gun/releases/tag/2.6.0" rel="noopener noreferrer"&gt;gun-2.6.0&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://github.com/novaframework/nova/releases/tag/v0.17.0" rel="noopener noreferrer"&gt;&lt;strong&gt;Nova 0.17.0&lt;/strong&gt;&lt;/a&gt;: optimization update.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://github.com/novaframework/nova/releases/tag/v0.18.0" rel="noopener noreferrer"&gt;&lt;strong&gt;Nova 0.18.0&lt;/strong&gt;&lt;/a&gt;: another update.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://www.openbsd.org/errata79.html" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenBSD 7.9 syspatch security upgrade&lt;/strong&gt;&lt;/a&gt;: a lot of patches, impacting opensmtpd, nfs, wscons, shmat, libexpat, X and ldapd.&lt;/p&gt;

&lt;h1&gt;
  
  
  Providers
&lt;/h1&gt;

&lt;p&gt;🌐 &lt;a href="https://bullionet.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Bullionet&lt;/strong&gt;&lt;/a&gt;:  cheap bare-metal server in France (Paris, Marseilles, Lille). Announced on &lt;a href="https://x.com/oliviermis/status/2096506930931913060?s=20" rel="noopener noreferrer"&gt;X/Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://www.netcup.com" rel="noopener noreferrer"&gt;&lt;strong&gt;netcup&lt;/strong&gt;&lt;/a&gt;: low cost virtual servers, and interesting &lt;a href="https://www.netcup.com/en/deals" rel="noopener noreferrer"&gt;deals&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://contabo.com/en-us/" rel="noopener noreferrer"&gt;&lt;strong&gt;contabo&lt;/strong&gt;&lt;/a&gt;: low cost &lt;a href="https://contabo.com/en/vps/" rel="noopener noreferrer"&gt;virtual servers&lt;/a&gt;, pretty expensive &lt;a href="https://contabo.com/en/dedicated-servers/" rel="noopener noreferrer"&gt;bare metal&lt;/a&gt; ones though.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://my.speedypage.com/store" rel="noopener noreferrer"&gt;&lt;strong&gt;speedypage&lt;/strong&gt;&lt;/a&gt;: in pound (uk), quite expensive bare metal servers, but the price for virtual servers looks great.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://euronodes.com" rel="noopener noreferrer"&gt;&lt;strong&gt;euronodes&lt;/strong&gt;&lt;/a&gt;: virtual machines are cheap (&amp;lt;5€), bare-metal servers are expensive. Data centers in Europe (germany, portugal, spain and czech republic).&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://macserve.io" rel="noopener noreferrer"&gt;&lt;strong&gt;macserve&lt;/strong&gt;&lt;/a&gt;: is it a joke?&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://boxedtux.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;BoxedTux&lt;/strong&gt;&lt;/a&gt;: Deploy a full Linux virtual server in under 90 seconds. Root access, public IP, your choice of distro — no credit card, no vendor lock-in.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://boxybsd.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;BoxyBSD&lt;/strong&gt;&lt;/a&gt;: BoxyBSD offers free VPS instances for exploring FreeBSD, OpenBSD, NetBSD and many other BSD or Solaris based systems. Get hands-on experience, experiment safely, and join a growing community of BSD enthusiasts.&lt;/p&gt;

&lt;h1&gt;
  
  
  Misc
&lt;/h1&gt;

&lt;p&gt;🌐 &lt;a href="https://www.mini-itx.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Mini ITX Shop&lt;/strong&gt;&lt;/a&gt;: A good place to find small-sized computers/boards.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://www.mhzshop.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Mhz Shop&lt;/strong&gt;&lt;/a&gt;: A good place to find wireless hardware and devices.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.zerohedge.com/markets/oklahoma-bitcoin-mining-site-condemned-after-major-water-leak" rel="noopener noreferrer"&gt;&lt;strong&gt;Under-The-Radar Oklahoma Bitcoin Mining Site Condemned After Leaking 3 Million Gallons Of Water&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/osfv/BraveDebloater" rel="noopener noreferrer"&gt;&lt;strong&gt;BraveDebloater project&lt;/strong&gt;&lt;/a&gt;: Safety-first Windows PowerShell debloater for Brave Browser using enterprise policies, dry-run mode, backups, and restore.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://hackersarise.thinkific.com/courses/private-cellular-network" rel="noopener noreferrer"&gt;&lt;strong&gt;Build Your Own Private Cellular Network&lt;/strong&gt;&lt;/a&gt;: kinda expensive ($999) but looks interesting.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://nobaraproject.org/index.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Nobora Project&lt;/strong&gt;&lt;/a&gt;:  A Fedora-based desktop, tuned for gaming, streaming, and content creation — so you can skip the tweaking and start doing. &lt;/p&gt;

&lt;p&gt;📟 &lt;a href="https://sipeed.com/nanokvm-go" rel="noopener noreferrer"&gt;&lt;strong&gt;Sipeed NanoKVM-Go&lt;/strong&gt;&lt;/a&gt;: an updated version of the NanoKVM, perfect for remote control and debugging a system remotely.&lt;/p&gt;

&lt;p&gt;🐦 &lt;a href="https://x.com/BetterCallMedhi/status/2097472336257863722?s=20" rel="noopener noreferrer"&gt;&lt;strong&gt;go fuck yourself @sama&lt;/strong&gt;&lt;/a&gt;: a reaction regarding the last "discovery" made by anthropic in the mathematical field. Below the most interesting part to me. Your data, your ideas, or your researches are not safely protected by those companies.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;to this theoretical imposture you add a disgusting ethical and industrial cynicism &lt;strong&gt;taking advantage of private codex sessions and informal preprints from academic researchers to siphon their research leads and then trying to redact or erase the contribution of levent alpöge&lt;/strong&gt; under the pretext that he works at rival anthropic is intellectual serfdom openai behaves like a feudal lord of silicon appropriating the cognitive subsistence of independent scholars threatening their careers behind closed doors if they protest and turning community academic labor into a privatized pressrelease [...] real science is not a clout chase on social media or a compute spike spent to rob the clay mathematics institute it is a quest for elegance physical truth and universal rigor to decode reality [...] the most dangerous aspect of this maneuver is not the mathematical exaggeration but the corporate enclosure of scientific discovery by keeping these frontier systems locked behind outcome based pricing licensing barriers &amp;amp; proprietary API walls [...] when mathematical reality itself gets reduced to synthetic token production swallowed by closed infrastructure we transition from open academic inquiry to technological feudalism&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;🌐 &lt;a href="https://www.blackhatworld.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Black Hat World Forum&lt;/strong&gt;&lt;/a&gt;: discovering this forum recently, about SEO.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzvhuuh5vxzgdihlyzz8d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzvhuuh5vxzgdihlyzz8d.png" alt=" " width="544" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F96ipp65da3qd4qcdkitr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F96ipp65da3qd4qcdkitr.png" alt=" " width="476" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffpu9t1mw5b3x1533i1bk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffpu9t1mw5b3x1533i1bk.png" alt=" " width="500" height="676"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flprbhse3ivqw9u4jiogj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flprbhse3ivqw9u4jiogj.png" alt=" " width="679" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmbjztqy66apca8t8c9ai.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmbjztqy66apca8t8c9ai.png" alt=" " width="680" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdjy4yh4i9ochqiojaj7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdjy4yh4i9ochqiojaj7b.png" alt=" " width="669" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwzk304rcfwvy8d5ljb01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwzk304rcfwvy8d5ljb01.png" alt=" " width="457" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97kef6gmftjlbkrbwotv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97kef6gmftjlbkrbwotv.png" alt=" " width="640" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx6gdlgzabo1b5zok5d7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx6gdlgzabo1b5zok5d7a.png" alt=" " width="511" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0c839tekgd7bhj7b0ymm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0c839tekgd7bhj7b0ymm.png" alt=" " width="443" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F33f8uufwjtkj1o5cqggg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F33f8uufwjtkj1o5cqggg.png" alt=" " width="680" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm4ymke1h5i34zf3fyr79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm4ymke1h5i34zf3fyr79.png" alt=" " width="460" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fye2o9oakewcb9ipjt100.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fye2o9oakewcb9ipjt100.png" alt=" " width="552" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0chaohj280r2l8bzwef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0chaohj280r2l8bzwef.png" alt=" " width="567" height="680"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@artem_kniaz?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Artem Kniaz&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/brown-wooden-boat-on-body-of-water-during-daytime-e3K4OOI3DcI?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>review</category>
      <category>weekly</category>
      <category>notes</category>
      <category>documentation</category>
    </item>
    <item>
      <title>Q&amp;D: Dart on Alpine Linux</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Thu, 10 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/qd-dart-on-alpine-linux-33n7</link>
      <guid>https://dev.to/niamtokik/qd-dart-on-alpine-linux-33n7</guid>
      <description>&lt;p&gt;Running Dart outside of the main distribution can be challenging. In fact, my first idea was to compile it from sources, but it seems most of the projects are simply using the binaries from Google instead of building the sources directly from the official Dart repository. That's a shame from an "open-source" language but anyway... Here some methods to use Dart on Alpine Linux.&lt;/p&gt;

&lt;h1&gt;
  
  
  Using a Container
&lt;/h1&gt;

&lt;p&gt;The Dart Team offers a &lt;a href="https://hub.docker.com/_/dart" rel="noopener noreferrer"&gt;Docker image&lt;/a&gt; with the latest version of Dart from the Google Dart binaries. This is probably the easiest way to use Dart on Alpine Linux without adding a lot of useless dependencies in your system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;podman run &lt;span class="nt"&gt;-it&lt;/span&gt; dart sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/dart-docker" rel="noopener noreferrer"&gt;Official Dart Docker Image source code&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://hub.docker.com/_/dart" rel="noopener noreferrer"&gt;Official Dart Docker Image&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Using &lt;code&gt;asdf&lt;/code&gt; or &lt;code&gt;mise&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;asdf&lt;/code&gt; and &lt;code&gt;mise&lt;/code&gt; can be used to bootstrap your systems. As usual, the Dart binaries are from Google.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;asdf plugin add dart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://asdf-vm.com/manage/plugins.html" rel="noopener noreferrer"&gt;asdf plugins&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/PatOConnor43/asdf-dart" rel="noopener noreferrer"&gt;asdf dart plugin&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Using Google Binaries
&lt;/h1&gt;

&lt;p&gt;Then, why not downloading ourselves the binaries from Google and installing it on Alpine Linux directly. It will require "only" &lt;code&gt;gcompat&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk update
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add curl gcompat
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;curl &lt;span class="nt"&gt;-Lo&lt;/span&gt; dartsdk-linux-x64-release.zip https://storage.googleapis.com/dart-archive/channels/stable/release/3.13.3/sdk/dartsdk-linux-x64-release.zip
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;unzip dartsdk-linux-x64-release.zip
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;dart-sdk
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;./bin/dart &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;span class="go"&gt;Dart SDK version: 3.13.3 (stable) (Tue Sep 1 01:07:17 2026 -0700) on "linux_x64"

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;:&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;/bin
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart create t &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;t
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;Building package executable... 
Built t:t.
Hello world: 42!
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The binaries are running on Alpine Linux, but we should be careful, they have been made on Debian-like system (trixie). For example, &lt;code&gt;ldd&lt;/code&gt; is not really happy due to &lt;code&gt;__cxa_thread_atexit_impl&lt;/code&gt; missing symbol.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;ldd dart
&lt;span class="go"&gt;        /lib64/ld-linux-x86-64.so.2 (0x7925aad9e000)
&lt;/span&gt;&lt;span class="gp"&gt;        libdl.so.2 =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/lib64/ld-linux-x86-64.so.2 &lt;span class="o"&gt;(&lt;/span&gt;0x7925aad9e000&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;        libpthread.so.0 =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/lib64/ld-linux-x86-64.so.2 &lt;span class="o"&gt;(&lt;/span&gt;0x7925aad9e000&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;        libm.so.6 =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/lib64/ld-linux-x86-64.so.2 &lt;span class="o"&gt;(&lt;/span&gt;0x7925aad9e000&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;        libc.so.6 =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/lib64/ld-linux-x86-64.so.2 &lt;span class="o"&gt;(&lt;/span&gt;0x7925aad9e000&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;        ld-linux-x86-64.so.2 =&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/lib/ld-linux-x86-64.so.2 &lt;span class="o"&gt;(&lt;/span&gt;0x7925aa81f000&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="go"&gt;Error relocating dartaotruntime: __cxa_thread_atexit_impl: symbol not found
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dart.dev/get-dart/archive#stable-channel" rel="noopener noreferrer"&gt;Dart SDK archive Stable channel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Compiling From Sources
&lt;/h1&gt;

&lt;p&gt;What a mess. I thought it would have been easy to compile Dart from sources, but it's not the case, especially on Alpine Linux. I started to work on it, but it's not ready yet, mostly due to the &lt;a href="https://chromium.googlesource.com/chromium/tools/depot_tools.git" rel="noopener noreferrer"&gt;google tools&lt;/a&gt; required for the compilation, producing a shit-ton of errors. Anyway, here a quick list of the dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk update
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add git python3 curl xz gn clang make py3-virtualenv py3-setuptools py3-pip bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/dart-lang/sdk/issues/36018" rel="noopener noreferrer"&gt;Building dart sdk&lt;/a&gt; on Github issues&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;I need a recent version of Dart, Flutter and Android SDK in a container. Unfortunately, the only ones have found are old, unmaintained or unofficial (it means trusting people I don't know).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/MobileDevOps/android-sdk-image" rel="noopener noreferrer"&gt;Docker image for Android SDK&lt;/a&gt;: a docker image with the latest android sdk ONLY (no dart, no flutter);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/thyrlian/AndroidSDK" rel="noopener noreferrer"&gt;AndroidSDK&lt;/a&gt;: another docker image containing the latest android SDK;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/davils-com/kosmos" rel="noopener noreferrer"&gt;Kosmos&lt;/a&gt;: another docker image with android SDK;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.todocker-android-sdk"&gt;docker-android-sdk&lt;/a&gt;: again, another docker image with android SDK;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/mingchen/docker-android-build-box" rel="noopener noreferrer"&gt;Docker Android Build Box&lt;/a&gt;: docker image containing android SDK, JDK, and Flutter. This is the closed ones, but it is huge (5.5GB). I would like to avoid fetching the whole universe;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/its-me/image.flutter" rel="noopener noreferrer"&gt;image.flutter&lt;/a&gt;: a docker image containing flutter and the android sdk. Perhaps the good catch, but it uses an old version of flutter, and not even sure it works correctly (I like the &lt;code&gt;localhost/android-sdk&lt;/code&gt; source image). To be tested.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anyway, building and releasing mobile application is a PITA. I understand why so many companies are selling a full build effortless pipeline, that's business.&lt;/p&gt;

&lt;p&gt;As usual, have fun and happy hacking!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@camila_mof?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Camila Mofsovich&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/darts-drinks-and-jars-on-a-table-KyjXWDV6TIA?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dart</category>
      <category>alpinelinux</category>
      <category>alpine</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Alpine Linux Post-Install Checklist</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Wed, 09 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/alpine-linux-post-install-checklist-39fc</link>
      <guid>https://dev.to/niamtokik/alpine-linux-post-install-checklist-39fc</guid>
      <description>&lt;p&gt;&lt;a href="https://www.alpinelinux.org/" rel="noopener noreferrer"&gt;Alpine Linux&lt;/a&gt; is one of my favorite distribution with &lt;a href="https://voidlinux.org" rel="noopener noreferrer"&gt;Void Linux&lt;/a&gt;. Both are minimalist and perfect for server usage or embedded projects. Here a quick checklist when configuring/staging/deploying manually a box on Alpine Linux.&lt;/p&gt;

&lt;p&gt;The full installation procedure is available on the &lt;a href="https://wiki.alpinelinux.org/wiki/Installation" rel="noopener noreferrer"&gt;Alpine Linux Wiki&lt;/a&gt;. &lt;a href="https://wiki.alpinelinux.org/wiki/Tutorials_and_Howtos" rel="noopener noreferrer"&gt;Many tutorials and guides&lt;/a&gt; can also be found there.&lt;/p&gt;

&lt;h1&gt;
  
  
  General Configuration
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Main User Password&lt;/strong&gt;. When installing Alpine Linux, it's usually in front of a screen, with a keyboard, or in front of a virtual machine. We all know a default password is always configured, and it is most of the time an easy one. Change it with a stronger one when you can have access to the shell via SSH using the &lt;a href="https://manpages.debian.org/trixie/passwd/passwd.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;passwd&lt;/code&gt;&lt;/a&gt; command or use an hash with ansible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;passwd &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user" rel="noopener noreferrer"&gt;Setting up a new user&lt;/a&gt; from the Alpine Linux Wiki;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wiki.archlinux.org/title/Users_and_groups" rel="noopener noreferrer"&gt;Users and groups&lt;/a&gt; on the ArchLinux Wiki;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Finalizing#User_administration" rel="noopener noreferrer"&gt;User Adminitration&lt;/a&gt; on the Gentoo Wiki.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Root Password&lt;/strong&gt;. Same than previous point, when Alpine Linux is installed, the root password is usually an easy one. Change it with a strong one. The password can be removed later if the root account is disabled in the future.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;passwd root
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://wiki.gentoo.org/wiki/Setting_a_default_root_password" rel="noopener noreferrer"&gt;Setting a default root password&lt;/a&gt; on the Gentoo Wiki;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://linuxvox.com/blog/linux-set-root-password/" rel="noopener noreferrer"&gt;Linux Set Root Password: A Comprehensive Guide&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://unix.stackexchange.com/questions/708115/is-having-root-password-for-sudo-considered-a-best-practice-or-the-opposite" rel="noopener noreferrer"&gt;Is having root password for sudo considered a best practice or the opposite?&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Main User SSH Public Key&lt;/strong&gt;. If you are using an RSA key with SSH, it can be hard to copy/paste it directly from the screen during the installation. If you are lucky, you can have access to a remote repository via the network, but if it's not the case, you will need to install one later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.ssh
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;700 &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.ssh
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;touch&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.ssh/authorized_keys
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;600 &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.ssh/authorized_keys
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.ssh/authorized_keys &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;ssh-ed25519 AAAAC3Nza...
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/ssh-keygen" rel="noopener noreferrer"&gt;&lt;code&gt;ssh-keygen(1)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/ssh-agent.1" rel="noopener noreferrer"&gt;&lt;code&gt;ssh-agent(1)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/ssh-add.1" rel="noopener noreferrer"&gt;&lt;code&gt;ssh-add(1)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/openssh-client/ssh-copy-id.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;ssh-copy-id(1)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Install tmux&lt;/strong&gt;. &lt;a href="https://tmux.app/" rel="noopener noreferrer"&gt;&lt;code&gt;tmux&lt;/code&gt;&lt;/a&gt; is the best terminal multiplexer, and the best alternative to &lt;code&gt;screen&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add tmux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/tmux" rel="noopener noreferrer"&gt;&lt;code&gt;tmux(1)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://tmux.app/" rel="noopener noreferrer"&gt;official tmux website&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Alpine Community Repository&lt;/strong&gt;. By default Alpine Linux is using only the &lt;code&gt;main&lt;/code&gt; repository. This is already a good place where one can found a lot of package. Some packages are only available on &lt;code&gt;community&lt;/code&gt; repository though, and enabling it can be nice. To do that, the file &lt;code&gt;/etc/apk/repositories&lt;/code&gt; can be edited. Note: it is also a good idea to enforce &lt;code&gt;https&lt;/code&gt;, by default, the Alpine repositories configured are using &lt;code&gt;http&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/apk/repositories &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;https://dl-cdn.alpinelinux.org/alpine/v3.23/main
https://dl-cdn.alpinelinux.org/alpine/v3.23/communit
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Repositories" rel="noopener noreferrer"&gt;Repositories&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper" rel="noopener noreferrer"&gt;Alpine Package Keeper&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://pkgs.alpinelinux.org/packages" rel="noopener noreferrer"&gt;Official Alpine Linux Packages Search Page&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://mirrors.alpinelinux.org/" rel="noopener noreferrer"&gt;Alpine Linux Packages Mirrors&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Install &lt;code&gt;sudo&lt;/code&gt; or &lt;code&gt;doas&lt;/code&gt;&lt;/strong&gt;. Using &lt;a href="https://manpages.debian.org/trixie/util-linux/su.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;su&lt;/code&gt;&lt;/a&gt; is okay-ish, but having access to &lt;a href="https://manpages.debian.org/trixie/sudo-ldap/sudo.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;sudo&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://manpages.debian.org/trixie/opendoas/doas.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;doas&lt;/code&gt;&lt;/a&gt; to log the commands passed as superuser is always a good idea. Alpine Linux does not install one of these tools by default.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add doas
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user#doas" rel="noopener noreferrer"&gt;Setting Up a New User, Doas section&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user#sudo" rel="noopener noreferrer"&gt;Setting Up a New User, Sudo section&lt;/a&gt; on the Alpine Linux Wiki&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Sudo" rel="noopener noreferrer"&gt;Sudo&lt;/a&gt; on the Gentoo Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Sudo" rel="noopener noreferrer"&gt;Sudo&lt;/a&gt; on the Arch Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/doas" rel="noopener noreferrer"&gt;&lt;code&gt;doas(1)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/sudo-ldap/sudo.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;sudo(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/sudo-ldap/sudoers.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;sudoers(5)&lt;/code&gt; manpage&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Configure &lt;code&gt;doas&lt;/code&gt;&lt;/strong&gt;. As OpenBSD user, &lt;a href="https://manpages.debian.org/trixie/opendoas/doas.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;doas&lt;/code&gt;&lt;/a&gt; is my default command to execute command as superuser. Like &lt;a href="https://manpages.debian.org/trixie/sudo-ldap/sudo.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;sudo&lt;/code&gt;&lt;/a&gt;, it must be configured by editing the &lt;a href="https://manpages.debian.org/trixie/opendoas/doas.conf.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;/etc/doas.conf&lt;/code&gt;&lt;/a&gt; file or by creating a new file in &lt;a href="https://manpages.debian.org/trixie/opendoas/doas.conf.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;/etc/doas.d/*.conf&lt;/code&gt;&lt;/a&gt;. Note: the following configuration is a bit too open, if more than one users have access to a server, better permissions should be defined. For example, users in &lt;code&gt;dev&lt;/code&gt; groups should never have access to all commands, but only a small subsets of them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/doas.d/21-wheel.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;permit persist :wheel
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/doas" rel="noopener noreferrer"&gt;&lt;code&gt;doas(1)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/doas.conf" rel="noopener noreferrer"&gt;&lt;code&gt;doas.conf(5)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;SSH Server Hardening&lt;/strong&gt;. &lt;a href="https://manpages.debian.org/trixie/openssh-server/sshd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;sshd&lt;/code&gt;&lt;/a&gt; is the daemon/service used to have access to the server remotely. The protocol by itself is already well protected, but the default configuration deployed can be improved. There are so many publications on the internet about making SSH secure, it's perhaps not so important to explain everything, here a quick list of the things to modify though. The configuration file can be found in &lt;a href="https://manpages.debian.org/trixie/openssh-server/sshd_config.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt;&lt;/a&gt; or in &lt;a href="https://manpages.debian.org/trixie/openssh-server/sshd_config.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;/etc/ssh/sshd_config.d&lt;/code&gt;&lt;/a&gt; directory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;disable user access without valid public key&lt;/li&gt;
&lt;li&gt;limit the amount of connections in parallel&lt;/li&gt;
&lt;li&gt;ensure root user can't connect to the box&lt;/li&gt;
&lt;li&gt;disable forwarding&lt;/li&gt;
&lt;li&gt;explicitly enforce allowed users
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config.d/99-local.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
&lt;/span&gt;&lt;span class="gp"&gt;AllowUsers $&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;your_user&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="go"&gt;PermitEmptyPasswords no
LoginGraceTime 30
MaxAuthTries 3
X11Forwarding no
AllowAgentForwarding no
AllowAgentForwarding no
AllowTcpForwarding no
PermitTunnel no
ClientAliveInterval 100
UseDNS no
Protocol 2
Banner none
PubkeyAuthentication yes
HostbasedAuthentication no
IgnoreRhosts yes
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/sshd" rel="noopener noreferrer"&gt;&lt;code&gt;sshd(8)&lt;/code&gt; man page&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/sshd_config" rel="noopener noreferrer"&gt;&lt;code&gt;sshd_config(5)&lt;/code&gt; man page&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Setting_up_a_SSH_server" rel="noopener noreferrer"&gt;Setting up a SSH server&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://merox.dev/blog/ssh-hardening/" rel="noopener noreferrer"&gt;SSH Hardening - Securing Your Linux Servers&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://linuxize.com/post/ssh-hardening-best-practices/" rel="noopener noreferrer"&gt;SSH Hardening Guide: Best Practices for Linux Servers&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;SSH Client Hardening&lt;/strong&gt;. The default configuration for the &lt;a href="https://manpages.debian.org/trixie/openssh-client/ssh.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;ssh&lt;/code&gt;&lt;/a&gt; client can be found in &lt;a href="https://manpages.debian.org/trixie/openssh-client/ssh_config.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;/etc/ssh/ssh_config&lt;/code&gt;&lt;/a&gt; or in the &lt;a href="https://manpages.debian.org/trixie/openssh-client/ssh_config.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;/etc/ssh/ssh_config.d&lt;/code&gt;&lt;/a&gt; directory. The configuration installed should do the job in 99% of the case, but some things can be improved. Note: except if the server is used as a bastion or a forwarder, it's usually not necessary to modify this configuration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/ssh/ssh_config.d/99-local.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;VisualHostKey yes
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/ssh" rel="noopener noreferrer"&gt;&lt;code&gt;ssh(1)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/ssh_config" rel="noopener noreferrer"&gt;&lt;code&gt;ssh_config(5)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.openbsd.org/papers/slug2025-dtucker-openssh-intro.pdf" rel="noopener noreferrer"&gt;Introduction to OpenSSH&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Network Interface Configuration&lt;/strong&gt;. If the server was installed in a VM or in a specific network, it is sometimes necessary to modify the configuration of the network interfaces. This configuration is located in the &lt;a href="https://manpages.debian.org/trixie/ifupdown-ng-compat/interfaces.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;/etc/network/interfaces&lt;/code&gt;&lt;/a&gt; file. First, list the available interfaces with the &lt;a href="https://manpages.debian.org/trixie/iproute2/ip-address.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;ip address&lt;/code&gt;&lt;/a&gt;  command and configure them respectively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/network/interfaces &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;auto lo
iface lo inet loopback

auto eth0
&lt;/span&gt;&lt;span class="gp"&gt;        address $&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;server_ipv4_address&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="gp"&gt;        network $&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;ipv4_network&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="gp"&gt;        broadcast $&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;ipv4_broadcast&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="gp"&gt;        gateway $&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;ipv4_gateway&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="go"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Configure_Networking" rel="noopener noreferrer"&gt;Configure Networking&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/ifupdown-ng-compat/interfaces.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;interfaces(5)&lt;/code&gt; manpage&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Local DNS Resolver&lt;/strong&gt;. DNS is always the issue, or at least, most of the time. On distribution using &lt;a href="https://manpages.debian.org/trixie/systemd/systemd.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;systemd&lt;/code&gt;&lt;/a&gt;, the &lt;a href="https://wiki.archlinux.org/title/Systemd-resolved" rel="noopener noreferrer"&gt;&lt;code&gt;systemd-resolved&lt;/code&gt;&lt;/a&gt; daemon in charge of the DNS can be sometimes a bit... annoying. In the past, on Ubuntu/Debian, I got many issues because of that, and I now have the habit to simply install &lt;code&gt;dnsmasq&lt;/code&gt; or &lt;code&gt;unbound&lt;/code&gt; locally and configure &lt;code&gt;/etc/resolv.conf&lt;/code&gt; manually. &lt;a href="https://manpages.debian.org/trixie/dnsmasq-base/dnsmasq.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;dnsmasq&lt;/code&gt;&lt;/a&gt; configuration can be found in the &lt;code&gt;/etc/dnsmasq.conf&lt;/code&gt; file  or in the &lt;code&gt;/etc/dnsmasq.d&lt;/code&gt; directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add dnsmasq
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/dnsmasq.d/99-local.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;listen-address=127.0.0.1
&lt;/span&gt;&lt;span class="gp"&gt;server=$&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;your_dns_server&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="go"&gt;no-resolve
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add dnsmasq
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service dnsmasq start
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"nameserver 127.0.0.1"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/resolv.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Dnsmasq" rel="noopener noreferrer"&gt;dnsmasq&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Unbound" rel="noopener noreferrer"&gt;Unbound&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dnsmasq.org/doc.html" rel="noopener noreferrer"&gt;Official DNSmasq Website&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.nlnetlabs.nl/projects/unbound/about/" rel="noopener noreferrer"&gt;Official Unbound Website&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Linux Cgroups Configuration&lt;/strong&gt;. When using a Linux distribution, most of the time it's about containers, with Docker or another alternative. Cgroups are disabled by default on Alpine Linux and must be enabled in &lt;code&gt;initrc&lt;/code&gt; by editing the &lt;code&gt;/etc/rc.conf&lt;/code&gt; file. Note: the &lt;code&gt;hybrid&lt;/code&gt; value sets both version of cgroups. The service must also be started if you want to use &lt;code&gt;docker&lt;/code&gt; or &lt;code&gt;podman&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; /etc/rc.conf /etc/rc.conf.old
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-Ei&lt;/span&gt; &lt;span class="s1"&gt;'s/#rc_cgroup_mode="unified"/#rc_cgroup_mode="hybrid"/'&lt;/span&gt; /etc/rc.conf 
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/rc.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;rc_cgroup_settings="
memory.max 10485760
pids.max max
"
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add cgroups
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service cgroups start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Docker" rel="noopener noreferrer"&gt;Docker&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/OpenRC#Cgroups" rel="noopener noreferrer"&gt;OpenRC Cgroups Section&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/cgroups.html" rel="noopener noreferrer"&gt;Control Groups&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.kernel.org/admin-guide/cgroup-v1/index.html" rel="noopener noreferrer"&gt;Control Groups version 1&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html" rel="noopener noreferrer"&gt;Control Group v2&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://liet.me/2022/07/08/enable-cgroups-v2-in-alpine-linux/" rel="noopener noreferrer"&gt;Enable CGroups V2 in Alpine Linux&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Proxy Configuration&lt;/strong&gt;. If you are using a proxy (inside a protected network), don't forget to configure it or them. &lt;code&gt;HTTP_PROXY&lt;/code&gt; environment variables are supported by most of the applications nowadays.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/profile &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sh"&gt;proxy configuration
&lt;/span&gt;&lt;span class="gp"&gt;http_proxy=$&lt;/span&gt;&lt;span class="sh"&gt;{my_proxy}
&lt;/span&gt;&lt;span class="gp"&gt;https_proxy=$&lt;/span&gt;&lt;span class="sh"&gt;{my_proxy}
&lt;/span&gt;&lt;span class="gp"&gt;HTTP_PROXY=$&lt;/span&gt;&lt;span class="sh"&gt;{my_proxy}
&lt;/span&gt;&lt;span class="gp"&gt;HTTPS_PROXY=$&lt;/span&gt;&lt;span class="sh"&gt;{my_proxy}
&lt;/span&gt;&lt;span class="go"&gt;
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://env.dev/variables/HTTP_PROXY" rel="noopener noreferrer"&gt;HTTP_PROXY&lt;/a&gt; on env.dev;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.golinuxcloud.com/set-up-proxy-http-proxy-environment-variable/" rel="noopener noreferrer"&gt;Set up Proxy using http_proxy, https_proxy and no_proxy in Linux&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.fosslinux.com/158631/linux-proxy-configuration-guide.htm" rel="noopener noreferrer"&gt;Linux Proxy Configuration: The Complete Guide to http_proxy, PAC, and System-Wide Settings (2026)&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;PAM Userland Tools&lt;/strong&gt;. Managing users in Alpine Linux can be challenging at first, because the PAM tools are not installed. They can be installed via the &lt;code&gt;shadow&lt;/code&gt; package. It will make everything easier when dealing with users and groups.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add shadow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/passwd/useradd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;useradd(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/passwd/userdel.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;userdel(8)&lt;/code&gt; manpge&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/passwd/usermod.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;usermod(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/passwd/groupadd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;groupadd(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/passwd/userdel.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;groupdel(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/passwd/usermod.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;groupmod(8)&lt;/code&gt; manpage&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;NTP Configuration&lt;/strong&gt;. During the install process, the installer asks which NTP servers should be installed. If in my case, you just press enter to end the process as quick as possible, the default NTP server will be installed. Again, as OpenBSD user, I like &lt;a href="https://manpages.debian.org/trixie/openntpd/openntpd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;openntpd&lt;/code&gt;&lt;/a&gt;, it's minimalist and do the job well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add openntpd
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/ntpd.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;listen on 127.0.0.1
servers pool.ntp.org
server time.cloudflare.com
sensor *
constraint from "9.9.9.9"
constraint from "2620:fe::fe"
constraints from "www.google.com"
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update del ntpd
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add openntpd
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service openntpd start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/ntpd" rel="noopener noreferrer"&gt;&lt;code&gt;ntpd(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://man.openbsd.org/ntpd.conf" rel="noopener noreferrer"&gt;&lt;code&gt;ntpd.conf(5)&lt;/code&gt; manpage&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Custom Editor Configuration&lt;/strong&gt;. Alpine Linux is already installed with a small version of &lt;a href="https://manpages.debian.org/trixie/vis/vi.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;vi&lt;/code&gt;&lt;/a&gt;, not even &lt;a href="https://manpages.debian.org/trixie/ed/ed.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;ed&lt;/code&gt;&lt;/a&gt; is installed. So, installing &lt;a href="https://manpages.debian.org/trixie/vim-common/vim.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;vim&lt;/code&gt;&lt;/a&gt; or any other editor of your choice can be helpful.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add vim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/vim-common/vim.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;vim(1)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.vim.org/" rel="noopener noreferrer"&gt;Official VIM website&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Disable shell history&lt;/strong&gt;. Some of you would ask why doing that. Well, as sysadmin, I saw too many confidential informations in the shell history, including passwords, tokens and sometimes sensitive customer informations. Disabling this feature will avoid information leaks. By setting &lt;a href="https://manpages.debian.org/trixie/bash/bash.1.en.html#HISTFILE" rel="noopener noreferrer"&gt;&lt;code&gt;HISTFILE&lt;/code&gt;&lt;/a&gt; to &lt;code&gt;/dev/null&lt;/code&gt;, the feature will stay available for the current session but the history will never remains in a file (usually in &lt;code&gt;${HOME}/.ash_history&lt;/code&gt; on Alpine).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/profile &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sh"&gt;disable shell logging feature
&lt;/span&gt;&lt;span class="go"&gt;export HISTFILE=/dev/null

EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  System Hardening
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;AppArmor Configuration&lt;/strong&gt;. Ensuring applications are doing the right things is important. One can install &lt;code&gt;selinux&lt;/code&gt; or &lt;code&gt;apparmor&lt;/code&gt; to enforce those check. Note: configuring those applications can be complex, please read the documentation first and do some tests before deploying in production.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add apparmor apparmor-utils apparmor-profiles
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/default/grub &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;GRUB_CMDLINE_LINUX_DEFAULT="modules=sd-mod,usb-storage,ext4 quiet rootfstype=ext4 apparmor=1 security=apparmor"
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grub-mkconfig &lt;span class="nt"&gt;-o&lt;/span&gt; /boot/grub/grub.cfg
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/kernel/security/lsm
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add apparmor boot
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service apparmor start
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;aa-enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/apparmor/apparmor.7.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;apparmor(7)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/AppArmor" rel="noopener noreferrer"&gt;AppArmor&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Security_Handbook/Linux_Security_Modules/AppArmor" rel="noopener noreferrer"&gt;Security Handbook/Linux Security Modules/AppArmor&lt;/a&gt; on the Gentoo Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/AppArmor" rel="noopener noreferrer"&gt;AppArmor&lt;/a&gt; on the Arch Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.apparmor.net/" rel="noopener noreferrer"&gt;Official AppArmor website&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Auto-Update&lt;/strong&gt;. Enable auto-update and auto-upgrade (not mandatory).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;cat&lt;/span&gt; /etc/crontabs/root &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sh"&gt;auto-update/auto-upgrade 
&lt;/span&gt;&lt;span class="go"&gt;0 2 * * * apk update &amp;amp;&amp;amp; apk upgrade
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://wiki.alpinelinux.org/wiki/Securing_Alpine_Linux#Regular_maintenance" rel="noopener noreferrer"&gt;Regular Maintenance&lt;/a&gt; on the Alpine Linux Wiki.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Full Disk Encryption&lt;/strong&gt;. If your server requires FDE, don't forget to configure it during the installation process. It will be the subject of a full article, because it can be challenging to deal with that. The idea is to encrypt the whole disk, and use an USB thumb containing &lt;code&gt;grub&lt;/code&gt; and the key to decrypt it to boot the kernel. If the USB drive is not plugged, the server can't boot.&lt;/p&gt;

&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Setting_up_encrypted_volumes_with_LUKS" rel="noopener noreferrer"&gt;Setting up encrypted volumes with LUKS&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Full_Disk_Encryption_From_Scratch" rel="noopener noreferrer"&gt;Full Disk Encryption From Scratch&lt;/a&gt; on the gentoo Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Dm-crypt" rel="noopener noreferrer"&gt;dm-crypt&lt;/a&gt; on the Gentoo Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system" rel="noopener noreferrer"&gt;dm-crypt/Encrypting an entire system&lt;/a&gt; on the ArchLinux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Dm-crypt/Device_encryption" rel="noopener noreferrer"&gt;dm-crypt/Device encryption&lt;/a&gt; on the ArchLinux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-crypt.html" rel="noopener noreferrer"&gt;dm-crypt&lt;/a&gt; from kernel.org;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://not.just-paranoid.net/encrypted-alpine-linux/" rel="noopener noreferrer"&gt;Encrypted Alpine Linux&lt;/a&gt; from just-paranoid.net.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Backup Configuration&lt;/strong&gt;. If your server contains critical data, don't forget to do regular backup using &lt;a href="https://pkgs.alpinelinux.org/package/edge/community/x86_64/restic" rel="noopener noreferrer"&gt;&lt;code&gt;restic&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://pkgs.alpinelinux.org/package/edge/testing/x86_64/rustic" rel="noopener noreferrer"&gt;&lt;code&gt;rustic&lt;/code&gt;&lt;/a&gt; or any other applications to creates backups on daily basis.&lt;/p&gt;

&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/restic/restic.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;restic(1)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://rustic.cli.rs/" rel="noopener noreferrer"&gt;Official Rustic website&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Sysctl System Hardening&lt;/strong&gt;. The Linux Kernel offers huge flexibility over its configuration, instead of recompiling the kernel every time with hard coded value, a first step is to configure the parameters available from &lt;code&gt;sysctl&lt;/code&gt; or from &lt;code&gt;/sys&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/sysctl.d/99-system-hardening.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;fs.file-max = 65535
fs.protected_fifos = 2
fs.protected_hardlinks = 1
fs.protected_regular = 2
fs.protected_symlinks = 1
fs.suid_dumpable = 0
kernel.core_pattern=|/bin/false
kernel.core_uses_pid = 1
kernel.ctrl-alt-del = 0
kernel.dmesg_restrict = 1
kernel.kexec_load_disabled = 1
kernel.kptr_restrict = 2
kernel.perf_event_paranoid = 2
kernel.pid_max = 65536
kernel.split_lock_mitigate = 0
kernel.sysrq = 0
kernel.unprivileged_bpf_disabled = 1
kernel.yama.ptrace_scope = 2
net.core.bpf_jit_harden = 2
vm.mmap_rnd_bits = 32
vm.mmap_rnd_compat_bits = 16
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sysctl &lt;span class="nt"&gt;-p&lt;/span&gt; /etc/sysctl.conf /etc/sysctl.d/&lt;span class="k"&gt;*&lt;/span&gt;.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Sysctl.conf" rel="noopener noreferrer"&gt;https://wiki.alpinelinux.org/wiki/Sysctl.conf&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Securing_Alpine_Linux" rel="noopener noreferrer"&gt;https://wiki.alpinelinux.org/wiki/Securing_Alpine_Linux&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://krython.com/post/hardening-alpine-linux-system-security" rel="noopener noreferrer"&gt;https://krython.com/post/hardening-alpine-linux-system-security&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Custom Hardened Kernel&lt;/strong&gt;. Disable unused feature, enable more security features and compile your own kernel. This can also be a challenging topic, and will have its own dedicated publication here.&lt;/p&gt;

&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/How_to_build_the_Alpine_Linux_kernel" rel="noopener noreferrer"&gt;How to build the Alpine Linux kernel&lt;/a&gt; on the Alpine Linux website;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/anthraxx/linux-hardened" rel="noopener noreferrer"&gt;Linux Hardened Kernel project&lt;/a&gt; on Github;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.kicksecure.com/wiki/Hardened-kernel" rel="noopener noreferrer"&gt;hardened-kernel&lt;/a&gt; on KickSecure Wiki.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Network Hardening
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Firewall Configuration&lt;/strong&gt;. Install &lt;code&gt;iptables&lt;/code&gt; or &lt;code&gt;nftables&lt;/code&gt;. Be careful though, because enabling and starting these services can cut your connections. Always tests the rules first and then deploy. &lt;code&gt;nftables&lt;/code&gt; configuration can be found in the &lt;code&gt;/etc/nftables.nft&lt;/code&gt; file or in the &lt;code&gt;/etc/nftables.d&lt;/code&gt; directory. The &lt;code&gt;iptables&lt;/code&gt; configuration can be found in &lt;code&gt;/etc/iptables&lt;/code&gt; directory. The following configuration will only allow connections to the &lt;code&gt;sshd&lt;/code&gt; daemon from anywhere.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add nftables
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/nftables.d/99-local.nft &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;table inet filter {
  chain input {
    tcp dport ssh accept comment "allow sshd connections"
  }
}
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add nftables boot
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service nftables start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/iptables/iptables.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;iptables(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/nftables/nftables.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;nft(8)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Iptables" rel="noopener noreferrer"&gt;Iptables&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Iptables" rel="noopener noreferrer"&gt;iptables&lt;/a&gt; on the Gentoo Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Iptables" rel="noopener noreferrer"&gt;iptables&lt;/a&gt; on the Arch Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://netfilter.org/" rel="noopener noreferrer"&gt;iptables official website&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Simple_stateful_firewall" rel="noopener noreferrer"&gt;Simple stateful firewall&lt;/a&gt; on the Arch Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Nftables" rel="noopener noreferrer"&gt;Nftables&lt;/a&gt; on the Alpine Linux Wiki; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Nftables" rel="noopener noreferrer"&gt;nftables&lt;/a&gt; on the Gentoo Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Nftables" rel="noopener noreferrer"&gt;nftables&lt;/a&gt; on the Arch Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.nftables.org/wiki-nftables/index.php/Main_Page" rel="noopener noreferrer"&gt;nftables official website&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Sysctl Network Optimization&lt;/strong&gt;. Optimize network stack configuration via &lt;code&gt;sysctl&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"tcp_bbr"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/modprobe.d/99-tcp.conf
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/sysctl.d/99-tcp-hardening.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;net.core.default_qdisc=fq
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432
net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_fin_timeout=15
net.ipv4.tcp_max_syn_backlog=65536
net.ipv4.tcp_rmem = 4096 131072 33554432
net.ipv4.tcp_syn_retries=3
net.ipv4.tcp_synack_retries=3
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_wmem = 4096 131072 33554432
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/sysctl.d/99-ipv4-hardening.conf &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="go"&gt;net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.log_martians = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.send_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.ip_forward = 0
EOF

&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sysctl &lt;span class="nt"&gt;-p&lt;/span&gt; /etc/sysctl.conf /etc/sysctl.d/&lt;span class="k"&gt;*&lt;/span&gt;.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Sysctl.conf" rel="noopener noreferrer"&gt;Sysctl&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Sysctl" rel="noopener noreferrer"&gt;sysctl&lt;/a&gt; on the Arch Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/kmod/modprobe.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;modprobe(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/kmod/modprobe.conf.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;modprobe.conf(5)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/procps/sysctl.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;sysctl(8)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html" rel="noopener noreferrer"&gt;IP Sysctl&lt;/a&gt; from kernel.org;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.commandinline.com/linux-tcp-tuning-throughput-sysctl-knobs/" rel="noopener noreferrer"&gt;Linux TCP Tuning: Improve Throughput with sysctl Knobs&lt;/a&gt; from commandline.com;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://devops.aibit.im/en/article/optimizing-linux-network-throughput-tcp-sysctl" rel="noopener noreferrer"&gt;Optimizing Linux Network Throughput by Tuning TCP/IP sysctl Parameters&lt;/a&gt; from devops.aibit.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Use Only One Network Stack&lt;/strong&gt;. If you don't need IPv6, disable it. Using two network stacks can lead to more problem. You can simply disable it using &lt;code&gt;sysctl&lt;/code&gt; by setting &lt;code&gt;net.ipv6.conf.all.disable_ipv6&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt; or by recompiling the kernel and disabling IPv6 directly there.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sysctl net.ipv6.conf.all.disable_ipv6&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo &lt;/span&gt;net.ipv6.conf.all.disable_ipv6&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /etc/sysctl.d/99-ipv6-disabled.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://sysctl-explorer.net" rel="noopener noreferrer"&gt;Sysctl Explorer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.kernel.org/doc/html/v7.3-rc1/admin-guide/sysctl/net.html" rel="noopener noreferrer"&gt;Documentation for /proc/sys/net/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://superuser.com/questions/33196/how-to-disable-autoconfiguration-on-ipv6-in-linux" rel="noopener noreferrer"&gt;How to disable autoconfiguration on IPv6 in Linux?&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://oneuptime.com/blog/post/2026-03-20-proc-sys-net-ipv6-conf-parameters/view#disable-ipv6-disable-ipv6-on-interface" rel="noopener noreferrer"&gt;disable_ipv6 - Disable IPv6 on Interface&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.systutorials.com/disabling-ipv6-on-fedora-17-linux/" rel="noopener noreferrer"&gt;Disabling IPv6 on Linux: Step-by-Step Guide&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Monitoring
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Configure a Logger&lt;/strong&gt;. By default, a minimalist implementation of syslog from busybox called &lt;a href="https://manpages.debian.org/jessie/busybox-syslogd/syslogd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;syslogd&lt;/code&gt;&lt;/a&gt; is installed. One will probably prefer something a bit more flexible like &lt;a href="https://pkgs.alpinelinux.org/package/edge/main/x86_64/rsyslog" rel="noopener noreferrer"&gt;&lt;code&gt;rsyslog&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://pkgs.alpinelinux.org/package/edge/main/x86_64/syslog-ng" rel="noopener noreferrer"&gt;&lt;code&gt;syslog-ng&lt;/code&gt;&lt;/a&gt; to manage the logs (and forward them for example).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add rsyslog
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add rsyslog
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service rsyslog start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Syslog" rel="noopener noreferrer"&gt;Syslog page&lt;/a&gt; on Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.rsyslog.com/" rel="noopener noreferrer"&gt;rsyslog official website&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Log Rotation&lt;/strong&gt;. On a very active servers, logs can be a huge problem, even more if the partitions were not correctly configuration, one badly configured process can easily fill up all the available space in &lt;code&gt;/&lt;/code&gt; or in &lt;code&gt;/var&lt;/code&gt; or in &lt;code&gt;/var/log&lt;/code&gt;. It can be good to configure &lt;a href="https://manpages.debian.org/trixie/logrotate/logrotate.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;logrorate&lt;/code&gt;&lt;/a&gt; accordingly. It mostly depends on your applications, so, I will not give you any examples, the manpage should be enough.&lt;/p&gt;

&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://manpages.debian.org/trixie/logrotate/logrotate.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;logrotate(8)&lt;/code&gt; manpage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Physical Disk Monitoring&lt;/strong&gt;. Install &lt;code&gt;smartmontools&lt;/code&gt; to check the states of the disks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add smartmontools
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add smartd
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service smartd start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/smartmontools/smartctl.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;smartctl(8)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/smartmontools/smartd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;smartd(8)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.smartmontools.org/" rel="noopener noreferrer"&gt;SmartMonTools official website&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;. Install &lt;code&gt;monit&lt;/code&gt; to control automatically the state of each services running on the server, reboot them or send a notification in case of issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add monit
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add monit
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service monit start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://mmonit.com/monit/" rel="noopener noreferrer"&gt;Official Monit website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Metrics Collection&lt;/strong&gt;. Install something to monitor the system like &lt;a href="https://pkgs.alpinelinux.org/package/edge/community/x86_64/netdata" rel="noopener noreferrer"&gt;&lt;code&gt;netdata&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://pkgs.alpinelinux.org/package/edge/community/x86_64/prometheus" rel="noopener noreferrer"&gt;&lt;code&gt;prometheus&lt;/code&gt;&lt;/a&gt; or any other tools to collect the metrics.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add netdata
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://prometheus.io/" rel="noopener noreferrer"&gt;Official Prometheus website&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.netdata.cloud/" rel="noopener noreferrer"&gt;Official netdata website&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;System Audit&lt;/strong&gt;. Install and configure &lt;a href="https://pkgs.alpinelinux.org/package/edge/main/x86_64/audit" rel="noopener noreferrer"&gt;&lt;code&gt;audit&lt;/code&gt;&lt;/a&gt;. This package contains &lt;a href="https://manpages.debian.org/trixie/auditd/auditd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;auditd&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://manpages.debian.org/trixie/auditd/auditctl.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;auditctl&lt;/code&gt;&lt;/a&gt; executable to audit the logs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add audit
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;rc-update add auditd
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;service auditd start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/auditd/auditctl.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;auditctl(8)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/auditd/auditd.8.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;auditd(8)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/auditd/auditd.conf.5.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;auditd.conf(5)&lt;/code&gt; manpage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Securing_Alpine_Linux#Install_necessary_security_tools" rel="noopener noreferrer"&gt;Install necessary security tools&lt;/a&gt; on Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Audit" rel="noopener noreferrer"&gt;Audit&lt;/a&gt; on the Gentoo Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Audit_framework" rel="noopener noreferrer"&gt;Audit framework&lt;/a&gt; on the Arch Linux Wiki.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Misc
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;. Some packages are required to check if everything is working as expected. the &lt;code&gt;bind-tools&lt;/code&gt; package contains &lt;code&gt;dig&lt;/code&gt; used to check if domain name requests are working. The &lt;code&gt;curl&lt;/code&gt; packages contains &lt;code&gt;curl&lt;/code&gt; to check if the server can have access to remote HTTP servers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add curl bind-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/curl/curl.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;curl(1)&lt;/code&gt; manpage&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://manpages.debian.org/trixie/bind9-dnsutils/dig.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;dig(1)&lt;/code&gt; manpage&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Container Managers&lt;/strong&gt;. &lt;a href="https://pkgs.alpinelinux.org/package/edge/community/x86_64/docker" rel="noopener noreferrer"&gt;&lt;code&gt;docker&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://pkgs.alpinelinux.org/package/edge/community/x86_64/podman" rel="noopener noreferrer"&gt;&lt;code&gt;podman&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://pkgs.alpinelinux.org/package/edge/main/x86_64/lxc" rel="noopener noreferrer"&gt;&lt;code&gt;lxc&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://pkgs.alpinelinux.org/package/edge/community/x86_64/incus" rel="noopener noreferrer"&gt;&lt;code&gt;incus&lt;/code&gt;&lt;/a&gt; can be installed on Alpine Linux. On my side, I prefer the 3 last listed above, &lt;code&gt;docker&lt;/code&gt; is not open-source enough to me.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;apk add podman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.alpinelinux.org/wiki/Podman" rel="noopener noreferrer"&gt;Podman&lt;/a&gt; on the Alpine Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.gentoo.org/wiki/Podman" rel="noopener noreferrer"&gt;Podman&lt;/a&gt; on the Gentoo Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Podman" rel="noopener noreferrer"&gt;Podman&lt;/a&gt; on the Arch Linux Wiki;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://podman.io/" rel="noopener noreferrer"&gt;Official Podman website&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;This article contains only the beginning of the life of a server. Indeed, those steps can easily be applied on one or two servers during manually, but when it comes to manage more than few servers, using an Ansible playbook or a Salt Pillar to ensure everything was correctly configured on all the fleet.&lt;/p&gt;

&lt;p&gt;Actually, this procedure is also limited to a really simple server configuration, if one need a web server or a database, more specific steps will be required. In fact, it's only the beginning, because every new simple application installed will need its amount of complexity to deal with.&lt;/p&gt;

&lt;p&gt;The final configuration presented in this article can also be a good foundation to install something more complex like &lt;a href="https://k3s.io/" rel="noopener noreferrer"&gt;k3s&lt;/a&gt; or &lt;a href="https://developer.hashicorp.com/nomad" rel="noopener noreferrer"&gt;nomad&lt;/a&gt;. It can also be used to be a template for virtual machines exposed directly to the web... Or simply for your own private services at home.&lt;/p&gt;

&lt;p&gt;On my side, it will also be used to host my own gitlab/github workers... But we will see that in another post!&lt;/p&gt;

&lt;p&gt;Anyway, as usual, have fun and happy hacking!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@misssusanflynn?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Susan Flynn&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/snow-covered-mountain-under-blue-sky-during-daytime-QGAasftB9uc?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>systems</category>
      <category>sysadmin</category>
      <category>security</category>
    </item>
    <item>
      <title>CBOR Serialization in Dart</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Tue, 08 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/cbor-serialization-in-dart-1ad6</link>
      <guid>https://dev.to/niamtokik/cbor-serialization-in-dart-1ad6</guid>
      <description>&lt;p&gt;Every developer knows &lt;code&gt;JSON&lt;/code&gt;, they also probably knows &lt;code&gt;XML&lt;/code&gt; and sometime &lt;code&gt;protobuf&lt;/code&gt; or &lt;code&gt;BSON&lt;/code&gt;. For the ones coming from Erlang/Elixir, they will probably know &lt;code&gt;ETF&lt;/code&gt; and for the ones using LISP/Scheme, they will also probably have heard of S-expressions. Many other serialization format can be found on the web, a Wikipedia page collect them all. CBOR is another one, this time, not specified by a language, but by an organization. It makes it more portable than any other binary serialization formation.&lt;/p&gt;

&lt;p&gt;Anyway, CBOR was in my list for a while, and I wanted to use it with Dart to see how it could be used there. It will also be a good time to deal with I/O, like creating, reading, writing and deleting files.&lt;/p&gt;

&lt;h1&gt;
  
  
  Bootstrapping
&lt;/h1&gt;

&lt;p&gt;As usual, a sandbox project will be created. This time, it will be called &lt;code&gt;cboring&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart create cboring
&lt;span class="go"&gt;Creating cboring using template console...

  .gitignore
  analysis_options.yaml
  CHANGELOG.md
  pubspec.yaml
  README.md
  bin/cboring.dart
  lib/cboring.dart
  test/cboring_test.dart

Running pub get...                     0.8s
  Resolving dependencies...
  Downloading packages...
  Changed 48 dependencies!

Created project cboring in cboring! In order to get started, run the following commands:

  cd cboring
  dart run

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;cboring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://pub.dev/packages/cbor" rel="noopener noreferrer"&gt;&lt;code&gt;cbor&lt;/code&gt;&lt;/a&gt; package will be required.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart pub add cbor
&lt;span class="go"&gt;Resolving dependencies... 
Downloading packages... 
+ cbor 6.5.1
+ characters 1.4.1
+ hex 0.2.0
Changed 3 dependencies!
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Quick Introduction to CBOR
&lt;/h1&gt;

&lt;p&gt;As mentioned above, CBOR is a binary serial format specified in many RFCs. If you are using Erlang you should probably be aware of ETF or Erlang Term Format. Both are similar in the design. The idea is to encode different kind of data in a binary format, for example, if you want to encode an integer, instead of writing directly it like in JSON, the final produced result in a binary format will result in - at least - 2 values: (1) a tag as an integer defined in the specification used to inform on the data type (2) the data itself, encoded in a specific format or not, depending on the specification. Let compare that with JSON directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="mi"&gt;1023&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same textual value in binary looks like that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0x31 0x30 0x32 0x33
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The previous value is a simple integer (&lt;code&gt;1023&lt;/code&gt;) supported by the JSON format. If you read this value with a JSON parser, it will return &lt;code&gt;1023&lt;/code&gt; as value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0x19 0x03 0xff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In other hands, CBOR is using binary term, and the same value (&lt;code&gt;1023&lt;/code&gt;) will be encoded as &lt;code&gt;0x03ff&lt;/code&gt; in hexadecimal. This value only is not enough, because nobody really know. Indeed, this value can represent any other kind of values. To avoid confusion, CBOR will prefix this integer by &lt;code&gt;0x19&lt;/code&gt; (&lt;code&gt;000_11001&lt;/code&gt;). Then, when the decoder will read the binary file, it will know the next value stored after this tag is an integer. Let check that for a more complex data like a list made of an integer and a string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1023&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;65536&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0x5b 0x31 0x30 0x32 0x33 0x2c 0x22 0x74
0x65 0x73 0x74 0x22 0x2c 0x36 0x35 0x35
0x33 0x36 0x5d 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The JSON representation of those data is still quite simple, but in CBOR, it can become a bit more challenging:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0x82 0x19 0x03 0xff 0x64 0x74 0x65 0x73 
0x74 0x1a 0x00 0x01 0x00 0x00
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The type defined in the first byte can be divided in two parts, the first 3 bits define the &lt;a href="https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1" rel="noopener noreferrer"&gt;major type&lt;/a&gt;, the 5 remaining bits are used for extra-arguments.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;0x82&lt;/code&gt; (&lt;code&gt;100_00010&lt;/code&gt;) is an array of data items (major type 4) containing 3 elements (&lt;code&gt;00010&lt;/code&gt;);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;0x19&lt;/code&gt; (&lt;code&gt;000_11001&lt;/code&gt;) is an unsigned integer (major type 0)  with 25 (&lt;a href="https://www.rfc-editor.org/rfc/rfc8949.html#fpnoconttbl" rel="noopener noreferrer"&gt;16 bits encoded value&lt;/a&gt;) as additional parameter and followed by the value 1023 (`0x03 0xff);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;0x64&lt;/code&gt; (&lt;code&gt;011_00100&lt;/code&gt;) is a text string (major type 3) containing the 4 (&lt;code&gt;00100&lt;/code&gt;) characters &lt;code&gt;t&lt;/code&gt; &lt;code&gt;e&lt;/code&gt; &lt;code&gt;s&lt;/code&gt; t&lt;code&gt; (&lt;/code&gt;0x74 0x65 0x73 0x74`);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;0x1a&lt;/code&gt; (&lt;code&gt;000_11010&lt;/code&gt;) is an unsigned integer (major type 0) with 26 as additional parameter (&lt;a href="https://www.rfc-editor.org/rfc/rfc8949.html#fpnoconttbl" rel="noopener noreferrer"&gt;32 bits encoded value&lt;/a&gt;), followed by the value 65536 (&lt;code&gt;0x00 0x01 0x00 0x00&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The amount of data encoded in CBOR is more concise, and can be a huge win when an application should deal with limited payload size. If you want to know more about the specification itself, the &lt;a href="https://www.rfc-editor.org/rfc/rfc8949.html" rel="noopener noreferrer"&gt;RFC8949&lt;/a&gt; contains everything.&lt;/p&gt;

&lt;h1&gt;
  
  
  Exporting CBOR Data To a File
&lt;/h1&gt;

&lt;p&gt;It was a long prelude... but it's now the time to come back to the CBOR package and have some fun. Exporting CBOR data to a file is straightforward, even more knows after having reviewed how to use the Dart file API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:io'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:convert'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:typed_data'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:cbor/simple.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s"&gt;'map'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="s"&gt;'key'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="s"&gt;'list'&lt;/span&gt;&lt;span class="o"&gt;:&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="p"&gt;};&lt;/span&gt;
  &lt;span class="n"&gt;Uint8List&lt;/span&gt; &lt;span class="n"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Uint8List&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fromList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cbor&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;cborExport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./export.cbor"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cborExport&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;openSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;append&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeFromSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;closeSync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;stat &lt;/span&gt;export.cbor 
&lt;span class="go"&gt;  File: export.cbor
  Size: 26              Blocks: 8          IO Block: 4096   regular file
Device: 254,1   Inode: 279569      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    user)   Gid: ( 1000/    user)
Access: 2026-09-04 07:12:05.262214381 +0000
Modify: 2026-09-04 07:11:22.398703675 +0000
Change: 2026-09-04 07:11:22.398703675 +0000
 Birth: 2026-09-04 07:11:22.398703675 +0000

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;hexdump &lt;span class="nt"&gt;-C&lt;/span&gt; export.cbor
&lt;span class="go"&gt;00000000  a2 63 6d 61 70 a1 63 6b  65 79 65 76 61 6c 75 65  |.cmap.ckeyevalue|
00000010  64 6c 69 73 74 84 01 02  03 04                    |dlist.....|
0000001a
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the file has been created and contains CBOR encoded data.&lt;/p&gt;

&lt;h1&gt;
  
  
  Import CBOR Data From Files
&lt;/h1&gt;

&lt;p&gt;If a CBOR data structure can be exported to a file, it can also be imported from a file. Let check that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:io'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:convert'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:typed_data'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:cbor/simple.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;cborExport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./export.cbor"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cborExport&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;openSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;Uint8List&lt;/span&gt; &lt;span class="n"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Uint8List&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;lengthSync&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readIntoSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;closeSync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cbor&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;[162, 99, 109, 97, 112, 161, 99, 107, 101, 121, 101, 118, 97, 108, 117, 101, 100, 108, 105, 115, 116, 132, 1, 2, 3, 4]
{map: {key: value}, list: [1, 2, 3, 4]}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While decoding the file, the data present in it are correctly converted to Dart terms using the CBOR encoding format.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;CBOR is amazing, not only because it was specified, but also because it's small and elegant. This is a great alternative to &lt;a href="https://protobuf.dev/" rel="noopener noreferrer"&gt;Protocol Buffer&lt;/a&gt; and &lt;a href="https://archive.is/PiKh" rel="noopener noreferrer"&gt;BERT&lt;/a&gt; (Binary ERlang Term, a "fork" of &lt;a href="https://www.erlang.org/doc/apps/erts/erl_ext_dist.html" rel="noopener noreferrer"&gt;ETF&lt;/a&gt;). In the case of protobuf, CBOR is easier to use, and will act as a binary-like JSON, with extra-type and a smaller payload. For &lt;a href="https://archive.is/PiKh" rel="noopener noreferrer"&gt;BERT&lt;/a&gt;/&lt;a href="https://www.erlang.org/doc/apps/erts/erl_ext_dist.html" rel="noopener noreferrer"&gt;ETF&lt;/a&gt;, it will be safer, because the serializer will not use some low-level functions (e.g. &lt;a href="https://www.erlang.org/doc/apps/erts/erlang.html#binary_to_term/1" rel="noopener noreferrer"&gt;&lt;code&gt;binary_to_term/1&lt;/code&gt;&lt;/a&gt;) to automatically convert the data, including atoms. Indeed, ETF has been created to be used in a safe and controlled environment, using it in production is a huge risk and should be avoided.&lt;/p&gt;

&lt;p&gt;Anyway, CBOR remains one of my favorite binary format, and its implementation in Dart is doing the job. Not everything has been implemented though, for example, it is possible to specify more accurately the CBOR payload by using &lt;a href="https://tools.ietf.org/html/rfc8610" rel="noopener noreferrer"&gt;CDDL&lt;/a&gt; (Concise Data Definition Language) and offering mostly the same feature than Protobuf. CBOR can also be used as an alternative to JWT, with &lt;a href="https://tools.ietf.org/html/rfc8392" rel="noopener noreferrer"&gt;CWT&lt;/a&gt;. CBOR can also be used to sign and encrypt data via &lt;a href="https://datatracker.ietf.org/doc/html/rfc8152" rel="noopener noreferrer"&gt;COSE&lt;/a&gt;, an alternative to &lt;a href="https://datatracker.ietf.org/wg/jose/about/" rel="noopener noreferrer"&gt;JOSE&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;CBOR can easily replace JSON in practically all situations and was designed to offer performance and flexibility. It's a perfect format for messaging, game industry, low-level programming and eventually system application. This article was only the tip of the iceberg, the &lt;a href="https://datatracker.ietf.org/doc/search/?name=CBOR&amp;amp;rfcs=on&amp;amp;activedrafts=on&amp;amp;olddrafts=on" rel="noopener noreferrer"&gt;number of drafts&lt;/a&gt; related to CBOR available on the IETF website is astonishing.&lt;/p&gt;

&lt;p&gt;As usual, if the reader wants to know more about CBOR and how to use it with Dart, here a list of nice references:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the &lt;a href="https://cbor.io/" rel="noopener noreferrer"&gt;Official CBOR website&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://pub.dev/packages/cbor" rel="noopener noreferrer"&gt;&lt;code&gt;cbor&lt;/code&gt; package&lt;/a&gt; on pub.dev;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://pub.dev/documentation/cbor/latest/" rel="noopener noreferrer"&gt;&lt;code&gt;cbor&lt;/code&gt; package API documentation&lt;/a&gt; at pub.dev;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/shamblett/cbor" rel="noopener noreferrer"&gt;&lt;code&gt;cbor&lt;/code&gt; package source code&lt;/a&gt; at Github;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/PJK/libcbor" rel="noopener noreferrer"&gt;&lt;code&gt;libcbor&lt;/code&gt;&lt;/a&gt; at Github;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc8949.html" rel="noopener noreferrer"&gt;RFC-8949 - Concise Binary Object Representation (CBOR)&lt;/a&gt; Official specification;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/mnelsonwhite/deserialising-cbor-encoded-data-in-net-5cgo"&gt;Understanding CBOR Encoded Data&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/mnelsonwhite"&gt;@mnelsonwhite&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/vipert/json-vs-cbor-javascript-2plh"&gt;JSON VS CBOR (Javascript)&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/vipert"&gt;@vipert&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.vitalvas.com/post/2026/03/09/json-vs-cbor/" rel="noopener noreferrer"&gt;JSON vs CBOR&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://surrealdb.com/blog/understanding-cbor" rel="noopener noreferrer"&gt;Understanding the CBOR data serialisation format&lt;/a&gt; by Aravind Putrevu;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://devtoys.pro/blog/cbor-messagepack-guide" rel="noopener noreferrer"&gt;CBOR vs MessagePack: Binary JSON Formats Explained&lt;/a&gt; by DevToys.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy hacking and have fun!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@artlasovsky?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Art Lasovsky&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/brass-quilt-pen-8XddFc6NkBY?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dart</category>
      <category>serializer</category>
      <category>cbor</category>
      <category>cli</category>
    </item>
    <item>
      <title>WeeklyReview#202636</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Mon, 07 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/weeklyreview202636-2kpa</link>
      <guid>https://dev.to/niamtokik/weeklyreview202636-2kpa</guid>
      <description>&lt;p&gt;Summer is over, after 2 months of hot weather in France, it's time to restart all the projects. Most of them have been slowed down, it's now a good time to do a quick list of my targets. Firstly, one target is to find an incubator for my future company. One of my idea is to leave France and go to Switzerland, the startup scene and the economy is way better than what we have in France right now, or move back to Denmark (like it would have been done 6 years ago, but cancelled due to the crisis), or take a one-way flight to Japan. The cultural change will be hardcore, and I would like to avoid that for now due to my poor level of Japanese.&lt;/p&gt;

&lt;p&gt;Anyway, let have a first look at the incubators available in Switzerland, here a non-exhaustive list of incubators found on the web:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.ifj.ch/get-started/programs" rel="noopener noreferrer"&gt;&lt;strong&gt;Swiss UMEF&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Sch%C3%BCtzengasse+10%2C+9000+St.+Gallen%2C+Switzerland+&amp;amp;zoom=19&amp;amp;minlon=6.140563488006592&amp;amp;minlat=46.198953910264045&amp;amp;maxlon=6.144769191741943&amp;amp;maxlat=46.20064516302804#map=19/47.424226/9.372149" rel="noopener noreferrer"&gt;St. Gallen&lt;/a&gt;): provides courses, checklists, business ideas, business plan, domiciliation and pitch'n'bar. They can be followed on &lt;a href="https://ch.linkedin.com/company/ifj-ag" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt; and &lt;a href="https://www.youtube.com/channel/UC1FmBSShpNJtFCQvRdgq2eQ" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.venturelab.swiss/" rel="noopener noreferrer"&gt;&lt;strong&gt;VentureLabs&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Wiesenstrasse+10A+8952+Schlieren-Z%C3%BCrich&amp;amp;zoom=19&amp;amp;minlon=9.370047748088838&amp;amp;minlat=47.42340005812167&amp;amp;maxlon=9.37425345182419&amp;amp;maxlat=47.42505323873903#map=19/47.400024/8.443776" rel="noopener noreferrer"&gt;Zurich&lt;/a&gt;, Lausanne, &lt;a href="https://www.openstreetmap.org/search?query=Unterstrasse+6%2C+9000+St.Gallen%2C+switzerland&amp;amp;zoom=19&amp;amp;minlon=6.584117710590363&amp;amp;minlat=46.52058657895266&amp;amp;maxlon=6.588323414325715&amp;amp;maxlat=46.52226790516529#map=19/47.420284/9.370225" rel="noopener noreferrer"&gt;St. Gallen&lt;/a&gt;): Support startups and innovators via training sessions, workshops and courses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://pulse-hesge.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;Pulse Hesge&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Rue+de+Lyon+22-24+1201+Gen%C3%A8ve&amp;amp;zoom=19&amp;amp;minlon=9.368121922016146&amp;amp;minlat=47.41945653184219&amp;amp;maxlon=9.372327625751497&amp;amp;maxlat=47.421109836298264#map=19/46.208791/6.136931" rel="noopener noreferrer"&gt;Genève&lt;/a&gt;): coaching, workshops, coworking, networking and events, (a member of the team must have a diploma from HES-SO.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.ifj.ch/get-started/programs" rel="noopener noreferrer"&gt;&lt;strong&gt;IFJ (Institut für Jungunternehmen)&lt;/strong&gt;&lt;/a&gt;: a startup acceleration program. They are offering many services including startup preparation (e.g. business plan tools, courses), training and company development programs. Their &lt;a href="https://www.ifj.ch/blog-en" rel="noopener noreferrer"&gt;blog&lt;/a&gt; seems to be active. It's also a three-stage funding kick-start, 10k CHF to 1M CHF. They can also be followed on &lt;a href="https://x.com/ifj_ch/" rel="noopener noreferrer"&gt;X/Twitter&lt;/a&gt;, &lt;a href="https://ch.linkedin.com/company/ifj-ag" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; and &lt;a href="https://www.youtube.com/channel/UC1FmBSShpNJtFCQvRdgq2eQ" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.venturekick.ch" rel="noopener noreferrer"&gt;&lt;strong&gt;Venture Kick&lt;/strong&gt;&lt;/a&gt; (Schlieren-Zürich): a philanthropic/private initiative by the &lt;a href="https://www.kickfoundation.ch/" rel="noopener noreferrer"&gt;Kick Foundation&lt;/a&gt;, created to accelerate the time to market and supporting young entrepreneurs. They helped &lt;a href="https://www.venturekick.ch/portfolio?profilesEntry=1" rel="noopener noreferrer"&gt;more than 800 companies&lt;/a&gt;. They can be followed on &lt;a href="https://www.venturekick.ch" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.tenity.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Tenity&lt;/strong&gt;&lt;/a&gt; (international/&lt;a href="https://www.openstreetmap.org/search?query=pfingstweidstrasse+110%2C+zurich&amp;amp;zoom=19&amp;amp;minlon=6.134828925132752&amp;amp;minlat=46.20794609912649&amp;amp;maxlon=6.139034628868103&amp;amp;maxlat=46.20963707508719#map=19/47.391625/8.506999" rel="noopener noreferrer"&gt;Zurich&lt;/a&gt;): venture capital, funding startups. They can be followed on &lt;a href="https://www.linkedin.com/company/tenity/" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt; and on &lt;a href="https://www.youtube.com/@tenity" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.virtual-network.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Virtual Network&lt;/strong&gt;&lt;/a&gt;: owned by &lt;a href="https://everybodywiki.com/St%C3%A9phane_Pictet" rel="noopener noreferrer"&gt;Stéphane Pictet&lt;/a&gt;. Don't have a lot of information on them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.nivalisgroup.ch" rel="noopener noreferrer"&gt;&lt;strong&gt;Nivalis Group&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=zone+industrielle+du+Vivier+22%2C+1690+Villaz-St-Pierre%2C+Switzerland+&amp;amp;zoom=19&amp;amp;minlon=8.504895865917208&amp;amp;minlat=47.39079766325766&amp;amp;maxlon=8.50910156965256&amp;amp;maxlat=47.39245186745405#map=19/46.718135/6.963185" rel="noopener noreferrer"&gt;Villaz-St-Pierre&lt;/a&gt;): investors, support. They can be followed on &lt;a href="https://www.linkedin.com/company/nivalis-group/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.pinto.ventures" rel="noopener noreferrer"&gt;&lt;strong&gt;Pintos Venture&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Zugerstrasse+66%2C+6318+Walchwil%2C+Zug%2C+Switzerland&amp;amp;zoom=19&amp;amp;minlon=6.961080729961396&amp;amp;minlat=46.71729810778195&amp;amp;maxlon=6.965286433696748&amp;amp;maxlat=46.71897333675543#map=19/47.107345/8.506514" rel="noopener noreferrer"&gt;Zug&lt;/a&gt;): pre-seed, seed, active support, coaching and introduction to partner VCs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.intracen.org" rel="noopener noreferrer"&gt;&lt;strong&gt;International Trade Center&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=54-56+rue+de+Montbrillant%2C+1202+Geneva+Switzerland&amp;amp;zoom=19&amp;amp;minlon=8.504410386085512&amp;amp;minlat=47.10651323132388&amp;amp;maxlon=8.508616089820864&amp;amp;maxlat=47.10817633813183#map=19/46.219859/6.140790" rel="noopener noreferrer"&gt;Geneva&lt;/a&gt;): not sure if this one is the right one, mostly for undeveloped countries projects (it seems).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://masschallenge.org" rel="noopener noreferrer"&gt;&lt;strong&gt;MassChallenge&lt;/strong&gt;&lt;/a&gt; (international/&lt;a href="https://www.openstreetmap.org/search?query=Chemin+du+Closel+5+1020+Renens%2C+Switzerland&amp;amp;zoom=19&amp;amp;minlon=6.138685941696167&amp;amp;minlat=46.21901352935365&amp;amp;maxlon=6.142891645431519&amp;amp;maxlat=46.22070416457247#map=19/46.532298/6.591257" rel="noopener noreferrer"&gt;Renens&lt;/a&gt;): networking and accelerator. They can be followed on &lt;a href="https://www.linkedin.com/company/masschallenge" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt; and &lt;a href="https://www.youtube.com/@masschallenge9812/videos" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://qai-ventures.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;qai ventures&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Schorenweg+44B%2C+CH-4144++Arlesheim%2C++Switzerland&amp;amp;zoom=19&amp;amp;minlon=6.589154899120332&amp;amp;minlat=46.5314579894361&amp;amp;maxlon=6.593360602855683&amp;amp;maxlat=46.533138979196906#map=19/47.506739/7.613157" rel="noopener noreferrer"&gt;Arlesheim&lt;/a&gt;): startup funding, accelerator, founder program. They can be followed on &lt;a href="https://www.linkedin.com/company/qaiventures/" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt; and on &lt;a href="https://www.youtube.com/@QAIventures" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.trea.ch" rel="noopener noreferrer"&gt;&lt;strong&gt;Trea ventures&lt;/strong&gt;&lt;/a&gt;: no information from their website, they must be contacted via email.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.stryber.com" rel="noopener noreferrer"&gt;&lt;strong&gt;Stryber&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Wolleraustr.+41a+8807+Freienbach+Switzerland&amp;amp;zoom=19&amp;amp;minlon=7.611055076122285&amp;amp;minlat=47.50591396132054&amp;amp;maxlon=7.615260779857636&amp;amp;maxlat=47.507564548955145#map=18/47.202509/8.755391" rel="noopener noreferrer"&gt;Freienbach&lt;/a&gt;): design, launch and scale businesses. specialized in large-projects. They can be followed on &lt;a href="https://www.linkedin.com/company/stryber-ag/" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.swisspreneur.org" rel="noopener noreferrer"&gt;&lt;strong&gt;Swisspreneur&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Bahnhofstrasse+3%2C+3550+Langnau&amp;amp;zoom=18&amp;amp;minlon=8.751184344291689&amp;amp;minlat=47.2008483408265&amp;amp;maxlon=8.759595751762392&amp;amp;maxlat=47.20416860317821#map=19/46.939963/7.783543" rel="noopener noreferrer"&gt;Langnau&lt;/a&gt;): startup funding and investment, events. They can be followed on &lt;a href="https://www.instagram.com/swisspreneur/" rel="noopener noreferrer"&gt;youtube&lt;/a&gt; and &lt;a href="http://linkedin.com/company/swisspreneur" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.innovaud.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;Innovaud&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Av.+de+Gratta-Paille+2+CH-1018+Lausanne&amp;amp;zoom=19&amp;amp;minlon=7.781439721584321&amp;amp;minlat=46.939128821279716&amp;amp;maxlon=7.7856454253196725&amp;amp;maxlat=46.94079715073891#map=19/46.536766/6.616995" rel="noopener noreferrer"&gt;Lausanne&lt;/a&gt;): company creation, advice and support, fiscal/financial framework, connection. They can be followed on &lt;a href="https://www.linkedin.com/company/innovaud" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt; and &lt;a href="https://www.youtube.com/channel/UCOYk-cbse0VjNRtqRoWZg0Q" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.fongit.ch" rel="noopener noreferrer"&gt;&lt;strong&gt;FongIT&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Route+de+la+Galaise+34++1228+Plan-les-Ouates++Geneva%2C+Switzerland&amp;amp;zoom=14&amp;amp;minlon=6.543560028076173&amp;amp;minlat=46.50311874868842&amp;amp;maxlon=6.678142547607423&amp;amp;maxlat=46.55691267559806#map=19/46.167967/6.102753" rel="noopener noreferrer"&gt;Geneva&lt;/a&gt;): funding, startup support. they can be followed on &lt;a href="https://www.youtube.com/c/Fongit_innovation" rel="noopener noreferrer"&gt;youtube&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/fongit/" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.epfl-innovationpark.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;EPFL&lt;/strong&gt;&lt;/a&gt; (Lausanne): expertise, incubation, hosting, mostly via other companies like &lt;a href="https://laforge-incubator.ch/" rel="noopener noreferrer"&gt;La Forge&lt;/a&gt;, &lt;a href="https://trustvillage.ch/" rel="noopener noreferrer"&gt;Trust Village&lt;/a&gt; and &lt;a href="https://www.epfl-innovationpark.ch/startups-incubation-and-hosting/le-garage" rel="noopener noreferrer"&gt;Le Garage&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.innosuisse.admin.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;InnoSuisse&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=+Einsteinstrasse+2%2C+Bern%2C+3003%2C+CH+&amp;amp;zoom=6&amp;amp;minlon=-18.8525390625&amp;amp;minlat=39.11301365149975&amp;amp;maxlon=23.291015625000004&amp;amp;maxlat=52.908902047770255#map=19/46.937190/7.446774" rel="noopener noreferrer"&gt;Bern&lt;/a&gt;): an innovation agency created to help companies with funding instruments. They financed many &lt;a href="https://www.innosuisse.admin.ch/en/approved-start-up-innovation-projects" rel="noopener noreferrer"&gt;startups since 2023&lt;/a&gt;. They can be followed on &lt;a href="https://www.youtube.com/c/Innosuisse" rel="noopener noreferrer"&gt;youtube&lt;/a&gt; and &lt;a href="https://www.youtube.com/c/Innosuisse" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://bioark.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;Bioark&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Rue+de+l%E2%80%99Industrie+23+CH-1950+Sion&amp;amp;zoom=18&amp;amp;minlon=7.531540989875794&amp;amp;minlat=46.281196840233356&amp;amp;maxlon=7.539721727371217&amp;amp;maxlat=46.284789245990105#map=19/46.227406/7.364530" rel="noopener noreferrer"&gt;Sion&lt;/a&gt;, &lt;a href="https://www.openstreetmap.org/search?query=Rte+de+l%E2%80%99Ile-au-bois+1A+CH-1870+Monthey&amp;amp;zoom=19&amp;amp;minlon=7.362484037876129&amp;amp;minlat=46.22650686003674&amp;amp;maxlon=7.366574406623841&amp;amp;maxlat=46.22830488455397#map=19/46.255166/6.959435" rel="noopener noreferrer"&gt;Monthey&lt;/a&gt;, &lt;a href="https://www.openstreetmap.org/search?query=Rottenstrasse+7+CH-3930+Visp&amp;amp;zoom=19&amp;amp;minlon=6.957390010356904&amp;amp;minlat=46.25426854408304&amp;amp;maxlon=6.961480379104615&amp;amp;maxlat=46.25606565905297#map=19/46.296186/7.882809" rel="noopener noreferrer"&gt;Visp&lt;/a&gt;): startup park ecosystem. They can be followed on &lt;a href="https://www.linkedin.com/company/bioark-sa/?viewAsMember=true" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt; and &lt;a href="https://www.youtube.com/@bioark-valais/about" rel="noopener noreferrer"&gt;youtube&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://swissdigitalcenter.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;Swiss Digital Center&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=46.2829863+7.5356192%2C17&amp;amp;zoom=16&amp;amp;minlon=7.512266635894776&amp;amp;minlat=46.28177520010319&amp;amp;maxlon=7.552499771118165&amp;amp;maxlat=46.29614325807839#map=18/46.282993/7.535631" rel="noopener noreferrer"&gt;Sierre&lt;/a&gt;): conference rooms, working space and coworking;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.microcity.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;Microcity&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Espace+de+l%27Europe+2+2000+Neuch%C3%A2tel&amp;amp;zoom=19&amp;amp;minlon=7.597201466560365&amp;amp;minlat=47.487951633355394&amp;amp;maxlon=7.601291835308076&amp;amp;maxlat=47.48970790675124#map=19/46.996413/6.936876" rel="noopener noreferrer"&gt;Neuchâtel&lt;/a&gt;): accelerate projects, from the concepts to the market. They are connecting experts, partners, financing and opportunity together. They can be followed on &lt;a href="https://www.linkedin.com/company/microcity-pole-d-innovation-neuchatel/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.swissparks.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;SwissPark&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Christoph+Merian-Ring+11%2C+4153+Reinach%2C+CH&amp;amp;zoom=14&amp;amp;minlon=7.5284671783447275&amp;amp;minlat=47.47086432451271&amp;amp;maxlon=7.659358978271485&amp;amp;maxlat=47.527054225792796#map=19/47.488830/7.599246" rel="noopener noreferrer"&gt;Reinach&lt;/a&gt;): exchanges of experience, workshops and seminars. They can be followed on &lt;a href="https://www.linkedin.com/company/swissparks-ch/about/" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://prefix.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;Prefix&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Ste-H%C3%A9l%C3%A8ne+26+CH-2000+Neuch%C3%A2tel&amp;amp;zoom=19&amp;amp;minlon=6.6407713294029245&amp;amp;minlat=46.76496571530757&amp;amp;maxlon=6.644861698150636&amp;amp;maxlat=46.76674602342328#map=19/47.006614/6.957355" rel="noopener noreferrer"&gt;Neuchâtel&lt;/a&gt;): offers a place to work differently, with training, workshops and mentoring. More info on &lt;a href="https://www.youtube.com/@PrefixOrganisationIntelligence" rel="noopener noreferrer"&gt;youtube&lt;/a&gt; and &lt;a href="//www.linkedin.com/company/prefix-intelligence-organisationnelle/"&gt;linkedin&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://laforge-incubator.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;La Forge&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://plan.epfl.ch/?dim_floor=99&amp;amp;lang=en&amp;amp;dim_lang=en&amp;amp;tree_groups=centres_nevralgiques_grp%2Cmobilite_acces_grp%2Crestauration_et_commerces_grp%2Censeignement%2Cservices_campus_grp%2Cequipements_grp&amp;amp;tree_group_layers_centres_nevralgiques_grp=&amp;amp;tree_group_layers_mobilite_acces_grp=metro&amp;amp;tree_group_layers_restauration_et_commerces_grp=&amp;amp;tree_group_layers_enseignement=guichet_etudiants&amp;amp;tree_group_layers_services_campus_grp=information_epfl&amp;amp;tree_group_layers_equipements_grp=&amp;amp;baselayer_ref=grp_backgrounds" rel="noopener noreferrer"&gt;Lausanne&lt;/a&gt;): an incubator offering a coworking place, demo days, coaching, thematic workshops and a supporting community. They can be followed on &lt;a href="https://www.youtube.com/@epfl-innovationpark" rel="noopener noreferrer"&gt;youtube&lt;/a&gt; or &lt;a href="https://ch.linkedin.com/company/laforgeincubator" rel="noopener noreferrer"&gt;linkedin&lt;/a&gt;. Interesting startups: &lt;a href="https://vispo.eu/" rel="noopener noreferrer"&gt;vispo&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://y-parc.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;Y-parc&lt;/strong&gt;&lt;/a&gt; (&lt;a href="https://www.openstreetmap.org/search?query=Av.+des+D%C3%A9couvertes+3+CH-1400+Yverdon-les-Bains&amp;amp;zoom=6&amp;amp;minlon=-18.391113281250004&amp;amp;minlat=38.61687046392973&amp;amp;maxlon=22.8076171875&amp;amp;maxlat=53.291489065300226#map=19/46.765855/6.642346" rel="noopener noreferrer"&gt;Yverdon-les-Bains&lt;/a&gt;): &lt;a href="https://y-parc.ch/y-start/" rel="noopener noreferrer"&gt;Y-start&lt;/a&gt; is a generalist technological public incubator  created for the startup and offers a coworking place. More information about them can be found on their &lt;a href="https://www.youtube.com/channel/UC-Z32olaYtihH1g8sXMzRqA/videos" rel="noopener noreferrer"&gt;youtube channel&lt;/a&gt; or &lt;a href="https://www.linkedin.com/company/y-parc-sa/" rel="noopener noreferrer"&gt;linkedin profile&lt;/a&gt;. Few interesting success story: &lt;a href="https://y-parc.ch/entreprises-details/?ID=5071" rel="noopener noreferrer"&gt;Bacula&lt;/a&gt;, &lt;a href="https://y-parc.ch/entreprises-details/?ID=5182&amp;amp;from_page=3" rel="noopener noreferrer"&gt;Kryptus&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This list is far from complete, and some informations must be collected (e.g. mission/focus, eligibility, structure, time commitment, cost, terms, track record, reputation, network, contacts...). More VCs and incubators can be found on &lt;a href="https://incubatorlist.com/?ref=betalist" rel="noopener noreferrer"&gt;incubator list&lt;/a&gt;. Not sure if the database is complete though, but ~244 entities are listed in Switzerland. To check as well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="//www.bni.com/country/switzerland-en/"&gt;&lt;strong&gt;BNI Switzerland&lt;/strong&gt;&lt;/a&gt;: international business/entrepreneur club;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.dynabuy.fr/" rel="noopener noreferrer"&gt;&lt;strong&gt;Dynabuy&lt;/strong&gt;&lt;/a&gt;: another business network;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cvci.ch/reseauter/business-club" rel="noopener noreferrer"&gt;&lt;strong&gt;CVCI Business Club&lt;/strong&gt;&lt;/a&gt;:  a local business club in Vaud;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://fbnswitzerland.ch/" rel="noopener noreferrer"&gt;&lt;strong&gt;FBN Switzerland&lt;/strong&gt;&lt;/a&gt;: largest business network in switzerland.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's not even done. Creating a company in Switzerland is probably a bit different due to the cantons (small regions) where the taxes and rules are kinda different. Before looking on that point, perhaps reading few articles on that can help:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.startup-campus.ch/how-to-start-a-startup-in-switzerland-the-complete-guide-for-early-stage-founders/" rel="noopener noreferrer"&gt;&lt;strong&gt;How to Start a Startup in Switzerland: The Complete Guide for Early-Stage Founders&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.startups.ch/en/blog/setting-up-a-company-in-switzerland-a-complete-guide" rel="noopener noreferrer"&gt;&lt;strong&gt;Setting up a company in Switzerland: a complete guide&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://blog.mean.ceo/how-to-launch-a-startup-in-switzerland/" rel="noopener noreferrer"&gt;&lt;strong&gt;How to Launch a Startup in Switzerland | Ultimate Guide For Startups | 2026 EDITION&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.expat.com/en/guide/europe/switzerland/10473-setting-up-a-business-in-switzerland.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Starting a business in Switzerland&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://studyinginswitzerland.com/how-to-start-a-business-in-switzerland/" rel="noopener noreferrer"&gt;&lt;strong&gt;How To Start a Business in Switzerland: The Ultimate Guide&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another idea is to start the concept in France and then relocate it in Switzerland. I don't think it will be easy, but it will perhaps less risky. If the project does not work in France, it will probably not work in Switzerland.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.nexova.ch/en/business-management/moving-a-company-to-switzerland/" rel="noopener noreferrer"&gt;&lt;strong&gt;What to Consider When Moving Your Company to Switzerland&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.swisscompany.com/en/relocate-company-switzerland-checklist/" rel="noopener noreferrer"&gt;&lt;strong&gt;Relocating Your Business to Switzerland in 10 Steps&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.alpvera.ch/blog/how-to-move-your-business-to-switzerland-a-full-migration-guide" rel="noopener noreferrer"&gt;&lt;strong&gt;How to Move Your Business to Switzerland: A Full Migration Guide&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, it's time to work (again) on the PoC and think a bit about the business plan/pitch. I think also looking for an incubator close to my current living place could also be a great choice if I can't go to Switzerland for some reasons.&lt;/p&gt;

&lt;p&gt;This week was really dedicated to understand how the Dart file management was working. In fact, it started by a small example using CBOR (minimalist local data store), but it was hard to find something one the web about this part of Dart. So, writing a more complete article on this part of the language was kinda important.&lt;/p&gt;

&lt;p&gt;Another article on Elixir/Phoenix should be ready for the next week. &lt;/p&gt;

&lt;h1&gt;
  
  
  Coding
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://yui.dev/blog/minesweeper-in-247-bytes" rel="noopener noreferrer"&gt;&lt;strong&gt;The Depths of JavaScript: Minesweeper in 247 Bytes&lt;/strong&gt;&lt;/a&gt;:  even if you don't like JavaScript (like me), you should recognize &lt;a href="https://jsfiddle.net/1jotkx2h/latest/" rel="noopener noreferrer"&gt;elite code&lt;/a&gt; when you see it. Coding a minesweeper in 247 bytes is cool.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/MobAI-App/simslim" rel="noopener noreferrer"&gt;&lt;strong&gt;simslim project&lt;/strong&gt;&lt;/a&gt;: Run a lot more iOS simulators on one Mac by turning off the background daemons a simulator doesn't need. A freshly booted iOS simulator starts around 180 background services: Siri, Spotlight indexing, photo analysis, News, wallpaper posters, iCloud sync, and so on. None of it matters when you're using the simulator for development, testing, or CI. simslim switches those services off, which cuts each simulator's memory roughly 4x. On the same laptop you go from a handful of simulators to a screenful.&lt;/p&gt;

&lt;p&gt;🏛️ &lt;a href="https://courses.csail.mit.edu/6.851/spring21/" rel="noopener noreferrer"&gt;&lt;strong&gt;6.851: Advanced Data Structures (Spring'21)&lt;/strong&gt;&lt;/a&gt;: a list of advanced data structures, the &lt;a href="https://courses.csail.mit.edu/6.851/spring21/lectures/" rel="noopener noreferrer"&gt;lectures&lt;/a&gt; are available for free.&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://opendatastructures.org/" rel="noopener noreferrer"&gt;&lt;strong&gt;Open Data Structures&lt;/strong&gt;&lt;/a&gt;: a book listing data structures in &lt;a href="https://opendatastructures.org/ods-python.pdf" rel="noopener noreferrer"&gt;pseudocode&lt;/a&gt;, &lt;a href="https://opendatastructures.org/ods-java.pdf" rel="noopener noreferrer"&gt;java&lt;/a&gt; and &lt;a href="https://opendatastructures.org/ods-cpp.pdf" rel="noopener noreferrer"&gt;c++&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📖 &lt;a href="https://eyereasoner.github.io/eyeprolog/the-art-of-eyeprolog" rel="noopener noreferrer"&gt;&lt;strong&gt;The Art of EyeProlog - ISO Prolog with inspectable proof&lt;/strong&gt;&lt;/a&gt;: a complete book about &lt;a href="https://github.com/eyereasoner/eyeprolog" rel="noopener noreferrer"&gt;EyeProlog&lt;/a&gt;, from beginners to expert. The amount of exercises and examples is awesome (the answers are available as well).&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://jigsaw.hexdocs.pm/readme.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Jigsaw project&lt;/strong&gt;&lt;/a&gt;: a proof of concept for a layout tiling library for Phoenix Liveview. It is inspired by BSP-style desktop tiling layouts such as Hyprland's Dwindle layout, but applies the same model to arbitrary Phoenix LiveView content.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.gingerbill.org/article/2026/08/20/designing-odins-inline-asm/" rel="noopener noreferrer"&gt;&lt;strong&gt;Everyone Says Assembly Is Untyped—Everyone Is Wrong&lt;/strong&gt;&lt;/a&gt;: an article on &lt;a href="https://odin-lang.org/" rel="noopener noreferrer"&gt;Odin&lt;/a&gt; inline assembly feature design, and comparing it to other languages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.gingerbill.org/article/2019/02/01/memory-allocation-strategies-001/" rel="noopener noreferrer"&gt;&lt;strong&gt;Memory Allocation Strategies - Part 1&lt;/strong&gt;&lt;/a&gt;: a series of article on Memory Allocation, including garbage collector, automatic reference counting, and ownership semantics.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gingerbill.org/article/2019/02/08/memory-allocation-strategies-002/" rel="noopener noreferrer"&gt;Memory Allocation Strategies - Part 2&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gingerbill.org/article/2019/02/15/memory-allocation-strategies-003/" rel="noopener noreferrer"&gt;Memory Allocation Strategies - Part 3&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gingerbill.org/article/2019/02/16/memory-allocation-strategies-004/" rel="noopener noreferrer"&gt;Memory Allocation Strategies - Part 4&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gingerbill.org/article/2021/11/30/memory-allocation-strategies-005/" rel="noopener noreferrer"&gt;Memory Allocation Strategies - Part 5&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gingerbill.org/article/2021/12/02/memory-allocation-strategies-006/" rel="noopener noreferrer"&gt;Memory Allocation Strategies - Part 6&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📝 &lt;a href="https://spawn-queue.acm.org/doi/10.1145/3212477.3212479" rel="noopener noreferrer"&gt;&lt;strong&gt;C Is Not a Low-level Language: Your computer is not a fast PDP-11.&lt;/strong&gt;&lt;/a&gt;: a post explaining why C is not a low-level language. C was created on PDP-11 and was mapping on some of its native instructions. It's interesting to see the hardware, especially the CPU, was designed also to run fast C code. I quote the last paragraph:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is a common myth in software development that parallel programming is hard. This would come as a surprise to Alan Kay, who was able to teach an actor-model language to young children, with which they wrote working programs with more than 200 threads. It comes as a surprise to Erlang programmers, who commonly write programs with thousands of parallel components. It’s more accurate to say that parallel programming in a language with a C-like abstract machine is difficult, and given the prevalence of parallel hardware, from multicore CPUs to many-core GPUs, that’s just another way of saying that C doesn’t map to modern hardware very well.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/watch?v=Ru1t1BhZHag" rel="noopener noreferrer"&gt;** The Best Programming Exercise Was the One I Hated the Most **&lt;/a&gt;: a video by The Palindrome, &lt;a href="https://thepalindrome.org/p/coding-on-paper-a62" rel="noopener noreferrer"&gt;the post&lt;/a&gt; is also available on his blog. It talks about writing code on paper, and why it's important to do it.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.erlang-solutions.com/blog/how-to-use-lua-for-flexible-configurations-in-erlang-and-elixir/" rel="noopener noreferrer"&gt;&lt;strong&gt;How to use Lua for flexible configurations in Erlang and Elixir&lt;/strong&gt;&lt;/a&gt;: an example of Lua code running on the BEAM using &lt;a href="https://luerl.org/" rel="noopener noreferrer"&gt;luerl&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  System
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://netflixtechblog.com/mount-mayhem-at-netflix-scaling-containers-on-modern-cpus-f3b09b68beac" rel="noopener noreferrer"&gt;&lt;strong&gt;Mount Mayhem at Netflix: Scaling Containers on Modern CPUs&lt;/strong&gt;&lt;/a&gt;: I thought Netflix was massively using FreeBSD (probably on the network side), but it seems they are using Linux and Kubernetes as well. Anyway, in short: (1) disabling hyperthreading improves containers launch (avoid shared resources competition), (2) learn how your CPU is dealing with its cache, (3) run benchmarks to have metrics, evaluate the changes (see &lt;a href="https://github.com/Netflix/global-lock-bench" rel="noopener noreferrer"&gt;&lt;code&gt;global-lock-bench&lt;/code&gt;&lt;/a&gt; project) and find the issue (here it's a global lock), (4) test newest kernels and update the application to use modern syscall.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://linux.slashdot.org/story/26/08/31/0222236/multikernel-linux-tree-released-runs-multiple-kernels-on-bare-metal-without-a-hypervisor" rel="noopener noreferrer"&gt;&lt;strong&gt;Multikernel Linux Tree Released: Runs Multiple Kernels On Bare Metal Without a Hypervisor&lt;/strong&gt;&lt;/a&gt;: a way to run multi-linux kernel on one host. One kernel can have its own CPU, RAM and GPU. See also the &lt;a href="https://lore.kernel.org/lkml/ao34RJ7aZ2BLd67S@pop-os.localdomain/" rel="noopener noreferrer"&gt;announce&lt;/a&gt; from lklm.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/wintermeyer/abuuba" rel="noopener noreferrer"&gt;&lt;strong&gt;abuuda project&lt;/strong&gt;&lt;/a&gt;: A fast &lt;a href="https://fediverse.center/page/collaboration/home" rel="noopener noreferrer"&gt;fediverse&lt;/a&gt; server in Elixir and Phoenix that speaks Mastodon's protocols. Always at least 12x faster than &lt;a href="https://github.com/mastodon/mastodon" rel="noopener noreferrer"&gt;Mastodon&lt;/a&gt;. Drop-in replacement for it. Based on the &lt;a href="https://abuuba.com/" rel="noopener noreferrer"&gt;official website&lt;/a&gt;, way more faster than Mastodon.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/namazso/PawnIO" rel="noopener noreferrer"&gt;&lt;strong&gt;PawnIO project&lt;/strong&gt;&lt;/a&gt;:  PawnIO is a scriptable universal kernel driver, allowing hardware access to a wide variety of programs. It uses the Pawn scripting language and the PawnPP interpreter. When installed, any software implementing PawnIO modules can use the driver to access or control hardware supported by one of the official modules. &lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/watch?v=kMYgTJkZlEQ&amp;amp;feature=youtu.be" rel="noopener noreferrer"&gt;&lt;strong&gt;FreeBSD - using LLMs for fun and profit&lt;/strong&gt;&lt;/a&gt;: a new series about FreeBSD. I hate the LLMs part, but who knows, perhaps someday people will stop using that and learning the old way will become cool again.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://blog.codingconfessions.com/p/virtual-memory" rel="noopener noreferrer"&gt;&lt;strong&gt;Virtual Memory From First Principles&lt;/strong&gt;&lt;/a&gt;: Virtual memory is a complex topic on computer science. This very long article goes very deep there, by listing all the features the virtual memory must accomplish. I like the way it's explaining, using a dialog between the kernel and the allocator. A must read. It also covers some part of virtual memory I did not know, like NUMA. I will try to re-read it soon, because it contains so many details...&lt;/p&gt;

&lt;h1&gt;
  
  
  Database
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/dragonflydb/dragonfly" rel="noopener noreferrer"&gt;&lt;strong&gt;dragonflydb project&lt;/strong&gt;&lt;/a&gt;: a modern replacement for Redis and Memcached. Fully compatible with Redis and Memcached APIs, Dragonfly requires no code changes to adopt. Compared to legacy in-memory datastores, Dragonfly delivers 25X more throughput, higher cache hit rates with lower tail latency, and can run on up to 80% less resources for the same sized workload.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/NationalSecurityAgency/ghidra" rel="noopener noreferrer"&gt;&lt;strong&gt;Ghidra project&lt;/strong&gt;&lt;/a&gt;: a software reverse engineering (SRE) framework created and maintained by the National Security Agency Research Directorate. This framework includes a suite of full-featured, high-end software analysis tools that enable users to analyze compiled code on a variety of platforms including Windows, macOS, and Linux.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://xeiaso.net/talks/2025/bsdcan-anubis/" rel="noopener noreferrer"&gt;&lt;strong&gt;I fight bots in my free time&lt;/strong&gt;&lt;/a&gt;: after reading &lt;a href="https://anubis.techaro.lol/" rel="noopener noreferrer"&gt;Anubis&lt;/a&gt; was easy to bypass in a &lt;a href="https://x.com/slendidev/status/2094810872271061183?s=20" rel="noopener noreferrer"&gt;tweet&lt;/a&gt; on X/twitter, I started to investigate a bit. Indeed, &lt;a href="https://www.sentinelone.com/vulnerability-database/cve-2026-62314/" rel="noopener noreferrer"&gt;CVE-2026-62314&lt;/a&gt; allowed an attacker with a crafted header to bypass the check and this bug has been &lt;a href="https://github.com/TecharoHQ/anubis/security/advisories/GHSA-6wcg-mqvh-fcvg" rel="noopener noreferrer"&gt;fixed&lt;/a&gt; since. The 1.22.0 &amp;lt;= version &amp;lt; 1.26 are impacted by this issue and a workaround exists. &lt;a href="https://cvefeed.io/vuln/detail/CVE-2025-24369" rel="noopener noreferrer"&gt;CVE-2025-24369&lt;/a&gt; is another issue where the check can be bypassed when asking a difficulty 0 challenge. At this time, &lt;a href="https://github.com/TecharoHQ/anubis/security" rel="noopener noreferrer"&gt;5 security issues are displayed on their Github Security Policy page&lt;/a&gt;. To me, Anubis seems to be a good open-source tool, but like all open-source software, using the latest version is sometime the best to do. More information about Anubis can be read on &lt;a href="https://lwn.net/Articles/1028558/" rel="noopener noreferrer"&gt;lwn.net&lt;/a&gt; or &lt;a href="https://news.ycombinator.com/item?id=43427679" rel="noopener noreferrer"&gt;ycombinator&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;📖 &lt;a href="https://nostarch.com/zero-day" rel="noopener noreferrer"&gt;&lt;strong&gt;From Day Zero to Zero Day, A Hands-On Guide to Vulnerability Research&lt;/strong&gt;&lt;/a&gt;: perhaps a good alternative to the marvelous the book of Erickson, &lt;a href="https://nostarch.com/hacking2.htm" rel="noopener noreferrer"&gt;Hacking The Art of Exploitation&lt;/a&gt;? Another book to read.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/cryptography
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/husamabdel/ultralight-AES" rel="noopener noreferrer"&gt;&lt;strong&gt;ultralight-AES project&lt;/strong&gt;&lt;/a&gt;: A minimal, readable implementation of AES-128 in ECB mode: the whole cipher, encrypt and decrypt, in about 85 lines of plain C. One file, no dependencies, no lookup tables pasted in from somewhere else.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://pilcrowonpaper.com/blog/14" rel="noopener noreferrer"&gt;&lt;strong&gt;Is Argon2 actually better than Bcrypt?&lt;/strong&gt;&lt;/a&gt;: &lt;a href="https://en.wikipedia.org/wiki/Argon2" rel="noopener noreferrer"&gt;Argon2&lt;/a&gt; is better than &lt;a href="https://en.wikipedia.org/wiki/Bcrypt" rel="noopener noreferrer"&gt;Bcrypt&lt;/a&gt;. Bcrypt is a the older way to store password using a PBKDF. It's not even a surprise, Argon2 won its place in 2015, Argon2id is also specified in &lt;a href="https://www.rfc-editor.org/info/rfc9106/" rel="noopener noreferrer"&gt;RFC 9106&lt;/a&gt;. On the other hand, bcrypt function has been firstly published in 1999, in a totally different environment (parallelism was hard, memory was costly, and not a lot of people got access to FPGAs/ASICs). I don't even know if bcrypt was specified somewhere, outside of the &lt;a href="https://www.usenix.org/legacy/events/usenix99/provos/provos.pdf" rel="noopener noreferrer"&gt;paper announcing it&lt;/a&gt;. In doubt, if you don't know what to choice, you can follow the &lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html" rel="noopener noreferrer"&gt;OWASP rules&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use &lt;code&gt;Argon2id&lt;/code&gt; with a minimum configuration of &lt;strong&gt;19 MiB of memory&lt;/strong&gt;, an &lt;strong&gt;iteration count of 2&lt;/strong&gt;, and &lt;strong&gt;1 degree of parallelism&lt;/strong&gt;. If &lt;code&gt;Argon2id&lt;/code&gt; is not available, use &lt;code&gt;scrypt&lt;/code&gt; with a minimum CPU/memory cost parameter of (2^17), a minimum block size of 8 (1024 bytes), and a parallelization parameter of 1. For legacy systems using &lt;code&gt;bcrypt&lt;/code&gt;, use a work factor of 10 or more and with a password limit of 72 bytes. [...] The &lt;code&gt;bcrypt&lt;/code&gt; password hashing function &lt;strong&gt;should only be used for password storage in legacy systems where &lt;code&gt;Argon2&lt;/code&gt; and &lt;code&gt;scrypt&lt;/code&gt; are not available&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Security/BlueTeam
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://hackers-arise.com/building-a-pocket-wi-fi-threat-detector/" rel="noopener noreferrer"&gt;&lt;strong&gt;Building a Pocket Wi-Fi Threat Detector&lt;/strong&gt;&lt;/a&gt;: an article about the &lt;a href="https://github.com/simeononsecurity/esp32-wifi-canary" rel="noopener noreferrer"&gt;&lt;code&gt;Travel WiFi Canary project&lt;/code&gt;&lt;/a&gt;. Here the description from github: Monitors the 2.4 GHz WiFi environment and lights the RGB LED when it observes patterns associated with common wireless threats: evil-twin access points, deauthentication attacks, Pwnagotchi wardrivers, WiFi Pineapple hardware, security downgrades, and beacon floods.&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://arxiv.org/pdf/2609.00954" rel="noopener noreferrer"&gt;&lt;strong&gt;Influence of Logging Frameworks on Bind9&lt;/strong&gt;&lt;/a&gt;: logs are the main bottleneck in an IPS pipeline. To fix that, they have created FIPS IPC. To check and test.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/RedTeam
&lt;/h1&gt;

&lt;p&gt;🌐 &lt;a href="https://app.agniops.in/" rel="noopener noreferrer"&gt;&lt;strong&gt;AGNITracker&lt;/strong&gt;&lt;/a&gt;: a tool to find subdomains. One can find more information by reading the &lt;a href="https://app.agniops.in/docs" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;. Not sure if the following API will stay alive for a long period of time, but here one open end-point to do search for sub domains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;curl &lt;span class="nt"&gt;-qs&lt;/span&gt; &lt;span class="s2"&gt;"https://app.agniops.in/v1/search?domain=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;domain&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📝 &lt;a href="https://recursion.wtf/posts/claude-opus-cbrne-bypass/" rel="noopener noreferrer"&gt;&lt;strong&gt;How I Bypassed Claude Opus’s CBRN-E Safeguards&lt;/strong&gt;&lt;/a&gt;: the stories around LLMs jailbreaks amaze me every time. This is publication is explaining another process to bypass the protections on anthropic LLM.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/huhusmang/Awesome-LLMs-for-Vulnerability-Detection" rel="noopener noreferrer"&gt;&lt;strong&gt;Awesome Large Language Models for Vulnerability Detection&lt;/strong&gt;&lt;/a&gt;: A curated list of papers, projects, and agent skills on using LLMs for vulnerability detection and discovery.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/martin-olivier/airgorah" rel="noopener noreferrer"&gt;&lt;strong&gt;airgorah project&lt;/strong&gt;&lt;/a&gt;:  A WiFi security auditing software mainly based on aircrack-ng tools suite, and written in &lt;a href="https://crates.io/crates/airgorah" rel="noopener noreferrer"&gt;Rust&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/Whispergate/Erebus" rel="noopener noreferrer"&gt;&lt;strong&gt;Erebus project&lt;/strong&gt;&lt;/a&gt;: Erebus is a modern initial access wrapper aimed at decreasing the development to deployment time, when preparing for intrusion operations. Erebus comes with multiple techniques out of the box to craft complex chains, and assist in bypassing the toughest security measures.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://hackers-arise.com/bluetooth-hacking-and-security-the-whisperpair-exploit-and-bluehood-surveillance/" rel="noopener noreferrer"&gt;&lt;strong&gt;Bluetooth Hacking and Security: The WhisperPair Exploit and Bluehood Surveillance&lt;/strong&gt;&lt;/a&gt;: an article showing how to use &lt;a href="https://github.com/Bazskillz/WhisperPair-PoC" rel="noopener noreferrer"&gt;whiperpair&lt;/a&gt; exploit (android) and recover the connection key. It also introduces &lt;a href="https://github.com/dannymcc/bluehood.git" rel="noopener noreferrer"&gt;&lt;code&gt;bluehood&lt;/code&gt;&lt;/a&gt; scanner.&lt;/p&gt;

&lt;h1&gt;
  
  
  Embedded
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://burariweb.info/electronic-work/pogo-pin-probe-production.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Pogo Pin (ポゴピン) Probe&lt;/strong&gt;&lt;/a&gt;: every single time I saw a post in Japanese talking about embedded systems or electronics, it proves Japanese hobbyists are different. Anyway, the idea here is to create  a &lt;a href="https://en.wikipedia.org/wiki/Pogo_pin" rel="noopener noreferrer"&gt;Pogo Pin&lt;/a&gt;-like cable ready for production. I did not understand everything though, my level of Japanese is not ready for that yet.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.digikey.com/en/maker/tutorials/2024/op-amp-wonders-circuit-secrets-revealed" rel="noopener noreferrer"&gt;&lt;strong&gt;Op-Amp Wonders: Circuit Secrets Revealed!&lt;/strong&gt;&lt;/a&gt;: reminds me when I was in electronics. Painful souvenirs.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/awemorris/cbus-fpga-board" rel="noopener noreferrer"&gt;&lt;strong&gt;cpu-fpga-board project&lt;/strong&gt;&lt;/a&gt;: NEC PC-9800 C-Bus FPGA Board Design &lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.cnx-software.com/2026/09/05/opentrailpaper-transforms-lilygo-t5-e-paper-s3-pro-devkit-into-a-diy-e-paper-bike-computer/" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenTrailPaper transforms LILYGO T5 E-Paper S3 Pro devkit into a DIY e‑paper bike computer&lt;/strong&gt;&lt;/a&gt;: e-paper devices are so great! Here a great example of what one can do with an ESP32 and one e-ink screen.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.digikey.com/en/maker/tutorials/2024/how-to-implement-a-software-based-debounce-algorithm-for-button-inputs-on-a-microcontroller" rel="noopener noreferrer"&gt;&lt;strong&gt;How to Implement a Software-Based Debounce Algorithm for Button Inputs on a Microcontroller&lt;/strong&gt;&lt;/a&gt;: a succinct article about debounce algorithm using arduino-like board, and you know what, they are also mentioning FSM.&lt;/p&gt;

&lt;h1&gt;
  
  
  Update/Upgrade
&lt;/h1&gt;

&lt;p&gt;🔄 &lt;a href="https://www.qubes-os.org/news/2026/08/28/qsb-117/" rel="noopener noreferrer"&gt;&lt;strong&gt;QSB-117: Intel CPU firmware vulnerabilities&lt;/strong&gt;&lt;/a&gt;: many fixes regarding Intel CPU microcode&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://9to5linux.com/openssl-4-0-2-released-with-important-security-and-bug-fixes" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenSSL 4.0.2 Released with Important Security and Bug Fixes&lt;/strong&gt;&lt;/a&gt;: [...] a heap buffer overflow in CMS key unwrapping (CVE-2026-63072), excessive memory use buffering DTLS records (CVE-2026-54874), and a client-side memory leak in OCSP response checking (CVE-2026-54876).&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://github.com/erlang/otp/releases/tag/OTP-29.0.6" rel="noopener noreferrer"&gt;&lt;strong&gt;Erlang/OTP 29.0.6 released&lt;/strong&gt;&lt;/a&gt;: many bugs fixes, including one CVE. &lt;a href="https://nvd.nist.gov/vuln/detail/CVE-2026-75538" rel="noopener noreferrer"&gt;CVE-2026-75538&lt;/a&gt; can remotely crash an Erlang node using a crafted TCP packet&lt;/p&gt;

&lt;h1&gt;
  
  
  Mathematics
&lt;/h1&gt;

&lt;p&gt;📑 &lt;a href="https://arxiv.org/pdf/0904.1556" rel="noopener noreferrer"&gt;&lt;strong&gt;The Algebra of Grand Unified Theories&lt;/strong&gt;&lt;/a&gt;: just because.&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://arxiv.org/pdf/1512.06808" rel="noopener noreferrer"&gt;&lt;strong&gt;GAME THEORY, An open access textbook with 165 solved exercises&lt;/strong&gt;&lt;/a&gt;: mathematical introduction to game theory.&lt;/p&gt;

&lt;h1&gt;
  
  
  Hardware
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://books.quikbox.com/books/maintenance/page/blink-codes-and-beep-codes-for-intel-nuc" rel="noopener noreferrer"&gt;&lt;strong&gt;Blink Codes and Beep Codes for Intel® NUC&lt;/strong&gt;&lt;/a&gt;: I recently acquired few NUCs to have my own CI/CD building pipeline at home (we will talk about that later). I don't need crazy things, and while looking for refurbished ones, few of them are being sold as dead. Most of the computers have some visual or sound patterns to explain the problem. This link is listing few of them. I learnt it can be customized (&lt;a href="https://www.intel.com/content/www/us/en/support/articles/000023554/intel-nuc/intel-nuc-mini-pcs.html" rel="noopener noreferrer"&gt;Power Button LED and Ring LED Settings on Intel® NUC Kits&lt;/a&gt;). A more accurate document can be &lt;a href="https://community.intel.com/cipcp26785/attachments/cipcp26785/software-tuning-perf-optimization/8443/2/Port%2080h%20POST%20Codes%20for%20Intel%20NUCs.docx" rel="noopener noreferrer"&gt;downloaded&lt;/a&gt;, containing a summary of all the codes available. I created a &lt;a href="https://gist.github.com/niamtokik/4cbe12004ed49549e53c266311c6ae4a" rel="noopener noreferrer"&gt;public gist&lt;/a&gt; to store those informations in case the document is removed in the future.&lt;/p&gt;

&lt;h1&gt;
  
  
  Misc
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href=""&gt;&lt;strong&gt;Crafting “Crafting Interpreters”&lt;/strong&gt;&lt;/a&gt;: author timeline and advice. One of the title section is a great summary: "Writing is suffering", this is how I feel when I start a new article or a book project (I never ended one of them). Anyway, great feedback. Must read.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/veorq/Plaintext/" rel="noopener noreferrer"&gt;&lt;strong&gt;Plaintext editor&lt;/strong&gt;&lt;/a&gt;: a simple text editor created and &lt;a href="https://www.bfswa.blog/p/plaintext" rel="noopener noreferrer"&gt;announced&lt;/a&gt; by JP Aumasson.&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://arxiv.org/abs/2608.18359" rel="noopener noreferrer"&gt;&lt;strong&gt;0xPass: A Secure Protocol for Universal Cross-Chain Accounts&lt;/strong&gt;&lt;/a&gt;: a description of the 0xPass platform.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.icij.org/investigations/coin-laundry/canada-revokes-dozens-of-crypto-firms-registrations/" rel="noopener noreferrer"&gt;&lt;strong&gt;Canada revokes dozens of crypto firms’ registrations&lt;/strong&gt;&lt;/a&gt;: Anti-money laundering authorities in Canada have revoked registrations of nearly three dozen cryptocurrency businesses [...] Many of these businesses specialize in converting cryptocurrency to physical cash. The Star story, part of ICIJ’s Coin Laundry investigation into dirty money in cryptocurrency, identified a single thoroughfare with 50 businesses advertising crypto services, most of which appeared to be operating unlawfully.&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://arxiv.org/pdf/2512.15567" rel="noopener noreferrer"&gt;&lt;strong&gt;Evaluating Large Language Models in Scientific Discovery&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://x.com/niamtokik/status/2092651935291564263?s=20" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft5ws4gb4seiqgi51v2dv.png" alt="Without Root access right?" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/niamtokik/status/2091542754476056759?s=20" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx1lr1vbvwa5dapk6k4od.png" alt="I am using OpenBSD. We Are Not the Same" width="476" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/niamtokik/status/2088944694680035662?s=20" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi8d2hx66qgcfs3g4om3w.png" alt="JSON &amp;amp; TOON vs CBOR" width="500" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/niamtokik/status/1786352321007321584?s=20" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fag3f4sbho8xdbw63x4yw.png" alt="Erlang with ETS and Mnesia" width="500" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://x.com/niamtokik/status/1785399051891900436" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fft2xplag6mvdm2ppw5v9.png" alt="Erlang Punch Saitama" width="360" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbu32whclj089gls32hce.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbu32whclj089gls32hce.png" alt=" " width="680" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fodjgwd9foplyu6s3gr2h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fodjgwd9foplyu6s3gr2h.png" alt=" " width="680" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp4elhigomen6t7lo2rf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp4elhigomen6t7lo2rf8.png" alt=" " width="680" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe7lsn7bg7ve5k9i507l2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe7lsn7bg7ve5k9i507l2.png" alt=" " width="680" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffk6oo5ts48w81sxsr75l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffk6oo5ts48w81sxsr75l.png" alt=" " width="680" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyjqrkflp74zi4whanoro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyjqrkflp74zi4whanoro.png" alt=" " width="679" height="641"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9qj2qzvm5d6uggmld3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9qj2qzvm5d6uggmld3p.png" alt="How to exit vim" width="585" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58kk9o78uhs7b8e4c2a0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58kk9o78uhs7b8e4c2a0.png" alt="difference between 0, null and undefined" width="640" height="327"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@katiemoum?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Katie Moum&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/orange-and-yellow-dried-leaves-on-tree-DLNoV-SFQ-U?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>weekly</category>
      <category>review</category>
      <category>link</category>
      <category>followup</category>
    </item>
    <item>
      <title>File Handlers Management in Dart</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Fri, 04 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/file-handlers-management-in-dart-36a1</link>
      <guid>https://dev.to/niamtokik/file-handlers-management-in-dart-36a1</guid>
      <description>&lt;p&gt;In a previous article, the &lt;code&gt;File&lt;/code&gt; object has been dissected. It's a perfect interface to use if one needs to write or read small files. When it comes to more complex or bigger files, using a file handler is necessary. The following code snippets will &lt;a href="https://api.dart.dev/dart-io/" rel="noopener noreferrer"&gt;&lt;code&gt;dart:io&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-convert/" rel="noopener noreferrer"&gt;&lt;code&gt;dart:convert&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-typed_data/" rel="noopener noreferrer"&gt;&lt;code&gt;dart:typed_data&lt;/code&gt;&lt;/a&gt; packages where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/" rel="noopener noreferrer"&gt;&lt;code&gt;dart:io&lt;/code&gt;&lt;/a&gt; will be used for the &lt;a href="https://api.dart.dev/dart-io/File-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;File&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;RandomAccessFile&lt;/code&gt;&lt;/a&gt; classes;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-typed_data/" rel="noopener noreferrer"&gt;&lt;code&gt;dart:typed_data&lt;/code&gt;&lt;/a&gt; will be used for the &lt;a href="https://api.dart.dev/dart-typed_data/Uint8List-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;Uint8List&lt;/code&gt;&lt;/a&gt; class, object returned when reading a file byte by byte;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-convert/" rel="noopener noreferrer"&gt;&lt;code&gt;dart:convert&lt;/code&gt;&lt;/a&gt; will be required for the &lt;a href="https://api.dart.dev/dart-convert/ascii-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;ascii&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-convert/utf8-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;utf8&lt;/code&gt;&lt;/a&gt; converters, to convert the bytes read from a file or to convert a String to bytes before writing them.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:io'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:typed_data'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:convert'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When opening a file via the &lt;a href="https://api.dart.dev/dart-io/File/open.html" rel="noopener noreferrer"&gt;&lt;code&gt;File.open()&lt;/code&gt;&lt;/a&gt; method, it returns a &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;RandomAccessFile&lt;/code&gt;&lt;/a&gt;. This object is an interface to manage a file in a more accurate way than the methods offered by &lt;code&gt;File&lt;/code&gt;. Indeed, the &lt;code&gt;File.read*()&lt;/code&gt; or &lt;code&gt;File.write*()&lt;/code&gt; methods are dealing with the whole file and not a subset of it. Before digging in those details, one bigger problem must be fixed.&lt;/p&gt;

&lt;p&gt;When a file is opened, a file descriptor is allocated for the process. The amount of file descriptors is not unlimited, and in case of exhaustion, the process can crash. A good practice is to always close an unused file to avoid this kind of issues. To do that, a &lt;a href="https://dart.dev/language/error-handling" rel="noopener noreferrer"&gt;&lt;code&gt;try&lt;/code&gt;/&lt;code&gt;finally&lt;/code&gt;&lt;/a&gt; clause can be used like in the example below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./file.test"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;myFile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// code to execute here while the  file is opened&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// in case issue, we always close the handler&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repeating this code is boring, this is Dart, not Go. To avoid code duplication and eventually errors, let creates a new function to always close a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
                    &lt;span class="n"&gt;FileMode&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="kt"&gt;Function&lt;/span&gt; &lt;span class="n"&gt;closure&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="c1"&gt;// create a new File object&lt;/span&gt;
  &lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// open the file using the mode specified&lt;/span&gt;
  &lt;span class="c1"&gt;// in the arguments&lt;/span&gt;
  &lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;gt; open &lt;/span&gt;&lt;span class="si"&gt;$file&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// execute the closure passed in the last&lt;/span&gt;
  &lt;span class="c1"&gt;// argument of the function...&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;closure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// if the closure throw an exception, we&lt;/span&gt;
  &lt;span class="c1"&gt;// print it and rethrow it&lt;/span&gt;
  &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$e&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="si"&gt;$s&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;rethrow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// in all cases, the file handler must be&lt;/span&gt;
  &lt;span class="c1"&gt;// closed to avoid file descriptor exhaustion&lt;/span&gt;
  &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;closeSync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&amp;gt; close &lt;/span&gt;&lt;span class="si"&gt;$file&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This small function can then be used to automatically close a file handler like the following piece of code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./read.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now this part is fixed, let have a quick look on the &lt;a href="https://api.dart.dev/dart-io/File/open.html" rel="noopener noreferrer"&gt;&lt;code&gt;open&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/File/openSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;openSync()&lt;/code&gt;&lt;/a&gt; methods and how to use it. Five file modes defined as constants in the &lt;a href="https://api.dart.dev/dart-io/FileMode-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode&lt;/code&gt;&lt;/a&gt; class can be used to open a file.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileMode/read-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;read&lt;/code&gt; mode&lt;/a&gt; set the file handler in read-only, in this mode, the application can only read bytes from the file or set the position of the cursor.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileMode/write-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;write&lt;/code&gt; mode&lt;/a&gt; set the file handler in read-write mode, in this case, the application can read or write bytes to the file. If the file is opened and then nothing is done on it, the file is then truncated (emptied).&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileMode/append-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;append&lt;/code&gt; mode&lt;/a&gt; set the file handler in read-write mode but will not truncate the file if this one is closed before doing anything on it.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnly-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeOnly&lt;/code&gt; mode&lt;/a&gt; can only write bytes to a file without reading it. If a file is already present, it will be overwritten.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnlyAppend-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeOnlyAppend&lt;/code&gt; mode&lt;/a&gt; can only write data on the end of the file.&lt;/p&gt;

&lt;h1&gt;
  
  
  File Handler Cursor
&lt;/h1&gt;

&lt;p&gt;A file can be seen as a contiguous array of bytes, where an empty file can be seen as an empty array with a zero length. When dealing with an array, an index is used to store an object. The same concept exists with an opened file, but it is called a cursor. A cursor can be positioned on a specific offset on the file to read or write content on it. Let test that with Dart. First, two files will be created, one called &lt;code&gt;empty.txt&lt;/code&gt; and another one called &lt;code&gt;hello.txt&lt;/code&gt;, respectively an empty file, and a file containing the string "hello world".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;empty.txt
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo &lt;/span&gt;hello world &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; hello.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;RandomAccessFile&lt;/code&gt; object is offering 3 methods to configure the cursor. The first one is the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/length.html" rel="noopener noreferrer"&gt;&lt;code&gt;length()&lt;/code&gt;&lt;/a&gt; method, useful to know the size of the file and to avoid configuring the cursor at the wrong place. Then, the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/position.html" rel="noopener noreferrer"&gt;&lt;code&gt;position()&lt;/code&gt;&lt;/a&gt; method and the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/setPosition.html" rel="noopener noreferrer"&gt;&lt;code&gt;setPosition()&lt;/code&gt;&lt;/a&gt; method are used to interact with the cursor. Easy, right?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// create a new file object&lt;/span&gt;
&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;emptyFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./empty.txt"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// open the file, in read-only mode by default&lt;/span&gt;
&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;emptyFileHandler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;emptyFile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// create a clojure to print the length of a file handler&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"length: &lt;/span&gt;&lt;span class="si"&gt;$length&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// create another clojure to print the position of&lt;/span&gt;
&lt;span class="c1"&gt;// a cursor&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;position&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"position: &lt;/span&gt;&lt;span class="si"&gt;$position&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;position&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// configure the position of the cursor&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// print the length of the file and&lt;/span&gt;
&lt;span class="c1"&gt;// the position of the cursor&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;position&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// close the file handler&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;emptyFileHandler&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let execute this code snippet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;length: 0
position: 0
length: 0
position: 10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What's happening there? Firstly, the &lt;code&gt;empty.txt&lt;/code&gt; file is opened, the default &lt;a href="https://api.dart.dev/dart-io/FileMode-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode&lt;/code&gt;&lt;/a&gt; is &lt;code&gt;read&lt;/code&gt;. This file is empty, then it's length is set to &lt;code&gt;0&lt;/code&gt; and the cursor is also set to &lt;code&gt;0&lt;/code&gt; (start of the file). The cursor position is set to &lt;code&gt;10&lt;/code&gt;, you would think it fails, but it works. If a byte is written at this place, the previous bytes (from the beginning to the current cursor position) will be set to &lt;code&gt;0&lt;/code&gt;. Finally, the file handler is closed to free the file descriptor.&lt;/p&gt;

&lt;h1&gt;
  
  
  Read Mode
&lt;/h1&gt;

&lt;p&gt;When opening a file in &lt;a href="https://api.dart.dev/dart-io/FileMode/read-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;read&lt;/code&gt; mode&lt;/a&gt;, the application can only read the content of the file without altering it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// ... do something here&lt;/span&gt;
&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To read the data from the handler, one can use the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/read.html" rel="noopener noreferrer"&gt;&lt;code&gt;read()&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readByte.html" rel="noopener noreferrer"&gt;&lt;code&gt;readByte()&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readInto.html" rel="noopener noreferrer"&gt;&lt;code&gt;readInto()&lt;/code&gt;&lt;/a&gt; methods. Let check them one by one. Just to avoid too much duplicated code, a closure to print the position of the cursor will be created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// another clojure to print the position of&lt;/span&gt;
&lt;span class="c1"&gt;// a cursor.&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;printPosition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;positionSync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'&amp;gt; position: &lt;/span&gt;&lt;span class="si"&gt;$position&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/read.html" rel="noopener noreferrer"&gt;&lt;code&gt;read()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;readSync()&lt;/code&gt;&lt;/a&gt; methods return an &lt;a href="https://api.dart.dev/dart-typed_data/Uint8List-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;Uint8List&lt;/code&gt;&lt;/a&gt; containing the amount of bytes requested from the opened file, starting at the beginning of it. For our first test, let try to read 10 bytes from the files previously created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// print the position of the cursor&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// store the 10 first bytes of the file in&lt;/span&gt;
  &lt;span class="c1"&gt;// a buffer&lt;/span&gt;
  &lt;span class="n"&gt;Uint8List&lt;/span&gt; &lt;span class="n"&gt;readBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// print the buffer&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;readBuffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// convert the buffer in ascii and print it&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ascii&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;readBuffer&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="go"&gt;[104, 101, 108, 108, 111, 32, 119, 111, 114, 108]
hello worl
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great, the file is correctly opened, and 10 bytes are returned. Those bytes can be converted with &lt;a href="https://api.dart.dev/dart-convert/ascii-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;ascii.decode()&lt;/code&gt;&lt;/a&gt; and printed as readable String. Sometimes, we don't want to read a part of the file, but only read it byte by byte. In this case, &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readByte.html" rel="noopener noreferrer"&gt;&lt;code&gt;readByte()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readByteSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;readByteSync()&lt;/code&gt;&lt;/a&gt; methods can be used. They are returning an &lt;code&gt;int&lt;/code&gt; representing the character from the cursor position.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// create an integer buffer (one char)&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;byteBuffer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// read the file until we reach an eof&lt;/span&gt;
  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;byteBuffer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readByteSync&lt;/span&gt;&lt;span class="p"&gt;())&amp;gt;&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// print the cursor's position at every step&lt;/span&gt;
    &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// print the buffer and its ascii representation&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$byteBuffer&lt;/span&gt;&lt;span class="s"&gt; | &lt;/span&gt;&lt;span class="si"&gt;${ascii.decode([byteBuffer])}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 1
&lt;span class="go"&gt;104 | h
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 2
&lt;span class="go"&gt;101 | e
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 3
&lt;span class="go"&gt;108 | l
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 4
&lt;span class="go"&gt;108 | l
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 5
&lt;span class="go"&gt;111 | o
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 6
&lt;span class="go"&gt;32 |  
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 7
&lt;span class="go"&gt;119 | w
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 8
&lt;span class="go"&gt;111 | o
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 9
&lt;span class="go"&gt;114 | r
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 10
&lt;span class="go"&gt;108 | l
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 11
&lt;span class="go"&gt;100 | d
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 12
&lt;span class="go"&gt;10 | 

&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the &lt;code&gt;while&lt;/code&gt; loop store the returned value into a variable. Every time the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readByteSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;readByteSync()&lt;/code&gt;&lt;/a&gt; method is called, the position of the cursor is increased until it reaches the end of file (&lt;code&gt;eof&lt;/code&gt;) represented by &lt;code&gt;-1&lt;/code&gt;. Perhaps your file is really huge, or you have your own parser, in this case, one can use the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readInto.html" rel="noopener noreferrer"&gt;&lt;code&gt;readInto()&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readIntoSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;readIntoSync()&lt;/code&gt;&lt;/a&gt; methods. The idea here is to create a buffer and store the content of the file in it. The buffer can have its own limited size, in this case, the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/readInto.html" rel="noopener noreferrer"&gt;&lt;code&gt;readInto()&lt;/code&gt;&lt;/a&gt; method needs to now how many characters it can read from the file to store them in the buffer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// buffer initialization using the length of&lt;/span&gt;
  &lt;span class="c1"&gt;// the file.&lt;/span&gt;
  &lt;span class="n"&gt;Uint8List&lt;/span&gt; &lt;span class="n"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Uint8List&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;lengthSync&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

  &lt;span class="c1"&gt;// let read it a first time&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readIntoSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ascii&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// let reset the position and read it a&lt;/span&gt;
  &lt;span class="c1"&gt;// second time.&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setPositionSync&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="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

  &lt;span class="c1"&gt;// reset another time the position of&lt;/span&gt;
  &lt;span class="c1"&gt;// the cursor at the beginning of the file&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setPositionSync&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="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="go"&gt;[104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 10]
hello world

&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 12
&lt;span class="go"&gt;[104, 101, 108, 108, 111, 32, 119, 111, 114, 108]
[100, 10]
[104, 101, 108, 108, 111, 32, 119, 111, 114, 108]
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, a buffer can be used to store part of the file temporarily. Another interesting thing is a position cursor can be configured while reading the file, it means a file can be opened for a long time, and the cursor can move during all this time.&lt;/p&gt;

&lt;h1&gt;
  
  
  Write Mode
&lt;/h1&gt;

&lt;p&gt;Reading a file is great, but writing data can also be useful. The &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeByte.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeByte()&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeByteSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeByteSync()&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeFrom.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeFrom()&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeFromSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeFromSync&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeString.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeString()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeFromSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeStringSync()&lt;/code&gt;&lt;/a&gt; methods can be used to accomplish this tasks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// ... do something here&lt;/span&gt;
&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
dart&lt;/p&gt;

&lt;p&gt;Just to be sure, let create another closure to display the length of the file this time. If you prefer create it as a function, you can do it as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;printLength&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;lengthSync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'&amp;gt; length: &lt;/span&gt;&lt;span class="si"&gt;$length&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first test is to open the &lt;code&gt;empty.txt&lt;/code&gt; file and writing data byte by byte. To do that, the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeByteSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeByteSync()&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeByte.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeByte()&lt;/code&gt;&lt;/a&gt; functions can be used, where the first argument is the character to write in the file as an integer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./empty.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// write the character H&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeByteSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x48&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// write the character E&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeByteSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x45&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// write the character L&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeByteSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x4C&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// write the character L&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeByteSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x4C&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// write the character O&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeByteSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x4F&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// write the character \n&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeByteSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0xa&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 1
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 1
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 2
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 2
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 3
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 3
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 4
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 4
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 5
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 5
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, every time one byte is written in the file, the cursor is increased and the length of the file as well. Writing data byte by byte can be slow, sometimes, a buffer containing a specific amount of data should be written in one step. In this case, the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeFrom.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeFrom()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeFromSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeFromSync()&lt;/code&gt;&lt;/a&gt; methods can be called.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./empty.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// create a new Uint8List buffer from&lt;/span&gt;
  &lt;span class="c1"&gt;// an encoded ASCII string&lt;/span&gt;
  &lt;span class="n"&gt;Uint8List&lt;/span&gt; &lt;span class="n"&gt;buffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Uint8List&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fromList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;ascii&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hello world&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// write the content of the buffer&lt;/span&gt;
  &lt;span class="c1"&gt;// to the file&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeFromSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 6
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the file is opened, the cursor is set to the position &lt;code&gt;0&lt;/code&gt; and the buffer is written at the beginning of it, overwriting the previous data if any. The last methods to test are &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeString.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeString()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/writeStringSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeStringSync()&lt;/code&gt;&lt;/a&gt;, both of them are simply writings a &lt;code&gt;String&lt;/code&gt; directly into the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./empty.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// write the string "data...\n"&lt;/span&gt;
  &lt;span class="c1"&gt;// in the file&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeStringSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"data...&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 8
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like the previous example, the data added are overwriting the data from the position &lt;code&gt;0&lt;/code&gt;. Obviously, the position of the cursor can be set on all previous methods by setting it with &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/setPosition.html" rel="noopener noreferrer"&gt;&lt;code&gt;setPosition()&lt;/code&gt;&lt;/a&gt;. Last questions we can ask here, what is happening if the cursor is set to a value greater than the length of the file?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./empty.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// we know the file size is 12 bytes,&lt;/span&gt;
  &lt;span class="c1"&gt;// but we set the position to 1024.&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setPositionSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeStringSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 1026
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 1026
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./empty.txt'&lt;/span&gt;
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;hexdump &lt;span class="nt"&gt;-C&lt;/span&gt; empty.txt
&lt;span class="go"&gt;00000000  64 61 74 61 2e 2e 2e 0a  72 6c 64 0a 00 00 00 00  |data....rld.....|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  21 0a                                             |!.|
00000402
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything works perfectly, and the missing bytes are simply set to &lt;code&gt;0&lt;/code&gt;, like the output of &lt;a href="https://manpages.debian.org/trixie/bsdextrautils/hexdump.1.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;hexdump&lt;/code&gt;&lt;/a&gt; is showing us.&lt;/p&gt;

&lt;h1&gt;
  
  
  Append Mode
&lt;/h1&gt;

&lt;p&gt;Using &lt;a href="https://api.dart.dev/dart-io/FileMode/write-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode.write&lt;/code&gt;&lt;/a&gt; can be dangerous, if someone forgot to set the cursor at the right place, the data stored in the file can be overwritten. In many situation, using the &lt;a href="https://api.dart.dev/dart-io/FileMode/append-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode.append&lt;/code&gt;&lt;/a&gt; is a better choice, because the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;RandomAccessFile&lt;/code&gt;&lt;/a&gt; object returned will set the position of the cursor directly at the end of the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;append&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// ... do something here&lt;/span&gt;
&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;append&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeStringSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"append data"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setPositionSync&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="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ascii&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;lengthSync&lt;/span&gt;&lt;span class="p"&gt;())));&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 23
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 23
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 23
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="go"&gt;hello world
append data
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 23
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 23
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One can still set the position of the cursor manually if needed.&lt;/p&gt;

&lt;h1&gt;
  
  
  WriteOnly Mode
&lt;/h1&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnly-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode.writeOnly&lt;/code&gt;&lt;/a&gt; mode can only write to a file, without reading its content.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeOnly&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// ... do something here&lt;/span&gt;
&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a dangerous mode, because if the file is already containing data, they will be overwritten. From the documentation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mode for opening a file for writing only. The file is overwritten if it already exists. The file is created if it does not already exist.&lt;/p&gt;

&lt;p&gt;-- &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnly-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeOnly constant&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let check that. In the following example, the &lt;code&gt;hello.txt&lt;/code&gt; file will simply be opened in this mode and then closed, without doing any actions (except checking the length of the file and the position of the cursor).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeOnly&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo &lt;/span&gt;hello world &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; hello.txt 
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; hello.txt 
&lt;span class="go"&gt;-rw-rw-r-- 1 user user 12 Sep  3 12:14 hello.txt

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; hello.txt 
&lt;span class="go"&gt;-rw-rw-r-- 1 user user 0 Sep  3 12:14 hello.txt
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the beginning of the test, the file is containing 12 characters, but when the application is opening it with the &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnly-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode.writeOnly&lt;/code&gt;&lt;/a&gt;, the size is set to 0. Well, in fact, this is why this mode is dangerous, it will simply overwrite the content of the file by default.&lt;/p&gt;

&lt;h1&gt;
  
  
  WriteOnlyAppend Mode
&lt;/h1&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnlyAppend-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode.writeOnlyAppend&lt;/code&gt;&lt;/a&gt; mode is the last one to check. It has the same behavior than the &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnly-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode.writeOnly&lt;/code&gt;&lt;/a&gt; mode, except the cursor is set at the end of the file, and when data are written, the content is not overwritten.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mode for opening a file for writing only to the end of it. The file is created if it does not already exist.&lt;/p&gt;

&lt;p&gt;-- &lt;a href="https://api.dart.dev/dart-io/FileMode/writeOnlyAppend-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeOnlyAppend&lt;/code&gt; constant &lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeOnlyAppend&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// ... do something here&lt;/span&gt;
&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeOnlyAppend&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt; 

&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeOnlyAppend&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeStringSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"new line added"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo &lt;/span&gt;hello world &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; hello.txt
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;stat &lt;/span&gt;hello.txt
&lt;span class="go"&gt;  File: hello.txt
  Size: 12              Blocks: 8          IO Block: 4096   regular file
Device: 254,1   Inode: 279568      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    user)   Gid: ( 1000/    user)
Access: 2026-09-03 12:24:41.882489242 +0000
Modify: 2026-09-03 12:27:18.162466032 +0000
Change: 2026-09-03 12:27:18.162466032 +0000
 Birth: 2026-09-02 07:37:41.595715171 +0000

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 12
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 26
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 26
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;stat &lt;/span&gt;hello.txt
&lt;span class="go"&gt;  File: hello.txt
  Size: 26              Blocks: 8          IO Block: 4096   regular file
Device: 254,1   Inode: 279568      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    user)   Gid: ( 1000/    user)
Access: 2026-09-03 12:24:41.882489242 +0000
Modify: 2026-09-03 12:27:45.530452395 +0000
Change: 2026-09-03 12:27:45.530452395 +0000
 Birth: 2026-09-02 07:37:41.595715171 +0000

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;hello.txt
&lt;span class="go"&gt;hello world
new line added
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, even if the file is open with a write-only mode, the data are added at the end of the file, without overwriting the previous ones.&lt;/p&gt;

&lt;h1&gt;
  
  
  Truncating
&lt;/h1&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/truncate.html" rel="noopener noreferrer"&gt;&lt;code&gt;truncate()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/truncateSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;truncateSync()&lt;/code&gt;&lt;/a&gt; methods can be used to extend the size of a file. The new space is filled with &lt;code&gt;0x00&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;append&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;truncateSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;stat &lt;/span&gt;hello.txt
&lt;span class="go"&gt;  File: hello.txt
  Size: 26              Blocks: 8          IO Block: 4096   regular file
Device: 254,1   Inode: 279568      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    user)   Gid: ( 1000/    user)
Access: 2026-09-03 12:28:05.510440866 +0000
Modify: 2026-09-03 12:27:45.530452395 +0000
Change: 2026-09-03 12:27:45.530452395 +0000
 Birth: 2026-09-02 07:37:41.595715171 +0000

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 26
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 26
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 1024
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 26
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;stat &lt;/span&gt;hello.txt
&lt;span class="go"&gt;  File: hello.txt
  Size: 1024            Blocks: 8          IO Block: 4096   regular file
Device: 254,1   Inode: 279568      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    user)   Gid: ( 1000/    user)
Access: 2026-09-03 12:28:05.510440866 +0000
Modify: 2026-09-03 12:32:04.602216874 +0000
Change: 2026-09-03 12:32:04.602216874 +0000
 Birth: 2026-09-02 07:37:41.595715171 +0000

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;hexdump &lt;span class="nt"&gt;-C&lt;/span&gt; hello.txt
&lt;span class="go"&gt;00000000  68 65 6c 6c 6f 20 77 6f  72 6c 64 0a 6e 65 77 20  |hello world.new |
00000010  6c 69 6e 65 20 61 64 64  65 64 00 00 00 00 00 00  |line added......|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, the size of the file was 26 bytes, after the truncate, the file size is 1024 bytes. The &lt;code&gt;hexdump&lt;/code&gt; command display also the new space added filled with &lt;code&gt;0&lt;/code&gt; only.&lt;/p&gt;

&lt;h1&gt;
  
  
  Locking and Unlocking File
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;WARNING&lt;/strong&gt;: this part of the article is not working as expected, for some reasons I don't currently understand. The following code is presented as is, and should be used with care.&lt;/p&gt;

&lt;p&gt;To avoid editing a file at the same time than another process, the file used can be locked (and unlocked). To lock it, the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/lock.html" rel="noopener noreferrer"&gt;&lt;code&gt;lock()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/lockSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;lockSync()&lt;/code&gt;&lt;/a&gt; methods can be used. To unlock it, the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/unlock.html" rel="noopener noreferrer"&gt;&lt;code&gt;unlock()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/unlockSync.html" rel="noopener noreferrer"&gt;&lt;code&gt;unlockSync()&lt;/code&gt;&lt;/a&gt; methods can be used.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Locks the byte range from &lt;code&gt;start&lt;/code&gt; to &lt;code&gt;end&lt;/code&gt; of the file, with the byte at position end not included. If no arguments are specified, the full file is locked, If only &lt;code&gt;start&lt;/code&gt; is specified the file is locked from byte position &lt;code&gt;start&lt;/code&gt; to the end of the file, no matter how large it grows. It is possible to specify an explicit value of end which is past the current length of the file.&lt;/p&gt;

&lt;p&gt;-- &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/lock.html" rel="noopener noreferrer"&gt;&lt;code&gt;lock&lt;/code&gt; abstract method &lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Four blocking modes exist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/FileLock/blockingExclusive-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileLock.blockingExclusive&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/FileLock/blockingShared-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileLock.blockingShared&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/FileLock/exclusive-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileLock.exclusive&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/FileLock/shared-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileLock.shared&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;write&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;lockSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FileLock&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;blockingExclusive&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;delayed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;seconds:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&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;&amp;gt;&lt;/span&gt; &lt;span class="s"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;unlockSync&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;delayed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;seconds:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;handlerManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./hello.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;append&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeStringSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;printLength&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;printPosition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo &lt;/span&gt;hello world &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; hello.txt
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;open File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 4
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 4
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;length: 4
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;position: 0
&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;close File: &lt;span class="s1"&gt;'./hello.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reading the documentation and testing this feature could be a good idea if you want to use it for your project, because the behaviors differs between the supported platform by Dart. The behavior on Linux/MacOS is not the same than the one on Windows for example.&lt;/p&gt;

&lt;p&gt;Note: while testing the locking feature, I was unable to see the difference between a file locked or not. I tried to open the file with another process and write some data, no errors were reported on both side. I checked the test suite to understand how it was working, here the sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/sdk/blob/cbdda8b4e08d686a811672e8e7de67bacb4afb43/tests/standalone/io/file_lock_script.dart" rel="noopener noreferrer"&gt;&lt;code&gt;tests/standalone/io/file_lock_script.dart&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/sdk/blob/cbdda8b4e08d686a811672e8e7de67bacb4afb43/tests/standalone/io/file_blocking_lock_script.dart" rel="noopener noreferrer"&gt;&lt;code&gt;tests/standalone/io/file_blocking_lock_script.dart&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/sdk/blob/cbdda8b4e08d686a811672e8e7de67bacb4afb43/tests/standalone/io/file_lock_test.dart" rel="noopener noreferrer"&gt;&lt;code&gt;tests/standalone/io/file_lock_test.dart&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I assume - but I'm probably wrong - the Dart implementation is using &lt;a href="https://manpages.debian.org/trixie/manpages-dev/lockf.3.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;lockf&lt;/code&gt;&lt;/a&gt; POSIX function to lock a file on Linux, but this function was not found in the SDK source code. Then, &lt;a href="https://manpages.debian.org/trixie/manpages-dev/fcntl.2.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;fcntl&lt;/code&gt;&lt;/a&gt; was perhaps the one used, &lt;code&gt;lockf&lt;/code&gt; is just an interface to it. Unfortunately, the code using this function does not seem to be involved in file locking. The last one to check was &lt;a href="https://manpages.debian.org/trixie/manpages-dev/flock.2.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;flock&lt;/code&gt;&lt;/a&gt;, and I think it was the right one. The locking feature is implemented in &lt;a href="https://github.com/dart-lang/sdk/blob/cbdda8b4e08d686a811672e8e7de67bacb4afb43/runtime/bin/file_linux.cc#L221" rel="noopener noreferrer"&gt;&lt;code&gt;runtime/bin/file_linux.cc&lt;/code&gt;&lt;/a&gt; and uses &lt;code&gt;flock&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Anyway, it was not expected, and some tests with the POSIX interface in C will be required to correctly understand how the file locking is working there. The future tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;try to create shared and exclusive lock on a file, it should fail;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;try to create an exclusive lock on a file, and with another program, try to edit it, it should fail;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;do both implementation in C/Dart and compare the results.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fun right?&lt;/p&gt;

&lt;h1&gt;
  
  
  File Descriptor Exhaustion
&lt;/h1&gt;

&lt;p&gt;Learning from mistakes is a hard way to know what's happening when something's bad happens. Instead of waiting for this kind of bug, let create an application using all file descriptors available and crashing. The &lt;a href="https://manpages.debian.org/trixie/bash/bash.1.en.html#ulimit~2" rel="noopener noreferrer"&gt;&lt;code&gt;ulimit&lt;/code&gt;&lt;/a&gt; builtin command can usually be used to check those limits. On BSD, one will also need to check the &lt;a href="https://man.openbsd.org/login.conf.5" rel="noopener noreferrer"&gt;&lt;code&gt;login.conf&lt;/code&gt;&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ulimit&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;span class="go"&gt;real-time non-blocking time  (microseconds, -R) unlimited
core file size              (blocks, -c) 0
data seg size               (kbytes, -d) unlimited
scheduling priority                 (-e) 0
file size                   (blocks, -f) unlimited
pending signals                     (-i) 3798
max locked memory           (kbytes, -l) 8192
max memory size             (kbytes, -m) unlimited
open files                          (-n) 1024
pipe size                (512 bytes, -p) 8
POSIX message queues         (bytes, -q) 819200
real-time priority                  (-r) 0
stack size                  (kbytes, -s) 8192
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) 3798
virtual memory              (kbytes, -v) unlimited
file locks                          (-x) unlimited

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ulimit&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt;
&lt;span class="go"&gt;1024

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ulimit&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:io'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;RandomAccessFile&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./t"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;RandomAccessFile&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;FileMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;read&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;1
2
3
&lt;/span&gt;&lt;span class="c"&gt;...
&lt;/span&gt;&lt;span class="go"&gt;1015
Unhandled exception:
FileSystemException: Cannot open file, path = './t' (OS Error: Too many open files, errno = 24)
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;0      _checkForErrorResponse &lt;span class="o"&gt;(&lt;/span&gt;dart:io/common.dart:58:9&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;#&lt;/span&gt;1      _File.open.&amp;lt;anonymous closure&amp;gt; &lt;span class="o"&gt;(&lt;/span&gt;dart:io/file_impl.dart:438:7&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;&amp;lt;asynchronous suspension&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;2      exhaustion &lt;span class="o"&gt;(&lt;/span&gt;file:///home/user/tmp/cboring/bin/cboring.dart:33:27&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="gp"&gt;&amp;lt;asynchronous suspension&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not the only value to check. Other limits can have an impact on the stability of the application, like the number of file locks (&lt;code&gt;ulimit -x&lt;/code&gt;) or the file size (&lt;code&gt;ulimit -f&lt;/code&gt;). The file &lt;a href="https://manpages.debian.org/trixie/quota/quota.1.en.html" rel="noopener noreferrer"&gt;quota&lt;/a&gt; can also be a source of crashes. So, it's always a good idea to check the limits imposed by the system in case of issues.&lt;/p&gt;

&lt;p&gt;Note: it seems the limits can't be accessed via Dart. I was unable to find a reference to &lt;a href="https://manpages.debian.org/trixie/manpages-dev/getrlimit.2.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;getrlimit&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://manpages.debian.org/trixie/manpages-dev/setrlimit.2.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;setrlimit&lt;/code&gt;&lt;/a&gt; functions. In fact, not really, but the only references to them are from &lt;a href="https://github.com/dart-lang/sdk/blob/cbdda8b4e08d686a811672e8e7de67bacb4afb43/tools/utils.py#L571" rel="noopener noreferrer"&gt;&lt;code&gt;tools/utils.py&lt;/code&gt;&lt;/a&gt;, in Python, so, outside of the Dart scope. I assume then Dart is unable to &lt;code&gt;get&lt;/code&gt; or &lt;code&gt;set&lt;/code&gt; limits.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Reading and writing files are not an easy job even if the interfaces provided are quite simple. This article wanted to show the different methods available to deal with the files and the potential issues one can found. In fact, the interfaces provided by Dart is similar to the one provided by the &lt;code&gt;libc&lt;/code&gt;, with oriented object flavor. As usual if you want to know more about that, here few links to extend your knowledge of this API. Unfortunately, it seems not a lot of people are talking about this API...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/File-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;File&lt;/code&gt; class API documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/FileMode-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileMode&lt;/code&gt; class API documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/RandomAccessFile-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;RandomAccessFile&lt;/code&gt; class API documentation&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/sdk/blob/fb4752caaf04866d68afbece85c4df9759ff1f42/runtime/bin/file_linux.cc" rel="noopener noreferrer"&gt;&lt;code&gt;file_linux.cc&lt;/code&gt; source&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/sdk/blob/fb4752caaf04866d68afbece85c4df9759ff1f42/runtime/bin/file.cc" rel="noopener noreferrer"&gt;&lt;code&gt;file.cc&lt;/code&gt; source&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://zetcode.com/dart/randomaccessfile/" rel="noopener noreferrer"&gt;&lt;code&gt;Dart RandomAccessFile&lt;/code&gt;&lt;/a&gt; by ZetCode.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy hacking and have fun!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@khoiruabdan?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Khoiru Abdan&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/a-person-writing-on-a-piece-of-paper-with-a-pen-TKk29MxSjAA?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>file</category>
      <category>filesystem</category>
      <category>dart</category>
      <category>programming</category>
    </item>
    <item>
      <title>File System Management in Dart</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Tue, 01 Sep 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/file-system-management-in-dart-5635</link>
      <guid>https://dev.to/niamtokik/file-system-management-in-dart-5635</guid>
      <description>&lt;p&gt;It's a good time to also investigate a bit the dart I/O interfaces, especially the one related to files. The &lt;code&gt;dart:io&lt;/code&gt; package must be imported to deal with files and directories in Dart.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:io'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A file in Dart is an object instantiated by the &lt;a href="https://api.dart.dev/dart-io/File-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;File&lt;/code&gt; class&lt;/a&gt;. This object can be created by simply invoking the &lt;a href="https://api.dart.dev/dart-io/File/File.html" rel="noopener noreferrer"&gt;default constructor&lt;/a&gt;, where its argument will be a &lt;code&gt;String&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// default constructor can be used&lt;/span&gt;
&lt;span class="c1"&gt;// to create a new object pointing to&lt;/span&gt;
&lt;span class="c1"&gt;// a local file.&lt;/span&gt;
&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./file1.test"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/File/File.fromRawPath.html" rel="noopener noreferrer"&gt;&lt;code&gt;fromRawPath()&lt;/code&gt;&lt;/a&gt; is another constructor, it opens a file based on an &lt;code&gt;List&amp;lt;Uint8&amp;gt;&lt;/code&gt; (&lt;code&gt;Uint8List&lt;/code&gt;), this kind of data is usually generated by &lt;a href="https://api.dart.dev/dart-convert/utf8-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;utf8.encode&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://api.dart.dev/dart-convert/ascii-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;ascii.encode&lt;/code&gt;&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// fromRawPath constructor can be used&lt;/span&gt;
&lt;span class="c1"&gt;// to open a file based on a raw path,&lt;/span&gt;
&lt;span class="c1"&gt;// an Uint8list.&lt;/span&gt;
&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fromRawPath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;ascii&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./file2.test"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, the &lt;a href="https://api.dart.dev/dart-io/File/File.fromUri.html" rel="noopener noreferrer"&gt;&lt;code&gt;fromUri()&lt;/code&gt;&lt;/a&gt; constructor will open a file based on an &lt;a href="https://api.dart.dev/dart-core/Uri/Uri.file.html" rel="noopener noreferrer"&gt;&lt;code&gt;Uri&lt;/code&gt;&lt;/a&gt; object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// fromUri is another construct that&lt;/span&gt;
&lt;span class="c1"&gt;// can be used to open a file based on&lt;/span&gt;
&lt;span class="c1"&gt;// an Uri.&lt;/span&gt;
&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fromUri&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="kt"&gt;Uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./file3.test"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the file object has been created, many attributes and methods are available to control it. Let check first the attributes. In the previous examples, all objects are using a relative path, when the object is returned, the &lt;code&gt;absolute&lt;/code&gt; path attribute is set. It is the &lt;code&gt;absolute&lt;/code&gt; path representation of the data previously passed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;File: '/home/user/tmp/cboring/./file1.test'
File: '/home/user/tmp/cboring/./file2.test'
File: '/home/user/tmp/cboring/file3.test'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The original path passed as first argument can be retrieved with the &lt;a href="https://api.dart.dev/dart-io/File/path.html" rel="noopener noreferrer"&gt;&lt;code&gt;path&lt;/code&gt; attribute&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;./file1.test
./file2.test
file3.test
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The file object can also returns an Uri object with the help of the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/uri.html" rel="noopener noreferrer"&gt;&lt;code&gt;uri&lt;/code&gt; attribute&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// this is a closure helper to show&lt;/span&gt;
&lt;span class="c1"&gt;// the properties from an Uri object and&lt;/span&gt;
&lt;span class="c1"&gt;// return them as a Map.&lt;/span&gt;
&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;toMap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Uri&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s"&gt;"scheme"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"host"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"path"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"fragment"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fragment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
 &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;toMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;toMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;toMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;{scheme: , host: , path: file1.test, fragment: }
{scheme: , host: , path: file2.test, fragment: }
{scheme: , host: , path: file3.test, fragment: }
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another interesting property exposed by the File object is the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/parent.html" rel="noopener noreferrer"&gt;&lt;code&gt;parent&lt;/code&gt;&lt;/a&gt; one (usually a directory).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;Directory: '.'
Directory: '.'
Directory: '.'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let creates a small closure to summarize and display all those information into a &lt;code&gt;Map&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;fileToMap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s"&gt;'absolute'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;'hashCode'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;hashCode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;'isAbsolute'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;isAbsolute&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;'parent'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;'path'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;'runtimeType'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;runtimeType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;'uri'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;toMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;{absolute: File: '/home/user/tmp/cboring/./file1.test', hashCode: 554905050, isAbsolute: false, parent: Directory: '.', path: ./file1.test, runtimeType: _File, uri: {scheme: , host: , path: file1.test, fragment: }}
{absolute: File: '/home/user/tmp/cboring/./file2.test', hashCode: 224769083, isAbsolute: false, parent: Directory: '.', path: ./file2.test, runtimeType: _File, uri: {scheme: , host: , path: file2.test, fragment: }}
{absolute: File: '/home/user/tmp/cboring/file3.test', hashCode: 467382617, isAbsolute: false, parent: Directory: '.', path: file3.test, runtimeType: _File, uri: {scheme: , host: , path: file3.test, fragment: }}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next part is to investigate around the methods available. One of the most important is probably the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/exists.html" rel="noopener noreferrer"&gt;&lt;code&gt;exists()&lt;/code&gt;&lt;/a&gt; method, which returns if a file exist or not. Another one called &lt;code&gt;existsSync()&lt;/code&gt; is also available, and will return a boolean instead of a &lt;code&gt;Future&lt;/code&gt; because of its synchronous nature. In fact, most of the following methods will also have their synchronous function if needed. Let creates two of those files first, &lt;code&gt;file1.test&lt;/code&gt; and &lt;code&gt;file2.test&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;file&lt;span class="o"&gt;{&lt;/span&gt;1,2&lt;span class="o"&gt;}&lt;/span&gt;.test
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/random &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;file1.test &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1024 &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8
&lt;span class="go"&gt;1024+0 records in
1024+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 0.00502157 s, 1.6 MB/s

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/random &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1024 &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="go"&gt;   | perl -ane '
&lt;/span&gt;&lt;span class="gp"&gt;     BEGIN{@s};&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;span class="gp"&gt;     map {push(@s, $&lt;/span&gt;_&lt;span class="o"&gt;)}&lt;/span&gt; 
&lt;span class="gp"&gt;         grep {$&lt;/span&gt;&lt;span class="nv"&gt;_&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;~/^[a-zA-Z0-9]&lt;span class="nv"&gt;$/&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="gp"&gt;         split(//, $&lt;/span&gt;_&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="gp"&gt;     if (@s&amp;gt;&lt;/span&gt;64&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="gp"&gt;       $&lt;/span&gt;line &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;join&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;, @s[0..64]&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="gp"&gt;       print $&lt;/span&gt;line.&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="gp"&gt;       @s=();&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;span class="go"&gt;     }' \
&lt;/span&gt;&lt;span class="gp"&gt;   &amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;file2.test
&lt;span class="go"&gt;1024+0 records in
1024+0 records out
8192 bytes (8.2 kB, 8.0 KiB) copied, 0.0112288 s, 730 kB/s
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The previous command is maybe a bit hard to understand for someone without Perl experience. In short, we are filtering the output from &lt;code&gt;/dev/random&lt;/code&gt; to extract only characters matching the alphabets or numbers. Using other commands would have do the work as well, but I wanted to do a bit of Perl today.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;true
true
true
true
false
false
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now few files have been created, one using binaries and another one using text-like random data, it will be interesting to check the next methods. Let check the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/length.html" rel="noopener noreferrer"&gt;&lt;code&gt;length()&lt;/code&gt;&lt;/a&gt; method, it should return the size of a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;fileSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$file&lt;/span&gt;&lt;span class="s"&gt;.path: &lt;/span&gt;&lt;span class="si"&gt;$size&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$file&lt;/span&gt;&lt;span class="s"&gt;.path: &lt;/span&gt;&lt;span class="si"&gt;$e&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="n"&gt;fileSize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;fileSize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;fileSize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;File: './file1.test'.path: 8192
File: './file2.test'.path: 1122
File: 'file3.test'.path: PathNotFoundException: Cannot retrieve length of file, path = 'file3.test' (OS Error: No such file or directory, errno = 2)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a file does not exist, the function throw a &lt;a href="https://api.dart.dev/dart-io/PathNotFoundException-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;PathNotFoundException&lt;/code&gt;&lt;/a&gt; exception. Then, it's important to check the existence of the file before executing these methods. Let do the same test with the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/stat.html" rel="noopener noreferrer"&gt;&lt;code&gt;stat()&lt;/code&gt;&lt;/a&gt; method. It should return a &lt;a href="https://api.dart.dev/dart-io/FileStat-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileStat&lt;/code&gt;&lt;/a&gt; object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;fileStat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;stat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;stat&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="s"&gt;'accessed'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;stat&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;accessed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s"&gt;'changed'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;stat&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;changed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s"&gt;'mode'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;stat&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s"&gt;'modified'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;stat&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;modified&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s"&gt;'size'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;stat&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s"&gt;'type'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;stat&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$file&lt;/span&gt;&lt;span class="s"&gt;.path: &lt;/span&gt;&lt;span class="si"&gt;$e&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;{accessed: 2026-08-31 14:15:14.163, changed: 2026-08-31 14:15:14.163, mode: 33204, modified: 2026-08-31 14:15:14.163, size: 8192, type: file}
{accessed: 2026-08-31 14:15:40.139, changed: 2026-08-31 14:15:40.139, mode: 33204, modified: 2026-08-31 14:15:40.139, size: 1122, type: file}
{accessed: 1970-01-01 00:00:00.000Z, changed: 1970-01-01 00:00:00.000Z, mode: 0, modified: 1970-01-01 00:00:00.000Z, size: -1, type: notFound}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Interesting. When executing the &lt;code&gt;stat()&lt;/code&gt; method, no exceptions are thrown. I would expect the same behavior than the &lt;code&gt;length()&lt;/code&gt; method, but it seems it's not the case. More investigation is required to know why it does that, but the object returned got a &lt;code&gt;notFound&lt;/code&gt; type. My guess is, if you are lazy to check for the exceptions, using the &lt;code&gt;stat()&lt;/code&gt; looks to be the right way. Our &lt;code&gt;file3.test&lt;/code&gt; still does not exist, let create it using the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/create.html" rel="noopener noreferrer"&gt;&lt;code&gt;create()&lt;/code&gt;&lt;/a&gt; method and check what will happen for the 2 others files already created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;fileCreate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;created&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;created&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$file&lt;/span&gt;&lt;span class="s"&gt;.path: &lt;/span&gt;&lt;span class="si"&gt;$e&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="n"&gt;fileCreate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;fileCreate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;fileCreate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;File: './file1.test'
File: './file2.test'
File: 'file3.test'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a file is already present on the file system, calling the &lt;code&gt;create()&lt;/code&gt; does nothing apparently. Now all these files are created and contains some data (or not), it's the moment to &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/open.html" rel="noopener noreferrer"&gt;&lt;code&gt;open()&lt;/code&gt;&lt;/a&gt; them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;Instance of '_RandomAccessFile'
Instance of '_RandomAccessFile'
Instance of '_RandomAccessFile'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns a &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;RandomAccessFile&lt;/code&gt;&lt;/a&gt; object, we will talk about it later, but with this object, a file can be closed via the &lt;a href="https://api.dart.dev/dart-io/RandomAccessFile/close.html" rel="noopener noreferrer"&gt;&lt;code&gt;close()&lt;/code&gt;&lt;/a&gt;. A good practice is to always ensure an opened file is closed in some way when it is not used anymore to avoid &lt;a href="https://medium.com/@badrikmodi/the-silent-killer-file-descriptor-exhaustion-in-modern-services-9144bf795b6f" rel="noopener noreferrer"&gt;file descriptor exhaustion&lt;/a&gt;. Anyway, this returned object is important if you have operations to execute in a long living process. How to deal with this object will be the topic of another article. For now, reading or writing data in one single step will be enough.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/readAsBytes.html" rel="noopener noreferrer"&gt;&lt;code&gt;readAsBytes()&lt;/code&gt;&lt;/a&gt;, &lt;a href=""&gt;&lt;code&gt;readAsLines(https://api.dart.dev/dart-io/FileSystemEntity/readAsLines.html)&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/readAsString.html" rel="noopener noreferrer"&gt;&lt;code&gt;readAsString()&lt;/code&gt;&lt;/a&gt; have been created for this purpose, read a whole file, return its content and automatically close it. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;readAsBytes()&lt;/code&gt; method returns a &lt;code&gt;List&amp;lt;Uint8&amp;gt;&lt;/code&gt;, perfect to deal with &lt;code&gt;myFile1&lt;/code&gt; containing binary data. The &lt;code&gt;readAsString()&lt;/code&gt; method returns a &lt;code&gt;String&lt;/code&gt;, perfect to read the content of &lt;code&gt;myFile2&lt;/code&gt; containing alphanumerical characters. The &lt;code&gt;readAsLines()&lt;/code&gt; method can also be used, it will return a &lt;code&gt;List&amp;lt;String&amp;gt;&lt;/code&gt;, each lines being separated by &lt;code&gt;\n&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"myFile1:"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readAsBytes&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;take&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"myFile2:"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readAsString&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;substring&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="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"myFile2:"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readAsLines&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;take&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;myFile1:
(193, 10, 109, 2, 103, 107, 37, 10, 146, 214)
myFile2:
n2ZBmrSIql
myFile2:
(n2ZBmrSIqlF6M0P0JEMN3SKpR4kn1vGXKBH4KVNJK8x6cfvzZ8o9oc6f70kpmCNQn, X86yRGL4f2xJi0o4sbIWOWWZikO09dTNwC9Pt9ltOHLqByFLc847YeGk6gXlSDuGc)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same methods exist to write data to a file, with the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/writeAsBytes.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeAsBytes()&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/writeAsString.html" rel="noopener noreferrer"&gt;&lt;code&gt;writeAsString()&lt;/code&gt;&lt;/a&gt; ones. To avoid overwriting the data present in &lt;code&gt;myFile1&lt;/code&gt; and &lt;code&gt;myFile2&lt;/code&gt;, some data will be added to &lt;code&gt;myFile3&lt;/code&gt;, the only empty file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeAsBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ascii&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"new data added"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readAsString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeAsBytes&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mh"&gt;0x41&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x43&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readAsString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writeAsString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"this is a string"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;readAsString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;new data added
ABC
this is a string
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A file can also be copied with the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/copy.html" rel="noopener noreferrer"&gt;&lt;code&gt;copy()&lt;/code&gt;&lt;/a&gt; method by defining the path of a new file as first argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile1Copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;".copy"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1Copy&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1Copy&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile2Copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;".copy"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2Copy&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2Copy&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile3Copy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;".copy"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3Copy&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3Copy&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;{absolute: File: '/home/user/tmp/cboring/./file1.test.copy', hashCode: 934827110, isAbsolute: false, parent: Directory: '.', path: ./file1.test.copy, runtimeType: _File, uri: {scheme: , host: , path: file1.test.copy, fragment: }}
{accessed: 2026-09-01 03:57:26.553, changed: 2026-09-01 03:58:34.207, mode: 33204, modified: 2026-09-01 03:58:34.207, size: 8192, type: file}
{absolute: File: '/home/user/tmp/cboring/./file2.test.copy', hashCode: 1050809529, isAbsolute: false, parent: Directory: '.', path: ./file2.test.copy, runtimeType: _File, uri: {scheme: , host: , path: file2.test.copy, fragment: }}
{accessed: 2026-09-01 03:57:26.553, changed: 2026-09-01 03:58:34.235, mode: 33204, modified: 2026-09-01 03:58:34.235, size: 1122, type: file}
{absolute: File: '/home/user/tmp/cboring/file3.test.copy', hashCode: 604940007, isAbsolute: false, parent: Directory: '.', path: file3.test.copy, runtimeType: _File, uri: {scheme: , host: , path: file3.test.copy, fragment: }}
{accessed: 2026-09-01 03:57:26.585, changed: 2026-09-01 03:58:34.235, mode: 33204, modified: 2026-09-01 03:58:34.235, size: 16, type: file}

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.test &lt;span class="k"&gt;*&lt;/span&gt;.copy
&lt;span class="go"&gt;-rw-rw-r-- 1 user user 8192 Aug 31 14:15 file1.test
-rw-rw-r-- 1 user user 8192 Sep  1 03:58 file1.test.copy
-rw-rw-r-- 1 user user 1122 Aug 31 14:15 file2.test
-rw-rw-r-- 1 user user 1122 Sep  1 03:58 file2.test.copy
-rw-rw-r-- 1 user user   16 Aug 31 18:32 file3.test
-rw-rw-r-- 1 user user   16 Sep  1 03:58 file3.test.copy
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Renaming a file is also possible by using the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/rename.html" rel="noopener noreferrer"&gt;&lt;code&gt;rename()&lt;/code&gt;&lt;/a&gt; method by setting the new path of the file in the first argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile1Rename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile1Copy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;rename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;".new"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1Rename&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile1Rename&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile2Rename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile2Copy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;rename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;".new"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2Rename&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile2Rename&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;myFile3Rename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3Copy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;rename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;".new"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileToMap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3Rename&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="n"&gt;fileStat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myFile3Rename&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;{absolute: File: '/home/user/tmp/cboring/./file1.test.new', hashCode: 913418505, isAbsolute: false, parent: Directory: '.', path: ./file1.test.new, runtimeType: _File, uri: {scheme: , host: , path: file1.test.new, fragment: }}
{absolute: File: '/home/user/tmp/cboring/./file2.test.new', hashCode: 515199967, isAbsolute: false, parent: Directory: '.', path: ./file2.test.new, runtimeType: _File, uri: {scheme: , host: , path: file2.test.new, fragment: }}
{accessed: 2026-09-01 03:57:26.553, changed: 2026-09-01 04:02:28.533, mode: 33204, modified: 2026-09-01 04:02:28.533, size: 8192, type: file}
{accessed: 2026-09-01 03:57:26.553, changed: 2026-09-01 04:02:28.533, mode: 33204, modified: 2026-09-01 04:02:28.533, size: 1122, type: file}
{absolute: File: '/home/user/tmp/cboring/file3.test.new', hashCode: 783500576, isAbsolute: false, parent: Directory: '.', path: file3.test.new, runtimeType: _File, uri: {scheme: , host: , path: file3.test.new, fragment: }}
{accessed: 2026-09-01 03:57:26.585, changed: 2026-09-01 04:02:28.533, mode: 33204, modified: 2026-09-01 04:02:28.533, size: 16, type: file}

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.test &lt;span class="k"&gt;*&lt;/span&gt;.copy &lt;span class="k"&gt;*&lt;/span&gt;.new
&lt;span class="go"&gt;ls: cannot access '*.copy': No such file or directory
-rw-rw-r-- 1 user user 8192 Aug 31 14:15  file1.test
-rw-rw-r-- 1 user user 8192 Sep  1 04:02  file1.test.new
-rw-rw-r-- 1 user user 1122 Aug 31 14:15  file2.test
-rw-rw-r-- 1 user user 1122 Sep  1 04:02  file2.test.new
-rw-rw-r-- 1 user user   16 Aug 31 18:32  file3.test
-rw-rw-r-- 1 user user   16 Sep  1 04:02  file3.test.new
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a file is not needed anymore, it is also possible to remove it from the filesystem with the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/delete.html" rel="noopener noreferrer"&gt;&lt;code&gt;delete()&lt;/code&gt;&lt;/a&gt; method. It will return a &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;FileSystemEntity&lt;/code&gt;&lt;/a&gt; object (a superclass of &lt;code&gt;File&lt;/code&gt;). If the File object to remove is a directory, the &lt;a href="https://api.dart.dev/dart-io/File/delete.html" rel="noopener noreferrer"&gt;&lt;code&gt;recursive&lt;/code&gt;&lt;/a&gt; parameter can be set to remove all files recursively present in it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile1Rename&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile2Rename&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;myFile3Rename&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;File: './file1.test.new'
File: './file2.test.new'
File: 'file3.test.new'

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.test &lt;span class="k"&gt;*&lt;/span&gt;.copy &lt;span class="k"&gt;*&lt;/span&gt;.new
&lt;span class="go"&gt;ls: cannot access '*.copy': No such file or directory
ls: cannot access '*.new': No such file or directory
-rw-rw-r-- 1 user user 8192 Aug 31 14:15  file1.test
-rw-rw-r-- 1 user user 1122 Aug 31 14:15  file2.test
-rw-rw-r-- 1 user user   16 Aug 31 18:32  file3.test
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, the last method to see is the &lt;a href="https://api.dart.dev/dart-io/FileSystemEntity/watch.html" rel="noopener noreferrer"&gt;&lt;code&gt;watch()&lt;/code&gt;&lt;/a&gt; method. This one is probably one of the most interesting to investigate. The idea is to subscribe to the filesystem to follow the activity on a file, when a change happens, the &lt;code&gt;Stream&lt;/code&gt; object receives an event from it . On Linux, it uses the &lt;a href="https://manpages.debian.org/trixie/manpages/inotify.7.en.html" rel="noopener noreferrer"&gt;&lt;code&gt;inotify&lt;/code&gt; API interface&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;Duration&lt;/span&gt; &lt;span class="n"&gt;delay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;seconds:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&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;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;exit&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="n"&gt;Future&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;delayed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;File&lt;/span&gt; &lt;span class="n"&gt;toWatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"./watcher"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;toWatch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;Stream&lt;/span&gt; &lt;span class="n"&gt;watcher&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;toWatch&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;watch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;watcher&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code below is a bit more complex than usual. A &lt;code&gt;timeout&lt;/code&gt; closure is defined, it will stop the application after 10 seconds by calling the &lt;code&gt;exit()&lt;/code&gt; function. When watching a file in the main thread, the program will simply wait for event forever, the &lt;code&gt;timeout&lt;/code&gt; closure has been created to avoid being stuck in this loop.&lt;/p&gt;

&lt;p&gt;Then, the &lt;code&gt;./watcher&lt;/code&gt; file is created, and the &lt;code&gt;watcher&lt;/code&gt; &lt;code&gt;Stream&lt;/code&gt; is attached to it. Because it's a standard Stream, one can &lt;code&gt;listen()&lt;/code&gt; on event on it and do some actions.&lt;/p&gt;

&lt;p&gt;It's now possible to modify the file from another shell to see the changes happening while the application is running.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo test&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; watch.test
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo test&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; watch.test
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;echo test&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; watch.test
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;watcher
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart run
&lt;span class="go"&gt;FileSystemModifyEvent('./watcher', isDirectory=false, contentChanged=true)
FileSystemModifyEvent('./watcher', isDirectory=false, contentChanged=true)
FileSystemModifyEvent('./watcher', isDirectory=false, contentChanged=true)
FileSystemModifyEvent('./watcher', isDirectory=false, contentChanged=true)
FileSystemModifyEvent('./watcher', isDirectory=false, contentChanged=true)
FileSystemModifyEvent('./watcher', isDirectory=false, contentChanged=true)
FileSystemModifyEvent('./watcher', isDirectory=false, contentChanged=false)
FileSystemDeleteEvent('./watcher')
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;FileSystemEvent&lt;/code&gt; object returned identify the event applied to the file. It can be set to &lt;a href="https://api.dart.dev/dart-io/FileSystemEvent/create-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;create&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-io/FileSystemEvent/delete-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;delete&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://api.dart.dev/dart-io/FileSystemEvent/modify-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;modify&lt;/code&gt;&lt;/a&gt; or &lt;a href="https://api.dart.dev/dart-io/FileSystemEvent/move-constant.html" rel="noopener noreferrer"&gt;&lt;code&gt;move&lt;/code&gt;&lt;/a&gt;. Few of them will be only displayed when following the activity on a directory. For example, removing a file while watching it, and then recreate it will not work, but this action can be seen when watching a directory.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;At first, this post was planned to be a simple, quick and dirty introduction to file management in Dart in another article. In fine, it became a really long explanation about the whole file system API. The abstraction offered by Dart is coherent, simple and stable. In few lines of code, one can easily create, rename or delete files, but also read or write data from them. The support for the &lt;code&gt;iNotify&lt;/code&gt; API is a really good thing. As usual, a list of references if you want to dig a bit more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://api.dart.dev/dart-io/File-class.html" rel="noopener noreferrer"&gt;&lt;code&gt;File&lt;/code&gt; class API Documentation&lt;/a&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://medium.com/dart-tutorials/file-handling-in-dart-44982d018b72" rel="noopener noreferrer"&gt;File Handling in Dart&lt;/a&gt; by &lt;a href="https://medium.com/dart-tutorials" rel="noopener noreferrer"&gt;Dart Tutorial&lt;/a&gt; on Medium;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/jige2025/dart-lesson-17-file-operations-and-command-line-tool-kbe"&gt;Dart Lesson 17: file operations and command-line tool&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/jige2025"&gt;@jige2025&lt;/a&gt;; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/@/using-dart-to-create-custom-directories-and-files-for-your-new-flutter-project-cnh"&gt;Using Dart to create custom directories and files for your new Flutter project&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/tobacodes"&gt;@tobacodes&lt;/a&gt;; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/creativ_bracket/learn-dart-5-read-and-write-files-in-under-30-seconds-2bii"&gt;Learn Dart #5: Read and Write files in under 30 seconds&lt;/a&gt; by &lt;a class="mentioned-user" href="https://dev.to/creativ_bracket"&gt;@creativ_bracket&lt;/a&gt;. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy hacking and have fun!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@kellysikkema?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Kelly Sikkema&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/tax-forms-and-coffee-on-desk-8DEDp6S93Po?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dart</category>
      <category>filesystem</category>
      <category>file</category>
      <category>programming</category>
    </item>
    <item>
      <title>WeeklyReview#202635</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Mon, 31 Aug 2026 10:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/weeklyreview202635-1aa4</link>
      <guid>https://dev.to/niamtokik/weeklyreview202635-1aa4</guid>
      <description>&lt;p&gt;Finally, someone said it loudly on a podcast, the &lt;a href="https://x.com/thestanduppod/status/2091511392717213707?s=20" rel="noopener noreferrer"&gt;open-source communities are full of f* goblin with a shitty mindset&lt;/a&gt; destroying the hobbyist fun and blocking the real innovation from hackers/engineers by forcing other people to be agree with their political point of view. It's refreshing to watch a short video on this topic, because it was one of the most important reason I did not participate anymore on Open-source projects, especially BSD systems. This guy is doing a great summary: we don't care of your sex, gender, political beliefs or your age. We are hobbyist, hackers, engineers. We are fixing problems by giving solutions. We are NOT involved in politic, and if it's the case, this is not the place to talk about it. In France, during family meeting, we are trying to avoid few topics: religion, politic and most of the controversial news. Why? By To avoid conflict(s) during a time where everyone can be there. It's rare. It's precious. It's called respect. Be respectable, and everything will be fine.&lt;/p&gt;

&lt;p&gt;About my posts on this "public note pad". The first articles were focused on learning Dart and Flutter, they were kinda short, and based on documentation, tutorials, tests and examples. The next publications are way more complex, and will involve more knowledge and tests on my side. In fact, one of my project (and future product) was already delayed of one month due to the many - unexpected - things I did during July and August. Anyway, not a promise, just a quick note to explain my current situation.&lt;/p&gt;

&lt;p&gt;About dev.to, a quick feedback. I'm now using it for all my technical publication and to be honest, it's not the best place to put your information. In 3 or 4 months, the service was down many time. When editing a long article, sometimes the modifications are not saved on the server side (happened to me many time, and it's... ANNOYING). How a service like that can host so many authors? Where is the reliability? I wanted to avoid doing my own servers, but I think that's what we got for a free service.&lt;/p&gt;

&lt;h1&gt;
  
  
  Coding
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://dart.dev/blog/bringing-primary-constructors-to-dart" rel="noopener noreferrer"&gt;&lt;strong&gt;Bringing Primary Constructors to Dart&lt;/strong&gt;&lt;/a&gt;: after the 3.13 version, it will be now possible to use the &lt;code&gt;new&lt;/code&gt; keyboard to define named/unnamed constructor as well as factory. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;A&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;B&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;factory&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kd"&gt;factory&lt;/span&gt; &lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📝 &lt;a href="https://flutter.dev/blog/desktop-windowing-apis" rel="noopener noreferrer"&gt;&lt;strong&gt;Introducing the Desktop Windowing API for Flutter&lt;/strong&gt;&lt;/a&gt;:  Learn about the design behind the new Desktop Windowing API and write your first multi-window Flutter application. &lt;/p&gt;

&lt;h1&gt;
  
  
  System
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://anarc.at/blog/2026-02-18-iproute2/" rel="noopener noreferrer"&gt;&lt;strong&gt;net-tools to iproute cheat sheet&lt;/strong&gt;&lt;/a&gt;: a nice way to remember the commands between &lt;code&gt;ip&lt;/code&gt; and the legacy net-tools packages (including &lt;code&gt;ifconfig&lt;/code&gt;) on Linux. The same should be done between Linux, BSDs and MacOS.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/ufrisk/MemProcFS" rel="noopener noreferrer"&gt;&lt;strong&gt;MemProcFS&lt;/strong&gt;&lt;/a&gt;: MemProcFS is an easy and convenient way of viewing physical memory as files in a virtual file system.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/grafana/beyla" rel="noopener noreferrer"&gt;&lt;strong&gt;Beyla project&lt;/strong&gt;&lt;/a&gt;: eBPF-based autoinstrumentation of web applications and network metrics. An interesting tool to collect metrics on web server using eBPF (so, linux-only), the &lt;a href="https://grafana.com/oss/beyla-ebpf/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; looks good as well. I was looking for something similar few years ago, to collect &lt;a href="https://grafana.com/docs/beyla/latest/network/quickstart/" rel="noopener noreferrer"&gt;network metrics&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/zer0condition/GoodmansKernel" rel="noopener noreferrer"&gt;&lt;strong&gt;The Goodmans Kernel project&lt;/strong&gt;&lt;/a&gt;: Run unsigned kernel payloads in a signed kernel driver via wasm3. No JIT/W^x (HVCI/etc., compliant)&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/platformersdev/kubectl-x" rel="noopener noreferrer"&gt;&lt;strong&gt;kubectl x project&lt;/strong&gt;&lt;/a&gt;: A kubectl plugin that runs commands against every context in your kubeconfig file in parallel.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/majd/ipatool" rel="noopener noreferrer"&gt;&lt;strong&gt;ipatool project&lt;/strong&gt;&lt;/a&gt;: Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://maderix.github.io/articles/inside-the-m4-ane-part-1/" rel="noopener noreferrer"&gt;&lt;strong&gt;Reverse Engineering: How we bypassed CoreML and talked directly to the hardware&lt;/strong&gt;&lt;/a&gt;: a series of article about Apple M1 CPU ANE graph execution engine, and how to bypass CoreML interface.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://labs.iximiuz.com/tutorials/docker-multi-stage-builds" rel="noopener noreferrer"&gt;&lt;strong&gt;How to Build Smaller Container Images: Docker Multi-Stage Builds&lt;/strong&gt;&lt;/a&gt;: A tutorial to build small sized containers with docker multi stage, using node.js as example.&lt;/p&gt;

&lt;h1&gt;
  
  
  Network
&lt;/h1&gt;

&lt;p&gt;🌐 &lt;a href="https://whoami.moe/" rel="noopener noreferrer"&gt;&lt;strong&gt;Who Am I&lt;/strong&gt;&lt;/a&gt;: another "what's my ip" service, displaying more information than usual. I like it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://blog.silentsignal.eu/2020/05/04/decrypting-and-analyzing-https-traffic-without-mitm/" rel="noopener noreferrer"&gt;&lt;strong&gt;Decrypting and analyzing HTTPS traffic without MITM&lt;/strong&gt;&lt;/a&gt;: a way to decrypt HTTPS traffic using PCAP and BURP SUITE.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.mobile-hacker.com/2026/08/20/how-easy-is-it-to-scan-a-contactless-payment-and-access-card/" rel="noopener noreferrer"&gt;&lt;strong&gt;How Easy Is It to Scan a Contactless Payment and Access Card?&lt;/strong&gt;&lt;/a&gt;: a post about NFC scanning and cloning.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.mobile-hacker.com/2026/06/14/smart-glasses-can-record-you-and-detecting-them-isnt-so-simple/" rel="noopener noreferrer"&gt;&lt;strong&gt;Smart Glasses Can Record You – And Detecting Them Isn’t So Simple&lt;/strong&gt;&lt;/a&gt;: those glasses can potentially be detected using bluetooth but it depends on the manufacturers (and the spec). When the glasses are connected, they are not broadcasting data anymore.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://xakcop.com/post/ex220/" rel="noopener noreferrer"&gt;&lt;strong&gt;Reversing TP-Link EX220 from A1&lt;/strong&gt;&lt;/a&gt;: a quick article about reversing a firewall/router.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/hasherezade/pe-bear" rel="noopener noreferrer"&gt;&lt;strong&gt;PE-bear project&lt;/strong&gt;&lt;/a&gt;: a multiplatform reversing tool for PE files. Its objective is to deliver fast and flexible “first view” for malware analysts, stable and capable to handle malformed PE files. see also the &lt;a href="https://hshrzd.wordpress.com/pe-bear/" rel="noopener noreferrer"&gt;author's blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.phoronix.com/news/Linux-Kernel-CVEs-Nearly-2000" rel="noopener noreferrer"&gt;&lt;strong&gt;The Linux Kernel Is Approaching 2,000 CVEs Per Release&lt;/strong&gt;&lt;/a&gt;: I don't really think the Linux kernel will be able to stay in the game with its current structure. The only good answer would have been to use a micro-kernel (Linux is a Minix-clone), it's simpler, easier to maintain and in fine, more isolated. What's scary here is the amount of unpatched old-Linux still running everywhere. I don't know what will happen in the future, but the old mantra "Linux is safer than Windows" is going to break.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://stackbits.eu/blog/bdcore_part1.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Vulnerability Research on Bitdefender's Antivirus Engine&lt;/strong&gt;&lt;/a&gt;: the first part of a series of article about antivirus analysis and fuzzing. The last sections of this publication are talking about fuzzing BitDefender with &lt;a href="https://github.com/google/honggfuzz" rel="noopener noreferrer"&gt;honggfuzz&lt;/a&gt;. I'm waiting for the next part!&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/Cryptography
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://sigreturn.com/papers/time-as-a-key/" rel="noopener noreferrer"&gt;&lt;strong&gt;Time as a Key: Breaking Rhysida Ransomware with the Attacker’s Own Ciphertext&lt;/strong&gt;&lt;/a&gt;: the story behind the Rhysida Ransomware. A &lt;a href="https://x.com/ech0re/status/2091293244483133873" rel="noopener noreferrer"&gt;X/twitter thread&lt;/a&gt; and a &lt;a href="https://sigreturn.com/blog/rhysida-analysis-decryption/" rel="noopener noreferrer"&gt;simplified version of the story&lt;/a&gt; by the author can be read. In short, the IV (initialization vector) and the keys are generated using the &lt;code&gt;rand&lt;/code&gt; function (derived from &lt;code&gt;srand&lt;/code&gt; function). Those functions are both linked to the &lt;code&gt;time&lt;/code&gt; function, and when executed many times or in parallel, this function return the same value. If one knows the seed (the parameter passed to the &lt;code&gt;srand&lt;/code&gt; function), then one is able to decipher encrypted files. The analysis from the paper, the blog post and the x/twitter thread is amazing. A must read.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/crypto101/book" rel="noopener noreferrer"&gt;&lt;strong&gt;Crypto 101: the book&lt;/strong&gt;&lt;/a&gt;: The source code of the Crypto101 book. Nothing to add, just a good reference.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.bfswa.blog/p/blood-meridian-131" rel="noopener noreferrer"&gt;&lt;strong&gt;Blood MERIDIAN: LLM cryptanalysis of a blockcipher that is isn't a blockcipher&lt;/strong&gt;&lt;/a&gt;: an interesting LLM session using GPT-5.6 Sol to break a "blockcipher" (&lt;a href="https://eprint.iacr.org/2026/856" rel="noopener noreferrer"&gt;MERIDIAN&lt;/a&gt;). No test vectors have been shared on the specification, and the LLM found an issue.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://v12.sh/blog/signal" rel="noopener noreferrer"&gt;&lt;strong&gt;Compromising Signal's Contact Discovery Enclave&lt;/strong&gt;&lt;/a&gt;: V12 found two critical object-lifetime vulnerabilities that allow the untrusted host server to break the enclave boundary.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://zknox.eth.limo/posts/2026/03/26/privacy-pools-postmortem.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Privacy Pools: Anatomy of a 53-bit Entropy Collapse&lt;/strong&gt;&lt;/a&gt;: a type coercion bug reducing the entropy of master keys from 256 bits to 53 bits. interesting post-mortem and analysis.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://therealclarity.github.io/blog/clearsword/" rel="noopener noreferrer"&gt;&lt;strong&gt;Into the Dark - DarkSword Kernel Exploit Writeup&lt;/strong&gt;&lt;/a&gt;: a post about iOS DarkSword vulnerability (&lt;a href="https://nvd.nist.gov/vuln/detail/cve-2025-43520" rel="noopener noreferrer"&gt;CVE-2025-43520&lt;/a&gt;). It uses an exploitable race condition in the virtual file system to allocate kernel memory. Really interesting, but a bit complex to follow on my side, I don't really know how iOS is working under the hood.&lt;/p&gt;

&lt;p&gt;📑 &lt;a href="https://www.mdpi.com/2410-387X/10/5/62" rel="noopener noreferrer"&gt;&lt;strong&gt;Regev’s Attack on Hyperelliptic Cryptosystems&lt;/strong&gt;&lt;/a&gt;: &lt;a href="https://en.wikipedia.org/wiki/Hyperelliptic_curve" rel="noopener noreferrer"&gt;Hyperelliptic curves&lt;/a&gt; (yet another thing I don't know) are an alternative to ECC. I simply read the introduction, to know what a "hyperelliptic curve" was. It looks complex, like the elliptic curves.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/BlueTeam
&lt;/h1&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/BishopFox/sliver" rel="noopener noreferrer"&gt;&lt;strong&gt;Sliver project&lt;/strong&gt;&lt;/a&gt;: "an open source cross-platform adversary emulation/red team framework, it can be used by organizations of all sizes to perform security testing. Sliver's implants support C2 over Mutual TLS (mTLS), WireGuard, HTTP(S), and DNS and are dynamically compiled with per-binary asymmetric encryption keys."&lt;/p&gt;

&lt;h1&gt;
  
  
  Security/RedTeam
&lt;/h1&gt;

&lt;p&gt;📑 &lt;a href="https://sansorg.egnyte.com/dl/j8w7bJpG97kC" rel="noopener noreferrer"&gt;&lt;strong&gt;Tips and Scripts for Reconnaissance and Scanning&lt;/strong&gt;&lt;/a&gt;: an old publication listing methods to scan hosts.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://ratctf.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;RatCTF&lt;/strong&gt;&lt;/a&gt;: yet another capture the flag challenges website.&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://it4sec.substack.com/p/hacking-hardware-security-key-into" rel="noopener noreferrer"&gt;&lt;strong&gt;Hacking hardware security key into an air-gap-jumping worm: the hidden features of a YubiKey&lt;/strong&gt;&lt;/a&gt;: using yubikeys as attack vector by using logical usage modification to propagate worms (or take control of devices). The full talk can be seen on &lt;a href="https://www.youtube.com/watch?v=rXy1WvPkXIM" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://hackers-arise.com/web-app-hacking-six-tools-for-bug-hunters/" rel="noopener noreferrer"&gt;&lt;strong&gt;Web App Hacking: Six Tools for Bug Hunters&lt;/strong&gt;&lt;/a&gt;: a list of tools to find bugs on web application, &lt;a href="https://github.com/jaeles-project/gospider" rel="noopener noreferrer"&gt;gospider&lt;/a&gt; (webcrawling/spider), &lt;a href="https://github.com/m4ll0k/SecretFinder" rel="noopener noreferrer"&gt;SecretFinder&lt;/a&gt; (discover sensitive information), &lt;a href="https://github.com/BishopFox/jsluice" rel="noopener noreferrer"&gt;jsluice&lt;/a&gt; (javascript source code secret extractor), &lt;a href="https://github.com/xnl-h4ck3r/xnLinkFinder" rel="noopener noreferrer"&gt;xnLinkFinder&lt;/a&gt; (discovering tool), &lt;a href="https://github.com/hahwul/dalfox" rel="noopener noreferrer"&gt;Dalfox&lt;/a&gt; (XSS scanner), &lt;a href="https://github.com/caido/caido" rel="noopener noreferrer"&gt;Caido&lt;/a&gt; (web audit tool).&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/Azr43lKn1ght/DFIR-LABS" rel="noopener noreferrer"&gt;&lt;strong&gt;DFIR-LAB project&lt;/strong&gt;&lt;/a&gt;: a compilation of challenges that aims to provide practice in simple to advanced concepts in the following topics: Digital Forensics, Incident Response, Malware Analysis and Threat Hunting.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/Whispergate/InfraGuard" rel="noopener noreferrer"&gt;&lt;strong&gt;InfraGuard project&lt;/strong&gt;&lt;/a&gt;: Red team infrastructure tracker and C2 redirector -- a modern alternative to &lt;a href="https://github.com/mgeeky/RedWarden" rel="noopener noreferrer"&gt;RedWarden&lt;/a&gt;. InfraGuard sits between the internet and your C2 teamserver, validating every inbound request against your malleable C2 profile and blocking anything that doesn't conform. Scanners, bots, and blue team probes get redirected to a decoy site while legitimate beacon traffic passes through to your teamserver.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://kitploit.com/en" rel="noopener noreferrer"&gt;&lt;strong&gt;KitPloit&lt;/strong&gt;&lt;/a&gt;: Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://hackers-arise.com/open-source-intelligence-osint-using-osiris-for-global-intelligence/" rel="noopener noreferrer"&gt;&lt;strong&gt;Open Source Intelligence (OSINT): Using Osiris for Global Intelligence&lt;/strong&gt;&lt;/a&gt;: an article on the open-source &lt;a href="https://github.com/simplifaisoul/osiris.git" rel="noopener noreferrer"&gt;Osiris&lt;/a&gt;, a tool, used to collect global information (e.g. cctv, aircraft, critical infrastructure, dangerous zone...). Kinda interesting and can run locally.&lt;/p&gt;

&lt;h1&gt;
  
  
  Update/Upgrade
&lt;/h1&gt;

&lt;p&gt;🔄 &lt;a href="https://community.ui.com/releases/Security-Advisory-Bulletin-067/fc4a3488-7c43-4628-8bab-f715e96dbfc9" rel="noopener noreferrer"&gt;&lt;strong&gt;Unifi Security Advisory Bulletin 067&lt;/strong&gt;&lt;/a&gt;: 22 critical security issues to patch, with CVSS score &amp;gt;8. Kudos for the one with a score of 10.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://dart.dev/blog/announcing-dart-3-13" rel="noopener noreferrer"&gt;&lt;strong&gt;Announcing Dart 3.13, Bringing conciseness and simplicity to Dart codebases, tooling, and platforms.&lt;/strong&gt;&lt;/a&gt;: Primary constructors, improvement of the dart formatter and much more.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://github.com/elixir-lang/elixir/releases/tag/v1.19.6" rel="noopener noreferrer"&gt;&lt;strong&gt;Elixir v1.19.6 security release&lt;/strong&gt;&lt;/a&gt;: this release patch the &lt;a href="https://github.com/elixir-lang/elixir/security/advisories/GHSA-jf5q-v438-665c" rel="noopener noreferrer"&gt;CVE-2026-75758&lt;/a&gt;, allowing an attacker to crash a node by memory exhaustion with the help of an unsanatized char list used in &lt;code&gt;IO.inspect/1&lt;/code&gt; function. This function is used by the &lt;a href="https://github.com/elixir-lang/elixir/blob/0c8f1feb3af7c6f9e7958463dede1d6cab4be61b/lib/logger/lib/logger.ex" rel="noopener noreferrer"&gt;&lt;code&gt;Logger&lt;/code&gt;&lt;/a&gt; module (see &lt;a href="https://github.com/elixir-lang/elixir/blob/0c8f1feb3af7c6f9e7958463dede1d6cab4be61b/lib/logger/lib/logger/translator.ex" rel="noopener noreferrer"&gt;&lt;code&gt;translator.ex&lt;/code&gt;&lt;/a&gt;) to print Elixir/Erlang data-structure. It would be fun to try exploiting it in some way.&lt;/p&gt;

&lt;p&gt;🔄 &lt;a href="https://www.qubes-os.org/news/2026/08/29/qsb-118/" rel="noopener noreferrer"&gt;&lt;strong&gt;QSB-118: Dom0 arbitrary code execution in qvm-copy-to-vm error reporting&lt;/strong&gt;&lt;/a&gt;: in short, a wrongly sanitized string from a compromised qube (domU) can be used to execute arbitrary code in dom0. The sanitizer is not removing the backtick character from the filename, leading to arbitrary code execution via the &lt;code&gt;system()&lt;/code&gt; function. A dirty bug impacting all QubeOS version.&lt;/p&gt;

&lt;h1&gt;
  
  
  Embedded
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://www.bunniestudios.com/blog/2026/baochip-1x-a-mostly-open-22nm-soc-for-high-assurance-applications/" rel="noopener noreferrer"&gt;&lt;strong&gt;Baochip-1x: A Mostly-Open, 22nm SoC for High Assurance Applications&lt;/strong&gt;&lt;/a&gt;: a security chip made by Bunnie, project created via the &lt;a href="https://betrusted.io/" rel="noopener noreferrer"&gt;betrusted initiative&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://drewdevault.com/blog/Hermes-from-the-ground-up/" rel="noopener noreferrer"&gt;&lt;strong&gt;Redesigning my microkernel from the ground up&lt;/strong&gt;&lt;/a&gt;: an experimental microkernel inspired by Sel4, called &lt;a href="https://git.sr.ht/~sircmpwn/hermes" rel="noopener noreferrer"&gt;ares&lt;/a&gt;, which is a full rewrite of &lt;a href="https://sr.ht/~sircmpwn/helios/" rel="noopener noreferrer"&gt;helios&lt;/a&gt;. This article also talks a bit about &lt;a href="https://git.sr.ht/~sircmpwn/bunnix" rel="noopener noreferrer"&gt;bunnix&lt;/a&gt;, an Unix-like OS implemented by the same author.&lt;/p&gt;

&lt;p&gt;▶️ &lt;a href="https://www.youtube.com/watch?v=nruUuDalNR0" rel="noopener noreferrer"&gt;&lt;strong&gt;Extracting Firmware from Embedded Devices (SPI NOR Flash)&lt;/strong&gt;&lt;/a&gt;: a really great video about extracting firmware, using &lt;a href="https://en.wikipedia.org/wiki/Flash_memory#Distinction_between_NOR_and_NAND_flash" rel="noopener noreferrer"&gt;NOR Flash&lt;/a&gt; via &lt;a href="https://en.wikipedia.org/wiki/Serial_Peripheral_Interface" rel="noopener noreferrer"&gt;SPI protocol bus&lt;/a&gt; with the help of a logical analyzer (&lt;a href="https://www.saleae.com/logic" rel="noopener noreferrer"&gt;saleae&lt;/a&gt;) and &lt;a href="https://hydrabus.com/?v=82a9e4d26595" rel="noopener noreferrer"&gt;hydrabus&lt;/a&gt;. In short, this is a man in the middle attack by reading the data directly from the microcontroller to the memory.&lt;/p&gt;

&lt;p&gt;📟 &lt;a href="https://www.cnx-software.com/2026/08/25/299-arduino-ventuno-q-sbc-combines-qualcomm-dragonwing-iq8-soc-and-stm32h5-mcu/" rel="noopener noreferrer"&gt;&lt;strong&gt;$299 Arduino Ventuno Q SBC combines Qualcomm Dragonwing IQ8 SoC and STM32H5 MCU&lt;/strong&gt;&lt;/a&gt;: Quick introduction to the &lt;a href="https://www.arduino.cc/product-ventuno-q" rel="noopener noreferrer"&gt;Arduino Ventuno Q&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Kryo#Kryo_600_Series" rel="noopener noreferrer"&gt;Octa-core Kryo Gen 6&lt;/a&gt;, Adreno A623, 16GB LPDDR5, 64GB eMMC flash, M.2 socket for NVMe Gen4 SSD, 2.5GbE RJ45 port.&lt;/p&gt;

&lt;p&gt;📟 &lt;a href="https://www.tindie.com/products/nn_6394/at-lora-usb-dongle/" rel="noopener noreferrer"&gt;&lt;strong&gt;AT LoRa USB Dongle&lt;/strong&gt;&lt;/a&gt;: USB device that lets you send and receive LoRa wireless data using simple AT commands. No coding needed. Good for testing and development.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://rfconsult.uk/" rel="noopener noreferrer"&gt;&lt;strong&gt;Free RF Tools for Engineers, Radio Amateurs &amp;amp; Students&lt;/strong&gt;&lt;/a&gt;: A long list of tools to help with calculations, design and so on for RF engineers and radio amateurs.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://hackaday.com/2026/08/28/building-a-headless-game-boy-emulator/" rel="noopener noreferrer"&gt;&lt;strong&gt;Building A Headless Game Boy Emulator&lt;/strong&gt;&lt;/a&gt;: great project with an ESP32! the ESP32 here is used as server, offering an access to the emulator on Wifi. Other people can also play as well. &lt;/p&gt;

&lt;h1&gt;
  
  
  Misc
&lt;/h1&gt;

&lt;p&gt;📝 &lt;a href="https://ipshipyard.com/blog/2026-the-end-of-ipfs-at-shipyard/" rel="noopener noreferrer"&gt;&lt;strong&gt;The end of IPFS at Shipyard&lt;/strong&gt;&lt;/a&gt;: P2P distributed storage is hard to maintain, I know this by experience with one of my last mission. The infrastructure cost is huge, even more if no one knows how to deploy really low-cost distributed systems around the world. IPFS is impacted as well by those issues, and when one partner is leaving, it will be hard to continue. I hope IPFS will not shutdown because of that, it's a great technology and it would be really sad to see it disappears.&lt;/p&gt;

&lt;p&gt;📟 &lt;a href="https://www.broachlink.com/product/noah5b-139.html" rel="noopener noreferrer"&gt;&lt;strong&gt;noah5b motherboard&lt;/strong&gt;&lt;/a&gt;: I wanted to upgrade my firewall (an old &lt;a href="https://pcengines.ch/apu2.htm" rel="noopener noreferrer"&gt;PC ENGINE APU2&lt;/a&gt;) and just learnt &lt;a href="https://pcengines.ch/eol.htm" rel="noopener noreferrer"&gt;PC Engine will not produce them anymore&lt;/a&gt;. Instead, &lt;a href="//broachlink.com"&gt;Broachlink&lt;/a&gt; will offer similar &lt;a href="https://www.broachlink.com/product/c18.html" rel="noopener noreferrer"&gt;motherboards&lt;/a&gt; called &lt;a href="https://www.broachlink.com/product/noah5b-139.html" rel="noopener noreferrer"&gt;Noah&lt;/a&gt;. This is looking great, and are not so expensive &lt;sup id="fnref1"&gt;1&lt;/sup&gt; &lt;br&gt;
&lt;sup id="fnref2"&gt;2&lt;/sup&gt; &lt;sup id="fnref3"&gt;3&lt;/sup&gt; &lt;sup id="fnref4"&gt;4&lt;/sup&gt; (between €300 and €400). &lt;a href="https://github.com/rackmatrix/noah-driver" rel="noopener noreferrer"&gt;Linux drivers&lt;/a&gt; are available on Github.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://www.icij.org/investigations/coin-laundry/crypto-atm-operator-bitcoin-depot-files-for-bankruptcy/" rel="noopener noreferrer"&gt;&lt;strong&gt;Crypto ATM operator Bitcoin Depot files for bankruptcy&lt;/strong&gt;&lt;/a&gt;: the world largest cryptocurrency ATM is filed with bankruptcy due to fraud allegations (hundred millions of dollars annually). $389 millions dollars lost due to scams, involving Bitcoin Depot machines. In 2025, $1.5 million scams transactions had passed through hundred of ATMs.&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/FermataRest/cyberleek-leak-research" rel="noopener noreferrer"&gt;&lt;strong&gt;GTA 6 Leaks &amp;amp; Cyberleek Investigation Report&lt;/strong&gt;&lt;/a&gt;: a repository containing the complete investigation of the GTA 6 leaks.&lt;/p&gt;

&lt;p&gt;📟 &lt;a href="https://www.crowdsupply.com/techxartisan/openterface-keymod" rel="noopener noreferrer"&gt;&lt;strong&gt;Openterface KeyMod, Pocket USB multi-tool bridge for tech, professionals and gaming&lt;/strong&gt;&lt;/a&gt;: interesting concept to transform a smartphone into many different input device.&lt;/p&gt;

&lt;p&gt;📝 &lt;a href="https://krebsonsecurity.com/2026/08/two-alleged-teampcp-hackers-arrested-in-australia/" rel="noopener noreferrer"&gt;&lt;strong&gt;Two Alleged ‘TeamPCP’ Hackers Arrested in Australia&lt;/strong&gt;&lt;/a&gt;: arrested due to multiple information leaks from SpyCloud, RaidForums, Nulled, and a gmail address used on many other website. Being anonymous on the web is nearly impossible, even for the scammers and criminals. A &lt;a href="https://risky.biz/RBFEATURES37/" rel="noopener noreferrer"&gt;Risky Business podcast&lt;/a&gt; is talking about this story.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://privatekeys.info/" rel="noopener noreferrer"&gt;&lt;strong&gt;privatekeys.info&lt;/strong&gt;&lt;/a&gt;: a "game" to crack bitcoin and ethereum private key. Pick a number between &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;pow(2, 256)&lt;/code&gt; and voilà, you are now rich and famous!&lt;/p&gt;

&lt;p&gt;🏗️ &lt;a href="https://github.com/DavidCarliez/trustmebro" rel="noopener noreferrer"&gt;&lt;strong&gt;trustmebro project&lt;/strong&gt;&lt;/a&gt;: Bypass llm guardrails by confusing it with fabricated tool output.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs2othcx3tjt12c5cbpee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs2othcx3tjt12c5cbpee.png" alt=" " width="662" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhm9pm7nli1snfmp7xruo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhm9pm7nli1snfmp7xruo.png" alt=" " width="534" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwb7jcblemrb1j7a2ftct.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwb7jcblemrb1j7a2ftct.png" alt="I don't know how to write handcrafted code anymore" width="640" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7yal8gxp8tgpsg6f2kd1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7yal8gxp8tgpsg6f2kd1.png" alt="Pathetic" width="560" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkf5bv7sj21y53kg2gqoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkf5bv7sj21y53kg2gqoj.png" alt=" " width="679" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F26shm82miy5znj5frqp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F26shm82miy5znj5frqp9.png" alt=" " width="547" height="680"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4p6eo22dnjsb8a72u3hl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4p6eo22dnjsb8a72u3hl.png" alt=" " width="680" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4yzl4asu59uids23vsqn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4yzl4asu59uids23vsqn.png" alt="I lied, I don't have netflix" width="680" height="603"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2n3ia5syekibcowjgk5m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2n3ia5syekibcowjgk5m.png" alt="Cybersecurity zombie nephew" width="680" height="620"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Legend:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;symbol&lt;/th&gt;
&lt;th&gt;usage&lt;/th&gt;
&lt;th&gt;example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;▶️&lt;/td&gt;
&lt;td&gt;video&lt;/td&gt;
&lt;td&gt;youtube&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🏗️&lt;/td&gt;
&lt;td&gt;project&lt;/td&gt;
&lt;td&gt;git repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📝&lt;/td&gt;
&lt;td&gt;informal publication&lt;/td&gt;
&lt;td&gt;blog post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🎥&lt;/td&gt;
&lt;td&gt;live&lt;/td&gt;
&lt;td&gt;twitch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🏛️&lt;/td&gt;
&lt;td&gt;definition&lt;/td&gt;
&lt;td&gt;wikipedia&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🌐&lt;/td&gt;
&lt;td&gt;regular website&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📑&lt;/td&gt;
&lt;td&gt;academic or scientific publication&lt;/td&gt;
&lt;td&gt;arxiv&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔄&lt;/td&gt;
&lt;td&gt;software new release, update or ugprade&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📟&lt;/td&gt;
&lt;td&gt;device&lt;/td&gt;
&lt;td&gt;embedded hardware&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@didpics?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Didier VEILLON&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/a-field-of-corn-with-the-sun-shining-through-the-leaves-QunE8iVvjmY?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://en.varia-store.com/product/broachlink-bl-noah5-tpm-8-423111-mainboard-motherboard/" rel="noopener noreferrer"&gt;Noah 5 TPM 2.0 Firewall Router Motherboard Intel E3845, 8GB RAM&lt;/a&gt; (€326.80)&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;&lt;a href="https://en.varia-store.com/product/broachlink-bl-noah5-e3845-v10-8gb-423109-mainboard-motherboard/" rel="noopener noreferrer"&gt;Noah 5 Firewall Router Motherboard Intel E3845, 8GB RAM, Fanless&lt;/a&gt; (€313.50)&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;p&gt;&lt;a href="https://www.alibaba.com/product-detail/Broachlink-NOAH6-Intel-E3845-3RJ45-1SFP_1601301805816.html" rel="noopener noreferrer"&gt;Broachlink NOAH6 Intel E3845 3RJ45 1SFP Pfsense Firewall Mainboard Embedded Server Motherboard VPN Router Motherboard with SFP&lt;/a&gt; (€103)&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn4"&gt;
&lt;p&gt;&lt;a href="https://shop.retiaglobal.com/products/noah-5-firewall-router-motherboard-intel-e3845-4-cores-1-91-ghz" rel="noopener noreferrer"&gt;Noah 5 Firewall Router Motherboard Intel E3845, 4 cores 1.91 GHz&lt;/a&gt; (€180)&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>weekly</category>
      <category>review</category>
      <category>link</category>
      <category>followup</category>
    </item>
    <item>
      <title>Q&amp;D: Dart/Flutter Formatter, Linter and Analyzer</title>
      <dc:creator>Mathieu Kerjouan</dc:creator>
      <pubDate>Sat, 29 Aug 2026 08:00:00 +0000</pubDate>
      <link>https://dev.to/niamtokik/qd-dartflutter-analyze-and-linter-2ank</link>
      <guid>https://dev.to/niamtokik/qd-dartflutter-analyze-and-linter-2ank</guid>
      <description>&lt;p&gt;A clean project following conventions is way better than a crappy project containing yolo code. In Dart and Flutter, everything is already available to make your life easier.&lt;/p&gt;

&lt;h1&gt;
  
  
  Formatter
&lt;/h1&gt;

&lt;p&gt;A formatter is already present with the Dart SDK. The command &lt;code&gt;dart format&lt;/code&gt; will do the job. If one wants to see only the modification without applying them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart format show
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;dart format&lt;/code&gt; is a shortcut for &lt;code&gt;dart format write&lt;/code&gt;, meaning it will apply all changes by default.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart format write
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More information can be available here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dart.dev/tools/dart-format" rel="noopener noreferrer"&gt;Dart Format&lt;/a&gt; from the official Dart Documentation;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.flutter.dev/tools/formatting" rel="noopener noreferrer"&gt;Flutter Formatting&lt;/a&gt; from the official Flutter documentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/dart_style/wiki/FAQ" rel="noopener noreferrer"&gt;Dart Style FAQ&lt;/a&gt; from the Official Dart Wiki.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Analyzer
&lt;/h1&gt;

&lt;p&gt;An analyzer is also present by default with the SDK. The command &lt;code&gt;dart analyze&lt;/code&gt; will analyze the code and print all potentials issues to fix.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart analyze
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same command is available with Flutter, only the output will change a bit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;flutter analyze
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More information can be found there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dart.dev/tools/dart-analyze" rel="noopener noreferrer"&gt;Dart Analyze&lt;/a&gt; from the Official Dart Documentation;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://pub.dev/packages/analyzer" rel="noopener noreferrer"&gt;Dart Analyzer Package&lt;/a&gt; on pub.dev;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/dart-lang/sdk/tree/main/pkg/analyzer" rel="noopener noreferrer"&gt;Dart Analyze Source Code&lt;/a&gt; from the official Dart Github Repository.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Auto Fix
&lt;/h1&gt;

&lt;p&gt;It's also possible to auto-fix the issues by using the &lt;code&gt;dart fix&lt;/code&gt; command. It was never a good idea to apply those kind of commands in the past, and to be honest, I am not a big fan of that, but here how to use them anyway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart fix &lt;span class="nt"&gt;--dry-run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dart fix &lt;span class="nt"&gt;--apply&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More information can be found on the &lt;a href="https://dart.dev/tools/dart-fix" rel="noopener noreferrer"&gt;Dart Fix page&lt;/a&gt; from the Official Dart Documentation website.&lt;/p&gt;

&lt;h1&gt;
  
  
  Execution
&lt;/h1&gt;

&lt;p&gt;Unfortunately, it seems Dart and Flutter cannot create command aliases or shortcut via the &lt;code&gt;pubspec.yaml&lt;/code&gt; to execute recurrent commands like it can be found on &lt;code&gt;Mix&lt;/code&gt;, &lt;code&gt;rebar3&lt;/code&gt; or even &lt;code&gt;npm&lt;/code&gt;. In this case, using a &lt;code&gt;Makefile&lt;/code&gt; can do the job. Here the one created for my project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="c"&gt;# GNU Makefile
&lt;/span&gt;&lt;span class="nv"&gt;EMULATOR_ANDROID&lt;/span&gt; &lt;span class="o"&gt;?=&lt;/span&gt; NameOfTheAndroidEmulator

&lt;span class="nv"&gt;.PHONY&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; all
&lt;span class="nl"&gt;all&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;test run-android&lt;/span&gt;

&lt;span class="nv"&gt;.PHONY&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; format
&lt;span class="nl"&gt;format&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        dart format .

&lt;span class="nv"&gt;.PHONY&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; analyze
&lt;span class="nl"&gt;analyze&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        flutter analyze .

&lt;span class="nv"&gt;.PHONY&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;span class="nl"&gt;test&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;format analyze&lt;/span&gt;
        flutter &lt;span class="nb"&gt;test&lt;/span&gt;

&lt;span class="nv"&gt;.PHONY&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; run-android
&lt;span class="nl"&gt;run-android&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        flutter emulators &lt;span class="nt"&gt;--launch&lt;/span&gt; &lt;span class="p"&gt;$(&lt;/span&gt;EMULATOR_ANDROID&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nl"&gt;.PHONY&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;$(.PHONY)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To format the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;make format
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To analyze the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;make analyze
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To test the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;make &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Github pre-commit Hook
&lt;/h1&gt;

&lt;p&gt;Before doing a git commit, it is also nice to check if everything is correct. Here a short script to execute the previous command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;touch&lt;/span&gt; .git/hooks/pre-commit
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x .git/hooks/pre-commit
&lt;span class="go"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .git/hooks/pre-commit &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="sh"&gt;!/bin/sh
&lt;/span&gt;&lt;span class="go"&gt;set -e

make test
EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Have fun and happy hacking!&lt;/p&gt;




&lt;p&gt;Cover Image by &lt;a href="https://unsplash.com/@fotomicha?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Foto Micha&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/white-smoke-billows-from-a-rusty-barrel-outdoors-9YHfIOC1LtQ?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dart</category>
      <category>flutter</category>
      <category>test</category>
      <category>analyzer</category>
    </item>
  </channel>
</rss>
