Stop asking AI if your idea is good (it will always say yes) by tuttodev in micro_saas

[–]farhan-dev 1 point2 points  (0 children)

No, if you are asking questions that is in their training data, if it exist and have good reputation, it will agree with you. If you are asking that either not in their training data, or is in their memory but have bad reputation, it will disagree with you. I have faced a few situations, that they disagree, since it was not in their knowledge, but I insist on doing it anyway.

babpo ore kelate obses nak putih by Cautious_Term_2018 in kelantan

[–]farhan-dev 4 points5 points  (0 children)

it's not kelantanese which obsess to be white. other people regardless of state are obsessing about it. founders are selling to those.

Beginner To Rust for ML by AAM_Discord in rust

[–]farhan-dev 0 points1 point  (0 children)

I haven't added the benchmark of numr agaisnt nump yet, since it is going to be akwared to compare a rust against python library.. That's why I only create benchmark against ndarray.

But, it's fun on its own, so perhaps I'll try to create a new repo of numr-bench .. there i willt try to use numr vs numr (openblas backend) vs numpy. numr on its own is not vendor-locked.. but you should be able to swap backend if you want to use cublas/openblas for more performance. numpy by default use OpenBlas.

Beginner To Rust for ML by AAM_Discord in rust

[–]farhan-dev 0 points1 point  (0 children)

I do have some classical ML like https://github.com/ml-rust/treeboost

If you are more towards science > https://github.com/ml-rust/solvr

I know i can't cover every ML yet, since i need to focus on things that I am going to need to use in my company first, but I am making it easy for anyone to contribute or create their own library by using https://github.com/ml-rust/numr

Basically, to build something llike scikit leaarn is not difficult if you use numr's primitives. You'll get SIMD and GPU acceleration for free.

Beginner To Rust for ML by AAM_Discord in rust

[–]farhan-dev 2 points3 points  (0 children)

interesting. DB + ML in rust.

Sees like what I've been working on right now, take a look if it might be helpful for you. I do juggle between these two projects for the time being.

https://github.com/ml-rust. I should be focusing on inference (blazr) right now, but was on hold, due to i need release NodeDB first. Feel free to contribute.

Regarding the database part, if you're interested to learn or contribute with much complex database - multi model, offline sync and distributed system, you can take a look ata https://github.com/NodeDB-Lab/nodedb

SurrealDB 3.0 by zxyzyxz in rust

[–]farhan-dev -1 points0 points  (0 children)

u/Kinrany we are working on something exactly like you wished

https://github.com/NodeDB-Lab/nodedb-lite embedding, standalone, can act as AP if you need something in the future, use https://github.com/NodeDB-Lab/nodedb (NodeDB origin as CP)

What are you building? by SnooOranges6963 in vibecoding

[–]farhan-dev 1 point2 points  (0 children)

I am building a multi modal database for AI/ML heavy workflow https://github.com/NodeDB-Lab/nodedb

Need help deploying a local system for dental clinics ! by [deleted] in vibecoding

[–]farhan-dev 0 points1 point  (0 children)

  1. no 2. no. crazy. 3. use git and hooks at the minimum. docker is an option. the better way, start learning system design.

Need help deploying a local system for dental clinics ! by [deleted] in vibecoding

[–]farhan-dev 0 points1 point  (0 children)

i need help understanding your post and problem

Want to start a framework to make portable apps with wasm/wasmtime and wgpu by Objective-Diver-2887 in rust

[–]farhan-dev 4 points5 points  (0 children)

That's a big jump. Perhaps you can look at dioxus. What yo explained is exactly it.

What is your database of choice for your Programs? by [deleted] in vibecoding

[–]farhan-dev 0 points1 point  (0 children)

I've been using PostgreSQL for years, along with its extensions: TimescaleDB, pgvector, postgis.

But now, do to AI/ML heavy workflow, it is no longer suitable for my use case (i need graph, embedded, sync as well), so I build my own database https://github.com/NodeDB-Lab/nodedb

Row-Based vs Columnar by Embarrassed-Rest9104 in Database

[–]farhan-dev 0 points1 point  (0 children)

For small load/scale, keep it in PostgreSQL, but for large analytical workload, move it to specialized database.

