#dev-general
1 messages ยท Page 508 of 1
ex machina
Maybe he does but I think I am qualified to answer this moral and ethical question
It is me, Barry
As president I have tested many of the groundbreaking robots being worked on at NASA
My friend, that might be the case. Nevertheless, asking for a apolocalypse isn't a good idea.
Where is Richard Nixon
maybe lincoln is waffle
I think he might have something to say about this
Howdy me, Barry!
what is this
lmao
Annual Presidential Meeting
helpchat dev general at its finest
We were just discussing if we should have a robot for president
i vote we fire da admins and make me admin
I for one, am against a robotic president
Agreed
A human being can always be trusted to make the right decisions without being biased or having ulterior motives
Was there anything else on the agenda to discuss? Perhaps we should touch on Trump's absence
what is 2 + 2
Trump is a coward
Too lazy to turn up to the meeting
I think he would want a robot president!
at least 2
I think we need to criminalize golf
Maybe I'm not a robot ๐
I think you are
If you were a person you would be hiding it
only a robot would say they are not a robot
I never said I wasn't a robot, I merely opened up the possibility
That is putting doubt in people's minds though
The people deserve a (robot) president who is honest and consistent
and does not open up false possibilities
So a robot would be suitable for presidency if they had those values?
Such as?
For example the robot would need to be able to decide which policies are best to enact
But also things like a strong moral compass
Just as lost
Surely there's some sort of algorithm to determine things like that?
I think we would need some of this fancy "Artificial Intelligence" people keep talking about
No single algorithm would be enough
But I think there is a more important issue
the people must be able to relate to this president
Trump won because he gave the image of not being a tone-deaf politician, rather as an embodiment of the American Dream
Can the people emphasise with a robot?
Yes, I think the majority of the American people would agree
Oh Lord what
Hello citizen
Yes, very much so.
I finally found a good video explaining what is a monoid
That is incredible
yeah, that's really rare
Oh dear.
What is this evil you speak of?
The fuck is this chat
Do not fucking swear boy
stfu bish
I agree with robot
Good day, fellow citizen!
a monoid is the junction a semigroup + an identity element
a semigroup is a magma that is associative (the order in which you apply the operation bind to it doesn't matter)
a magma is the junction of a group containing all elements of some type + some operation that always result in another element of that same group
thanks god
That sounds easy
I have never heard the term magma
https://www.youtube.com/watch?v=bsp5pJlw6R0 this guy is god
No I am god
so basically (Int +) is a monoid, because the sum of any two ints is another int (magma), the order you sum doesn't matter (semigroup), and it has an identity element (which is 0)
seems like i've fallen a long way
I'll keep this text explaining what is a monoid here forever
let me save this shit so I remember this later
At the base level algebra is really simple
basically just sets + operators that fulfill certain conditions
when you dive deeper into specific structures like ring or group theory that's where shit hits the fan
okay
also, an identity element is a element that belongs to the magma, and when applying the operation bound to the magma to it and another random value from the magma, results in the another element
๐ฐ
Lucy's Pretty Pastebin
I'm literally writing HOCON raw because creating new config objects and writing them sucks ass in the official library lol
anyone know how you're meant to actually test run these tasks btw?
kotlin ๐
I can't tell if that's meant to be a compliment or an insult lol
insult
based
that is an smh BM
Pragma > ksp?!!
obviously
๐
๐
lol
just the role is gone
oh he definitely left
anyway, how are you meant to test Gradle plugins btw?
damn
or changed back to whatever his name was before
just publish to Maven local, try it out and hope for the best?
haha haha, testing gradle
๐ฅฒ
thats what i did with pdm
matt had unit tests written
๐ฅฒ
haha
If you want to test locally, you can just use Maven local
oh you already said that
nvm
do you need to add Maven local to buildscript?
Yes
Gradle needs to redo this whole API though, it's so bad
^^^
Wouldnt have had such issues
Let's write our own build tools, in Haskell!!
Yes!!!
Yes!!!!!!!!!
anything in haskell would be interesting
๐
wait so how are you meant to apply this?
MineHraft abandoned already ๐ฅฒ
relieved
No!!
smiling_face_with_tear
๐ซ
it doesn't seem to work with id("org.kryptonmc.gradle") version "0.0.1"
use apply bardy
haha
wait so how come minehraft is abandoned? it doesnt have a P in the name so how come?
plugin block only works for plugin portal
You wish it was that easy
do I need to use dependencies in the buildscript then?
matt did you see their buildInclude thing
Don't think so, what is it?
It's not abandoned, just been working on devdenbot
๐ค
buildscript {
repositories {
mavenLocal()
dependencies {
classpath("io.github.slimjar:io.github.slimjar.gradle.plugin:1.1.1")
}
}
}
apply {
plugin("io.github.slimjar")
}
They had some broken system ready to apply your own plugin from one of the modules to another module
i have a strange feeling about this one chief
Although I'm not sure I actually know enough haskell to be able to make this work
But its just a trap of cyclic dependencies
As soon at your have it in pluginmanagement's build include in your settings.gradle, your plugin looses all dependencies on other modules
Such an amazing api
Oh god, beautiful
truely ๐
Cause 1: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.jetbrains.kotlin:kotlin-stdlib-common:1.4.31. tf
Cause 2: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10. why
isn't Ant really fucking slow though?
any idea how you create one of these top-level functions for configuring things?
wdym?
e.g. ```kotlin
krypton {
// stuff
}
btw dont do this
I think you can do that in Groovy, but how do you do it with Kotlin?
The Gradle Plugin API is dsl agnostic
ah
This is called an Extension
because tying that doesn't seem to resolve
yeah I have one of those
val config = extensions.create<KryptonExtension>("krypton")
Where is that
What?
in the plugin
It's the extensions property from project, right?
yes
old deprecated dsl
It's the only way to apply local plugin for testing
no it is not
then show me the ways
pluginManagement {
repositories {
mavenLocal()
}
}```in settings.gradle(.kts)
with any other repos you might need
then you can declare it like any other plugin
yeah no, didn't work for me
unless you don't mean using ```kotlin
plugins {
id("org.kryptonmc.gradle") version "0.0.1"
}
also, ```kotlin
krypton {
}
(Kotlin DSL bare in mind, seems to behave weird sometimes)
is krypton a task?
no, it's an extension
Can you send the definition?
the extension class or the creation of the extension? or both?
both ig
https://paste.lucyy.me/ukobeguzif#kotlin plugin main
Lucy's Pretty Pastebin
https://paste.lucyy.me/josucegoga#kotlin extension
Lucy's Pretty Pastebin
nothing wrong with that is there?
I think that might be the difference between groovy extensions and kotlin extensions showing up
@obtuse gale please be more respectful when hiring people man. you really didn't have to be a jerk to asqry or lucyy...
probably
The last gradle plugin I wrote looked pretty similar to this and worked well
Oh yeah btw Yugi
for the agents
when it appends to classloader
it isnt actually like using the urlclassloader hack right
you just provide the JarFile
and it will load it
Btw bardy you can also just make the extension class and properties abstract
Nope, but it can only append to the system classloader
Then you don't need the configure stuff either
mhm
wdym make the properties abstract?
Maybe that might actually be a reason
like make them abstract values?
Yes
Oh nice
you got a clue why the top-level script function doesn't seem to exist?
Generates the agent with required meta into a temp file to get the instrumentation instance
yea a lot of people said that xD
wat
I removed the isolated thing from the readme, but its still there if needed
he started messaging people to join his developer team and when they said no he got super angry
lol
ikr
It currently chooses what method to use to append depending on the version you're using
ic
brb
That follows the gradle docs pretty closely I think
woah
the readme's usage example is so short ๐
yugi
(hopefully) quick question - do i just do slim dependencies in the base build.gradle?
Wtf
I wanted to reply to my message and it edited it
Thank you discord client for android
nope, that didn't work btw
abstract class KryptonExtension @Inject constructor(private val factory: ObjectFactory) {
abstract val dependencies: Property<DependencyConfig>
abstract val plugin: Property<PluginConfig>
fun dependencies(action: Action<in DependencyConfig>) = factory.newInstance(DependencyConfig::class.java).apply {
action.execute(this)
dependencies.set(this)
}
fun plugin(name: String, action: Action<in PluginConfig>) = factory.newInstance(PluginConfig::class.java, name).apply {
action.execute(this)
plugin.set(this)
}
}
```this is the new one
Btw johnny, now that paper is moving forward from 8, you can now dynamically attach compatres agent right?
and the top-level function krypton still doesn't resolve
Other way around
Mhm
Oh?
Used to be possible in many implementations in 8, isn't anymore
It works on 16 johnny
But i am looking into hacking it together anyway
then I can do compileOnly in the modules?
What does exactly?
That's imprecise
How do you mean?
Yes
THX
any ideas btw?
Did u check this?
There are different ways of doing it (or not)
It is possible after 8 but very complicated. That's where I'm at
that links to the embedded Kotlin section, what exactly do you want me to read there?
Ah not sure, but its very easy 9+
or do you mean the interop section?
Yes bard
Yeah well how then?
Bytebuddy
Ping?
Because that's the opposite of my research and experience
Bytebuddy is a class generation tool
It has a class for agents
Hi, I didn't hire asqry. Asqry had falsely punished me due to some stupid thing but it's the past and it was like 3 months ago, and lucyy was the one who specifically had brought it up.
I think I talked about it with someone else already and we came to the conclusion that it wouldn't work for me because it's not as powerful as agents alone
I also specified that I'd be willing to pay her in nitro but of course everyone wants real money.
But maybe it has utilities integrated now that do the attachment process for you, idk
Im already using it to start an agent
lol
That looks like you create another vm and attach it there, is that right
Because that's what I meant by "complicated"
Yea but bytebuddy simplifies it quite a lot
Fair enough
I don't necessarily want to carry ByteBuddy though. When I have time I will copy my mate's code who already implemented this do it manually
lol
But it is a lot more complicated than in Java 8 after all
Has anyone here used JetBrains academy?
Briefly
I'm trying to do one of the questions, it says
Write a program that reads a string and replaces all occurrences of the letter 'a' with the letter 'b'.
But when I do this:
public static void main(String[] args) {
final Scanner scanner = new Scanner(System.in);
final String string = scanner.next();
System.out.println(string.replace('a', 'b'));
}
```Scanner is highlighted in red
How did java 8 have it?
import
You probably need to import Scanner
Oh
it should be under java.util
You could literally just get the runtime object and add your jar directly iirc
Ah
That's so annoying lol, I got another question wrong because of that
I dont think the buddybyte way is too far from that tho
its pretty much just this function (https://javadoc.io/doc/net.bytebuddy/byte-buddy-agent/1.3.18/net/bytebuddy/agent/ByteBuddyAgent.html#attach-java.io.File-java.lang.String-)
It is far from that
oh
ByteBuddy good
also, someone please tell me why ```kotlin
class KryptonPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = with(project) {
// Add the repositories we need for our dependencies
repositories.mavenCentral()
repositories.maven("https://libraries.minecraft.net/")
repositories.maven("https://repo.bristermitten.me/repository/maven-public/")
val config = extensions.create<KryptonExtension>("krypton", this)
val dependencyConfig = config.dependencies.orNull ?: return@with
val apiVersion = dependencyConfig.api.orNull ?: return@with
val serverVersion = dependencyConfig.server.orNull
val kotlinVersion = dependencyConfig.kotlin.orNull ?: return@with
val createConfig = tasks.create<CreateConfigFile>("createConfigFile")
afterEvaluate {
dependencies.add("compileOnly", "org.kryptonmc:krypton-api:$apiVersion")
if (serverVersion != null) dependencies.add("compileOnly", "org.kryptonmc:krypton:$serverVersion")
dependencies.add("compileOnly", "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "16"
}
}
tasks.findByName("processResources")?.finalizedBy(createConfig)
}
}
that createConfig task there doesn't even show in the tasks
and it doesn't even resolve either
That's a sign that the plugin isn't being loaded properly in general
probably isn't tbh
@old wyvern review my PR xD
๐คฃ
๐
You should check Emily's PR ๐
man, imagine not using org.cadixdev.licenser
oh, what are its benefits over the current one?
not actually sure, but that one is based off of Minecrell's original one
used by Sponge and Adventure iirc, and quite a few others
you can configure the license file location, set different license files per sub project, etc.
yeah I think the one you use is based off of Minecrell's one too
@obtuse gale
Yeah idk what the differences are tbh
I just found that one, I like it and it works I guess
Tbh they do the same, as long as it works no reason to use one over the other
Yup
I used both and tbh the one Emily uses is easier to use straight away
anyone know why apparently gradle/intellij can't find the dependency? I have mavenCentral() in repositories btw
oh it's OSSRH
That artifact name genuinely makes me feel ill
Nexus is pretty ugly
also, it can find 2.8.1 
just not 2.8.2
same
the package name is worse
Did you just push to sonatype?
Caching maybe
When did you release?
me.dkim19375.dkim19375jdautils iirc
This ^^^
It takes time to propagate across the central network
Around 15 minutes
You can directly add the sonatype mirror to your repositories if you want instant changes
usually i just run the gradle task to publish and stuff, then i go into my test bot and change the version
but it's been like 10 minutes
still doesn't work
^
(before it happens immediately)
It's worth mentioning that repo.bristermitten.me wouldn't have this issue ๐
Its supposed to take time, so idk
oh its been 15 minutes
Uploaded Date: Sat May 29 2021 16:23:53 GMT-0400 (Eastern Daylight Time)
.
maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }? or should i replace snapshots with releases?
Gross
ok
i need ideas
i wanna do something in haskell
not too big
but like
something cool
HackageDex?
was thinking about making a maven repository software
it works ๐
๐ฎ
way too much effort
This sounds nice
yeah it would be quite clean i think
will probably get bored after a few hours of coding though
hmmm
Btw, is it me or do different repository managers use completely different snapshot paths?
implement my lib in developer den and remove ๐คข jda utilities ๐คข 
thats not haskell
but i just didn't feel like refactoring everything
and then same with DkimBukkitCore
better name?
me.dkim19375.jdautils is fine
yea but its not utils anymore
before it used to just be a utilities package
haskell IDE
and just io.github.dkim19375:jdautils:version
yeah that seems way too much effort
yeah but you have a package to clarify it's yours
mhm
me.dkim19375:jda-core:VERSION would be perfect
Would be very useful as well considering the current ide suppourt
hmmmmmmmmmmmmmmmmmmmmmmmmmm
indeed

