<?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: devendra tandle</title>
    <description>The latest articles on DEV Community by devendra tandle (@devendra_tandle_13a3afd80).</description>
    <link>https://dev.to/devendra_tandle_13a3afd80</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3943902%2F88707211-2645-4879-8878-e77097720e62.jpg</url>
      <title>DEV Community: devendra tandle</title>
      <link>https://dev.to/devendra_tandle_13a3afd80</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devendra_tandle_13a3afd80"/>
    <language>en</language>
    <item>
      <title>Ardon-R2: Inspired by R, Built on Rust. An AI-Assisted Project. v0.1.1.</title>
      <dc:creator>devendra tandle</dc:creator>
      <pubDate>Thu, 21 May 2026 10:48:57 +0000</pubDate>
      <link>https://dev.to/devendra_tandle_13a3afd80/ardon-r2-inspired-by-r-built-on-rust-an-ai-assisted-project-v011-2h95</link>
      <guid>https://dev.to/devendra_tandle_13a3afd80/ardon-r2-inspired-by-r-built-on-rust-an-ai-assisted-project-v011-2h95</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Fxivka0oydeobha2avdmb.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fxivka0oydeobha2avdmb.jpg" alt=" " width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today I am open-sourcing &lt;strong&gt;Ardon-R2&lt;/strong&gt;, a Rust reimplementation of R's runtime. The repository is live at &lt;a href="https://github.com/devendratandle/Ardon-R2" rel="noopener noreferrer"&gt;github.com/devendratandle/Ardon-R2&lt;/a&gt; under AGPL-3.0, with a side-by-side benchmark harness you can point at your own R install. If you write R for a living, it is worth running against your hottest scripts.&lt;/p&gt;

&lt;p&gt;Ardon-R2 keeps R's surface — formulas, data frames, &lt;code&gt;lm&lt;/code&gt;, &lt;code&gt;t.test&lt;/code&gt;, &lt;code&gt;summary&lt;/code&gt;, the lot — and rebuilds the engine underneath in Rust. The statistical numerics are bit-identical to CRAN R 4.5.3. The runtime is a single static binary, memory-safe by construction, free of garbage collection, and built on a frozen dependency graph that does not rot. Inspired by R. Built on Rust.&lt;/p&gt;

&lt;p&gt;It is also unmistakably neonatal. Faster than R where computation dominates. On par where memory bandwidth does. Missing chunks of S4, parts of R5, the long tail of CRAN. I am shipping anyway because shipping is how a project earns the right to grow.&lt;/p&gt;

&lt;p&gt;The rest of this article is a tour of three things: &lt;strong&gt;what Ardon-R2 is&lt;/strong&gt;, &lt;strong&gt;what Ardon-R2 does today&lt;/strong&gt;, and &lt;strong&gt;what Ardon-R2 will do next&lt;/strong&gt;. The story of how it was built belongs in a later piece, after the project has earned the audience to listen to it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why a new engine
&lt;/h2&gt;

&lt;p&gt;R is a beautiful language that runs on an engine designed when "multi-core" was an enterprise-server feature, not a phone. The interpreter is single-threaded by default. The garbage collector pauses every workload long enough to feel it. Every &lt;code&gt;df$x &amp;lt;- df$x + 1&lt;/code&gt; allocates a fresh vector because R semantics are copy-on-modify. The package ecosystem is gorgeous and enormous and built almost entirely on C and C++ shared libraries that someone, somewhere, has to keep maintaining.&lt;/p&gt;

&lt;p&gt;When that maintenance breaks, packages die quietly.&lt;/p&gt;

&lt;p&gt;In 2022, RGtk2 — the package that gave R bindings to GTK2 — was archived on CRAN because nobody could keep it building against a deprecated GUI toolkit. RGtk2 was a dependency of &lt;code&gt;rattle&lt;/code&gt;, the data-mining GUI that an entire generation of analysts learned R on. So &lt;code&gt;rattle&lt;/code&gt; effectively died. Not because its statistics were wrong. Not because anyone wrote a competing tool. Because a C library three layers underneath it stopped being maintained. That story repeats across the CRAN graph more often than the community likes to talk about.&lt;/p&gt;

&lt;p&gt;Ardon-R2's bet is that a runtime built on Cargo's workspace model — frozen dependencies, audited tree, no C/C++ shared-library archaeology, no version-maintenance hell — doesn't have rattle-shaped failures waiting in its future. The language stays expressive. The engine stops being fragile.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's shipped
&lt;/h2&gt;