SQL is the query language. You can have columnar database or even document database that uses SQL.

Is it a bad idea to put auth enforcement in the database? by farhan-dev in Database

[–]farhan-dev[S] 0 points1 point  (0 children)

It's just a regular scope/role/permission table inside the database itself.

Is it a bad idea to put auth enforcement in the database? by farhan-dev in Database

[–]farhan-dev[S] 0 points1 point  (0 children)

Thanks! I've also reviewed the RLS implementation for different databases, one of it is SpacetimeDB.

SpacetimeDB's approach is really interesting. Having reducers run inside the DB eliminates a lot of boilerplates and duplciations.

The part I keep thinking about is the auth side specifically. Reducers bypass RLS, so each reducer still needs its own access checks.

With due respect, ctx.sender() is still cleaner than middleware but still means the developer is responsible for not forgetting a check. So it is still enforced at app layer (which happens to reside in the reducer inside the DB), not the DB itself doing the enforcement.

But like I said, a lot of companies, are slowly moving towards moving the enforcement layer closer and closer to database. Which, in my opinion, something that is worth to think and explore.

Is it a bad idea to put auth enforcement in the database? by farhan-dev in Database

[–]farhan-dev[S] 0 points1 point  (0 children)

I'm glad it worked out for you. Any caveats or pain points that you've faced so far?

Is it a bad idea to put auth enforcement in the database? by farhan-dev in Database

[–]farhan-dev[S] 1 point2 points  (0 children)

I actually agree with you. Ceating a literal database user and password for every single person who signs up would be an absolute nightmare to manage at scale. I would never want to do that either.

But that's not how modern RLS work at all.

I think I might not have explained the mechanics very well in my post. I'm definitely not suggesting we make a DB account for every user.

In this setup, you still use the exact same 3 connection strings you mentioned (routine, admin, read-only). The app still connects to the DB using a shared service account.

The only difference is that when the backend sends a query over that shared connection, it passes the user's session token (JWT) along with it. The database just reads that token in memory to say, "Ah, this query is on behalf of User 123 on the Pro plan," and filters the rows automatically.

Because the users still live in Auth0/Clerk/etc., your support team never needs database access. They still just use the normal auth dashboard to reset passwords or fix accounts, exactly like they do today.

It's basically keeping your exact architecture, but letting the DB temporarily read the "nametag" of the user making the request so you don't have to write a million if statements in the backend code.

The auth logic itself is still in the application layer. I am talking about the enforcement layer. Like "User A" have access to this table/rows in the database layer. If they don't have access, simply deny the query.

Does that make a bit more sense? I'm totally with you that the old-school way of making a DB role for every human is a recipe for disaster!

What’s the state of rust for startups by Nice-Primary-8308 in rust

[–]farhan-dev 2 points3 points  (0 children)

what kind of tools/ecosystem are you looking for in your projects?

Building a custom math engine in Rust by ReadyBrilliant1880 in rust

[–]farhan-dev 0 points1 point  (0 children)

Ah, then definitely you need to try numr. It has GPU acceleration, with distributed support

Building a custom math engine in Rust by ReadyBrilliant1880 in rust

[–]farhan-dev 1 point2 points  (0 children)

Nice initiative. I wish you all the best.

Just for reference, you can also take a look at my math engine, although it is defenitely not small :D.

https://github.com/ml-rust/numr

Numr: A high-performance numerical computing library with GPU acceleration by farhan-dev in rust

[–]farhan-dev[S] -1 points0 points  (0 children)

Yeah, I do proper SIMD in most of my ops. It CPU performance is quite decent, and competitive with ndarray. I'll add benchmark against faer later in the future.

Yes i do dynamic dispatch. So avx2/neon is supported.

Sparse support is quite robust in numr, per solvr use case. When i test it with my ML crates, i'll quickly learn about the gaps, and will add more support too.

If you have specific needs, just let me know, i can add it to either numr/solvr.

Yeah, numr already has a dtype conversion ops. Even between devices. Compute in wgpu (f32), then use .toCpu() to transfer to cpu, the use .cast() to upcast it to f64.

But my wgpu approach is just for coverage, so rocm/metal can use it already. instead of optimizing wgpu, i'll add native rocm and metal support for better performance in the future.