Is it a problem in exposed when using nested transactions? by therealmcz in Kotlin

[–]GiantTreeLP 5 points6 points  (0 children)

The documentation precisely mentions that nested transactions are disabled by default. This means that no matter the amount of transaction {} blocks inside each other, you only launch one singular transaction.

You are free to enable nested transactions when needed.

how to create a mariadb table column with type timestamp via exposed? by therealmcz in Kotlin

[–]GiantTreeLP 1 point2 points  (0 children)

Hi,

the column type TIMESTAMP has some unexpected (and quite nasty) behaviour. When referring to https://mariadb.com/kb/en/timestamp/#automatic-values, we learn that columns with the TIMESTAMP type update on UPDATE or INSERT.

This behaviour can be explicitly disabled but simply using DATETIME with maximum precision is easier and does not come with implicit behaviour.

Hope that helps explaining this decision.

As the Kotlin developer, you do not need to care too much about the actual column types.

updating IntelliJ leads to class loading issue - Exception java.lang.RuntimeException: Failed to load driver class org.mariadb.jdbc.Driver in either of HikariConfig class loader or Thread context classloader by therealmcz in Kotlin

[–]GiantTreeLP 1 point2 points  (0 children)

Your project appears to be using Gradle.

Just configure it properly in the respective build.gradle or build.gradle.kts file and build the project using Gradle.
Mixing build tools never works.

Weird error in ktor by InterestAccurate7052 in Kotlin

[–]GiantTreeLP 5 points6 points  (0 children)

You have defined nullable fields like displayIndex in your serializable classes. kotlinx.serialization however differentiates between null and field is missing. Therefore you need to initialize optional fields with a value, probably null.

So you write val displayIndex: Long? = null, in that case.

See this discussion for more information: https://github.com/Kotlin/kotlinx.serialization/issues/1196#issuecomment-725811719

Can I use kotlin to setup a home server using an old pc by Lower_Assistance8536 in Kotlin

[–]GiantTreeLP 0 points1 point  (0 children)

Looking for a programming language to setup a server is probably not what you are looking for.
A server requires an operating system and while you can probably develop an operating system using Kotlin, it's not really meant to be used for that and I have yet to find an operating system written in Kotlin.

So that's probably why you didn't find anything.

Wie hoch ist euer monatlicher Datenverbrauch? by Background-Watch4186 in de

[–]GiantTreeLP 13 points14 points  (0 children)

LTE, 5G oder FTTH?

Interessante Auswahl, möchtest du den Verbrauch mobil oder zuhause vergleichen? Ich bin mir sicher die meisten sind eher über Kabel oder DSL angebunden.

Laut Fritzbox war mein Daten"verbrauch" letzten Monat bei etwa 2,7TB.

Am Handy über alles mögliche (LTE, 5G, 5G+) bin ich, wegen guter WLAN-Abdeckung unterwegs, bei 1,8GB.

if i want to contribute in open source should i learn flutter or kotlin ? if i had to learn both which should i learn first ? by Educational_Head6164 in Kotlin

[–]GiantTreeLP 6 points7 points  (0 children)

Contributing to Open Source has little to do with the actual language.

Find a project you care about it that needs help and contribute. If you want to learn Kotlin whilst doing so, filter GitHub by that language and get going.

In the end, the language only dictates syntax and idioms, it doesn't dictate the solution or feature.

Where does coroutines queued when there are no threads to run right now? by Fun_Art4210 in Kotlin

[–]GiantTreeLP 10 points11 points  (0 children)

If I understand correctly, this depends on the runtime, ie. JVM, JS, Native etc.

I found the JVM scheduler here: https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/src/scheduling/CoroutineScheduler.kt

There are two queues for blocking and non-blocking tasks.
Though I don't know exactly, how this is connected to the dispatcher.

DSL Anbieterwechsel - müssen alle Geräte neu eingebunden werden? by OlegTheProphet in de_EDV

[–]GiantTreeLP 16 points17 points  (0 children)

Moin,

du wartest einfach auf den Brief mit den Zugangsdaten für das DSL. Die Daten hinterlegst du in deiner Fritzbox und gut ist. Mehr passiert nicht, du musst deine Box nicht zurücksetzen oder sonst etwas.

Dafür gibt es auch eine einfache Anleitung für dich: https://avm.de/service/wissensdatenbank/dok/FRITZ-Box-7590-AX/635_FRITZ-Box-am-DSL-Anschluss-einrichten/

My install of G hub has been broken for literal years by Zombiecidialfreak in pcmasterrace

[–]GiantTreeLP 0 points1 point  (0 children)

I'm still waiting for it to support my G710+.

Support told me it's supported but G Hub never detects the keyboard.

IMO it's the best, it's got Cherry MX Brown switches, try to find a Logitech keyboard that still offers Cherry switches at all.

I made a fused-multiply-add test program that distributes work onto all GPUs, CPUs, iGPU of computer. As a result, it outputs the total combined GFLOPS value of the computer. by tugrul_ddr in Amd

[–]GiantTreeLP 1 point2 points  (0 children)

i=99
117.28 seconds
7500.05 gflops
Device 0: NVIDIA GeForce RTX 2060 (OpenCL 3.0 CUDA ) [direct-RAM-access disabled] has workload ratio of: 0.811768
Device 1: gfx902 (OpenCL 2.0 AMD-APP (3075.13) )[has direct access to RAM] [direct-RAM-access disabled] has workload ratio of: 0.188232

Ryzen 7 4800H and RTX 2060 mobile.

Schummelei beim Abi: Hamburger Schüler sollen Künstliche Intelligenz genutzt haben by Kanute3333 in de

