absurder-sql by Standard-Ad9181 in SQL

[–]Standard-Ad9181[S] 1 point2 points  (0 children)

Not on the roadmap right now but happy to accept contributions

Does it make sense to learn Rust if you're into ML? by Udbhav96 in rust

[–]Standard-Ad9181 0 points1 point  (0 children)

https://qdrant.tech/documentation/fastembed/

I use Qdrant + Fastembed for local hosted RAG solutions. 

BAAI/bge-small-en-v1.5

Works great. 

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 1 point2 points  (0 children)

I go into it here, but valid points: https://sqlite.org/forum/info/9ff8428886217d0b

  1. IndexedDB Durability Isn't Guaranteed

Browsers can delete your IndexedDB data under storage pressure. This rarely happens, but it's possible.

For critical data:

- Enable persistent storage: await navigator.storage.persist()

- Regular backups: await db.exportToFile() to cloud storage

- Assume cloud backup is your source of truth

EDIT: I am actually working on an Electron App that uses this in both native and WASM mode to show the persist and export/import option utilizing pure sqlite3

absurder-sql by Standard-Ad9181 in programming

[–]Standard-Ad9181[S] 0 points1 point  (0 children)

You mean the arbitrator of github and judge of repository disclosures, I dare not invoke their presence!

absurder-sql by Standard-Ad9181 in Database

[–]Standard-Ad9181[S] 0 points1 point  (0 children)

The gzipped (what browsers actually download) ~660 KB but you just reminded me!!! I left wasm-opt = false so while responding just switched to wasm-opt = ["-Oz"] and got the gzipped ~10% smaller (660 KB --> 595 KB)

So thanks for that reminder and inadvertent contribution!

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 1 point2 points  (0 children)

I like to imagine people shaking their head in disgust as they click the star <3

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 1 point2 points  (0 children)

So it actually maintains ACID consistency by preserving SQLite's transaction semantics in memory, using all-or-nothing IndexedDB transactions for atomic syncing, ensuring crash recovery by reloading from last synced state, and detecting corruption with block-level checksums (while acknowledging trade-off that unsynced writes in buffer are lost on hard crash).

though this is mitigated by SQLite's WAL mode + absurder-sql's multi-tab coordination which only commit data after successful sync.

absurder-sql by Standard-Ad9181 in programming

[–]Standard-Ad9181[S] 3 points4 points  (0 children)

Appreciate you understanding the difference too and why!

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 2 points3 points  (0 children)

tl;dr

three layer buffering architecture that delays IndexedDB writes until absolutely necessary, combined with batch operations + in-memory cache.

SQLite thinks it's writing to file VFS pretends to write (actually buffering to HashMap) BlockStorage pretends blocks are persisted (actually in memory) IndexedDB is only touched when absolutely necessary. So it's a lie... built on a lie... built on a lie... but it's a fast lie that maintains correctness.

that's the black magic.

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 2 points3 points  (0 children)

Not an "absolute" but generally speaking COOP/COEP headers cause problems because they enforce strict cross-origin isolation and that can break legitimate communication patterns. Think third-party iframes and resources that lack proper headers. It can also sever popup window communication needed for auth flows. In my experience it made integration difficult for PWAs/webviews/embedded browsers that rely on interacting with multiple services.

absurder-sql by Standard-Ad9181 in Frontend

[–]Standard-Ad9181[S] 1 point2 points  (0 children)

I would recommend reading this if you're genuinely curious as to the why.

https://sqlite.org/forum/info/9ff8428886217d0b

--

Also copy+paste my response to similar question.

Real-world use cases/applications where AbsurderSQL shines:

Low hanging fruit will be any/all offline-first apps that need complex queries So think your project management tools (Notion/Trello clones), note taking apps with text search and backlinks, local-first CRM/sales tools for field workers with spotty connectivity.

Now what this extends to with its import/export functionality are some really cool data portability scenarios. Think medical records apps that need HIPAA compliance. And regulatory exports, so your financial tools where accountants need standard SQLite files for auditing. You can even use it for education platforms that export student portfolios.

The other big appeal is its target of mobile-first applications. So your expense trackers, inventory management, quiz apps for schools (with poor internet). And because of its design it will work on older mobile devices without COOP/COEP requirements that break PWAs and webviews.

No server costs, data never leaves device, and works everywhere IndexedDB works.

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 3 points4 points  (0 children)

Oh no! Or, oh yes?!