&lt;p&gt;v0.1.1, today, with no asterisks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Statistics.&lt;/strong&gt; &lt;code&gt;lm&lt;/code&gt;, &lt;code&gt;glm&lt;/code&gt; (gaussian, binomial, poisson via IRLS), &lt;code&gt;aov&lt;/code&gt;, &lt;code&gt;anova&lt;/code&gt;, &lt;code&gt;t.test&lt;/code&gt; (one-sample, two-sample, paired, Welch), &lt;code&gt;wilcox.test&lt;/code&gt;, &lt;code&gt;cor.test&lt;/code&gt;, &lt;code&gt;shapiro.test&lt;/code&gt;, &lt;code&gt;fisher.test&lt;/code&gt;, &lt;code&gt;chisq.test&lt;/code&gt;. &lt;code&gt;summary()&lt;/code&gt; for every model class. Formula handling with treatment-contrast expansion of factor and character predictors — &lt;code&gt;lm(y ~ Species, data=iris)&lt;/code&gt; works the way R users expect it to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linear algebra.&lt;/strong&gt; Matrix, tensor, transpose, crossprod, solve, SVD, eigen, QR, fused least-squares. Backed by tuned numerical kernels, not LAPACK bindings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary-stat kernels.&lt;/strong&gt; Parallel prefix scan, quickselect-based nth-smallest, binary-heap top-k, deque-based O(n) rolling max/min, rolling mean/sum/sd, hash-aggregate, pairwise distance. Each kernel has scalar, SIMD, and parallel variants chosen at dispatch time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data frames.&lt;/strong&gt; Position, name, and logical subsetting. &lt;code&gt;$&lt;/code&gt; access and assignment. &lt;code&gt;names&lt;/code&gt;, &lt;code&gt;nrow&lt;/code&gt;, &lt;code&gt;ncol&lt;/code&gt;, &lt;code&gt;dim&lt;/code&gt;. Datasets &lt;code&gt;iris&lt;/code&gt;, &lt;code&gt;mtcars&lt;/code&gt;, &lt;code&gt;airquality&lt;/code&gt;, &lt;code&gt;ToothGrowth&lt;/code&gt;, &lt;code&gt;faithful&lt;/code&gt; shipped in a native binary format (&lt;code&gt;.r2d&lt;/code&gt;) — bit-identical to CRAN R 4.5.3 values, verified by integrity tests on every build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Machine learning.&lt;/strong&gt; k-means, k-nearest-neighbors, decision trees, random forests, naive Bayes, and a basic neural network with manual forward and backward passes. Not deep learning — yet. The plan for that is below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plotting.&lt;/strong&gt; SVG output for &lt;code&gt;plot&lt;/code&gt;, &lt;code&gt;hist&lt;/code&gt;, &lt;code&gt;boxplot&lt;/code&gt;, &lt;code&gt;barplot&lt;/code&gt;, &lt;code&gt;pairs&lt;/code&gt;, &lt;code&gt;qqplot&lt;/code&gt;, &lt;code&gt;density&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;REPL.&lt;/strong&gt; Multi-line continuation, syntax-aware prompt, line-edit history, help operators.&lt;/p&gt;

&lt;p&gt;Core statistics bit-identical to R 4.5.3. Roughly four out of five everyday R idioms most analysts write day-to-day run as written. The fifth is what the road from here closes.&lt;/p&gt;




&lt;h2&gt;
  
  
  How it stays fast without asking you to think about it
&lt;/h2&gt;

&lt;p&gt;The engine has four cooperating layers — a representation of your code, a just-in-time compiler that turns hot paths into native machine code, a library of hand-tuned parallel primitives for the operations R does badly, and a hardware-aware dispatcher that picks the right path for the machine it is running on. Underneath sits a columnar memory layer that holds dense numeric data without copying on every operation, and a thread-local scratch arena that recycles the allocations that statistical workloads need most.&lt;/p&gt;

&lt;p&gt;You do not need to know any of that to write R2 code. R2 looks like R. The complexity exists so the language can stay simple. The full architectural story belongs in its own writeup once the project is mature enough that the &lt;em&gt;how&lt;/em&gt; matters as much as the &lt;em&gt;what&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The performance story
&lt;/h2&gt;

