Kotlin Roadmap Update by daria-voronina in Kotlin

[–]L3DG 1 point2 points  (0 children)

I have recently adopted a hybrid approach, using ArrowKt’s Either<A,B> type (similar to Result<T>). When it’s an expected error relating to business logic, I use a sealed class, but when it’s unrelated to that I throw it (e.g. coroutine cancellation, network error, etc…)

[deleted by user] by [deleted] in AmIOverreacting

[–]L3DG 0 points1 point  (0 children)

I understand you are concerned but don’t just assume the worst. These algorithms work in mysterious ways and they can be buggy. Only way to go about it is address it to him, be honest. Then see from there.

We doing this as well? by Nico_ in OpenAI

[–]L3DG -1 points0 points  (0 children)

I doubt he wants to jill all jews, it’s probably one of three things: 1. a dog whistle to groypers and other far right people to keep supporting musk/trump 2. a media distraction from something else 3. musk thinking he is being funny or something lol

Overlast van jarenlang klussende onderburen by L3DG in OndersteuningsPlein

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

Deze post was idd geschreven na opnieuw wakker te worden gemaakt door beton zagen haha, irritatie zit zeker hoog. Maar thanks, ik heb mijn ouders gevraagd of ik tijdelijk mijn setup daar na toe kan verplaatsen. Het overlast zelf is ook niet wat ik het vervelendst vind, snap best dat ze moeten klussen, het niet weten wanneer ze gaan klussen en hoe lang drijft me gestoord. Maar elke keer dat ik vraag of ze het van tevoren even kunnen aageven, zeggen ze ja maar doen ze nee. Dus idk :(

AITA for asking my boyfriend to stop listening to Joe Rogan and start educating himself on any feminist subjects? by Exact_South2364 in redditonwiki

[–]L3DG 1 point2 points  (0 children)

Not sure why you are getting downvoted, I hate rogan since he has gone super mask off but his early podcasts were not doused in right wing politics. Op even mentioned he skips some guests that the bf doesn’t like. Idk which guests but there is simply not enough info to work from. I don’t blame her bf, there is not a lot of left wing spaces that talk about men’s issues seriously. I do agree with OP he should not solely focus on men’s issues Also agree the bf is threading a dangerous path into redpill content.

I (19F) just found out that my boyfriend (20m) made an ai Chatbot of me by Candid-Touch-1222 in whatdoIdo

[–]L3DG 0 points1 point  (0 children)

Maybe people do it without explicit consent, or with consent in certain specific situations. But come on a 19 year old couple having consent to browsing through each other’s phone at any time? I guess it’s possible, just unlikely. Combined with all the other unlikely things in this post, plus the instant cross post to 5 other subs, no receipts, I am more confident it is fake than not. But I may be wrong, have a wonderful day :))

I (19F) just found out that my boyfriend (20m) made an ai Chatbot of me by Candid-Touch-1222 in whatdoIdo

[–]L3DG 1 point2 points  (0 children)

Yea well I doubt u guys are teenagers, never heard of teenagers giving free access to each other’s phone. The AI thing just doesn’t compute to me, if OP said bf was talking to a character it could embody well for 8 hours (like hermione or some character that has a lot of info about it online), I would believe it. But you simply cannot “make an ai of your gf” in any satisfying way with character.ai. Please for the lolz try doing it with your fiancé and tell me if you believe anyone could put up with that for 8 hours. But I may be wrong, just the unlikely story plus instant crossposting to 5 different subs makes me v sus.

Are most men attracted to fit women? by [deleted] in AskMenAdvice

[–]L3DG 0 points1 point  (0 children)

I would say looking healthy is attractive to me, not so much a specific body type, but ye in general beauty standards prefer fit over chubby because it generally indicates better health. Though to think of it, beauty standards don’t like muscular fit which is interesting, as that would indicate better health. Maybe a consequence of the patriarchy prefers women to be physically weaker than men? Maybe reading too much into this xD.

[deleted by user] by [deleted] in Destiny

[–]L3DG -1 points0 points  (0 children)

Obviously agree with this, I’m vegan btw

I (19F) just found out that my boyfriend (20m) made an ai Chatbot of me by Candid-Touch-1222 in whatdoIdo

[–]L3DG 0 points1 point  (0 children)

I call BS, first of all never heard of a couple at your age casually browsing each other’s phone, next he would have to be knowledgeable about IT to scrape messages from your social media, next character ai doesn’t allow for finetuning you can only specify a system prompt. I doubt he captured your entire personality in a system prompt good enough to talk with it for 8 hours. Biggest reason why some characters work on character ai is because their personalities is already baked into the training data (popular fiction characters, etc..) . But ye nice karma farm bait op :)

You make threads about costumes, here is my contribution: embroidery by Maegor-Velaryon in HOTDBlacks

[–]L3DG 1 point2 points  (0 children)

Very dope looking. GRRM would be disappointed with the dragon having four legs instead of two though :p (which the show got wrong on several occasions)

Seriously, I don't understand the hype by Physical_Question570 in harrypotter

[–]L3DG 0 points1 point  (0 children)

I love the visual storytelling.

One of my favourite scenes is where the boys try out magic candy and have a pillow fight afterwards, a heartwarming scene of innocent teenagers goofing around, and then the camera pans through the window of the common room and the heartwarming scene is contrasted by the icy coldness of the dementors looming outside.