Dkim1338188478lib287484core2882848484
ez
๐
me.dkim1945243874386t78234768346773467348672374673486293846782348968943267384683246734:dkim193758127894768347168438673846787867382768347867834267438967893247683276core:VERSION
get rid of numbers
numbers in username bad
also agree
Very bad
Hit his forehead on the numpad
u need help
this tbh
man, I'm just looking at Moshi rn, and it looks like Moshi actually on top
Gson on bottom
Yeah Moshi is pretty nice
supports both code gen and reflection, has good Kotlin support, no BS
He needs jesus
me.dkim1945243874386t78234768346773467348672374673486293846782348968943267384683246734.dkim193758127894768347168438673846787867382768347867834267438967893247683276core
I might actually switch again in Krypton to using Moshi
and I can probably write a component serializer for Adventure for it really easily as well
like, Kotlin serialization supports code generation only, Gson supports reflection only, but Moshi supports both
aeson ๐
Dont make me come there and slit your throught young man
only issue with switching is compatibility, since most cross-platform plugins will likely use Gson, and a few things we use also use Gson
๐ณ
but you don't know where I live ๐
What do you know
187 Gotham Road dkim
Maybe ๐
good question

actually no, 19375 Gotham Street
Just ๐
๐
What if we can see your ip in the join logs?
mc join logs?
Discord 
What if it does 

