LuaCAD - Parametric CAD scripted in Lua
▲ 157 r/lua+1 crossposts

LuaCAD - Parametric CAD scripted in Lua

LuaCAD models solids in Lua rather than the OpenSCAD language, with operator overloading for CSG (a + b, a - b, a * b). It ships with a CLI and a desktop app, including a preview area and a text editor.

It’s fully open source and you can find the repo here: https://github.com/ad-si/LuaCAD

I've always been a big fan of OpenSCAD, but the SCAD language itself is unfortunately quite cobbled-together and is a very poorly designed programming language.

LuaCAD takes all the good parts of OpenSCAD and combines them with Lua. It has now completely replaced OpenSCAD for me, and I think it provides a better experience than OpenSCAD for all use cases. I'd love to hear any reasons why LuaCAD won't fully replace OpenSCAD for you!

Tech stack:

u/adwolesi — 3 days ago

Woxi 0.3 - New version of the open-source Mathematica / Wolfram Language alternative

Woxi is a free open source interpreter for the Wolfram Language, written in Rust. The guiding rule of the project: whatever it implements must produce exactly the same output as wolframscript / Mathematica — the test suite (26'000+ unit tests) compares against it directly.

Version 0.3.0 is out now. Highlights since 0.2.0:

  • Many Wolfram Demonstrations now run end to end in Woxi Studio, the included native notebook editor for .nb files — still far from all of them, but dozens (Kepler's Second Law, Parabolic Mirror, Doyle Spirals, …) serve as end-to-end tests. Manipulate covers a good part of the Demonstrations control vocabulary (interactive Locators, Trigger, Button, SetterBar, PopupMenu, controls nested in TabView/Grid, dependent controls, TrackedSymbols, Animate bodies, …), and typeset notebook input is read back as code.
  • Plotting conformance: Automatic ticks now match Wolfram's algorithm, list plots grew Around error bars, Callout, Filling, PlotMarkers and friends, plus new ComplexListPlot and ListLinePlot3D.
  • CAS: more Integrate/D/Series/Limit coverage, LinearProgramming with an exact simplex solver, NonlinearModelFit, Reduce over higher-degree polynomial inequalities, RootReduce, and many canonical-ordering fixes so results print exactly as wolframscript prints them.
  • Windows is now a supported platform, and every release ships prebuilt binaries for Linux, macOS, and Windows.

Try it without installing anything in our playground and JupyterLite instance in the browser: https://woxi.ad-si.com

Install: cargo install woxi, pip install woxi (Python bindings), or npm install woxi-wasm. Full changelog: https://github.com/ad-si/Woxi/blob/main/changelog.md

If Woxi is useful to you, I'm now accepting donations on GitHub: https://github.com/sponsors/ad-si I hope to receive enough support to keep the project going for a long time, and to eventually reach full parity with Wolfram's implementation.

u/adwolesi — 12 days ago
▲ 83 r/haskell

Perspec 1.0 - A Haskell desktop app for perspective correction of document photos

After 9 years of on-and-off development, I'm happy to announce the 1.0 release of Perspec, a desktop app for correcting the perspective of photos of documents, receipts, and whiteboards.

The headline feature of 1.0 is automatic corner detection: instead of the usual edge-detection + Hough transform pipeline, it segments the document via watershed segmentation and finds corners, which handles wrinkled receipts and curved book pages much better. And if the detection is off, you can just drag the selection polygon to fix it.

Some Haskell-relevant bits:

  • The GUI is built with Brillo, my maintained fork of gloss.
  • The computer vision runs in FlatCV, a pure C library I wrote for this, called via Haskell's FFI.
  • With 1.0, Perspec now runs on macOS, Linux, and Windows.

The full announcement covers the journey (Python → ImageMagick → Hip → C FFI), the corner detection pipeline, and the binarization algorithms in detail.

Looking forward to you feedback! 😊

adriansieber.com
u/adwolesi — 22 days ago

AirCSV - Small native CSV editor because I'm tired of Excel ruining my files

Every time I open a CSV in Excel or Numbers it tries to be smart. Leading zeros gone, anything that vaguely looks like a date becomes one, and then you save and your file is wrecked. And the alternative is editing raw commas in a text editor.

So I wrote AirCSV. It's a small Mac app that shows the file as a grid and otherwise leaves it alone. What you see in a cell is literally what's in the file.

It does the things you'd expect: arrow key navigation, double click to edit, select ranges with shift+click, copy/paste whole rows or columns, drag rows and columns around to reorder them, undo/redo.

It's free and open source and you can get it here: https://github.com/Airsequel/AirCSV

Let me know if everything works for you and if there's something you're missing! 😊

u/adwolesi — 2 months ago

AirCSV - Small native CSV editor because I'm tired of Excel ruining my files

Every time I open a CSV in Excel or Numbers it tries to be smart. Leading zeros gone, anything that vaguely looks like a date becomes one, and then you save and your file is wrecked. And the alternative is editing raw commas in a text editor.

So I wrote AirCSV. It's a small Mac app that shows the file as a grid and otherwise leaves it alone. What you see in a cell is literally what's in the file.

It does the things you'd expect: arrow key navigation, double click to edit, select ranges with shift+click, copy/paste whole rows or columns, drag rows and columns around to reorder them, undo/redo.

It's free and open source and you can get it here: https://github.com/Airsequel/AirCSV

Let me know if everything works for you and if there's something you're missing! 😊

github.com
u/adwolesi — 2 months ago
▲ 15 r/sqlite

SQLiteDAV 0.2.0 — WebDAV server that exposes an SQLite database (or sqlar archive) as a filesystem

I just released a new version of SQLiteDAV, a small Haskell WebDAV server that maps an SQLite database onto directories and files so you can mount it with Finder, davfs2, Cyberduck, etc.

Two supported modes, both first-class:

  • sqlar archives — paths inside the archive table behave like a normal filesystem.
  • Plain databasestables → folders, rows → folders (keyed by rowid or PK), columns → files named <col>.<ext> (extension derived from the cell's type or sniffed via libmagic for BLOBs).

So you can do things like:

sqlitedav mydata.sqlite
# then mount http://localhost:1234 and:
cat /Volumes/dav/users/42/email.txt
echo "new@example.com" > /Volumes/dav/users/42/email.txt   # UPDATE
rm /Volumes/dav/users/42/bio.txt                            # sets cell to NULL
mkdir /Volumes/dav/new_table                                # CREATE TABLE

What's new in 0.2.0.0:

  • First-class support for SQLite Archive Files (sqlar).
  • Full write-method parity for plain DBs (PUT/DELETE/MKCOL/COPY/MOVE for cells, rows, and tables).
  • LOCK / UNLOCK support and Prefer: depth-noroot / return=minimal.
  • WebDAV compliance hardened against the Litmus test suite (Dockerised harness ships with the repo: make litmus).
  • PROPFIND no longer loads every row's BLOB into memory — fixes OOMs on multi-gigabyte databases.
  • PUT now preserves the column's declared type (TEXT/INTEGER/REAL/BLOB) instead of forcing BLOB on every write.
  • --rowname {rowid,pk,combined} flag to control how plain-table row directories are named.
  • Deleting a file (DELETE on a cell) sets it to NULL instead of erroring.
  • libmagic-based extension detection for BLOB columns.

Issues and upvotes on the tracker drive what gets built next.

github.com
u/adwolesi — 3 months ago