<?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: RK Riad Khan</title>
    <description>The latest articles on DEV Community by RK Riad Khan (@rkriad585).</description>
    <link>https://dev.to/rkriad585</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%2F4025303%2F912b9d91-54d5-4ac0-b025-7d0c07f9a62f.jpg</url>
      <title>DEV Community: RK Riad Khan</title>
      <link>https://dev.to/rkriad585</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rkriad585"/>
    <language>en</language>
    <item>
      <title>LineSolv: A Natural-Language Calculator for Every Platform</title>
      <dc:creator>RK Riad Khan</dc:creator>
      <pubDate>Sat, 11 Jul 2026 15:03:32 +0000</pubDate>
      <link>https://dev.to/rkriad585/linesolv-a-natural-language-calculator-for-every-platform-4m47</link>
      <guid>https://dev.to/rkriad585/linesolv-a-natural-language-calculator-for-every-platform-4m47</guid>
      <description>&lt;h1&gt;
  
  
  LineSolv: A Natural-Language Calculator for Every Platform
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; — Numi is beautiful but macOS-only. LineSolv brings the same idea to Linux, Windows, and macOS — built with Go + Wails for a ~25 MB binary that starts in under a second. Open source, MIT licensed, no accounts, no telemetry.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;I've been a Numi user for years. The notepad-style calculator where you just &lt;em&gt;type&lt;/em&gt; what you mean — &lt;code&gt;20% of 150&lt;/code&gt;, &lt;code&gt;5 kg in pounds&lt;/code&gt;, &lt;code&gt;sin(pi/4)&lt;/code&gt; — and get instant results is genuinely one of those tools that changes how you work with numbers.&lt;/p&gt;

&lt;p&gt;But Numi is macOS-only.&lt;/p&gt;

&lt;p&gt;If you're on Linux or Windows, you're stuck with either the built-in calculator (which requires clicking buttons) or a full-blown spreadsheet app just to do quick math. There's a real gap in the market for a beautiful, keyboard-driven calculator that works everywhere.&lt;/p&gt;

&lt;p&gt;So I built one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Go + Wails, Not Electron?
&lt;/h2&gt;

&lt;p&gt;I considered Electron first — it's the obvious choice for "build a desktop app with web technologies." But the numbers didn't add up:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Electron&lt;/th&gt;
&lt;th&gt;Go + Wails&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Binary size&lt;/td&gt;
&lt;td&gt;100–200 MB&lt;/td&gt;
&lt;td&gt;20–50 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory (idle)&lt;/td&gt;
&lt;td&gt;80–150 MB&lt;/td&gt;
&lt;td&gt;20–40 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Startup time&lt;/td&gt;
&lt;td&gt;2–5 seconds&lt;/td&gt;
&lt;td&gt;&amp;lt; 1 second&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Native feel&lt;/td&gt;
&lt;td&gt;Heavy&lt;/td&gt;
&lt;td&gt;Lightweight&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Wails v2 lets you write the backend in Go and the frontend in whatever JS/TS framework you want (I used vanilla TypeScript + Tailwind). The Go backend compiles to a single native binary. The frontend runs in the system's native WebView — no bundled Chromium.&lt;/p&gt;

&lt;p&gt;The result: &lt;strong&gt;a ~25 MB app that starts instantly and uses almost no memory.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;LineSolv is a notepad-style calculator. You type natural language or math expressions on the left, and results appear instantly on the right.&lt;/p&gt;

&lt;h3&gt;
  
  
  Natural Language That Actually Works
&lt;/h3&gt;

&lt;p&gt;You don't need to learn syntax. Just type what you'd say out loud:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;twenty five percent of 200          → 50
5 kg in pounds                      → 11.0231 lb
what is pi plus five                → 8.14159
2h30m in minutes                    → 150 min
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fdwwutthgje4qmcgl1m4a.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%2Fdwwutthgje4qmcgl1m4a.png" alt=" " width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The parser handles natural language (&lt;code&gt;twenty five&lt;/code&gt;, &lt;code&gt;half as much as 100&lt;/code&gt;), unit conversions across 100+ units in 14 categories, percentage math, and even purchase calculations (&lt;code&gt;3 items at $10 each with a 15% discount&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Variables and Context
&lt;/h3&gt;

&lt;p&gt;Lines reference each other automatically. Type &lt;code&gt;x = 42&lt;/code&gt; on one line, and &lt;code&gt;x * 2&lt;/code&gt; on the next line gives you &lt;code&gt;84&lt;/code&gt;. Use &lt;code&gt;of that&lt;/code&gt; or &lt;code&gt;then&lt;/code&gt; to chain results:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;100
+ 10%            → 110 (10% of previous result)
of that           → 121 (10% again)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step-by-Step Evaluation
&lt;/h3&gt;