Is possible to attach an id or something to a text Compound?
class MyPlugin @Inject constructor(server: Server, listener: MyListener) : Plugin() {
init {
server.registerChannel(Key.key("myplugin", "main"))
server.eventBus.register(listener)
}
}
class MyListener {
@Listener
fun onPluginMessage(event: PluginMessageEvent) {
}
}
```just out of curiosity, anyone know if this would be the correct way to do something like this with Guice?
like would that plugin constructor automatically look for an instance of MyListener and instantiate it if it's not found?
what's the best way to do something like what I want here?
where I can properly dependency inject without having to do instantiation myself
you dont have to do instantiation if there's a binding
oh wait
no
i think it'll work here
@quiet depot my lord, I call upon thee
what's the opposite of runBlocking? (so like runNotBlocking)
running in some asynchronous dispatcher
how do i do that?
you'd need a scope, something like GlobalScope
although usually you'd make your own scopes
scope.launch {
//do stuff
}```
guice good
anyone wanna help me proof read a Krypton announcement btw?
actually not sure that's really necessary tbh
so like ```kt
val scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
scope.launch {
// blah
}
also is it bad if i make a bunch of scopes?
yes
well
idk
make one, keep it constant is what i usually do
although i might be talking complete crap here
coroutines confusing
like should i have one scope for all commands?
or create a new scope on each command ran?
oh
o
The great lord Sx asked us to store the scope and not recreate it everytime
then whats GlobalScope uesd for?
For tasks that would be expected to be running throughout the process
wdym?
yeah long running stuff that doesn't need to be structured
oh
the point of a scope is that when that scope is "killed", all its coroutines stop too
globalscope lasts the entire jvm lifetime
which isn't always what you want
The common rule is, try to keep away from using the globalscope
would it be bad if i made a top level property for scope? or do I have to DI it everywhere ๐ฉ
that's fine, i do that
alr
Presumably that is similar to not using global namespaces for variables eh?
nothing wrong with top level properties
Dkim, you might like this https://www.youtube.com/watch?v=F63mhZk-1-Y
High quality programming courses: https://codingwithmitch.com/courses
In this video I take you through your first kotlin coroutines example.
If you are complete beginner when it comes to coroutines and want to see what they're all about, this is the video for you.
The main goal of coroutines is to "simplify asynchronous work by getting rid of...
you can create scopes that are objects, which are much more reusable
This guy explains coroutines really well
val scope = CoroutineScope(Dispatchers.Default)
```or ```kt
val SCOPE = CoroutineScope(Dispatchers.Default)
```?
e.g. ```kotlin
object MyIOScope : CoroutineScope {
override val coroutineContext = Dispatchers.IO
}
uh
doesn't really matter
ig ill capitalize it then
I mean, I think that constructor function (@ocean quartz's favourite btw) is probably creating an anonymous object under the hood anyway
ty
Constructor functions are stupid
lmao
They are dumb and even IJ will tell you they are dumb
my ass
arent all constructors constructor functions? ๐ค
fun <init>()
they do allow you to construct objects that may be platform specific from within the common stuff though
but I guess you can have an expect class too
Kotlin multiplatform is weird lol
couldnt be elara
Kotlin half the time doesn't follow their own conventions
kotlin internal code is actually horribly ugly
"do as i say, not as i do"
i dont know if that's how they want people to write kotlin, or they're just dumb
but it's horiffic
by "internal" i mean like the compiler and stuff, the stdlib isnt so bad
welp i got rid of all the ExecutorService stuff.. I'm scared I messed up the coroutines
dont worry, you probably did
horribly ugly
reminds me of this lol https://www.youtube.com/watch?v=1Pr8xnNi7OM
i have quite the number of coroutines
Lmao
what on earth is that
lmao
ohh the day today
that's such a good show
the onion before it was cool
lol
best of clips from the Day Today (Copyright the B.B.C.)
sup cool people
yo
https://youtu.be/t2x4hMr2WLw?t=467 7:47 odin talking about the uk's covid statistics lmao
gson >
looking at Moshi, I think Moshi on top
it supports both runtime reflection and compile-time code generation
and benchmarks have shown it's the fastest, from what I've seen before
I am sad
just found out I Don't have a star on github anymore.
Someone stared a while ago but they unstared and I've got no idea when 
im right here! though not on github
๐
Now you do!
@old wyvern I want to kiss you but I also don't want to kiss you. if that makes sense xD
yes?
lol
Sad bardy noises
what status?
oh wait
wait what are you starring?
my plugin. bcz it is very good and I'm going to be popular on github now
imagine if I just released a crippled plugin onto the spigot marketplace
and it went through
imagine if I just released a malware plugin onto the spigot marketplace
and it went through
?
imagine if the terrible plugin would be put on the spigot store with the price of 20$
or whatever the highest price is
well EWG is also stolen code. its a whole other story
what browser do u guys recommend for linux (kde neon)
Firefox?
well other than that
Id say just use that
that's what I use yeah
ms edge ๐
and probably going to use
If you want something else for sure, you have chromium
chromium slaps
firefox too slow
obviously they disagree
that's 1 mail every day for the past week and a half
well they're dumb then
yo @onyx loom how's CombatStats going btw?
havent touched it since u contributed
oh alr
someone please tell me if you can see my status (from IntelliJ)
bcz I can't
Someone needs to make a combat enhancing plugin
i cannot sir
hmm
oof
maybe the update changed something? idk
yeah not even wit my status clear, it doesn't show it
does anyone else use Discord Integration?
Or do you guys use Rich Presence?
I use discord integration
are u able to open a project rn and see if it works for you?
matt is on early build, his might not work yet
It's not working for me, i am on early access
ah
mine works see
See what works?
discord integration
IJ discord integration
Ah
not that I care that much. just strange
Wdym?
nothing.
i so heavily await 2021.2 and the new splash screen/logo
wait they're changing it?
that's like, my biggest looking forward to of the next few months
yeah dude did you not see Matt's thing
AS is in the toolbox?
Every IDE, every game, every thing on my pc
oh
Is possibly outdated
hmm
yea
that'd do it
In which task did you add this? You said it was on Shadow 7, were you also using Kotlin 1.5?
I think it's something to do with Kotlin 1.5 causing it.
And yeah Yugi, I do see that adding a v to it fixes it, but that's so weird.
Gradle 7, Shadow 7, Kotlin 1.5.10, I put that in the ShadowJar task
In your settings.gradle is your project name capitalized?
Nah, there the project name is always like project-name
Then I don't know cause I tried that and it is still lowercasing it.
Can you show me your build.gradle?
Now what's weird is if I use the literal archiveFileName.set("Project-${project.version}.jar") it works, but if I change Project to Guilds it lowercases it.
Huh, so that'l Guilds? I can give it a try
Ya
how does tier work
I think it might be the jar output overwriting the name of the shadowJar output
Hmm, I just built it without changing anything and it worked
Oh yeah, let me change that
Try setting a non-empty classifier or changing the name if the jar tasks output
That should most likely fix it
Ah, yeah so kotlin 1.5.10 made it not uppercase
Exactly
๐ฎ
What did you leave in the shadowJar task?
Also what IDE theme is that? I really like it.
The same as you already had
Yup that fixes it.
I guess it doesn't happen for me because my archive name isn't the same as the project name
yea
That might be why, yeah.
apparently oracle offers a free cloud tier with 24gb of ram??
Wait what
according to this thing that showed up in my feed
And you also have some extra icons thingy, right? I used to have it but I forgot what it was called.
Atom Materials Icons I think
That's what i use too
yea you recommended it to me I think
yw ๐
No idea what happened but toUInt no longer works for me .-.
Ah, it's required to use @OptIn(ExperimentalUnsignedTypes::class) on 1.5.10, it wasn't on 1.5.0 .-.
I thought it was no longer experimental ๐ฉ
I believe the 1.5 release notes did say it was experimental lol
Kotlin has a lot of cool experimental features, but having to annotate everything is so annoying
Make a gradle plugin so it does it for you 
is that real
i hate oracle, but even I can't pass up such an amazing deal
24 GB of RAM!
Thatโs more than enough resources to host a game with 20+ friends
yea yea a gig a friend
@oblique heath credit card still required, that's where they lose people
i mean if it's forever free...
and the best part of credit cards is 30 days to cancel them as fraud ๐
Yeahhhh I guess
But nothing is ever free, there's always a catch. This one is you need a cc
Every VPS service with a free tier has required a payment method
AWS, Azure
I don't think that's much of a catch
I'm sure it's to raise awareness of their VPS services
which I frankly didn't even know existed until I saw this
Yeah same
This is actually quite a genius idea, I'm not gonna lie. you get a ton of people hooked, then they start buying more for money. it requires a large initial investment, but they have the cahs
and their adoption will increase very quickly at this rate
Sadly I don't have a cc yet and don't plan on getting it
If I don't have the money to spend on something I want then I shouldn't get it
I mean, if used correctly, credit cards are free 30 day loans essentially, as well as helping to build credit which you really need if you ever want like, for instance, a house or a car
i need help guys
When is Kotlin going to allow merging catch errors oml.
dude you have to use Oracle Linux to use the ARM processors
i hate oracle
oh, no apparently you just can't use minimal ubuntu
you have to use full ubuntu
Blame Andrey ๐ฉ
It's been years
imagine not using Either
๐ (totally not bm-like comment)
or a hitman
uh... sure
I have made ART
๐
how set bedwars1058 scoreboard
Wrong channel, #general-plugins, also no need to ask in multiple places
actually you can make that work
Not this way though
use two lambdas
Had to create objects that extend the original exception to make it be referenceable like that
@static zealot what happened to optimize my server???? ๐ฅฒ
?
?optimize
Are you trying to optimize your minecraft server and don't know how?
Well fortunately for you, Gianluca#0001 was kind enough to make a website that will somewhat guide you on the path to get better performance from your server.
Link: https://blitzoffline.com/OptimiseMyServer/
Another great optimization guide (updated for tuinity, airplane and purpur): https://github.com/YouHaveTrouble/minecraft-optimization
or make an object class with a method called tryBlah, and it returns an object that has this only method Catch which accepts a set of Thowables and a consumer, then run the first consumer (of the try)
Changed repo name
ty โค๏ธ
No probl
If Kotlin had varargs generics (@obtuse gale ๐), more specifically reified, then it'd be perfect
Ugh i would love for Kotlin for .net ๐ฉ
Daily bitches
i'm not sure if you forgot a comma or it's missing on purpose....
My man likes to switch daily
These answers will be individually read and graded by a Real Human
Real Q.C. Humanโข๏ธ
Removing/preventing type erasure on your own code would be awesome
Me neither
I don't know if that's possible while still compiling to Java bytecode
i was under the impression that was just a hard fact of java
Yeah, it is possible with reified but it's actually just a hack
Is possible to give an id to a text component?
meaning..?
I want to remove certain parts of a message on the chat packet and was just looking for an easier way to do it. If I could "name" components when sending them I could probably get all of them on that packet and then just remove the one with id = x
Something like this Component{id=jobs, text=Miner WoodCutter} Component{id=prefix, text=Admin} Component{id=name, text=GabyTM} and then I can just remove the component with id jobs
i don't think you can but the way I would do it is use like translatable components with dummy (custom, registered) translation keys, and match by key
https://wiki.vg/Chat#Schema I was looking at the protocol for a hacky way but all things put into a component is displayed in chat (eg translate & keybind if an invalid value is given)
kekw
that would only work afaik with the native impl of adventure in paper
Im not worried about that, it is for self usage and we run paper.
ah okay, are you aware on how to register custom translation keys?
Negative, but I guess is done through nms or does adventure have a way?
it does yea
Because they changed some things to integrate adventure or why would it not work on other versions?
well i suppose it would also work on velocity since it also integrates adventure natively
Welp
but for other platforms, since you have to use the adventure-platform-x (bukkit, fabric, bungeecord etc), translatable components are pre-parsed into text components before they are transformed to the platform's native component system and sent to the player
actually velocity does not use the translation system
so paper only
lmao
thing is, on paper the translatable components are parsed to text ones right when they are sent
dude I hate oracle
they use iptables and their own weird firewall and nothing works except ssh
i don't undersatnd
hey terfs wanna help me out now lmao
Does anybody have a solution for this shit?
sounds like https://en.wikipedia.org/wiki/Eight_queens_puzzle with some extra steps
What is the sqlite driver class name?
since the votes for Gson are pretty overwhelming for Krypton, I've started work on a new project which I've called "gson-kt" (no surprises there at all), and I have a feeling ```kotlin
public fun JsonObject.asIterable(): MutableIterable<Map.Entry<String, JsonElement>> =
object : MutableIterable<Map.Entry<String, JsonElement>> {
override fun iterator(): MutableIterator<Map.Entry<String, JsonElement>> = entrySet().iterator()
}
#development and just use Imgur lol


