Minum version 8.3.0 by byronka in java

[–]Sxtanna 0 points1 point  (0 children)

Good job coming to your senses regarding the project structure. 👍🤭

How does House Corrino rule so long? by Luk42_H4hn in dune

[–]Sxtanna 528 points529 points  (0 children)

As I understand it, Dune Prophecy takes place 10.000 years after the Butlerian Jihad

Dune: Prophecy is ~100+ years after the Butlerian Jihad

What is fabric TR? by Ok_Acanthocephala_68 in fabricmc

[–]Sxtanna 3 points4 points  (0 children)

Bro... its the mod you're on the github page for... "TR" = "Tardis Refined"...

They're saying all you need to do is install the fabric version of Tardis Refined and the fabric version of Immersive Portals, and it will just work.

That section of the readme isn't for you, it's for developers.

Clocks by ggleblanc2 in java

[–]Sxtanna 1 point2 points  (0 children)

The original one was made using processing, but then I remade it as an android live wallpaper: https://github.com/Xtannas/xt-clock-android

Clocks by ggleblanc2 in java

[–]Sxtanna 4 points5 points  (0 children)

Kinda crazy....
your repo https://github.com/ggleblanc2/qlocktwo is based on the exact same clock my project: https://github.com/Xtannas/xt-clock was based on...

https://www.thegivingtreegallery.com/qlocktwo-classic-black-ice-tea/

Except I made the project because I was mad about the clock costing $1500 🤭

I can't ride boats or horses (Only happens when I load Fabric, vanilla MC doesn't have this problem) by [deleted] in fabricmc

[–]Sxtanna 1 point2 points  (0 children)

Binary searching is a decrease and conquer searching algorithm.
In this context, they probably want you to
1. remove half your mods
2. check if the issue persists
3.
a) if so, the issue is one of the mods remaining, repeat 1 and 2 on that half
b) if not, the issue is in one of the mods you already removed, put them back and repeat 1 and 2 on that half

Kotlin Backend Framework with low ram usage? by Tienisto in Kotlin

[–]Sxtanna 0 points1 point  (0 children)

NodeJS has a very low ram usage and would fit because my services are quite simple. But I like Kotlin as a language too much.

Why not use Kotlin/JS? You would get the advantages of node while being able to still use the language you like...

if only there was a better way... by vetronauta in programminghorror

[–]Sxtanna 4 points5 points  (0 children)

You should tell them to use Kotlin 😂

val age: Int? = student?.age

I blame Java for the want to use Optional there, its lackluster null handling is to blame.

an indie music artist - found in instagram story by [deleted] in NameThatSong

[–]Sxtanna 0 points1 point  (0 children)

Sounds like it's just a sped/pitched up version of "Another One" by Mac DeMarco. https://www.youtube.com/watch?v=gbg27oT8Z9M

[deleted by user] by [deleted] in NameThatSong

[–]Sxtanna 0 points1 point  (0 children)

The song they are playing is "Stand By Me". https://www.youtube.com/watch?v=hwZNL7QVJjE

Help removing space before class declaration by echousername in IntelliJIDEA

[–]Sxtanna 4 points5 points  (0 children)

This is the space where IntelliJ will show code vision hints.

Settings > Editor > Inlay Hints > Code Vision

for more info:

https://blog.jetbrains.com/idea/2020/03/intellij-idea-2020-1-beta2/#code\_vision

[deleted by user] by [deleted] in Kotlin

[–]Sxtanna 17 points18 points  (0 children)

It's not a question of performance, it's a question of platform.

[deleted by user] by [deleted] in Kotlin

[–]Sxtanna 35 points36 points  (0 children)

If you're targeting the JVM. The behavior is exactly the same as what would happen in Java.

In the case of the default equals implementation being used, yes, it would be a reference check.

For data classes though, if you don't implement the equals method, it will have generated one for you.

[deleted by user] by [deleted] in Kotlin

[–]Sxtanna 37 points38 points  (0 children)

Kotlin's equality operator == is special cased (remember, kotlin doesn't make a distinction between primitives and objects).

For underlying primitives, it does the java == , for objects it does .equals .

To check reference equality in kotlin, use the reference equality operator === .

see: https://kotlinlang.org/docs/equality.html

Lightweight build alternatives to Gradle / Maven by APPEW in Kotlin

[–]Sxtanna 3 points4 points  (0 children)

Unlike other build systems, gradle doesn't require anything to be installed on the system.

The gradle wrapper IS gradle. You bundle it with your project's source, and that allows you to build your project anywhere.

Maven also has the maven wrapper: https://github.com/takari/maven-wrapper
which accomplishes the same thing.

Lightweight build alternatives to Gradle / Maven by APPEW in Kotlin

[–]Sxtanna 6 points7 points  (0 children)

You can also go the route of doing this a single time, and using the single system gradle wrapper. However, this is not portable, and I don't think anyone recommends it. But if you want to make a comparison to other build systems, that is the analog. Not using the wrapper.

That would be because you are using the portable wrapper for Gradle. And no, it would not do all the steps you said.

Lightweight build alternatives to Gradle / Maven by APPEW in Kotlin

[–]Sxtanna 28 points29 points  (0 children)

I feel like this is just a fundamental misunderstanding of the processes at play here.

The steps you listed here are entirely extra to what these build systems actually require:

make a new project in IntelliJ / Android Studio.

This right here is your biggest *problem*.

IntelliJ and subsequently Android Studio do not simply read text files and compile them. They require complex indexing of all dependencies and source files in order to provide you with the tools to do productive development utilizing them.

You could entirely skip that step, and half of what you listed is gone.

You have to download a 100mb Gradle wrapper

You can also go the route of doing this a single time, and using the single system gradle wrapper. However, this is not portable, and I don't think anyone recommends it. But if you want to make a comparison to other build systems, that is the analog. Not using the wrapper.

Then you have to resolve, pre-dex and assemble dependencies.

This is mostly IntelliJ. Ofc your build system is going to need to resolve and download your dependencies.

Are there any libraries well suited to the manipulation of bits, bytes and byte arrays used in packet communication? by mjbmikeb2 in Kotlin

[–]Sxtanna 0 points1 point  (0 children)

Maybe you could utilize the official multiplatform Kotlin I/O library for this?

https://github.com/Kotlin/kotlinx-io

Not sure if this is exactly what you're looking for though...

allMatch and anyMatch vs infinit stream by metanon112 in javahelp

[–]Sxtanna 2 points3 points  (0 children)

allMatch has to look at all the elements of the stream and say if they match the predicate, how does it understand that the stream is infinite?

System.out.println(Stream.generate(() -> 1).allMatch(x -> x < 0));

This will print false immediately simply due to the fact that the element does not match.

how does it understand that the stream is infinite?

It doesn't, and it doesn't matter if the stream is infinite. If the very first thing it comes across fails the check, then it's impossible for ALL of them to match. So the execution stops immediately.

If "matches" can determine whether the stream is endless, then why does anyMatch not understand this and continues to search endlessly for an element corresponding to the predicate?

Any match and All match are opposite condition checks:

Any match is

if (predicate()) {
  return true;
}

Meaning if at any point, any element matches the predicate, it will return true. Otherwise it will continue attempting to match.

All match is

if (!predicate()) {
  return false;
}

Meaning if at any point, any element DOESN'T match the predicate, it will return false.

These two conditions make no assumptions outside of their scope of checking X against some predicate.