&lt;p&gt;Hit &lt;code&gt;Ctrl+S&lt;/code&gt; to open the Steps panel and see exactly how your expression was parsed and computed — every operation, every intermediate value. Great for learning or debugging complex calculations.&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%2Fue3kd15f1f9sihbxet6t.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%2Fue3kd15f1f9sihbxet6t.png" alt=" " width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Function Graphing
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;plot x^2&lt;/code&gt; or &lt;code&gt;graph sin(x)&lt;/code&gt; and a live chart renders in the Graph panel. Supports custom ranges (&lt;code&gt;plot x^2 from -10 to 10&lt;/code&gt;), multiple series, and Chart.js-powered interactive tooltips.&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%2Fkzvixzkmecc1qo4m2zq4.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%2Fkzvixzkmecc1qo4m2zq4.png" alt=" " width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Multiple Notes, Persistent Storage
&lt;/h3&gt;

&lt;p&gt;Create as many calculation notebooks as you need. Everything persists to a local SQLite database. Drag to reorder, search across all notes, export to PDF, JSON, Markdown, or plain text.&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%2Fc6ilf6l7ssdc4lw7tmmv.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%2Fc6ilf6l7ssdc4lw7tmmv.png" alt=" " width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7 Themes
&lt;/h3&gt;

&lt;p&gt;Dark, Light, Neon, Red, Obsidian, Plasma, and Blood — switch instantly in Settings. Every theme is carefully crafted for readability and contrast.&lt;/p&gt;

&lt;h3&gt;
  
  
  Everything Else
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;26 built-in math functions&lt;/strong&gt; — &lt;code&gt;sin&lt;/code&gt;, &lt;code&gt;cos&lt;/code&gt;, &lt;code&gt;sqrt&lt;/code&gt;, &lt;code&gt;log&lt;/code&gt;, &lt;code&gt;round&lt;/code&gt;, &lt;code&gt;abs&lt;/code&gt;, &lt;code&gt;factorial&lt;/code&gt;, and more&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live currency conversion&lt;/strong&gt; — USD, EUR, GBP, JPY, and more via exchange-rate API (with offline cache)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizable shortcuts&lt;/strong&gt; — rebind any keyboard shortcut&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Print with formatting&lt;/strong&gt; — A4 layout with note header, watermark, and page numbers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Undo/Redo&lt;/strong&gt; — 200-entry history stack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF export&lt;/strong&gt; — formatted documents with dates and page numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Technical Journey
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Parser
&lt;/h3&gt;

&lt;p&gt;The core is a recursive-descent parser in Go (~2,100 lines) with a 15-step natural language preprocessing pipeline. It handles operator precedence (PEMDAS), implicit multiplication (&lt;code&gt;2pi&lt;/code&gt;), chained operations, and over 100 unit definitions.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;naturalize()&lt;/code&gt; function converts English words and phrases into tokenized math expressions before the parser sees them. It handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Word numbers (&lt;code&gt;twenty five&lt;/code&gt; → &lt;code&gt;25&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Percentage phrases (&lt;code&gt;10% of 200&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Unit conversions (&lt;code&gt;5 kg in pounds&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Purchase math (&lt;code&gt;3 items at $10 each with 15% discount&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Frontend
&lt;/h3&gt;

&lt;p&gt;Vanilla TypeScript, no framework. Just classes, DOM APIs, and Tailwind CSS. The app has 11 components, 2 stores, and a 200-entry undo/redo stack — all in ~3,000 lines.&lt;/p&gt;

&lt;p&gt;Key architectural decisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No virtual DOM&lt;/strong&gt; — direct DOM manipulation with diffing for the line-number gutter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debounced evaluation&lt;/strong&gt; — 150ms debounce with stale-result detection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy panel rendering&lt;/strong&gt; — panels build their DOM only when first opened&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Build
&lt;/h3&gt;

&lt;p&gt;Wails v2 handles the cross-compilation. One &lt;code&gt;wails build&lt;/code&gt; command produces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linux: standalone binary + &lt;code&gt;.deb&lt;/code&gt; package&lt;/li&gt;
&lt;li&gt;macOS: &lt;code&gt;.dmg&lt;/code&gt; (Intel + Apple Silicon)&lt;/li&gt;
&lt;li&gt;Windows: NSIS installer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CI runs on GitHub Actions with automatic releases on tag push.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Involved
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone and run&lt;/span&gt;
git clone https://github.com/rkriad585/LineSolv.git
&lt;span class="nb"&gt;cd &lt;/span&gt;LineSolv
wails dev

&lt;span class="c"&gt;# Or just download a release&lt;/span&gt;
&lt;span class="c"&gt;# https://github.com/rkriad585/LineSolv/releases&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;LineSolv — is a lot works, but there's a lot more to build. If you've ever wished Numi worked on Linux, or you just want a fast, private calculator that respects your time, give it a try.&lt;/p&gt;

&lt;p&gt;Contributions welcome. Open an issue, send a PR, or just star the repo if you want to follow along.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/rkriad585/LineSolv" rel="noopener noreferrer"&gt;github.com/rkriad585/LineSolv&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT&lt;br&gt;
&lt;strong&gt;Built with:&lt;/strong&gt; Go, Wails v2, TypeScript, Tailwind CSS, Vite&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