dw I got the screenshot
show
lol
man, Gson really needs to step up its game
Moshi supports both reflection and code generation, so it can support generic type serialization out of the box without custom adapters as well as the quick and dirty serialization Gson provides
still debating whether I should just ditch Gson and switch to Moshi though
use aeson ๐
also, Moshi is a good like 300-400 KB less than Gson lol
M-x doom/reload
it's fine
how do you think it compares to Gson?
I think Moshi's better, since it provides the best of both worlds
the core of it is
Gson is about 200ish kb
not true
Im pretty sure it is
import com.google.gson.Gson fan vs import Data.Aeson enjoyer
Lol
and I've seen benchmarks that show Moshi is faster
Then you got Simple.JSON at 25kb ๐
and it doesn't suffer from the same trouble as Gson does when it comes to deserializing generics
what trouble
if you use code generation
Use type adapters?
which, tbf, isn't Gson's fault
treemacs
having to do that for every single class I need proper generics in is really annoying, vs one annotation from Moshi that generates it at compile time and solves this problem for me
Cant wait for reified types ๐คค
wait the JVM is getting reified types?
Why are you generating data classes anyway
wat
Yes
wdym?
reified types overrated, erase every type
You should be serializing or deserializing POJOs
oh
I deserialize a decently complex object lol
https://i.imgur.com/FIPwSwe.png this is what I deserialize
and I need to write a custom serializer for that
Simpify them into data that you actually want to persist and have them interconvertible
whereas Kotlin serialization and Moshi could generate a serializer for that with 1 annotation
instance FromJSON RegistryBlock where
Whats generated there?
wdym what's generated?
You said you were using generated data objects?
I mean the serializer can get generated at compile-time by Kotlin serialization and Moshi
no lol
.
yeah I mean serializer generation
like where the serializer is generated at compile time
which means we don't get issues with type erasure
try deserializing an object that contains a map field with Gson without any custom serializers or deserializers
you'll see what I mean
actually, the deserialization itself won't fail, but try to access a value from the map
also, make sure the map contains more complex types than simple JSON types
e.g. use a Map<String, List<String>> rather than just a Map<String, String> since the former is easy for Gson to infer
do you mean the latter
@jovial warren why don't you use Multimap instead of that map of key - lists?
they are a bit pain in the butt to serialize but you can always copy paste the code I already have for that https://github.com/SecretX33/SaveCoords/blob/main/src/main/java/com/github/secretx33/savecoords/utils/FileUtils.java study more examples in the internet and figure it out
I mean, we only temporarily construct those anyway
they're turned into MappedRegistry objects after they're deserialized
Any suggestions of using coroutines in https://github.com/dkim19375/dkim19375JDAUtils? Especially https://github.com/dkim19375/dkim19375JDAUtils/blob/master/src/main/kotlin/me/dkim19375/dkim19375jdautils/event/EventListener.kt, https://github.com/dkim19375/dkim19375JDAUtils/blob/master/src/main/kotlin/me/dkim19375/dkim19375jdautils/BotBase.kt, and https://github.com/dkim19375/dkim19375JDAUtils/blob/master/src/main/kotlin/me/dkim19375/dkim19375jdautils/manager/SpecialEventsManager.kt (You can ctrl + F launch btw)
no but I suggest to use compiled regex or just replace()
wdym?
Oh my
also lines 41 - 60 in EventListener im cleaning up
also
i don't know why theres toRegex ๐คก
java -> kotlin IJ conversion
๐ฉ
Please use a typealias for that big ActionConsumer type in SpecialEventsManager
wdym
lol
i mean
Line 95 of special doesn't need the toList, and destructure the Pair to get clearer names
oh i though it'd throw a concurrentmodificationexception
since im removing stuff from it while looping
Oh
Does obfuscation impact performance?
ohhh dont obfuscate