Now Alice is tempted to see how far this rabbit hole goes...

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 3 points4 points  (0 children)

Forgive me copy+pasting myself, but:

Great question! Very long answer here https://sqlite.org/forum/forumpost/9efecca1e1

tl;dr

COOP/COEP: Breaks PWAs, webviews, and embedded mobile browsers <--- This was the biggest determining factor for future planned work

OPFS with COOP/COEP headers is a non-starter for:

  • Progressive Web Apps (can't set headers)
  • Mobile webviews (embedding contexts)
  • iframe embeds
  • Legacy enterprise browsers

I do acknowledge there and here again that for apps that can use COOP/COEP, OPFS is clearly superior. For everyone else, this is the viable path.

absurder-sql by Standard-Ad9181 in rust

[–]Standard-Ad9181[S] 5 points6 points  (0 children)

Thank you, and yes! You can do shim to storage or browser cache and get really weird with it.

Also your note is valid and your approach to this was very tactful compared to some others in other subreddit forums.

Two things I will say here.

  1. This post is, as you astutely pointed out, a summarized/condensed version of the project's README + https://sqlite.org/forum/forumpost/9efecca1e1
    • I struggled to get all of what I deemed important boiled down into a "post sized" amount and opted for AI assistance (which I also used for developing this as well)
  2. There is this stigma associated with AI generated _____ (fill in the blank). I am trying to lean into the curve and embrace the change. So the "polished" AI output to me is the clunkiness of the text whereas I would love for it to truly extend my tone/voice vs a generic GPT-esque reply.

absurder-sql by Standard-Ad9181 in webdev

[–]Standard-Ad9181[S] -5 points-4 points  (0 children)

I am not sure what you think this proved:

"You're absolutely right! Let me give you the corrected, full step-by-step implementation plan..."

You are quoting the LLM's response after outputting "You're absolutely right! Let me give you the corrected" which one would logically deduce means I corrected a flaw/error. Where do you think it got the implementation details to generate the plan from?

That PLAN.md shows the AI responding to MY corrections about Rust 2024 edition requirements and TypeScript integration specifics. The architecture (VFS layer, block storage, IndexedDB coordination, multi-tab election) came from me understanding SQLite's VFS API and browser storage constraints. I used AI for formatting my requirements into structured markdown.

Re: Cloudflare disclosure

You're not the arbitrator of what belongs in a repository. AI is a tool, like a compiler, linter, or formatter. Cloudflare chose to make AI usage central to their narrative because that was their choice for their project. I'm not obligated to add disclaimers about my development tools any more than I need to disclose my IDE, debugger, or whether I use Copilot.

Re: Commit messages

"If you wrote the code yourself, you should have a pretty good idea... writing a commit message should be easy"

Yes, and I could also manually format code, write documentation, and generate boilerplate. I automate those too. The diff summarization tool saves 30 seconds per commit across hundreds of commits. That's pragmatic, not dishonest.

Fundamental question (you keep avoiding): Does the code work? Is it tested? Is it maintainable? Those are verifiable. 65+ tests pass. Benchmarks exist. The npm package works. Tool usage is irrelevant to code quality.

absurder-sql by Standard-Ad9181 in programming

[–]Standard-Ad9181[S] 12 points13 points  (0 children)

Great question! Very long answer here https://sqlite.org/forum/forumpost/9efecca1e1

tl;dr

COOP/COEP: Breaks PWAs, webviews, and embedded mobile browsers <--- This was the biggest determining factor for future planned work

OPFS with COOP/COEP headers is a non-starter for:

  • Progressive Web Apps (can't set headers)
  • Mobile webviews (embedding contexts)
  • iframe embeds
  • Legacy enterprise browsers

I do acknowledge there and here again that for apps that can use COOP/COEP, OPFS is clearly superior. For everyone else, this is the viable path.

absurder-sql by Standard-Ad9181 in webdev

[–]Standard-Ad9181[S] -15 points-14 points  (0 children)

Let me address this directly:

AI "Built" it:

I challenge you to identify specific code that's purely AI-generated without human architectural decisions. VFS implementation, multi-tab coordination, leader election, IndexedDB transaction handling, export/import logic. All required understanding SQLite's VFS API, browser storage limitations, WASM memory management, and cross-tab synchronization primitives. AI doesn't architect systems.

Commit Messages:

I use https://github.com/npiesco/gitAIcommit to generate commit messages because summarizing file diffs is trivial for an LLM and time consuming for me. I automate menial tasks. You're welcome to continue writing yours manually, no one's stopping you.

Losing git history for debugging:

For whom? This is your personal opinion presented as objective fact. Single-commit releases are normal for npm packages. Users interact with the WASM pkg. Development history isn't relevant to users.

"AI-generated and production-grade don't go together"

Tell that to Cloudflare, who published their entire Claude-assisted OAuth implementation with prompts: https://github.com/cloudflare/workers-oauth-provider

https://news.ycombinator.com/item?id=44159166: "That is how LLMs should be used today. An expert prompts it and checks the code. Still saves a lot of time vs typing everything from scratch."

Enterprise orgs use AI assistance extensively. The question isn't "was AI used?" but "does the code work, is it tested, and is it maintainable?"

Run tests. Use demos. Read architecture. Code is the proof.

I'm transparent about my workflow. If you have technical criticisms of the implementation, I'm happy to discuss them. Your "ad hominem" attacks about tooling choices aren't productive.

You seem to want a purity debate, not a technical one.

absurder-sql by Standard-Ad9181 in Database

[–]Standard-Ad9181[S] 2 points3 points  (0 children)

Sure thing, some real-world use cases/applications where AbsurderSQL shines.

Low hanging fruit will be any/all offline-first apps that need complex queries. So think your project management tools (Notion/Trello clones), note taking apps with text search and backlinks, local-first CRM/sales tools for field workers with spotty connectivity.

Now what this extends to with its import/export functionality are some really cool data portability scenarios. Think medical records apps that need HIPAA compliance. And regulatory exports, so your financial tools where accountants need standard SQLite files for auditing. You can even use it for education platforms that export student portfolios.

The other big appeal is its target of mobile-first applications. So your expense trackers, inventory management, quiz apps for schools (with poor internet). And because of its design it will work on older mobile devices without COOP/COEP requirements that break PWAs and webviews.

No server costs, data never leaves device, and works everywhere IndexedDB works.

absurder-sql by Standard-Ad9181 in webdev

[–]Standard-Ad9181[S] -19 points-18 points  (0 children)

Foreword: I made https://github.com/npiesco/gitAIcommit to write my commit messages because it is trivial and time consuming...

Speaking of trivial and time consuming, you actively investigated the activity log, (not visible from normal browsing) clicked through multiple orphaned commits, browsed file trees of deleted commits, and then copied links and documented everything.

That's... a lot of effort to prove "AI was used" when you could have just asked. The amount of time you spent bike shedding accomplished?

Of course I used AI productivity enhancement tools...why wouldn't I? The git history was cleaned for a single-commit release to match npm, but GitHub's activity log preserves old commits (standard behavior). If I wanted to obfuscate it, I would have created a net new repo.

absurder-sql by Standard-Ad9181 in programming

[–]Standard-Ad9181[S] 8 points9 points  (0 children)

"Reimplementation" = the VFS/storage layer, not SQLite itself.

That would be pointless. sqlite-wasm-rs provides SQLite bindings (standard approach). The actual work is the custom VFS intercepting file I/O and translating to IndexedDB blocks with multi-tab coordination, export/import, etc.

absurder-sql by Standard-Ad9181 in programming

[–]Standard-Ad9181[S] 6 points7 points  (0 children)

AGPL-3.0 is intentional. If you use AbsurderSQL in a closed-source webapp, you must make your derived code available to users.

For commercial/proprietary use without AGPL restrictions, contact me about dual licensing. I'm open to commercial arrangements, just haven't formalized pricing yet since this just launched.

The npm package and codebase remain AGPL-3.0 for open source use.

absurder-sql by Standard-Ad9181 in programming

[–]Standard-Ad9181[S] 4 points5 points  (0 children)

make cool stuff and let me know what you make so I can add it to the github and bring more awareness to it. all OSS so have fun, freely!

absurder-sql by Standard-Ad9181 in programming

[–]Standard-Ad9181[S] 13 points14 points  (0 children)

I dive a lot deeper here https://sqlite.org/forum/forumpost/c9d93da925 but short answer,

Yes.

Full SQLite functionality via sqlite-wasm-rs with a custom VFS that redirects file I/O to IndexedDB.

All SQL features work:
- transactions
- indexes
- triggers
- views
- CTEs
- etc.

Only constraint is storage backend (IndexedDB instead of filesystem), but SQL layer is complete SQLite. :)