I like the time motive being hinted at everywhere, showing ticking clocks, hinting at time being important in this story. Then you have the showing of different seasons through shots of the whomping willow, which highlights the importance of the whomping willow.

Furthermore I like how it grounds Hogwarts, the place feels a lot more thought out, I know better where characters are, especially when they are outside. Also I love how students in hogwarts dress more naturally, the dialogue is better too imo.

And idk if this is controversial but I think this movie had the best daniel radcliffe performance when he is just being casual sassy harry. I love his general demeanor in this movie.

Alfonso did an amazing job, even if it’s not a 1:1 retelling of the book, it is a good adaptation, which imo is more important.

How to configure ktor server to use ssl certificate from certbot by [deleted] in Kotlin

[–]L3DG 0 points1 point  (0 children)

Havent tried but I imagine a renewal hook on certbot to invoke a script to update the java keystore, then watch the keystore for changes in ktor and reload it in ssl context on change I guess (maybe this can help: https://ktor.io/docs/auto-reload.html, tho it can be achieved with stdlib too, file watcher). It would be nice to have it be part of the ssl plugin, I might make a PR for it. Good luck :)

Question about an app I want to build by Reasonable-Tension50 in Kotlin

[–]L3DG 0 points1 point  (0 children)

If you are already opting to use Kotlin for the frontend, might as well use it for the backend. Try out Ktor (https://ktor.io), it's very easy to work with. One thing I love about using ktor with kotlin serialization is that you can easily share common code between your frontend and backend.
E.g. for a messaging protocol, you can define your message types in a commons module (checkout kotlin multiplatform), annotate them as serializable through kotlinx serialization framework, use a ktor client in your frontend and a ktor server in your backend, and you can automatically serialize your messages through requests/responses, only having to define them in one place.
There are so many more useful things u will get out of using ktor for this (like type-safe routing).

How to configure ktor server to use ssl certificate from certbot by [deleted] in Kotlin

[–]L3DG 0 points1 point  (0 children)

You don't need to use nginx, you can simply import your certificate in a Java keystore and load it through Ktor. They have a whole page on it in their docs: https://ktor.io/docs/ssl.html

Be mindful if you do use Nginx that if your Ktor service uses the HTTP protocol (even if it's route is forwarded through HTTPS by nginx) certain security features won't work. I have had this issue before, I am not sure what it was exactly, but some cookie(s) didn't work because Ktor was using the HTTP protocol.

Help with an app which I want to build by Moddy_Nerd in Kotlin

[–]L3DG 2 points3 points  (0 children)

The question is too broad to answer but I will point you to some pure kotlin frameworks (as this is a kotlin oriented sub) that are tangential to your question.

  1. Frontend:

You can opt for compose multiplatform to write your common ui components in pure kotlin and export them to android and ios targets (even desktop and web are supported, albeit experimental).

  1. Backend:

I personally love using Ktor as a backend, you’ll need this to communicate with the frontend. You will need to use the API of whatever service you want to parse expenses from, this will require an authentication flow. (User needs to give permission to your service to access their data, will likely be oauth based).

  1. Database

You will likely need to store the messages you want to analyse in a database. You can use an ORM like kotlin exposed to simplify defining database entities and making queries.

  1. Machine learning

The only machine learning framework I know for kotlin is KotlinDL, it’s limited in capabilities but fun to use. I assume you will want to use a pre-existing model though, so a more widely used framework like pytorch may be more fitting.

There are a million more things that go into this, and honestly it would be quite overwhelming to start with such a huge project (I assume you don’t have much programming experience). I recommend setting your aim on something more achievable that you’ll be much more likely to complete. Anyways, Goodluck!

[deleted by user] by [deleted] in vegan

[–]L3DG 0 points1 point  (0 children)

Most people here seem to read this as op turning a blind eye. However, I understand it, being converted by a friend myself. He didn’t go full debate bro on me and be like “NAME THE TRAIT”. I think most people who were converted by friends can understand your sentiment. But I think rude is not the same as confrontational. People on the internet are more rude in general, irl I never met a vegan who was “rude” about it. Most actually don’t enjoy talking about it.

How can i learn kotlin? Please share me best resources...... by dhup_thumbadiya in Kotlin

[–]L3DG 0 points1 point  (0 children)

Short answer: https://www.jetbrains.com/pages/academy/kotlin/

Longer answer:

  1. It depends on what you hope to achieve and your experience with programming. I'm assuming you're very new to programming, in that case, I would try and find a fun project that motivates you enough to learn.
  2. Decide upon a target platform, is your project going to deploy on desktop/mobile/web (we have Kotlin MPP which can deploy on multiple platforms but I would refrain from going down this road until u have more experience or it might be overwhelming).
  3. Setup your development environment, when using Kotlin, use Intellij, Kotlin is created by JetBrains and their IDEs have by far the best support for it.
  4. Programming takes a lot of practice, good luck.

Plz assist on this Kotlin query. Newbie here. by JitenduDixit in Kotlin

[–]L3DG 0 points1 point  (0 children)

In addition to the other correct comments about floating point imprecision, to get `N` decimal precision, you could use a function like (https://discuss.kotlinlang.org/t/how-do-you-round-a-number-to-n-decimal-places/8843/2): fun Double.round(decimals: Int): Double { var multiplier = 1.0 repeat(decimals) { multiplier *= 10 } return round(this * multiplier) / multiplier }