&lt;p&gt;R2 wins on compute-bound work. Fused reductions, math-heavy element-wise operations, anything where the cost is real arithmetic per element, anything that benefits from SIMD or from skipping intermediate allocations. The 11× fused &lt;code&gt;sum(sqrt(x*x + 1))&lt;/code&gt; is the headline; analogous wins land on &lt;code&gt;sin(x)^2 + cos(x)^2&lt;/code&gt;, on Monte Carlo inner loops, on the repeated &lt;code&gt;sapply&lt;/code&gt; patterns analysts write without thinking.&lt;/p&gt;

&lt;p&gt;R2 draws on memory-bandwidth-bound work. Plain &lt;code&gt;x + y&lt;/code&gt; on ten-million-element f64 vectors is limited by how fast your DRAM can deliver bytes. No JIT, no SIMD, no parallel dispatch reduces the byte traffic. R2 matches R there; it doesn't beat it. Pretending otherwise would be dishonest.&lt;/p&gt;

&lt;p&gt;Every fused loop is a megajoule not spent. That's not the headline pitch, but it is the substrate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reproducibility and numerical fidelity
&lt;/h2&gt;

&lt;p&gt;For academic and regulatory use, R-compatibility means more than "the right answer most of the time." Ardon-R2's core statistics are bit-identical to CRAN R 4.5.3: same &lt;code&gt;t.test&lt;/code&gt; Welch degrees-of-freedom, same &lt;code&gt;lm&lt;/code&gt; treatment contrasts, same &lt;code&gt;summary()&lt;/code&gt; significance stars, same IEEE-754 NaN propagation through every operation. The integrity of the built-in datasets is verified on every build against canonical R column sums and row spot-checks.&lt;/p&gt;

&lt;p&gt;AGPL-3.0 licensed — a deliberate choice that keeps the engine and its derivatives open. Citation-friendly. Reproducible across runs because the engine has no GC pauses and no thread scheduling jitter to introduce numerical drift.&lt;/p&gt;




&lt;h2&gt;
  
  
  On efficiency as substrate
&lt;/h2&gt;

&lt;p&gt;Green AI is not a feature you bolt onto a runtime. It is what efficient compute looks like before the marketing layer goes on top.&lt;/p&gt;

&lt;p&gt;Every fused loop is work the CPU does once instead of twice. Every skipped intermediate allocation is a cache line that doesn't get evicted. Every parallel dispatch that retires four cores' worth of work in one wall-clock second instead of four is three cores' idle time that wasn't billed to the grid. These compounds. Across a single analyst's day they're invisible. Across a fleet of inference servers running statistical validation in production, they show up on the power bill.&lt;/p&gt;

&lt;p&gt;Ardon-R2 isn't pitched as a green-AI project. But a leaner runtime is what green AI looks like underneath, and the architecture leans that way on purpose.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Ardon-R2 will do next
&lt;/h2&gt;

