ARC – A nimble framework for ai agent creation!

Hello r/Kotlin

I’m thrilled to introduce ARC, a new Kotlin framework for building AI Agents which takes the overhead off AI Agent creation. ARC is designed with simplicity and minimalism at its core.

It’s been a very tough journey braving so many questions from doubters on why not langchain or python etc. u/Pat_Wlan has so many scars to show as he led this module and is the core committer 🔥❤️🔥. This has been the result of our learnings from developing multi-agent systems that are deployed in production at Deutsche Telekom.

What sets ARC apart?

  • Minimal Dependencies: We’ve kept ARC lean, ensuring that you only bring into your project what you truly need. No more bloat or extraneous libraries that hog resources and complicate your builds!
  • Focused on Kotlin’s Strengths: ARC is built to maximize Kotlin’s features such as DSL.
  • Interoperable by Design: While ARC doesn’t use langchain or springAI, it’s designed to play well with them. You’re free to integrate AI functionalities or other libraries as you see fit, making ARC a flexible choice for a wide array of projects.
  • Community-Centered: ARC is open-source and community-driven, with the aim of evolving through your insights and contributions. We believe in the power of collective intelligence and are excited to see how the framework grows with your input.
  • Flexible ARC is meant to be architecture agnostic. It doesn’t matter whether you are building microservices, a CLI or something else altogether.

We would like to get your feedback on this small endeavor we took, braving so many questions internally on why not langchain or python etc .
Would be great if you could check it out and help us make it 🚀🔥🚀.

Using the arc-spring-init repository combined with your OpenAI-API Key you can create agents within seconds!

Project: ARC, dive into the docs 📖

We’re looking forward to your valuable feedback.

Thanks ❤️!

submitted by /u/merren-fx
[link] [comments]

Continue ReadingARC – A nimble framework for ai agent creation!

Awesome book on kotlin design patterns