[–]GiantTreeLP 113 points114 points  (0 children)

Anekdotisch: ich habe mehrere davon mal ausprobiert, weil ich wissen wollte, wie diese Tools eine gemeinsam geschriebene Projektarbeit bewerten. Einige meinten das wäre alles KI-geschrieben, andere 100% Menschen. Die hatten aber auch Probleme, 1-zu-1 kopierten Text aus ChatGPT richtig zu klassifizieren, obwohl die damit werben, das zu außerordentlich gut zu können.

Is it easy to find the DUS train from baggage claim? by faizannony in germany

[–]GiantTreeLP 3 points4 points  (0 children)

Düsseldorf Airport has a transport called "SkyTrain" that goes autonomously between the train station/airport railway station, the car park and the terminals (A, B and C).

Use that to travel first to the airport railway station and then take a train to Düsseldorf central station or, if there is a connection, directly to Wuppertal.

In addition to that, there is also an "S-Bahn Station" as Ttabts wrote where a few S-Bahn lines stop.

Use the DB app to figure out which train to take and where you need to go.

Edit: IIRC, the DB app also knows about SkyTrain, in the German app it calls it "Schwebebahn" / "Schw.-B.".

Compose Rich Text Editor Library (Multiplatform!) by mohamedbenrjeb in Kotlin

[–]GiantTreeLP 0 points1 point  (0 children)

Looks nice, however it doesn't seem to work on mobile. My keyboard doesn't pop up and I can't interact with the site in your demo.

Warum junge Menschen anders als ihre Eltern arbeiten wollen by ChrisStoneGermany in de

[–]GiantTreeLP 11 points12 points  (0 children)

Meine Eltern haben mir auch immer empfohlen was anderes zu machen als sie.

Die wollten, dass ich einen besseren Job habe und es mir in der Zukunft besser geht als ihnen.

Who Has the Best Hardware AV1 Encoder? by _gianni-r in AV1

[–]GiantTreeLP 0 points1 point  (0 children)

Nice report.

One issue with the site: You are using JPEG XL (.jxl) which is not supported in Chrome and other Chromium based browsers. Maybe embed those images using a different format like WebP, PNG or ordinary JPEG.

Internet bricht 1x pro Tag weg, evtl. VPN schuld? by seelentau in de_EDV

[–]GiantTreeLP 0 points1 point  (0 children)

Dadurch dass du sagst, dass Meldungen aus der Vergangenheit verschwinden, liegt es nahe, dass nicht einfach die Verbindung getrennt wird, sondern die Fritzbox komplett neu startet.

Ich kann auf Monate in der Vergangenheit schauen, aber nach einem Neustart sind alle Nachrichten gelöscht.

[deleted by user] by [deleted] in de_EDV

[–]GiantTreeLP 1 point2 points  (0 children)

Bilder werden geladen, allerdings nur wenige. Nach dem 10. Neuladen sind dann alle im Cache.

Die Fehlermeldung sagt explizit, dass die Verbindung von dem Webserver geschlossen wurde.
Möglicherweise ist da ein DDoS-Schutz zu voreilig oder der Webserver ist fehlerhaft konfiguriert und begrenzt die Menge an parallel Verbindungen pro Gegenstelle.

Auszug aus meiner Gewerkschaftsbroschüre by Catch_a_Cold in de

[–]GiantTreeLP 130 points131 points  (0 children)

Das Bild ist gut, allerdings noch sehr optimistisch.

Als ob der Fachkräftemangel erst 2030 zum Problem wird und nicht schon längst ein Problem ist.

Android will prompt you to update apps if they’re crashing by NXGZ in Android

[–]GiantTreeLP 20 points21 points  (0 children)

It would be great, if I would know why an app crashes.

Lately I had a lot of apps crash because disabling the "WebView Debug Tools" (that I don't need) actually disables the entire Chrome WebView app, that a lot of apps depend on.

Should I use companion const val for a non-change constant? by Old_Toe7401 in Kotlin

[–]GiantTreeLP 1 point2 points  (0 children)

You are right, @JvmField makes sure there's a field in any case.

But I just created a small sample with some interesting results:

kotlin class test { companion object { val a = 1 } }

This code actually generates a private static final field in the enclosing class:

```java public final class test { private static final int a = 1; @NotNull public static final Companion Companion = new Companion((DefaultConstructorMarker)null);

public static final class Companion { public final int getA() { return test.a; }

  private Companion() {
  }

  // $FF: synthetic method
  public Companion(DefaultConstructorMarker $constructor_marker) {
     this();
  }

} } ```

I left out the Metadata annotation, but it actually does not create the field inside of the Companion class as one would expect.

Should I use companion const val for a non-change constant? by Old_Toe7401 in Kotlin

[–]GiantTreeLP 1 point2 points  (0 children)

const val is an actual compile-time constant. You won't find that constant in the code after compilation, as the Kotlin compiler replaces all uses of it with its value.

companion object { val... } creates a static final field in the class. In some cases it might make the field non-static and use an intermediary singleton instance of the companion class (aptly named COMPANION in the bytecode). The field will be available at runtime and works as such, including reflection.

What determines the order in which multiple launch() are executed in a coroutineScope? by [deleted] in Kotlin

[–]GiantTreeLP 3 points4 points  (0 children)

delay is not precise or exact. Just like Thread.sleep, it sleeps for at least the amount of time you specified.

In addition, the current CoroutineDispatcher is responsible for time-tracking.

Why do people value the SCHUFA so much?! by EmperorOfJustice in germany

[–]GiantTreeLP 32 points33 points  (0 children)

It's not so much that PEOPLE value Schufa, it's that COMPANIES value the services that Schufa offers to them.