&lt;p&gt;The point of shipping v0.1.1 is to earn the right to ship v1.0. The road from here is not a wishlist — it is the design that was already baked into the architecture before v0.1.1 went out, waiting for the work to land.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deep learning, the pragmatic way.&lt;/strong&gt; R2 will gain a tensor surface and a familiar Keras-style API by binding to &lt;code&gt;candle&lt;/code&gt;, Hugging Face's pure-Rust machine-learning stack with CUDA, Metal, and CPU backends. This is the fastest credible path from "R2 has a basic neural net" to "R2 trains a transformer on your GPU." Later releases will pull primitives into the kernel layer as performance demands it, but the binding lands first — analysts get to use the deep-learning stack their colleagues are already using, in R syntax, without leaving R2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-vendor GPU dispatch.&lt;/strong&gt; Through WebGPU compute kernels, the same R2 script will run on NVIDIA, AMD, Apple Silicon, or Intel Arc hardware. No CUDA lock-in. No vendor-specific toolchain to install. The hardware Oracle becomes device-aware: it sees the GPUs the machine has and dispatches there when it makes sense to. This is the path that puts statistical workloads on the same hardware ML training runs on, instead of next to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Accelerator Hub.&lt;/strong&gt; Beyond GPUs, custom compute is no longer exotic. TPUs, NPUs in modern laptops, dedicated ASICs in cloud instances — R2 will expose them through a single abstraction so the analyst writes R2 code and the runtime picks the right silicon. The user-facing language does not change. The compute layer becomes interchangeable. This is what lets R2 stay relevant on hardware nobody has shipped yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;r2-calculus&lt;/code&gt; — the math base R never bundled.&lt;/strong&gt; Numerical derivatives via Richardson extrapolation. Gauss-Kronrod adaptive quadrature for integrals where R's &lt;code&gt;integrate()&lt;/code&gt; gives up. Higher moments, Jacobian and Hessian via forward-mode automatic differentiation. The mathematical machinery academic R users currently write by hand or import from three separate packages, shipped as standard library, with consistent numerics and citation-grade documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;r2-symbolic&lt;/code&gt; and &lt;code&gt;r2-symreg&lt;/code&gt; — what nobody else is building.&lt;/strong&gt; Symbolic differentiation. Algebraic simplification. And symbolic regression: deriving the &lt;em&gt;functional form&lt;/em&gt; from a dataset, not fitting parameters to a form you guessed. Applications are real and significant — physics-informed machine learning that respects conservation laws, interpretable regulatory models where the equation is the deliverable, scientific discovery from sensor data where the relationship is unknown going in. No R package does this well. No mainstream language ships it. This is the direction I am most excited about, and it is what could distinguish Ardon-R2 from being a faster R into being a different kind of statistical tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embeddable statistical computing.&lt;/strong&gt; Ardon-R2 was designed from day one to be a linkable library, not just a REPL. A C-callable interface and a Python binding will let inference servers, ETL pipelines, and existing data-science stacks call statistical validation in-process instead of shelling out to a separate R container. Statistical computing rejoins the AI infrastructure stack instead of sitting beside it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deterministic by construction.&lt;/strong&gt; No garbage collector pauses. No thread scheduling jitter. No nondeterministic floating-point fallbacks. The same input produces the same output to the last bit, across runs, across machines, across years. For clinical trials, finance, model audit, and any regulated workflow, this is not a nicety — it is what makes results defensible. R2's pure-Rust foundation makes determinism a property of the engine, not a configuration flag.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A package ecosystem that does not rot.&lt;/strong&gt; R2 will grow its own package registry built on Cargo's model — frozen versions, audited dependencies, no shared-library archaeology. The plan is to make porting common CRAN packages systematic, so the long tail of R's ecosystem can move over without a rewrite per package. The goal is not to replace CRAN. The goal is that nobody who depends on Ardon-R2 ever loses their work the way the rattle generation lost theirs.&lt;/p&gt;

&lt;p&gt;That is the road. v0.1.1 is the first step on it. Come help make it v1.0.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to try it
&lt;/h2&gt;

&lt;p&gt;The repository is at &lt;a href="https://github.com/devendratandle/Ardon-R2" rel="noopener noreferrer"&gt;github.com/devendratandle/Ardon-R2&lt;/a&gt;. Clone it, run &lt;code&gt;cargo build --release&lt;/code&gt;, and the binary lands at &lt;code&gt;target/release/r2&lt;/code&gt;. There are benchmark scripts in &lt;code&gt;bench/r_vs_r2/&lt;/code&gt; you can run against your own R install. There's a comparison test harness that emits accuracy and performance reports side-by-side.&lt;/p&gt;

&lt;p&gt;Issues, pull requests, and "this didn't work the way I expected" reports are all welcome. So are people who want to write the things v0.1.1 doesn't ship yet.&lt;/p&gt;

&lt;p&gt;If your team carries an R workload into production and the rewrite tax is showing up on your roadmap, Ardon-R2 is worth a benchmark. If you are doing reproducible academic work and the version-hell of CRAN has cost you a paper, Ardon-R2 is worth a benchmark. If you find pure-Rust scientific computing interesting and want a non-trivial codebase to read, Ardon-R2 is worth reading.&lt;/p&gt;




&lt;h3&gt;
  
  
  Note on authorship
&lt;/h3&gt;

&lt;p&gt;Ardon-R2 is an AI-assisted project. Architecture, code, tests, and prose are produced through pair-programming. I disclose it because I would want to know if I were reading it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;By Devendra Tandale&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/devendratandle/Ardon-R2" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;br&gt;
&lt;a href="https://linkedin.com/in/devendra-tandale-27bb9620" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; · &lt;br&gt;
&lt;a href="https://github.com/devendratandle/Ardon-R2/issues" rel="noopener noreferrer"&gt;Open an issue&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>opensource</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
