<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Val&apos;s Homepage</title><description>Welcome to my homepage (´• ω •`)</description><link>https://valsaven.com/</link><item><title>Baking Meat &amp; Deleting LLMs: A Casual Quantization Test</title><link>https://valsaven.com/blog/2026-06-01-baking-meat-and-deleting-llms-a-casual-quantization-test/</link><guid isPermaLink="true">https://valsaven.com/blog/2026-06-01-baking-meat-and-deleting-llms-a-casual-quantization-test/</guid><description>A casual evaluation of local LLMs under heavy quantization, exploring logic stability, system hangs and MoE vs Dense architectures during a kitchen break.</description><pubDate>Mon, 01 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; This is not a serious research paper. I wrote this benchmarking notes purely for myself because I wanted to clean up my SSD and purge the weaker models to free up dozens of gigabytes. If you came here looking for charts, code snippets and perfect academic accuracy, &lt;strong&gt;do not waste your time&lt;/strong&gt;. I might do something like that someday, but definitely not today - today was just a casual evaluation while waiting for my meat to bake in the oven😺&lt;/p&gt;
&lt;p&gt;So, I just spent a couple of hours on a simple test on my workstation (Ryzen 9 5950X, 128GB RAM, RTX 4080 16GB) to see how local models handle raw logic, strict syntax and context constraints under heavy quantization.&lt;/p&gt;
&lt;p&gt;If you are choosing local models based solely on parameter size or default community quants (like &lt;code&gt;Q4_K_M&lt;/code&gt;), you might be sabotaging both your speed and output quality. Here is the layout of my personal experiment.&lt;/p&gt;
&lt;h2 id=&quot;the-testing-framework&quot;&gt;The Testing Framework&lt;/h2&gt;
&lt;p&gt;I subjected six models to a three-part prompt designed to hit weakness of heavy quantization:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The Cat in the Rooms Riddle:&lt;/strong&gt; A classic state-tracking logic puzzle requiring a guaranteed catch sequence across 5 rooms in 6 days. I used &lt;code&gt;(2, 3, 4, 4, 3, 2)&lt;/code&gt; as the reference solution - sourced from Gemini, which also provided the mathematical justification (I also tested this in Lean 4). Models were evaluated on whether they arrived at a valid catching sequence and could explain why it works.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Concurrent Go Script:&lt;/strong&gt; Writing a production-ready concurrent worker pool utilizing context for immediate cancellation upon the first error, ensuring zero goroutine leaks, proper channel closure and strictly English comments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Coffee Analogy:&lt;/strong&gt; A rigid formatting test requiring a 4-paragraph explanation of synchronous vs. asynchronous code with specific keywords (&lt;code&gt;inversion&lt;/code&gt; and &lt;code&gt;blocking&lt;/code&gt;) forced into paragraphs 3 and 4 respectively.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;the-pitfall-system-level-hangs-in-thinking&quot;&gt;The Pitfall: System-Level Hangs in “Thinking”&lt;/h2&gt;
&lt;p&gt;Before getting to the results, a massive technical caveat. Three major models completely locked up my workstation during the first logic puzzle:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;qwen/qwen3.5-9b Q8_0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;google/gemma-4-26b-a4b Q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;zai-org/glm-4.7-flash Q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They entered an infinite, recursive loop during their &lt;code&gt;Thinking&lt;/code&gt; process on the parity puzzle, spinning their gears for over 7 minutes until I had to force-stop them and completely disable the &lt;code&gt;Thinking&lt;/code&gt; layer.&lt;/p&gt;
&lt;p&gt;I also tested &lt;code&gt;mistralai/ministral-3-14b-reasoning Q6_K&lt;/code&gt; and it bricked itself in the exact same manner, but because its reasoning architecture cannot be toggled off in LM Studio, it was completely unusable and had to be dropped from the benchmark entirely.&lt;/p&gt;
&lt;p&gt;Interestingly, &lt;code&gt;Qwen 3.6 27B Q4_K_M&lt;/code&gt; completely avoided this trap. While its MoE (Mixture-of-Experts) brother (&lt;code&gt;Qwen 3.6 35B A3B Q4_K_M&lt;/code&gt;) struggled with logic stability, the &lt;code&gt;27B&lt;/code&gt; dense model bypassed any infinite reasoning loops entirely, proving that dense architectures handle state-tracking logic alignment more predictably under standard quants.&lt;/p&gt;
&lt;p&gt;If a model’s internal reasoning loop gets stuck on abstract parity tracking, it is a massive red flag for production stability.&lt;/p&gt;
&lt;h2 id=&quot;the-standings&quot;&gt;The Standings&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Absolute King: unsloth/qwen3.6-35b-a3b Q3_K_XL (18.63 GB)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This model performed flawlessly across all three tasks. It nailed the 6-day riddle with pristine mathematical justification, correctly identifying the parity-inversion structure and arriving at &lt;code&gt;(2, 3, 4, 4, 3, 2)&lt;/code&gt; unprompted. More importantly, its Go code was beautiful - utilizing a non-blocking select for error propagation, handling &lt;code&gt;wg.Wait()&lt;/code&gt; in a detached goroutine to close channels safely and keeping comments in English. It abided by every single textual constraint.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Solid Professional: qwen/qwen3.6-27b-instruct Q4_K_M (17.5 GB)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This model was the biggest surprise of the extended test. Unlike the MoE-based &lt;code&gt;35B&lt;/code&gt; models, this is a traditional dense model, and it absolutely shines.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It nailed the 6-day cat riddle unprompted with the exact &lt;code&gt;(2, 3, 4, 4, 3, 2)&lt;/code&gt; sequence and flawless parity justification.&lt;/li&gt;
&lt;li&gt;Its Go code was pretty solid: no deadlocks, a properly buffered error channel, explicit context cancellation and zero goroutine leaks.&lt;/li&gt;
&lt;li&gt;It followed the strict 4-paragraph coffee analogy constraints perfectly, putting &lt;code&gt;inversion&lt;/code&gt; in paragraph 3 and &lt;code&gt;blocking&lt;/code&gt; in paragraph 4.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the most important part? It didn’t hang or lock up during the reasoning phase. It just executed raw logic efficiently.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Surprising Runner-Up: unsloth/qwen3.6-35b-a3b Q2_K_XL (14.08 GB)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Never write off an ultra-low quant if it comes from Unsloth with Unified Embedding (&lt;code&gt;XL&lt;/code&gt;) layouts. It held the exact same logical line as its bigger brother on the riddle and respected the strict formatting rules. The Go code had a minor context leak (forgot a &lt;code&gt;defer cancel()&lt;/code&gt;) and was slightly bloated, but it remained fully functional.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Biggest Disappointment: qwen/qwen3.6-35b-a3b Q4_K_M (22.1 GB)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Proof that “heavier is not always smarter”. Despite being a &lt;code&gt;Q4&lt;/code&gt; quant, its code was completely broken. It introduced a terminal deadlock in the main &lt;code&gt;select&lt;/code&gt; block if all tasks succeeded and it returned generic context strings instead of the actual error payload. It fell prey to standard quantization damage on high-importance weights.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Also-Rans (Qwen 3.5 9B, Gemma-4 26B, GLM-4.7-Flash)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;Thinking&lt;/code&gt; turned off, they fell apart. &lt;code&gt;Qwen 3.5&lt;/code&gt; failed the logic entirely. &lt;code&gt;Gemma-4&lt;/code&gt; hallucinated a non-existent “trap room” in the riddle and wrote bloated, double-nested goroutine logic. &lt;code&gt;GLM-4.7-Flash&lt;/code&gt; failed every single benchmark, writing non-compilable Go code that tried to invoke a non-existent &lt;code&gt;.Cancel()&lt;/code&gt; method directly on the context interface.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;MoE vs. Dense: Why Quantization Hits Them Differently&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Standard &lt;code&gt;Q4_K_M&lt;/code&gt; completely broke the &lt;code&gt;Qwen 3.6 35B-A3B&lt;/code&gt; (MoE model), producing broken code and deadlocks.&lt;/li&gt;
&lt;li&gt;Yet the same &lt;code&gt;Q4_K_M&lt;/code&gt; worked perfectly on the &lt;code&gt;Qwen 3.6 27B&lt;/code&gt; (dense model).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;MoE models are highly sensitive to damage in their routing weights (the parts that decide which expert to use). Regular community quants often corrupt these gatekeepers, causing logical failures or loops. Dense models don’t have this weak point, making them vastly more resilient to standard quantization.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;key-takeaways-for-my-setup&quot;&gt;Key Takeaways for My Setup&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;VRAM vs. System RAM Spill:&lt;/strong&gt; &lt;code&gt;Q3_K_XL&lt;/code&gt; only spills about 2.6 GB into my system memory. &lt;code&gt;Q4_K_M&lt;/code&gt; spills over 6 GB. Because &lt;code&gt;Q3_K_XL&lt;/code&gt; minimizes PCIe bus choking, it runs significantly faster while delivering vastly superior code logic than the broken &lt;code&gt;Q4&lt;/code&gt; community quant.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Unsloth XL Layout Wins:&lt;/strong&gt; The intelligent weight distribution in &lt;code&gt;XL&lt;/code&gt; formats preserves the routing logic of MoE models even at low bitrates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cleanup:&lt;/strong&gt; Purged &lt;code&gt;Qwen 3.5&lt;/code&gt;, &lt;code&gt;Qwen 3.6 35B A3B Q2_K_XL&lt;/code&gt;, &lt;code&gt;Ministral 3&lt;/code&gt; and &lt;code&gt;GLM 4.7 Flash&lt;/code&gt; from the drive. Keeping &lt;code&gt;Qwen 3.6 35B A3B Q3_K_XL&lt;/code&gt; as my main model for local engineering tasks. Sometime later I’ll compare it separately with &lt;code&gt;Qwen 3.6 27b Q4_K_M&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><author>Val Saven (@valsaven)</author></item><item><title>Solving Translation Issues in Nuxt.js After Updating @nuxtjs/i18n</title><link>https://valsaven.com/blog/2025-02-04-solving-translation-issues-in-nuxt-js-after-updating-nuxtjs-i18n/</link><guid isPermaLink="true">https://valsaven.com/blog/2025-02-04-solving-translation-issues-in-nuxt-js-after-updating-nuxtjs-i18n/</guid><description>Learn how to handle translation errors in Nuxt.js after updating the i18n module and discover a workaround for the langDir problem.</description><pubDate>Tue, 04 Feb 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;With the update of the &lt;code&gt;@nuxtjs/i18n&lt;/code&gt; package from version 9.1.1 to 9.1.2 and beyond, I have encountered new challenges in handling translations. This article explores one such issue related to the &lt;code&gt;langDir&lt;/code&gt; parameter and how it was circumvented.&lt;/p&gt;
&lt;h2 id=&quot;problem-description&quot;&gt;Problem Description&lt;/h2&gt;
&lt;p&gt;Following the update to version 9.1.2 and above, the use of the &lt;code&gt;$t&lt;/code&gt; function for translating keys started to throw errors. When changing languages within the application, keys that were previously translated correctly now resulted in errors like &lt;code&gt;index.vue:6 [intlify] Not found &apos;home.p1&apos; key in &apos;ja&apos; locale messages&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;analysis&quot;&gt;Analysis&lt;/h2&gt;
&lt;p&gt;Upon investigation, it became clear that the issue was linked to the &lt;code&gt;langDir&lt;/code&gt; parameter, which is responsible for loading translations from a specified directory. After the update, the system could no longer load translations from external JSON files properly, despite the correct setup of &lt;code&gt;langDir&lt;/code&gt; in &lt;code&gt;nuxt.config.ts&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;solution&quot;&gt;Solution&lt;/h2&gt;
&lt;p&gt;The solution was unexpected but effective. Instead of loading translations from separate JSON files in the directory specified by &lt;code&gt;langDir&lt;/code&gt;, the translations were moved directly into the i18n configuration file, &lt;code&gt;i18n.config.ts&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;i18n.config.ts&lt;/code&gt;, all necessary translations for English and Japanese were added, structured within objects:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; defineI18nConfig&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(() &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; ({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  legacy: &lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  locale: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;en&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  messages: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    en: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      welcome: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Welcome&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      home: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        p1: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;Hello!&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;      // ... other translations ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    ja: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      welcome: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;ようこそ&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      home: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;        p1: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;こんにちは!&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;      },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;      // ... other translations ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}));&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In &lt;code&gt;nuxt.config.ts&lt;/code&gt;, the &lt;code&gt;langDir&lt;/code&gt; configuration was removed along with the file fields for each language, since translations are no longer loaded from external files:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;i18n&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  locales&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    { code: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;en&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, iso: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;en-US&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;    { code: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;ja&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;, iso: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;ja-JP&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;  defaultLocale&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;en&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Although the exact reason why changes to &lt;code&gt;langDir&lt;/code&gt; stopped working remains unclear, this solution allows for continued internationalization support in Nuxt.js applications. Future updates to &lt;code&gt;@nuxtjs/i18n&lt;/code&gt; might resolve this issue, but for now, moving translations into the configuration file serves as a reliable workaround.&lt;/p&gt;</content:encoded><author>Val Saven (@valsaven)</author></item><item><title>Electron + Vite: Issues with Using Node Modules</title><link>https://valsaven.com/blog/2023-04-08-electron-vite-issues-with-using-node-modules/</link><guid isPermaLink="true">https://valsaven.com/blog/2023-04-08-electron-vite-issues-with-using-node-modules/</guid><description>How to fix the &quot;externalized for browser compatibility error&quot; when importing Node.js modules (path, fs) in an Electron + Vite setup using a polyfill plugin.</description><pubDate>Sat, 08 Apr 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When using Vite to build Electron (which currently does not support the &lt;code&gt;&quot;type&quot;: &quot;module&quot;&lt;/code&gt; option in &lt;code&gt;package.json&lt;/code&gt;), there may be a problem using Node.js modules such as &lt;code&gt;path&lt;/code&gt;, &lt;code&gt;fs&lt;/code&gt;, and others.&lt;/p&gt;
&lt;p&gt;An error &lt;code&gt;Error: Module &quot;path&quot; has been externalized for browser compatibility. Cannot access &quot;path.sep&quot; in client code&lt;/code&gt; will appear.&lt;/p&gt;
&lt;p&gt;However, this can be easily fixed by installing the &lt;code&gt;vite-plugin-electron-renderer&lt;/code&gt; polyfill (&lt;code&gt;npm i -D vite-plugin-electron-renderer&lt;/code&gt;) and declaring it in the &lt;code&gt;vite.config.ts&lt;/code&gt; like this:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;typescript&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; { defineConfig } &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;vite&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; vue &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;@vitejs/plugin-vue&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt; renderer &lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; &apos;vite-plugin-electron-renderer&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D&quot;&gt;// https://vitejs.dev/config/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt; defineConfig&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  plugins: [&lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;vue&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;(), &lt;/span&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;renderer&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;()],&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;  base: &lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt;&apos;./&apos;&lt;/span&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded><author>Val Saven (@valsaven)</author></item><item><title>Install Haskell on macOS Monterey 12.6</title><link>https://valsaven.com/blog/2022-10-06-install-haskell-on-macos-monterey-12-6/</link><guid isPermaLink="true">https://valsaven.com/blog/2022-10-06-install-haskell-on-macos-monterey-12-6/</guid><description>A quick step-by-step cheatsheet for installing GHC, Cabal, Haskell Stack and Haskell Language Server on macOS Monterey using Homebrew.</description><pubDate>Thu, 06 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; ghc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; cabal-install&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;cabal&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; update&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; haskell-stack&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; haskell-language-server&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded><author>Val Saven (@valsaven)</author></item><item><title>Overheating Issues with AMD Graphics Cards on Linux</title><link>https://valsaven.com/blog/2022-10-06-overheating-issues-with-amd-graphics-cards-on-linux/</link><guid isPermaLink="true">https://valsaven.com/blog/2022-10-06-overheating-issues-with-amd-graphics-cards-on-linux/</guid><description>Fixing AMD GPU overheating issues on Linux: troubleshooting high memory clock rates at 144Hz and configuring automatic fan control via amdgpu-fan.</description><pubDate>Thu, 06 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The solution to the problem was quite simple: checking the monitor’s frequency. At 144 Hz, the video card shows 100% Memory Clock in &lt;a href=&quot;https://github.com/clbr/radeontop&quot;&gt;radeontop&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Command that shows your GPU utilization, both for the total activity percent and individual blocks.&lt;/p&gt;
&lt;p&gt;Install for arch-based distros: &lt;code&gt;sudo pacman -S radeontop&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Lowering the frequency to 60Hz brings everything back to normal.&lt;/p&gt;
&lt;p&gt;Another issue is that the fans of the video card may not spin. This can lead to the video card overheating and failing. Without manual temperature monitoring, you might not realize the card is overheating until it’s too late.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;amdgpu-fan&lt;/code&gt; utility can help to solve this problem.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/zzkW35/amdgpu-fan&quot;&gt;https://github.com/zzkW35/amdgpu-fan&lt;/a&gt; - the most relevant fork&lt;/p&gt;
&lt;p&gt;Fan controller for amdgpus&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For arch-based distros, the sequence of actions will be as follows:&lt;/p&gt;
&lt;pre class=&quot;astro-code github-dark&quot; style=&quot;background-color:#24292e;color:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;shell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;yay&lt;/span&gt;&lt;span style=&quot;color:#79B8FF&quot;&gt; -S&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; amdgpu-fan&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; enable&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; amdgpu-fan&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#B392F0&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; systemctl&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; start&lt;/span&gt;&lt;span style=&quot;color:#9ECBFF&quot;&gt; amdgpu-fan&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The settings are in the file &lt;code&gt;/etc/amdgpu-fan.yml&lt;/code&gt;. If the defaults don’t satisfy you, you can configure the cooling scheme yourself.&lt;/p&gt;
&lt;p&gt;With this setup, the fans will start spinning when the video card is under load.&lt;/p&gt;</content:encoded><author>Val Saven (@valsaven)</author></item><item><title>YubiKey 5 NFC: Guarding Your Information</title><link>https://valsaven.com/blog/2019-08-31-yubikey-5-nfc-guarding-your-information/</link><guid isPermaLink="true">https://valsaven.com/blog/2019-08-31-yubikey-5-nfc-guarding-your-information/</guid><description>What is it? Where to buy? What apps are available?</description><pubDate>Sat, 31 Aug 2019 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;yubikey-5-nfc-a-hardware-key&quot;&gt;YubiKey 5 NFC: A Hardware Key&lt;/h2&gt;
&lt;p&gt;What’s new in the 5th model?
It now supports FIDO2 and, directly, NFC.&lt;/p&gt;
&lt;h2 id=&quot;delivery&quot;&gt;Delivery&lt;/h2&gt;
&lt;p&gt;YubiKey does not ship their products to China, Afghanistan, Russia, Ukraine, North Korea, Iran, Sudan, and Syria, so alternative methods must be sought.&lt;/p&gt;
&lt;p&gt;I received my key by ordering it to a hostel address in Britain, where I was at the time. I think various forwarding services can handle this too.&lt;/p&gt;
&lt;h2 id=&quot;cost&quot;&gt;Cost&lt;/h2&gt;
&lt;p&gt;One key cost me $62.50 ($45 for the key, $5 for shipping, $12.50 in taxes).&lt;/p&gt;
&lt;p&gt;You can order 1, 2, 10, or 50 pieces. A discount appears on orders of 10 or more (though it’s quite modest).&lt;/p&gt;
&lt;h2 id=&quot;applications&quot;&gt;Applications&lt;/h2&gt;
&lt;p&gt;There is a Yubico Authenticator app available for the following platforms: Windows, Linux, Mac, Android, iOS.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.yubico.com/products/yubico-authenticator/#h-download-yubico-authenticator&quot;&gt;https://www.yubico.com/products/yubico-authenticator/#h-download-yubico-authenticator&lt;/a&gt;&lt;/p&gt;</content:encoded><author>Val Saven (@valsaven)</author></item><item><title>What I Learned Writing a Small Page in Dart One Evening</title><link>https://valsaven.com/blog/2019-02-05-what-i-learned-writing-a-small-page-in-dart-one-evening/</link><guid isPermaLink="true">https://valsaven.com/blog/2019-02-05-what-i-learned-writing-a-small-page-in-dart-one-evening/</guid><description>Personal experience writing a page in Dart: pros and cons of the language, comparison with the JS/TS ecosystem and why learning Dart only makes sense alongside Flutter.</description><pubDate>Tue, 05 Feb 2019 00:00:00 GMT</pubDate><content:encoded>&lt;ol&gt;
&lt;li&gt;It has a high entry barrier for a JS developer, as it involves mastering both the standard library (for many elements like input and select, Dart has its own types) and the old “new” types (for example, an array, by default, can only contain numbers. For everything else, you need to explicitly specify. It’s a small thing, but there are many such details).&lt;/li&gt;
&lt;li&gt;However, the language itself is quite clear and simple (the syntax resembles a mix of JS, Python, Go, and C/C#), as are its tools - the package manager pub and the project generator stagehand. One can quickly grasp the basics and start coding.&lt;/li&gt;
&lt;li&gt;Compared to pure JS, it tends to lose out (especially with ES2016+). The final file size of JS will be smaller, as will the amount of code lines.&lt;/li&gt;
&lt;li&gt;Following from point 3, using Dart without frameworks is a highly questionable pleasure.&lt;/li&gt;
&lt;li&gt;The same with them, as Dart can only be used for AngularDart, which has diverged so much from other Angular versions that it has essentially become a separate project. There are also 1.5 bindings for React and Vue, which are hardly updated… In short, everything is not great.&lt;/li&gt;
&lt;li&gt;It looks very interesting in combination with Flutter, which, according to some parameters, already outperforms ReactNative (and Electron, even more so).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; Dart is an interesting language, but learning it without combining it with Flutter and focusing on mobile development doesn’t make much sense. It won’t add much value to your career either. A search on Indeed for Moscow shows 3 vacancies for Dart and 121 for TypeScript (for comparison, there are 2 vacancies for Haskell 😏).&lt;/p&gt;</content:encoded><author>Val Saven (@valsaven)</author></item></channel></rss>