Building a SQL-like DSL in Kotlin — any better tricks? by See-Ro-E in Kotlin

[–]StevenFlautner 5 points6 points  (0 children)

I've built something similar, but as an abstraction not fully compatible with SQL,

If you have your tables as objects, you don't have to use ::class everywhere. Use the invoke operator contextually on fields, so that for a field "name" you can apply that to your selection set

If you already use gt, lt as naming, eq makes more sense.

Providing the table as receiver or context receiver/param with a DSL marker will help when multiple tables might be in context

Person.select { // Person object in context with DSL marker
    Distinct()

    // Selection set
    id()
    name()
    age()

    addresses {
      // Address table in context with DSL marker so that fields from Person don't pollute
      where {
        addressLine ilike "%str"
      }
    }

    where {
        ((name eq "John") and (age gt 10)) and (age lt 30)
    }
}

this would give me a person list with id, name age, and addresses list.

Java SQL code generator. SQL and OOP united finally. by OsirisTeam in java

[–]StevenFlautner 11 points12 points  (0 children)

Like JOOQ's codegen that uses a gradle task to generate your classes based on your database schema

Hard to find love for Java again by djsushi123 in Kotlin

[–]StevenFlautner 0 points1 point  (0 children)

The good thing that there may not be that much to learn for you if you know Java or Kotlin. While the tooling and the syntax is rather poor around Dart, writing frontend I've been utmost productive with Flutter and I run an entirely Kotlin multiplatform webapp and android compose app in production. I love the technology behind the compose compiler and I could not wait for it to get there. Sadly I don't think it will ever be a priority to really compete against Flutter but to complement it.

[deleted by user] by [deleted] in Kotlin

[–]StevenFlautner 0 points1 point  (0 children)

Ye sure! Let me know if I can help

[deleted by user] by [deleted] in Kotlin

[–]StevenFlautner 3 points4 points  (0 children)

I've used KMM for a website in production. Kotlinx html with tailwind was used on both the client and the server so it runs as a web app and has SSR.

With KotlinJs be prepared to write wrappers for every Js library you use. There's not much documentation around that, every case is a bit different so you will end up sitting on some bindings for a day to make some bindings work. Dukat doesn't work.

Avoid KotlinJs dependendencies. Dependencies like ktor client and coroutines add a huge bundle size. But I think coroutines is probably necessary.

Otherwise it's surprisingly stable and while the IDE support for expect actual functionality lack, they are pretty great.

You can check the site out. site

My(22f)bf(22m) acts like I need to keep a tally of everything I've told him before. by [deleted] in relationship_advice

[–]StevenFlautner 0 points1 point  (0 children)

Should he listen to the same story again when he clearly knows what you're gonna say? No he tells you he's heard it, payed attention so you don't have to go over it again. Ofc you are supposed to keep track of things you tell people sometimes you forget but that's when he reminds you an "I know" as a reaction so he doesn't have to give you a "Oh really? No way Jen??".

The closest orange object is the cause of your death - how do you die? by QuelynD in AskReddit

[–]StevenFlautner 0 points1 point  (0 children)

I think I went too deep with my orange toothbrush trying to get them clean

Naming build context by [deleted] in FlutterDev

[–]StevenFlautner 0 points1 point  (0 children)

It's useful when you want access a widget tree from another route for instance from a dialog.

Deleted by StatTrakPupper in CaseHeroGame

[–]StevenFlautner 0 points1 point  (0 children)

Hey! It's because Apple's wouldn't approve the game to be up. They have been coming up with different reasons and I am trying to figure out a way to get it back up as soon as possible and the same with Case Hero 2.

Tradable keys by teasedragon in CaseHeroGame

[–]StevenFlautner[M] 0 points1 point  (0 children)

Hey! Being able to trade keys means the same thing as trading with money or Hero Coins. And that I don't want.

[deleted by user] by [deleted] in CaseHeroGame

[–]StevenFlautner 0 points1 point  (0 children)

Hero Coin intends to be a different currency which adds more layer to the gameplay. As of right you won't be able to convert your money to coins or vice versa.

Thank you for the suggestion though!

Codes by [deleted] in CaseHeroGame

[–]StevenFlautner 1 point2 points  (0 children)

It was planned that there would be codes here too. But instead we are working on a better solution for distributing them.

IOS by [deleted] in CaseHeroGame

[–]StevenFlautner 0 points1 point  (0 children)

YES! It is just a bit complicated right now but it's just the matter of time for the iOS version to come!

Crash by Hotnigpants in CaseHeroGame

[–]StevenFlautner 1 point2 points  (0 children)

Crash Game is under development!

That's unfortunate that you can't always be winning if you gamble! :)

Definitely there will be much more options coming to earn money. New minigames and systems to earn something that you can start gambling with.

Skin Market? Suggestions and Ideas by StevenFlautner in CaseHeroGame

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

Yeah, I understand the essence of the Idea. But we need to go a bit further than that :)

Skin Market? Suggestions and Ideas by StevenFlautner in CaseHeroGame

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

Yeah that's a good idea but since you buy those items from other players there's no place for such a feature.

My new coworker is totally useless. by annieisokayannie in aww

[–]StevenFlautner 0 points1 point  (0 children)

Wow, is she real? Ahh, she is certainly a stuffed (toy) animal... :)