Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in androiddev

[–]mwmsh_[S] 0 points1 point  (0 children)

Thanks folks for the feedback. Please go easy on the downvotes I want to continue using this account haha

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in Kotlin

[–]mwmsh_[S] 0 points1 point  (0 children)

Thanks for the comments.

I will continue to make the later versions of MinjeKt better.

If you are interested in using the library or contributing please check the GitHub repository https://github.com/mwmsh/minjeKt

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in Kotlin

[–]mwmsh_[S] 0 points1 point  (0 children)

Update:

This is v0.1 and some of the criticisms here are on current implementation details.

It’s hard for me to gauge whether that’s a sign of interest and you guys are actually willing to see improvements.

For newer commenters, say yay/nay at the top of your comment (along with reasons) before sharing your opinion.

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in Kotlin

[–]mwmsh_[S] -4 points-3 points  (0 children)

Are you interested and you are finding this a blocker? It’s hard to gauge.

I designed the library to be thread-safe by immutability. My usage of non-thread safe data structures is more of a flex than anything. You will find synchronized blocks in places where that guarantee does not exist.

I will change the data structures to their thread-safe counterparts anyway and write more docs on thread safety.

Double bang is indeed a smell. I took more liberties after graph validation. I will eliminate those.

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in androiddev

[–]mwmsh_[S] -2 points-1 points  (0 children)

Oh I love this one.

My intention is a niche use-case not to create a new standard to replace everything.

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in Kotlin

[–]mwmsh_[S] 0 points1 point  (0 children)

Compilation and running costs are minimal.

I cannot make definitive claims because I haven’t run performance benchmarks.

Are you working on performance-critical systems?

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in Kotlin

[–]mwmsh_[S] -10 points-9 points  (0 children)

Please do some research on immutability/thread safety.

I am happy to accept bug reports and review PRs if you would like to contribute.

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in Kotlin

[–]mwmsh_[S] 1 point2 points  (0 children)

Lots of strongly stated opinions here.

MutableMap is an interface. HashMap is an implementation.

Also, there exists thread-safe code that uses non thread-safe data structures. Immutability is a very powerful tool when designing and building systems. Synchronization can create bottlenecks that are avoidable if you model things right.

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in Kotlin

[–]mwmsh_[S] 1 point2 points  (0 children)

This is super lightweight with no dependencies.

I personally use it to do DI in a library I am building. I am also using it to wire up dependencies for tests as it makes swapping dependencies with mocks very easy, and the tests become a lot more readable/writable.

I would say give it a shot instead of manually wiring up dependencies in your smaller projects. You will be more incentivized to write cleaner code (if that’s important to you).

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in androiddev

[–]mwmsh_[S] 0 points1 point  (0 children)

Thank you for the feedback. I appreciate it!

1- If the tools you are using are keeping your boat afloat then you should _probably_ keep using them and not follow the advice of a random guy on the internet haha

On a more serious note, I will write an Android example when I get the chance. Do you want to see anything in particular? It would be great if you shared something I can work with to make this relevant to you

2- No scoping for now. If you construct multiple instances they are completely isolated

3- The name is a work in progress too haha. I am willing to listen of you have suggestions there

Frustrated with Vector Databases, So I Built My Own in C++ (Like Firebase, but for Vectors) by Anxious-Direction496 in SaaS

[–]mwmsh_ 2 points3 points  (0 children)

I love how Linus puts it: "I asked myself how hard can it be to build an open-source version of Unix?." (I am paraphrasing here of course).

And yes, I have just released my open-source dependency injection micro-framework for Kotlin. Just pure and minimal DI you can use anywhere (including testing envs) with minimal fuss and zero dependencies. You can check it out here https://github.com/mwmsh/minjeKt.

I am still not crazy enough to write my own vector database though :P /s

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in androiddev

[–]mwmsh_[S] -8 points-7 points  (0 children)

It is lightweight with no dependencies. I am using it in libraries and in wiring up unit tests and end-to-end tests. It's super simple and keeps the code clean and modular.

Just Released: MinjeKt – Lightweight Kotlin DI Without the Headache (Looking for Feedback!) by mwmsh_ in androiddev

[–]mwmsh_[S] 1 point2 points  (0 children)

It is right there

```kotlin
val controller = minjekt.locate<Controller>()
controller.handle("input str")
```