I was recently given the opportunity to review Kotlin Design Patterns and Best Practices – Third Edition for free and thought I’d post my thoughts. (Here’s the original post https://www.reddit.com/r/Kotlin/s/pd2CPE66hK)

Disclaimer: I received a review copy of this book for free.

TLDR: This is a great book that covers both what makes Kotlin cool, and how to create succinct, maintainable code that utilizes all of Kotlin’s features. It explains things well and contains great information. I would highly recommend this book to people who already know a bit about programming and are looking to create better code and possibly learn the awesome language that is Kotlin.

Throughout this book, I have greatly increased my knowledge of both Kotlin and design patterns. I am currently a junior at the University of Utah studying computer science, so I have experience working with code. I have never studied traditional design patterns, however, so this book was a great resource for me in expanding my toolset for creating maintainable and readable code. Everything in this book was taught succinctly yet was very understandable, containing ample examples of the ideas presented. It not only covers the traditional design patterns outlined by the gang of four but also digs into the wonders of functional programming. Most of my schooling has been on object-oriented programming, yet I have always been curious about functional programming. This book has scratched that itch, teaching you the incredible benefits of functional programming and its implementation, as well as the pros and cons of the method. It bridges the divide between object-oriented and functional design patterns incredibly well, something that is often missed by functional evangelists.

This book is also a great resource in learning kotlin itself. The book guides you through the syntax and features of kotlin throughout the entire book, showing how kotlin lends itself well to many different design patterns. It emphasizes Kotlin’s multi-paradigm nature and shows off both its object-oriented and functional prowess. It discusses awesome features like scoping functions, extension functions, functions as first class objects, and many other features. This book not only serves as a great resource on design patterns, but also a manual on how to use kotlin effectively that blows the kotlin documentation out of the water. Throughout its 12 chapters it manages to teach you everything you need to know about the language. This emphasis on kotlin does not detract from the teaching of design patterns, however, but instead allows practical examples of each pattern to be shown. It provides you with a basis to explore and explain complex design patterns in an obtainable way.

The book in places does seem to gloss over some topics that would be foreign to complete programming beginners, so I think that you should not get this book if you have not had any experience programming in Kotlin or another language. It assumes that you already know the basics of programming, like classes, functions, inheritance, variable scope, etc. It is designed as a resource for writing better code, not learning how to code.

The 414 pages of this book took me about 3 full days to read, but never became a slog. The book continuously throws interesting topics at you but never stays on one for longer than it needs to. I almost never can read textbooks, but this one managed to keep my attention like no other.

In conclusion, I would highly recommend this book to anyone who wants to learn about creating maintainable and readable code while also exploring the awesome language that is Kotlin.

submitted by /u/copperly123
[link] [comments]

Continue ReadingAwesome book on kotlin design patterns

Kotlin Multiplatform

I started a project that uses KMM for solely IOS development. I followed the JetBrains Multiplatform guide where it allowed me to download demo code for both an android+iOS app and a just IOS app.

In the android+iOS app project directory, composeApp has androidMain, commonMain and iOSMain whereas the iOS app only has commonMain and iOSMain which makes sense.

So I picked the base code for just iOS development. I wanted to move the files under iosMain to commonMain in case I want to support android in the future but somehow it breaks the gradle build process.

I created a kotlin directory under commonMain just like how there’s a kotlin directory under iosMain and moved the refactored code there. I thought that would work since that’s basically the same structure as the android+ios demo project, but first thing I noticed was the files under commanMain and iosMain no longer see each other (unlike the android+iOS project where they can without explicitly declaring the same package).

I also inspected the gradle.build files and they don’t seem flawed either.

Does anyone have an idea of why that might be?

Also, does anyone know how to reduce the gradle build time? Building the iOS part always seems to take 5 minutes ish.

submitted by /u/DataWizard_
[link] [comments]

Continue ReadingKotlin Multiplatform

Trying Kotlin Multiplatform Compose for Web (without wasm)

Hey there I have a kotkin multiplatform compose app that runs on wasm and works fine for the most part, my issue is that some clients have really old browsers that doesnt have wasmGC.

I have read somewhere that instead of KMC for web with wasm we can use generation of js. Yes skia is still wasm I guess but the app itself will use skia and draw on canvas. I believe this is something that flutter is doing in the last 2+ years.

I have read that Kotlin Multiplatform Compose web was also working without wasm some time ago but right now cant find how to migrate my wasm builds to js only builds.

submitted by /u/jNayden
[link] [comments]

Continue ReadingTrying Kotlin Multiplatform Compose for Web (without wasm)

Hey Kotlin devs, lambdas vs builder pattern: mind blown?

I’ve been wrestling with my brain lately on lambdas with implicit receivers (think fancy Kotlin DSL stuff) and the builder design pattern. They both let you configure objects step-by-step, but is one inherently better?

The builder pattern seems super organized, keeping things clean and potentially adding validation. But for simple stuff, it can feel like overkill. On the other hand, lambdas are concise, but I worry they might make the configuration process less clear or harder to control.

So, what are your experiences? When do you use lambdas and when do you reach for the builder pattern? Are there any golden rules for choosing between them?

submitted by /u/itsTanany
[link] [comments]

Continue ReadingHey Kotlin devs, lambdas vs builder pattern: mind blown?

Ktor vs http4k

My exploration of JetBrains’ HTTP library concludes today with a comparison of the same functionality implemented with Ktor (https://ktor.io/) and http4k (https://http4k.org)

That’s it really. Please watch it to the end and let me know in the comments if you agree with my conclusions.

In this episode

  • 00:00:00 Review
  • 00:02:28 Create a function to create the routes
  • 00:03:35 IntelliJ refactoring internal error
  • 00:04:23 Bind our first handler to GET /customer
  • 00:06:32 http4k JSON support
  • 00:08:16 Bind a handler to GET /customer/{id}
  • 00:10:17 Some trouble binding to a path with no id
  • 00:12:00 Fudge that
  • 00:12:38 A handler for delete by ID
  • 00:14:55 Another route matching differences between Ktor and http4k
  • 00:16:05 Finally a POST for adding a customer
  • 00:18:53 Finally another error case, this time we need to catch
  • 00:20:47 Check the tests
  • 00:21:12 Compare and contrast our two app versions

This video is in a playlist of Ktor episodes (https://www.youtube.com/playlist?list=PL1ssMPpyqochUiQEM9PZ_P-9CbV1Il81B) and http4k (https://www.youtube.com/playlist?list=PL1ssMPpyqocg5TKqmiGWlvi3O5L8XPe8Q)

If you like this, you’ll probably like my book Java to Kotlin, A Refactoring Guidebook (http://java-to-kotlin.dev). It’s about far more than just the syntax differences between the languages – it shows how to upgrade your thinking to a more functional style.

submitted by /u/dmcg
[link] [comments]

Continue ReadingKtor vs http4k

End of content

No more pages to load